ethyca-fides 2.56.2rc3__py2.py3-none-any.whl → 2.56.3b1__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.
- {ethyca_fides-2.56.2rc3.dist-info → ethyca_fides-2.56.3b1.dist-info}/METADATA +1 -3
- {ethyca_fides-2.56.2rc3.dist-info → ethyca_fides-2.56.3b1.dist-info}/RECORD +231 -226
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/1152c1717849_fix_monitorexecution_started_default.py +57 -0
- fides/api/alembic/migrations/versions/3c58001ad310_add_messages_to_monitor_execution.py +32 -0
- fides/api/alembic/migrations/versions/bd875a8b5d96_add_attachments_and_.py +96 -0
- fides/api/api/v1/endpoints/privacy_request_endpoints.py +2 -14
- fides/api/custom_types.py +24 -1
- fides/api/db/base.py +1 -0
- fides/api/graph/node_filters.py +112 -5
- fides/api/graph/traversal.py +34 -4
- fides/api/models/attachment.py +153 -0
- fides/api/models/audit_log.py +3 -0
- fides/api/models/detection_discovery.py +11 -2
- fides/api/models/privacy_request.py +26 -3
- fides/api/task/create_request_tasks.py +27 -9
- fides/api/task/deprecated_graph_task.py +28 -10
- fides/api/task/graph_task.py +84 -43
- fides/api/util/consent_util.py +20 -5
- fides/api/util/logger.py +19 -1
- fides/config/execution_settings.py +1 -1
- fides/config/security_settings.py +7 -13
- fides/data/sample_project/sample_connections/sample_connections.yml +29 -29
- fides/service/dataset/dataset_config_service.py +4 -2
- fides/service/privacy_request/privacy_request_service.py +32 -14
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/LOp6RUpN795nyhXOv95wz/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1150-73440d7b319558e8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2201-abd6092e6df98c26.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5728-7be08c654c024baa.js → 2397-7177ecf4ebe68feb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{255-69ac1bcb5a52b022.js → 255-bf1797f78249d090.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3005-137ef60b77c71ce1.js → 3005-373de16453ed7eea.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3086-be6b52546c3efc90.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3320-87c75df57a47487e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5318-1bfde23609ea3718.js → 3627-fb83adac32c128e6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3662-420d9807c30008ab.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3855-5c7b11871f59e0e0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{4456-67c8d5b2d96dea1d.js → 3872-f3d5054bdc584eaa.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{8141-55187bd207f5ea9e.js → 3949-9888699e2ac564c4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4294-3e67d7ef3d390c2f.js → 4294-5b3aa9d605217915.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/4481-ca8d2c75d634b6bc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4723-81d28e5be5c7b6d7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5246-9fc6af1a6499e0a4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5258-3a650be9142cf914.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5480-f5bec5e881f72f8d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5487-d96e1abc93f92631.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5826-16e497af363a0cbc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5908-532dfbc9d930f635.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5960-8895f51b30c35798.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{618f8807-5792121b4eda076b.js → 618f8807-d15c33d1d6c8b961.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/6277-b55810d66362f56e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6315-dee79f6861c94d2d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6362-8f79e403fdc2404a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5632-b98308c17b9cd230.js → 6372-f1b54f3cb4888660.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6834-5082b5702e80b531.js → 6834-dcda0a8ed484775e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/6853-cacea421af3bfc26.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6954-6eb480eb132239c3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7044-9dc90893067f38ae.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7495-a61f0c9fcb458664.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{7548-b3992b0c7fb852c9.js → 7751-25e0c1307988ffd7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/79-ba88d0cf4c65aaa2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5973-c0b74d6cf14833cb.js → 7980-2597c279c30fbcda.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/8433-969280d321d1c3a2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/8499-07507004e8275df2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{8837-2b785a4e5bad4813.js → 8837-cf26e5ca1ae5aaf5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9046-80f1ea44f89fe32c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9255-2b1bafefb091a640.js → 9255-336a890ada321f89.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9282-1a5a2f6f4d9ed586.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{2800.40212c25719a2351.js → 9392.97b2e3327dceb7c9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9676.f4d5977a5f148797.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9999-f2e40d5b13343220.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/main-app-2650f704701c6a7b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/main-ce7f38a12ea8c223.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/404-1087258931760074.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-8021f4b202818ba2.js → _app-3c1a7742661d3a9e.js} +14 -14
- fides/ui-build/static/admin/_next/static/chunks/pages/{_error-c91b5eabd7ac9382.js → _error-bede3a8288930dcf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-d7f60624cbc12217.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-17b38b57adc62ed2.js → multiple-18b0b521255289a3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-136bcbd20ac59bf5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/ant-poc-b3b4d0a98450ffd1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-7469901adf64d0e2.js → add-vendors-64f83e9a2b777bf3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-e11ace4f273ebb47.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-fdbafb5a47a6a28c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/new-fc4635c6eea7165f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-35e9df60b21e21a6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-a2713f5a7a2c45e5.js → [id]-bdc686761a0d2d60.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-b67c3c8c25e7051b.js → new-8618ab5fa45cd074.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-da37afbe5ec81339.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/properties-c57b209feef7c2da.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-97fea4ac45093cbd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{consent-a3233ad24a82465a.js → consent-24bef021ee71e36c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]-6cbd79481199812d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-46b9790da2fec05a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-1f965b9c496071d1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/[resourceUrn]-e7833c1c606081a9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-6563b9d6f77d0690.js → resources-bed368d048ea6883.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-942d68a88b321067.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-00526324583139ab.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-8e6f4b1b5b89aff0.js → [monitorId]-f0ab51d0d5f995de.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-a6a9bbfac5ca8d0b.js → action-center-2220c30c3863b5a5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-1d7936f05d23097f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-c575c057b35b958e.js → [resourceUrn]-68122dbf449a11b4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-c1d2018f3ab3e39c.js → detection-0ceaf3c555e84714.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/[resourceUrn]-22c27fe0f898ad2a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery-8f2b102e19b0b8f2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datamap-9cd0c40bef77b120.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-ab9bc1a3640547db.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-17ec8385bb1fa6d4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-e14c1c07658f8a10.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-fc00dbeb18a7b731.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-295756e1fd640b59.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-a6e793e9a8ed00a9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-7d314bb7238af067.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-b8eaa9b9d3832b30.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/index-c9fa68dc0fa42c81.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-20489bceb7b068b8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-21c9902e7b098b39.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/login/{[provider]-cac9584cefa85a09.js → [provider]-c58beef131c3a82d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{login-e55849091751c65a.js → login-0cb0eb44bf2dd24c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/[id]-6b032de0a6c2c400.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/add-template-c0d6ae68ff7979c6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-910372bec245ba5d.js → messaging-f263e6bacf0f2d19.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-c685d19a131d6960.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-b96ee3fea3920fcf.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-1b0f9469cb65abfc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-e0ca944878ef12e8.js → configure-4bad69cd42c9722c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-eebd2f4ead19cfd6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-e780943ac4ce5bf1.js → [id]-b4c808a8a0287d11.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/add-property-5a701477b006a63b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/properties-9a1899dfe052023e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-a3fa3ad77730a03b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-bfe2495fb54933ee.js → about-d073be113e9ca7b0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-4769f55b138073f7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-744e7bbc200557e7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-c5cd5fb578de9515.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-775f55b3f80cd452.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-39c7ae3602ac69b2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/locations-45e33ba111f8f8b0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-14def4ca3cc9cda5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/regulations-94975aeab348528e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-21f26c0dc4d09e9f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-c6396feeefca887b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-c320df35d51dc537.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-181ea5b0ac975239.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/new-d6717378b42982d5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-622e16a17a11c096.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-aa872b21bb835d34.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{webpack-c51aa6524c2716b8.js → webpack-4df2ba5ee2d40f0a.js} +1 -1
- fides/ui-build/static/admin/_next/static/css/15fb7d4837a1de34.css +1 -0
- fides/ui-build/static/admin/_next/static/css/bd5a72c010fa9c14.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/ant-poc.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/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +3 -3
- fides/ui-build/static/admin/lib/fides.js +2 -2
- 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/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.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.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/organization.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/_A05_bEFykI6pEGrDmq4n/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1241-5f9673b3a7fd9469.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1288-84c330c47e031622.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1827-db04b6d4756e3a25.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2017-99f489b3e0279798.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2025-b6a78063b47b0607.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2163-9631ae84deb6560b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2556-1d0c02e14299bf23.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2973-2d9d761cc3aeda1d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3163-5fe20dd3d43cef46.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3309-db63287718ef9694.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3528-30fc61a98d99a66b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3990-146beccde8afea98.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4321-1bf69f1e83baf995.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4981-8d81ec3b6031f0f9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/53-eb32dc5d8571cb7b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6182-1949666cc9179015.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/637-3f7f3e47e69e75fe.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6546-aa6826fdd0356505.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7080-051d67719049e77a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7269-aaa4ad906c8bf8f7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7528.dff66491009d309b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7636-b2dadd026c1fe754.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7871-0a9b00bc8760d091.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7996-23e83b8ca562a06c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8001-3fdc7b543233f717.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8540-a7c91bdbe1bb48fb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8986-c24a626d90c8be1d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9659-478f2eaaf48a8943.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9822-88b7435d5868e1ef.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/main-6880a3888740c515.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/main-app-de538a24cbd2733c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/404-5c601b7b9c17b770.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-2bfb79fc5d16caa4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-4e54aefa8b7f554f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/ant-poc-6048ddeee842c93b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-833ab451ff99ba12.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-b796be4c70e08aa0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/new-35bc7b42751bb78a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-089a73cd8a34dbec.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-cfe92d1c2e95d917.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/properties-059c82d3b8ccdaf6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-54c762b6fe38c20e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]-e1bd1bdd2c310ecc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-c9032d9e0c1dfe1a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-62087de19ac179b3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/[resourceUrn]-c7614c7742e41151.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-9b33b5875445751e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-c299a8bd5e1c1def.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-a9a864cb621d65c6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/[resourceUrn]-9ae2adfc68b95d78.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery-a617ddfa3dfdab23.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datamap-6a0e22b9ce8f5332.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-3e506baace396803.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-6bb9fbe3d41c3127.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-a358b344095573a9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-b328f9aab79dd734.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-3c0b2ccfa442b79d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-102772521ee4a69a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-754926e02c1e0ab0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-1e81b412b5837755.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/index-aa7b15f51ccbdf8b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-2436e6c6406e5f4f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-b6c0f9648f6fa298.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/[id]-d1e96f12c1a12d4d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/add-template-3ff3a7c3c76a208e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-7b13b42d1b23f93b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-6971c7e98c00390a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-71386e3e260a9220.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-be0c167fa1565e38.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/add-property-fc660bc2a3641cd3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties-1a35fd97f2510989.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-b9fe3f3bb16a14eb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-7eec113882c35c3f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-aaf29e3dd2c7e955.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-8b7e71fe1307c5a3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-0b9e78e671540cef.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-eb04e1584d98edb3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/locations-195f7ddfc3768ece.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-22cb683d203ea7fb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/regulations-3eede241c9df1476.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-54d7c6fcc4c79635.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-8271db0c80e6e154.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-7d81df09a0b4eb23.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-7abe76200e4519d8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/new-a59a02634d672703.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-269b17114579510b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-f7e75911c071a20e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js +0 -1
- fides/ui-build/static/admin/_next/static/css/918de8c66b18ce6b.css +0 -1
- {ethyca_fides-2.56.2rc3.dist-info → ethyca_fides-2.56.3b1.dist-info}/LICENSE +0 -0
- {ethyca_fides-2.56.2rc3.dist-info → ethyca_fides-2.56.3b1.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.56.2rc3.dist-info → ethyca_fides-2.56.3b1.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.56.2rc3.dist-info → ethyca_fides-2.56.3b1.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{_A05_bEFykI6pEGrDmq4n → LOp6RUpN795nyhXOv95wz}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8001],{36848:function(e,s,t){t.d(s,{q:function(){return l}});var i=t(24246),a=t(52615);let l=e=>{let{label:s,isDisabled:t,...l}=e;return(0,i.jsx)(a.OK9,{"data-testid":"tab-".concat(s),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:l.fontSize,fontWeight:"500",color:"gray.500",isDisabled:t||!1,children:s})};s.Z=e=>{let{data:s,border:t="partial",...r}=e;return(0,i.jsxs)(a.mQc,{colorScheme:"complimentary",...r,children:[(0,i.jsx)(a.tdY,{width:"partial"===t?"max-content":void 0,children:s.map(e=>(0,i.jsx)(l,{label:e.label,isDisabled:e.isDisabled,fontSize:r.fontSize},e.label))}),(0,i.jsx)(a.nPR,{children:s.map(e=>(0,i.jsx)(a.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},11574:function(e,s,t){var i=t(24246),a=t(52615),l=t(36848);s.Z=e=>{let{data:s,border:t="partial",borderWidth:r=2,...n}=e;return(0,i.jsx)(a.mQc,{colorScheme:"complimentary",...n,children:(0,i.jsx)(a.tdY,{width:"partial"===t?"max-content":void 0,borderBottomWidth:r,children:s.map(e=>(0,i.jsx)(l.q,{label:e.label,"data-testid":e.label,isDisabled:e.isDisabled,fontSize:n.fontSize},e.label))})})}},35682:function(e,s,t){var i=t(24246),a=t(52615);s.Z=e=>{let{title:s,icon:t,type:l,...r}=e;return(0,i.jsx)(a.wpx,{size:"small",type:l,"data-testid":"action-".concat(s),icon:t,iconPosition:"start",...r,children:s})}},76552:function(e,s,t){var i=t(24246),a=t(11574);s.Z=e=>{let{filterTabs:s,onChange:t,filterTabIndex:l}=e;return(0,i.jsx)(a.Z,{border:"full-width",mb:5,size:"sm",data:s,borderWidth:1,index:l,onChange:t})}},8339:function(e,s,t){t.d(s,{Y:function(){return r}});var i=t(24246),a=t(52615),l=t(53614);let r=[(0,i.jsx)(a.PJP.S9g,{},"layers"),(0,i.jsx)(a.PJP.ehp,{},"dataset"),(0,i.jsx)(a.PJP.iA_,{},"table"),(0,i.jsx)(a.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];s.Z=e=>{let{resourceUrn:s,parentLink:t,onPathClick:a=()=>{}}=e,n=[];if(s||n.push({title:"All activity"}),s){n.push({title:"All activity",href:t});let e=s.split(".");e.forEach((s,t)=>{0!==t&&n.push({title:s,icon:r[t-1],onClick:s=>{s.preventDefault(),a(e.slice(0,t+1).join("."))}})})}return(0,i.jsx)(l.m,{"data-testid":"results-breadcrumb",items:n})}},87573:function(e,s,t){var i=t(24246),a=t(52615),l=t(2686);s.Z=()=>(0,i.jsxs)(a.J2e,{isLazy:!0,trigger:"hover",children:[(0,i.jsx)(a.xol,{children:(0,i.jsx)(a.UOT,{color:"gray.400"})}),(0,i.jsxs)(a.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,i.jsx)(a.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,i.jsx)(a.QHN,{bgColor:"gray.800"}),(0,i.jsx)(a.baG,{border:"none",children:(0,i.jsxs)(a.MIq,{columns:2,spacing:2,children:[(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.Rv,{})," Change detected"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.$P,{})," Data labeled"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.zj,{})," Monitoring"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.dK,{})," Addition detected"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.Kr,{})," Unmonitored"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.q1,{})," Removal detected"]})]})})]})]})},38637:function(e,s,t){var i=t(86677),a=t(87162);s.Z=()=>{let e=(0,i.useRouter)();return{monitorId:e.query.monitorId,resourceUrn:e.query.resourceUrn,navigateToDetectionResults:s=>{let{resourceUrn:t,filterTabIndex:i}=s;e.push({pathname:a.dS,query:{resourceUrn:t,filterTabIndex:i}})},navigateToDiscoveryResults:s=>{let{resourceUrn:t,filterTabIndex:i}=s;e.push({pathname:a.Sj,query:{resourceUrn:t,filterTabIndex:i}})}}}},21917:function(e,s,t){t.d(s,{Z:function(){return F}});var i,a,l=t(24246),r=t(59003),n=t(92222),o=t(52615),d=t(86677),c=t(27378),u=t(8540),x=t(76552),g=t(6111),h=t(98320),j=t(61934),f=t(38575),I=t(51557),m=t(15025),v=t(37760),L=t(33890),C=t(52810),p=t(62448),S=e=>{let{resourceType:s}=e,t=(0,n.Cl)();return s===v.D$.SCHEMA?{columns:[t.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(p.Z,{result:e.row.original,changeTypeOverride:I.E.CLASSIFICATION}),header:e=>(0,l.jsx)(u.Rr,{value:"Name",...e}),size:300}),t.accessor(e=>e.urn,{id:"project",cell:e=>(0,l.jsx)(u.G3,{value:(0,m.Z)(e.getValue())}),header:e=>(0,l.jsx)(u.Rr,{value:"Project",...e})}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.accessor(e=>e.system,{id:"system",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"System",...e})}),t.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Detected by",...e})}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),t.display({id:"action",cell:e=>e.row.original.diff_status!==v.LL.MUTED?(0,l.jsx)(L.Z,{resource:e.row.original}):(0,l.jsx)(u.G3,{value:"--"}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===v.D$.TABLE?{columns:[t.display({id:"select",cell:e=>{var s;let{row:t}=e;return(0,l.jsx)(h.k,{isChecked:t.getIsSelected(),onChange:t.getToggleSelectedHandler(),dataTestId:"select-".concat(null!==(s=t.original.name)&&void 0!==s?s:t.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(h.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40}),t.accessor(e=>e.name,{id:"tables",cell:e=>(0,l.jsx)(p.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Table name",...e}),size:300}),t.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Table"}),header:"Type"}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:"Time"}),t.display({id:"actions",cell:e=>(0,l.jsx)(L.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===v.D$.FIELD?{columns:[t.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(p.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Field name",...e}),size:300}),t.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,l.jsx)(j.Z,{type:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Data type",...e})}),t.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Field"}),header:"Type"}),t.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(C.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),t.display({id:"actions",cell:e=>(0,l.jsx)(L.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:{columns:[]}};(i=a||(a={}))[i.ACTION_REQUIRED=0]="ACTION_REQUIRED",i[i.UNMONITORED=1]="UNMONITORED";var _=e=>{let{initialFilterTabIndex:s=0}=e,[t,i]=(0,c.useState)(s),a=(0,c.useMemo)(()=>[{label:"Action Required",filters:[v.LL.CLASSIFICATION_ADDITION,v.LL.CLASSIFICATION_UPDATE],childFilters:[v.LL.CLASSIFICATION_ADDITION,v.LL.CLASSIFICATION_UPDATE]},{label:"In progress",filters:[v.LL.CLASSIFYING,v.LL.CLASSIFICATION_QUEUED],childFilters:[v.LL.CLASSIFYING,v.LL.CLASSIFICATION_QUEUED]},{label:"Unmonitored",filters:[v.LL.MUTED],childFilters:[]}],[]);return{filterTabs:a,filterTabIndex:t,setFilterTabIndex:i,activeDiffFilters:a[t].filters,activeChildDiffFilters:a[t].childFilters}},b=t(38637),A=t(87573),y=t(35682),T=e=>{let{resourceUrn:s}=e,[t,{isLoading:i}]=(0,g.Hf)(),[a,{isLoading:r}]=(0,g.zV)(),n=i||r,d=async e=>{await a({staged_resource_urns:e})},c=async e=>{await t({staged_resource_urns:e})};return(0,l.jsx)(o.jqI,{"data-testid":"bulk-actions-menu",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(y.Z,{title:"Confirm all",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>c([s]),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(y.Z,{title:"Ignore all",icon:(0,l.jsx)(o.tpL,{}),onClick:()=>d([s]),disabled:n,loading:r,size:"middle"})]})})},D=e=>{let{selectedUrns:s}=e,[t,{isLoading:i}]=(0,g.Hf)(),[a,{isLoading:r}]=(0,g.zV)(),n=i||r,d=async e=>{await t({staged_resource_urns:e})},c=async e=>{await a({staged_resource_urns:e})};return s.length?(0,l.jsxs)(o.jqI,{className:"items-center","data-testid":"bulk-actions-menu",children:[(0,l.jsx)(o.xvT,{fontSize:"xs",fontWeight:"semibold",minW:16,mr:4,children:"".concat(s.length," selected")}),(0,l.jsxs)(o.jqI,{className:"gap-2",children:[(0,l.jsx)(y.Z,{title:"Confirm",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>d(s),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(y.Z,{title:"Ignore",icon:(0,l.jsx)(o.tpL,{}),disabled:n,loading:r,onClick:()=>c(s),size:"middle"})]})]}):null},R=t(52962),E=t(71329),N=t(2053),w=t(22770);let O={items:[],total:0,page:1,size:50,pages:1},Z=()=>(0,l.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,l.jsxs)(o.gCW,{children:[(0,l.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,l.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var F=e=>{var s,t;let{resourceUrn:i}=e,h=(0,d.useRouter)(),[j,f]=(0,c.useState)(""),{filterTabs:I,setFilterTabIndex:m,filterTabIndex:L,activeDiffFilters:C,activeChildDiffFilters:p}=_({initialFilterTabIndex:(null===(s=h.query)||void 0===s?void 0:s.filterTabIndex)?Number(null===(t=h.query)||void 0===t?void 0:t.filterTabIndex):void 0}),[y,F]=(0,c.useState)({}),{PAGE_SIZES:z,pageSize:k,setPageSize:P,onPreviousPageClick:U,isPreviousPageDisabled:M,onNextPageClick:G,isNextPageDisabled:q,startRange:V,endRange:Q,pageIndex:W,setTotalPages:H,resetPageIndexToDefault:Y}=(0,u.oi)();(0,c.useEffect)(()=>{Y()},[i,j,Y,C,p]);let{isFetching:$,isLoading:J,data:K}=(0,g.z8)({staged_resource_urn:i,page:W,size:k,child_diff_status:p,diff_status:C,search:j}),B=(0,R.G)(null==K?void 0:K.items[0]),{items:X,total:ee,pages:es}=(0,c.useMemo)(()=>null!=K?K:O,[K]);(0,c.useEffect)(()=>{H(es)},[es,H]);let{columns:et}=S({resourceType:B}),ei=(0,c.useMemo)(()=>et,[et]),{navigateToDiscoveryResults:ea}=(0,b.Z)(),el=(0,r.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),columns:ei,manualPagination:!0,onRowSelectionChange:F,state:{rowSelection:y},getRowId:E.Z,data:X,columnResizeMode:"onChange"}),er=Object.keys(y).filter(e=>y[e]);return J?(0,l.jsx)(u.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.Z,{filterTabs:I,filterTabIndex:L,onChange:m}),(0,l.jsxs)(u.Q$,{children:[(0,l.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,l.jsx)(o.xuv,{flexShrink:0,children:(0,l.jsx)(w.M,{value:j,onChange:f})}),(0,l.jsx)(A.Z,{})]}),B===v.D$.TABLE&&!!er.length&&(0,l.jsx)(D,{selectedUrns:er}),B===v.D$.FIELD&&L!==a.UNMONITORED&&(0,l.jsx)(T,{resourceUrn:i})]}),(0,l.jsx)(u.ZK,{tableInstance:el,onRowClick:e=>ea({resourceUrn:e.urn,filterTabIndex:L}),getRowIsClickable:e=>B!==v.D$.FIELD||(0,N.Z)(e),emptyTableNotice:(0,l.jsx)(Z,{})}),(0,l.jsx)(u.s8,{totalRows:ee||0,pageSizes:z,setPageSize:P,onPreviousPageClick:U,isPreviousPageDisabled:M||$,onNextPageClick:G,isNextPageDisabled:q||$,startRange:V,endRange:Q})]})}},33890:function(e,s,t){var i=t(24246),a=t(52615),l=t(53359),r=t(90049),n=t(37760),o=t(35682),d=t(6111);s.Z=e=>{let{resource:s}=e,[t,{isLoading:c}]=(0,d.v8)(),[u,{isLoading:x}]=(0,d.cM)(),[g,{isLoading:h}]=(0,d.vi)(),j=x||h||c,{diff_status:f,child_diff_statuses:I,top_level_field_name:m}=s,{successAlert:v}=(0,l.V)(),L=f===n.LL.CLASSIFICATION_ADDITION||f===n.LL.CLASSIFICATION_UPDATE,C=I&&(I[n.LL.CLASSIFICATION_ADDITION]||I[n.LL.CLASSIFICATION_UPDATE]),p=(L||C)&&!m,S=L||C,_=p&&S,b=async()=>{await u({staged_resource_urn:s.urn}),v('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},A=async()=>{await g({staged_resource_urn:s.urn}),v("Ignored changes will not be added to a Fides dataset.","".concat(s.name||"Changes"," ignored"))},y=async()=>{await t({staged_resource_urn:s.urn,monitor_config_id:s.monitor_config_id,start_classification:!0,classify_monitored_resources:!0}),v("Reclassification of ".concat((0,r.Z)(s)||"the resource"," has begun. The results may take some time to appear in the “Data discovery“ tab."),"Reclassification started")};return(0,i.jsxs)(a.Ugi,{gap:2,children:[p&&(0,i.jsx)(o.Z,{title:"Confirm",icon:(0,i.jsx)(a.nQG,{}),onClick:b,disabled:j,loading:x}),S&&(0,i.jsx)(o.Z,{title:"Ignore",icon:(0,i.jsx)(a.tpL,{}),onClick:A,disabled:j,loading:h}),!_&&(0,i.jsx)(o.Z,{title:"Reclassify",icon:(0,i.jsx)(a.nyI,{}),onClick:y,disabled:j,loading:c}),(0,i.jsx)(a.LZC,{}),_&&(0,i.jsxs)(a.v2r,{children:[(0,i.jsx)(a.j2t,{as:a.wpx,size:"small",type:"text",icon:(0,i.jsx)(a.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-overflow-btn"}),(0,i.jsx)(a.qyq,{children:(0,i.jsx)(a.sNh,{onClick:y,icon:(0,i.jsx)(a.nyI,{}),"data-testid":"action-reclassify",children:"Reclassify"})})]})]})}},61934:function(e,s,t){var i=t(24246),a=t(52615);s.Z=e=>{let{type:s}=e;return(0,i.jsx)(a.kCb,{align:"center",h:"full",children:!!s&&(0,i.jsx)(a.j8w,{children:s})})}},62448:function(e,s,t){var i=t(24246),a=t(52615),l=t(2686),r=t(58525),n=t(90049),o=t(6170);s.Z=e=>{let{result:s,changeTypeOverride:t}=e,d=null!=t?t:(0,r.Z)(s);return(0,i.jsxs)(a.kCb,{alignItems:"center",height:"100%",children:[(0,i.jsx)(a.ua7,{label:d,children:(0,i.jsx)("span",{children:l.QL[d]})}),(0,i.jsx)(a.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,o.Z)(s)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,n.Z)(s)})]})}},38575:function(e,s,t){var i=t(24246),a=t(8540),l=t(51557),r=t(58525);let n={[l.E.MUTED]:{color:"marble",label:"Unmonitored"},[l.E.MONITORED]:{color:"success",label:"Monitoring"},[l.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};s.Z=e=>{var s,t,l,o,d;let{result:c,changeTypeOverride:u}=e;if(null===(s=c.user_assigned_data_categories)||void 0===s?void 0:s.length)return(0,i.jsx)(a.A4,{color:"success",value:"Reviewed"});let x=null!=u?u:(0,r.Z)(c);return(0,i.jsx)(a.A4,{color:null!==(o=null===(t=n[x])||void 0===t?void 0:t.color)&&void 0!==o?o:"warning",value:null!==(d=null===(l=n[x])||void 0===l?void 0:l.label)&&void 0!==d?d:"Pending review"})}},15025:function(e,s){s.Z=e=>{let s=e.split(".");return s.length>1?s[1]:""}},58525:function(e,s,t){var i=t(51557),a=t(37760);s.Z=e=>e.diff_status===a.LL.ADDITION?i.E.ADDITION:e.diff_status===a.LL.REMOVAL?i.E.REMOVAL:e.diff_status===a.LL.CLASSIFYING||e.diff_status===a.LL.CLASSIFICATION_QUEUED?i.E.IN_PROGRESS:e.diff_status===a.LL.CLASSIFICATION_ADDITION||e.diff_status===a.LL.CLASSIFICATION_UPDATE?i.E.CLASSIFICATION:e.child_diff_statuses?e.child_diff_statuses[a.LL.CLASSIFYING]||e.child_diff_statuses[a.LL.CLASSIFICATION_QUEUED]?i.E.IN_PROGRESS:e.child_diff_statuses[a.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[a.LL.CLASSIFICATION_UPDATE]?i.E.CLASSIFICATION:e.child_diff_statuses[a.LL.ADDITION]||e.child_diff_statuses[a.LL.REMOVAL]?i.E.CHANGE:e.diff_status===a.LL.MONITORED?i.E.MONITORED:e.diff_status===a.LL.MUTED?i.E.MUTED:i.E.NONE:i.E.NONE},71329:function(e,s){s.Z=e=>e.urn}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8540],{33312:function(e,t,n){var l=n(24246),o=n(52615);t.Z=e=>{let{search:t,onChange:n,withIcon:i,onClear:r,placeholder:s,...a}=e;return(0,l.jsxs)(o.vyj.Compact,{className:"w-96","data-testid":"search-bar",children:[(0,l.jsx)(o.uFc,{autoComplete:"off",value:t,onChange:e=>n(e.target.value),placeholder:s||"Search...",prefix:i?(0,l.jsx)(o.PTu,{boxSize:4}):void 0,...a}),r?(0,l.jsx)(o.wpx,{onClick:r,children:"Clear"}):null]})}},60136:function(e,t,n){n.d(t,{D4:function(){return i.D4},MM:function(){return g},Ot:function(){return c},c6:function(){return o},cj:function(){return h},e$:function(){return s},fn:function(){return a},iC:function(){return x},nU:function(){return u},tB:function(){return d}});var l,o,i=n(41164);let r="An unexpected error occurred. Please try again.",s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;if((0,i.Bw)(e)){if((0,i.hE)(e.data))return e.data.detail;if((0,i.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,i.Dy)(e.data)||404===e.status&&(0,i.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function a(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:r};if((0,i.oK)(e))return{status:e.originalStatus,message:e.data};if((0,i.Bw)(e)){let{status:n}=e;return{status:n,message:s(e,t.message)}}return t},g=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(l=o||(o={})).GVL="gvl",l.AC="gacp",l.COMPASS="compass";let x={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},h=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},56721:function(e,t,n){n.d(t,{_:function(){return o}});var l=n(27378);function o(e,t){let[n,o]=(0,l.useState)(()=>{if(!e)return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return console.error(e),t}});return[n,t=>{try{let l=t instanceof Function?t(n):t;o(l),e&&window.localStorage.setItem(e,JSON.stringify(l))}catch(e){console.error(e)}}]}},77650:function(e,t,n){var l=n(24246),o=n(52615);t.Z=e=>{let{isOpen:t,onClose:n,onConfirm:i,onCancel:r,title:s,message:a,cancelButtonText:c,continueButtonText:d,isLoading:u,returnFocusOnClose:g,isCentered:x,testId:h="confirmation-modal",icon:m}=e;return(0,l.jsxs)(o.u_l,{isOpen:t,onClose:n,size:"lg",returnFocusOnClose:null==g||g,isCentered:x,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{textAlign:"center",p:6,"data-testid":h,children:[m?(0,l.jsx)(o.M5Y,{mb:2,children:m}):null,s?(0,l.jsx)(o.xBx,{fontWeight:"medium",pb:0,children:s}):null,a?(0,l.jsx)(o.fef,{children:a}):null,(0,l.jsx)(o.mzw,{children:(0,l.jsxs)(o.MIq,{columns:2,width:"100%",children:[(0,l.jsx)(o.wpx,{onClick:()=>{r&&r(),n()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:u,children:c||"Cancel"}),(0,l.jsx)(o.wpx,{type:"primary",size:"large",onClick:i,"data-testid":"continue-btn",loading:u,children:d||"Continue"})]})})]})]})}},54249:function(e,t,n){n.d(t,{W3:function(){return r},bX:function(){return s},oi:function(){return a},s8:function(){return c}});var l=n(24246),o=n(52615),i=n(27378);let r=[25,50,100],s=e=>{let t=e.getFilteredRowModel().rows.length,{pageIndex:n}=e.getState().pagination,{pageSize:l}=e.getState().pagination,o=e.previousPage,i=!e.getCanPreviousPage(),r=e.nextPage,s=!e.getCanNextPage(),{setPageSize:a}=e;return{totalRows:t,onPreviousPageClick:o,isPreviousPageDisabled:i,onNextPageClick:r,isNextPageDisabled:s,setPageSize:a,startRange:n*l==0?1:n*l,endRange:n*l+l}},a=()=>{let[e,t]=(0,i.useState)(r[0]),[n,l]=(0,i.useState)(1),[o,s]=(0,i.useState)(1),a=(0,i.useCallback)(()=>{l(e=>e-1)},[l]),c=(0,i.useMemo)(()=>1===n,[n]),d=(0,i.useCallback)(()=>{l(e=>e+1)},[l]),u=(0,i.useMemo)(()=>!!o&&(n===o||o<2),[n,o]),g=(n-1)*e==0?1:(n-1)*e,x=(n-1)*e+e,h=(0,i.useCallback)(()=>{l(1)},[]);return{onPreviousPageClick:a,isPreviousPageDisabled:c,onNextPageClick:d,isNextPageDisabled:u,pageSize:e,setPageSize:e=>{t(e),h()},PAGE_SIZES:r,startRange:g,endRange:x,pageIndex:n,resetPageIndexToDefault:h,setTotalPages:s}},c=e=>{let{pageSizes:t,totalRows:n,onPreviousPageClick:i,isPreviousPageDisabled:r,onNextPageClick:s,isNextPageDisabled:a,setPageSize:c,startRange:d,endRange:u}=e;return(0,l.jsxs)(o.Ugi,{ml:1,mt:3,mb:1,children:[(0,l.jsxs)(o.v2r,{children:[(0,l.jsx)(o.j2t,{as:o.wpx,size:"small","data-testid":"pagination-btn",children:(0,l.jsxs)(o.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"semibold",userSelect:"none",style:{fontVariantNumeric:"tabular-nums"},children:[d.toLocaleString("en"),"-",u<=n?u.toLocaleString("en"):n.toLocaleString("en")," ","of ",n.toLocaleString("en")]})}),(0,l.jsx)(o.qyq,{minWidth:"0",children:t.map(e=>(0,l.jsxs)(o.sNh,{onClick:()=>{c(e)},"data-testid":"pageSize-".concat(e),fontSize:"xs",children:[e," per view"]},e))})]}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.wyc,{}),size:"small","aria-label":"previous page",onClick:i,disabled:r}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.XCv,{}),size:"small","aria-label":"next page",onClick:s,disabled:a})]})}},98320:function(e,t,n){n.d(t,{A4:function(){return f},CI:function(){return v},Cy:function(){return m},G3:function(){return h},Hm:function(){return S},Rr:function(){return w},S1:function(){return y},WP:function(){return b},k:function(){return C},mb:function(){return j}});var l=n(24246),o=n(7195),i=n(52615),r=n(34090),s=n(3819),a=n.n(s),c=n(27378),d=n(60136),u=n(77650),g=n(16781),x=n(36768);let h=e=>{var t,n;let{value:o,cellProps:r,...s}=e,c=!!(null==r?void 0:null===(t=r.cell.column.columnDef.meta)||void 0===t?void 0:t.showHeaderMenu)&&!!(null==r?void 0:null===(n=r.cellState)||void 0===n?void 0:n.isExpanded);return(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,py:1.5,fontWeight:"normal",textOverflow:"ellipsis",overflow:c?void 0:"hidden",whiteSpace:c?"normal":void 0,title:c&&o?void 0:null==o?void 0:o.toString(),...s,children:a()(o)?o.toString():o})},m=e=>{let{time:t}=e;if(!t)return(0,l.jsx)(h,{value:"N/A"});let n=(0,o.B)(new Date(t),new Date,{addSuffix:!0}),r=(0,x.p6)(new Date(t));return(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",children:(0,l.jsx)(i.esZ,{title:r,children:(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,x.G8)(n)})})})},p=e=>{let{children:t,...n}=e;return(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",mr:2,...n,children:t})},f=e=>{let{value:t,suffix:n,...o}=e;return(0,l.jsx)(p,{children:(0,l.jsxs)(i.j8w,{...o,children:[t,n]})})},v=e=>{let{count:t,singSuffix:n,plSuffix:o,...r}=e,s=null;return s=1===t?(0,l.jsxs)(i.j8w,{...r,children:[t,n?" ".concat(n):null]}):(0,l.jsxs)(i.j8w,{...r,children:[t,o?" ".concat(o):null]}),(0,l.jsx)(p,{children:s})},j=e=>{let{values:t,cellProps:n,...o}=e,{isExpanded:r,isWrapped:s,version:a}=(null==n?void 0:n.cellState)||{},[d,u]=(0,c.useState)(!r),[g,x]=(0,c.useState)(!!s),[h,m]=(0,c.useState)(r?t:null==t?void 0:t.slice(0,2));return(0,c.useEffect)(()=>{u(!r)},[r,a]),(0,c.useEffect)(()=>{x(!!s)},[s]),(0,c.useEffect)(()=>{(null==t?void 0:t.length)&&m(d?t.slice(0,2):t)},[d,t]),(0,c.useMemo)(()=>(null==h?void 0:h.length)?(0,l.jsxs)(i.kCb,{alignItems:d?"center":"flex-start",flexDirection:d||g?"row":"column",flexWrap:g?"wrap":"nowrap",gap:1.5,pt:2,pb:2,onClick:e=>{d||(e.stopPropagation(),u(!0))},cursor:d?void 0:"pointer",children:[h.map(e=>(0,l.jsx)(i.j8w,{color:"white","data-testid":e.key,...o,children:e.label},e.key)),d&&t&&t.length>2&&(0,l.jsxs)(i.wpx,{type:"link",size:"small",onClick:()=>u(!1),className:"text-xs font-normal",children:["+",t.length-2," more"]})]}):null,[h,d,g,t,o])},b=e=>{let{value:t,suffix:n,cellState:o,ignoreZero:r,tagProps:s}=e,a=null;return t?(a=Array.isArray(t)?1===t.length?(0,l.jsx)(i.j8w,{...s,children:t}):(null==o?void 0:o.isExpanded)&&t.length>0?t.map((e,t)=>(0,l.jsx)(i.j8w,{...s,children:e},(null==e?void 0:e.toString())||t)):(0,l.jsxs)(i.j8w,{...s,children:[t.length,n?" ".concat(n):null]}):(0,l.jsx)(i.j8w,{...s,children:t}),(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",gap:0,overflowX:"hidden",children:a})):r?null:(0,l.jsxs)(i.j8w,{...s,children:["0",n?" ".concat(n):""]})},C=e=>{let{dataTestId:t,...n}=e;return(0,l.jsx)(i.kCb,{alignItems:"center",justifyContent:"center",onClick:e=>e.stopPropagation(),children:(0,l.jsx)(i.XZJ,{"data-testid":t||void 0,...n})})},w=e=>{let{value:t,...n}=e;return(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:9,fontWeight:"medium",flex:1,...n,children:t})},S=e=>{let{value:t,defaultValue:n,isEditing:o,...s}=e,a=s.column.columnDef.id||"",[c]=(0,r.U$)(a),{submitForm:d}=(0,r.u6)();return o?(0,l.jsx)(i.uFc,{...c,maxLength:80,placeholder:n,"aria-label":"Edit column name",size:"small","data-testid":"column-".concat(a,"-input"),onPressEnter:d}):(0,l.jsx)(w,{value:t,...s})},y=e=>{let{enabled:t,onToggle:n,title:o,message:r,isDisabled:s,...a}=e,c=(0,i.qY0)(),x=(0,i.pmc)(),h=async e=>{let{enable:t}=e,l=await n(t);(0,d.D4)(l)&&x((0,g.Vo)((0,d.e$)(l.error)))},m=async e=>{e?await h({enable:!0}):c.onOpen()};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.rAg,{checked:t,onChange:m,disabled:s,"data-testid":"toggle-switch",...a}),(0,l.jsx)(u.Z,{isOpen:c.isOpen,onClose:c.onClose,onConfirm:()=>{h({enable:!1}),c.onClose()},title:o,message:(0,l.jsx)(i.xvT,{color:"gray.500",children:r}),continueButtonText:"Confirm",isCentered:!0,icon:(0,l.jsx)(i.aNP,{color:"orange.100"})})]})}},8540:function(e,t,n){n.d(t,{A4:function(){return l.A4},CI:function(){return l.CI},F1:function(){return p},G3:function(){return l.G3},Rr:function(){return l.Rr},vr:function(){return W},ZK:function(){return R},HO:function(){return D},WP:function(){return l.WP},k:function(){return l.k},W3:function(){return A.W3},s8:function(){return A.s8},AA:function(){return N},Q$:function(){return O},I4:function(){return _},bX:function(){return A.bX},oi:function(){return A.oi}});var l=n(98320),o=n(24246),i=n(52615),r=n(27378),s=n(71533),a=n(65201),c=n(75383),d=n(52202);let u="DraggableColumnListItem",g=e=>{let{id:t,index:n,moveColumn:l,setColumnVisible:o}=e,i=(0,r.useRef)(null),[{handlerId:s},a]=(0,c.L)({accept:u,collect:e=>({handlerId:e.getHandlerId()}),hover(e,t){var o;if(!i.current)return;let r=e.index;if(r===n)return;let s=null===(o=i.current)||void 0===o?void 0:o.getBoundingClientRect(),a=(s.bottom-s.top)/2,c=t.getClientOffset().y-s.top;r<n&&c<a||r>n&&c>a||(l(r,n),Object.assign(e,{index:n}))}}),[{isDragging:g},x,h]=(0,d.c)({type:u,item:()=>({id:t,index:n}),collect:e=>({isDragging:!!e.isDragging()})});return x(a(i)),{isDragging:g,ref:i,handlerId:s,preview:h,handleColumnVisibleToggle:e=>{o(n,e)}}},x=e=>{let{id:t,index:n,isVisible:l,moveColumn:r,setColumnVisible:s,text:a}=e,{ref:c,isDragging:d,handlerId:u,preview:x,handleColumnVisibleToggle:h}=g({index:n,id:t,moveColumn:r,setColumnVisible:s});return(0,o.jsxs)(i.HCh,{alignItems:"center",display:"flex",minWidth:0,ref:e=>{x(e)},"data-handler-id":u,opacity:d?.2:1,"data-testid":"column-list-item-".concat(t),children:[(0,o.jsx)(i.xuv,{ref:c,cursor:d?"grabbing":"grab","data-testid":"column-dragger-".concat(t),children:(0,o.jsx)(i.DE2,{as:i.zGR,color:"gray.300",flexShrink:0,height:"20px",width:"20px",_hover:{color:"gray.700"}})}),(0,o.jsxs)(i.NIc,{alignItems:"center",display:"flex",minWidth:0,title:a,children:[(0,o.jsx)(i.lXp,{color:"gray.700",fontSize:"normal",fontWeight:400,htmlFor:"".concat(t),mb:"0",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flexGrow:1,children:a}),(0,o.jsx)(i.rAg,{id:"".concat(t),checked:l,onChange:h})]})]})},h=e=>{let{columns:t}=e,[n,l]=(0,r.useState)(null!=t?t:[]);return(0,r.useEffect)(()=>{l((null==t?void 0:t.map(e=>({...e})))||[])},[t]),{columns:n,moveColumn:(0,r.useCallback)((e,t)=>{l(n=>(0,a.ZP)(n,n=>{let l=n[e];n.splice(e,1),n.splice(t,0,l)}))},[]),setColumnVisible:(0,r.useCallback)((e,t)=>{l(n=>(0,a.ZP)(n,n=>{n[e]&&(n[e].isVisible=t)}))},[])}},m=e=>{let{columns:t,columnEditor:n}=e;return(0,o.jsx)(i.aVo,{spacing:4,children:t.map((e,t)=>(0,o.jsx)(x,{id:e.id,index:t,isVisible:e.isVisible,moveColumn:n.moveColumn,setColumnVisible:n.setColumnVisible,text:e.displayText},e.id))})},p=e=>{let{isOpen:t,onClose:n,headerText:l,tableInstance:a,columnNameMap:c,prefixColumns:d,savedCustomReportId:u,onColumnOrderChange:g,onColumnVisibilityChange:x}=e,p=h({columns:(0,r.useMemo)(()=>a.getAllColumns().filter(e=>!d.includes(e.id)).map(e=>{var t;return{id:e.id,displayText:(0,s.AH)({columnNameMap:c,columnId:e.id}),isVisible:null!==(t=a.getState().columnVisibility[e.id])&&void 0!==t?t:e.getIsVisible()}}).sort((e,t)=>{let{columnOrder:n}=a.getState(),l=n.indexOf(e.id),o=n.indexOf(t.id);return -1===l&&-1===o?0:-1===l?1:-1===o?-1:l-o}),[u,c])}),f=(0,r.useCallback)(()=>{let e=[...d,...p.columns.map(e=>e.id)],t=p.columns.reduce((e,t)=>(e[t.id]=t.isVisible,e),{});g(e),x(t),n()},[n,d,p.columns,g,x]);return(0,o.jsxs)(i.u_l,{isOpen:t,onClose:n,isCentered:!0,size:"2xl",children:[(0,o.jsx)(i.ZAr,{}),(0,o.jsxs)(i.hzk,{children:[(0,o.jsx)(i.xBx,{pb:0,children:l}),(0,o.jsx)(i.olH,{"data-testid":"column-settings-close-button"}),(0,o.jsxs)(i.fef,{children:[(0,o.jsx)(i.xvT,{fontSize:"sm",color:"gray.500",mb:2,children:"You can toggle columns on and off to hide or show them in the table. Additionally, you can drag columns up or down to change the order"}),(0,o.jsxs)(i.mQc,{colorScheme:"complimentary",children:[(0,o.jsx)(i.tdY,{children:(0,o.jsx)(i.OK9,{color:"complimentary.500",children:"Columns"})}),(0,o.jsx)(i.nPR,{children:(0,o.jsx)(i.x45,{p:0,pt:4,maxHeight:"270px",overflowY:"scroll",children:(0,o.jsx)(m,{columns:p.columns,columnEditor:p})})})]})]}),(0,o.jsx)(i.mzw,{children:(0,o.jsxs)(i.xuv,{display:"flex",justifyContent:"space-between",width:"100%",children:[(0,o.jsx)(i.wpx,{onClick:n,className:"mr-3 grow",children:"Cancel"}),(0,o.jsx)(i.wpx,{onClick:f,type:"primary",className:"grow","data-testid":"save-button",children:"Save"})]})})]})]})};var f=n(59003),v=n(56721),j=n(62528);let b=e=>{var t,n,l,r,a,c,d,u;let g,{cell:x,onRowClick:h,cellState:m}=e,p=x.getContext().table.getState().grouping.length>0,v=p?x.getContext().table.getState().grouping[0]:void 0,j=x.column.id===v,b=!1,C=!1,w=!1,S=x.getContext().table.getRowModel().rows.filter(e=>!e.id.includes(":")),y=S[0].id===x.row.id,k=S[S.length-1].id===x.row.id;if(x.getValue()&&j){let e=x.getContext().table.getRow("".concat(x.column.id,":").concat(x.getValue()));w=1===e.subRows.length,b=e.subRows[0].id===x.row.id,C=e.subRows[e.subRows.length-1].id===x.row.id}let z=(!j||b)&&!!(null===(t=x.column.columnDef.meta)||void 0===t?void 0:t.onCellClick);return(null===(n=x.column.columnDef.meta)||void 0===n?void 0:n.disableRowClick)||!h?z&&(g=()=>{var e,t;null===(t=x.column.columnDef.meta)||void 0===t||null===(e=t.onCellClick)||void 0===e||e.call(t,x.row.original)}):g=e=>{h(x.row.original,e)},(0,o.jsx)(i.Td,{width:(null===(l=x.column.columnDef.meta)||void 0===l?void 0:l.width)?x.column.columnDef.meta.width:"unset",overflow:(null===(r=x.column.columnDef.meta)||void 0===r?void 0:r.overflow)?null===(a=x.column.columnDef.meta)||void 0===a?void 0:a.overflow:"auto",borderBottomWidth:k||j?"0px":"1px",borderBottomColor:"gray.200",borderRightWidth:"1px",borderRightColor:"gray.200",sx:{article:{borderTopWidth:"2x",borderTopColor:"red"},...(0,s.J9)("select"===x.column.id||(null===(c=x.column.columnDef.meta)||void 0===c?void 0:c.noPadding)),maxWidth:"calc(var(--col-".concat(x.column.id,"-size) * 1px)"),minWidth:"calc(var(--col-".concat(x.column.id,"-size) * 1px)"),"&:hover":{backgroundColor:z?"gray.50":void 0,cursor:z?"pointer":void 0}},_hover:!h||(null===(d=x.column.columnDef.meta)||void 0===d?void 0:d.disableRowClick)?void 0:{cursor:"pointer"},_first:{borderBottomWidth:(p||k)&&(!C||y||k)&&(!b||!w||k)?"0px":"1px"},_last:{borderRightWidth:0},height:"inherit",onClick:g,"data-testid":"row-".concat(x.row.id,"-col-").concat(x.column.id),...null===(u=x.column.columnDef.meta)||void 0===u?void 0:u.cellProps,children:!x.getIsPlaceholder()||b?(0,f.ie)(x.column.columnDef.cell,{...x.getContext(),cellState:m}):null})},C=e=>{let{row:t,renderRowTooltipLabel:n,onRowClick:l,expandedColumns:r,wrappedColumns:a}=e;if(t.getIsGrouped())return null;let c=(0,o.jsx)(i.Tr,{height:"36px",_hover:l?{backgroundColor:"gray.50"}:void 0,"data-testid":"row-".concat(t.id),backgroundColor:t.getCanSelect()?void 0:"gray.50",children:t.getVisibleCells().map(e=>{let t=(0,s.tt)(e.column.id,r),n={isExpanded:!!t&&t>0,isWrapped:!!a.find(t=>t===e.column.id),version:t};return(0,o.jsx)(b,{cell:e,onRowClick:l,cellState:n},e.id)})},t.id);return n?(0,o.jsx)(i.ua7,{label:n?n(t):void 0,hasArrow:!0,placement:"top",children:c}):c},w={asc:{icon:(0,o.jsx)(i.Hf3,{}),title:"Sort ascending"},desc:{icon:(0,o.jsx)(i.veu,{}),title:"Sort descending"}},S={height:i.rSc.space[9],width:"100%",textAlign:"start","&:focus-visible":{backgroundColor:"gray.100"},"&:focus":{outline:"none"}},y=e=>{var t,n,l,r,a,c,d,u;let{header:g,onGroupAll:x,onExpandAll:h,onWrapToggle:m,isExpandAll:p,isWrapped:v,enableSorting:b}=e,{meta:C}=g.column.columnDef;return(null==C?void 0:C.showHeaderMenu)?(0,o.jsxs)(i.v2r,{placement:"bottom-end",closeOnSelect:!C.showHeaderMenuWrapOption,children:[(0,o.jsx)(i.j2t,{as:i.zxk,rightIcon:(0,o.jsxs)(i.Ugi,{children:[null===(t=w[g.column.getIsSorted()])||void 0===t?void 0:t.icon,(0,o.jsx)(i.nXP,{transform:"rotate(90deg)"})]}),title:"Column options",variant:"ghost",size:"sm",sx:{...(0,s.J9)("select"===g.column.id),...S},"data-testid":"".concat(g.id,"-header-menu"),children:(0,f.ie)(g.column.columnDef.header,g.getContext())}),(0,o.jsx)(i.h_i,{children:(0,o.jsxs)(i.qyq,{fontSize:"xs",minW:"0",w:"158px","data-testid":"".concat(g.id,"-header-menu-list"),children:[(0,o.jsxs)(i.sNh,{gap:2,color:p?"complimentary.500":void 0,onClick:()=>h(g.id),children:[(0,o.jsx)(j.oq,{})," Expand all"]}),(0,o.jsxs)(i.sNh,{gap:2,color:p?void 0:"complimentary.500",onClick:()=>x(g.id),children:[(0,o.jsx)(j.Kc,{})," Collapse all"]}),b&&g.column.getCanSort()&&(0,o.jsxs)(i.sNh,{gap:2,onClick:g.column.getToggleSortingHandler(),children:[null!==(d=null===(n=w[g.column.getNextSortingOrder()])||void 0===n?void 0:n.icon)&&void 0!==d?d:(0,o.jsx)(i.Dbz,{}),null!==(u=null===(l=w[g.column.getNextSortingOrder()])||void 0===l?void 0:l.title)&&void 0!==u?u:"Clear sort"]}),C.showHeaderMenuWrapOption&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.RaW,{}),(0,o.jsx)(i.xuv,{px:3,children:(0,o.jsx)(i.XZJ,{size:"sm",isChecked:v,onChange:()=>m(g.id,!v),colorScheme:"complimentary",children:(0,o.jsx)(i.xvT,{fontSize:"xs",children:"Wrap results"})})})]})]})})]}):b&&g.column.getCanSort()?(0,o.jsx)(i.zxk,{"data-testid":"".concat(g.id,"-header-sort"),onClick:g.column.getToggleSortingHandler(),rightIcon:null===(r=w[g.column.getIsSorted()])||void 0===r?void 0:r.icon,title:null!==(c=null===(a=w[g.column.getNextSortingOrder()])||void 0===a?void 0:a.title)&&void 0!==c?c:"Clear sort",variant:"ghost",size:"sm",sx:{...(0,s.J9)("select"===g.column.id),...S},children:(0,f.ie)(g.column.columnDef.header,g.getContext())}):(0,o.jsx)(i.xuv,{"data-testid":"".concat(g.id,"-header"),sx:{...(0,s.J9)("select"===g.column.id)},fontSize:"xs",lineHeight:9,fontWeight:"medium",children:(0,f.ie)(g.column.columnDef.header,g.getContext())})},k=e=>{var t;let{tableInstance:n,rowActionBar:l,onRowClick:r,getRowIsClickable:s,renderRowTooltipLabel:a,expandedColumns:c,wrappedColumns:d,emptyTableNotice:u}=e,g=e=>s?s(e)?r:void 0:r;return(0,o.jsxs)(i.p3B,{"data-testid":"fidesTable-body",children:[l,n.getRowModel().rows.map(e=>(0,o.jsx)(C,{row:e,onRowClick:g(e.original),renderRowTooltipLabel:a,expandedColumns:c,wrappedColumns:d},e.id)),0===n.getRowModel().rows.length&&!(null===(t=n.getState())||void 0===t?void 0:t.globalFilter)&&u&&(0,o.jsx)(i.Tr,{children:(0,o.jsx)(i.Td,{colSpan:100,children:u})})]})},z=r.memo(k,(e,t)=>e.tableInstance.options.data===t.tableInstance.options.data),R=e=>{let{tableInstance:t,rowActionBar:n,footer:l,onRowClick:a,getRowIsClickable:c,renderRowTooltipLabel:d,emptyTableNotice:u,overflow:g="auto",onSort:x,enableSorting:h=!!x,columnExpandStorageKey:m,columnWrapStorageKey:p}=e,[f,j]=(0,r.useState)(1),[b,C]=(0,v._)(m,[]),[w,S]=(0,v._)(p,[]),R=e=>{C([...b.filter(t=>t.split(s.mb)[0]!==e),"".concat(e).concat(s.mb).concat(f)]),j(f+1)},W=e=>{C([...b.filter(t=>t.split(s.mb)[0]!==e),"".concat(e).concat(s.mb).concat(-1*f)]),j(f+1)},I=(e,t)=>{S(t?[...w,e]:w.filter(t=>t!==e))},T=(0,r.useMemo)(()=>{let e=t.getFlatHeaders(),n={};for(let i=0;i<e.length;i+=1){var l,o;let r=e[i],s=!!(null===(l=t.getState().columnSizing)||void 0===l?void 0:l[r.id]),a="auto"===(null===(o=r.column.columnDef.meta)||void 0===o?void 0:o.width);!s&&a?setTimeout(()=>{var e;let l=null===(e=document.getElementById("column-".concat(r.id)))||void 0===e?void 0:e.offsetWidth;l&&(t.setColumnSizing(e=>({...e,[r.id]:l})),n["--header-".concat(r.id,"-size")]=l,n["--col-".concat(r.column.id,"-size")]=l)}):(n["--header-".concat(r.id,"-size")]=r.getSize(),n["--col-".concat(r.column.id,"-size")]=r.column.getSize())}return n},[t.getState().columnSizingInfo]);return(0,r.useEffect)(()=>{x&&x(t.getState().sorting[0])},[t.getState().sorting]),(0,o.jsx)(i.xJi,{"data-testid":"fidesTable",overflowY:g,overflowX:g,borderColor:"gray.200",borderBottomWidth:"1px",borderRightWidth:"1px",borderLeftWidth:"1px",children:(0,o.jsxs)(i.iA_,{variant:"unstyled",style:{borderCollapse:"separate",borderSpacing:0,...T,minWidth:"100%"},children:[(0,o.jsx)(i.hrZ,{position:"sticky",top:"0",height:"36px",zIndex:10,backgroundColor:"gray.50",children:t.getHeaderGroups().map(e=>(0,o.jsx)(i.Tr,{height:"inherit",children:e.headers.map(e=>{var t;let n=(0,s.tt)(e.id,b);return(0,o.jsxs)(i.Th,{borderColor:"gray.200",borderTopWidth:"1px",borderBottomWidth:"1px",borderRightWidth:"1px",_last:{borderRightWidth:0},colSpan:e.colSpan,"data-testid":"column-".concat(e.id),id:"column-".concat(e.id),sx:{padding:0,width:"calc(var(--header-".concat(e.id,"-size) * 1px)"),overflowX:"auto"},textTransform:"unset",position:"relative",_hover:{"& .resizer":{opacity:1}},...null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.cellProps,children:[(0,o.jsx)(y,{header:e,onGroupAll:W,onExpandAll:R,onWrapToggle:I,isExpandAll:!!n&&n>0,isWrapped:!!w.find(t=>e.id===t),enableSorting:h}),e.column.getCanResize()?(0,o.jsx)(i.xuv,{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),position:"absolute",height:"100%",top:"0",right:"0",width:"5px",cursor:"col-resize",userSelect:"none",className:"resizer",opacity:0,backgroundColor:e.column.getIsResizing()?"complimentary.500":"gray.200"}):null]},e.id)})},e.id))}),t.getState().columnSizingInfo.isResizingColumn?(0,o.jsx)(z,{tableInstance:t,rowActionBar:n,onRowClick:a,getRowIsClickable:c,renderRowTooltipLabel:d,expandedColumns:b,wrappedColumns:w,emptyTableNotice:u}):(0,o.jsx)(k,{tableInstance:t,rowActionBar:n,onRowClick:a,getRowIsClickable:c,renderRowTooltipLabel:d,expandedColumns:b,wrappedColumns:w,emptyTableNotice:u}),l]})})},W=e=>{let{totalColumns:t,children:n}=e;return(0,o.jsx)(i.$RU,{backgroundColor:"gray.50",children:(0,o.jsx)(i.Tr,{children:(0,o.jsx)(i.Td,{colSpan:t,px:4,py:2,borderTop:"1px solid",borderColor:"gray.200",children:n})})})};var I=n(33312),T=n(36768);let D=e=>{let{globalFilter:t,setGlobalFilter:n,placeholder:l,testid:s="global-text-filter"}=e,[a,c]=(0,r.useState)(t),d=(0,r.useMemo)(()=>(0,T.Ds)(n,200),[n]),u=(0,r.useCallback)(()=>{c(void 0),n(void 0)},[c,n]);return(0,r.useEffect)(()=>{a||u()},[a,u]),(0,o.jsx)(i.xuv,{maxWidth:"424px",width:"100%",children:(0,o.jsx)(I.Z,{onChange:e=>{c(e),d(e)},onClear:u,search:a||"",placeholder:l,"data-testid":s})})};var A=n(54249);let N=e=>{let{tableInstance:t,selectedRows:n,isOpen:l}=e;return l?(0,o.jsx)(i.Tr,{position:"sticky",zIndex:"10",top:"36px",backgroundColor:"neutral.100",height:"36px",p:0,boxShadow:"0px 4px 6px -1px rgba(0, 0, 0, 0.05)",children:(0,o.jsx)(i.Td,{borderWidth:"1px",borderColor:"gray.200",height:"inherit",pl:4,pr:2,py:0,colSpan:t.getAllColumns().length,children:(0,o.jsxs)(i.Ugi,{children:[(0,o.jsxs)(i.xvT,{"data-testid":"selected-row-count",fontSize:"xs",children:[n.toLocaleString("en")," row(s) selected."]}),t.getIsAllRowsSelected()?null:(0,o.jsxs)(i.wpx,{"data-testid":"select-all-rows-btn",onClick:()=>{t.toggleAllRowsSelected()},type:"link",size:"small",className:"text-xs font-normal text-black underline",children:["Select all ",t.getFilteredRowModel().rows.length," rows."]})]})})}):null},O=e=>{let{children:t,...n}=e;return(0,o.jsx)(i.Ugi,{justifyContent:"space-between",alignItems:"center",p:2,borderWidth:"1px",borderBottomWidth:"0px",borderColor:"gray.200",zIndex:11,...n,children:t})},_=e=>{let{rowHeight:t,numRows:n}=e,l=[];for(let e=0;e<n;e+=1)l.push((0,o.jsx)(i.OdW,{height:"".concat(t,"px")},e));return(0,o.jsx)(i.Kqy,{children:l})}},71533:function(e,t,n){n.d(t,{AH:function(){return c},J9:function(){return s},mb:function(){return r},tt:function(){return a}});var l=n(52615),o=n(98784),i=n.n(o);let r="::",s=e=>e?{padding:"0px"}:{paddingLeft:l.rSc.space[3],paddingRight:"calc(".concat(l.rSc.space[3]," - 5px)"),paddingTop:"0px",paddingBottom:"0px",borderRadius:"0px"},a=(e,t)=>{let n=t.find(t=>t.startsWith(e));return n?parseInt(n.split(r)[1],10):void 0},c=e=>{let{columnId:t,columnNameMap:n}=e;if(!t)return"";let l=t.replace(/^(system_|privacy_declaration_)/,""),o=i().upperFirst(l.replaceAll("_"," "));return(null==n?void 0:n[t])||o}},16781:function(e,t,n){n.d(t,{MA:function(){return s},Vo:function(){return c},t5:function(){return a}});var l=n(24246),o=n(52615);let i=e=>{let{children:t,title:n="Success"}=e;return(0,l.jsxs)(o.xvT,{"data-testid":"toast-success-msg",children:[(0,l.jsxs)("strong",{children:[n,":"]})," ",t]})},r=e=>{let{children:t}=e;return(0,l.jsxs)(o.xvT,{"data-testid":"toast-error-msg",children:[(0,l.jsx)("strong",{children:"Error:"})," ",t]})},s={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},a=(e,t)=>{let n=(0,l.jsx)(i,{title:t,children:e});return{...s,description:n}},c=e=>{let t=(0,l.jsx)(r,{children:e});return{...s,description:t,status:"error"}}},41164:function(e,t,n){n.d(t,{Bw:function(){return r},D4:function(){return o},Dy:function(){return a},XD:function(){return c},cz:function(){return d},hE:function(){return s},oK:function(){return i}});var l=n(76649);let o=e=>"error"in e,i=e=>(0,l.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,r=e=>(0,l.Ln)({status:"number",data:{}},e),s=e=>(0,l.Ln)({detail:"string"},e),a=e=>(0,l.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,l.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,l.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8986],{36848:function(e,t,n){n.d(t,{q:function(){return o}});var i=n(24246),r=n(52615);let o=e=>{let{label:t,isDisabled:n,...o}=e;return(0,i.jsx)(r.OK9,{"data-testid":"tab-".concat(t),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:o.fontSize,fontWeight:"500",color:"gray.500",isDisabled:n||!1,children:t})};t.Z=e=>{let{data:t,border:n="partial",...l}=e;return(0,i.jsxs)(r.mQc,{colorScheme:"complimentary",...l,children:[(0,i.jsx)(r.tdY,{width:"partial"===n?"max-content":void 0,children:t.map(e=>(0,i.jsx)(o,{label:e.label,isDisabled:e.isDisabled,fontSize:l.fontSize},e.label))}),(0,i.jsx)(r.nPR,{children:t.map(e=>(0,i.jsx)(r.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},43124:function(e,t,n){n.d(t,{Z:function(){return p}});var i=n(24246),r=n(52615),o=n(88038),l=n.n(o),a=n(86677);n(27378);var s=n(11596),d=n(72247),c=n(87162),u=()=>{let e=(0,a.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:n,padded:o=!0,mainProps:c}=e,p=(0,s.hz)(),m=(0,a.useRouter)(),x="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,h=!(p.flags.privacyRequestsConfiguration&&x),{data:f}=(0,d.JE)(void 0,{skip:h}),{data:g}=(0,d.PW)(void 0,{skip:h}),v=p.flags.privacyRequestsConfiguration&&(!f||!g)&&x;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(l(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:o?6:0,px:o?10:0,h:o?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,i.jsx)(u,{}):null,t]})]})}},37541:function(e,t,n){var i=n(24246),r=n(52615),o=n(53614);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:l=!0,children:a,rightContent:s,style:d,...c}=e;return(0,i.jsxs)("div",{...c,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.X6q,{className:n||a?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,s&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:s})]}),!!n&&(0,i.jsx)(o.m,{className:a?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),a]})}},78973:function(e,t,n){n.d(t,{d:function(){return d}});var i=n(24246),r=n(52615),o=n(34090),l=n(27378),a=n(39514),s=n(34803);let d=e=>{let{name:t,label:n,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",...m}=e,[x,h,{setValue:f}]=(0,o.U$)(t),g=!!(h.touched&&h.error),[v,j]=(0,l.useState)("");x.value||"tags"!==m.mode&&"multiple"!==m.mode||(x.value=[]),"tags"===m.mode&&"string"==typeof x.value&&(x.value=[x.value]);let b="tags"===m.mode?(e,t)=>e?e.value!==v||x.value.includes(v)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(v,'"'):void 0:m.optionRender||void 0,y=e=>{j(e),m.onSearch&&m.onSearch(e)},C=(e,t)=>{f(e),m.onChange&&m.onChange(e,t)};return"inline"===p?(0,i.jsx)(r.NIc,{isInvalid:g,isRequired:u,children:(0,i.jsxs)(r.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,i.jsx)(s.__,{htmlFor:m.id||t,...d,children:n}):null,(0,i.jsxs)(r.jqI,{align:"center",children:[(0,i.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(r.WPr,{...x,id:m.id||t,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:b,onSearch:"tags"===m.mode?y:void 0,onChange:C,value:x.value||void 0}),(0,i.jsx)(s.Bc,{isInvalid:g,message:h.error,fieldName:x.name})]}),c?(0,i.jsx)(a.Z,{label:c}):null]})]})}):(0,i.jsx)(r.NIc,{isInvalid:g,isRequired:u,children:(0,i.jsxs)(r.gCW,{alignItems:"start",children:[(0,i.jsxs)(r.jqI,{align:"center",children:[n?(0,i.jsx)(s.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:n}):null,c?(0,i.jsx)(a.Z,{label:c}):null]}),(0,i.jsx)(r.WPr,{...x,id:m.id||t,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:b,onSearch:"tags"===m.mode?y:void 0,onChange:C,value:x.value||void 0}),(0,i.jsx)(s.Bc,{isInvalid:g,message:h.error,fieldName:x.name})]})})}},53614:function(e,t,n){n.d(t,{m:function(){return d}});var i=n(24246),r=n(52615),o=n(79894),l=n.n(o),a=n(27378);let{Text:s}=r.AntTypography,d=e=>{let{items:t,...n}=e,o=(0,a.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let o=n===t.length-1,a={...e},d=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,i.jsx)(s,{style:{color:"inherit",maxWidth:o?void 0:400},ellipsis:!o,children:a.title})),d)?a.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,i.jsx)(l(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,i.jsx)(r.zrq,{items:o,...n})}},91694:function(e,t,n){var i=n(24246),r=n(52615);n(27378);var o=n(37760),l=n(59461);let a=e=>void 0!==e.connection_type,s=e=>void 0!==e.encoded_icon;t.Z=e=>{let{data:t,...n}=e;return(0,i.jsx)(r.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(s(t)&&t.encoded_icon)return"data:image/svg+xml;base64,".concat(t.encoded_icon);if(a(t))e=[...l.iW].find(e=>{var n,i;let[r]=e;return t.connection_type.toString()!==o.Rj.SAAS&&t.connection_type.toString()===r||t.connection_type.toString()===o.Rj.SAAS&&(null===(i=t.saas_config)||void 0===i?void 0:null===(n=i.type)||void 0===n?void 0:n.toString())===r.toString()});else if(s(t)){let{identifier:n}=t;e=[...l.iW].find(e=>{let[t]=e;return t.toLowerCase()===n.toLowerCase()})}return e?l.Ny+e[1]:l.VD})(),fallbackSrc:l.VD,alt:(()=>{if(a(t)){var e;return null!==(e=t.name)&&void 0!==e?e:t.key}return s(t)?t.human_readable:t})(),...n})}},99377:function(e,t,n){n.d(t,{E:function(){return i},S:function(){return r}});let i=e=>e.toLowerCase().replace(/ /g,"_"),r=(e,t)=>{let n="".concat(window.location.origin+t,"&key=").concat(e);window.location.href.toLowerCase()!==n.toLowerCase()&&window.history.replaceState(null,"",n)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9659],{95189:function(e,a,s){var t=s(24246),i=s(52615);a.Z=e=>{let{connected:a,...s}=e,n="red.500";return null==a?n="gray.300":a&&(n="green.500"),(0,t.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...s})}},36848:function(e,a,s){s.d(a,{q:function(){return n}});var t=s(24246),i=s(52615);let n=e=>{let{label:a,isDisabled:s,...n}=e;return(0,t.jsx)(i.OK9,{"data-testid":"tab-".concat(a),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:n.fontSize,fontWeight:"500",color:"gray.500",isDisabled:s||!1,children:a})};a.Z=e=>{let{data:a,border:s="partial",...r}=e;return(0,t.jsxs)(i.mQc,{colorScheme:"complimentary",...r,children:[(0,t.jsx)(i.tdY,{width:"partial"===s?"max-content":void 0,children:a.map(e=>(0,t.jsx)(n,{label:e.label,isDisabled:e.isDisabled,fontSize:r.fontSize},e.label))}),(0,t.jsx)(i.nPR,{children:a.map(e=>(0,t.jsx)(i.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},14838:function(e,a,s){var t=s(24246),i=s(52615);a.Z=e=>(0,t.jsx)(i.rUS,{isExternal:!0,color:"complimentary.500",...e})},38615:function(e,a,s){s.d(a,{Tg:function(){return r}});var t=s(24246),i=s(44296),n=s(96451);let r=e=>(0,i.C)(n.uu).filter(a=>e.includes(a)).length>0;a.ZP=e=>{let{scopes:a,children:s}=e;return r(a)?(0,t.jsx)(t.Fragment,{children:s}):null}},93595:function(e,a,s){var t=s(24246),i=s(52615);a.Z=e=>{let{onClick:a,children:s}=e;return(0,t.jsx)(i.wpx,{onClick:a,type:"link",role:"link",size:"large",className:"m-0 p-0 font-medium text-gray-700 underline",children:s})}},41498:function(e,a,s){s.d(a,{V:function(){return n}});var t=s(11596),i=s(87162);let n=()=>({systemOrDatamapRoute:(0,t.hz)().plus?i.oG:i.So})},43938:function(e,a,s){s.d(a,{NA:function(){return n},Z8:function(){return i}});var t=s(37760);let i={[t._F.ER]:"Eritrea",[t._F.DJ]:"Djibouti",[t._F.MR]:"Mauritania",[t._F.NA]:"Namibia",[t._F.GH]:"Ghana",[t._F.SS]:"South Sudan",[t._F.SC]:"Seychelles",[t._F.IO]:"British Indian Ocean Territory",[t._F.GQ]:"Equatorial Guinea",[t._F.AO]:"Angola",[t._F.CG]:"Republic of the Congo",[t._F.BW]:"Botswana",[t._F.BI]:"Burundi",[t._F.DZ]:"Algeria",[t._F.TD]:"Chad",[t._F.NG]:"Nigeria",[t._F.TZ]:"Tanzania",[t._F.EH]:"Western Sahara",[t._F.SN]:"Senegal",[t._F.LR]:"Liberia",[t._F.ZA]:"South Africa",[t._F.CV]:"Cape Verde",[t._F.GM]:"Gambia",[t._F.SD]:"Sudan",[t._F.KM]:"Comoros",[t._F.SZ]:"Eswatini",[t._F.UG]:"Uganda",[t._F.MG]:"Madagascar",[t._F.RW]:"Rwanda",[t._F.CD]:"DR Congo",[t._F.CM]:"Cameroon",[t._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[t._F.TG]:"Togo",[t._F.MU]:"Mauritius",[t._F.NE]:"Niger",[t._F.BJ]:"Benin",[t._F.EG]:"Egypt",[t._F.LS]:"Lesotho",[t._F.ET]:"Ethiopia",[t._F.MA]:"Morocco",[t._F.YT]:"Mayotte",[t._F.BF]:"Burkina Faso",[t._F.RE]:"R\xe9union",[t._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[t._F.CF]:"Central African Republic",[t._F.MZ]:"Mozambique",[t._F.MW]:"Malawi",[t._F.ML]:"Mali",[t._F.ZM]:"Zambia",[t._F.LY]:"Libya",[t._F.GW]:"Guinea-Bissau",[t._F.SO]:"Somalia",[t._F.KE]:"Kenya",[t._F.GN]:"Guinea",[t._F.ZW]:"Zimbabwe",[t._F.TN]:"Tunisia",[t._F.SL]:"Sierra Leone",[t._F.GA]:"Gabon",[t._F.CI]:"Ivory Coast",[t._F.JO]:"Jordan",[t._F.PK]:"Pakistan",[t._F.KP]:"North Korea",[t._F.MO]:"Macau",[t._F.AM]:"Armenia",[t._F.SY]:"Syria",[t._F.TJ]:"Tajikistan",[t._F.SA]:"Saudi Arabia",[t._F.KR]:"South Korea",[t._F.NP]:"Nepal",[t._F.PH]:"Philippines",[t._F.IQ]:"Iraq",[t._F.LB]:"Lebanon",[t._F.MN]:"Mongolia",[t._F.PS]:"Palestine",[t._F.YE]:"Yemen",[t._F.JP]:"Japan",[t._F.KZ]:"Kazakhstan",[t._F.LK]:"Sri Lanka",[t._F.MM]:"Myanmar",[t._F.KG]:"Kyrgyzstan",[t._F.CN]:"China",[t._F.AF]:"Afghanistan",[t._F.OM]:"Oman",[t._F.IN]:"India",[t._F.LA]:"Laos",[t._F.UZ]:"Uzbekistan",[t._F.MV]:"Maldives",[t._F.ID]:"Indonesia",[t._F.VN]:"Vietnam",[t._F.MY]:"Malaysia",[t._F.TW]:"Taiwan",[t._F.KH]:"Cambodia",[t._F.AE]:"United Arab Emirates",[t._F.HK]:"Hong Kong",[t._F.GE]:"Georgia",[t._F.BD]:"Bangladesh",[t._F.KW]:"Kuwait",[t._F.TM]:"Turkmenistan",[t._F.QA]:"Qatar",[t._F.BH]:"Bahrain",[t._F.BN]:"Brunei",[t._F.TH]:"Thailand",[t._F.BT]:"Bhutan",[t._F.SG]:"Singapore",[t._F.IL]:"Israel",[t._F.AZ]:"Azerbaijan",[t._F.TL]:"Timor-Leste",[t._F.IR]:"Iran",[t._F.TR]:"Turkey",[t._F.MK]:"North Macedonia",[t._F.IE]:"Ireland",[t._F.DK]:"Denmark",[t._F.SK]:"Slovakia",[t._F.MD]:"Moldova",[t._F.AX]:"\xc5land Islands",[t._F.PL]:"Poland",[t._F.BA]:"Bosnia and Herzegovina",[t._F.SM]:"San Marino",[t._F.CZ]:"Czechia",[t._F.EE]:"Estonia",[t._F.XK]:"Kosovo",[t._F.FO]:"Faroe Islands",[t._F.SJ]:"Svalbard and Jan Mayen",[t._F.GG]:"Guernsey",[t._F.FR]:"France",[t._F.NL]:"Netherlands",[t._F.FI]:"Finland",[t._F.PT]:"Portugal",[t._F.DE]:"Germany",[t._F.MT]:"Malta",[t._F.JE]:"Jersey",[t._F.IS]:"Iceland",[t._F.ES]:"Spain",[t._F.GI]:"Gibraltar",[t._F.NO]:"Norway",[t._F.CY]:"Cyprus",[t._F.RS]:"Serbia",[t._F.LT]:"Lithuania",[t._F.MC]:"Monaco",[t._F.LU]:"Luxembourg",[t._F.UA]:"Ukraine",[t._F.IM]:"Isle of Man",[t._F.RO]:"Romania",[t._F.BE]:"Belgium",[t._F.SE]:"Sweden",[t._F.ME]:"Montenegro",[t._F.LV]:"Latvia",[t._F.VA]:"Vatican City",[t._F.AT]:"Austria",[t._F.AL]:"Albania",[t._F.LI]:"Liechtenstein",[t._F.GR]:"Greece",[t._F.IT]:"Italy",[t._F.AD]:"Andorra",[t._F.GB]:"United Kingdom",[t._F.RU]:"Russia",[t._F.SI]:"Slovenia",[t._F.BY]:"Belarus",[t._F.CH]:"Switzerland",[t._F.HU]:"Hungary",[t._F.BG]:"Bulgaria",[t._F.HR]:"Croatia",[t._F.TC]:"Turks and Caicos Islands",[t._F.CW]:"Cura\xe7ao",[t._F.GP]:"Guadeloupe",[t._F.UM]:"United States Minor Outlying Islands",[t._F.GT]:"Guatemala",[t._F.PM]:"Saint Pierre and Miquelon",[t._F.BQ]:"Caribbean Netherlands",[t._F.GL]:"Greenland",[t._F.SX]:"Sint Maarten",[t._F.PA]:"Panama",[t._F.AW]:"Aruba",[t._F.MQ]:"Martinique",[t._F.AG]:"Antigua and Barbuda",[t._F.BM]:"Bermuda",[t._F.CU]:"Cuba",[t._F.GD]:"Grenada",[t._F.NI]:"Nicaragua",[t._F.LC]:"Saint Lucia",[t._F.KN]:"Saint Kitts and Nevis",[t._F.DO]:"Dominican Republic",[t._F.VC]:"Saint Vincent and the Grenadines",[t._F.BZ]:"Belize",[t._F.HT]:"Haiti",[t._F.JM]:"Jamaica",[t._F.BS]:"Bahamas",[t._F.MX]:"Mexico",[t._F.MF]:"Saint Martin",[t._F.SV]:"El Salvador",[t._F.BL]:"Saint Barth\xe9lemy",[t._F.AI]:"Anguilla",[t._F.MS]:"Montserrat",[t._F.VG]:"British Virgin Islands",[t._F.BB]:"Barbados",[t._F.HN]:"Honduras",[t._F.KY]:"Cayman Islands",[t._F.DM]:"Dominica",[t._F.TT]:"Trinidad and Tobago",[t._F.CR]:"Costa Rica",[t._F.SR]:"Suriname",[t._F.CX]:"Christmas Island",[t._F.WS]:"Samoa",[t._F.PF]:"French Polynesia",[t._F.AS]:"American Samoa",[t._F.NC]:"New Caledonia",[t._F.TK]:"Tokelau",[t._F.PW]:"Palau",[t._F.KI]:"Kiribati",[t._F.VU]:"Vanuatu",[t._F.PN]:"Pitcairn Islands",[t._F.CK]:"Cook Islands",[t._F.FJ]:"Fiji",[t._F.PG]:"Papua New Guinea",[t._F.MP]:"Northern Mariana Islands",[t._F.NU]:"Niue",[t._F.TV]:"Tuvalu",[t._F.NF]:"Norfolk Island",[t._F.TO]:"Tonga",[t._F.FM]:"Micronesia",[t._F.SB]:"Solomon Islands",[t._F.NR]:"Nauru",[t._F.WF]:"Wallis and Futuna",[t._F.GU]:"Guam",[t._F.AU]:"Australia",[t._F.NZ]:"New Zealand",[t._F.MH]:"Marshall Islands",[t._F.CC]:"Cocos (Keeling) Islands",[t._F.VE]:"Venezuela",[t._F.PY]:"Paraguay",[t._F.BR]:"Brazil",[t._F.CO]:"Colombia",[t._F.PE]:"Peru",[t._F.CL]:"Chile",[t._F.UY]:"Uruguay",[t._F.AR]:"Argentina",[t._F.GY]:"Guyana",[t._F.BO]:"Bolivia",[t._F.GF]:"French Guiana",[t._F.EC]:"Ecuador",[t._F.FK]:"Falkland Islands",[t._F.US_AL]:"Alabama",[t._F.US_AK]:"Alaska",[t._F.US_AZ]:"Arizona",[t._F.US_AR]:"Arkansas",[t._F.US_CA]:"California",[t._F.US_CO]:"Colorado",[t._F.US_CT]:"Connecticut",[t._F.US_DE]:"Delaware",[t._F.US_DC]:"District of Columbia (DC)",[t._F.US_FL]:"Florida",[t._F.US_GA]:"Georgia",[t._F.US_HI]:"Hawaii",[t._F.US_ID]:"Idaho",[t._F.US_IL]:"Illinois",[t._F.US_IN]:"Indiana",[t._F.US_IA]:"Iowa",[t._F.US_KS]:"Kansas",[t._F.US_KY]:"Kentucky",[t._F.US_LA]:"Louisiana",[t._F.US_ME]:"Maine",[t._F.US_MD]:"Maryland",[t._F.US_MA]:"Massachusetts",[t._F.US_MI]:"Michigan",[t._F.US_MN]:"Minnesota",[t._F.US_MS]:"Mississippi",[t._F.US_MO]:"Missouri",[t._F.US_MT]:"Montana",[t._F.US_NE]:"Nebraska",[t._F.US_NV]:"Nevada",[t._F.US_NH]:"New Hampshire",[t._F.US_NJ]:"New Jersey",[t._F.US_NM]:"New Mexico",[t._F.US_NY]:"New York",[t._F.US_NC]:"North Carolina",[t._F.US_ND]:"North Dakota",[t._F.US_OH]:"Ohio",[t._F.US_OK]:"Oklahoma",[t._F.US_OR]:"Oregon",[t._F.US_PA]:"Pennsylvania",[t._F.US_PR]:"Puerto Rico",[t._F.US_RI]:"Rhode Island",[t._F.US_SC]:"South Carolina",[t._F.US_SD]:"San Diego",[t._F.US_TN]:"Tennessee",[t._F.US_TX]:"Texas",[t._F.US_UT]:"Utah",[t._F.US_VA]:"Virginia",[t._F.US_VI]:"United States Virgin Islands",[t._F.US_VT]:"Vermon",[t._F.US_WA]:"Washington",[t._F.US_WV]:"West Virginia",[t._F.US_WI]:"Wisconsin",[t._F.US_WY]:"Wyoming",[t._F.CA_AB]:"Alberta",[t._F.CA_BC]:"British Columbia",[t._F.CA_MB]:"Manitoba",[t._F.CA_NB]:"New Brunswick",[t._F.CA_NL]:"Newfoundland and Labrador",[t._F.CA_NS]:"Nova Scotia",[t._F.CA_ON]:"Ontario",[t._F.CA_PE]:"Prince Edward Island",[t._F.CA_QC]:"Quebec",[t._F.CA_SK]:"Saskatchewan",[t._F.CA_NT]:"Northwest Territories",[t._F.CA_NU]:"Nunavut",[t._F.CA_YT]:"Yukon",[t._F.CA]:"Canada",[t._F.US]:"United States",[t._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[t._F.CARIBBEAN]:"Caribbean",[t._F.EEA]:"European Economic Area (EEA)",[t._F.NON_EEA]:"Non European Economic Area"},n=new Map(Object.entries(i));Object.entries(i).map(e=>({value:e[0],label:e[1]}))},50204:function(e,a,s){s.d(a,{Z:function(){return x}});var t=s(24246),i=s(52615),n=s(27378),r=s(44833),l=s(45007),o=s(60136),d=s(16781),c=s(69477),u=s(89319),p=s(52020),h=s(21618);let{reducer:m}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:_}=h.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let a=new FormData;return a.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:a}},invalidatesTags:()=>["Connection Type"]})})});var x=e=>{let{isOpen:a,onClose:s,testId:u="connector-template-modal"}=e,p=(0,l.I0)(),[h,m]=(0,n.useState)(null),x=(0,i.pmc)(),{getRootProps:g,getInputProps:y,isDragActive:f}=(0,r.uI)({onDrop:e=>{var a;if("zip"!==(null===(a=e[0].name.split(".").pop())||void 0===a?void 0:a.toLowerCase())){x((0,d.Vo)("Only zip files are allowed."));return}m(e[0])}}),[b,{isLoading:v}]=_(),{refetch:j}=(0,c.$I)({search:""},{skip:!1}),F=async()=>{if(h)try{var e;await b(h).unwrap(),x((0,d.t5)("Integration template uploaded successfully."));let{data:a}=await j();p((0,c.fP)(null!==(e=null==a?void 0:a.items)&&void 0!==e?e:[])),s()}catch(e){x((0,d.Vo)((0,o.e$)(e)))}finally{m(null)}};return(0,t.jsxs)(i.u_l,{isOpen:a,onClose:s,size:"2xl",children:[(0,t.jsx)(i.ZAr,{}),(0,t.jsxs)(i.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,t.jsx)(i.xBx,{children:"Upload integration template"}),(0,t.jsxs)(i.fef,{children:[(0,t.jsx)(i.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,t.jsxs)(i.xuv,{...g(),bg:f?"gray.100":"gray.50",border:"2px dashed",borderColor:f?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,t.jsx)("input",{...y()}),h?(0,t.jsx)(i.xvT,{children:h.name}):f?(0,t.jsx)(i.xvT,{children:"Drop the file here..."}):(0,t.jsx)(i.xvT,{children:"Click or drag and drop your file here."})]}),(0,t.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,t.jsxs)(i.mzw,{className:"flex w-full justify-end gap-2",children:[(0,t.jsx)(i.wpx,{onClick:s,"data-testid":"cancel-btn",disabled:v,children:"Cancel"}),(0,t.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!h||v,onClick:F,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},16921:function(e,a,s){var t=s(52615),i=s(60136),n=s(16781),r=s(22153),l=s(43073);a.Z=e=>{let a=(0,t.pmc)(),[s]=(0,r.qQ)(),o=s=>!!e.privacy_declarations.find(e=>e.data_use===s.data_use&&e.name===s.name)&&(a((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),d=(e,s)=>{if((0,l.D4)(e)){let s=(0,i.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");a((0,n.Vo)(s));return}return a.closeAll(),a((0,n.t5)(s?"Data use deleted":"Data use saved")),e.data.privacy_declarations},c=async(a,t)=>{let i=a.map(e=>{var a;return{...e,name:null!==(a=e.name)&&void 0!==a?a:""}}),n={...e,privacy_declarations:i};return d(await s(n),t)};return{createDataUse:async s=>{if(!o(s))return a.closeAll(),c([...e.privacy_declarations,s])},updateDataUse:async(a,s)=>{if(!(s.id!==a.id&&o(s)))return c(e.privacy_declarations.map(e=>e.id===a.id?s:e))},deleteDataUse:async a=>c(e.privacy_declarations.filter(e=>e.id!==a.id),!0),deleteDeclarationByDataUse:async a=>c(e.privacy_declarations.filter(e=>e.data_use!==a),!0)}}},91694:function(e,a,s){var t=s(24246),i=s(52615);s(27378);var n=s(37760),r=s(59461);let l=e=>void 0!==e.connection_type,o=e=>void 0!==e.encoded_icon;a.Z=e=>{let{data:a,...s}=e;return(0,t.jsx)(i.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(o(a)&&a.encoded_icon)return"data:image/svg+xml;base64,".concat(a.encoded_icon);if(l(a))e=[...r.iW].find(e=>{var s,t;let[i]=e;return a.connection_type.toString()!==n.Rj.SAAS&&a.connection_type.toString()===i||a.connection_type.toString()===n.Rj.SAAS&&(null===(t=a.saas_config)||void 0===t?void 0:null===(s=t.type)||void 0===s?void 0:s.toString())===i.toString()});else if(o(a)){let{identifier:s}=a;e=[...r.iW].find(e=>{let[a]=e;return a.toLowerCase()===s.toLowerCase()})}return e?r.Ny+e[1]:r.VD})(),fallbackSrc:r.VD,alt:(()=>{if(l(a)){var e;return null!==(e=a.name)&&void 0!==e?e:a.key}return o(a)?a.human_readable:a})(),...s})}},89671:function(e,a,s){var t=s(24246),i=s(52615);s(27378);var n=s(7564);a.Z=e=>{let{connection_key:a,disabled:s,name:r,access_type:l,connection_type:o,isSwitch:d}=e,{isOpen:c,onOpen:u,onClose:p}=(0,i.qY0)(),[h,m]=(0,n.XX)(),_=async()=>{await h({key:a,name:r,disabled:!s,access:l,connection_type:o}),p()},x=()=>{m.isLoading||p()};return(0,t.jsxs)(t.Fragment,{children:[d?(0,t.jsxs)(i.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,t.jsx)(i.xvT,{fontSize:"sm",children:"Enable integration"}),(0,t.jsx)(i.rAg,{className:"ml-2",checked:!s,onChange:()=>u()})]}):(0,t.jsx)(i.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:u,children:(0,t.jsx)(i.xvT,{fontSize:"sm",children:s?"Enable":"Disable"})}),(0,t.jsxs)(i.u_l,{isCentered:!0,isOpen:c,onClose:x,children:[(0,t.jsx)(i.ZAr,{}),(0,t.jsxs)(i.hzk,{children:[(0,t.jsxs)(i.xBx,{children:[s?"Enable":"Disable"," Connection"]}),(0,t.jsx)(i.olH,{}),(0,t.jsx)(i.fef,{pb:6,children:(0,t.jsx)(i.Kqy,{direction:"column",spacing:"15px",children:(0,t.jsxs)(i.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[s?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,t.jsxs)(i.mzw,{className:"flex gap-4",children:[(0,t.jsx)(i.wpx,{onClick:x,className:"w-1/2",children:"Cancel"}),(0,t.jsxs)(i.wpx,{onClick:_,loading:m.isLoading,className:"w-1/2",children:[s?"Enable":"Disable"," Connection"]})]})]})]})]})}},40415:function(e,a,s){s.d(a,{s:function(){return l}});var t=s(24246),i=s(52615),n=s(95189),r=s(36768);let l=e=>{let{succeeded:a,timestamp:s}=e,l=s?(0,r.p6)(s):"";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Z,{connected:a}),(0,t.jsx)(i.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:s?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},9699:function(e,a,s){var t=s(24246),i=s(52615),n=s(34090);a.Z=e=>{let{disabled:a=!1,displayHelpIcon:s=!0,helpIconVisibility:r=!1,isRequired:l=!1,label:o,placeholder:d,type:c="text",...u}=e,{id:p,autoFocus:h}=u,[m,_]=(0,n.U$)(u);return(0,t.jsxs)(i.NIc,{display:"flex",isRequired:l,isInvalid:!!(_.error&&_.touched),children:[o&&(0,t.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:p,minWidth:"150px",children:o}),(0,t.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===c&&(0,t.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,t.jsx)(i.zuI,{...m,autoComplete:"off",autoFocus:h}),(0,t.jsxs)(i.FiK,{children:[(0,t.jsx)(i.WQu,{}),(0,t.jsx)(i.Y_d,{})]})]}),"text"===c&&(0,t.jsx)(i.IIB,{...m,autoComplete:"off",autoFocus:h,color:"gray.700",isDisabled:a,placeholder:d,size:"sm"}),"textarea"===c&&(0,t.jsx)(i.gxH,{...m,autoComplete:"off",autoFocus:h,color:"gray.700",placeholder:d,resize:"none",size:"sm",value:m.value||""}),(0,t.jsx)(i.J1D,{children:_.error})]}),s&&(0,t.jsx)(i.kCb,{alignContent:"center",h:"32px",visibility:r?"visible":"hidden",children:(0,t.jsx)(i.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})]})}},54507:function(e,a,s){s.d(a,{Z:function(){return aD}});var t=s(24246),i=s(93990),n=s(52615),r=s(79894),l=s.n(r),o=s(86677),d=s.n(o),c=s(27378),u=s(44296),p=s(11596),h=s(73269),m=s(41498),_=s(87162),x=s(16781),g=s(93595),y=s(38615),f=s(36768),b=s(69477),v=s(91694);let j=e=>{let{connectionConfig:a}=e,s=(0,u.C)(b.pw),{data:t}=(0,b.$I)(s),i=(0,c.useMemo)(()=>(null==t?void 0:t.items)||[],[t]),[n,r]=(0,c.useState)(),l=(0,c.useMemo)(()=>[...i].sort((e,a)=>e.human_readable>a.human_readable?1:-1),[i]),o=(0,c.useMemo)(()=>{let e=new Map;return null==l||l.map(a=>e.set(a.human_readable,{value:a})),e},[l]),d=(0,c.useMemo)(()=>{var e;return(null===(e=i.find(e=>e.identifier===(null==a?void 0:a.connection_type)||(null==a?void 0:a.saas_config)&&e.identifier===(null==a?void 0:a.saas_config.type)))||void 0===e?void 0:e.type)||"ethyca"},[a,i]);return(0,c.useMemo)(()=>{let e=i.find(e=>(null==a?void 0:a.saas_config)&&e.identifier===(null==a?void 0:a.saas_config.type)||e.identifier===(null==a?void 0:a.connection_type));e&&r(e)},[a,i]),{dropDownOptions:o,selectedValue:n,setSelectedValue:r,systemType:d}};var F=e=>{var a;let{disabled:s,hasClear:i=!0,label:r,list:l,onChange:o,selectedValue:d}=e,u=(0,c.useRef)(null),[p,h]=(0,c.useState)(!1),[m,_]=(0,c.useState)(""),x=()=>{h(!1)},g=null===(a=[...l].find(e=>{let[,a]=e;return a.value.identifier===(null==d?void 0:d.identifier)}))||void 0===a?void 0:a[0],y=(0,c.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(_(e.target.value),setTimeout(()=>{var e;return null===(e=u.current)||void 0===e?void 0:e.focus()},0))},[]),b=(0,c.useMemo)(()=>(0,f.Ds)(y,100),[y]),j=(0,c.useMemo)(()=>[...l].filter(e=>e[0].toLowerCase().includes(m.toLowerCase())),[l,m]);return(0,t.jsxs)(n.v2r,{isLazy:!0,onClose:x,onOpen:()=>{h(!0)},strategy:"fixed",matchWidth:!0,children:[(0,t.jsx)(n.j2t,{"aria-label":null!=g?g:r,as:n.wpx,color:g?"complimentary.500":void 0,disabled:s,icon:(0,t.jsx)(n.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,t.jsx)(n.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=g?g:r})}),p?(0,t.jsxs)(n.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,t.jsx)(n.xuv,{px:"8px",mt:2,children:(0,t.jsxs)(n.BZy,{size:"sm",children:[(0,t.jsx)(n.Z8_,{pointerEvents:"none",children:(0,t.jsx)(n.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,t.jsx)(n.IIB,{"data-testid":"input-search-integrations",ref:u,autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:b,placeholder:"Search integrations",size:"sm",type:"search"})]})}),i&&(0,t.jsx)(n.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,t.jsx)(n.wpx,{onClick:()=>{o(void 0),_(""),x()},size:"small",children:"Clear"})}),(0,t.jsx)(n.xuv,{overflowY:"auto",maxHeight:"272px",children:j.map(e=>{let[a,s]=e;return(0,t.jsx)(n.ua7,{"aria-label":s.toolTip,hasArrow:!0,label:s.toolTip,placement:"auto-start",openDelay:500,shouldWrapChildren:!0,children:(0,t.jsxs)(n.sNh,{color:d===s.value?"complimentary.500":void 0,isDisabled:s.isDisabled,onClick:()=>o(s.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,t.jsx)(v.Z,{data:s.value}),(0,t.jsx)(n.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:a})]})},a)})})]}):null]})},S=s(53359),C=s(22153),k=s(37760),w=s(75139),A=s(7564),D=s(14838),T=(0,n.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"}),I=s(52987);let E=e=>{var a,s,t;let{connectionConfig:i}=e,[n]=(0,A.S6)(),{data:r}=(0,A.Eg)(null!==(s=null==i?void 0:i.key)&&void 0!==s?s:""),l=null!==(t=null==r?void 0:null===(a=r.items)||void 0===a?void 0:a.map(e=>e.fides_key))&&void 0!==t?t:[],o=l.map(e=>({label:e,value:e})),{data:d}=(0,I.LH)({onlyUnlinkedDatasets:!0}),u=(0,c.useMemo)(()=>{var e;return null!==(e=null==d?void 0:d.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[d]),{errorAlert:p,successAlert:h}=(0,S.V)();return{dropdownOptions:[...o,...u],initialDatasets:l,patchConnectionDatasetConfig:async function(e,a){var s,t,i;let{showSuccessAlert:r=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=null!==(i=null===(s=e.dataset)||void 0===s?void 0:s.map(e=>({fides_key:e,ctl_dataset_fides_key:e})))&&void 0!==i?i:[],o=await n({connection_key:a,dataset_pairs:l}).unwrap();(null===(t=o.failed)||void 0===t?void 0:t.length)>0?p(o.failed[0].message):r&&h("Dataset successfully updated!")}}};var N=e=>{let{status:a}=e;return(0,t.jsxs)(t.Fragment,{children:["success"===a&&(0,t.jsx)(n.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"}),"error"===a&&(0,t.jsx)(n.xvT,{"data-testid":"toast-error-msg",children:"Test failed: please check your connection info"})]})},M=s(40415),L=s(96878),U=s(31374),z=s(34090),R=s(59389),W=s(78973),O=s(47411),P=s(35249),q=s(9699);let Z=e=>{let{isSubmitting:a=!1,onCancelClick:s}=e;return(0,t.jsxs)(n.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,t.jsx)(n.zxk,{onClick:s,variant:"outline",children:"Cancel"}),(0,t.jsx)(n.zxk,{bg:"primary.800",color:"white",isDisabled:a,isLoading:a,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})};var B=e=>{let{data:a=[],isSubmitting:s=!1,onSaveClick:i,onCancel:r}=e,{isLoading:l}=(0,O.MO)(),o=(0,u.C)(P.qb),{errorAlert:d}=(0,S.V)();return l?null:(0,t.jsx)(z.J9,{enableReinitialize:!0,initialValues:{fields:a.length>0?a:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,a)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}i(e,a)},validateOnBlur:!1,validateOnChange:!1,validationSchema:R.Ry({fields:R.IX().of(R.Ry().shape({pii_field:R.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:R.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:R.IX(R.Z_()).label("Data Categories")}))}),children:e=>(0,t.jsx)(z.l0,{style:{marginTop:0},noValidate:!0,children:(0,t.jsx)(n.gCW,{align:"stretch",children:(0,t.jsx)(z.F2,{name:"fields",render:a=>{let{fields:i}=e.values;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,t.jsx)(n.xuv,{w:"416px",children:"PII Field"}),(0,t.jsx)(n.xuv,{w:"416px",children:"DSR Package Label"}),(0,t.jsx)(n.xuv,{w:"416px",children:"Data Categories"}),(0,t.jsx)(n.xuv,{visibility:"hidden",children:(0,t.jsx)(n.lr0,{})})]}),(0,t.jsx)(n.xuv,{children:i&&i.length>0?i.map((e,s)=>(0,t.jsxs)(n.Ugi,{mt:s>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,t.jsx)(n.xuv,{minH:"57px",w:"416px",children:(0,t.jsx)(q.Z,{autoFocus:0===s,displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(s,".pii_field")})}),(0,t.jsx)(n.xuv,{minH:"57px",w:"416px",children:(0,t.jsx)(q.Z,{displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(s,".dsr_package_label")})}),(0,t.jsx)(n.xuv,{minH:"57px",w:"416px",children:(0,t.jsx)(W.d,{name:"fields.".concat(s,".data_categories"),options:o.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,t.jsx)(n.xuv,{h:"57px",visibility:s>0?"visible":"hidden",children:(0,t.jsx)(n.lr0,{onClick:()=>a.remove(s),_hover:{cursor:"pointer"}})})]},s)):null}),(0,t.jsx)(n.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{a.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,t.jsx)(Z,{isSubmitting:s,onCancelClick:r})]})}})})})})},V=e=>{let{connectionConfig:a}=e,s=(0,c.useRef)(!1),{successAlert:i}=(0,S.V)(),{handleError:r}=(0,S.H)(),[l,o]=(0,c.useState)(!1),[d,u]=(0,c.useState)([]),{isOpen:p,onOpen:h,onClose:m}=(0,n.qY0)(),{data:_,isFetching:x,isLoading:g,isSuccess:y}=(0,A.QV)(a?a.key:"",{skip:!a}),[f]=(0,A.jF)(),[b]=(0,A._d)(),v=async(e,s)=>{try{o(!0);let s={connection_key:a.key,body:{...e}};d.length>0?await b(s).unwrap():await f(s).unwrap(),i("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){r(e)}finally{o(!1)}};(0,c.useEffect)(()=>(s.current=!0,y&&_&&u(_.fields),()=>{s.current=!1}),[_,y]);let j=(0,t.jsx)(n.wpx,{disabled:!a||l,loading:l,onClick:h,children:"Customize DSR"});return(0,t.jsxs)(t.Fragment,{children:[a?j:(0,t.jsx)(n.ua7,{label:"Save an Integration first to customize the DSR",placement:"top",shouldWrapChildren:!0,children:j}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:p,size:"lg",onClose:m,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{minWidth:"775px",children:[(0,t.jsx)(n.xBx,{children:"Customize DSR"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{pb:6,children:(0,t.jsxs)(n.gCW,{align:"stretch",gap:"16px",children:[(0,t.jsx)(n.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."}),(x||g)&&(0,t.jsx)(n.M5Y,{children:(0,t.jsx)(n.$jN,{})}),s.current&&!g?(0,t.jsx)(B,{data:d,isSubmitting:l,onSaveClick:v,onCancel:m}):null]})})]})]})]})},K=s(98784),G=s.n(K),H=s(89671),Y=e=>{let{options:a}=e,[s,{error:i},r]=(0,z.U$)("dataset"),{setValue:l}=r;return(0,t.jsxs)(n.NIc,{display:"flex",children:[(0,t.jsx)(n.lXp,{color:"gray.900",fontWeight:"semibold",fontSize:"sm",htmlFor:"dataset",minWidth:"150px",children:"Datasets"}),(0,t.jsxs)(n.gCW,{align:"flex-start",w:"100%",children:[(0,t.jsx)(n.xuv,{w:"full",children:(0,t.jsx)(n.WPr,{...s,id:"dataset",placeholder:"Select datasets...",options:a,onChange:e=>l(e),mode:"multiple",className:"w-full"})}),(0,t.jsx)(n.J1D,{children:i})]}),(0,t.jsx)(n.ua7,{"aria-label":"Select datasets to associate with this integration",hasArrow:!0,label:"Select datasets to associate with this integration",placement:"right-start",openDelay:500,children:(0,t.jsx)(n.kCb,{alignItems:"center",h:"32px",children:(0,t.jsx)(n.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})},J=s(20133),Q=e=>{let{onDelete:a,deleteResult:s}=e,{isOpen:i,onOpen:r,onClose:l}=(0,n.qY0)(),o=()=>{(!s.isLoading&&s.isSuccess||!s.isLoading&&s.isUninitialized)&&l()};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.LZC,{}),(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",children:"Delete integration"}),(0,t.jsx)(n.wpx,{"aria-label":"Delete integration",icon:(0,t.jsx)(J.l,{}),disabled:s.isLoading,onClick:r,className:"ml-2"})]})]}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:i,onClose:o,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{children:[(0,t.jsx)(n.xBx,{children:"Delete integration"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{pb:6,children:(0,t.jsx)(n.Kqy,{direction:"column",spacing:"15px",children:(0,t.jsx)(n.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,t.jsxs)(n.mzw,{children:[(0,t.jsx)(n.wpx,{onClick:o,className:"w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{onClick:()=>{a()},loading:s.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},X=s(17509);let $=(e,a)=>{let s={...e};return a&&Object.entries(a.properties).forEach(e=>{let[a,t]=e;if("secrets"in s||(s.secrets={}),"integer"===t.type)s.secrets[a]=t.default?Number(t.default):0;else{var i;s.secrets[a]=null!==(i=t.default)&&void 0!==i?i:""}}),s},ee=(e,a)=>{let s=e.replace(/[^A-Za-z0-9\-_]/g,"");return s.includes(a.identifier)||(s+="_".concat(a.identifier)),a.type===X.Z.SAAS&&(s+="_api"),s},ea="#/definitions/FidesDatasetReference",es=e=>{let{secretsSchema:a,defaultValues:s,isSubmitting:i=!1,isAuthorizing:r=!1,onSaveClick:l,onTestConnectionClick:o,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:h,connectionConfig:m,initialDatasets:_,datasetDropdownOptions:x,isCreatingConnectionConfig:g,onDelete:y,deleteResult:f}=e,[b,{isLoading:v,isFetching:j}]=(0,A.h2)(),{plus:F}=(0,p.hz)(),S=(e,a,s)=>{let t;return(void 0===a||""===a||void 0===a)&&(t="".concat(e," is required")),s===ea&&(a.includes(".")?a.split(".").length<3&&(t="Dataset reference must include at least three parts"):t="Dataset reference must be dot delimited"),t},C=(e,a)=>(0,t.jsx)(n.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:a}),w=e=>{var a;if((null===(a=e.allOf)||void 0===a?void 0:a[0].$ref)===ea)return"Enter dataset.collection.field"},D=e=>{var s,t;return(null==a?void 0:null===(s=a.required)||void 0===s?void 0:s.includes(e))||(null==a?void 0:null===(t=a.properties)||void 0===t?void 0:t[e])!==void 0&&"default"in a.properties[e]},T=(e,a)=>(0,t.jsx)(z.gN,{id:"secrets.".concat(e),name:"secrets.".concat(e),validate:(!!D(e)||"integer"===a.type)&&(e=>{var s;return S(a.title,e,null===(s=a.allOf)||void 0===s?void 0:s[0].$ref)}),children:s=>{var i;let{field:r,form:l}=s,o=l.errors.secrets&&l.errors.secrets[e],d=!!l.touched.secrets&&l.touched.secrets[e],c="boolean"===a.type,u="integer"===a.type;return(0,t.jsxs)(n.NIc,{display:"flex",isRequired:D(e)&&!c,isInvalid:o&&d,children:[C(e,a.title),(0,t.jsxs)(n.gCW,{align:"flex-start",w:"inherit",children:[!u&&!c&&(0,t.jsx)(n.IIB,{...r,type:a.sensitive?"password":"text",placeholder:w(a),autoComplete:"off",color:"gray.700",size:"sm"}),c&&(0,t.jsx)(n.WPr,{value:!!r.value,onChange:e=>l.setFieldValue(r.name,e),options:[{label:"False",value:!1},{label:"True",value:!0}]}),u&&(0,t.jsxs)(n.Y2U,{allowMouseWheel:!0,color:"gray.700",onChange:e=>{l.setFieldValue(r.name,e)},value:null!==(i=r.value)&&void 0!==i?i:0,min:0,size:"sm",children:[(0,t.jsx)(n.zuI,{...r,autoComplete:"off"}),(0,t.jsxs)(n.FiK,{children:[(0,t.jsx)(n.WQu,{}),(0,t.jsx)(n.Y_d,{})]})]}),(0,t.jsx)(n.J1D,{children:o})]}),(0,t.jsx)(n.ua7,{"aria-label":a.description,hasArrow:!0,label:a.description,placement:"right-start",openDelay:500,children:(0,t.jsx)(n.kCb,{alignItems:"center",h:"32px",visibility:a.description?"visible":"hidden",children:(0,t.jsx)(n.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}},"secrets.".concat(e)),I=e=>{let s=G().cloneDeep(e);return a&&Object.keys(a.properties).forEach(e=>{var t;if((null===(t=a.properties[e].allOf)||void 0===t?void 0:t[0].$ref)===ea){let a=s.secrets[e].split(".");s.secrets[e]={dataset:a.shift(),field:a.join("."),direction:"from"}}}),s},E=async(e,a)=>{Object.keys(await a.validateForm()).length>0||c(I(e))},N=async e=>{Object.keys(await e.validateForm()).length>0||o(await b(m.key))},M=(null==m?void 0:m.disabled)||!1;return(0,t.jsx)(z.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...s};if(null==m?void 0:m.key){var t,i;return e.name=null!==(i=m.name)&&void 0!==i?i:"",e.description=m.description,e.instance_key=m.connection_type===k.Rj.SAAS?null===(t=m.saas_config)||void 0===t?void 0:t.fides_key:m.key,e.enabled_actions=(m.enabled_actions||[]).map(e=>e.toString()),e.secrets=m.secrets?G().cloneDeep(m.secrets):{},e.dataset=_,(null==a?void 0:a.properties)&&Object.entries(a.properties).forEach(a=>{var s;let[t,i]=a;if((null===(s=i.allOf)||void 0===s?void 0:s[0].$ref)===ea){let a=e.secrets[t];a&&(e.secrets[t]="".concat(a.dataset,".").concat(a.field))}}),e}return G().isEmpty(e.enabled_actions)&&(e.enabled_actions=h.supported_actions.map(e=>e.toString())),$(e,a)})(),onSubmit:(e,a)=>{l(I(e),a)},validateOnBlur:!1,validateOnChange:!1,children:e=>{var s;let l=!e.dirty&&(null==m?void 0:m.authorized);return(0,t.jsx)(z.l0,{noValidate:!0,children:(0,t.jsxs)(n.gCW,{align:"stretch",gap:"16px",children:[(0,t.jsxs)("div",{className:"flex flex-row",children:[m?(0,t.jsx)(H.Z,{connection_key:null==m?void 0:m.key,disabled:M,connection_type:null==m?void 0:m.connection_type,access_type:null==m?void 0:m.access,name:null!==(s=null==m?void 0:m.name)&&void 0!==s?s:m.key,isSwitch:!0}):null,m?(0,t.jsx)(Q,{onDelete:y,deleteResult:f}):null]}),!!(null==m?void 0:m.key)&&(0,t.jsx)(z.gN,{id:"instance_key",name:"instance_key",children:a=>{let{field:s}=a;return(0,t.jsxs)(n.NIc,{display:"flex",children:[C("instance_key","Integration identifier"),(0,t.jsxs)(n.gCW,{align:"flex-start",w:"inherit",children:[(0,t.jsx)(n.IIB,{...s,autoComplete:"off",color:"gray.700",isDisabled:!!(null==m?void 0:m.key),placeholder:"A unique identifier for your new ".concat(h.human_readable," integration"),size:"sm"}),(0,t.jsx)(n.J1D,{children:e.errors.instance_key})]}),(0,t.jsx)(n.ua7,{"aria-label":"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.",hasArrow:!0,label:"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.",placement:"right-start",openDelay:500,children:(0,t.jsx)(n.kCb,{alignItems:"center",h:"32px",children:(0,t.jsx)(n.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),h.type!==k.Zi.MANUAL&&a?Object.entries(a.properties).map(e=>{let[a,s]=e;return"advanced_settings"===a?null:T(a,s)}):null,F&&(0,t.jsx)(z.gN,{id:"enabled_actions",name:"enabled_actions",validate:e=>{let a;return e&&0!==e.length||(a="At least one request type must be selected"),a},children:a=>{let{field:s,form:i}=a;return(0,t.jsxs)(n.NIc,{"data-testid":"enabled-actions",display:"flex",isInvalid:i.touched.enabled_actions&&i.errors.enabled_actions,isRequired:!0,children:[C("enabled_actions","Request types"),(0,t.jsxs)(n.gCW,{align:"flex-start",w:"inherit",children:[(0,t.jsx)(n.WPr,{...s,placeholder:"Select...",mode:"multiple",options:h.supported_actions.map(e=>({label:G().upperFirst(e),value:e})),onChange:e=>{i.setFieldValue(s.name,e)},disabled:1===h.supported_actions.length,className:"w-full"}),(0,t.jsx)(n.J1D,{children:e.errors.enabled_actions})]}),(0,t.jsx)(n.ua7,{"aria-label":"The request types that are supported for this integration.",hasArrow:!0,label:"The request types that are supported for this integration.",placement:"right-start",openDelay:500,children:(0,t.jsx)(n.kCb,{alignItems:"center",h:"32px",children:(0,t.jsx)(n.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),k.Zi.DATABASE===h.type&&!g&&(0,t.jsx)(Y,{options:x}),(0,t.jsxs)("div",{className:"flex gap-4",children:[!h.authorization_required||l?(0,t.jsx)(n.wpx,{disabled:!(null==m?void 0:m.key)||i||f.isLoading,loading:v||j,onClick:()=>N(e),"data-testid":"test-connection-button",children:u}):null,F&&k.Zi.DATABASE===h.type&&!G().isEmpty(_)&&(0,t.jsx)(n.wpx,{onClick:()=>d(),children:"Test datasets"}),h.authorization_required&&!l?(0,t.jsx)(n.wpx,{loading:r,onClick:()=>E(e.values,e),children:"Authorize integration"}):null,h.type===k.Zi.MANUAL?(0,t.jsx)(V,{connectionConfig:m}):null,(0,t.jsx)(n.LZC,{}),(0,t.jsx)(n.wpx,{type:"primary",disabled:f.isLoading||i,loading:i,htmlType:"submit",children:"Save"})]})]})})}})},et=async(e,a,s,t,i)=>{let n={description:e.description||"",instance_key:ee(t,s),saas_connector_type:s.identifier,secrets:{},...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},r={systemFidesKey:t,connectionConfig:n};return Object.entries(a.properties).forEach(a=>{r.connectionConfig.secrets[a[0]]=e.secrets[a[0]]}),await i(r).unwrap()},ei=async(e,a,s,t,i)=>{var n;let r=t?t.key:ee(s,a),l={access:k.uv.WRITE,connection_type:a.type===k.Zi.SAAS?a.type:a.identifier,description:e.description,key:r,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:s,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},en=async(e,a,s,t,i)=>{let n={systemFidesKey:s,secrets:{}};return(Object.entries(a.properties).forEach(a=>{a[0]in t&&e.secrets[a[0]]===t[a[0]]||(n.secrets[a[0]]=e.secrets[a[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},er=e=>{let{secretsSchema:a,systemFidesKey:s,connectionOption:t,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,w.V)(),{handleError:l}=(0,S.H)(),o=(0,u.T)(),[d,h]=(0,c.useState)(!1),[m,_]=(0,c.useState)(!1),{dropdownOptions:x,patchConnectionDatasetConfig:g,initialDatasets:y}=E({connectionConfig:i}),[f]=(0,A.NG)(),[b]=(0,L.IB)(),[v]=(0,A.rO)(),[j]=(0,U.Zh)(),[F]=(0,U.qd)(),[C]=(0,L.kg)(),[D,T]=(0,U._w)(),{plus:I}=(0,p.hz)(),N=(0,c.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]),M=(0,u.C)(U.NC);return{isSubmitting:d,isAuthorizing:m,handleSubmit:async e=>{let n=!i;try{if(h(!0),t.type===k.Zi.SAAS&&n)i=(await et(e,a,t,s,I?b:f)).connection;else{let n=await ei(e,t,s,i,I?C:F);i||t.type!==k.Zi.DATABASE||(i=n.succeeded[0]),t.type!==k.Zi.MANUAL&&await en(e,a,s,N,j)}i&&e.dataset&&t.type===k.Zi.DATABASE&&await g(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{h(!1)}},handleAuthorization:async e=>{let n=!i;try{_(!0),n?i=(await et(e,a,t,s,f)).connection:await en(e,a,s,N,j);let r=await v(i.key).unwrap();_(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{_(!1)}},datasetDropdownOptions:x,initialDatasets:y,handleDelete:async()=>{try{await D(s),o((0,U.db)({...M,connection_configs:null})),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:T}},el=e=>{let{systemFidesKey:a,connectionOption:s,connectionConfig:i,setSelectedConnectionOption:r}=e,[l,o]=(0,c.useState)(),u=(0,n.pmc)(),p=s.type===k.Zi.MANUAL,{data:h}=(0,b.n3)(s.identifier,{skip:p}),{isSubmitting:m,isAuthorizing:_,handleSubmit:g,handleAuthorization:y,datasetDropdownOptions:f,initialDatasets:v,handleDelete:j,deleteDatastoreConnectionResult:F}=er({secretsSchema:h,systemFidesKey:a,connectionOption:s,connectionConfig:i,setSelectedConnectionOption:r});return h||s.type===k.Zi.MANUAL?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,t.jsxs)("div",{children:["Connect to your ",s.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."]}),s.user_guide&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsxs)(D.Z,{href:s.user_guide,children:["View docs for help with this integration ",(0,t.jsx)(T,{})]})})]}),(0,t.jsx)(es,{secretsSchema:h,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:m,isAuthorizing:_,onSaveClick:g,onTestConnectionClick:e=>{var a;o(e);let s=(null===(a=e.data)||void 0===a?void 0:a.test_status)==="succeeded"?"success":"error";u({...x.MA,status:s,description:(0,t.jsx)(N,{status:s})})},onTestDatasetsClick:()=>{d().push("/systems/configure/".concat(a,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:s,connectionConfig:i,datasetDropdownOptions:f,initialDatasets:v,isCreatingConnectionConfig:!i,onDelete:j,deleteResult:F}),i?(0,t.jsxs)(n.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[l&&l.data&&void 0!==l.fulfilledTimeStamp?(0,t.jsx)(M.s,{succeeded:"succeeded"===l.data.test_status,timestamp:l.fulfilledTimeStamp}):(0,t.jsx)(M.s,{succeeded:null==i?void 0:i.last_test_succeeded,timestamp:(null==i?void 0:i.last_test_timestamp)||""}),(0,t.jsx)(n.LZC,{})]}):null]}):null};var eo=e=>{let{connectionConfigs:a,systemFidesKey:s}=e,{isOpen:i,onOpen:r,onClose:l}=(0,n.qY0)(),[o,d]=(0,c.useState)(null),{successAlert:p}=(0,S.V)(),[h,{isLoading:m}]=(0,C.qd)(),_=(0,u.C)(b.pw),{data:x}=(0,b.$I)(_),g=(0,c.useMemo)(()=>(null==x?void 0:x.items)||[],[x]),{handleError:y}=(0,S.H)(),f=()=>{m||(o&&d(null),l())},j=async()=>{try{if(o){var e;let a={...o,instance_key:o.connection_type===k.Rj.SAAS?null===(e=o.saas_config)||void 0===e?void 0:e.fides_key:o.key},t=g.find(e=>(null==o?void 0:o.saas_config)&&e.identifier===(null==o?void 0:o.saas_config.type)||e.identifier===(null==o?void 0:o.connection_type));(await ei(a,t,s,o,h)).succeeded[0]&&p("Integration successfully linked!"),d(null),l()}}catch(e){y(e)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{onClick:r,children:"Link integration"}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:i,size:"lg",onClose:f,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{children:[(0,t.jsx)(n.xBx,{children:"Unlinked Integrations"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{pb:6,children:(0,t.jsxs)(n.Kqy,{direction:"column",spacing:"15px",children:[(0,t.jsx)(n.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,t.jsx)(n.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:a.map(e=>(0,t.jsxs)(n.kCb,{flexDirection:"row",alignItems:"center",_hover:{bg:"gray.100",color:"gray.600"},bg:(null==o?void 0:o.key)===e.key?"gray.100":"unset",color:(null==o?void 0:o.key)===e.key?"gray.600":"unset",cursor:"pointer",onClick:()=>{d(e)},children:[(0,t.jsx)(v.Z,{data:e}),(0,t.jsx)(n.xvT,{children:e.name})]},e.key))})]})}),(0,t.jsxs)(n.mzw,{className:"flex gap-4",children:[(0,t.jsx)(n.wpx,{onClick:f,className:"w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{onClick:j,loading:m,disabled:!o||m,className:"w-1/2",children:"Link integration"})]})]})]})]})},ed=s(50204),ec=e=>{let{connectionConfig:a,systemFidesKey:s}=e,{dropDownOptions:i,selectedValue:r,setSelectedValue:l}=j({connectionConfig:a}),o=(0,u.C)(A.dR),{data:d}=(0,A.AZ)({...o,orphaned_from_system:!0}),[p,h]=(0,c.useState)([]);(0,c.useEffect)(()=>{d&&h(d.items)},[d]);let m=(0,n.qY0)();return(0,t.jsxs)(n.xuv,{id:"con-wrapper",px:6,children:[(0,t.jsxs)(n.kCb,{py:5,children:[(0,t.jsxs)(n.Kqy,{direction:{base:"column",lg:"row"},children:[(0,t.jsx)(F,{list:i,label:"Integration type",selectedValue:r,onChange:l,disabled:!!(a&&null!==a)}),!a&&p.length>0?(0,t.jsx)(eo,{connectionConfigs:p,systemFidesKey:s}):null,(0,t.jsx)(y.ZP,{scopes:[k.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,t.jsx)(n.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:m.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,t.jsx)(ed.Z,{isOpen:m.isOpen,onClose:m.onClose})]}),(null==r?void 0:r.type)&&[k.Zi.DATABASE,k.Zi.DATA_CATALOG,k.Zi.SAAS,k.Zi.MANUAL,k.Zi.EMAIL].includes(r.type)?(0,t.jsx)(el,{connectionConfig:a,connectionOption:r,setSelectedConnectionOption:l,systemFidesKey:s}):null]})},eu=s(40793),ep=s(43073);let eh=e=>{let{item:a,options:s=[],onNoticeChange:i,isChild:r}=e,{external_id:l,name:o}=a,d="".concat(l,"-notice_id"),[c,,u]=(0,z.U$)(d),{setValue:p}=u;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.Ugi,{flexGrow:1,children:[r&&(0,t.jsx)(n.LqM,{}),(0,t.jsx)(n.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(r?"-child":""),m:0,fontSize:"14px",fontWeight:r?"normal":"semibold",children:o})]}),(0,t.jsx)(n.WPr,{...c,id:d,allowClear:!0,placeholder:"None",options:s,onChange:e=>{p(e),i(a={...a,notice_id:e})},className:"w-full","data-testid":"consentable-item-select"})]})},em=e=>{let{connectionKey:a,...s}=e,i=(0,n.pmc)(),{data:r,isLoading:l}=(0,L.EQ)(a),[o,{isLoading:d}]=(0,L.Am)(),p=(0,u.C)(eu.Zp),h=(0,u.C)(eu.G1),{data:m,isLoading:_}=(0,eu.J6)({page:p,size:h}),[g,y]=(0,c.useState)(),[f,b]=(0,c.useState)([]),v=(0,c.useMemo)(()=>null==g?void 0:g.reduce((e,a)=>{var s;return a.notice_id&&(e["".concat(a.external_id,"-notice_id")]=a.notice_id),(null===(s=a.children)||void 0===s?void 0:s.length)&&a.children.forEach(a=>{a.notice_id&&(e["".concat(a.external_id,"-notice_id")]=a.notice_id)}),e},{}),[g]),j=e=>{let a=e.notice_id;if(a){let e=null==m?void 0:m.items.filter(e=>e.id===a);if(null==e?void 0:e.length){var s;let a=(null===(s=e[0].children)||void 0===s?void 0:s.map(e=>e.id))||[];return f.filter(e=>a.includes(e.value))}}return f},F=async()=>{let e=await o({connectionKey:a,consentableItems:g});(0,ep.D4)(e)?i((0,x.Vo)("Failed to save consent automation")):i({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,t.jsx)(n.xvT,{"data-testid":"toast-success-msg",children:"Your consent automation settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,c.useEffect)(()=>{r&&y(r)},[r]),(0,c.useEffect)(()=>{m&&b(m.items.map(e=>({label:e.name,value:e.id})))},[m]),l||_)return(0,t.jsx)(n.xuv,{borderWidth:"1px",borderRadius:"md",...s,children:(0,t.jsx)(n.OdW,{height:"35px"})});if(!g||!g.length||!m)return null;let S=(e,a)=>{y(g.map(s=>{if(a?s.external_id===a.external_id:s.external_id===e.external_id){if(a){var t;return{...s,children:null===(t=s.children)||void 0===t?void 0:t.map(a=>a.external_id===e.external_id?e:a)}}return e}return s}))};return(0,t.jsx)(n.xuv,{borderWidth:"1px",borderRadius:"md",...s,children:(0,t.jsx)(n.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,t.jsxs)(n.Qdk,{border:"none",children:[(0,t.jsxs)(n.KFZ,{children:[(0,t.jsx)(n.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,t.jsx)(n.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Consent automation"})}),(0,t.jsx)(n.XEm,{})]}),(0,t.jsxs)(n.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,t.jsx)(n.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,t.jsx)(z.J9,{initialValues:v||{},onSubmit:F,children:(0,t.jsxs)(z.l0,{children:[(0,t.jsx)(n.MIq,{columns:2,spacing:3,children:g.map(e=>{var a;return(0,t.jsxs)(c.Fragment,{children:[(0,t.jsx)(eh,{item:e,options:f,onNoticeChange:S}),null===(a=e.children)||void 0===a?void 0:a.map(a=>(0,t.jsx)(eh,{item:a,options:j(e),isChild:!0,onNoticeChange:a=>S(a,e)},a.external_id))]},e.external_id)})}),(0,t.jsx)(n.Ugi,{justifyContent:"flex-end",mt:3,children:(0,t.jsx)(n.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var e_=s(62711),ex=s(18121),eg=s.n(ex),ey=(0,n.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"}),ef=(0,n.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 eb=e=>{let a=new Date(e),s=navigator.language;return{formattedTime:a.toLocaleTimeString(s,{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"}),formattedDate:a.toLocaleDateString(s,{year:"numeric",month:"long",day:"numeric"})}},ev=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,ej=(e,a)=>{let s=new Set([...Object.keys(e),...Object.keys(a)]),t=[],i=[],n=[];return Array.from(s).forEach(s=>{let r=ev(s),l=e[s],o=a[s];if("boolean"==typeof l||"boolean"==typeof o||"number"==typeof l||"number"==typeof o){l!==o&&n.push(r);return}!((G().isNil(l)||G().isEmpty(l))&&(G().isNil(o)||G().isEmpty(o)))&&(G().isEqual(l,o)||(G().isNil(l)||G().isEmpty(l)?t.push(r):G().isNil(o)||G().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:t,removedFields:i,changedFields:n}},eF=e=>{let{edited_by:a,before:s,after:i,created_at:n}=e,r=[],l=[],o=[];s.custom_fields||i.custom_fields?{addedFields:r,removedFields:l,changedFields:o}=ej(s.custom_fields,i.custom_fields):{addedFields:r,removedFields:l,changedFields:o}=ej(s,i);let d=[];if(r.length>0&&d.push(["added ",(0,t.jsx)("b",{children:r.join(", ")})]),l.length>0&&d.push(["removed ",(0,t.jsx)("b",{children:l.join(", ")})]),o.length>0&&d.push(["changed ",(0,t.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let u=d.pop(),p=d.length>0?(0,t.jsxs)(t.Fragment,{children:[d.map((e,a)=>(0,t.jsxs)(c.Fragment,{children:[e,a<d.length-1?", ":""]},a)),d.length>=2?", and ":" and ",u]}):u,{formattedTime:h,formattedDate:m}=eb(n);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("b",{children:a})," ",p," on ",m," at ",h]})},eS=(e,a)=>{let s=e=>e.map(e=>{let s=a.find(a=>a.fides_key===e.fides_key);return s&&s.name?s.name:e.fides_key}),t={...e.before},i={...e.after};return t.ingress&&(t.ingress=s(t.ingress)),t.egress&&(t.egress=s(t.egress)),i.ingress&&(i.ingress=s(i.ingress)),i&&i.egress&&(i.egress=s(i.egress)),{...e,before:t,after:i}},eC=(e,a)=>{if(G().isEmpty(a))return e;let s=(e,a)=>{var s,t;return null!==(t=null===(s=a.find(a=>a.value===e))||void 0===s?void 0:s.label)&&void 0!==t?t:e};return{...e,before:{...e.before,vendor_id:s(e.before.vendor_id,a)},after:{...e.after,vendor_id:s(e.after.vendor_id,a)}}},ek=e=>{let a=e.before.privacy_declarations||[],s=e.after.privacy_declarations||[],t=new Set([...a,...s].map(e=>e.data_use)),i=[],n=[];return t.forEach(e=>{let t=a.find(a=>a.data_use===e)||{data_use:"",data_categories:[]},r=s.find(a=>a.data_use===e)||{data_use:"",data_categories:[]};i.push(t),n.push(r)}),{...e,before:{...e.before,privacy_declarations:i},after:{...e.after,privacy_declarations:n}}},ew=e=>{let a={...e.before.custom_fields},s={...e.after.custom_fields};return new Set([...Object.keys(a),...Object.keys(s)]).forEach(e=>{e in a||(a[e]=null),e in s||(s[e]=null)}),{...e,before:{...e.before,custom_fields:a},after:{...e.after,custom_fields:s}}},eA=e=>{if(!e.before.privacy_declarations||!e.before.privacy_declarations[0]||!e.before.privacy_declarations[0].custom_fields)return e;let a={...e.before.privacy_declarations[0].custom_fields},s=e.after.privacy_declarations&&e.after.privacy_declarations[0]?{...e.after.privacy_declarations[0].custom_fields}:{};return new Set([...Object.keys(a),...Object.keys(s)]).forEach(e=>{e in a||(a[e]=null),e in s||(s[e]=null)}),{...e,before:{...e.before,privacy_declarations:[{...e.before.privacy_declarations[0],custom_fields:a}]},after:{...e.after,privacy_declarations:[{...e.after.privacy_declarations[0],custom_fields:s}]}}},eD=(0,c.createContext)(null),eT=()=>(0,c.useContext)(eD);var eI=e=>{let{children:a,selectedHistory:s,formType:i}=e,n=(0,c.useMemo)(()=>({selectedHistory:s,formType:i}),[s,i]);return(0,t.jsx)(eD.Provider,{value:n,children:a})},eE=s(72573),eN=s(19535),eM=e=>{let{heading:a,children:s}=e,{selectedHistory:i}=eT(),r=c.Children.toArray(s).filter(e=>{if(c.isValidElement(e)&&e.props.name){let{name:a}=e.props,s=G().get(null==i?void 0:i.before,a),t=G().get(null==i?void 0:i.after,a),n="boolean"!=typeof s&&"number"!=typeof s&&G().isEmpty(s),r="boolean"!=typeof t&&"number"!=typeof t&&G().isEmpty(t);return!n||!r}return!1});return 0===r.length?null:(0,t.jsx)(n.Kqy,{marginTop:"0px !important",children:(0,t.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,t.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,t.jsx)(n.X6q,{as:"h3",size:"xs",children:a})}),(0,t.jsx)(n.Kqy,{children:r})]})})},eL=s(34803),eU=s(39514),ez=e=>{var a;let{label:s,tooltip:i,...r}=e,{selectedHistory:l,formType:o}=eT(),[d]=(0,z.U$)(r.name),u={...d,value:null!==(a=d.value)&&void 0!==a?a:[]},p=(0,c.useRef)(null),[h,m]=(0,c.useState)(null),[_,x]=(0,c.useState)([]),[g,y]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=G().get(null==l?void 0:l.before,r.name)||[],a=G().get(null==l?void 0:l.after,r.name)||[];y(!G().isEqual(e,a)),x(e.length>a.length?e:a)},[l,r.name]),(0,c.useEffect)(()=>{p.current&&m(p.current.offsetHeight)},[_]);let f={};return g&&(f="before"===o?{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,t.jsx)(n.NIc,{style:f,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,t.jsxs)(n.gCW,{alignItems:"start",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(eL.__,{htmlFor:r.name,fontSize:"xs",my:0,mr:1,children:s}),i?(0,t.jsx)(eU.Z,{label:i}):null]}),(0,t.jsx)(n.kCb,{wrap:"wrap",alignItems:"flex-start",ref:p,style:{minHeight:"".concat(h,"px")},children:(h?u.value:_).map((e,a)=>(0,t.jsx)(n.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},a))}),"before"===o&&g&&(0,t.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eR=e=>{var a;let{label:s,tooltip:i,...r}=e,{selectedHistory:l,formType:o}=eT(),[d]=(0,z.U$)(r),u={...d,value:null!==(a=d.value)&&void 0!==a?a:""},p=(0,c.useRef)(null),[h,m]=(0,c.useState)(null),[_,x]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=G().get(null==l?void 0:l.before,r.name)||"",a=G().get(null==l?void 0:l.after,r.name)||"";x(!G().isEqual(e,a));let s=e.length>a.length?e:a;p.current&&(p.current.textContent=s,m(p.current.offsetHeight),p.current.textContent=u.value)},[l,r.name,u.value]);let g={};return _&&(g="before"===o?{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,t.jsx)(n.NIc,{style:g,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,t.jsxs)(n.gCW,{alignItems:"start",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(eL.__,{htmlFor:r.id||r.name,fontSize:"xs",my:0,mr:1,children:s}),i?(0,t.jsx)(eU.Z,{label:i}):null]}),(0,t.jsx)(n.xvT,{fontSize:"14px",ref:p,style:{height:"".concat(h,"px")},children:u.value}),"before"===o&&_&&(0,t.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eW=e=>{let{customFields:a={},resourceType:s}=e,{idToCustomFieldDefinition:i}=(0,eN.m)({resourceType:s}),n=e=>Array.from(i.values()).some(a=>a.name===e&&!!a.allow_list_id),r=s===k.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",l=Object.keys(a).sort();return(0,t.jsx)(eM,{heading:"Custom fields",children:l.map(e=>n(e)?(0,t.jsx)(ez,{label:e,name:"".concat(r,".").concat(e)},e):(0,t.jsx)(eR,{label:e,name:"".concat(r,".").concat(e)},e))})},eO=e=>{let{label:a,tooltip:s,...i}=e,{selectedHistory:r,formType:l}=eT(),[o]=(0,z.U$)(i),d={...o,value:o.value},[u,p]=(0,c.useState)(!1);(0,c.useEffect)(()=>{p(G().get(null==r?void 0:r.before,i.name)!==G().get(null==r?void 0:r.after,i.name))},[r,i.name,d.value]);let h={};return u&&(h="before"===l?{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,t.jsx)(n.NIc,{style:h,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,t.jsxs)(n.gCW,{alignItems:"start",minHeight:"46px",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(eL.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:a}),s?(0,t.jsx)(eU.Z,{label:s}):null]}),void 0!==d.value&&(0,t.jsx)(n.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===l&&u&&(0,t.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eP=e=>{let{initialValues:a}=e,s=(0,eE.hz)();return(0,t.jsx)(z.J9,{enableReinitialize:!0,initialValues:a,onSubmit:()=>{},children:()=>(0,t.jsx)(z.l0,{children:(0,t.jsxs)(n.Kqy,{children:[(0,t.jsxs)(eM,{heading:"System details",children:[s.dictionaryService?(0,t.jsx)(eR,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,t.jsx)(eR,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,t.jsx)(eR,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,t.jsx)(eR,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,t.jsx)(ez,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,t.jsx)(eM,{heading:"Dataset reference",children:(0,t.jsx)(ez,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,t.jsxs)(eM,{heading:"Data processing properties",children:[(0,t.jsx)(eO,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,t.jsx)(eO,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,t.jsx)(eR,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,t.jsx)(eO,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,t.jsx)(ez,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,t.jsx)(eO,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,t.jsx)(ez,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,t.jsx)(eO,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,t.jsx)(eR,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,t.jsxs)(eM,{heading:"Administrative properties",children:[(0,t.jsx)(eR,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,t.jsx)(eR,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,t.jsx)(eR,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,t.jsx)(eR,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,t.jsx)(eR,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,t.jsx)(ez,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,t.jsx)(eR,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,t.jsx)(eR,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,t.jsx)(eR,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,t.jsx)(eW,{customFields:a.custom_fields,resourceType:k.P6.SYSTEM}),a.privacy_declarations&&a.privacy_declarations.map((e,s)=>(0,t.jsxs)(c.Fragment,{children:[(0,t.jsxs)(eM,{heading:"Data use",children:[(0,t.jsx)(eR,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(s,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,t.jsx)(eR,{name:"privacy_declarations[".concat(s,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,t.jsx)(ez,{name:"privacy_declarations[".concat(s,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,t.jsx)(ez,{name:"privacy_declarations[".concat(s,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,t.jsx)(eR,{name:"privacy_declarations[".concat(s,"].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,t.jsx)(eR,{name:"privacy_declarations[".concat(s,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,t.jsx)(eR,{name:"privacy_declarations[".concat(s,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,t.jsx)(eM,{heading:"Features",children:(0,t.jsx)(ez,{name:"privacy_declarations[".concat(s,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,t.jsx)(eM,{heading:"Dataset reference",children:(0,t.jsx)(ez,{name:"privacy_declarations[".concat(s,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,t.jsxs)(eM,{heading:"Special category data",children:[(0,t.jsx)(eO,{name:"privacy_declarations[".concat(s,"].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,t.jsx)(eR,{name:"privacy_declarations[".concat(s,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,t.jsxs)(eM,{heading:"Third parties",children:[(0,t.jsx)(eO,{name:"privacy_declarations[".concat(s,"].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,t.jsx)(eR,{name:"privacy_declarations[".concat(s,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,t.jsx)(ez,{name:"privacy_declarations[".concat(s,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,t.jsx)(eW,{customFields:a.privacy_declarations[0].custom_fields,resourceType:k.P6.PRIVACY_DECLARATION})]},s)),(0,t.jsxs)(eM,{heading:"Data flow",children:[(0,t.jsx)(ez,{name:"ingress",label:"Sources"}),(0,t.jsx)(ez,{name:"egress",label:"Destinations"})]})]})})})};let eq=(e,a)=>{let s=[],t=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||a.egress||e.ingress||a.ingress)&&s.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||a.privacy_declarations&&a.privacy_declarations.length>0;i&&s.push("Data Uses");let n=[...Object.keys(e),...Object.keys(a)].some(e=>!t.has(e));return!i&&n&&s.unshift("System Information"),s};var eZ=e=>{let{selectedHistory:a,isOpen:s,onClose:i}=e;return(0,t.jsxs)(n.u_l,{isOpen:s,onClose:i,size:"4xl",children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{children:[(0,t.jsxs)(n.xBx,{backgroundColor:eg().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,t.jsxs)(n.X6q,{size:"xs",children:[(0,t.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),a&&(0,t.jsx)(t.Fragment,{children:eq(a.before,a.after).map((e,a)=>(0,t.jsx)(n.j8w,{color:"minos",className:"ml-2",children:e},a))})]}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.LZC,{}),(0,t.jsx)(n.olH,{})]})]}),(0,t.jsx)(n.fef,{paddingTop:0,paddingBottom:6,children:(0,t.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,t.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,t.jsx)(eI,{selectedHistory:a,formType:"before",children:(0,t.jsx)(eP,{initialValues:null==a?void 0:a.before})})}),(0,t.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,t.jsx)(eI,{selectedHistory:a,formType:"after",children:(0,t.jsx)(eP,{initialValues:null==a?void 0:a.after})})})]})})]})]})},eB=e=>{let{system:a}=e,[s,i]=(0,c.useState)(1),{data:r}=(0,L.Xc)({system_key:a.fides_key,page:s,size:10}),[l,o]=(0,c.useState)(!1),[d,p]=(0,c.useState)(null),h=(0,u.C)(L.o),{data:m=[]}=(0,U.K3)(),_=(null==r?void 0:r.items)||[],x=e=>{p(e=eA(e=ew(e=eS(e=eC(e=ek(e),h),m)))),o(!0)},{formattedTime:g,formattedDate:y}=eb(a.created_at),f=r&&r.total?Math.ceil(r.total/10):0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.iA_,{ml:"24px",children:[(0,t.jsx)(n.hrZ,{children:(0,t.jsx)(n.Tr,{children:(0,t.jsxs)(n.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:eg().FIDESUI_NEUTRAL_50,children:["System created on ",y," at ",g]})})}),(0,t.jsx)(n.p3B,{children:_.map((e,a)=>{let s=eF(e);return s?(0,t.jsx)(n.Tr,{onClick:()=>x(e),style:{cursor:"pointer"},children:(0,t.jsx)(n.Td,{pt:"10px",pb:"10px",pl:"16px",fontSize:"12px",border:"1px solid #E2E8F0",children:s})},a):null})})]}),((null==r?void 0:r.total)||0)>10&&(0,t.jsxs)(n.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,t.jsxs)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"600",paddingX:2,children:[(s-1)*10+1," -"," ",Math.min(10*s,(null==r?void 0:r.total)||0)," of"," ",(null==r?void 0:r.total)||0]}),(0,t.jsx)(n.wpx,{size:"small",className:"mr-2",onClick:()=>{s>1&&i(s-1)},disabled:1===s,icon:(0,t.jsx)(ef,{})}),(0,t.jsx)(n.wpx,{size:"small",onClick:()=>{s<f&&i(s+1)},disabled:s===f||0===f,icon:(0,t.jsx)(ey,{})})]}),(0,t.jsx)(eZ,{selectedHistory:d,isOpen:l,onClose:()=>{o(!1),p(null)}})]})},eV=s(70810),eK=s(16921),eG=e=>{let{title:a,description:s,handleAdd:i}=e;return(0,t.jsx)(n.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,t.jsxs)(n.Ugi,{children:[(0,t.jsx)(n.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:a}),(0,t.jsx)(n.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:s}),(0,t.jsx)(n.Ugi,{mt:4,children:(0,t.jsx)(n.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:i,icon:(0,t.jsx)(n.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},eH=s(77650);let eY=e=>{let{declaration:a,title:s,handleDelete:i,handleEdit:r}=e,{isOpen:l,onOpen:o,onClose:d}=(0,n.qY0)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,t.jsx)(n.xuv,{px:6,py:4,"data-testid":"row-".concat(a.data_use),children:(0,t.jsxs)(n.Ugi,{children:[(0,t.jsx)(n.AB5,{onClick:()=>r(a),role:"button",tabIndex:0,children:(0,t.jsx)(n.xvT,{children:s||a.data_use})}),(0,t.jsx)(n.LZC,{}),i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:o,"data-testid":"delete-btn",children:(0,t.jsx)(n.pJl,{})}),(0,t.jsx)(eH.Z,{isOpen:l,onClose:d,onConfirm:()=>i(a),title:"Delete data use declaration",message:(0,t.jsxs)(n.xvT,{children:["You are about to delete the data use declaration"," ",(0,t.jsx)(n.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:s||a.data_use}),", including all its cookies. Are you sure you want to continue?"]}),isCentered:!0})]}):null]})})}),(0,t.jsx)(n.izJ,{})]})},eJ=e=>{let{heading:a,children:s,headerButton:i,footerButton:r}=e;return(0,t.jsx)(n.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,t.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,t.jsxs)(n.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,t.jsx)(n.X6q,{as:"h3",size:"xs",children:a}),(0,t.jsx)(n.LZC,{}),i||null]}),(0,t.jsx)(n.Kqy,{spacing:0,children:s}),(0,t.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:r||null})]})})},eQ=e=>{let{heading:a,declarations:s,handleAdd:i,handleDelete:r,handleEdit:l,allDataUses:o}=e,d=e=>{let a=o.filter(a=>a.fides_key===e.data_use)[0];return a?e.name?"".concat(a.name," - ").concat(e.name):a.name:""},c=(0,u.C)(e_.gU);return(0,t.jsx)(eJ,{heading:a,footerButton:c?null:(0,t.jsx)(n.wpx,{onClick:i,size:"small",icon:(0,t.jsx)(n.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:s.map(e=>(0,t.jsx)(eY,{declaration:e,title:d(e),handleDelete:c?void 0:r,handleEdit:l},e.id))})};var eX=s(79356),e$=s(84794),e0=s(64829),e1=s(90982);let e4=R.Ry().shape({data_categories:R.IX(R.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:R.Z_().required().label("Data use")}),e2={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:{},cookies:[],id:""},e5=e=>{var a;let s=e.cookies?e.cookies.map(e=>({name:e,path:"/"})):void 0;return{...e,name:null!==(a=e.name)&&void 0!==a?a:"",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,cookies:s}},e6=e=>{let{allDataUses:a,allDataCategories:s,allDataSubjects:i,allDatasets:r,cookies:l,values:o,includeCustomFields:d,privacyDeclarationId:u,lockedForGVL:p}=e,h=!!u,{legalBasisOptions:m}=(0,e$.Z)(),{specialCategoryLegalBasisOptions:_}=(0,e0.Z)(),x=(0,c.useMemo)(()=>r?r.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[r]);return(0,t.jsxs)(n.Kqy,{spacing:4,children:[(0,t.jsxs)(e1.Z,{heading:"Data use declaration",children:[(0,t.jsx)(eL.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:h||p,variant:"stacked"}),(0,t.jsx)(W.d,{id:"data_use",label:"Data use",name:"data_use",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:h||p}),(0,t.jsx)(W.d,{name:"data_categories",label:"Data categories",options:s.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:p,layout:"stacked"}),(0,t.jsx)(W.d,{name:"data_subjects",label:"Data subjects",options:i.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",disabled:p,layout:"stacked"}),(0,t.jsxs)(n.Kqy,{spacing:0,children:[(0,t.jsx)(W.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:m,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled:p}),(0,t.jsx)(n.UO1,{in:"Legitimate interests"===o.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,t.jsx)(n.xuv,{mt:4,children:(0,t.jsx)(eL.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked",disabled:p})})})]}),(0,t.jsx)(n.xuv,{mt:5,pl:4,children:(0,t.jsx)(eL.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:p})}),(0,t.jsx)(eL.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:p})]}),(0,t.jsx)(e1.Z,{heading:"Features",children:(0,t.jsx)(W.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:p,mode:"tags"})}),(0,t.jsx)(e1.Z,{heading:"Dataset reference",children:(0,t.jsx)(W.d,{name:"dataset_references",label:"Dataset references",options:x,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:p})}),(0,t.jsx)(e1.Z,{heading:"Special category data",children:(0,t.jsxs)(n.Kqy,{spacing:0,children:[(0,t.jsx)(eL.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",isDisabled:p}),(0,t.jsx)(n.UO1,{in:o.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,t.jsx)(n.xuv,{mt:4,children:(0,t.jsx)(W.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:_,isRequired:o.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked",disabled:p})})})]})}),(0,t.jsx)(e1.Z,{heading:"Third parties",children:(0,t.jsxs)(n.Kqy,{spacing:0,children:[(0,t.jsx)(eL.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",isDisabled:p}),(0,t.jsx)(n.UO1,{in:o.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,t.jsxs)(n.Kqy,{mt:4,spacing:4,children:[(0,t.jsx)(eL.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked",disabled:p}),(0,t.jsx)(W.d,{name:"shared_categories",label:"Shared categories",options:s.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",disabled:p})]})})]})}),(0,t.jsx)(e1.Z,{heading:"Cookies",children:(0,t.jsx)(W.d,{name:"cookies",label:"Cookies",options:l&&l.length?l.map(e=>({label:e.name,value:e.name})):[],mode:"tags",tooltip:"Which cookies are placed on consumer domains for this purpose?",layout:"stacked",disabled:p})}),d?(0,t.jsx)(eX.uc,{resourceType:k.P6.PRIVACY_DECLARATION,resourceFidesKey:u}):null]})},e9=(e,a)=>{if(e){let s=e.cookies&&e.cookies.length>0?e.cookies.map(e=>e.name):void 0;return{...e,customFieldValues:a||{},cookies:s}}return e2},e3=e=>{let{onSubmit:a,initialValues:s,privacyDeclarationId:t}=e,{customFieldValues:i,upsertCustomFields:n}=(0,eX.mZ)({resourceType:k.P6.PRIVACY_DECLARATION,resourceFidesKey:t});return{handleSubmit:async(e,s)=>{let{customFieldValues:t}=e,i=e5(e),r=await a(i,s);if(r){let a=r.filter(a=>a.data_use===e.data_use&&(!a.name||a.name===e.name));a.length>0&&await n({customFieldValues:t,fides_key:a[0].id})}},initialValues:(0,c.useMemo)(()=>e9(s,i),[s,i])}},e8=e=>{let{onSubmit:a,onCancel:s,initialValues:i,...r}=e,l=null==i?void 0:i.id,{handleSubmit:o,initialValues:d}=e3({onSubmit:a,onCancel:s,initialValues:i,allDataUses:r.allDataUses,privacyDeclarationId:l}),c=(0,u.C)(e_.gU);return(0,t.jsx)(z.J9,{enableReinitialize:!0,initialValues:d,onSubmit:o,validationSchema:e4,children:e=>{let{dirty:a,values:i}=e;return(0,t.jsxs)(z.l0,{"data-testid":"declaration-form",children:[(0,t.jsx)(h.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,t.jsxs)(n.Kqy,{spacing:4,children:[(0,t.jsx)(e6,{values:i,lockedForGVL:c,privacyDeclarationId:l,...r}),(0,t.jsxs)(n.kCb,{w:"100%",children:[(0,t.jsx)(n.wpx,{onClick:s,"data-testid":"cancel-btn",children:"Cancel"}),c?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.LZC,{}),(0,t.jsx)(n.wpx,{type:"primary",htmlType:"submit",disabled:!a,"data-testid":"save-btn",children:"Save"})]})]})]})]})}})},e7=e=>{let{isOpen:a,onClose:s,heading:i,isCentered:r=!1,testId:l="privacy-declaration-modal",children:o}=e;return(0,t.jsxs)(n.u_l,{isOpen:a,onClose:s,isCentered:r,scrollBehavior:"inside",size:"3xl",children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{textAlign:"left",p:0,"data-testid":l,children:[(0,t.jsx)(n.xBx,{p:0,children:(0,t.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,t.jsx)(n.X6q,{as:"h3",size:"sm",children:i})})}),(0,t.jsx)(n.fef,{pb:4,children:o})]})]})};var ae=e=>{let{system:a,addButtonProps:s,includeCustomFields:i,includeCookies:r,...l}=e,{isOpen:o,onClose:d,onOpen:u}=(0,n.qY0)(),[p,h]=(0,c.useState)(void 0),{createDataUse:m,updateDataUse:_,deleteDataUse:x}=(0,eK.Z)(a),g=[...a.privacy_declarations.filter(e=>void 0!==e.cookies).flatMap(e=>e.cookies)],y=a.cookies?a.cookies.filter(e=>0===g.filter(a=>a&&a.name===e.name).length):void 0,f=()=>{d(),h(void 0)},b=()=>{u(),h(void 0)},v=async e=>(f(),p)?_(p,e):m(e);return(0,c.useEffect)(()=>{d()},[d,a.fides_key]),(0,t.jsxs)(n.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===a.privacy_declarations.length?(0,t.jsx)(eG,{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:b}):(0,t.jsx)(eQ,{heading:"Data use",declarations:a.privacy_declarations,handleAdd:b,handleEdit:e=>{u(),h(e)},handleDelete:x,allDataUses:l.allDataUses}),y&&y.length>0?(0,t.jsx)(eJ,{heading:"Unassigned cookies",children:y.map(e=>(0,t.jsxs)(c.Fragment,{children:[(0,t.jsx)(n.xuv,{px:6,py:4,children:(0,t.jsx)(n.xvT,{children:e.name})}),(0,t.jsx)(n.izJ,{})]},e.name))}):null,(0,t.jsx)(e7,{isOpen:o,onClose:f,heading:"Configure data use",children:(0,t.jsx)(e8,{initialValues:p,onSubmit:v,onCancel:f,includeCustomFields:i,...l})})]})},aa=e=>{let{system:a}=e,{isLoading:s,...i}=(0,eV.f)({includeDatasets:!0,includeDisabled:!1}),r=i.allDataCategories.filter(e=>e.active),o=i.allDataUses.filter(e=>e.active),d=i.allDataSubjects.filter(e=>e.active),c={...i,allDataCategories:r,allDataUses:o,allDataSubject:d,cookies:a.cookies};return(0,t.jsxs)(n.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,t.jsx)(n.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,t.jsxs)(n.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,t.jsx)(n.rUS,{as:l(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),s?(0,t.jsx)(n.$jN,{}):(0,t.jsx)(ae,{system:a,includeCustomFields:!0,includeCookies:!0,...c})]})},as=s(60136),at=s(43894),ai=s(94180),an=s(55827);let ar={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:""},al=(e,a)=>{var s;let t=null==e?void 0:null===(s=e.data_stewards)||void 0===s?void 0:s.map(e=>e.username).join(", ");return{...e,customFieldValues:a,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:t}},ao=e=>{let a=e.fides_key?e.fides_key:(0,an.E)(e.name),s=""===e.privacy_policy?void 0:e.privacy_policy,t={system_type:e.system_type,fides_key:a,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,cookies:e.cookies,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};return e.processes_personal_data&&(t={...t,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:s,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&&(t.administrating_department=e.administrating_department),e.joint_controller_info&&(t.joint_controller_info=e.joint_controller_info)),t};var ad=s(56048);let ac=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),au=[{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"}],ap=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),ah=e=>{var a;let{system:s}=e,i=s?null!==(a=s.name)&&void 0!==a?a:"this system":"your new system";return(0,t.jsxs)(n.X6q,{as:"h3",size:"lg",children:["Describe ",i]})};var am=e=>{let{onSuccess:a,system:s,withHeader:i,children:r}=e,{data:l=[]}=(0,U.K3)(),o=(0,u.T)(),d=(0,eX.mZ)({resourceType:k.P6.SYSTEM,resourceFidesKey:null==s?void 0:s.fides_key}),{...p}=(0,eV.f)({includeDatasets:!0,includeDisabled:!1}),m=(0,c.useMemo)(()=>s?al(s,d.customFieldValues):ar,[s,d.customFieldValues]),[_]=(0,U.in)(),x=(0,c.useMemo)(()=>R.Ry().shape({name:R.Z_().required().label("System name").test("is-unique","",async(e,a)=>{let{data:s}=await _({page:1,size:10,search:e});return!((null==s?void 0:s.items)||[]).filter(e=>e.name!==m.name).some(a=>a.name===e)||a.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})}),privacy_policy:R.Z_().min(1).url().nullable()}),[_,m.name]),g=(0,eE.hz)(),[y,f]=(0,U.f7)(),[b,v]=(0,U.qQ)();(0,L.Rd)(void 0,{skip:!g.dictionaryService});let[j]=(0,L.qz)(),F=(0,u.C)(L.o),S=(0,u.C)(e_.gU),C=(0,c.useMemo)(()=>!!(s&&(null==l?void 0:l.some(e=>e.fides_key===(null==s?void 0:s.fides_key)))),[s,l]),w=(0,c.useMemo)(()=>p.allDatasets?p.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[p.allDatasets]),A=(0,n.pmc)(),D=async(e,s)=>{let t,i;if(e.vendor_id&&0===e.privacy_declarations.length){let a=await j({vendor_id:e.vendor_id});a.isError?(0,as.fn)(a.error)&&404===a.error.status||A({status:"error",description:(0,as.e$)(a.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.")}):a.data&&a.data.items.length>0&&(t=a.data.items.map(e=>{var a;return{...(0,ai.U)(e),name:null!==(a=e.name)&&void 0!==a?a:""}}))}let n=ao({...e,privacy_declarations:null!=t?t:e.privacy_declarations});i=C?await b(n):await y(n),await d.upsertCustomFields(e),(0,as.D4)(i)?A({status:"error",description:(0,as.e$)(i.error,"An unexpected error occurred while ".concat(C?"editing":"creating"," the system. Please try again."))}):(A.closeAll(),s.resetForm({values:e}),a(i.data),o((0,e_.b3)("initial")))},T=e=>{if(g.dictionaryService){if(!e){o((0,e_.b3)("hiding")),o((0,e_.gQ)(!1));return}o((0,e_.b3)("showing")),g.tcf&&(0,as.cj)(e)===as.c6.GVL?o((0,e_.gQ)(!0)):o((0,e_.gQ)(!1))}},I=v.isLoading||f.isLoading||d.isLoading;return(0,t.jsx)(z.J9,{initialValues:m,enableReinitialize:!0,onSubmit:D,validationSchema:x,children:e=>{let{dirty:a,values:l,isValid:o}=e;return(0,t.jsxs)(z.l0,{children:[(0,t.jsx)(h.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,t.jsxs)(n.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[i?(0,t.jsx)(ah,{system:s}):null,(0,t.jsx)(n.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."}),i?(0,t.jsx)(ah,{system:s}):null,(0,t.jsxs)(e1.Z,{heading:"System details",children:[g.dictionaryService?(0,t.jsx)(ad.Z,{label:"System name",options:F,onVendorSelected:T,isCreate:!s,lockedForGVL:S}):(0,t.jsx)(eL.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==s?void 0:s.fides_key)&&(0,t.jsx)(eL.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,t.jsx)(at.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:S}),(0,t.jsx)(W.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:m.tags?m.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:S})]}),(0,t.jsx)(e1.Z,{heading:"Dataset reference",children:(0,t.jsx)(W.d,{name:"dataset_references",label:"Dataset references",options:w,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:S})}),(0,t.jsx)(e1.Z,{heading:"Data processing properties",children:(0,t.jsxs)(n.Kqy,{spacing:0,children:[(0,t.jsx)(n.xuv,{mb:4,children:(0,t.jsx)(at.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:S})}),(0,t.jsx)(n.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,t.jsxs)(n.Kqy,{spacing:0,children:[(0,t.jsx)(at.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!l.processes_personal_data||S}),(0,t.jsx)(n.UO1,{in:l.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,t.jsx)(n.xuv,{mt:4,children:(0,t.jsx)(eL.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:l.exempt_from_privacy_regulations,disabled:S})})})]})}),(0,t.jsx)(n.UO1,{in:l.processes_personal_data&&!l.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,t.jsxs)(n.Kqy,{spacing:4,mt:4,children:[(0,t.jsxs)(n.Kqy,{spacing:0,children:[(0,t.jsx)(at.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:S}),(0,t.jsx)(n.UO1,{in:l.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,t.jsx)(n.xuv,{mt:4,children:(0,t.jsx)(W.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:ac,tooltip:"What is the legal basis under which profiling is performed?",disabled:S,isRequired:l.uses_profiling})})})]}),(0,t.jsxs)(n.Kqy,{spacing:0,children:[(0,t.jsx)(at.dQ,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?",disabled:S}),(0,t.jsx)(n.UO1,{in:l.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,t.jsx)(n.xuv,{mt:4,children:(0,t.jsx)(W.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:au,tooltip:"What is the legal basis under which the data is transferred?",isRequired:l.does_international_transfers,disabled:S})})})]}),(0,t.jsxs)(n.Kqy,{spacing:0,children:[(0,t.jsx)(eL.w8,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?",variant:"stacked",isDisabled:S}),(0,t.jsx)(n.UO1,{in:l.requires_data_protection_assessments,animateOpacity:!0,children:(0,t.jsx)(n.xuv,{mt:4,children:(0,t.jsx)(eL.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:S,isRequired:l.requires_data_protection_assessments})})})]})]})})]})}),(0,t.jsxs)(n.UO1,{in:l.processes_personal_data&&!l.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,t.jsxs)(e1.Z,{heading:"Cookie properties",children:[(0,t.jsx)(at.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:S}),(0,t.jsx)(at.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:S}),(0,t.jsx)(at.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:S}),(0,t.jsx)(at.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:S})]}),(0,t.jsxs)(e1.Z,{heading:"Administrative properties",children:[(0,t.jsx)(eL.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,t.jsx)(at.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:S}),(0,t.jsx)(at.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?",disabled:S}),(0,t.jsx)(at.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?",disabled:S}),(0,t.jsx)(eL.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!l.processes_personal_data||l.exempt_from_privacy_regulations||S}),(0,t.jsx)(W.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:ap,tooltip:"What is the role of the business with regard to data processing?",disabled:!l.processes_personal_data||l.exempt_from_privacy_regulations||S}),(0,t.jsx)(at.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:S}),(0,t.jsx)(eL.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!l.processes_personal_data||l.exempt_from_privacy_regulations||S}),(0,t.jsx)(at.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?",disabled:S}),(0,t.jsx)(at.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:S}),(0,t.jsx)(at.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})]}),l.fides_key?(0,t.jsx)(eX.uc,{resourceType:k.P6.SYSTEM,resourceFidesKey:l.fides_key}):null]})]}),(0,t.jsx)(n.xuv,{mt:6,children:(0,t.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:I||!a||!o,loading:I,"data-testid":"save-btn",children:"Save"})}),r]})}})},a_=s(59003),ax=s(92222),ag=s(8540),ay=s(22770),af=s(43938),ab=s(98320),av=s(19310),aj=e=>{var a;let{values:s}=e,{getDataUseDisplayName:i}=(0,av.Z)(),n=null!==(a=null==s?void 0:s.map(e=>({label:i(e),key:e})))&&void 0!==a?a:[];return(0,t.jsx)(ab.mb,{values:n})},aF=()=>{let e=(0,ax.Cl)();return[e.accessor(e=>e.name,{id:"name",cell:e=>(0,t.jsx)(ag.G3,{value:e.getValue()}),header:"Asset"}),e.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,t.jsx)(ag.G3,{value:e.getValue()}),header:"Type"}),e.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,t.jsx)(aj,{values:e.getValue()}),header:"Categories of consent"}),e.accessor(e=>e.locations,{id:"locations",cell:e=>(0,t.jsx)(ab.mb,{values:e.getValue().map(e=>({label:af.Z8[e],key:e}))}),header:"Locations",meta:{width:"auto"}}),e.accessor(e=>e.domain,{id:"domain",cell:e=>(0,t.jsx)(ag.G3,{value:e.getValue()}),header:"Domain"}),e.accessor(e=>e.parent,{id:"parent",cell:e=>(0,t.jsx)(ab.mb,{values:e.getValue().map(e=>({label:e,key:e}))}),header:"Parent",meta:{width:"auto"}})]},aS=e=>{var a;let{system:s}=e,{PAGE_SIZES:i,pageSize:r,setPageSize:l,onPreviousPageClick:o,isPreviousPageDisabled:d,onNextPageClick:u,isNextPageDisabled:p,startRange:h,endRange:m,pageIndex:_,setTotalPages:x,resetPageIndexToDefault:g}=(0,ag.oi)(),[y,f]=(0,c.useState)(""),{data:b,isLoading:v,isFetching:j}=(0,U.rN)({fides_key:s.fides_key,search:y,page:_,size:r});(0,c.useEffect)(()=>{g()},[y,g]),(0,c.useEffect)(()=>{x(null==b?void 0:b.pages)},[b,x]);let F=aF(),S=(0,a_.b7)({getCoreRowModel:(0,ax.sC)(),columns:F,manualPagination:!0,data:(null==b?void 0:b.items)||[],columnResizeMode:"onChange"});return s?v?(0,t.jsx)(ag.I4,{rowHeight:36,numRows:36}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ag.Q$,{children:(0,t.jsx)(ay.M,{value:y,onChange:f})}),(0,t.jsx)(ag.ZK,{tableInstance:S,emptyTableNotice:(0,t.jsx)(n.oj8,{image:n.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,t.jsx)(ag.s8,{totalRows:(null==b?void 0:null===(a=b.items)||void 0===a?void 0:a.length)||0,pageSizes:i,setPageSize:l,onPreviousPageClick:o,isPreviousPageDisabled:d||j,onNextPageClick:u,isNextPageDisabled:p||j,startRange:h,endRange:m})]}):null};let aC={INFORMATION:{index:0,hash:"#information"},DATA_USES:{index:1,hash:"#data-uses"},DATA_FLOW:{index:2,hash:"#data-flow"},INTEGRATIONS:{index:3,hash:"#integrations"},ASSETS:{index:4,hash:"#assets"},HISTORY:{index:5,hash:"#history"}},ak=e=>{let a=e.startsWith("#")?e:"#".concat(e);return Object.values(aC).find(e=>e.hash===a)},aw=e=>Object.values(aC).find(a=>a.index===e),aA=e=>{let{onViewDatamap:a,onAddPrivacyDeclaration:s}=e;return(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,t.jsxs)(n.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,t.jsx)(g.Z,{onClick:a,children:"view it now"})," and come back to finish this setup when you’re ready. Or you can progress to"," ",(0,t.jsx)(g.Z,{onClick:s,children:"adding your privacy declarations in the next tab"}),"."]})]})};var aD=e=>{var a,s;let{isCreate:r}=e,d=(0,o.useRouter)(),[g,y]=(0,c.useState)((()=>{var e,a;let s=d.asPath.split("#")[1];return s&&null!==(a=null===(e=ak(s))||void 0===e?void 0:e.index)&&void 0!==a?a:aC.INFORMATION.index})()),[f,b]=(0,c.useState)(!1),{systemOrDatamapRoute:v}=(0,m.V)(),j=(0,n.pmc)(),F=(0,u.T)(),S=(0,u.C)(U.NC),[C,k]=(0,c.useState)(void 0),{plus:w}=(0,p.hz)(),{flags:{dataDiscoveryAndDetection:A,webMonitor:D}}=(0,p.Vb)(),{plus:T}=(0,p.hz)(),{data:I}=(0,U.rn)(null==S?void 0:S.fides_key,{skip:!S});(0,c.useEffect)(()=>{F((0,U.db)(I))},[I,F]),(0,c.useEffect)(()=>{S&&k(S.processes_personal_data)},[S]);let E=(0,c.useCallback)(e=>{void 0===S&&b(!0),F((0,U.db)(e)),d.push({pathname:_.Dv,query:{id:e.fides_key}});let a={...x.MA,description:(0,t.jsx)(aA,{onViewDatamap:()=>{d.push(v).then(()=>{j.closeAll()})},onAddPrivacyDeclaration:()=>{y(1),j.closeAll()}})};j({...a})},[S,F,d,v,j]);(0,c.useEffect)(()=>(r&&(F((0,U.db)(void 0)),F((0,e_.b3)("initial")),F((0,e_.gQ)(!1))),()=>{F((0,U.db)(void 0))}),[F,r]);let{attemptAction:N}=(0,h.oI)(),M=(0,c.useCallback)(e=>{N().then(async a=>{if(a){let{status:a}=d.query;if(a&&("succeeded"===a?j((0,x.t5)("Integration successfully authorized.")):j((0,x.Vo)("Failed to authorize integration."))),y(e),d.isReady){let a=aw(e);if(a){let e={...d.query};delete e.status,await d.replace({pathname:d.pathname,query:e,hash:a.hash},void 0,{shallow:!0})}}}})},[N,d,j]);(0,c.useEffect)(()=>{let{status:e}=d.query;e&&M(aC.INTEGRATIONS.index)},[d.query,M]);let L=[{label:"Information",content:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.xuv,{px:6,mb:9,children:[(0,t.jsx)(h.eB,{}),(0,t.jsx)(am,{onSuccess:E,system:S})]}),f?(0,t.jsx)(n.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,t.jsxs)(n.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,t.jsx)(n.rUS,{as:l(),href:v,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",content:S?(0,t.jsx)(n.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,t.jsx)(aa,{system:S})}):null,isDisabled:!S||!C},{label:"Data flow",content:S?(0,t.jsxs)(n.xuv,{width:{base:"100%",lg:"70%"},children:[(0,t.jsxs)(n.xuv,{px:6,paddingBottom:2,children:[(0,t.jsx)(n.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,t.jsx)(n.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,t.jsx)(i.q,{system:S,isSystemTab:!0})]}):null,isDisabled:!S},{label:"Integrations",content:S?(0,t.jsxs)(n.xuv,{width:{base:"100%",lg:"70%"},children:[(0,t.jsx)(n.xuv,{px:6,paddingBottom:2,children:(0,t.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,children:T&&A?(0,t.jsxs)(t.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,t.jsx)(n.rUS,{href:_.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,t.jsx)(ec,{connectionConfig:S.connection_configs,systemFidesKey:S.fides_key}),(null===(a=S.connection_configs)||void 0===a?void 0:a.key)&&(0,t.jsx)(em,{m:6,connectionKey:null===(s=S.connection_configs)||void 0===s?void 0:s.key})]}):null,isDisabled:!S}];return w&&D&&L.push({label:"Assets",content:S?(0,t.jsx)(aS,{system:S}):null,isDisabled:!S}),w&&L.push({label:"History",content:S?(0,t.jsxs)(n.xuv,{width:{base:"100%",lg:"70%"},children:[(0,t.jsx)(n.xuv,{px:6,paddingBottom:6,children:(0,t.jsx)(n.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,t.jsx)(eB,{system:S})]}):null,isDisabled:!S}),{tabData:L,tabIndex:g,onTabChange:M}}},84794:function(e,a,s){var t=s(27378),i=s(37760);a.Z=()=>({legalBasisOptions:(0,t.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},64829:function(e,a,s){var t=s(27378),i=s(37760);a.Z=()=>({specialCategoryLegalBasisOptions:(0,t.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9822],{60136:function(e,t,i){i.d(t,{D4:function(){return s.D4},MM:function(){return h},Ot:function(){return d},c6:function(){return r},cj:function(){return p},e$:function(){return l},fn:function(){return o},iC:function(){return x},nU:function(){return u},tB:function(){return c}});var n,r,s=i(41164);let a="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:i}=e;return{status:i,message:l(e,t.message)}}return t},h=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=r||(r={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let x={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},53359:function(e,t,i){i.d(t,{H:function(){return s},V:function(){return n.V}});var n=i(75139),r=i(60136);let s=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,r.Ot)(t)?i=t.data.detail:(0,r.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},75139:function(e,t,i){i.d(t,{V:function(){return s}});var n=i(24246),r=i(52615);let s=()=>{let e=(0,r.pmc)();return{errorAlert:(t,i,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,n.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:t})]}),(0,n.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)},successAlert:(t,i,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,n.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:t})]}),(0,n.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)}}}},50558:function(e,t,i){var n=i(24246),r=i(52615);i(27378),t.Z=e=>{let{isEmptyState:t,yamlError:i}=e;return(0,n.jsx)(r.Rg9,{in:!0,children:(0,n.jsxs)(r.xuv,{w:"fit-content",bg:"white",p:3,borderRadius:3,children:[(0,n.jsxs)(r.Ugi,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:"YAML"}),(0,n.jsx)(r.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(r.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(r.f9v,{}),t&&(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:"Yaml system is required"})]}),i&&(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:i.message}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:i.reason}),(0,n.jsxs)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:["Ln ",(0,n.jsx)("b",{children:i.mark.line}),", Col"," ",(0,n.jsx)("b",{children:i.mark.column}),", Pos"," ",(0,n.jsx)("b",{children:i.mark.position})]})]})]})})]})})}},12719:function(e,t,i){i.d(t,{F:function(){return a},M:function(){return s}});var n=i(76649),r=i(65218);let s=i.n(r)()(()=>i.e(7088).then(i.bind(i,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),a=e=>(0,n.Ln)({name:"string"},e)&&"YAMLException"===e.name},73025:function(e,t,i){var n=i(24246);i(27378);var r=i(43124);t.Z=e=>{let{children:t}=e;return(0,n.jsx)(r.Z,{title:"Connections",children:t})}},59201:function(e,t,i){i.d(t,{s:function(){return W}});var n=i(24246),r=i(69728),s=i(52615),a=i(86677),l=i(27378),o=i(44296),d=i(87162),c=i(37760),u=i(53359),h=i(75139),x=i(7564),p=i(45007),m=i(34090);let f=(e,t)=>{let i={...e};return Object.entries(t.properties).forEach(t=>{let[n,r]=t;if("integer"===r.type){let t=r.default?Number(r.default):e[n];i[n]=t||0}else{var s;let t=null!==(s=r.default)&&void 0!==s?s:e[n];i[n]=null!=t?t:null}}),i},g="#/definitions/FidesDatasetReference";var y=e=>{let{data:t,defaultValues:i,isSubmitting:a=!1,onSaveClick:d,onTestConnectionClick:h,testButtonLabel:p="Test integration"}=e,y=(0,l.useRef)(!1),{handleError:j}=(0,u.H)(),{connection:v,connectionOption:b}=(0,o.C)(r.ZZ),[k,C]=(0,x.h2)(),_=e=>{let t;return(void 0===e||""===e)&&(t="Connection Identifier is required"),e&&(0,s.kEn)(e)&&(t="Connection Identifier must be an alphanumeric value"),t},S=(e,t,i)=>{let n;return(void 0===t||""===t)&&(n="".concat(e," is required")),i===g&&(t.includes(".")?t.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},w=(e,t)=>(0,n.jsx)(s.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:t}),I=e=>{var t;if((null===(t=e.allOf)||void 0===t?void 0:t[0].$ref)===g)return"Enter dataset.collection.field"},z=(e,i)=>{var r;return(0,n.jsx)(m.gN,{id:e,name:e,validate:(null!==(r=t.required)&&void 0!==r&&!!r.includes(e)||"integer"===i.type)&&(e=>{var t;return S(i.title,e,null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)}),children:r=>{var a;let{field:l,form:o}=r;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:null===(a=t.required)||void 0===a?void 0:a.includes(e),isInvalid:o.errors[e]&&o.touched[e],children:[w(e,i.title),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:["integer"!==i.type&&(0,n.jsx)(s.IIB,{...l,value:l.value||"",placeholder:I(i),autoComplete:"off",color:"gray.700",size:"sm"}),"integer"===i.type&&(0,n.jsxs)(s.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(s.zuI,{...l,autoComplete:"off"}),(0,n.jsxs)(s.FiK,{children:[(0,n.jsx)(s.WQu,{}),(0,n.jsx)(s.Y_d,{})]})]}),(0,n.jsx)(s.J1D,{children:o.errors[e]})]}),(0,n.jsx)(s.ua7,{"aria-label":i.description,hasArrow:!0,label:i.description,placement:"right-start",openDelay:500,children:(0,n.jsx)(s.kCb,{alignItems:"center",h:"32px",visibility:i.description?"visible":"hidden",children:(0,n.jsx)(s.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}},e)},R=async()=>{try{await k(v.key).unwrap()}catch(e){j(e)}};return(0,l.useEffect)(()=>(y.current=!0,C.isSuccess&&h(C),()=>{y.current=!1}),[h,C]),(0,n.jsx)(m.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...i};if(null==v?void 0:v.key){var n,r;e.name=null!==(r=v.name)&&void 0!==r?r:"",e.description=v.description,e.instance_key=v.connection_type===c.Rj.SAAS?null===(n=v.saas_config)||void 0===n?void 0:n.fides_key:v.key}return f(e,t)})(),onSubmit:(e,i)=>{let n={...e};Object.keys(t.properties).forEach(i=>{var r;if((null===(r=t.properties[i].allOf)||void 0===r?void 0:r[0].$ref)===g){let t=e[i].split(".");n[i]={dataset:t.shift(),field:t.join("."),direction:"from"}}}),d(n,i)},validateOnBlur:!1,validateOnChange:!1,children:e=>(0,n.jsx)(m.l0,{noValidate:!0,children:(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(m.gN,{id:"name",name:"name",validate:e=>S("Name",e),children:t=>{let{field:i}=t;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.name&&e.touched.name,children:[w("name","Name"),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(s.IIB,{...i,autoComplete:"off",autoFocus:!0,color:"gray.700",placeholder:"Enter a friendly name for your new ".concat(b.human_readable," connection"),size:"sm","data-testid":"input-name"}),(0,n.jsx)(s.J1D,{children:e.errors.name})]}),(0,n.jsx)(s.kCb,{alignItems:"center",h:"32px",visibility:"hidden",children:(0,n.jsx)(s.ITP,{marginLeft:"8px"})})]})}}),(0,n.jsx)(m.gN,{id:"description",name:"description",children:e=>{let{field:t}=e;return(0,n.jsxs)(s.NIc,{display:"flex",children:[w("description","Description"),(0,n.jsx)(s.gxH,{...t,color:"gray.700",placeholder:"Enter a description for your new ".concat(b.human_readable," connection"),resize:"none",size:"sm",value:t.value||""}),(0,n.jsx)(s.kCb,{alignItems:"center",h:"32px",visibility:"hidden",children:(0,n.jsx)(s.ITP,{marginLeft:"8px"})})]})}}),(0,n.jsx)(m.gN,{id:"instance_key",name:"instance_key",validate:_,children:t=>{let{field:i}=t;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.instance_key&&e.touched.instance_key,children:[w("instance_key","Connection Identifier"),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(s.IIB,{...i,autoComplete:"off",color:"gray.700",isDisabled:!!(null==v?void 0:v.key),placeholder:"A unique identifier for your new ".concat(b.human_readable," connection"),size:"sm"}),(0,n.jsx)(s.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(s.ua7,{"aria-label":"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 connection.",hasArrow:!0,label:"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 connection.",placement:"right-start",openDelay:500,children:(0,n.jsx)(s.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(s.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),Object.entries(t.properties).map(e=>{let[t,i]=e;return"advanced_settings"===t?null:z(t,i)}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(s.wpx,{disabled:!(null==v?void 0:v.key),loading:C.isLoading||C.isFetching,onClick:R,"data-testid":"test-connection-button",children:p}),(0,n.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:a,loading:a,children:"Save"})]})]})})})},j=i(99377);let v=e=>{let{onConnectionCreated:t,data:i}=e,s=(0,p.I0)(),{errorAlert:a,successAlert:d}=(0,h.V)(),{handleError:m}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:y,connectionOption:v}=(0,o.C)(r.ZZ),[b]=(0,x.pH)(),[k]=(0,x.Du)();return{isSubmitting:f,handleSubmit:async e=>{try{var l;g(!0);let o={access:c.uv.WRITE,connection_type:null==v?void 0:v.identifier,description:e.description,disabled:!1,key:(0,j.E)(e.instance_key),name:e.name},u=await b(o).unwrap();if((null===(l=u.failed)||void 0===l?void 0:l.length)>0)a(u.failed[0].message);else{let l={connection_key:u.succeeded[0].key,secrets:{}};Object.entries(i.properties).forEach(t=>{l.secrets[t[0]]=e[t[0]]});let o=await k(l).unwrap();"failed"===o.test_status?a((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",o.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",o.failure_reason]})):(s((0,r.lm)(u.succeeded[0])),d("Connector successfully ".concat((null==y?void 0:y.key)?"updated":"added","!")),(null==y?void 0:y.key)||!t||t())}}catch(e){m(e)}finally{g(!1)}},connectionOption:v}},b=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:r}=e,{isSubmitting:a,handleSubmit:l,connectionOption:o}=v({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",o.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."]}),(0,n.jsx)(y,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:a,onSaveClick:l,onTestConnectionClick:r})]})},k={description:"",instance_key:"",name:""},C=e=>{let{data:t,onConnectionCreated:i,onTestEmail:r}=e,{connectionOption:a,isSubmitting:l,handleSubmit:o}=v({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Configure your ",a.human_readable," connector by providing the connector name, description and a test email address. Once you have saved the details, you can click test email to check the format of the email."]}),(0,n.jsx)(y,{data:t,defaultValues:k,isSubmitting:l,onSaveClick:e=>{o(e)},onTestConnectionClick:r,testButtonLabel:"Test email"})]})};var _=i(59389),S=i(9699),w=i(47418),I=e=>{let{defaultValues:t,isSubmitting:i=!1,onSaveClick:l}=e,c=(0,a.useRouter)(),{connection:u,connectionOption:h}=(0,o.C)(r.ZZ);return(0,n.jsx)(m.J9,{initialValues:(()=>{if(null==u?void 0:u.key){var e;t.name=null!==(e=u.name)&&void 0!==e?e:"",t.description=u.description}return t})(),onSubmit:(e,t)=>{l(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:_.Ry().shape({name:_.Z_().required("Name is required")}),children:(0,n.jsx)(m.l0,{noValidate:!0,children:(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(S.Z,{autoFocus:!0,disabled:!!(null==u?void 0:u.key),isRequired:!0,label:"Name",name:"name",placeholder:"Enter a friendly name for your new ".concat(h.human_readable," connection")}),(0,n.jsx)(S.Z,{label:"Description",name:"description",placeholder:"Enter a description for your new ".concat(h.human_readable," connection"),type:"textarea"}),(0,n.jsx)(w.h,{isSubmitting:i,onCancelClick:()=>{c.push(d.JR)}})]})})})};let z=e=>{let{onConnectionCreated:t}=e,i=(0,p.I0)(),{errorAlert:a,successAlert:d}=(0,h.V)(),{handleError:m}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:y,connectionOption:j}=(0,o.C)(r.ZZ),[v]=(0,x.pH)(),b=async(e,n)=>{try{var s;g(!0);let n={access:c.uv.WRITE,connection_type:null==j?void 0:j.identifier,description:e.description,disabled:!1,name:e.name,key:null==y?void 0:y.key},l=await v(n).unwrap();(null===(s=l.failed)||void 0===s?void 0:s.length)>0?a(l.failed[0].message):(i((0,r.lm)(l.succeeded[0])),d("Connector successfully ".concat((null==y?void 0:y.key)?"updated":"added","!")),(null==y?void 0:y.key)||!t||t())}catch(e){m(e)}finally{g(!1)}};return(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",children:["To begin setting up your new ",j.human_readable," ","connector you must first assign a name to the connector and a description.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Once you have completed this section you can then progress onto"," ",(0,n.jsx)(s.xvT,{display:"inline-block",fontWeight:"700",children:"DSR customization"})," ","using the menu on the left hand side."]}),(0,n.jsx)(I,{defaultValues:{description:"",name:""},isSubmitting:f,onSaveClick:b})]})},R=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:a}=e,d=(0,p.I0)(),{errorAlert:m,successAlert:f}=(0,h.V)(),{handleError:g}=(0,u.H)(),[v,b]=(0,l.useState)(!1),{connection:k,connectionOption:C}=(0,o.C)(r.ZZ),[_]=(0,x.pL)(),[S]=(0,x.pH)(),[w]=(0,x.Du)(),I=async(e,s)=>{try{if(b(!0),k){var a;let i={access:c.uv.WRITE,connection_type:k.connection_type,description:e.description,disabled:!1,key:k.key,name:e.name},s=await S(i).unwrap();if((null===(a=s.failed)||void 0===a?void 0:a.length)>0)m(s.failed[0].message);else{d((0,r.lm)(s.succeeded[0]));let i={connection_key:k.key,secrets:{}};Object.entries(t.properties).forEach(t=>{i.secrets[t[0]]=e[t[0]]});let a=await w(i).unwrap();"failed"===a.test_status?m((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",a.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",a.failure_reason]})):f("Connector successfully updated!")}}else{let n={description:e.description,name:e.name,instance_key:(0,j.E)(e.instance_key),saas_connector_type:C.identifier,secrets:{}};Object.entries(t.properties).forEach(t=>{n.secrets[t[0]]=e[t[0]]});let s=await _(n).unwrap();d((0,r.lm)(s.connection)),f("Connector successfully added!"),null==i||i()}}catch(e){g(e)}finally{b(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",C.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."]}),(0,n.jsx)(y,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:v,onSaveClick:I,onTestConnectionClick:a})]})};var Z=i(36768);let T=e=>{var t,i;let{response:a}=e,{connectionOption:l}=(0,o.C)(r.ZZ);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{color:"gray.100"}),(0,n.jsxs)(s.gCW,{align:"flex-start",mt:"16px",children:[(null===(t=a.data)||void 0===t?void 0:t.test_status)==="succeeded"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsxs)(s.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Successfully connected to ",l.human_readable]}),(0,n.jsx)(s.Vp9,{colorScheme:"green",size:"sm",variant:"solid",children:"Success"})]}),(0,n.jsx)(s.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(a.fulfilledTimeStamp)}),(0,n.jsx)(s.xuv,{bg:"green.100",border:"1px solid",borderColor:"green.300",color:"green.700",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(s.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(s.StI,{}),(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"green.500",fontWeight:"semibold",size:"xs",children:"Success message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.msg})]})]})})]}),(null===(i=a.data)||void 0===i?void 0:i.test_status)==="failed"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsxs)(s.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Output error to ",l.human_readable]}),(0,n.jsx)(s.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(s.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(a.fulfilledTimeStamp)}),(0,n.jsx)(s.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(s.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(s.f9v,{}),(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.failure_reason}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.msg})]})]})})]})]})]})},W=e=>{let{onConnectionCreated:t}=e,i=(0,a.useRouter)(),{connectionOption:u}=(0,o.C)(r.ZZ),h=u&&u.type===c.Zi.MANUAL,{data:x,isFetching:p,isLoading:m,isSuccess:f}=(0,r.n3)(u.identifier,{skip:h}),[g,y]=(0,l.useState)(),j=e=>{y(e)},v=(0,l.useCallback)(()=>{i.push(d.JR)},[i]),k=(0,l.useCallback)(()=>{switch(null==u?void 0:u.type){case c.Zi.DATABASE:if(f&&x)return(0,n.jsx)(b,{data:x,onConnectionCreated:t,onTestConnectionClick:j});break;case c.Zi.MANUAL:return(0,n.jsx)(z,{onConnectionCreated:t});case c.Zi.SAAS:if(f&&x)return(0,n.jsx)(R,{data:x,onConnectionCreated:t,onTestConnectionClick:j});break;case c.Zi.EMAIL:if(f&&x)return(0,n.jsx)(C,{data:x,onConnectionCreated:v,onTestEmail:j})}},[null==u?void 0:u.type,x,f,t,v]);return(0,n.jsxs)(s.kCb,{gap:"97px",children:[(0,n.jsxs)(s.gCW,{w:"579px",gap:"16px",align:"stretch",children:[(p||m)&&(0,n.jsx)(s.M5Y,{children:(0,n.jsx)(s.$jN,{})}),k()]}),g&&(0,n.jsxs)(s.Rg9,{in:!0,children:[" ",(0,n.jsx)(s.xuv,{mt:"16px",maxW:"528px",w:"fit-content",children:(0,n.jsx)(T,{response:g})})]})]})}},4894:function(e,t,i){i.d(t,{Z:function(){return v}});var n=i(24246),r=i(53359),s=i(69728),a=i(7564),l=i(52615),o=i(86677),d=i(27378),c=i(44296),u=i(60136),h=i(87162),x=i(52987),p=i(75139),m=i(66527),f=i(12719),g=i(50558),y=e=>{let{data:t=[],isSubmitting:i=!1,onSubmit:r,onCancel:s,disabled:a}=e,o=(0,d.useRef)(null),{errorAlert:c}=(0,p.V)(),u=t.length>0?m.ZP.dump(t):void 0,[h,y]=(0,d.useState)(void 0),[j,v]=(0,d.useState)(!1),[b,k]=(0,d.useState)(!u),C=(0,l.qY0)(),{data:_}=(0,x.NR)(),[S,w]=(0,d.useState)([]),I=e=>{m.ZP.load(e,{json:!0}),y(void 0)},z=()=>{let e=o.current.getValue();r(m.ZP.load(e,{json:!0})),w([])};return(0,n.jsxs)(l.kCb,{gap:"97px",children:[(0,n.jsxs)(l.gCW,{align:"stretch",w:"800px",children:[(0,n.jsx)(f.M,{defaultLanguage:"yaml",defaultValue:u,height:"calc(100vh - 526px)",onChange:e=>{try{v(!0),I(e),k(!!(!e||""===e.trim()))}catch(e){(0,f.F)(e)?y(e):c("Could not parse the supplied YAML")}},onMount:(e,t)=>{o.current=e,o.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0},readOnly:a},theme:"light"}),(0,n.jsxs)(l.Ugi,{justifyContent:"flex-end",pr:6,children:[s&&(0,n.jsx)(l.wpx,{onClick:s,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",disabled:a||b||!!h||i,loading:i,onClick:()=>{if(_&&_.length){let e=o.current.getValue(),t=_.filter(t=>e.includes("fides_key: ".concat(t.fides_key,"\n"))).map(e=>e.fides_key);if(w(t),t.length){C.onOpen();return}}z()},htmlType:"submit","data-testid":"save-yaml-btn",children:"Save"})]})]}),j&&(b||h)&&(0,n.jsx)(g.Z,{isEmptyState:b,yamlError:h}),(0,n.jsx)(l.cVQ,{isOpen:C.isOpen,onClose:C.onClose,onConfirm:()=>{z(),C.onClose()},title:"Overwrite dataset",message:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xvT,{children:["You are about to overwrite the dataset",S.length>1?"s":""," ",S.map((e,t)=>{let i=t===S.length-1;return(0,n.jsxs)(d.Fragment,{children:[(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),i?".":", "]},e)})]}),(0,n.jsx)(l.xvT,{children:"Are you sure you would like to continue?"})]})})]})};let j=e=>{let{children:t,...i}=e;return(0,n.jsx)(l.xvT,{color:"gray.700",fontSize:"14px",...i,children:t})};var v=()=>{let e=(0,o.useRouter)(),{errorAlert:t,successAlert:i}=(0,r.V)(),{handleError:p}=(0,r.H)(),[m,f]=(0,d.useState)(!1),{connection:g}=(0,c.C)(s.ZZ),{data:v,isFetching:b,isLoading:k,isSuccess:C}=(0,a.Eg)(g.key),[_]=(0,a.Lz)(),[S]=(0,x.EG)(),{data:w,isLoading:I,error:z}=(0,x.NR)(),[R,Z]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{v&&v.items.length&&Z(v.items[0].ctl_dataset.fides_key)},[v]);let T=async n=>{var r;let s={connection_key:null==g?void 0:g.key,dataset_pairs:n},a=await _(s).unwrap();(null===(r=a.failed)||void 0===r?void 0:r.length)>0?t(a.failed[0].message):i("Dataset successfully updated!"),e.push(h.JR)},W=async()=>{if(R)try{let e=R;v&&v.items.length&&(e=v.items[0].fides_key);let t=[{fides_key:e,ctl_dataset_fides_key:R}];T(t)}catch(e){p(e)}},F=async e=>{try{f(!0);let i=Array.isArray(e)?e:[e],n=await S(i);if("error"in n){let e=(0,u.e$)(n.error);t(e);return}let r=i.map(e=>({fides_key:e.fides_key,ctl_dataset_fides_key:e.fides_key}));if(v&&v.items.length){let{items:e}=v;r=e.map((e,t)=>({fides_key:e.fides_key,ctl_dataset_fides_key:i[t].fides_key}))}T(r)}catch(e){p(e)}finally{f(!1)}},A=""!==R&&void 0!==R;if(b||k||I&&!z)return(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})});let E=w&&w.length;return(0,n.jsxs)(l.gCW,{alignItems:"left",gap:4,children:[z&&(0,n.jsx)(j,{color:"red",children:"There was a problem loading existing datasets, please try again."}),(0,n.jsxs)(l.gCW,{alignItems:"flex-start",children:[E&&(0,n.jsx)("div",{children:(0,n.jsx)(l.gCW,{alignSelf:"start",gap:4,children:(0,n.jsxs)(l.xuv,{"data-testid":"dataset-selector-section",children:[(0,n.jsx)(j,{mb:4,children:"Choose a dataset to associate with this connector."}),(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.WPr,{allowClear:!0,options:w.map(e=>({label:e.fides_key,value:e.fides_key})),className:"w-full",placeholder:"Select",onChange:e=>Z(e),value:R,"data-testid":"dataset-selector"}),(0,n.jsx)(l.wpx,{onClick:W,type:"primary",className:"self-start",disabled:!A,"data-testid":"save-dataset-link-btn",children:"Save"})]})]})})}),E&&C&&(null==v?void 0:v.items)&&(0,n.jsx)(l.htM,{plain:!0,children:"or"}),C&&(null==v?void 0:v.items)&&(0,n.jsxs)(l.xuv,{"data-testid":"yaml-editor-section",children:[(0,n.jsx)(j,{mb:4,children:"View your dataset YAML below!"}),(0,n.jsx)(y,{data:v.items.map(e=>e.ctl_dataset),isSubmitting:m,onSubmit:F,disabled:A})]})]})]})}},9699:function(e,t,i){var n=i(24246),r=i(52615),s=i(34090);t.Z=e=>{let{disabled:t=!1,displayHelpIcon:i=!0,helpIconVisibility:a=!1,isRequired:l=!1,label:o,placeholder:d,type:c="text",...u}=e,{id:h,autoFocus:x}=u,[p,m]=(0,s.U$)(u);return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:l,isInvalid:!!(m.error&&m.touched),children:[o&&(0,n.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:h,minWidth:"150px",children:o}),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:["number"===c&&(0,n.jsxs)(r.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(r.zuI,{...p,autoComplete:"off",autoFocus:x}),(0,n.jsxs)(r.FiK,{children:[(0,n.jsx)(r.WQu,{}),(0,n.jsx)(r.Y_d,{})]})]}),"text"===c&&(0,n.jsx)(r.IIB,{...p,autoComplete:"off",autoFocus:x,color:"gray.700",isDisabled:t,placeholder:d,size:"sm"}),"textarea"===c&&(0,n.jsx)(r.gxH,{...p,autoComplete:"off",autoFocus:x,color:"gray.700",placeholder:d,resize:"none",size:"sm",value:p.value||""}),(0,n.jsx)(r.J1D,{children:m.error})]}),i&&(0,n.jsx)(r.kCb,{alignContent:"center",h:"32px",visibility:a?"visible":"hidden",children:(0,n.jsx)(r.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})]})}},47418:function(e,t,i){i.d(t,{h:function(){return s}});var n=i(24246),r=i(52615);i(27378);let s=e=>{let{isSubmitting:t=!1,onCancelClick:i}=e;return(0,n.jsxs)(r.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(r.zxk,{onClick:i,variant:"outline",children:"Cancel"}),(0,n.jsx)(r.zxk,{bg:"primary.800",color:"white",isDisabled:t,isLoading:t,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})}},89468:function(e,t,i){i.d(t,{Z:function(){return v}});var n=i(24246),r=i(53359),s=i(69728),a=i(7564),l=i(52615),o=i(86677),d=i(27378),c=i(44296),u=i(87162),h=i(34090),x=i(59389),p=i(78973),m=i(47411),f=i(35249),g=i(9699),y=i(47418),j=e=>{let{data:t=[],isSubmitting:i=!1,onSaveClick:s}=e,{isLoading:a}=(0,m.MO)(),d=(0,c.C)(f.qb),j=(0,o.useRouter)(),{errorAlert:v}=(0,r.V)(),b=()=>{j.push(u.JR)};return a?null:(0,n.jsx)(h.J9,{enableReinitialize:!0,initialValues:{fields:t.length>0?t:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,t)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){v("PII Field must be unique");return}s(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:x.Ry({fields:x.IX().of(x.Ry().shape({pii_field:x.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:x.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:x.IX(x.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(h.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(h.F2,{name:"fields",render:t=>{let{fields:r}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(l.xuv,{visibility:"hidden",children:(0,n.jsx)(l.lr0,{})})]}),(0,n.jsx)(l.xuv,{children:r&&r.length>0?r.map((e,i)=>(0,n.jsxs)(l.Ugi,{mt:i>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{autoFocus:0===i,displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(i,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(i,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(p.d,{name:"fields.".concat(i,".data_categories"),options:d.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:i>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>t.remove(i),_hover:{cursor:"pointer"}})})]},i)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{t.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(y.h,{isSubmitting:i,onCancelClick:b})]})}})})})})},v=()=>{let e=(0,d.useRef)(!1),t=(0,o.useRouter)(),{successAlert:i}=(0,r.V)(),{handleError:h}=(0,r.H)(),[x,p]=(0,d.useState)(!1),[m,f]=(0,d.useState)([]),{connection:g}=(0,c.C)(s.ZZ),{data:y,isFetching:v,isLoading:b,isSuccess:k}=(0,a.QV)(g.key),[C]=(0,a.jF)(),[_]=(0,a._d)(),S=async(e,n)=>{try{p(!0);let n={connection_key:null==g?void 0:g.key,body:{...e}};m.length>0?await _(n).unwrap():await C(n).unwrap(),i("DSR customization ".concat(m.length>0?"updated":"added","!")),t.push(u.JR)}catch(e){h(e)}finally{p(!1)}};return(0,d.useEffect)(()=>(e.current=!0,k&&y&&f(y.fields),()=>{e.current=!1}),[y,k]),(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",w:"572px",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."}),(v||b)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),e.current&&!b?(0,n.jsx)(j,{data:m,isSubmitting:x,onSaveClick:S}):null]})}},41164:function(e,t,i){i.d(t,{Bw:function(){return a},D4:function(){return r},Dy:function(){return o},XD:function(){return d},cz:function(){return c},hE:function(){return l},oK:function(){return s}});var n=i(76649);let r=e=>"error"in e,s=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,n.Ln)({status:"number",data:{}},e),l=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){i.d(t,{Ln:function(){return n}});let n=(e,t)=>s(e,t),r=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>s(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>s(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>s(i,t[e]));class a{static narrow(e){return new a(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof a?e.NF:e instanceof Function?e:t=>n(e,t);return new a(e=>t(e)&&i(e))}}new a(e=>!0)}}]);
|