ethyca-fides 2.62.1b2__py2.py3-none-any.whl → 2.62.1rc0__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.62.1b2.dist-info → ethyca_fides-2.62.1rc0.dist-info}/METADATA +1 -2
- {ethyca_fides-2.62.1b2.dist-info → ethyca_fides-2.62.1rc0.dist-info}/RECORD +221 -223
- fides/_version.py +3 -3
- fides/api/api/v1/endpoints/privacy_request_endpoints.py +2 -2
- fides/api/main.py +1 -0
- fides/api/models/attachment.py +10 -117
- fides/api/models/detection_discovery.py +1 -66
- fides/api/models/privacy_request/privacy_request.py +1 -40
- fides/api/service/connectors/query_configs/saas_query_config.py +8 -3
- fides/api/service/connectors/saas_connector.py +4 -7
- fides/api/service/privacy_request/dsr_package/dsr_report_builder.py +2 -4
- fides/api/service/storage/s3.py +15 -40
- fides/api/tasks/storage.py +2 -2
- fides/api/util/storage_util.py +8 -14
- fides/config/config_proxy.py +1 -0
- fides/config/execution_settings.py +4 -0
- fides/service/error_handling/__init__.py +0 -0
- fides/service/error_handling/error_handler.py +202 -0
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/K1_4-1GhwfL7h4fYYQBvB/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1327-92a38135ee8d55ec.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1817-721fdeb29c07c6be.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1904-7e5354990377a849.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{2310-6a5fb2f76f7b6491.js → 2310-0d63c66c2685e83c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3119-e441b14cdab4320e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3426-e49cb4766324b2dd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3513-293b1e54699cf3e7.js → 3513-87b54d931698986f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/355-e4340980d72b4faa.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3872-99da5bb6140ff810.js → 3872-6b828cb00fb2ce93.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/4060-9593a3f98e600487.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4121-5c3af879cdd8b3be.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4481-8398edf74aabb8ea.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4723-4c3c7a375e998c15.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5258-e000d07844eccf7e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5487-218e4847b8250fbb.js → 5487-62955c11bab63734.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5626-1b636798faad78e1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5683-44966a05fa5ad566.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5826-ce34f25ac2eeb807.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5973-56d90405c3616068.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6277-c35c8cc806f7571f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6853-0cee00c9da26a40e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{6954-04030a21a0c8cf5a.js → 6954-d02d474ba30756b2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/79-e5884e6878fc1bbb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7980-e17dda2f50ec76b8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9494-d1fd4fb83c3d4836.js → 9494-0df032fe6ee531a5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-74320abc2e9a4550.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-94950df9c97cd079.js → _app-371b155655c83a1e.js} +69 -69
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-1292fd216f2839c7.js → manual-7d789458fb296270.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-2ffc37614e9d1fa9.js → multiple-90320455052466cd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a69f8946466471aa.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-c8033d6560635046.js → add-vendors-bcc515a765c0119d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-49b9f1b56262dfdc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-fd71fb440dbe60e4.js → privacy-experience-5ef03041a530b0e2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-12f3ba4609bc2ba5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-5960170d492acb03.js → properties-ffa15d7ff64a9f05.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-b959d61c2a3682b3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-18e3faf7963962e4.js → [resourceUrn]-7ddf45ffd49533b0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-a10a0f3e6592f350.js → [projectUrn]-ecf23116a845188a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-6971531bb09dff3a.js → projects-79f8e613827c55c1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-7320524a47104798.js → [resourceUrn]-ed213bc1b7041aa2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-51d99174c8006eb5.js → resources-1f033ca5a0702018.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-4dbc71d8be9765f3.js → data-catalog-e950d41b75f86c85.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-84ead584a88ab662.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-90f1975f559fff3e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-4b820a3173f35504.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-db3853a09933097a.js → activity-beedbc38ee2b0094.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-4c526db0c30c488a.js → [resourceUrn]-f38b3ef885a29ea6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-6f27dbb7c8edc69d.js → detection-29fd0d5a73f13a00.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-562d2b8ae90dd1f0.js → [resourceUrn]-9a80241f1028c470.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-fe7f51502eda57c9.js → discovery-c58333981b1522c9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-3aaa99709d83a1f6.js → datamap-2d6f95b2769a0936.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-c08363922838022a.js → [...subfieldNames]-3536ae978741b659.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-f12df2140e309dfb.js → [collectionName]-8b5afe14cf42a4ac.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-3f564c8d6cfb03d4.js → [datasetId]-b8dca4298b5bb085.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-1e26702b1a7e0e12.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-1f0c4e2e5d0b5bf6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-b078218865a8fd28.js → [id]-ebf54ea9874c59ae.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-c39e8e2269883796.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-9db81467fa254996.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-2e6ba5382358fcf8.js → index-868b60407eae35da.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-ebc41649161f7fb9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-b89b9f68ccc69c1b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-71166bf207804754.js → messaging-5f41afae411cd8a4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-928430cd40c35ef2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-07ef58b04404479d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-595ed9f6ca438020.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-b3384299166bcd1e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{properties-4a5e8ec41574c6b5.js → properties-f00530710b699afd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-6a6016708efb5f4f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-ba15c12c89ee10f8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-0f2daeec241bd1a2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-0401208a3128fa4d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-92e8246170b492b5.js → domain-records-0daa256958675a23.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/locations-4fbab6716326060d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-b235f961f9ca39a6.js → organization-9404a6b0b2951992.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-99cd1a12ae0373b0.js → test-datasets-48be14ad09ed4133.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-01006a55ac873135.js → [id]-b03403fed4dd8805.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-45990d85a4c5739b.js → systems-ae591953b24e2fc9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-913efe5371344de6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-dc11ba29dbd4708b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-c0b2113b44f46112.js +1 -0
- fides/ui-build/static/admin/_next/static/css/b89fc4b36b501cf6.css +1 -0
- fides/ui-build/static/admin/_next/static/css/{1b227ba7eabbfe2f.css → c0c2eb63ad3e7390.css} +1 -1
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/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-preview.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
- 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/poc/ant-components.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
- fides/ui-build/static/admin/poc/forms.html +1 -1
- fides/ui-build/static/admin/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/[configuration_id]/[purpose_id].html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/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/api/alembic/migrations/versions/2263583b0e44_add_shared_monitor_config.py +0 -82
- fides/ui-build/static/admin/_next/static/chunks/1327-da0303f70d12fb20.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1817-d2543e460cec0dcb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1904-25e5d4f1b8146fb3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3119-b5e40d8d24af1e79.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3426-77fccf2c9a5e10cd.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3923-c6dcaeaa3267f254.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/401-a882199f6c94a4dc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4060-c657e58514e91e91.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4121-ec1d8faa3cf5783c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4481-9357e3930d35073b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5258-49e73e5998c01254.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5683-3d5c4194b1b1493e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-d776c0029db45971.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6277-db781b6c1dde3c84.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6853-348fe2ba132b400c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7553-0f3e9e7eaf1a8b62.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/79-d877d3bde220da44.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/796-7424eb6391142ccd.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7980-041df432c4d3a68b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-f8ea7d0127f81294.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9965-92f4a28823a5e623.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-0234733a90ed5127.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-2ba21b95aa3bb15e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-5a63fc903408412e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-80bd51f8217edae4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-67ddc090cf949af4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-07ff657ee49e5742.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-dbc8c95c22b9f2aa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-157b00d23b651d12.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-9d29dd6cf109891d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-b01f89d250ff52af.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-9fc15228581786e6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-43abc599f0768331.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-d69c9f1007e76046.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-fec150afcfeb3fb5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-2862630f0e9e484b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-35e58b5ed6b12b2b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-bb02092af39446da.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-6baa485385ce0678.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-707551df97d5eebd.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-e4df123bef1ff2b1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-2fd6b0ff9b6741fc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-3a829c53d5d723d2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/locations-4194ce716b81480d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-ec739e169cd5eafe.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-603c2bdbd8dc00ca.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-592e497369673e1a.js +0 -1
- fides/ui-build/static/admin/_next/static/css/5ded47c57dae5baf.css +0 -1
- fides/ui-build/static/admin/_next/static/ulYEH5vwbFjKDz3nI321R/_buildManifest.js +0 -1
- fides/ui-build/static/admin/poc/table-migration.html +0 -1
- {ethyca_fides-2.62.1b2.dist-info → ethyca_fides-2.62.1rc0.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.62.1b2.dist-info → ethyca_fides-2.62.1rc0.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.62.1b2.dist-info → ethyca_fides-2.62.1rc0.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.62.1b2.dist-info → ethyca_fides-2.62.1rc0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{ulYEH5vwbFjKDz3nI321R → K1_4-1GhwfL7h4fYYQBvB}/_ssgManifest.js +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1099-b652e6f9a0cd778b.js → 1099-98458e8e9ff67508.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1100-e19e94b0a6486255.js → 1100-4106d99f5e1ebd75.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2921-771dc5d9e95dc6b4.js → 2921-ca04a0476e2e56c5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3505-313087fc1744a0ca.js → 3505-e58b93f9c1cbdcad.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{69-ef4c11c574b4e6dd.js → 69-dc52e39d26a4ad14.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8433-755359b501d32eaa.js → 8433-a77c2cd1c1a6887e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8499-06ab15acbfec037c.js → 8499-34a34015c91fc38b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9327-b691be8352e31b58.js → 9327-a25347d72bfbe680.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{404-e868487119cd14fc.js → 404-c00773c4c6e930af.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-94391554a7607c5b.js → [id]-d4137bb7fdc1ac6e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-596dd2a35b455f21.js → [id]-a5a95ac63b1ce206.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-fa7f0d2639e12a5a.js → new-946ce1a2aa1500d4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-dd2a0e3b536b8b42.js → consent-7797e367dd946a18.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-111b07344f1ee9e4.js → [id]-22812f08e81bd4f3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-c41f368fb6b35de4.js → add-template-ca22869201847ccc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-3dabaf6828acb2cb.js → ant-components-173bd3ad45ea61c6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-784081c774042249.js → AntForm-4dfe984ad80927cd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-63905f2382f158cd.js → FormikAntFormItem-f790e1ea5cbc26c0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-43f6eab28eae7b56.js → FormikControlled-af9e682ec620e990.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-e4a07abc908fc9b5.js → FormikField-6ce407101daa6000.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-71a3bfb94280fc49.js → forms-9ee8cf14a93eaa4a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-42213855a0a8c209.js → configure-25a3add8e7982e43.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-d547a1da0b74f00f.js → [id]-081f13526443e0a6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-a7de6f8409a76358.js → add-property-17fb474e458b63e7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-704fc28e61b17247.js → about-177919b4ccf8f660.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-f0e9ee8756a65540.js → domains-26810d1ffedcd156.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-a4771098466af1ed.js → email-templates-eb78b645d0c1d4ea.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-8cff97fe57f42ed3.js → regulations-0a3aa951ef4a44ba.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-b124cc24b930c9e1.js → new-69176abe09cf9b52.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{webpack-3a61b934ba2fb620.js → webpack-abd3efcb23c0bb03.js} +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[79],{56358:function(e,t,n){n.d(t,{q:function(){return i}});var s=n(24246);let i=(0,n(91942).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,s.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,n){n.d(t,{Z:function(){return u}});var s=n(24246),i=n(91942),r=n(88038),a=n.n(r),o=n(86677);n(27378);var l=n(25980),c=n(90867),d=n(77830),p=()=>{let e=(0,o.useRouter)();return(0,s.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(i.xuv,{children:[(0,s.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(i.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,s.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},u=e=>{let{children:t,title:n,padded:r=!0,mainProps:d}=e,u=(0,l.hz)(),x=(0,o.useRouter)(),h="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,g=!(u.flags.privacyRequestsConfiguration&&h),{data:m}=(0,c.JE)(void 0,{skip:g}),{data:j}=(0,c.PW)(void 0,{skip:g}),f=u.flags.privacyRequestsConfiguration&&(!m||!j)&&h;return(0,s.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,s.jsxs)(a(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(i.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[f?(0,s.jsx)(p,{}):null,t]})]})}},58754:function(e,t,n){var s=n(24246),i=n(91942),r=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:c,...d}=e;return(0,s.jsxs)("div",{...d,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,s.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(i.lQT,{className:n||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,l&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,s.jsx)(r.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,t,n){n.d(t,{Tg:function(){return a}});var s=n(24246),i=n(16134),r=n(31793);let a=e=>(0,i.C)(r.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,s.jsx)(s.Fragment,{children:n}):null}},70788:function(e,t,n){n.d(t,{m:function(){return c}});var s=n(24246),i=n(91942),r=n(79894),a=n.n(r),o=n(27378);let{Text:l}=i.AntTypography,c=e=>{let{items:t,...n}=e,r=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let r=n===t.length-1,o={...e},c=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,s.jsx)(l,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:o.title})),c)?o.title=(0,s.jsx)(i.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,s.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,s.jsx)(i.zrq,{items:r,...n})}},3642:function(e,t,n){var s=n(24246),i=n(91942),r=n(86677),a=n.n(r),o=n(27378),l=n(812),c=n(58452),d=n(77830),p=n(19904),u=n(46628),x=n(98795),h=n(61317);t.Z=e=>{let{property:t,triggerComponent:n}=e,r=(0,i.pmc)(),g=(0,i.qY0)(),[m]=(0,x.YW)(),j=t.experiences.length>0,f=async()=>{g.onClose();let e=await m(t.id);if((0,l.D4)(e)){r((0,u.Vo)((0,l.e$)(e.error)));return}a().push("".concat(d.ru)),r((0,u.t5)("Property ".concat(t.name," deleted successfully")))};return(0,s.jsxs)(p.ZP,{scopes:[h.Sh.PROPERTY_DELETE],children:[(0,s.jsx)(i.esZ,{title:j?"All of the experiences on this property must be unlinked before the property can be deleted.":void 0,placement:"right",children:(0,s.jsx)("span",{children:o.cloneElement(n,{onClick:e=>{e.stopPropagation(),j||g.onOpen()},disabled:j})})}),(0,s.jsx)(c.Z,{isOpen:g.isOpen,onClose:g.onClose,onConfirm:f,title:"Delete ".concat(t.name),message:(0,s.jsxs)(i.xvT,{color:"gray.500",children:["You are about to delete property ",t.name,". This action is not reversible and will result in ",t.name," no longer being available for your data governance. Are you sure you want to proceed?"]}),continueButtonText:"Ok",isCentered:!0,icon:(0,s.jsx)(i.aNP,{})})]})}},25783:function(e,t,n){n.d(t,{V:function(){return M}});var s=n(24246),i=n(92222),r=n(59003),a=n(14481),o=n(91942),l=n(98784),c=n.n(l),d=n(86677),p=n(27378),u=n(77830),x=n(19904),h=n(32885),g=n(98795),m=n(61317),j=e=>{let{buttonLabel:t,buttonProps:n}=e,i=(0,d.useRouter)();return(0,s.jsx)(o.wpx,{onClick:()=>i.push(u.B9),"data-testid":"add-property-button",...n,children:t})},f=n(56358),y=n(88340),C=n(25980),b=n(14048);let v="{privacy-center-hostname-and-path}",w="{property-unique-id}",P='<script src="https://'.concat(v,"/fides.js?property_id=").concat(w,'"></script>'),R="<script>Fides.gtm()</script>";var T=e=>{let{property:t}=e,n=(0,o.qY0)(),i=(0,p.useRef)(null),{fidesCloud:r}=(0,C.hz)(),{data:a,isSuccess:l}=(0,h.Vh)(void 0,{skip:!r}),c=(0,p.useMemo)(()=>{let e=P.replace(w,t.id.toString());return r&&l&&(null==a?void 0:a.privacy_center_url)&&e.replace(v,a.privacy_center_url),e},[null==a?void 0:a.privacy_center_url,r,l,t]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.wpx,{"aria-label":"Install property",size:"small",className:"mr-[10px]",icon:(0,s.jsx)(b.A5,{}),onClick:e=>{e.stopPropagation(),n.onOpen()}}),(0,s.jsxs)(o.u_l,{isOpen:n.isOpen,onClose:n.onClose,isCentered:!0,size:"xl",initialFocusRef:i,children:[(0,s.jsx)(o.ZAr,{}),(0,s.jsxs)(o.hzk,{"data-testid":"copy-js-tag-modal",children:[(0,s.jsx)(o.xBx,{tabIndex:-1,ref:i,pb:0,children:"Install Fides Consent Manager"}),(0,s.jsx)(o.fef,{pt:3,pb:6,fontSize:"14px",fontWeight:500,children:(0,s.jsxs)(o.Kqy,{spacing:3,children:[(0,s.jsxs)(o.xvT,{children:["Copy the code below and paste it onto every page of the"," ",t.name," property."]}),(0,s.jsxs)(o.xvT,{children:["1. Paste this code as high in the ",(0,s.jsx)("b",{children:"<head>"})," of the page as possible:"]}),(0,s.jsxs)(o.EKh,{display:"flex",justifyContent:"space-between",alignItems:"top",p:0,children:[(0,s.jsx)(o.xvT,{p:4,children:c}),(0,s.jsx)(y.Z,{copyText:c})]}),(0,s.jsx)(o.xvT,{children:"2. Optionally, you can enable Google Tag Manager for managing tags on your website by including the script tag below along with the Fides.js tag. Place it below the Fides.js script tag."}),(0,s.jsxs)(o.EKh,{display:"flex",justifyContent:"space-between",alignItems:"center",p:0,children:[(0,s.jsx)(o.xvT,{p:4,children:R}),(0,s.jsx)(y.Z,{copyText:R})]}),(0,s.jsxs)(o.xvT,{children:["For more information about adding a JavaScript tag to your website, please visit"," ",(0,s.jsx)(o.rUS,{color:"complimentary.500",href:"https://docs.ethyca.com/tutorials/consent-management-configuration/install-fides#install-fidesjs-script-on-your-website",isExternal:!0,children:"docs.ethyca.com"})]})]})})]})]})]})},k=n(3642),E=e=>{let{property:t}=e,n=(0,d.useRouter)(),i=()=>{n.push("".concat(u.ru,"/").concat(t.id))};return(0,s.jsxs)(o.xuv,{py:2,children:[(0,s.jsx)(T,{property:t}),(0,s.jsx)(x.ZP,{scopes:[m.Sh.PROPERTY_UPDATE],children:(0,s.jsx)(o.wpx,{"aria-label":"Edit property","data-testid":"edit-property-button",size:"small",className:"mr-[10px]",icon:(0,s.jsx)(o.dY8,{}),onClick:e=>{e.stopPropagation(),i()}})}),(0,s.jsx)(k.Z,{property:t,triggerComponent:(0,s.jsx)(o.wpx,{"aria-label":"Delete property","data-testid":"delete-property-button",size:"small",className:"mr-[10px]",icon:(0,s.jsx)(f.q,{})})})]})};let z=(0,i.Cl)(),Z={items:[],total:0,page:1,size:25,pages:1},H=()=>(0,s.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,s.jsxs)(o.gCW,{children:[(0,s.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No properties found."}),(0,s.jsxs)(x.ZP,{scopes:[m.Sh.PROPERTY_CREATE],children:[(0,s.jsx)(o.xvT,{fontSize:"sm",children:"Click “Add property” to add your first property to Fides."}),(0,s.jsx)(j,{buttonLabel:"Add property",buttonProps:{type:"primary"}})]})]})}),M=()=>{let{isLoading:e}=(0,h.x8)(),t=(0,x.Tg)([m.Sh.PROPERTY_UPDATE]),{PAGE_SIZES:n,pageSize:l,setPageSize:f,onPreviousPageClick:y,isPreviousPageDisabled:C,onNextPageClick:b,isNextPageDisabled:v,startRange:w,endRange:P,pageIndex:R,setTotalPages:T,resetPageIndexToDefault:k}=(0,a.oi)(),M=(0,d.useRouter)(),[V,_]=(0,p.useState)(),N=(0,p.useCallback)(e=>{k(),_(e)},[k,_]),{isFetching:S,isLoading:q,data:O}=(0,g.gz)({page:R,size:l,search:V}),{items:A,total:F,pages:I}=(0,p.useMemo)(()=>O||Z,[O]);(0,p.useEffect)(()=>{T(I)},[I,T]);let L=(0,p.useMemo)(()=>[z.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(a.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(a.Rr,{value:"Property",...e})}),z.accessor(e=>e.type,{id:"type",cell:e=>(0,s.jsx)(a.G3,{value:c().capitalize(e.getValue())}),header:e=>(0,s.jsx)(a.Rr,{value:"Type",...e})}),z.accessor(e=>e.experiences.map(e=>e.name),{id:"experiences",cell:e=>(0,s.jsx)(a.WP,{suffix:"experiences",value:e.getValue(),...e}),header:e=>(0,s.jsx)(a.Rr,{value:"Experience",...e}),meta:{showHeaderMenu:!0}}),z.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e;return(0,s.jsx)(E,{property:t.original})}})],[]),W=(0,r.b7)({getCoreRowModel:(0,i.sC)(),getGroupedRowModel:(0,i.qe)(),getExpandedRowModel:(0,i.rV)(),columns:L,manualPagination:!0,data:A,state:{expanded:!0},columnResizeMode:"onChange"});return q||e?(0,s.jsx)(a.I4,{rowHeight:36,numRows:15}):(0,s.jsx)("div",{children:(0,s.jsxs)(o.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,s.jsxs)(a.Q$,{children:[(0,s.jsx)(a.HO,{globalFilter:V,setGlobalFilter:N,placeholder:"Search property"}),(0,s.jsx)(o.Ugi,{alignItems:"center",spacing:4,children:(0,s.jsx)(x.ZP,{scopes:[m.Sh.PROPERTY_CREATE],children:(0,s.jsx)(j,{buttonLabel:"Add property"})})})]}),(0,s.jsx)(a.ZK,{tableInstance:W,onRowClick:e=>{t&&M.push({pathname:u.D3,query:{id:e.id}})},emptyTableNotice:(0,s.jsx)(H,{})}),(0,s.jsx)(a.s8,{totalRows:F||0,pageSizes:n,setPageSize:f,onPreviousPageClick:y,isPreviousPageDisabled:C||S,onNextPageClick:b,isNextPageDisabled:v||S,startRange:w,endRange:P})]})})}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[796],{77213:function(e,t,n){n.d(t,{Z:function(){return u}});var i=n(24246),l=n(91942),s=n(88038),o=n.n(s),a=n(86677);n(27378);var r=n(25980),d=n(90867),c=n(77830),g=()=>{let e=(0,a.useRouter)();return(0,i.jsx)(l.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)(l.xuv,{children:[(0,i.jsxs)(l.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(l.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(l.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(l.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},u=e=>{let{children:t,title:n,padded:s=!0,mainProps:c}=e,u=(0,r.hz)(),h=(0,a.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,m=!(u.flags.privacyRequestsConfiguration&&x),{data:p}=(0,d.JE)(void 0,{skip:m}),{data:j}=(0,d.PW)(void 0,{skip:m}),f=u.flags.privacyRequestsConfiguration&&(!p||!j)&&x;return(0,i.jsxs)(l.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(o(),{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)(l.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[f?(0,i.jsx)(g,{}):null,t]})]})}},58754:function(e,t,n){var i=n(24246),l=n(91942),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:o=!0,children:a,rightContent:r,style:d,...c}=e;return(0,i.jsxs)("div",{...c,style:o?{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)(l.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(l.lQT,{className:n||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,r&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:r})]}),!!n&&(0,i.jsx)(s.m,{className:a?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),a]})}},70788:function(e,t,n){n.d(t,{m:function(){return d}});var i=n(24246),l=n(91942),s=n(79894),o=n.n(s),a=n(27378);let{Text:r}=l.AntTypography,d=e=>{let{items:t,...n}=e,s=(0,a.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,a={...e},d=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,i.jsx)(r,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:a.title})),d)?a.title=(0,i.jsx)(l.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)(o(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,i.jsx)(l.zrq,{items:s,...n})}},15826:function(e,t,n){n.d(t,{$:function(){return S}});var i=n(24246),l=n(92222),s=n(59003),o=n(25980),a=n(812),r=n(14481),d=n(46628),c=n(91942),g=n(86677),u=n(27378),h=n(16134),x=n(58452),m=n(77830),p=n(23923),j=n(32885);let f=e=>{let{onChange:t,displayText:n,isChecked:l,value:s}=e;return(0,i.jsx)(c.XZJ,{id:"checkbox-".concat(s),value:s,height:"20px",mb:3,isChecked:l,onChange:t,colorScheme:"complimentary",mr:5,children:(0,i.jsx)(c.xvT,{fontSize:"sm",lineHeight:5,height:"20px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",children:n})},s)},b={GVL:!1,AC:!1,COMPASS:!1};var v=e=>{let{isOpen:t,onClose:n,tableInstance:l}=e,[s,o]=(0,u.useState)(b);return(0,u.useMemo)(()=>{let e={id:"vendor_id",value:[]};s.GVL&&e.value.push("gvl"),s.AC&&e.value.push("gacp"),l.setColumnFilters([e])},[s,l]),(0,i.jsxs)(c.u_l,{isOpen:t,onClose:n,isCentered:!0,size:"2xl",children:[(0,i.jsx)(c.ZAr,{}),(0,i.jsxs)(c.hzk,{children:[(0,i.jsx)(c.xBx,{children:"Filters"}),(0,i.jsx)(c.olH,{}),(0,i.jsx)(c.izJ,{}),(0,i.jsxs)(c.fef,{maxH:"85vh",px:6,py:4,overflowX:"auto",children:[(0,i.jsx)(c.xvT,{fontSize:"md",fontWeight:"bold",mb:2,children:"Sources"}),(0,i.jsx)(f,{onChange:()=>{o(e=>({...e,GVL:!e.GVL}))},displayText:a.iC.gvl.fullName,isChecked:s.GVL,value:"gvl"}),(0,i.jsx)(f,{onChange:()=>{o(e=>({...e,AC:!e.AC}))},displayText:a.iC.gacp.fullName,isChecked:s.AC,value:"gacp"})]}),(0,i.jsx)(c.mzw,{children:(0,i.jsxs)(c.xuv,{display:"flex",justifyContent:"space-between",width:"100%",children:[(0,i.jsx)(c.wpx,{onClick:()=>{l.setColumnFilters([]),o(b)},className:"mr-3 grow",children:"Reset Filters"}),(0,i.jsx)(c.wpx,{"data-testid":"filter-done-btn",type:"primary",onClick:n,className:"grow",children:"Done"})]})})]})]})};let C=e=>{var t;let{value:n}=e,l=(0,a.cj)(n),s=null!==(t=a.iC[l])&&void 0!==t?t:{label:"",fullName:""};return(0,i.jsx)(c.kCb,{alignItems:"center",justifyContent:"center",height:"100%",mr:"2",children:(0,i.jsx)(c.esZ,{title:s.fullName,children:(0,i.jsx)(c.j8w,{children:s.label})})})},w=(0,l.Cl)(),y=()=>(0,i.jsxs)(c.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:[(0,i.jsxs)(c.gCW,{children:[(0,i.jsx)(c.xvT,{fontSize:"md",fontWeight:"600",children:"No results found."}),(0,i.jsx)(c.xvT,{fontSize:"sm",children:'Can\'t find the vendor you are looking for? Add custom systems or unlisted\n vendors by selecting the "Add custom vendor" button below.'})]}),(0,i.jsx)(p.Z,{buttonLabel:"Add custom vendor",buttonProps:{type:"primary"}})]}),S=e=>{let{redirectRoute:t}=e,n="Vendor",f=(0,c.pmc)(),{dictionaryService:b,tcf:S}=(0,o.hz)(),{isLoading:k}=(0,j.x8)(),R=(0,g.useRouter)(),{isLoading:L}=(0,j.iN)(void 0,{skip:!b}),[z,{isLoading:N,isSuccess:I}]=(0,j.Qk)(),_=(0,h.C)(j.gG),[A,F]=(0,u.useState)(),{isOpen:T,onOpen:P,onClose:M}=(0,c.qY0)(),{isOpen:W,onClose:G,onOpen:O}=(0,c.qY0)(),[V,Z]=(0,u.useState)(!1),q=_.every(e=>e.linked_system),E=(0,u.useMemo)(()=>[w.display({id:"select",header:e=>{let{table:t}=e;return(0,i.jsx)(r.k,{dataTestId:"select-page-checkbox",isChecked:t.getIsAllPageRowsSelected(),isDisabled:q||t.getPaginationRowModel().rows.filter(e=>e.original.linked_system).length===t.getState().pagination.pageSize,isIndeterminate:t.getPaginationRowModel().rows.filter(e=>e.getCanSelect()).some(e=>!e.getIsSelected()),onChange:()=>{t.setRowSelection(e=>{let n={...e};return t.getRowModel().rows.forEach(e=>{e.getCanSelect()&&(n[e.id]=!n[e.id])}),n}),Z(e=>!e)}})},cell:e=>{let{row:t}=e;return(0,i.jsx)(r.k,{isChecked:t.getIsSelected(),isDisabled:!t.getCanSelect(),isIndeterminate:t.getIsSomeSelected(),onChange:t.getToggleSelectedHandler()})}}),w.accessor(e=>e.name,{id:"name",cell:e=>(0,i.jsx)(r.G3,{value:e.getValue()}),header:e=>(0,i.jsx)(r.Rr,{value:n,...e})}),w.accessor(e=>e.vendor_id,{id:"vendor_id",cell:e=>(0,i.jsx)(C,{value:e.getValue()}),header:e=>(0,i.jsx)(r.Rr,{value:"Source",...e}),enableColumnFilter:S,filterFn:"arrIncludesSome"})],[q,n,S]),H=(0,s.b7)({columns:E,data:_,getCoreRowModel:(0,l.sC)(),getSortedRowModel:(0,l.tj)(),getFilteredRowModel:(0,l.vL)(),getPaginationRowModel:(0,l.G_)(),onGlobalFilterChange:F,enableRowSelection:e=>!e.original.linked_system,enableSorting:!0,enableGlobalFilter:!0,state:{globalFilter:A,columnVisibility:{vendor_id:S}},initialState:{pagination:{pageSize:r.W3[0]},columnSizing:{select:0,vendor_id:0}},enableColumnResizing:!0,columnResizeMode:"onChange"});(0,u.useEffect)(()=>{let e={};_.forEach((t,n)=>{t.linked_system&&(e[n]=!0)}),Object.keys(e).length&&H.setRowSelection(e)},[_,H]);let{totalRows:D,onPreviousPageClick:B,isPreviousPageDisabled:Y,onNextPageClick:$,isNextPageDisabled:J,setPageSize:Q,startRange:X,endRange:K}=(0,r.bX)(H),U=async()=>{let e=H.getSelectedRowModel().rows.filter(e=>!e.original.linked_system).map(e=>e.original.vendor_id);if(e.length>0){let i=await z(e);R.push(t),(0,a.D4)(i)?f((0,d.Vo)((0,a.e$)(i.error))):f((0,d.t5)("Successfully added ".concat(e.length," ").concat(n.toLocaleLowerCase()).concat(e.length>1?"s":"")))}},ee=H.getSelectedRowModel().rows.some(e=>!e.original.linked_system);if(!b&&!k)return R.push(m.gp),null;if(N||I)return(0,i.jsx)(c.kCb,{height:"100%",justifyContent:"center",alignItems:"center",children:(0,i.jsx)(c.$jN,{})});if(L)return(0,i.jsx)(r.I4,{rowHeight:36,numRows:15});let et=q?"All ".concat(n.toLocaleLowerCase()," have already been added"):"Select a ".concat(n.toLocaleLowerCase()," "),en=H.getSelectedRowModel().rows.filter(e=>!e.original.linked_system).length,ei=H.getState().columnFilters.length>0?H.getState().columnFilters.filter(e=>"vendor_id"===e.id)[0].value.length:0;return(0,i.jsxs)(c.kCb,{flex:1,direction:"column",overflow:"auto","data-testid":"add-multiple-systems-tbl",children:[(0,i.jsx)(x.Z,{isOpen:W,isCentered:!0,onCancel:G,onClose:G,onConfirm:U,title:"Confirmation",message:"You are about to add ".concat(en.toLocaleString("en")," ").concat(n.toLocaleLowerCase()).concat(en>1?"s":"")}),(0,i.jsx)(v,{isOpen:T,onClose:M,tableInstance:H}),(0,i.jsxs)(r.Q$,{children:[(0,i.jsxs)(c.kCb,{alignItems:"center",grow:1,children:[(0,i.jsx)(c.xuv,{maxW:"420px",width:"100%",children:(0,i.jsx)(r.HO,{globalFilter:A,setGlobalFilter:F,placeholder:"Search"})}),en>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(c.xvT,{fontWeight:"700",fontSize:"sm",lineHeight:"2",ml:4,children:[en.toLocaleString("en")," selected"]}),(0,i.jsx)(c.esZ,{title:et,children:(0,i.jsx)(c.wpx,{onClick:O,"data-testid":"add-multiple-systems-btn",disabled:!ee,className:"ml-4",children:"Add"})})]}):null]}),(0,i.jsxs)(c.Ugi,{spacing:4,alignItems:"center",children:[(0,i.jsx)(p.Z,{buttonLabel:"Add custom vendor"}),S?(0,i.jsx)("span",{children:(0,i.jsxs)(c.wpx,{onClick:P,"data-testid":"filter-multiple-systems-btn",children:["Filter",ei>0?(0,i.jsx)(c.j8w,{className:"mr-0",children:ei}):null]})}):null]})]}),(0,i.jsx)(r.ZK,{tableInstance:H,rowActionBar:(0,i.jsx)(r.AA,{tableInstance:H,selectedRows:en,isOpen:V}),renderRowTooltipLabel:e=>{if(!e.getCanSelect())return"This vendor has already been added. You can view the properties of this vendor by going to the System Inventory."},emptyTableNotice:(0,i.jsx)(y,{})}),(0,i.jsx)(r.s8,{pageSizes:r.W3,totalRows:D||0,onPreviousPageClick:B,isPreviousPageDisabled:Y,onNextPageClick:$,isNextPageDisabled:J,setPageSize:Q,startRange:X,endRange:K})]})}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7980],{58754:function(e,t,i){var l=i(24246),n=i(91942),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:s=!0,children:a,rightContent:o,style:d,...u}=e;return(0,l.jsxs)("div",{...u,style:s?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,l.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,l.jsx)(n.lQT,{className:i||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,l.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,l.jsx)(r.m,{className:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},94799:function(e,t,i){i.d(t,{k:function(){return r}});var l=i(76649);let n=e=>(0,l.Ln)({id:"string"},e),r=e=>(null!=e?e:[]).filter(n)},30320:function(e,t,i){i.d(t,{m:function(){return o}});var l=i(27378),n=i(25980),r=i(14047),s=i(32885),a=i(94799);let o=e=>{let{resourceFidesKey:t,resourceType:i}=e,{errorAlert:o}=(0,r.V)(),{plus:d}=(0,n.hz)(),u=(0,l.useMemo)(()=>null!=t?t:"",[]),c=(0,s.YU)(!0,{skip:!d}),p=(0,s.VN)(i,{skip:!d}),{data:x,isLoading:m,error:f,isError:h}=(0,s.PV)(null!=t?t:"",{skip:""!==u&&!(d&&u)}),[g]=(0,s._D)(),v=c.isLoading||p.isLoading||m,_=(0,l.useMemo)(()=>new Map((0,a.k)(c.data).map(e=>{var t;return[e.id,{...e,options:(null!==(t=e.allowed_values)&&void 0!==t?t:[]).map(e=>({value:e,label:e}))}]})),[c.data]),j=(0,l.useMemo)(()=>{var e;return null===(e=p.data)||void 0===e?void 0:e.filter(e=>e.active)},[p.data]),C=(0,l.useMemo)(()=>new Map((0,a.k)(j).map(e=>[e.id,e])),[j]),b=(0,l.useMemo)(()=>h&&(null==f?void 0:f.status)===404?new Map:new Map((0,a.k)(x).map(e=>[e.custom_field_definition_id,e])),[x,h,f]),T=(0,l.useMemo)(()=>{let e=[...C.keys()];return e.sort(),e},[C]),y=(0,l.useMemo)(()=>{let e={};return j&&b&&j.forEach(t=>{let i=b.get(t.id||"");i&&(t.allow_list_id&&"string[]"===t.field_type?e[i.custom_field_definition_id]=i.value:e[i.custom_field_definition_id]=i.value.toString())}),e},[j,b]),A=(0,l.useCallback)(async e=>{if(!d)return;let l="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!l)return;let{customFieldValues:n}=e;if(!n||0===Object.keys(n).length)return;let r=[],s=[];T.forEach(e=>{let t=b.get(e),i=n[e];void 0===i||""===i||Array.isArray(i)&&0===i.length?(null==t?void 0:t.id)&&s.push(t.id):r.push({custom_field_definition_id:e,resource_id:l,id:null==t?void 0:t.id,value:i})});try{await g({resource_type:i,resource_id:l,upsert:r,delete:s})}catch(e){o("One or more custom fields have failed to save, please try again."),console.error(e)}},[d,b,o,t,T,g,i]);return{customFieldValues:y,definitionIdToCustomField:b,idToAllowListWithOptions:_,idToCustomFieldDefinition:C,isEnabled:d,isLoading:v,sortedCustomFieldDefinitionIds:T,upsertCustomFields:A}}},95346:function(e,t,i){i.d(t,{uc:function(){return g},Hn:function(){return o},Uv:function(){return s},C7:function(){return d},mZ:function(){return h.m}});var l,n,r,s,a=i(61317);(l=r||(r={}))[l.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",l[l.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",l[l.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",a.AL.STRING,a.AL.STRING_,(n=s||(s={})).SINGLE_SELECT="singleSelect",n.MULTIPLE_SELECT="multipleSelect",n.OPEN_TEXT="openText";let o=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Open Text",value:"openText"}],d=[{label:"taxonomy:".concat(a.P6.DATA_CATEGORY),value:a.P6.DATA_CATEGORY},{label:"taxonomy:".concat(a.P6.DATA_SUBJECT),value:a.P6.DATA_SUBJECT},{label:"taxonomy:".concat(a.P6.DATA_USE),value:a.P6.DATA_USE},{label:"".concat(a.P6.SYSTEM,":information"),value:a.P6.SYSTEM},{label:"system:data use",value:a.P6.PRIVACY_DECLARATION}];var u=i(24246),c=i(91942),p=i(34090),x=i(30234),m=i(97181),f=i(40324),h=i(30320);let g=e=>{let{resourceFidesKey:t,resourceType:i}=e,{idToAllowListWithOptions:l,idToCustomFieldDefinition:n,isEnabled:r,isLoading:s,sortedCustomFieldDefinitionIds:o}=(0,h.m)({resourceFidesKey:t,resourceType:i});return r&&0!==o.length?(0,u.jsx)(x.Z,{heading:"Custom fields",children:(0,u.jsx)(c.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,u.jsx)(c.kCb,{flexDir:"column",gap:"24px",children:s?(0,u.jsx)(c.M5Y,{children:(0,u.jsx)(c.$jN,{})}):o.length>0&&(0,u.jsx)(c.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:o.map(e=>{let t=n.get(e);if(!t)return null;let i="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===a.AL.STRING)return(0,u.jsx)(p.gN,{name:i,children:e=>{let{field:i}=e;return(0,u.jsx)(f.j0,{...i,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let r=l.get(t.allow_list_id);if(!r)return null;let{options:s}=r;return(0,u.jsx)(m.d,{name:i,allowClear:!0,mode:t.field_type!==a.AL.STRING?"multiple":void 0,label:t.name,options:s,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};i(94799)},14047:function(e,t,i){i.d(t,{H:function(){return r},V:function(){return l.V}});var l=i(84306),n=i(812);let r=()=>{let{errorAlert:e}=(0,l.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,n.Ot)(t)?i=t.data.detail:(0,n.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){i.d(t,{V:function(){return r}});var l=i(24246),n=i(91942);let r=()=>{let e=(0,n.pmc)();return{errorAlert:(t,i,r)=>{let s={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,l.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,l.jsx)(n.zMQ,{}),(0,l.jsxs)(n.xuv,{children:[i&&(0,l.jsx)(n.CdC,{children:i}),(0,l.jsx)(n.XaZ,{children:t})]}),(0,l.jsx)(n.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,s):e(s)},successAlert:(t,i,r)=>{let s={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,l.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,l.jsx)(n.zMQ,{}),(0,l.jsxs)(n.xuv,{children:[i&&(0,l.jsx)(n.CdC,{children:i}),(0,l.jsx)(n.XaZ,{children:t})]}),(0,l.jsx)(n.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,s):e(s)}}}},70788:function(e,t,i){i.d(t,{m:function(){return d}});var l=i(24246),n=i(91942),r=i(79894),s=i.n(r),a=i(27378);let{Text:o}=n.AntTypography,d=e=>{let{items:t,...i}=e,r=(0,a.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,a={...e},d=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,l.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:a.title})),d)?a.title=(0,l.jsx)(n.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,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,l.jsx)(s(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,l.jsx)(n.zrq,{items:r,...i})}},30234:function(e,t,i){var l=i(24246),n=i(91942);t.Z=e=>{let{heading:t,HeadingButton:i,children:r}=e;return(0,l.jsx)(n.Kqy,{spacing:4,children:(0,l.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,l.jsxs)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,l.jsx)(n.X6q,{as:"h3",size:"xs",children:t}),i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.LZC,{}),(0,l.jsx)(i,{})]}):null]}),(0,l.jsx)(n.Kqy,{spacing:4,px:6,py:6,children:r})]})})}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9767],{7617:function(e,t,n){n.d(t,{q:function(){return a}});var i=n(24246),r=n(91942);let a=e=>{let{label:t,isDisabled:n,...a}=e;return(0,i.jsx)(r.OK9,{"data-testid":"tab-".concat(t),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:a.fontSize,fontWeight:"500",color:"gray.500",isDisabled:n||!1,children:t})};t.Z=e=>{let{data:t,border:n="partial",...s}=e;return(0,i.jsxs)(r.mQc,{colorScheme:"complimentary",...s,children:[(0,i.jsx)(r.tdY,{width:"partial"===n?"max-content":void 0,children:t.map(e=>(0,i.jsx)(a,{label:e.label,isDisabled:e.isDisabled,fontSize:s.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))})]})}},97181:function(e,t,n){n.d(t,{d:function(){return d}});var i=n(24246),r=n(91942),a=n(34090),s=n(27378),l=n(46238),o=n(40324);let d=e=>{let{name:t,label:n,labelProps:d,tooltip:c,isRequired:u,layout:x="inline",helperText:h,...m}=e,[p,f,{setValue:g}]=(0,a.U$)(t),v=!!(f.touched&&f.error),[j,y]=(0,s.useState)("");p.value||"tags"!==m.mode&&"multiple"!==m.mode||(p.value=[]),"tags"===m.mode&&"string"==typeof p.value&&(p.value=[p.value]);let b="tags"===m.mode?(e,t)=>e?e.value!==j||p.value.includes(j)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(j,'"'):void 0:m.optionRender||void 0,C=e=>{y(e),m.onSearch&&m.onSearch(e)},_=(e,t)=>{g(e),m.onChange&&m.onChange(e,t)};return"inline"===x?(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,i.jsxs)(r.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,i.jsx)(o.__,{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,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?C:void 0,onChange:_,value:p.value||void 0,status:v?"error":void 0}),h&&(0,i.jsx)(r.Q6r,{children:h}),(0,i.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]}),(0,i.jsx)(l.b,{label:c})]})]})}):(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,i.jsxs)(r.gCW,{alignItems:"start",children:[(0,i.jsxs)(r.jqI,{align:"center",children:[n?(0,i.jsx)(o.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:n}):null,(0,i.jsx)(l.b,{label:c})]}),(0,i.jsx)(r.WPr,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?C:void 0,onChange:_,value:p.value||void 0,status:v?"error":void 0}),h&&(0,i.jsx)(r.Q6r,{style:{marginTop:0},children:h}),(0,i.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]})})}},812:function(e,t,n){n.d(t,{D4:function(){return a.D4},MM:function(){return x},Ot:function(){return d},c6:function(){return r},cj:function(){return m},e$:function(){return l},fn:function(){return o},iC:function(){return h},nU:function(){return u},tB:function(){return c}});var i,r,a=n(19043);let s="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if((0,a.Bw)(e)){if((0,a.hE)(e.data))return e.data.detail;if((0,a.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,a.Dy)(e.data)||404===e.status&&(0,a.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:s};if((0,a.oK)(e))return{status:e.originalStatus,message:e.data};if((0,a.Bw)(e)){let{status:n}=e;return{status:n,message:l(e,t.message)}}return t},x=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},m=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,n){n.d(t,{H:function(){return a},V:function(){return i.V}});var i=n(84306),r=n(812);let a=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,r.Ot)(t)?n=t.data.detail:(0,r.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}}},84306:function(e,t,n){n.d(t,{V:function(){return a}});var i=n(24246),r=n(91942);let a=()=>{let e=(0,r.pmc)();return{errorAlert:(t,n,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)},successAlert:(t,n,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)}}}},39715:function(e,t,n){var i=n(24246),r=n(91942);n(27378),t.Z=e=>{let{isEmptyState:t,yamlError:n}=e;return(0,i.jsx)(r.Rg9,{in:!0,children:(0,i.jsxs)(r.xuv,{w:"fit-content",bg:"white",p:3,borderRadius:3,children:[(0,i.jsxs)(r.Ugi,{children:[(0,i.jsx)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:"YAML"}),(0,i.jsx)(r.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,i.jsx)(r.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,i.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,i.jsx)(r.f9v,{}),t&&(0,i.jsxs)(r.xuv,{children:[(0,i.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,i.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:"Yaml system is required"})]}),n&&(0,i.jsxs)(r.xuv,{children:[(0,i.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,i.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:n.message}),(0,i.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:n.reason}),(0,i.jsxs)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:["Ln ",(0,i.jsx)("b",{children:n.mark.line}),", Col"," ",(0,i.jsx)("b",{children:n.mark.column}),", Pos"," ",(0,i.jsx)("b",{children:n.mark.position})]})]})]})})]})})}},41337:function(e,t,n){var i=n(24246),r=n(91942);n(27378);var a=n(61317),s=n(16394),l=n(14746);let o=l.Ny+l.iW.get(a.Rj.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===a.Rj.WEBSITE;t.Z=e=>{let{data:t,...n}=e;return(0,i.jsx)(r.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(c(t)&&t.encoded_icon)return"data:image/svg+xml;base64,".concat(t.encoded_icon);if(u(t)){var n;let e=null===(n=t.secrets)||void 0===n?void 0:n.url;if(!e)return o;let i=(0,s.ge)(e);return(0,s.tl)(i,100)}if(d(t))e=[...l.iW].find(e=>{var n,i;let[r]=e;return t.connection_type.toString()!==a.Rj.SAAS&&t.connection_type.toString()===r||t.connection_type.toString()===a.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(c(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:u(t)?o:l.VD,alt:(()=>{if(d(t)){var e;return null!==(e=t.name)&&void 0!==e?e:t.key}return c(t)?t.human_readable:t})(),...n})}},1226:function(e,t,n){var i=n(24246);n(27378);var r=n(77213);t.Z=e=>{let{children:t}=e;return(0,i.jsx)(r.Z,{title:"Connections",children:t})}},11274:function(e,t,n){n.d(t,{s:function(){return F}});var i=n(24246),r=n(96356),a=n(91942),s=n(86677),l=n(27378),o=n(16134),d=n(77830),c=n(61317),u=n(14047),x=n(84306),h=n(14207),m=n(16125),p=n(33335),f=n(34090),g=n(46238);let v=(e,t)=>{let n={...e};return Object.entries(t.properties).forEach(t=>{let[i,r]=t;if("integer"===r.type){let t=r.default?Number(r.default):e[i];n[i]=t||0}else{var a;let t=null!==(a=r.default)&&void 0!==a?a:e[i];n[i]=null!=t?t:null}}),n},j="#/definitions/FidesDatasetReference";var y=e=>{let{data:t,defaultValues:n,isSubmitting:s=!1,onSaveClick:d,onTestConnectionClick:x,testButtonLabel:m="Test integration"}=e,p=(0,l.useRef)(!1),{handleError:y}=(0,u.H)(),{connection:b,connectionOption:C}=(0,o.C)(r.ZZ),[_,k]=(0,h.h2)(),S=e=>{let t;return(void 0===e||""===e)&&(t="Connection Identifier is required"),e&&(0,a.kEn)(e)&&(t="Connection Identifier must be an alphanumeric value"),t},w=(e,t,n)=>{let i;return(void 0===t||""===t)&&(i="".concat(e," is required")),n===j&&(t.includes(".")?t.split(".").length<3&&(i="Dataset reference must include at least three parts"):i="Dataset reference must be dot delimited"),i},I=(e,t)=>(0,i.jsx)(a.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:t}),z=e=>{var t;if((null===(t=e.allOf)||void 0===t?void 0:t[0].$ref)===j)return"Enter dataset.collection.field"},R=(e,n)=>{var r;return(0,i.jsx)(f.gN,{id:e,name:e,validate:(null!==(r=t.required)&&void 0!==r&&!!r.includes(e)||"integer"===n.type)&&(e=>{var t;return w(n.title,e,null===(t=n.allOf)||void 0===t?void 0:t[0].$ref)}),children:r=>{var s;let{field:l,form:o}=r;return(0,i.jsxs)(a.NIc,{display:"flex",isRequired:null===(s=t.required)||void 0===s?void 0:s.includes(e),isInvalid:o.errors[e]&&o.touched[e],children:[I(e,n.title),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["integer"!==n.type&&(0,i.jsx)(a.IIB,{...l,value:l.value||"",placeholder:z(n),autoComplete:"off",color:"gray.700",size:"sm"}),"integer"===n.type&&(0,i.jsxs)(a.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,i.jsx)(a.zuI,{...l,autoComplete:"off"}),(0,i.jsxs)(a.FiK,{children:[(0,i.jsx)(a.WQu,{}),(0,i.jsx)(a.Y_d,{})]})]}),(0,i.jsx)(a.J1D,{children:o.errors[e]})]}),(0,i.jsx)(a.kCb,{alignItems:"center",h:8,ml:2,children:(0,i.jsx)(g.b,{label:n.description})})]})}},e)},W=async()=>{try{await _(b.key).unwrap()}catch(e){y(e)}};return(0,l.useEffect)(()=>(p.current=!0,k.isSuccess&&x(k),()=>{p.current=!1}),[x,k]),(0,i.jsx)(f.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...n};if(null==b?void 0:b.key){var i,r;e.name=null!==(r=b.name)&&void 0!==r?r:"",e.description=b.description,e.instance_key=b.connection_type===c.Rj.SAAS?null===(i=b.saas_config)||void 0===i?void 0:i.fides_key:b.key}return v(e,t)})(),onSubmit:(e,n)=>{let i={...e};Object.keys(t.properties).forEach(n=>{var r;if((null===(r=t.properties[n].allOf)||void 0===r?void 0:r[0].$ref)===j){let t=e[n].split(".");i[n]={dataset:t.shift(),field:t.join("."),direction:"from"}}}),d(i,n)},validateOnBlur:!1,validateOnChange:!1,children:e=>(0,i.jsx)(f.l0,{noValidate:!0,children:(0,i.jsxs)(a.gCW,{align:"stretch",gap:"16px",children:[(0,i.jsx)(f.gN,{id:"name",name:"name",validate:e=>w("Name",e),children:t=>{let{field:n}=t;return(0,i.jsxs)(a.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.name&&e.touched.name,children:[I("name","Name"),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",mr:"6",children:[(0,i.jsx)(a.IIB,{...n,autoComplete:"off",autoFocus:!0,color:"gray.700",placeholder:"Enter a friendly name for your new ".concat(C.human_readable," connection"),size:"sm","data-testid":"input-name"}),(0,i.jsx)(a.J1D,{children:e.errors.name})]})]})}}),(0,i.jsx)(f.gN,{id:"description",name:"description",children:e=>{let{field:t}=e;return(0,i.jsxs)(a.NIc,{display:"flex",children:[I("description","Description"),(0,i.jsx)(a.gxH,{...t,color:"gray.700",placeholder:"Enter a description for your new ".concat(C.human_readable," connection"),resize:"none",size:"sm",value:t.value||"",mr:"6"})]})}}),(0,i.jsx)(f.gN,{id:"instance_key",name:"instance_key",validate:S,children:t=>{let{field:n}=t;return(0,i.jsxs)(a.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.instance_key&&e.touched.instance_key,children:[I("instance_key","Connection Identifier"),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:[(0,i.jsx)(a.IIB,{...n,autoComplete:"off",color:"gray.700",isDisabled:!!(null==b?void 0:b.key),placeholder:"A unique identifier for your new ".concat(C.human_readable," connection"),size:"sm"}),(0,i.jsx)(a.J1D,{children:e.errors.instance_key})]}),(0,i.jsx)(a.kCb,{alignItems:"center",h:8,ml:2,children:(0,i.jsx)(g.b,{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."})})]})}}),Object.entries(t.properties).map(e=>{let[t,n]=e;return"advanced_settings"===t?null:R(t,n)}),(0,i.jsxs)(a.kCb,{gap:2,children:[(0,i.jsx)(a.wpx,{disabled:!(null==b?void 0:b.key),loading:k.isLoading||k.isFetching,onClick:W,"data-testid":"test-connection-button",children:m}),(0,i.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:s,loading:s,children:"Save"})]})]})})})};let b=e=>{let{onConnectionCreated:t,data:n}=e,a=(0,m.I0)(),{errorAlert:s,successAlert:d}=(0,x.V)(),{handleError:f}=(0,u.H)(),[g,v]=(0,l.useState)(!1),{connection:j,connectionOption:y}=(0,o.C)(r.ZZ),[b]=(0,h.pH)(),[C]=(0,h.Du)();return{isSubmitting:g,handleSubmit:async e=>{try{var l;v(!0);let o={access:c.uv.WRITE,connection_type:null==y?void 0:y.identifier,description:e.description,disabled:!1,key:(0,p.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)s(u.failed[0].message);else{let l={connection_key:u.succeeded[0].key,secrets:{}};Object.entries(n.properties).forEach(t=>{l.secrets[t[0]]=e[t[0]]});let o=await C(l).unwrap();"failed"===o.test_status?s((0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("b",{children:"Message:"})," ",o.msg,(0,i.jsx)("br",{}),(0,i.jsx)("b",{children:"Failure Reason:"})," ",o.failure_reason]})):(a((0,r.lm)(u.succeeded[0])),d("Connector successfully ".concat((null==j?void 0:j.key)?"updated":"added","!")),(null==j?void 0:j.key)||!t||t())}}catch(e){f(e)}finally{v(!1)}},connectionOption:y}},C=e=>{let{data:t,onConnectionCreated:n,onTestConnectionClick:r}=e,{isSubmitting:s,handleSubmit:l,connectionOption:o}=b({onConnectionCreated:n,data:t});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.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,i.jsx)(y,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:s,onSaveClick:l,onTestConnectionClick:r})]})},_={description:"",instance_key:"",name:""},k=e=>{let{data:t,onConnectionCreated:n,onTestEmail:r}=e,{connectionOption:s,isSubmitting:l,handleSubmit:o}=b({onConnectionCreated:n,data:t});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Configure your ",s.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,i.jsx)(y,{data:t,defaultValues:_,isSubmitting:l,onSaveClick:e=>{o(e)},onTestConnectionClick:r,testButtonLabel:"Test email"})]})};var S=n(55484),w=n(27259),I=n(67762),z=e=>{let{defaultValues:t,isSubmitting:n=!1,onSaveClick:l}=e,c=(0,s.useRouter)(),{connection:u,connectionOption:x}=(0,o.C)(r.ZZ);return(0,i.jsx)(f.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:S.Ry().shape({name:S.Z_().required("Name is required")}),children:(0,i.jsx)(f.l0,{noValidate:!0,children:(0,i.jsxs)(a.gCW,{align:"stretch",gap:"16px",children:[(0,i.jsx)(w.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(x.human_readable," connection")}),(0,i.jsx)(w.Z,{label:"Description",name:"description",placeholder:"Enter a description for your new ".concat(x.human_readable," connection"),type:"textarea"}),(0,i.jsx)(I.h,{isSubmitting:n,onCancelClick:()=>{c.push(d.JR)}})]})})})};let R=e=>{let{onConnectionCreated:t}=e,n=(0,m.I0)(),{errorAlert:s,successAlert:d}=(0,x.V)(),{handleError:p}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:v,connectionOption:j}=(0,o.C)(r.ZZ),[y]=(0,h.pH)(),b=async(e,i)=>{try{var a;g(!0);let i={access:c.uv.WRITE,connection_type:null==j?void 0:j.identifier,description:e.description,disabled:!1,name:e.name,key:null==v?void 0:v.key},l=await y(i).unwrap();(null===(a=l.failed)||void 0===a?void 0:a.length)>0?s(l.failed[0].message):(n((0,r.lm)(l.succeeded[0])),d("Connector successfully ".concat((null==v?void 0:v.key)?"updated":"added","!")),(null==v?void 0:v.key)||!t||t())}catch(e){p(e)}finally{g(!1)}};return(0,i.jsxs)(a.gCW,{align:"stretch",gap:"16px",children:[(0,i.jsxs)(a.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,i.jsx)("br",{}),(0,i.jsx)("br",{}),"Once you have completed this section you can then progress onto"," ",(0,i.jsx)(a.xvT,{display:"inline-block",fontWeight:"700",children:"DSR customization"})," ","using the menu on the left hand side."]}),(0,i.jsx)(z,{defaultValues:{description:"",name:""},isSubmitting:f,onSaveClick:b})]})},W=e=>{let{data:t,onConnectionCreated:n,onTestConnectionClick:s}=e,d=(0,m.I0)(),{errorAlert:f,successAlert:g}=(0,x.V)(),{handleError:v}=(0,u.H)(),[j,b]=(0,l.useState)(!1),{connection:C,connectionOption:_}=(0,o.C)(r.ZZ),[k]=(0,h.pL)(),[S]=(0,h.pH)(),[w]=(0,h.Du)(),I=async(e,a)=>{try{if(b(!0),C){var s;let n={access:c.uv.WRITE,connection_type:C.connection_type,description:e.description,disabled:!1,key:C.key,name:e.name},a=await S(n).unwrap();if((null===(s=a.failed)||void 0===s?void 0:s.length)>0)f(a.failed[0].message);else{d((0,r.lm)(a.succeeded[0]));let n={connection_key:C.key,secrets:{}};Object.entries(t.properties).forEach(t=>{n.secrets[t[0]]=e[t[0]]});let s=await w(n).unwrap();"failed"===s.test_status?f((0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("b",{children:"Message:"})," ",s.msg,(0,i.jsx)("br",{}),(0,i.jsx)("b",{children:"Failure Reason:"})," ",s.failure_reason]})):g("Connector successfully updated!")}}else{let i={description:e.description,name:e.name,instance_key:(0,p.E)(e.instance_key),saas_connector_type:_.identifier,secrets:{}};Object.entries(t.properties).forEach(t=>{i.secrets[t[0]]=e[t[0]]});let a=await k(i).unwrap();d((0,r.lm)(a.connection)),g("Connector successfully added!"),null==n||n()}}catch(e){v(e)}finally{b(!1)}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",_.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,i.jsx)(y,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:j,onSaveClick:I,onTestConnectionClick:s})]})};var Z=n(16394);let E=e=>{var t,n;let{response:s}=e,{connectionOption:l}=(0,o.C)(r.ZZ);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.izJ,{color:"gray.100"}),(0,i.jsxs)(a.gCW,{align:"flex-start",mt:"16px",children:[(null===(t=s.data)||void 0===t?void 0:t.test_status)==="succeeded"&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.Ugi,{children:[(0,i.jsxs)(a.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Successfully connected to ",l.human_readable]}),(0,i.jsx)(a.Vp9,{colorScheme:"green",size:"sm",variant:"solid",children:"Success"})]}),(0,i.jsx)(a.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,i.jsx)(a.xuv,{bg:"green.100",border:"1px solid",borderColor:"green.300",color:"green.700",mt:"16px",borderRadius:"6px",children:(0,i.jsxs)(a.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,i.jsx)(a.StI,{}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(a.X6q,{as:"h5",color:"green.500",fontWeight:"semibold",size:"xs",children:"Success message:"}),(0,i.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]}),(null===(n=s.data)||void 0===n?void 0:n.test_status)==="failed"&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.Ugi,{children:[(0,i.jsxs)(a.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Output error to ",l.human_readable]}),(0,i.jsx)(a.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,i.jsx)(a.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,i.jsx)(a.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,i.jsxs)(a.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,i.jsx)(a.f9v,{}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(a.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,i.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.failure_reason}),(0,i.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]})]})]})},F=e=>{let{onConnectionCreated:t}=e,n=(0,s.useRouter)(),{connectionOption:u}=(0,o.C)(r.ZZ),x=u&&u.type===c.Zi.MANUAL,{data:h,isFetching:m,isLoading:p,isSuccess:f}=(0,r.n3)(u.identifier,{skip:x}),[g,v]=(0,l.useState)(),j=e=>{v(e)},y=(0,l.useCallback)(()=>{n.push(d.JR)},[n]),b=(0,l.useCallback)(()=>{switch(null==u?void 0:u.type){case c.Zi.DATABASE:if(f&&h)return(0,i.jsx)(C,{data:h,onConnectionCreated:t,onTestConnectionClick:j});break;case c.Zi.MANUAL:return(0,i.jsx)(R,{onConnectionCreated:t});case c.Zi.SAAS:if(f&&h)return(0,i.jsx)(W,{data:h,onConnectionCreated:t,onTestConnectionClick:j});break;case c.Zi.EMAIL:if(f&&h)return(0,i.jsx)(k,{data:h,onConnectionCreated:y,onTestEmail:j})}},[null==u?void 0:u.type,h,f,t,y]);return(0,i.jsxs)(a.kCb,{gap:"97px",children:[(0,i.jsxs)(a.gCW,{w:"579px",gap:"16px",align:"stretch",children:[(m||p)&&(0,i.jsx)(a.M5Y,{children:(0,i.jsx)(a.$jN,{})}),b()]}),g&&(0,i.jsxs)(a.Rg9,{in:!0,children:[" ",(0,i.jsx)(a.xuv,{mt:"16px",maxW:"528px",w:"fit-content",children:(0,i.jsx)(E,{response:g})})]})]})}},38212:function(e,t,n){n.d(t,{Z:function(){return y}});var i=n(24246),r=n(14047),a=n(96356),s=n(14207),l=n(91942),o=n(86677),d=n(27378),c=n(16134),u=n(812),x=n(77830),h=n(41966),m=n(84306),p=n(66527),f=n(41207),g=n(39715),v=e=>{let{data:t=[],isSubmitting:n=!1,onSubmit:r,onCancel:a,disabled:s}=e,o=(0,d.useRef)(null),{errorAlert:c}=(0,m.V)(),u=t.length>0?p.ZP.dump(t):void 0,[x,v]=(0,d.useState)(void 0),[j,y]=(0,d.useState)(!1),[b,C]=(0,d.useState)(!u),_=(0,l.qY0)(),{data:k}=(0,h.NR)(),[S,w]=(0,d.useState)([]),I=e=>{p.ZP.load(e,{json:!0}),v(void 0)},z=()=>{let e=o.current.getValue();r(p.ZP.load(e,{json:!0})),w([])};return(0,i.jsxs)(l.kCb,{gap:"97px",children:[(0,i.jsxs)(l.gCW,{align:"stretch",w:"800px",children:[(0,i.jsx)(f.M,{defaultLanguage:"yaml",defaultValue:u,height:"calc(100vh - 526px)",onChange:e=>{try{y(!0),I(e),C(!!(!e||""===e.trim()))}catch(e){(0,f.F)(e)?v(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:s},theme:"light"}),(0,i.jsxs)(l.Ugi,{justifyContent:"flex-end",pr:6,children:[a&&(0,i.jsx)(l.wpx,{onClick:a,children:"Cancel"}),(0,i.jsx)(l.wpx,{type:"primary",disabled:s||b||!!x||n,loading:n,onClick:()=>{if(k&&k.length){let e=o.current.getValue(),t=k.filter(t=>e.includes("fides_key: ".concat(t.fides_key,"\n"))).map(e=>e.fides_key);if(w(t),t.length){_.onOpen();return}}z()},htmlType:"submit","data-testid":"save-yaml-btn",children:"Save"})]})]}),j&&(b||x)&&(0,i.jsx)(g.Z,{isEmptyState:b,yamlError:x}),(0,i.jsx)(l.cVQ,{isOpen:_.isOpen,onClose:_.onClose,onConfirm:()=>{z(),_.onClose()},title:"Overwrite dataset",message:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l.xvT,{children:["You are about to overwrite the dataset",S.length>1?"s":""," ",S.map((e,t)=>{let n=t===S.length-1;return(0,i.jsxs)(d.Fragment,{children:[(0,i.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),n?".":", "]},e)})]}),(0,i.jsx)(l.xvT,{children:"Are you sure you would like to continue?"})]})})]})};let j=e=>{let{children:t,...n}=e;return(0,i.jsx)(l.xvT,{color:"gray.700",fontSize:"14px",...n,children:t})};var y=()=>{let e=(0,o.useRouter)(),{errorAlert:t,successAlert:n}=(0,r.V)(),{handleError:m}=(0,r.H)(),[p,f]=(0,d.useState)(!1),{connection:g}=(0,c.C)(a.ZZ),{data:y,isFetching:b,isLoading:C,isSuccess:_}=(0,s.Eg)(g.key),[k]=(0,s.Lz)(),[S]=(0,h.EG)(),{data:w,isLoading:I,error:z}=(0,h.NR)(),[R,W]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{y&&y.items.length&&W(y.items[0].ctl_dataset.fides_key)},[y]);let Z=async i=>{var r;let a={connection_key:null==g?void 0:g.key,dataset_pairs:i},s=await k(a).unwrap();(null===(r=s.failed)||void 0===r?void 0:r.length)>0?t(s.failed[0].message):n("Dataset successfully updated!"),e.push(x.JR)},E=async()=>{if(R)try{let e=R;y&&y.items.length&&(e=y.items[0].fides_key);let t=[{fides_key:e,ctl_dataset_fides_key:R}];Z(t)}catch(e){m(e)}},F=async e=>{try{f(!0);let n=Array.isArray(e)?e:[e],i=await S(n);if((0,u.D4)(i)){let e=(0,u.e$)(i.error);t(e);return}let r=n.map(e=>({fides_key:e.fides_key,ctl_dataset_fides_key:e.fides_key}));if(y&&y.items.length){let{items:e}=y;r=e.map((e,t)=>({fides_key:e.fides_key,ctl_dataset_fides_key:n[t].fides_key}))}Z(r)}catch(e){m(e)}finally{f(!1)}},A=""!==R&&void 0!==R;if(b||C||I&&!z)return(0,i.jsx)(l.M5Y,{children:(0,i.jsx)(l.$jN,{})});let N=w&&w.length;return(0,i.jsxs)(l.gCW,{alignItems:"left",gap:4,children:[z&&(0,i.jsx)(j,{color:"red",children:"There was a problem loading existing datasets, please try again."}),(0,i.jsxs)(l.gCW,{alignItems:"flex-start",children:[N&&(0,i.jsx)("div",{children:(0,i.jsx)(l.gCW,{alignSelf:"start",gap:4,children:(0,i.jsxs)(l.xuv,{"data-testid":"dataset-selector-section",children:[(0,i.jsx)(j,{mb:4,children:"Choose a dataset to associate with this connector."}),(0,i.jsxs)(l.Ugi,{children:[(0,i.jsx)(l.WPr,{allowClear:!0,options:w.map(e=>({label:e.fides_key,value:e.fides_key})),className:"w-full",placeholder:"Select",onChange:e=>W(e),value:R,"data-testid":"dataset-selector"}),(0,i.jsx)(l.wpx,{onClick:E,type:"primary",className:"self-start",disabled:!A,"data-testid":"save-dataset-link-btn",children:"Save"})]})]})})}),N&&_&&(null==y?void 0:y.items)&&(0,i.jsx)(l.htM,{plain:!0,children:"or"}),_&&(null==y?void 0:y.items)&&(0,i.jsxs)(l.xuv,{"data-testid":"yaml-editor-section",children:[(0,i.jsx)(j,{mb:4,children:"View your dataset YAML below!"}),(0,i.jsx)(v,{data:y.items.map(e=>e.ctl_dataset),isSubmitting:p,onSubmit:F,disabled:A})]})]})]})}},27259:function(e,t,n){var i=n(24246),r=n(91942),a=n(34090);t.Z=e=>{let{disabled:t=!1,isRequired:n=!1,label:s,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[x,h]=(0,a.U$)(d);return(0,i.jsxs)(r.NIc,{display:"flex",isRequired:n,isInvalid:!!(h.error&&h.touched),children:[s&&(0,i.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:s}),(0,i.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,i.jsxs)(r.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,i.jsx)(r.zuI,{...x,autoComplete:"off",autoFocus:u}),(0,i.jsxs)(r.FiK,{children:[(0,i.jsx)(r.WQu,{}),(0,i.jsx)(r.Y_d,{})]})]}),"text"===o&&(0,i.jsx)(r.IIB,{...x,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:t,placeholder:l,size:"sm"}),"textarea"===o&&(0,i.jsx)(r.gxH,{...x,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:x.value||""}),(0,i.jsx)(r.J1D,{children:h.error})]})]})}},67762:function(e,t,n){n.d(t,{h:function(){return a}});var i=n(24246),r=n(91942);n(27378);let a=e=>{let{isSubmitting:t=!1,onCancelClick:n}=e;return(0,i.jsxs)(r.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,i.jsx)(r.zxk,{onClick:n,variant:"outline",children:"Cancel"}),(0,i.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"})]})}},50881:function(e,t,n){n.d(t,{Z:function(){return y}});var i=n(24246),r=n(14047),a=n(96356),s=n(14207),l=n(91942),o=n(86677),d=n(27378),c=n(16134),u=n(77830),x=n(34090),h=n(55484),m=n(97181),p=n(57072),f=n(39864),g=n(27259),v=n(67762),j=e=>{let{data:t=[],isSubmitting:n=!1,onSaveClick:a}=e,{isLoading:s}=(0,p.MO)(),d=(0,c.C)(f.qb),j=(0,o.useRouter)(),{errorAlert:y}=(0,r.V)(),b=()=>{j.push(u.JR)};return s?null:(0,i.jsx)(x.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){y("PII Field must be unique");return}a(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:h.Ry({fields:h.IX().of(h.Ry().shape({pii_field:h.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:h.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:h.IX(h.Z_()).label("Data Categories")}))}),children:e=>(0,i.jsx)(x.l0,{style:{marginTop:0},noValidate:!0,children:(0,i.jsx)(l.gCW,{align:"stretch",children:(0,i.jsx)(x.F2,{name:"fields",render:t=>{let{fields:r}=e.values;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,i.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,i.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,i.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,i.jsx)(l.xuv,{visibility:"hidden",children:(0,i.jsx)(l.lr0,{})})]}),(0,i.jsx)(l.xuv,{children:r&&r.length>0?r.map((e,n)=>(0,i.jsxs)(l.Ugi,{mt:n>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,i.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,i.jsx)(g.Z,{autoFocus:0===n,isRequired:!0,name:"fields.".concat(n,".pii_field")})}),(0,i.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,i.jsx)(g.Z,{isRequired:!0,name:"fields.".concat(n,".dsr_package_label")})}),(0,i.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,i.jsx)(m.d,{name:"fields.".concat(n,".data_categories"),options:d.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,i.jsx)(l.xuv,{h:"57px",visibility:n>0?"visible":"hidden",children:(0,i.jsx)(l.lr0,{onClick:()=>t.remove(n),_hover:{cursor:"pointer"}})})]},n)):null}),(0,i.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,i.jsx)(v.h,{isSubmitting:n,onCancelClick:b})]})}})})})})},y=()=>{let e=(0,d.useRef)(!1),t=(0,o.useRouter)(),{successAlert:n}=(0,r.V)(),{handleError:x}=(0,r.H)(),[h,m]=(0,d.useState)(!1),[p,f]=(0,d.useState)([]),{connection:g}=(0,c.C)(a.ZZ),{data:v,isFetching:y,isLoading:b,isSuccess:C}=(0,s.QV)(g.key),[_]=(0,s.jF)(),[k]=(0,s._d)(),S=async(e,i)=>{try{m(!0);let i={connection_key:null==g?void 0:g.key,body:{...e}};p.length>0?await k(i).unwrap():await _(i).unwrap(),n("DSR customization ".concat(p.length>0?"updated":"added","!")),t.push(u.JR)}catch(e){x(e)}finally{m(!1)}};return(0,d.useEffect)(()=>(e.current=!0,C&&v&&f(v.fields),()=>{e.current=!1}),[v,C]),(0,i.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,i.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."}),(y||b)&&(0,i.jsx)(l.M5Y,{children:(0,i.jsx)(l.$jN,{})}),e.current&&!b?(0,i.jsx)(j,{data:p,isSubmitting:h,onSaveClick:S}):null]})}},33335:function(e,t,n){n.d(t,{E:function(){return i}});let i=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")},19043:function(e,t,n){n.d(t,{Bw:function(){return s},D4:function(){return r},Dy:function(){return o},XD:function(){return d},cz:function(){return c},hE:function(){return l},oK:function(){return a}});var i=n(76649);let r=e=>"error"in e,a=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,s=e=>(0,i.Ln)({status:"number",data:{}},e),l=e=>(0,i.Ln)({detail:"string"},e),o=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){n.d(t,{Ln:function(){return i}});let i=(e,t)=>a(e,t),r=Symbol("SOME"),a=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>a(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>a(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>a(n,t[e]));class s{static narrow(e){return new s(t=>i(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,n=e instanceof s?e.NF:e instanceof Function?e:t=>i(e,t);return new s(e=>t(e)&&n(e))}}new s(e=>!0)}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9965],{77867:function(e,s,t){var a=t(24246),i=t(91942);s.Z=e=>{let{connected:s,...t}=e,n="red.500";return null==s?n="gray.300":s&&(n="green.500"),(0,a.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...t})}},59301:function(e,s,t){var a=t(24246);let{Link:i}=t(91942).AntTypography;s.Z=e=>(0,a.jsx)(i,{target:"_blank",rel:"noopener noreferrer",...e})},77213:function(e,s,t){t.d(s,{Z:function(){return p}});var a=t(24246),i=t(91942),n=t(88038),r=t.n(n),l=t(86677);t(27378);var o=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,l.useRouter)();return(0,a.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,a.jsxs)(i.xuv,{children:[(0,a.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,a.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,a.jsx)(i.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,a.jsxs)(i.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:s,title:t,padded:n=!0,mainProps:c}=e,p=(0,o.hz)(),m=(0,l.useRouter)(),h="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,x=!(p.flags.privacyRequestsConfiguration&&h),{data:g}=(0,d.JE)(void 0,{skip:x}),{data:y}=(0,d.PW)(void 0,{skip:x}),f=p.flags.privacyRequestsConfiguration&&(!g||!y)&&h;return(0,a.jsxs)(i.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,a.jsxs)(r(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsxs)(i.kCb,{as:"main",direction:"column",py:n?6:0,px:n?10:0,h:n?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[f?(0,a.jsx)(u,{}):null,s]})]})}},19904:function(e,s,t){t.d(s,{Tg:function(){return r}});var a=t(24246),i=t(16134),n=t(31793);let r=e=>(0,i.C)(n.uu).filter(s=>e.includes(s)).length>0;s.ZP=e=>{let{scopes:s,children:t}=e;return r(s)?(0,a.jsx)(a.Fragment,{children:t}):null}},83099:function(e,s,t){var a=t(24246),i=t(79283),n=t(34929);s.Z=e=>{let{selectedTaxonomies:s,showDisabled:t=!1,...r}=e,{getDataUseDisplayNameProps:l,getDataUses:o}=(0,n.Z)(),d=(t?o():o().filter(e=>e.active)).filter(e=>!s.includes(e.fides_key)).map(e=>{let{name:s,primaryName:t}=l(e.fides_key);return{value:e.fides_key,name:s,primaryName:t,description:e.description||""}});return(0,a.jsx)(i.l,{options:d,...r})}},16220:function(e,s,t){t.d(s,{V:function(){return n}});var a=t(25980),i=t(77830);let n=()=>({systemOrDatamapRoute:(0,a.hz)().plus?i.oG:i.So})},90111:function(e,s,t){var a=t(24246),i=t(91942);s.Z=e=>{let{children:s,...t}=e;return(0,a.jsx)(i.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...t,children:s})}},44553:function(e,s,t){t.d(s,{Z:function(){return g}});var a=t(24246),i=t(91942),n=t(27378),r=t(45277),l=t(16125),o=t(812),d=t(46628),c=t(20682),u=t(54427),p=t(52253),m=t(78780);let{reducer:h}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:x}=m.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let s=new FormData;return s.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:s}},invalidatesTags:()=>["Connection Type"]})})});var g=e=>{let{isOpen:s,onClose:t,testId:u="connector-template-modal"}=e,p=(0,l.I0)(),[m,h]=(0,n.useState)(null),g=(0,i.pmc)(),{getRootProps:y,getInputProps:f,isDragActive:_}=(0,r.uI)({onDrop:e=>{var s;if("zip"!==(null===(s=e[0].name.split(".").pop())||void 0===s?void 0:s.toLowerCase())){g((0,d.Vo)("Only zip files are allowed."));return}h(e[0])}}),[b,{isLoading:v}]=x(),{refetch:j}=(0,c.$I)({search:""},{skip:!1}),w=async()=>{if(m)try{var e;await b(m).unwrap(),g((0,d.t5)("Integration template uploaded successfully."));let{data:s}=await j();p((0,c.fP)(null!==(e=null==s?void 0:s.items)&&void 0!==e?e:[])),t()}catch(e){g((0,d.Vo)((0,o.e$)(e)))}finally{h(null)}};return(0,a.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"2xl",children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,a.jsx)(i.xBx,{children:"Upload integration template"}),(0,a.jsxs)(i.fef,{children:[(0,a.jsx)(i.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,a.jsxs)(i.xuv,{...y(),bg:_?"gray.100":"gray.50",border:"2px dashed",borderColor:_?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,a.jsx)("input",{...f()}),m?(0,a.jsx)(i.xvT,{children:m.name}):_?(0,a.jsx)(i.xvT,{children:"Drop the file here..."}):(0,a.jsx)(i.xvT,{children:"Click or drag and drop your file here."})]}),(0,a.jsx)(i.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,a.jsxs)(i.mzw,{className:"flex w-full justify-end gap-2",children:[(0,a.jsx)(i.wpx,{onClick:t,"data-testid":"cancel-btn",disabled:v,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!m||v,onClick:w,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},3765:function(e,s,t){var a=t(91942),i=t(812),n=t(46628),r=t(1315),l=t(31883);s.Z=e=>{let s=(0,a.pmc)(),[t]=(0,r.qQ)(),o=t=>!!e.privacy_declarations.find(e=>e.data_use===t.data_use&&e.name===t.name)&&(s((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),d=(e,t)=>{if((0,l.D4)(e)){let t=(0,i.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");s((0,n.Vo)(t));return}return s.closeAll(),s((0,n.t5)(t?"Data use deleted":"Data use saved")),e.data.privacy_declarations},c=async(s,a)=>{let i=s.map(e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:""}}),n={...e,privacy_declarations:i};return d(await t(n),a)};return{createDataUse:async t=>{if(!o(t))return s.closeAll(),c([...e.privacy_declarations,t])},updateDataUse:async(s,t)=>{if(!(t.id!==s.id&&o(t)))return c(e.privacy_declarations.map(e=>e.id===s.id?t:e))},deleteDataUse:async s=>c(e.privacy_declarations.filter(e=>e.id!==s.id),!0),deleteDeclarationByDataUse:async s=>c(e.privacy_declarations.filter(e=>e.data_use!==s),!0)}}},41337:function(e,s,t){var a=t(24246),i=t(91942);t(27378);var n=t(61317),r=t(16394),l=t(14746);let o=l.Ny+l.iW.get(n.Rj.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===n.Rj.WEBSITE;s.Z=e=>{let{data:s,...t}=e;return(0,a.jsx)(i.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(c(s)&&s.encoded_icon)return"data:image/svg+xml;base64,".concat(s.encoded_icon);if(u(s)){var t;let e=null===(t=s.secrets)||void 0===t?void 0:t.url;if(!e)return o;let a=(0,r.ge)(e);return(0,r.tl)(a,100)}if(d(s))e=[...l.iW].find(e=>{var t,a;let[i]=e;return s.connection_type.toString()!==n.Rj.SAAS&&s.connection_type.toString()===i||s.connection_type.toString()===n.Rj.SAAS&&(null===(a=s.saas_config)||void 0===a?void 0:null===(t=a.type)||void 0===t?void 0:t.toString())===i.toString()});else if(c(s)){let{identifier:t}=s;e=[...l.iW].find(e=>{let[s]=e;return s.toLowerCase()===t.toLowerCase()})}return e?l.Ny+e[1]:l.VD})(),fallbackSrc:u(s)?o:l.VD,alt:(()=>{if(d(s)){var e;return null!==(e=s.name)&&void 0!==e?e:s.key}return c(s)?s.human_readable:s})(),...t})}},73183:function(e,s,t){var a=t(24246),i=t(91942);t(27378);var n=t(14207);s.Z=e=>{let{connection_key:s,disabled:t,name:r,access_type:l,connection_type:o,isSwitch:d}=e,{isOpen:c,onOpen:u,onClose:p}=(0,i.qY0)(),[m,h]=(0,n.XX)(),x=async()=>{await m({key:s,name:r,disabled:!t,access:l,connection_type:o}),p()},g=()=>{h.isLoading||p()};return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsxs)(i.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,a.jsx)(i.xvT,{fontSize:"sm",children:"Enable integration"}),(0,a.jsx)(i.rAg,{className:"ml-2",checked:!t,onChange:()=>u()})]}):(0,a.jsx)(i.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:u,children:(0,a.jsx)(i.xvT,{fontSize:"sm",children:t?"Enable":"Disable"})}),(0,a.jsxs)(i.u_l,{isCentered:!0,isOpen:c,onClose:g,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{children:[(0,a.jsxs)(i.xBx,{children:[t?"Enable":"Disable"," Connection"]}),(0,a.jsx)(i.olH,{}),(0,a.jsx)(i.fef,{pb:6,children:(0,a.jsx)(i.Kqy,{direction:"column",spacing:"15px",children:(0,a.jsxs)(i.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[t?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,a.jsxs)(i.mzw,{className:"flex gap-4",children:[(0,a.jsx)(i.wpx,{onClick:g,className:"w-1/2",children:"Cancel"}),(0,a.jsxs)(i.wpx,{onClick:x,loading:h.isLoading,className:"w-1/2",children:[t?"Enable":"Disable"," Connection"]})]})]})]})]})}},8627:function(e,s,t){t.d(s,{s:function(){return l}});var a=t(24246),i=t(91942),n=t(77867),r=t(16394);let l=e=>{let{succeeded:s,timestamp:t}=e,l=t?(0,r.p6)(t):"";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{connected:s}),(0,a.jsx)(i.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:t?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},27259:function(e,s,t){var a=t(24246),i=t(91942),n=t(34090);s.Z=e=>{let{disabled:s=!1,isRequired:t=!1,label:r,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[p,m]=(0,n.U$)(d);return(0,a.jsxs)(i.NIc,{display:"flex",isRequired:t,isInvalid:!!(m.error&&m.touched),children:[r&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:r}),(0,a.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,a.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,a.jsx)(i.zuI,{...p,autoComplete:"off",autoFocus:u}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]}),"text"===o&&(0,a.jsx)(i.IIB,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:s,placeholder:l,size:"sm"}),"textarea"===o&&(0,a.jsx)(i.gxH,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:p.value||""}),(0,a.jsx)(i.J1D,{children:m.error})]})]})}},19812:function(e,s,t){t.d(s,{t:function(){return l}});var a=t(14047),i=t(14207),n=t(27378),r=t(41966);let l=e=>{var s,t,l;let{connectionConfig:o}=e,[d]=(0,i.S6)(),{data:c}=(0,i.Eg)(null!==(t=null==o?void 0:o.key)&&void 0!==t?t:""),u=null!==(l=null==c?void 0:null===(s=c.items)||void 0===s?void 0:s.map(e=>e.fides_key))&&void 0!==l?l:[],p=u.map(e=>({label:e,value:e})),{data:m}=(0,r.LH)({onlyUnlinkedDatasets:!0}),h=(0,n.useMemo)(()=>{var e;return null!==(e=null==m?void 0:m.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[m]),{errorAlert:x,successAlert:g}=(0,a.V)();return{dropdownOptions:[...p,...h],initialDatasets:u,patchConnectionDatasetConfig:async function(e,s){var t,a,i;let{showSuccessAlert:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null!==(i=null===(t=e.dataset)||void 0===t?void 0:t.map(e=>({fides_key:e,ctl_dataset_fides_key:e})))&&void 0!==i?i:[],l=await d({connection_key:s,dataset_pairs:r}).unwrap();(null===(a=l.failed)||void 0===a?void 0:a.length)>0?x(l.failed[0].message):n&&g("Dataset successfully updated!")}}}},72774:function(e,s,t){t.d(s,{Z:function(){return r}});var a=t(24246),i=t(91942),n=e=>{let{title:s,description:t,button:n}=e;return(0,a.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:[(0,a.jsx)(i.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,a.jsxs)(i.xuv,{flexGrow:1,children:[(0,a.jsx)(i.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,a.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:t})]}),n]})},r=()=>(0,a.jsx)(i.xuv,{mb:"6",maxW:"720px","data-testid":"locked-for-GVL-notice",children:(0,a.jsx)(n,{title:"This system is part of the TCF Global Vendor List (GVL)",description:(0,a.jsxs)(a.Fragment,{children:["As a result, the system fields are not editable as they come directly from Fides Compass and the Global Vendor List (GVL). In some cases where the legal basis has been declared to be flexible, you may update the legal basis for particular data uses."," ",(0,a.jsx)(i.rUS,{href:"https://fid.es/tcf_gvl",isExternal:!0,color:"complimentary.500",children:"For more information on the Global Vendor List, click here."})]})})})},69525:function(e,s,t){t.d(s,{U:function(){return a}});let a=e=>{let s=e.data_categories.flatMap(e=>e.split(","));return{data_use:e.data_use,data_categories:s,features:e.features,legal_basis_for_processing:e.legal_basis_for_processing,flexible_legal_basis_for_processing:e.flexible_legal_basis_for_processing,retention_period:e.retention_period?e.retention_period:""}}},65626:function(e,s,t){t.d(s,{Z:function(){return sH}});var a,i,n=t(24246),r=t(84720),l=t(91942),o=t(79894),d=t.n(o),c=t(86677),u=t.n(c),p=t(27378),m=t(16134),h=t(25980),x=t(45938),g=t(16220),y=t(77830),f=t(46628),_=t(26089),b=t(19904),v=t(16394),j=t(20682),w=t(41337);let k=e=>{let{connectionConfig:s}=e,t=(0,m.C)(j.pw),{data:a}=(0,j.$I)(t),i=(0,p.useMemo)(()=>(null==a?void 0:a.items)||[],[a]),[n,r]=(0,p.useState)(),l=(0,p.useMemo)(()=>[...i].sort((e,s)=>e.human_readable>s.human_readable?1:-1),[i]),o=(0,p.useMemo)(()=>{let e=new Map;return null==l||l.map(s=>e.set(s.human_readable,{value:s})),e},[l]),d=(0,p.useMemo)(()=>{var e;return(null===(e=i.find(e=>e.identifier===(null==s?void 0:s.connection_type)||(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)))||void 0===e?void 0:e.type)||"ethyca"},[s,i]);return(0,p.useMemo)(()=>{let e=i.find(e=>(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)||e.identifier===(null==s?void 0:s.connection_type));e&&r(e)},[s,i]),{dropDownOptions:o,selectedValue:n,setSelectedValue:r,systemType:d}};var C=e=>{var s;let{disabled:t,hasClear:a=!0,label:i,list:r,onChange:o,selectedValue:d}=e,c=(0,p.useRef)(null),[u,m]=(0,p.useState)(!1),[h,x]=(0,p.useState)(""),g=()=>{m(!1)},y=null===(s=[...r].find(e=>{let[,s]=e;return s.value.identifier===(null==d?void 0:d.identifier)}))||void 0===s?void 0:s[0],f=(0,p.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(x(e.target.value),setTimeout(()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},0))},[]),_=(0,p.useMemo)(()=>(0,v.Ds)(f,100),[f]),b=(0,p.useMemo)(()=>[...r].filter(e=>e[0].toLowerCase().includes(h.toLowerCase())),[r,h]);return(0,n.jsxs)(l.v2r,{isLazy:!0,onClose:g,onOpen:()=>{m(!0)},strategy:"fixed",matchWidth:!0,children:[(0,n.jsx)(l.j2t,{"aria-label":null!=y?y:i,as:l.wpx,color:y?"complimentary.500":void 0,disabled:t,icon:(0,n.jsx)(l.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,n.jsx)(l.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=y?y:i})}),u?(0,n.jsxs)(l.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,n.jsx)(l.xuv,{px:"8px",mt:2,children:(0,n.jsxs)(l.BZy,{size:"sm",children:[(0,n.jsx)(l.Z8_,{pointerEvents:"none",children:(0,n.jsx)(l.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,n.jsx)(l.IIB,{"data-testid":"input-search-integrations",ref:c,autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:_,placeholder:"Search integrations",size:"sm",type:"search"})]})}),a&&(0,n.jsx)(l.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,n.jsx)(l.wpx,{onClick:()=>{o(void 0),x(""),g()},size:"small",children:"Clear"})}),(0,n.jsx)(l.xuv,{overflowY:"auto",maxHeight:"272px",children:b.map(e=>{let[s,t]=e;return(0,n.jsx)(l.esZ,{title:t.toolTip,placement:"rightTop",mouseEnterDelay:.5,children:(0,n.jsxs)(l.sNh,{color:d===t.value?"complimentary.500":void 0,isDisabled:t.isDisabled,onClick:()=>o(t.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,n.jsx)(w.Z,{data:t.value}),(0,n.jsx)(l.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},S=t(14047),D=t(1315),T=t(61317),A=t(84306),I=t(14207),E=t(59301),q=(0,l.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"}),R=t(19812),z=e=>{let{status:s,failure_reason:t}=e;if("error"===s){let e="Connection test failed.";return t&&(e+=" ".concat(t)),(0,n.jsx)(l.xvT,{"data-testid":"toast-error-msg",children:e})}return(0,n.jsx)(l.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"})},F=t(8627),L=t(32885),O=t(65450),W=t(34090),Z=t(55484),P=t(97181),N=t(57072),U=t(39864),V=t(27259);let M=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,n.jsxs)(l.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(l.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,n.jsx)(l.zxk,{bg:"primary.800",color:"white",isDisabled:s,isLoading:s,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})};var B=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:a,onCancel:i}=e,{isLoading:r}=(0,N.MO)(),o=(0,m.C)(U.qb),{errorAlert:d}=(0,S.V)();return r?null:(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:{fields:s.length>0?s:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,s)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}a(e,s)},validateOnBlur:!1,validateOnChange:!1,validationSchema:Z.Ry({fields:Z.IX().of(Z.Ry().shape({pii_field:Z.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:Z.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:Z.IX(Z.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(W.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(W.F2,{name:"fields",render:s=>{let{fields:a}=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:a&&a.length>0?a.map((e,t)=>(0,n.jsxs)(l.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(V.Z,{autoFocus:0===t,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(V.Z,{isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(P.d,{name:"fields.".concat(t,".data_categories"),options:o.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{s.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(M,{isSubmitting:t,onCancelClick:i})]})}})})})})},K=e=>{let{connectionConfig:s}=e,t=(0,p.useRef)(!1),{successAlert:a}=(0,S.V)(),{handleError:i}=(0,S.H)(),[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)([]),{isOpen:u,onOpen:m,onClose:h}=(0,l.qY0)(),{data:x,isFetching:g,isLoading:y,isSuccess:f}=(0,I.QV)(s?s.key:"",{skip:!s}),[_]=(0,I.jF)(),[b]=(0,I._d)(),v=async(e,t)=>{try{o(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await b(t).unwrap():await _(t).unwrap(),a("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){i(e)}finally{o(!1)}};(0,p.useEffect)(()=>(t.current=!0,f&&x&&c(x.fields),()=>{t.current=!1}),[x,f]);let j=(0,n.jsx)(l.wpx,{disabled:!s||r,loading:r,onClick:m,children:"Customize DSR"});return(0,n.jsxs)(n.Fragment,{children:[s?j:(0,n.jsx)(l.esZ,{title:"Save an Integration first to customize the DSR",placement:"top",children:j}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:h,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{minWidth:"775px",children:[(0,n.jsx)(l.xBx,{children:"Customize DSR"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",children:'Customize your PII fields to create a friendly label name for your privacy request packages. This "Package Label" is the label your user will see in their downloaded package.'}),(g||y)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),t.current&&!y?(0,n.jsx)(B,{data:d,isSubmitting:r,onSaveClick:v,onCancel:h}):null]})})]})]})]})},H=t(98784),Y=t.n(H),G=t(46238),$=t(73183),Q=e=>{let{options:s}=e,[t,{error:a},i]=(0,W.U$)("dataset"),{setValue:r}=i;return(0,n.jsxs)(l.NIc,{display:"flex",children:[(0,n.jsx)(l.lXp,{color:"gray.900",fontWeight:"semibold",fontSize:"sm",htmlFor:"dataset",minWidth:"150px",children:"Datasets"}),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"100%",children:[(0,n.jsx)(l.xuv,{w:"full",children:(0,n.jsx)(l.WPr,{...t,id:"dataset",placeholder:"Select datasets...",options:s,onChange:e=>r(e),mode:"multiple",className:"w-full"})}),(0,n.jsx)(l.J1D,{children:a})]}),(0,n.jsx)("div",{style:{marginLeft:"8px"},children:(0,n.jsx)(G.b,{label:"Select datasets to associate with this integration"})})]})},J=t(95492),X=e=>{let{onDelete:s,deleteResult:t}=e,{isOpen:a,onOpen:i,onClose:r}=(0,l.qY0)(),o=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&r()};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(l.xvT,{fontSize:"sm",children:"Delete integration"}),(0,n.jsx)(l.wpx,{"aria-label":"Delete integration",icon:(0,n.jsx)(J.l,{}),disabled:t.isLoading,onClick:i,className:"ml-2"})]})]}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:a,onClose:o,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsx)(l.xBx,{children:"Delete integration"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsx)(l.Kqy,{direction:"column",spacing:"15px",children:(0,n.jsx)(l.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,n.jsxs)(l.mzw,{children:[(0,n.jsx)(l.wpx,{onClick:o,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(l.wpx,{onClick:()=>{s()},loading:t.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},ee=t(99792);let es=(e,s)=>{let t={...e};return s&&Object.entries(s.properties).forEach(e=>{let[s,a]=e;if("secrets"in t||(t.secrets={}),"integer"===a.type)t.secrets[s]=a.default?Number(a.default):0;else{var i;t.secrets[s]=null!==(i=a.default)&&void 0!==i?i:""}}),t},et=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===ee.Z.SAAS&&(t+="_api"),t},ea="#/definitions/FidesDatasetReference",ei=e=>{let{secretsSchema:s,defaultValues:t,isSubmitting:a=!1,isAuthorizing:i=!1,onSaveClick:r,onTestConnectionClick:o,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:p,connectionConfig:m,initialDatasets:x,datasetDropdownOptions:g,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[b,{isLoading:v,isFetching:j}]=(0,I.h2)(),{plus:w}=(0,h.hz)(),k=(e,s,t)=>{let a;return(void 0===s||""===s||void 0===s)&&(a="".concat(e," is required")),t===ea&&(s.includes(".")?s.split(".").length<3&&(a="Dataset reference must include at least three parts"):a="Dataset reference must be dot delimited"),a},C=(e,s)=>(0,n.jsx)(l.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:s}),S=e=>{var s;if((null===(s=e.allOf)||void 0===s?void 0:s[0].$ref)===ea)return"Enter dataset.collection.field"},D=e=>{var t,a;return(null==s?void 0:null===(t=s.required)||void 0===t?void 0:t.includes(e))||(null==s?void 0:null===(a=s.properties)||void 0===a?void 0:a[e])!==void 0&&"default"in s.properties[e]},A=(e,s)=>(0,n.jsx)(W.gN,{id:"secrets.".concat(e),name:"secrets.".concat(e),validate:(!!D(e)||"integer"===s.type)&&(e=>{var t;return k(s.title,e,null===(t=s.allOf)||void 0===t?void 0:t[0].$ref)}),children:t=>{var a;let{field:i,form:r}=t,o=r.errors.secrets&&r.errors.secrets[e],d=!!r.touched.secrets&&r.touched.secrets[e],c="boolean"===s.type,u="integer"===s.type;return(0,n.jsxs)(l.NIc,{display:"flex",isRequired:D(e)&&!c,isInvalid:o&&d,children:[C(e,s.title),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[!u&&!c&&(0,n.jsx)(l.IIB,{...i,type:s.sensitive?"password":"text",placeholder:S(s),autoComplete:"off",color:"gray.700",size:"sm"}),c&&(0,n.jsx)(l.WPr,{value:!!i.value,onChange:e=>r.setFieldValue(i.name,e),options:[{label:"False",value:!1},{label:"True",value:!0}]}),u&&(0,n.jsxs)(l.Y2U,{allowMouseWheel:!0,color:"gray.700",onChange:e=>{r.setFieldValue(i.name,e)},value:null!==(a=i.value)&&void 0!==a?a:0,min:0,size:"sm",children:[(0,n.jsx)(l.zuI,{...i,autoComplete:"off"}),(0,n.jsxs)(l.FiK,{children:[(0,n.jsx)(l.WQu,{}),(0,n.jsx)(l.Y_d,{})]})]}),(0,n.jsx)(l.J1D,{children:o})]}),(0,n.jsx)(l.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(G.b,{label:s.description})})]})}},"secrets.".concat(e)),E=e=>{let t=Y().cloneDeep(e);return s&&Object.keys(s.properties).forEach(e=>{var a;if((null===(a=s.properties[e].allOf)||void 0===a?void 0:a[0].$ref)===ea){let s=t.secrets[e].split(".");t.secrets[e]={dataset:s.shift(),field:s.join("."),direction:"from"}}}),t},q=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(E(e))},R=async e=>{Object.keys(await e.validateForm()).length>0||o(await b(m.key))},z=(null==m?void 0:m.disabled)||!1;return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==m?void 0:m.key){var a,i;return e.name=null!==(i=m.name)&&void 0!==i?i:"",e.description=m.description,e.instance_key=m.connection_type===T.Rj.SAAS?null===(a=m.saas_config)||void 0===a?void 0:a.fides_key:m.key,e.enabled_actions=(m.enabled_actions||[]).map(e=>e.toString()),e.secrets=m.secrets?Y().cloneDeep(m.secrets):{},e.dataset=x,(null==s?void 0:s.properties)&&Object.entries(s.properties).forEach(s=>{var t;let[a,i]=s;if((null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)===ea){let s=e.secrets[a];s&&(e.secrets[a]="".concat(s.dataset,".").concat(s.field))}}),e}return Y().isEmpty(e.enabled_actions)&&(e.enabled_actions=p.supported_actions.map(e=>e.toString())),es(e,s)})(),onSubmit:(e,s)=>{r(E(e),s)},validateOnBlur:!1,validateOnChange:!1,children:e=>{var t;let r=!e.dirty&&(null==m?void 0:m.authorized);return(0,n.jsx)(W.l0,{noValidate:!0,children:(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)("div",{className:"flex flex-row",children:[m?(0,n.jsx)($.Z,{connection_key:null==m?void 0:m.key,disabled:z,connection_type:null==m?void 0:m.connection_type,access_type:null==m?void 0:m.access,name:null!==(t=null==m?void 0:m.name)&&void 0!==t?t:m.key,isSwitch:!0}):null,m?(0,n.jsx)(X,{onDelete:f,deleteResult:_}):null]}),!!(null==m?void 0:m.key)&&(0,n.jsx)(W.gN,{id:"instance_key",name:"instance_key",children:s=>{let{field:t}=s;return(0,n.jsxs)(l.NIc,{display:"flex",children:[C("instance_key","Integration identifier"),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(l.IIB,{...t,autoComplete:"off",color:"gray.700",isDisabled:!!(null==m?void 0:m.key),placeholder:"A unique identifier for your new ".concat(p.human_readable," integration"),size:"sm"}),(0,n.jsx)(l.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(l.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(G.b,{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."})})]})}}),p.type!==T.Zi.MANUAL&&s?Object.entries(s.properties).map(e=>{let[s,t]=e;return"advanced_settings"===s?null:A(s,t)}):null,w&&(0,n.jsx)(W.gN,{id:"enabled_actions",name:"enabled_actions",validate:e=>{let s;return e&&0!==e.length||(s="At least one request type must be selected"),s},children:s=>{let{field:t,form:a}=s;return(0,n.jsxs)(l.NIc,{"data-testid":"enabled-actions",display:"flex",isInvalid:a.touched.enabled_actions&&a.errors.enabled_actions,isRequired:!0,children:[C("enabled_actions","Request types"),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(l.WPr,{...t,placeholder:"Select...",mode:"multiple",options:p.supported_actions.map(e=>({label:Y().upperFirst(e),value:e})),onChange:e=>{a.setFieldValue(t.name,e)},disabled:1===p.supported_actions.length,className:"w-full"}),(0,n.jsx)(l.J1D,{children:e.errors.enabled_actions})]}),(0,n.jsx)(l.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(G.b,{label:"The request types that are supported for this integration."})})]})}}),T.Zi.DATABASE===p.type&&!y&&(0,n.jsx)(Q,{options:g}),(0,n.jsxs)("div",{className:"flex gap-4",children:[!p.authorization_required||r?(0,n.jsx)(l.wpx,{disabled:!(null==m?void 0:m.key)||a||_.isLoading,loading:v||j,onClick:()=>R(e),"data-testid":"test-connection-button",children:u}):null,w&&T.Zi.DATABASE===p.type&&!Y().isEmpty(x)&&(0,n.jsx)(l.wpx,{onClick:()=>d(),children:"Test datasets"}),p.authorization_required&&!r?(0,n.jsx)(l.wpx,{loading:i,onClick:()=>q(e.values,e),children:"Authorize integration"}):null,p.type===T.Zi.MANUAL?(0,n.jsx)(K,{connectionConfig:m}):null,(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit",children:"Save"})]})]})})}})},en=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:et(a,t),saas_connector_type:t.identifier,secrets:{},...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},r={systemFidesKey:a,connectionConfig:n};return Object.entries(s.properties).forEach(s=>{r.connectionConfig.secrets[s[0]]=e.secrets[s[0]]}),await i(r).unwrap()},er=async(e,s,t,a,i)=>{var n;let r=a?a.key:et(t,s),l={access:T.uv.WRITE,connection_type:s.type===T.Zi.SAAS?s.type:s.identifier,description:e.description,key:r,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:t,connectionConfigs:[l]}).unwrap();if((null===(n=o.failed)||void 0===n?void 0:n.length)>0){let e=o.failed[0].message;throw Object.assign(Error(e),{data:{detail:e}})}return o},el=async(e,s,t,a,i)=>{let n={systemFidesKey:t,secrets:{}};return(Object.entries(s.properties).forEach(s=>{s[0]in a&&e.secrets[s[0]]===a[s[0]]||(n.secrets[s[0]]=e.secrets[s[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},eo=e=>{let{secretsSchema:s,systemFidesKey:t,connectionOption:a,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,A.V)(),{handleError:l}=(0,S.H)(),o=(0,m.T)(),[d,c]=(0,p.useState)(!1),[u,x]=(0,p.useState)(!1),{dropdownOptions:g,patchConnectionDatasetConfig:y,initialDatasets:f}=(0,R.t)({connectionConfig:i}),[_]=(0,I.NG)(),[b]=(0,L.IB)(),[v]=(0,I.rO)(),[j]=(0,O.Zh)(),[w]=(0,O.qd)(),[k]=(0,L.kg)(),[C,D]=(0,O._w)(),{plus:E}=(0,h.hz)(),q=(0,p.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]),z=(0,m.C)(O.NC);return{isSubmitting:d,isAuthorizing:u,handleSubmit:async e=>{let n=!i;try{if(c(!0),a.type===T.Zi.SAAS&&n)i=(await en(e,s,a,t,E?b:_)).connection;else{let n=await er(e,a,t,i,E?k:w);i||a.type!==T.Zi.DATABASE||(i=n.succeeded[0]),a.type!==T.Zi.MANUAL&&await el(e,s,t,q,j)}i&&e.dataset&&a.type===T.Zi.DATABASE&&await y(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{c(!1)}},handleAuthorization:async e=>{let n=!i;try{x(!0),n?i=(await en(e,s,a,t,_)).connection:await el(e,s,t,q,j);let r=await v(i.key).unwrap();x(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{x(!1)}},datasetDropdownOptions:g,initialDatasets:f,handleDelete:async()=>{try{await C(t),o((0,O.db)({...z,connection_configs:null})),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:D}},ed=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i}=e,[r,o]=(0,p.useState)(),d=(0,l.pmc)(),c=t.type===T.Zi.MANUAL,{data:m}=(0,j.n3)(t.identifier,{skip:c}),{isSubmitting:h,isAuthorizing:x,handleSubmit:g,handleAuthorization:y,datasetDropdownOptions:_,initialDatasets:b,handleDelete:v,deleteDatastoreConnectionResult:w}=eo({secretsSchema:m,systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i});return m||t.type===T.Zi.MANUAL?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,n.jsxs)("div",{children:["Connect to your ",t.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),t.user_guide&&(0,n.jsx)("div",{style:{marginTop:"12px"},children:(0,n.jsxs)(E.Z,{href:t.user_guide,children:["View docs for help with this integration ",(0,n.jsx)(q,{})]})})]}),(0,n.jsx)(ei,{secretsSchema:m,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:h,isAuthorizing:x,onSaveClick:g,onTestConnectionClick:e=>{var s,t;o(e);let a=(null===(s=e.data)||void 0===s?void 0:s.test_status)==="succeeded"?"success":"error";d({...f.MA,status:a,description:(0,n.jsx)(z,{status:a,failure_reason:null===(t=e.data)||void 0===t?void 0:t.failure_reason})})},onTestDatasetsClick:()=>{u().push("/systems/configure/".concat(s,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:t,connectionConfig:a,datasetDropdownOptions:_,initialDatasets:b,isCreatingConnectionConfig:!a,onDelete:v,deleteResult:w}),a?(0,n.jsxs)(l.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[r&&r.data&&void 0!==r.fulfilledTimeStamp?(0,n.jsx)(F.s,{succeeded:"succeeded"===r.data.test_status,timestamp:r.fulfilledTimeStamp}):(0,n.jsx)(F.s,{succeeded:null==a?void 0:a.last_test_succeeded,timestamp:(null==a?void 0:a.last_test_timestamp)||""}),(0,n.jsx)(l.LZC,{})]}):null]}):null};var ec=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:a,onOpen:i,onClose:r}=(0,l.qY0)(),[o,d]=(0,p.useState)(null),{successAlert:c}=(0,S.V)(),[u,{isLoading:h}]=(0,D.qd)(),x=(0,m.C)(j.pw),{data:g}=(0,j.$I)(x),y=(0,p.useMemo)(()=>(null==g?void 0:g.items)||[],[g]),{handleError:f}=(0,S.H)(),_=()=>{h||(o&&d(null),r())},b=async()=>{try{if(o){var e;let s={...o,instance_key:o.connection_type===T.Rj.SAAS?null===(e=o.saas_config)||void 0===e?void 0:e.fides_key:o.key},a=y.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 er(s,a,t,o,u)).succeeded[0]&&c("Integration successfully linked!"),d(null),r()}}catch(e){f(e)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.wpx,{onClick:i,children:"Link integration"}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:a,size:"lg",onClose:_,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsx)(l.xBx,{children:"Unlinked Integrations"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsxs)(l.Kqy,{direction:"column",spacing:"15px",children:[(0,n.jsx)(l.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,n.jsx)(l.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,n.jsxs)(l.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,n.jsx)(w.Z,{data:e}),(0,n.jsx)(l.xvT,{children:e.name})]},e.key))})]})}),(0,n.jsxs)(l.mzw,{className:"flex gap-4",children:[(0,n.jsx)(l.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(l.wpx,{onClick:b,loading:h,disabled:!o||h,className:"w-1/2",children:"Link integration"})]})]})]})]})},eu=t(44553),ep=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:a,selectedValue:i,setSelectedValue:r}=k({connectionConfig:s}),o=(0,m.C)(I.dR),{data:d}=(0,I.AZ)({...o,orphaned_from_system:!0}),[c,u]=(0,p.useState)([]);(0,p.useEffect)(()=>{d&&u(d.items)},[d]);let h=(0,l.qY0)();return(0,n.jsxs)(l.xuv,{id:"con-wrapper",px:6,children:[(0,n.jsxs)(l.kCb,{py:5,children:[(0,n.jsxs)(l.Kqy,{direction:{base:"column",lg:"row"},children:[(0,n.jsx)(C,{list:a,label:"Integration type",selectedValue:i,onChange:r,disabled:!!(s&&null!==s)}),!s&&c.length>0?(0,n.jsx)(ec,{connectionConfigs:c,systemFidesKey:t}):null,(0,n.jsx)(b.ZP,{scopes:[T.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,n.jsx)(l.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:h.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,n.jsx)(eu.Z,{isOpen:h.isOpen,onClose:h.onClose})]}),(null==i?void 0:i.type)&&[T.Zi.DATABASE,T.Zi.DATA_CATALOG,T.Zi.SAAS,T.Zi.MANUAL,T.Zi.EMAIL].includes(i.type)?(0,n.jsx)(ed,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:r,systemFidesKey:t}):null]})},em=t(71922),eh=t(31883);let ex=e=>{let{item:s,options:t=[],onNoticeChange:a,isChild:i}=e,{external_id:r,name:o}=s,d="".concat(r,"-notice_id"),[c,,u]=(0,W.U$)(d),{setValue:p}=u;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{flexGrow:1,children:[i&&(0,n.jsx)(l.LqM,{}),(0,n.jsx)(l.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(i?"-child":""),m:0,fontSize:"14px",fontWeight:i?"normal":"semibold",children:o})]}),(0,n.jsx)(l.WPr,{...c,id:d,allowClear:!0,placeholder:"None",options:t,onChange:e=>{p(e),a(s={...s,notice_id:e})},className:"w-full","data-testid":"consentable-item-select"})]})},eg=e=>{let{connectionKey:s,...t}=e,a=(0,l.pmc)(),{data:i,isLoading:r}=(0,L.EQ)(s),[o,{isLoading:d}]=(0,L.Am)(),c=(0,m.C)(em.Zp),u=(0,m.C)(em.G1),{data:h,isLoading:x}=(0,em.J6)({page:c,size:u}),[g,y]=(0,p.useState)(),[_,b]=(0,p.useState)([]),v=(0,p.useMemo)(()=>null==g?void 0:g.reduce((e,s)=>{var t;return s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id),(null===(t=s.children)||void 0===t?void 0:t.length)&&s.children.forEach(s=>{s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id)}),e},{}),[g]),j=e=>{let s=e.notice_id;if(s){let e=null==h?void 0:h.items.filter(e=>e.id===s);if(null==e?void 0:e.length){var t;let s=(null===(t=e[0].children)||void 0===t?void 0:t.map(e=>e.id))||[];return _.filter(e=>s.includes(e.value))}}return _},w=async()=>{let e=await o({connectionKey:s,consentableItems:g});(0,eh.D4)(e)?a((0,f.Vo)("Failed to save consent automation")):a({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,n.jsx)(l.xvT,{"data-testid":"toast-success-msg",children:"Your consent automation settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,p.useEffect)(()=>{i&&y(i)},[i]),(0,p.useEffect)(()=>{h&&b(h.items.map(e=>({label:e.name,value:e.id})))},[h]),r||x)return(0,n.jsx)(l.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(l.OdW,{height:"35px"})});if(!g||!g.length||!h)return null;let k=(e,s)=>{y(g.map(t=>{if(s?t.external_id===s.external_id:t.external_id===e.external_id){if(s){var a;return{...t,children:null===(a=t.children)||void 0===a?void 0:a.map(s=>s.external_id===e.external_id?e:s)}}return e}return t}))};return(0,n.jsx)(l.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(l.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,n.jsxs)(l.Qdk,{border:"none",children:[(0,n.jsxs)(l.KFZ,{children:[(0,n.jsx)(l.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,n.jsx)(l.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Consent automation"})}),(0,n.jsx)(l.XEm,{})]}),(0,n.jsxs)(l.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,n.jsx)(l.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,n.jsx)(W.J9,{initialValues:v||{},onSubmit:w,children:(0,n.jsxs)(W.l0,{children:[(0,n.jsx)(l.MIq,{columns:2,spacing:3,children:g.map(e=>{var s;return(0,n.jsxs)(p.Fragment,{children:[(0,n.jsx)(ex,{item:e,options:_,onNoticeChange:k}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,n.jsx)(ex,{item:s,options:j(e),isChild:!0,onNoticeChange:s=>k(s,e)},s.external_id))]},e.external_id)})}),(0,n.jsx)(l.Ugi,{justifyContent:"flex-end",mt:3,children:(0,n.jsx)(l.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var ey=t(57865),ef=t(3124),e_=t.n(ef),eb=(0,l.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"}),ev=(0,l.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 ej=e=>{let s=new Date(e),t=navigator.language;return{formattedTime:s.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"}),formattedDate:s.toLocaleDateString(t,{year:"numeric",month:"long",day:"numeric"})}},ew=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,ek=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=ew(t),l=e[t],o=s[t];if("boolean"==typeof l||"boolean"==typeof o||"number"==typeof l||"number"==typeof o){l!==o&&n.push(r);return}!((Y().isNil(l)||Y().isEmpty(l))&&(Y().isNil(o)||Y().isEmpty(o)))&&(Y().isEqual(l,o)||(Y().isNil(l)||Y().isEmpty(l)?a.push(r):Y().isNil(o)||Y().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},eC=e=>{let{edited_by:s,before:t,after:a,created_at:i}=e,r=[],l=[],o=[];t.custom_fields||a.custom_fields?{addedFields:r,removedFields:l,changedFields:o}=ek(t.custom_fields,a.custom_fields):{addedFields:r,removedFields:l,changedFields:o}=ek(t,a);let d=[];if(r.length>0&&d.push(["added ",(0,n.jsx)("b",{children:r.join(", ")})]),l.length>0&&d.push(["removed ",(0,n.jsx)("b",{children:l.join(", ")})]),o.length>0&&d.push(["changed ",(0,n.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let c=d.pop(),u=d.length>0?(0,n.jsxs)(n.Fragment,{children:[d.map((e,s)=>(0,n.jsxs)(p.Fragment,{children:[e,s<d.length-1?", ":""]},s)),d.length>=2?", and ":" and ",c]}):c,{formattedTime:m,formattedDate:h}=ej(i);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:s})," ",u," on ",h," at ",m]})},eS=(e,s)=>{let t=e=>e.map(e=>{let t=s.find(s=>s.fides_key===e.fides_key);return t&&t.name?t.name:e.fides_key}),a={...e.before},i={...e.after};return a.ingress&&(a.ingress=t(a.ingress)),a.egress&&(a.egress=t(a.egress)),i.ingress&&(i.ingress=t(i.ingress)),i&&i.egress&&(i.egress=t(i.egress)),{...e,before:a,after:i}},eD=(e,s)=>{if(Y().isEmpty(s))return e;let t=(e,s)=>{var t,a;return null!==(a=null===(t=s.find(s=>s.value===e))||void 0===t?void 0:t.label)&&void 0!==a?a:e};return{...e,before:{...e.before,vendor_id:t(e.before.vendor_id,s)},after:{...e.after,vendor_id:t(e.after.vendor_id,s)}}},eT=e=>{let s=e.before.privacy_declarations||[],t=e.after.privacy_declarations||[],a=new Set([...s,...t].map(e=>e.data_use)),i=[],n=[];return a.forEach(e=>{let a=s.find(s=>s.data_use===e)||{data_use:"",data_categories:[]},r=t.find(s=>s.data_use===e)||{data_use:"",data_categories:[]};i.push(a),n.push(r)}),{...e,before:{...e.before,privacy_declarations:i},after:{...e.after,privacy_declarations:n}}},eA=e=>{let s={...e.before.custom_fields},t={...e.after.custom_fields};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,custom_fields:s},after:{...e.after,custom_fields:t}}},eI=e=>{if(!e.before.privacy_declarations||!e.before.privacy_declarations[0]||!e.before.privacy_declarations[0].custom_fields)return e;let s={...e.before.privacy_declarations[0].custom_fields},t=e.after.privacy_declarations&&e.after.privacy_declarations[0]?{...e.after.privacy_declarations[0].custom_fields}:{};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,privacy_declarations:[{...e.before.privacy_declarations[0],custom_fields:s}]},after:{...e.after,privacy_declarations:[{...e.after.privacy_declarations[0],custom_fields:t}]}}},eE=(0,p.createContext)(null),eq=()=>(0,p.useContext)(eE);var eR=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,p.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,n.jsx)(eE.Provider,{value:i,children:s})},ez=t(62165),eF=t(30320),eL=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eq(),i=p.Children.toArray(t).filter(e=>{if(p.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=Y().get(null==a?void 0:a.before,s),i=Y().get(null==a?void 0:a.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&Y().isEmpty(t),r="boolean"!=typeof i&&"number"!=typeof i&&Y().isEmpty(i);return!n||!r}return!1});return 0===i.length?null:(0,n.jsx)(l.Kqy,{marginTop:"0px !important",children:(0,n.jsxs)(l.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,n.jsx)(l.X6q,{as:"h3",size:"xs",children:s})}),(0,n.jsx)(l.Kqy,{children:i})]})})},eO=t(40324),eW=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eq(),[d]=(0,W.U$)(i.name),c={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,p.useRef)(null),[m,h]=(0,p.useState)(null),[x,g]=(0,p.useState)([]),[y,f]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=Y().get(null==r?void 0:r.before,i.name)||[],s=Y().get(null==r?void 0:r.after,i.name)||[];f(!Y().isEqual(e,s)),g(e.length>s.length?e:s)},[r,i.name]),(0,p.useEffect)(()=>{u.current&&h(u.current.offsetHeight)},[x]);let _={};return y&&(_="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,n.jsx)(l.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,n.jsx)(G.b,{label:a})]}),(0,n.jsx)(l.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(m,"px")},children:(m?c.value:x).map((e,s)=>(0,n.jsx)(l.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},s))}),"before"===o&&y&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eZ=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eq(),[d]=(0,W.U$)(i),c={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,p.useRef)(null),[m,h]=(0,p.useState)(null),[x,g]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=Y().get(null==r?void 0:r.before,i.name)||"",s=Y().get(null==r?void 0:r.after,i.name)||"";g(!Y().isEqual(e,s));let t=e.length>s.length?e:s;u.current&&(u.current.textContent=t,h(u.current.offsetHeight),u.current.textContent=c.value)},[r,i.name,c.value]);let y={};return x&&(y="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,n.jsx)(l.NIc,{style:y,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,n.jsx)(G.b,{label:a})]}),(0,n.jsx)(l.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(m,"px")},children:c.value}),"before"===o&&x&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eP=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:a}=(0,eF.m)({resourceType:t}),i=e=>Array.from(a.values()).some(s=>s.name===e&&!!s.allow_list_id),r=t===T.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",l=Object.keys(s).sort();return(0,n.jsx)(eL,{heading:"Custom fields",children:l.map(e=>i(e)?(0,n.jsx)(eW,{label:e,name:"".concat(r,".").concat(e)},e):(0,n.jsx)(eZ,{label:e,name:"".concat(r,".").concat(e)},e))})},eN=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:r}=eq(),[o]=(0,W.U$)(a),d={...o,value:o.value},[c,u]=(0,p.useState)(!1);(0,p.useEffect)(()=>{u(Y().get(null==i?void 0:i.before,a.name)!==Y().get(null==i?void 0:i.after,a.name))},[i,a.name,d.value]);let m={};return c&&(m="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,n.jsx)(l.NIc,{style:m,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",minHeight:"46px",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),(0,n.jsx)(G.b,{label:t})]}),void 0!==d.value&&(0,n.jsx)(l.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===r&&c&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eU=e=>{let{initialValues:s}=e,t=(0,ez.hz)();return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,n.jsx)(W.l0,{children:(0,n.jsxs)(l.Kqy,{children:[(0,n.jsxs)(eL,{heading:"System details",children:[t.dictionaryService?(0,n.jsx)(eZ,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,n.jsx)(eZ,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eZ,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,n.jsx)(eZ,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eW,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,n.jsx)(eL,{heading:"Dataset reference",children:(0,n.jsx)(eW,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,n.jsxs)(eL,{heading:"Data processing properties",children:[(0,n.jsx)(eN,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,n.jsx)(eN,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,n.jsx)(eZ,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,n.jsx)(eN,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,n.jsx)(eW,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,n.jsx)(eN,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,n.jsx)(eW,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,n.jsx)(eN,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,n.jsx)(eZ,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,n.jsxs)(eL,{heading:"Administrative properties",children:[(0,n.jsx)(eZ,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,n.jsx)(eZ,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,n.jsx)(eZ,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,n.jsx)(eZ,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,n.jsx)(eZ,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,n.jsx)(eW,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,n.jsx)(eZ,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,n.jsx)(eZ,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,n.jsx)(eZ,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,n.jsx)(eP,{customFields:s.custom_fields,resourceType:T.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,n.jsxs)(p.Fragment,{children:[(0,n.jsxs)(eL,{heading:"Data use",children:[(0,n.jsx)(eZ,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].legal_basis_for_processing"),label:"Legal basis for processing",tooltip:"What is the legal basis under which personal data is processed for this purpose?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,n.jsx)(eL,{heading:"Features",children:(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,n.jsx)(eL,{heading:"Dataset reference",children:(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,n.jsxs)(eL,{heading:"Special category data",children:[(0,n.jsx)(eN,{name:"privacy_declarations[".concat(t,"].processes_special_category_data"),label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,n.jsxs)(eL,{heading:"Third parties",children:[(0,n.jsx)(eN,{name:"privacy_declarations[".concat(t,"].data_shared_with_third_parties"),label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,n.jsx)(eP,{customFields:s.privacy_declarations[0].custom_fields,resourceType:T.P6.PRIVACY_DECLARATION})]},t)),(0,n.jsxs)(eL,{heading:"Data flow",children:[(0,n.jsx)(eW,{name:"ingress",label:"Sources"}),(0,n.jsx)(eW,{name:"egress",label:"Destinations"})]})]})})})};let eV=(e,s)=>{let t=[],a=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||s.egress||e.ingress||s.ingress)&&t.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||s.privacy_declarations&&s.privacy_declarations.length>0;i&&t.push("Data Uses");let n=[...Object.keys(e),...Object.keys(s)].some(e=>!a.has(e));return!i&&n&&t.unshift("System Information"),t};var eM=e=>{let{selectedHistory:s,isOpen:t,onClose:a}=e;return(0,n.jsxs)(l.u_l,{isOpen:t,onClose:a,size:"4xl",children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsxs)(l.xBx,{backgroundColor:e_().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,n.jsxs)(l.X6q,{size:"xs",children:[(0,n.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),s&&(0,n.jsx)(n.Fragment,{children:eV(s.before,s.after).map((e,s)=>(0,n.jsx)(l.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.olH,{})]})]}),(0,n.jsx)(l.fef,{paddingTop:0,paddingBottom:6,children:(0,n.jsxs)(l.kCb,{justifyContent:"space-between",children:[(0,n.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,n.jsx)(eR,{selectedHistory:s,formType:"before",children:(0,n.jsx)(eU,{initialValues:null==s?void 0:s.before})})}),(0,n.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,n.jsx)(eR,{selectedHistory:s,formType:"after",children:(0,n.jsx)(eU,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eB=e=>{let{system:s}=e,[t,a]=(0,p.useState)(1),{data:i}=(0,L.Xc)({system_key:s.fides_key,page:t,size:10}),[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)(null),u=(0,m.C)(L.o),{data:h=[]}=(0,O.K3)(),x=(null==i?void 0:i.items)||[],g=e=>{c(e=eI(e=eA(e=eS(e=eD(e=eT(e),u),h)))),o(!0)},{formattedTime:y,formattedDate:f}=ej(s.created_at),_=i&&i.total?Math.ceil(i.total/10):0;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.iA_,{ml:"24px",children:[(0,n.jsx)(l.hrZ,{children:(0,n.jsx)(l.Tr,{children:(0,n.jsxs)(l.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:e_().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,n.jsx)(l.p3B,{children:x.map((e,s)=>{let t=eC(e);return t?(0,n.jsx)(l.Tr,{onClick:()=>g(e),style:{cursor:"pointer"},children:(0,n.jsx)(l.Td,{pt:"10px",pb:"10px",pl:"16px",fontSize:"12px",border:"1px solid #E2E8F0",children:t})},s):null})})]}),((null==i?void 0:i.total)||0)>10&&(0,n.jsxs)(l.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,n.jsxs)(l.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"600",paddingX:2,children:[(t-1)*10+1," -"," ",Math.min(10*t,(null==i?void 0:i.total)||0)," of"," ",(null==i?void 0:i.total)||0]}),(0,n.jsx)(l.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&a(t-1)},disabled:1===t,icon:(0,n.jsx)(ev,{})}),(0,n.jsx)(l.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,n.jsx)(eb,{})})]}),(0,n.jsx)(eM,{selectedHistory:d,isOpen:r,onClose:()=>{o(!1),c(null)}})]})},eK=t(52368),eH=t(3765),eY=e=>{let{title:s,description:t,handleAdd:a}=e;return(0,n.jsx)(l.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,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,n.jsxs)(l.xuv,{children:[(0,n.jsx)(l.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,n.jsx)(l.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,n.jsx)(l.Ugi,{mt:4,children:(0,n.jsx)(l.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:a,icon:(0,n.jsx)(l.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},eG=t(58452);let e$=e=>{let{declaration:s,title:t,handleDelete:a,handleEdit:i}=e,{isOpen:r,onOpen:o,onClose:d}=(0,l.qY0)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,n.jsx)(l.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.AB5,{onClick:()=>i(s),role:"button",tabIndex:0,children:(0,n.jsx)(l.xvT,{children:t||s.data_use})}),(0,n.jsx)(l.LZC,{}),a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:o,"data-testid":"delete-btn",children:(0,n.jsx)(l.pJl,{})}),(0,n.jsx)(eG.Z,{isOpen:r,onClose:d,onConfirm:()=>a(s),title:"Delete data use declaration",message:(0,n.jsxs)(l.xvT,{children:["You are about to delete the data use declaration"," ",(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:t||s.data_use}),", including all its cookies. Are you sure you want to continue?"]}),isCentered:!0})]}):null]})})}),(0,n.jsx)(l.izJ,{})]})},eQ=e=>{let{heading:s,children:t,headerButton:a,footerButton:i}=e;return(0,n.jsx)(l.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,n.jsxs)(l.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,n.jsxs)(l.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,n.jsx)(l.X6q,{as:"h3",size:"xs",children:s}),(0,n.jsx)(l.LZC,{}),a||null]}),(0,n.jsx)(l.Kqy,{spacing:0,children:t}),(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:i||null})]})})},eJ=e=>{let{heading:s,declarations:t,handleAdd:a,handleDelete:i,handleEdit:r,allDataUses:o}=e,d=e=>{let s=o.filter(s=>s.fides_key===e.data_use)[0];return s?e.name?"".concat(s.name," - ").concat(e.name):s.name:""},c=(0,m.C)(ey.gU);return(0,n.jsx)(eQ,{heading:s,footerButton:c?null:(0,n.jsx)(l.wpx,{onClick:a,size:"small",icon:(0,n.jsx)(l.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,n.jsx)(e$,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:r},e.id))})};var eX=t(95346),e0=t(54748),e1=t(28325),e2=t(30234);let e4=Z.Ry().shape({data_categories:Z.IX(Z.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:Z.Z_().required().label("Data use")}),e3={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},id:""},e5=e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:"",special_category_legal_basis:e.processes_special_category_data?e.special_category_legal_basis:void 0,third_parties:e.data_shared_with_third_parties?e.third_parties:void 0,shared_categories:e.data_shared_with_third_parties?e.shared_categories:void 0}},e9=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,values:r,includeCustomFields:o,privacyDeclarationId:d,lockedForGVL:c}=e,u=!!d,{legalBasisOptions:m}=(0,e0.Z)(),{specialCategoryLegalBasisOptions:h}=(0,e1.Z)(),x=(0,p.useMemo)(()=>i?i.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[i]);return(0,n.jsxs)(l.Kqy,{spacing:4,children:[(0,n.jsxs)(e2.Z,{heading:"Data use declaration",children:[(0,n.jsx)(eO.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:u||c,variant:"stacked"}),(0,n.jsx)(P.d,{id:"data_use",label:"Data use",name:"data_use",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:u||c}),(0,n.jsx)(P.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data are collected for this purpose?",mode:"multiple",isRequired:!0,disabled:c,layout:"stacked"}),(0,n.jsx)(P.d,{name:"data_subjects",label:"Data subjects",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",disabled:c,layout:"stacked"}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(P.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:c}),(0,n.jsx)(l.UO1,{in:"Legitimate interests"===r.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked",disabled:c})})})]}),(0,n.jsx)(l.xuv,{mt:5,pl:4,children:(0,n.jsx)(eO.w8,{name:"flexible_legal_basis_for_processing",label:"This legal basis is flexible",tooltip:"Has the vendor declared that the legal basis may be overridden?",variant:"stacked",isDisabled:c})}),(0,n.jsx)(eO.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:c})]}),(0,n.jsx)(e2.Z,{heading:"Features",children:(0,n.jsx)(P.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:c,mode:"tags"})}),(0,n.jsx)(e2.Z,{heading:"Dataset reference",children:(0,n.jsx)(P.d,{name:"dataset_references",label:"Dataset references",options:x,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:c})}),(0,n.jsx)(e2.Z,{heading:"Special category data",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.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:c}),(0,n.jsx)(l.UO1,{in:r.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(P.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:h,isRequired:r.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked",disabled:c})})})]})}),(0,n.jsx)(e2.Z,{heading:"Third parties",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.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:c}),(0,n.jsx)(l.UO1,{in:r.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsxs)(l.Kqy,{mt:4,spacing:4,children:[(0,n.jsx)(eO.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked",disabled:c}),(0,n.jsx)(P.d,{name:"shared_categories",label:"Shared categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data does this system share with third parties?",layout:"stacked",mode:"multiple",disabled:c})]})})]})}),o?(0,n.jsx)(eX.uc,{resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:d}):null]})},e6=(e,s)=>e?{...e,customFieldValues:s||{}}:e3,e8=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,eX.mZ)({resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e5(e),r=await s(i,t);if(r){let s=r.filter(s=>s.data_use===e.data_use&&(!s.name||s.name===e.name));s.length>0&&await n({customFieldValues:a,fides_key:s[0].id})}},initialValues:(0,p.useMemo)(()=>e6(t,i),[t,i])}},e7=e=>{let{onSubmit:s,onCancel:t,initialValues:a,...i}=e,r=null==a?void 0:a.id,{handleSubmit:o,initialValues:d}=e8({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:r}),c=(0,m.C)(ey.gU);return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:d,onSubmit:o,validationSchema:e4,children:e=>{let{dirty:s,values:a}=e;return(0,n.jsxs)(W.l0,{"data-testid":"declaration-form",children:[(0,n.jsx)(x.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,n.jsxs)(l.Kqy,{spacing:4,children:[(0,n.jsx)(e9,{values:a,lockedForGVL:c,privacyDeclarationId:r,...i}),(0,n.jsxs)(l.kCb,{w:"100%",children:[(0,n.jsx)(l.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),c?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",disabled:!s,"data-testid":"save-btn",children:"Save"})]})]})]})]})}})},se=e=>{let{isOpen:s,onClose:t,heading:a,isCentered:i=!1,testId:r="privacy-declaration-modal",children:o}=e;return(0,n.jsxs)(l.u_l,{isOpen:s,onClose:t,isCentered:i,scrollBehavior:"inside",size:"3xl",children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{textAlign:"left",p:0,"data-testid":r,children:[(0,n.jsx)(l.xBx,{p:0,children:(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,n.jsx)(l.X6q,{as:"h3",size:"sm",children:a})})}),(0,n.jsx)(l.fef,{pb:4,children:o})]})]})};var ss=e=>{let{system:s,includeCustomFields:t,...a}=e,{isOpen:i,onClose:r,onOpen:o}=(0,l.qY0)(),[d,c]=(0,p.useState)(void 0),{createDataUse:u,updateDataUse:m,deleteDataUse:h}=(0,eH.Z)(s),x=()=>{r(),c(void 0)},g=()=>{o(),c(void 0)},y=async e=>(x(),d)?m(d,e):u(e);return(0,p.useEffect)(()=>{r()},[r,s.fides_key]),(0,n.jsxs)(l.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===s.privacy_declarations.length?(0,n.jsx)(eY,{title:"You don't have a data use set up for this system yet.",description:'A Data Use is the purpose for which data is used in a system. In Fides, a system may have more than one Data Use. For example, a CRM system may be used both for "Customer Support" and also for "Email Marketing", each of these is a Data Use.',handleAdd:g}):(0,n.jsx)(eJ,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:g,handleEdit:e=>{o(),c(e)},handleDelete:h,allDataUses:a.allDataUses}),(0,n.jsx)(se,{isOpen:i,onClose:x,heading:"Configure data use",children:(0,n.jsx)(e7,{initialValues:d,onSubmit:y,onCancel:x,includeCustomFields:t,...a})})]})},st=e=>{let{system:s}=e,{isLoading:t,...a}=(0,eK.f)({includeDatasets:!0,includeDisabled:!1}),i=a.allDataCategories.filter(e=>e.active),r=a.allDataUses.filter(e=>e.active),o=a.allDataSubjects.filter(e=>e.active),c={...a,allDataCategories:i,allDataUses:r,allDataSubject:o};return(0,n.jsxs)(l.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,n.jsx)(l.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,n.jsxs)(l.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,n.jsx)(l.rUS,{as:d(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,n.jsx)(l.$jN,{}):(0,n.jsx)(ss,{system:s,includeCustomFields:!0,...c})]})},sa=t(812),si=t(93237),sn=t(69525),sr=t(33335);let sl={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:""},so=(e,s)=>{var t;let a=null==e?void 0:null===(t=e.data_stewards)||void 0===t?void 0:t.map(e=>e.username).join(", ");return{...e,customFieldValues:s,description:e.description?e.description:"",legal_address:e.legal_address?e.legal_address:"",dpo:e.dpo?e.dpo:"",cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:"",legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:"",vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,privacy_policy:e.privacy_policy?e.privacy_policy:"",data_security_practices:e.data_security_practices?e.data_security_practices:"",legal_basis_for_profiling:e.legal_basis_for_profiling?e.legal_basis_for_profiling:"",legal_basis_for_transfers:e.legal_basis_for_transfers?e.legal_basis_for_transfers:"",data_stewards:a}},sd=e=>{let s=e.fides_key?e.fides_key:(0,sr.E)(e.name),t=""===e.privacy_policy?void 0:e.privacy_policy,a={system_type:e.system_type,fides_key:s,name:e.name,description:e.description?e.description:"",dataset_references:e.dataset_references,tags:e.tags,processes_personal_data:e.processes_personal_data,exempt_from_privacy_regulations:e.exempt_from_privacy_regulations,reason_for_exemption:e.exempt_from_privacy_regulations?e.reason_for_exemption:void 0,privacy_declarations:e.processes_personal_data?e.privacy_declarations:[],vendor_id:e.vendor_id,ingress:e.ingress,egress:e.egress,meta:e.meta,fidesctl_meta:e.fidesctl_meta,organization_fides_key:e.organization_fides_key,dpa_progress:e.dpa_progress,previous_vendor_id:e.previous_vendor_id,cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:void 0,uses_cookies:e.uses_cookies,cookie_refresh:e.cookie_refresh,uses_non_cookie_access:e.uses_non_cookie_access,legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:void 0,vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0};return e.processes_personal_data&&(a={...a,dataset_references:e.dataset_references,uses_profiling:e.uses_profiling,legal_basis_for_profiling:e.uses_profiling?e.legal_basis_for_profiling:void 0,does_international_transfers:e.does_international_transfers,legal_basis_for_transfers:e.does_international_transfers?e.legal_basis_for_transfers:void 0,requires_data_protection_assessments:e.requires_data_protection_assessments,dpa_location:e.requires_data_protection_assessments?e.dpa_location:void 0,privacy_policy:t,legal_name:e.legal_name,legal_address:e.legal_address,responsibility:e.responsibility,dpo:e.dpo,data_security_practices:e.data_security_practices},e.administrating_department&&(a.administrating_department=e.administrating_department),e.joint_controller_info&&(a.joint_controller_info=e.joint_controller_info)),a},{useGetSystemAssetsQuery:sc,useAddSystemAssetMutation:su,useUpdateSystemAssetsMutation:sp,useDeleteSystemAssetsMutation:sm,usePopulateSystemAssetsMutation:sh}=t(78780).u.injectEndpoints({endpoints:e=>({getSystemAssets:e.query({query:e=>{let{fides_key:s,...t}=e;return{method:"GET",url:"/plus/system-assets/".concat(s),params:t}},providesTags:["System Assets"]}),addSystemAsset:e.mutation({query:e=>{let{systemKey:s,asset:t}=e;return{method:"POST",url:"/plus/system-assets/".concat(s,"/assets"),body:t}},invalidatesTags:["System Assets"]}),updateSystemAssets:e.mutation({query:e=>{let{systemKey:s,assets:t}=e;return{method:"PUT",url:"/plus/system-assets/".concat(s,"/assets/"),body:t}},invalidatesTags:["System Assets"]}),deleteSystemAssets:e.mutation({query:e=>{let{systemKey:s,asset_ids:t}=e;return{method:"DELETE",url:"/plus/system-assets/".concat(s,"/assets?").concat((0,v.du)(t,"asset_ids"))}},invalidatesTags:["System Assets"]}),populateSystemAssets:e.mutation({query:e=>{let{systemKey:s}=e;return{method:"POST",url:"/plus/dictionary/system-vendors/cookie-assets",body:[s]}}})})});var sx=t(36345);let sg=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sy=[{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"}],sf=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),s_=e=>{var s;let{system:t}=e,a=t?null!==(s=t.name)&&void 0!==s?s:"this system":"your new system";return(0,n.jsxs)(l.X6q,{as:"h3",size:"lg",children:["Describe ",a]})};var sb=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:r=[]}=(0,O.K3)(),o=(0,m.T)(),d=(0,eX.mZ)({resourceType:T.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...c}=(0,eK.f)({includeDatasets:!0,includeDisabled:!1}),u=(0,p.useMemo)(()=>t?so(t,d.customFieldValues):sl,[t,d.customFieldValues]),[h]=(0,O.in)(),g=(0,p.useMemo)(()=>Z.Ry().shape({name:Z.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await h({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(e=>e.name!==u.name).some(s=>s.name===e)||s.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})}),privacy_policy:Z.Z_().min(1).url().nullable()}),[h,u.name]),y=(0,ez.hz)(),[_,b]=(0,O.f7)(),[v,j]=(0,O.qQ)(),[w]=sh();(0,L.Rd)(void 0,{skip:!y.dictionaryService});let[k]=(0,L.qz)(),C=(0,m.C)(L.o),S=(0,m.C)(ey.gU),D=(0,p.useMemo)(()=>!!(t&&(null==r?void 0:r.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,r]),A=(0,p.useMemo)(()=>c.allDatasets?c.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[c.allDatasets]),I=(0,l.pmc)(),E=async(e,t)=>{var a;let i,n;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await k({vendor_id:e.vendor_id});if(s.isError){if(!((0,sa.fn)(s.error)&&404===s.error.status)){let e=(0,sa.e$)(s.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.");I((0,f.Vo)(e))}}else s.data&&s.data.items.length>0&&(i=s.data.items.map(e=>{var s;return{...(0,sn.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let r=sd({...e,privacy_declarations:null!=i?i:e.privacy_declarations});if(n=D?await v(r):await _(r),await d.upsertCustomFields(e),!D&&e.vendor_id&&(null===(a=n.data)||void 0===a?void 0:a.fides_key)){let e=await w({systemKey:n.data.fides_key});(0,sa.D4)(e)&&I((0,f.Vo)("An unexpected error occurred while populating the system assets from Compass. Please try again."))}(0,sa.D4)(n)?I({status:"error",description:(0,sa.e$)(n.error,"An unexpected error occurred while ".concat(D?"editing":"creating"," the system. Please try again."))}):(I.closeAll(),t.resetForm({values:e}),s(n.data),o((0,ey.b3)("initial")))},q=e=>{if(y.dictionaryService){if(!e){o((0,ey.b3)("hiding")),o((0,ey.gQ)(!1));return}o((0,ey.b3)("showing")),y.tcf&&(0,sa.cj)(e)===sa.c6.GVL?o((0,ey.gQ)(!0)):o((0,ey.gQ)(!1))}},R=j.isLoading||b.isLoading||d.isLoading;return(0,n.jsx)(W.J9,{initialValues:u,enableReinitialize:!0,onSubmit:E,validationSchema:g,children:e=>{let{dirty:s,values:r,isValid:o}=e;return(0,n.jsxs)(W.l0,{children:[(0,n.jsx)(x.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,n.jsxs)(l.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[a?(0,n.jsx)(s_,{system:t}):null,(0,n.jsx)(l.xvT,{fontSize:"sm",fontWeight:"medium",children:"By providing a small amount of additional context for each system we can make reporting and understanding our tech stack much easier for everyone from engineering to legal teams. So let’s do this now."}),a?(0,n.jsx)(s_,{system:t}):null,(0,n.jsxs)(e2.Z,{heading:"System details",children:[y.dictionaryService?(0,n.jsx)(sx.Z,{label:"System name",options:C,onVendorSelected:q,isCreate:!t,lockedForGVL:S}):(0,n.jsx)(eO.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(null==t?void 0:t.fides_key)&&(0,n.jsx)(eO.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,n.jsx)(si.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:S}),(0,n.jsx)(P.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:u.tags?u.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:S})]}),(0,n.jsx)(e2.Z,{heading:"Dataset reference",children:(0,n.jsx)(P.d,{name:"dataset_references",label:"Dataset references",options:A,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:S})}),(0,n.jsx)(e2.Z,{heading:"Data processing properties",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(l.xuv,{mb:4,children:(0,n.jsx)(si.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:S})}),(0,n.jsx)(l.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(si.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!r.processes_personal_data||S}),(0,n.jsx)(l.UO1,{in:r.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:r.exempt_from_privacy_regulations,disabled:S})})})]})}),(0,n.jsx)(l.UO1,{in:r.processes_personal_data&&!r.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,n.jsxs)(l.Kqy,{spacing:4,mt:4,children:[(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(si.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:S}),(0,n.jsx)(l.UO1,{in:r.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(P.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:sg,tooltip:"What is the legal basis under which profiling is performed?",disabled:S,isRequired:r.uses_profiling})})})]}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(si.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,n.jsx)(l.UO1,{in:r.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(P.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sy,tooltip:"What is the legal basis under which the data is transferred?",isRequired:r.does_international_transfers,disabled:S})})})]}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.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,n.jsx)(l.UO1,{in:r.requires_data_protection_assessments,animateOpacity:!0,children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:S,isRequired:r.requires_data_protection_assessments})})})]})]})})]})}),(0,n.jsxs)(l.UO1,{in:r.processes_personal_data&&!r.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,n.jsxs)(e2.Z,{heading:"Cookie properties",children:[(0,n.jsx)(si.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:S}),(0,n.jsx)(si.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:S}),(0,n.jsx)(si.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,n.jsx)(si.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,n.jsxs)(e2.Z,{heading:"Administrative properties",children:[(0,n.jsx)(eO.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,n.jsx)(si.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:S}),(0,n.jsx)(si.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?",disabled:S}),(0,n.jsx)(si.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?",disabled:S}),(0,n.jsx)(eO.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||S}),(0,n.jsx)(P.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:sf,tooltip:"What is the role of the business with regard to data processing?",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||S}),(0,n.jsx)(si.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:S}),(0,n.jsx)(eO.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||S}),(0,n.jsx)(si.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,n.jsx)(si.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:S}),(0,n.jsx)(si.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})]}),r.fides_key?(0,n.jsx)(eX.uc,{resourceType:T.P6.SYSTEM,resourceFidesKey:r.fides_key}):null]})]}),(0,n.jsx)(l.xuv,{mt:6,children:(0,n.jsx)(l.wpx,{htmlType:"submit",type:"primary",disabled:R||!s||!o,loading:R,"data-testid":"save-btn",children:"Save"})}),i]})}})},sv=t(59003),sj=t(92222),sw=t(30952),sk=t(14481),sC=t(90111),sS=t(8133),sD=t(83099),sT=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[r,o,{setValue:d,setTouched:c}]=(0,W.U$)(s),u=!!(o.touched&&o.error);return(0,n.jsx)(l.NIc,{isInvalid:u,isRequired:!0,children:(0,n.jsxs)(l.jqI,{vertical:!0,children:[(0,n.jsxs)(l.jqI,{align:"center",children:[t&&(0,n.jsx)(eO.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,n.jsx)(G.b,{label:i})]}),(0,n.jsx)(sD.Z,{...r,mode:"multiple",selectedTaxonomies:[],onChange:e=>{d(e)},onBlur:()=>c(!0),variant:"outlined",autoFocus:!1,status:u?"error":void 0,"data-testid":"controlled-select-".concat(s)}),(0,n.jsx)(eO.Bc,{isInvalid:u,message:o.error,fieldName:s})]})})};(a=i||(i={})).COOKIE="Cookie",a.BROWSER_REQUEST="Browser Request",a.I_FRAME="iFrame",a.JAVASCRIPT_TAG="Javascript tag",a.IMAGE="Image";let sA=Z.Ry().shape({name:Z.Z_().required("Enter a name for this asset"),domain:Z.Z_().required("Enter a valid domain for this asset"),asset_type:Z.Z_().required("Select an asset type"),data_uses:Z.IX().min(1,"Select at least one data use"),base_url:Z.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sI={name:"",description:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sE=e=>{let{isOpen:s,onClose:t,systemKey:a,asset:r,...o}=e,d=!r,[c,{isLoading:u}]=su(),[p,{isLoading:m}]=sp(),h=(0,l.pmc)(),x=async e=>{let s=await c({systemKey:a,asset:e});if((0,sa.D4)(s)){let e=(0,sa.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,f.Vo)(e))}else h((0,f.t5)("Asset added successfully")),t()},g=async e=>{let s=await p({systemKey:a,assets:[e]});if((0,sa.D4)(s)){let e=(0,sa.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,f.Vo)(e))}else h((0,f.t5)("Asset updated successfully")),t()};return(0,n.jsx)(sS.Z,{title:d?"Add asset":"Edit asset",onClose:t,isOpen:s,...o,children:(0,n.jsx)(W.J9,{initialValues:null!=r?r:sI,onSubmit:e=>{d?x(e):g(e)},validationSchema:sA,children:e=>{let{values:s,isValid:a,dirty:r}=e;return(0,n.jsxs)(W.l0,{children:[(0,n.jsxs)(l.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,n.jsx)(sC.Z,{children:(0,n.jsx)(l.xvT,{fontSize:"sm",children:"Create and configure assets (e.g. cookies, pixels, tags) for this system to ensure proper consent enforcement. Adding assets manually allows you to define key attributes, assign categories, and align them with compliance requirements."})}),(0,n.jsxs)(l.jqI,{vertical:!0,gap:20,children:[(0,n.jsx)(eO.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!d}),(0,n.jsx)(P.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,sa.MM)(i),layout:"stacked",disabled:!d}),(0,n.jsx)(sT,{name:"data_uses",label:"Data uses",layout:"stacked"}),(0,n.jsx)(eO.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!d}),(0,n.jsx)(eO.Ks,{id:"description",name:"description",label:"Description",variant:"stacked"}),(0,n.jsx)(l.UO1,{in:!!s.asset_type&&"Cookie"!==s.asset_type,children:(0,n.jsx)(eO.j0,{id:"base_url",name:"base_url",label:"Base URL",variant:"stacked",isRequired:!!s.asset_type&&"Cookie"!==s.asset_type})})]})]}),(0,n.jsxs)(l.jqI,{justify:"space-between",children:[(0,n.jsx)(l.wpx,{onClick:t,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",loading:u||m,disabled:!a||!r,"data-testid":"save-btn",children:"Save"})]})]})}})})},sq=t(8411),sR=t(72625),sz=t(29850),sF=t(77685),sL=e=>{let{systemKey:s,systemName:t,asset:a,readonly:i}=e,[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)(),[u,m]=(0,p.useState)(!1),[h,{isLoading:x}]=sp(),{successAlert:g,errorAlert:y}=(0,S.V)(),f=(0,l.qY0)(),{asset_type:_,name:b}=a,v=(0,p.useCallback)(e=>{e.preventDefault(),m(!0)},[]),j=async e=>{if(!e)return;let{newSystemKey:t,newSystemName:i,isNewSystem:n}=e,r=await h({systemKey:s,assets:[{id:a.id,system_key:t}]});(0,eh.D4)(r)?y((0,sa.e$)(r.error)):g(n?"".concat(i," has been added to your system inventory and the ").concat(_,' "').concat(b,'" has been assigned to that system.'):"".concat(_," ").concat(b," has been assigned to ").concat(i)),o(!1),c(void 0)},w=e=>{c(e),f.onOpen()};return i?(0,n.jsx)(l.j8w,{"data-testid":"system-badge",color:"white",children:t}):(0,n.jsxs)(n.Fragment,{children:[!r&&(0,n.jsxs)(l.j8w,{"data-testid":"system-badge",color:"white",onClick:()=>o(!0),children:[t," ",(0,n.jsx)(l.PJP.I8b,{})]}),!!r&&(0,n.jsx)(sz.R,{variant:"borderless",className:"w-full",autoFocus:!0,defaultOpen:!0,defaultValue:s,onBlur:e=>{var s;(null===(s=e.relatedTarget)||void 0===s?void 0:s.getAttribute("id"))!=="add-new-system"&&o(!1)},onAddSystem:v,onSelect:(e,s)=>w({newSystemKey:e,newSystemName:s.label}),loading:x}),u&&(0,n.jsx)(sF.i,{isOpen:!0,onClose:()=>m(!1),onSuccessfulSubmit:(e,s)=>w({newSystemKey:e,newSystemName:s,isNewSystem:!0})}),(0,n.jsx)(l.cVQ,{isOpen:f.isOpen,onClose:f.onClose,onConfirm:()=>{j(d)},title:"Reassign asset",message:"Are you sure you want to reassign this asset to ".concat(null==d?void 0:d.newSystemName,"?"),isCentered:!0})]})},sO=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:r}]=sm(),o=(0,l.pmc)(),{isOpen:d,onClose:c,onOpen:u}=(0,l.qY0)(),p=async()=>{let e=await i({systemKey:t,asset_ids:[s.id]});(0,eh.D4)(e)?o((0,f.Vo)((0,sa.e$)(e.error,"A problem occurred removing this asset. Please try again"))):o((0,f.t5)("Asset removed successfully"))};return(0,n.jsxs)(l.jqI,{className:"gap-1",children:[(0,n.jsx)(l.wpx,{size:"small",onClick:a,"data-testid":"edit-btn",children:"Edit"}),(0,n.jsx)(l.wpx,{size:"small",onClick:u,loading:r,"data-testid":"remove-btn",children:"Remove"}),(0,n.jsx)(l.cVQ,{isOpen:d,onClose:c,onConfirm:p,title:"Remove asset",message:"Are you sure you want to ignore the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]})},sW=t(34929),sZ=t(26183),sP=e=>{var s,t;let{asset:a,systemId:i,readonly:r}=e,{getDataUseDisplayName:o}=(0,sW.Z)(),[d]=sp(),{errorAlert:c,successAlert:u}=(0,A.V)(),[m,h]=(0,p.useState)(!1),x=async e=>{let s=[...a.data_uses||[],e],t=await d({systemKey:i,assets:[{id:a.id,data_uses:s}]});(0,eh.D4)(t)?c((0,sa.e$)(t.error)):u("Consent category added to ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},g=async e=>{var s;let t=null===(s=a.data_uses)||void 0===s?void 0:s.filter(s=>s!==e),n=await d({systemKey:i,assets:[{id:a.id,data_uses:t}]});(0,eh.D4)(n)?c((0,sa.e$)(n.error)):u("Consent category removed from ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},y=null!==(t=null===(s=a.data_uses)||void 0===s?void 0:s.map(e=>({label:o(e),key:e})))&&void 0!==t?t:[];return r?(0,n.jsx)(sZ.Z,{children:y.map(e=>(0,n.jsx)(l.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",children:e.label},e.key))}):(0,n.jsxs)(sZ.Z,{children:[!m&&(0,n.jsxs)(n.Fragment,{children:[y.map(e=>(0,n.jsx)(l.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",closable:!0,onClose:()=>g(e.key),closeButtonLabel:"Remove data use",children:e.label},e.key)),(0,n.jsx)(l.j8w,{onClick:()=>h(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),m&&(0,n.jsx)(l.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,n.jsx)(sD.Z,{selectedTaxonomies:a.data_uses||[],onSelect:x,onBlur:()=>h(!1),open:!0})})]})},sN=e=>{let{systemKey:s,systemName:t,lockedForGVL:a,onEditClick:i}=e,r=(0,sj.Cl)(),l=r.display({id:"select",cell:e=>{let{row:s}=e;return(0,n.jsx)(sR.k,{isChecked:s.getIsSelected(),onChange:s.getToggleSelectedHandler(),dataTestId:"select-".concat(s.original.name||s.id)})},header:e=>{let{table:s}=e;return(0,n.jsx)(sR.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40,meta:{cellProps:{borderRight:"none",paddingRight:0}}}),o=r.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(sk.G3,{value:e.getValue()}),header:"Asset"}),d=r.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,n.jsx)(sk.G3,{value:e.getValue()}),header:"Type"}),c=r.display({id:"system",cell:e=>(0,n.jsx)(sL,{systemKey:s,systemName:t,asset:e.row.original,readonly:a}),header:"System"}),u=r.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,n.jsx)(sP,{asset:e.row.original,systemId:s,readonly:a}),header:"Categories of consent",size:200}),p=r.accessor(e=>e.locations,{id:"locations",cell:e=>(0,n.jsx)(sR.mb,{values:e.getValue().map(e=>({label:sq.Z8[e],key:e}))}),header:"Locations",size:300}),m=r.accessor(e=>e.domain,{id:"domain",cell:e=>(0,n.jsx)(sk.G3,{value:e.getValue()}),header:"Domain"}),h=r.accessor(e=>e.page,{id:"page",cell:e=>(0,n.jsx)(sR.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,n.jsx)(sR.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),x=r.display({id:"actions",cell:e=>{let{row:t}=e;return(0,n.jsx)(sO,{asset:t.original,systemKey:s,onEditClick:()=>i(t.original)})},header:"Actions"}),g=[o,d,c,u,p,m,h];return a?g:[l,...g,x]},sU=e=>{var s;let{system:t}=e,{PAGE_SIZES:a,pageSize:i,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:h,endRange:x,pageIndex:g,setTotalPages:y,resetPageIndexToDefault:_}=(0,sk.oi)(),[b,v]=(0,p.useState)(""),[j,w]=(0,p.useState)(void 0),[k,C]=(0,p.useState)({}),[S]=sm(),D=(0,m.C)(ey.gU),T=(0,l.pmc)(),{data:A,isLoading:I,isFetching:E}=sc({fides_key:t.fides_key,search:b,page:g,size:i}),{isOpen:q,onClose:R,onOpen:z}=(0,l.qY0)(),{isOpen:F,onClose:L,onOpen:O}=(0,l.qY0)();(0,p.useEffect)(()=>{_()},[b,_]),(0,p.useEffect)(()=>{y(null==A?void 0:A.pages)},[A,y]);let W=sN({systemName:null!==(s=t.name)&&void 0!==s?s:t.fides_key,systemKey:t.fides_key,onEditClick:e=>{w(e),z()},lockedForGVL:D}),Z=(0,sv.b7)({getCoreRowModel:(0,sj.sC)(),columns:W,manualPagination:!0,data:(null==A?void 0:A.items)||[],columnResizeMode:"onChange",onRowSelectionChange:C,state:{rowSelection:k}}),P=Z.getSelectedRowModel().rows.map(e=>e.original.id),N=async()=>{let e=await S({systemKey:t.fides_key,asset_ids:P});(0,eh.D4)(e)?T((0,f.Vo)((0,sa.e$)(e.error,"A problem occurred removing these assets. Please try again."))):(Z.resetRowSelection(),T((0,f.t5)("Assets removed successfully"))),L()};return t?I?(0,n.jsx)(sk.I4,{rowHeight:36,numRows:36}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.xvT,{fontSize:"sm",mb:4,children:D?"This page displays all assets associated with this system. Use the table below to review these technologies for compliance and detailed insights.":"This page displays all assets associated with this system. Use the table below to review and manage these technologies for compliance and detailed insights."}),(0,n.jsxs)(sk.Q$,{children:[(0,n.jsx)(sw.f,{value:b,onChange:v}),!D&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.mm_,{}),iconPosition:"end",onClick:z,"data-testid":"add-asset-btn",children:"Add asset"}),(0,n.jsx)(sE,{isOpen:q,onClose:()=>{w(void 0),R()},systemKey:t.fides_key,asset:j}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.ZNm,{}),iconPosition:"end",onClick:O,disabled:!P.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,n.jsx)(l.cVQ,{isOpen:F,onClose:L,onConfirm:N,title:"Remove assets",message:"Are you sure you want to remove the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]})]}),(0,n.jsx)(sk.ZK,{tableInstance:Z,emptyTableNotice:(0,n.jsx)(l.oj8,{image:l.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,n.jsx)(sk.s8,{totalRows:(null==A?void 0:A.total)||0,pageSizes:a,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:d||E,onNextPageClick:c,isNextPageDisabled:u||E,startRange:h,endRange:x})]}):null};let sV={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"}},sM=e=>{let s=e.startsWith("#")?e:"#".concat(e);return Object.values(sV).find(e=>e.hash===s)},sB=e=>Object.values(sV).find(s=>s.index===e),sK=e=>{let{onViewDatamap:s,onAddPrivacyDeclaration:t}=e;return(0,n.jsxs)(l.xuv,{children:[(0,n.jsx)(l.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,n.jsxs)(l.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,n.jsx)(_.Z,{onClick:s,children:"view it now"})," or"," ",(0,n.jsx)(_.Z,{onClick:t,children:"add privacy declarations in the next tab"}),"."]})]})};var sH=e=>{var s,t;let{isCreate:a}=e,i=(0,c.useRouter)(),[o,u]=(0,p.useState)((()=>{var e,s;let t=i.asPath.split("#")[1];return t&&null!==(s=null===(e=sM(t))||void 0===e?void 0:e.index)&&void 0!==s?s:sV.INFORMATION.index})()),[_,b]=(0,p.useState)(!1),{systemOrDatamapRoute:v}=(0,g.V)(),j=(0,l.pmc)(),w=(0,m.T)(),k=(0,m.C)(O.NC),[C,S]=(0,p.useState)(void 0),{plus:D}=(0,h.hz)(),{plus:T}=(0,h.hz)(),{data:A}=(0,O.rn)(null==k?void 0:k.fides_key,{skip:!k});(0,p.useEffect)(()=>{w((0,O.db)(A))},[A,w]),(0,p.useEffect)(()=>{k&&S(k.processes_personal_data)},[k]);let I=(0,p.useCallback)(e=>{void 0===k&&b(!0),w((0,O.db)(e)),i.push({pathname:y.Dv,query:{id:e.fides_key}});let s={...f.MA,description:(0,n.jsx)(sK,{onViewDatamap:()=>{i.push(v).then(()=>{j.closeAll()})},onAddPrivacyDeclaration:()=>{u(1),j.closeAll()}})};j({...s})},[k,w,i,v,j]);(0,p.useEffect)(()=>(a&&(w((0,O.db)(void 0)),w((0,ey.b3)("initial")),w((0,ey.gQ)(!1))),()=>{w((0,O.db)(void 0))}),[w,a]);let{attemptAction:E}=(0,x.oI)(),q=(0,p.useCallback)(e=>{E().then(async s=>{if(s){let{status:s}=i.query;if(s&&("succeeded"===s?j((0,f.t5)("Integration successfully authorized.")):j((0,f.Vo)("Failed to authorize integration."))),u(e),i.isReady){let s=sB(e);if(s){let e={...i.query};delete e.status,await i.replace({pathname:i.pathname,query:e,hash:s.hash},void 0,{shallow:!0})}}}})},[E,i,j]);(0,p.useEffect)(()=>{let{status:e}=i.query;e&&q(sV.INTEGRATIONS.index)},[i.query,q]);let R=[{label:"Information",content:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xuv,{px:6,mb:9,children:[(0,n.jsx)(x.eB,{}),(0,n.jsx)(sb,{onSuccess:I,system:k})]}),_?(0,n.jsx)(l.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,n.jsxs)(l.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,n.jsx)(l.rUS,{as:d(),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:k?(0,n.jsx)(l.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,n.jsx)(st,{system:k})}):null,isDisabled:!k||!C},{label:"Data flow",content:k?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsxs)(l.xuv,{px:6,paddingBottom:2,children:[(0,n.jsx)(l.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,n.jsx)(l.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,n.jsx)(r.q,{system:k,isSystemTab:!0})]}):null,isDisabled:!k},{label:"Integrations",content:k?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(l.xuv,{px:6,paddingBottom:2,children:(0,n.jsx)(l.xvT,{fontSize:"sm",lineHeight:5,children:T?(0,n.jsxs)(n.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,n.jsx)(l.rUS,{href:y.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,n.jsx)(ep,{connectionConfig:k.connection_configs,systemFidesKey:k.fides_key}),(null===(s=k.connection_configs)||void 0===s?void 0:s.key)&&(0,n.jsx)(eg,{m:6,connectionKey:null===(t=k.connection_configs)||void 0===t?void 0:t.key})]}):null,isDisabled:!k}];return D&&R.push({label:"Assets",content:k?(0,n.jsx)(sU,{system:k}):null,isDisabled:!k}),D&&R.push({label:"History",content:k?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(l.xuv,{px:6,paddingBottom:6,children:(0,n.jsx)(l.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,n.jsx)(eB,{system:k})]}):null,isDisabled:!k}),{tabData:R,tabIndex:o,onTabChange:q}}},54748:function(e,s,t){var a=t(27378),i=t(61317);s.Z=()=>({legalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},28325:function(e,s,t){var a=t(27378),i=t(61317);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5023],{74245:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/add-systems",function(){return n(5923)}])},69e3:function(e,t,n){"use strict";var s=n(24246),i=n(91942),r=n(91507),a=n.n(r);t.Z=e=>{let{color:t,description:n,title:r,icon:l}=e;return(0,s.jsx)(i.xuv,{borderLeft:"9px solid ".concat(t),borderRadius:"6px",className:a().container,children:(0,s.jsxs)(i.V4A,{className:a().card,"data-testid":"tile-".concat(r),children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[l,(0,s.jsx)(i.AntTypography.Title,{level:3,children:r})]}),(0,s.jsx)(i.AntTypography.Text,{children:n})]})})}},77867:function(e,t,n){"use strict";var s=n(24246),i=n(91942);t.Z=e=>{let{connected:t,...n}=e,r="red.500";return null==t?r="gray.300":t&&(r="green.500"),(0,s.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:r,...n})}},59301:function(e,t,n){"use strict";var s=n(24246);let{Link:i}=n(91942).AntTypography;t.Z=e=>(0,s.jsx)(i,{target:"_blank",rel:"noopener noreferrer",...e})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var s=n(24246),i=n(91942),r=n(88038),a=n.n(r),l=n(86677);n(27378);var o=n(25980),c=n(90867),d=n(77830),u=()=>{let e=(0,l.useRouter)();return(0,s.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(i.xuv,{children:[(0,s.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(i.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,s.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:t,title:n,padded:r=!0,mainProps:d}=e,h=(0,o.hz)(),x=(0,l.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,p=!(h.flags.privacyRequestsConfiguration&&m),{data:y}=(0,c.JE)(void 0,{skip:p}),{data:j}=(0,c.PW)(void 0,{skip:p}),g=h.flags.privacyRequestsConfiguration&&(!y||!j)&&m;return(0,s.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,s.jsxs)(a(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(i.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[g?(0,s.jsx)(u,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var s=n(24246),i=n(91942),r=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:l,rightContent:o,style:c,...d}=e;return(0,s.jsxs)("div",{...d,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,s.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(i.lQT,{className:n||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!n&&(0,s.jsx)(r.m,{className:l?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return c}});var s=n(24246),i=n(91942),r=n(34090),a=n(27378),l=n(46238),o=n(40324);let c=e=>{let{name:t,label:n,labelProps:c,tooltip:d,isRequired:u,layout:h="inline",helperText:x,...m}=e,[p,y,{setValue:j}]=(0,r.U$)(t),g=!!(y.touched&&y.error),[f,v]=(0,a.useState)("");p.value||"tags"!==m.mode&&"multiple"!==m.mode||(p.value=[]),"tags"===m.mode&&"string"==typeof p.value&&(p.value=[p.value]);let b="tags"===m.mode?(e,t)=>e?e.value!==f||p.value.includes(f)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(f,'"'):void 0:m.optionRender||void 0,w=e=>{v(e),m.onSearch&&m.onSearch(e)},C=(e,t)=>{j(e),m.onChange&&m.onChange(e,t)};return"inline"===h?(0,s.jsx)(i.NIc,{isInvalid:g,isRequired:u,children:(0,s.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,s.jsx)(o.__,{htmlFor:m.id||t,...c,children:n}):null,(0,s.jsxs)(i.jqI,{align:"center",children:[(0,s.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,s.jsx)(i.WPr,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?w:void 0,onChange:C,value:p.value||void 0,status:g?"error":void 0}),x&&(0,s.jsx)(i.Q6r,{children:x}),(0,s.jsx)(o.Bc,{isInvalid:g,message:y.error,fieldName:p.name})]}),(0,s.jsx)(l.b,{label:d})]})]})}):(0,s.jsx)(i.NIc,{isInvalid:g,isRequired:u,children:(0,s.jsxs)(i.gCW,{alignItems:"start",children:[(0,s.jsxs)(i.jqI,{align:"center",children:[n?(0,s.jsx)(o.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...c,children:n}):null,(0,s.jsx)(l.b,{label:d})]}),(0,s.jsx)(i.WPr,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?w:void 0,onChange:C,value:p.value||void 0,status:g?"error":void 0}),x&&(0,s.jsx)(i.Q6r,{style:{marginTop:0},children:x}),(0,s.jsx)(o.Bc,{isInvalid:g,message:y.error,fieldName:p.name})]})})}},14047:function(e,t,n){"use strict";n.d(t,{H:function(){return r},V:function(){return s.V}});var s=n(84306),i=n(812);let r=()=>{let{errorAlert:e}=(0,s.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,i.Ot)(t)?n=t.data.detail:(0,i.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var s=n(24246),i=n(91942);let r=()=>{let e=(0,i.pmc)();return{errorAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(i.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(i.zMQ,{}),(0,s.jsxs)(i.xuv,{children:[n&&(0,s.jsx)(i.CdC,{children:n}),(0,s.jsx)(i.XaZ,{children:t})]}),(0,s.jsx)(i.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(i.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(i.zMQ,{}),(0,s.jsxs)(i.xuv,{children:[n&&(0,s.jsx)(i.CdC,{children:n}),(0,s.jsx)(i.XaZ,{children:t})]}),(0,s.jsx)(i.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},16220:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var s=n(25980),i=n(77830);let r=()=>({systemOrDatamapRoute:(0,s.hz)().plus?i.oG:i.So})},57899:function(e,t,n){"use strict";var s=n(24246),i=n(91942),r=n(27378);t.Z=e=>{let{handleConfirm:t,isOpen:n,onClose:a,title:l,message:o,confirmButtonText:c="Continue",cancelButtonText:d="Cancel"}=e,u=(0,r.useRef)(null);return(0,s.jsx)(i.aRR,{isOpen:n,leastDestructiveRef:u,onClose:a,children:(0,s.jsx)(i.dhV,{children:(0,s.jsxs)(i._Tf,{alignItems:"center",textAlign:"center",children:[(0,s.jsx)(i.aNP,{marginTop:3}),(0,s.jsx)(i.fYl,{fontSize:"lg",fontWeight:"bold",children:l}),(0,s.jsx)(i.iPF,{pt:0,children:o}),(0,s.jsxs)(i.xoY,{children:[(0,s.jsx)(i.wpx,{ref:u,onClick:a,size:"large",children:d}),(0,s.jsx)(i.wpx,{onClick:()=>t(),type:"primary",size:"large",className:"ml-3","data-testid":"warning-modal-confirm-btn",children:c})]})]})})})}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var s=n(24246),i=n(91942),r=n(79894),a=n.n(r),l=n(27378);let{Text:o}=i.AntTypography,c=e=>{let{items:t,...n}=e,r=(0,l.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let r=n===t.length-1,l={...e},c=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:l.title})),c)?l.title=(0,s.jsx)(i.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,s.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,s.jsx)(i.zrq,{items:r,...n})}},5923:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eu}});var s=n(24246),i=n(27378),r=n(16134),a=n(77213),l=n(58754),o=n(15677),c=n(91942),d=n(3124),u=n.n(d),h=n(86677),x=n(25980),m=n(14048),p=n(58452);let y=e=>{let{onCancel:t,onConfirm:n,isOpen:i,onClose:r}=e;return(0,s.jsx)(p.Z,{isOpen:i,onClose:r,onCancel:t,isCentered:!0,title:"Upgrade to choose vendors",message:"To choose vendors and have system information auto-populated using Fides Compass, you will need to upgrade Fides. Meanwhile, you can manually add individual systems using the button below.",cancelButtonText:"Add vendors manually",continueButtonText:"Upgrade",onConfirm:n})};var j=n(77830),g=n(61317),f=n(69e3),v=n(77867),b=n(32885),w=e=>{var t;let{onClick:n}=e,{plus:i,dataFlowScanning:a}=(0,x.hz)(),l=(0,r.C)(b.bw),o=null!==(t=null==l?void 0:l.cluster_health)&&void 0!==t?t:"unknown",d=o===g.wW.HEALTHY;if(!i)return null;let h=null;return a?d||(h="Your cluster appears not to be healthy. Its status is ".concat(o,".")):h="The data flow scanner is not enabled, please check your configuration.",(0,s.jsxs)(c.xuv,{position:"relative",children:[(0,s.jsx)(c.esZ,{title:h,popupVisible:!!h,children:(0,s.jsx)("button",{disabled:!a||!d,type:"button","aria-label":"Data flow scan",className:"text-left",onClick:n,children:(0,s.jsx)(f.Z,{title:"Data flow scan",color:u().FIDESUI_NECTAR,description:"Automatically discover new systems in your Kubernetes infrastructure",icon:(0,s.jsx)(m.pt,{boxSize:6}),"data-testid":"data-flow-scan-btn"})})}),a?(0,s.jsx)(v.Z,{connected:d,title:d?"Cluster is connected and healthy":"Cluster is ".concat(o),position:"absolute",right:-1,top:-1,"data-testid":"cluster-health-indicator"}):null]})},C=n(38764);let k=e=>{let{children:t}=e;return(0,s.jsx)(c.X6q,{as:"h4",size:"xs",fontWeight:"semibold",color:"gray.600",textTransform:"uppercase",mb:4,children:t})};var _=()=>{let e=(0,r.T)(),t=(0,h.useRouter)(),{isOpen:n,onClose:i,onOpen:a}=(0,c.qY0)(),{dictionaryService:l}=(0,x.hz)();return(0,s.jsxs)(c.Kqy,{spacing:9,"data-testid":"add-systems",children:[(0,s.jsxs)(c.Kqy,{spacing:6,maxWidth:"600px",children:[(0,s.jsx)(c.X6q,{as:"h3",size:"md",fontWeight:"semibold",children:"Fides helps you map your systems to manage your privacy"}),(0,s.jsx)(c.xvT,{children:"In Fides, systems describe any services that store or process data for your organization, including third-party APIs, web applications, databases, and data warehouses."}),(0,s.jsx)(c.xvT,{children:"Fides can automatically discover new systems in your AWS infrastructure or Okta accounts. For services not covered by the automated scanners or analog processes, you may also manually add new systems to your map."})]}),(0,s.jsx)(y,{isOpen:n,onConfirm:()=>{window.open("https://fid.es/upgrade-compass")},onCancel:()=>{t.push(j.N5)},onClose:i}),(0,s.jsxs)(c.xuv,{"data-testid":"manual-options",children:[(0,s.jsx)(k,{children:"Manually add systems"}),(0,s.jsxs)(c.MIq,{columns:{base:1,md:2,xl:3},spacing:"4",children:[(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Add a system",onClick:()=>{e((0,o.CQ)(C.D.MANUAL)),t.push(j.N5)},"data-testid":"manual-btn",children:(0,s.jsx)(f.Z,{title:"Add a system",color:u().FIDESUI_SANDSTONE,icon:(0,s.jsx)(m.P$,{boxSize:6}),description:"Manually add a system for services not covered by automated scanners"})}),(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Add multiple systems",onClick:()=>{l?(e((0,o.CQ)(C.D.MANUAL)),t.push(j.bJ)):a()},"data-testid":"multiple-btn",children:(0,s.jsx)(f.Z,{title:"Add multiple systems",color:u().FIDESUI_OLIVE,icon:(0,s.jsx)(m.P$,{boxSize:6}),description:"Choose vendors and automatically populate system details"})})]})]}),(0,s.jsxs)(c.xuv,{"data-testid":"automated-options",children:[(0,s.jsx)(k,{children:"Automated infrastructure scanning"}),(0,s.jsxs)(c.MIq,{columns:{base:1,md:2,xl:3},spacing:"4",children:[(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Scan your infrastructure (AWS)",onClick:()=>{e((0,o.CQ)(g.GC.AWS)),e((0,o.sz)())},"data-testid":"aws-btn",children:(0,s.jsx)(f.Z,{title:"Scan your infrastructure (AWS)",color:u().FIDESUI_TERRACOTTA,description:"Automatically discover new systems in your AWS infrastructure",icon:(0,s.jsx)(m.bj,{boxSize:6})})}),(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Scan your Sign On Provider (Okta)",onClick:()=>{e((0,o.CQ)(g.GC.OKTA)),e((0,o.sz)())},"data-testid":"okta-btn",children:(0,s.jsx)(f.Z,{title:"Scan your Sign On Provider (Okta)",color:u().FIDESUI_MINOS,description:"Automatically discover new systems in your Okta infrastructure",icon:(0,s.jsx)(m.tb,{boxSize:6})})}),(0,s.jsx)(w,{onClick:()=>{e((0,o.sz)()),e((0,o.CQ)(C.D.DATA_FLOW))}})]})]})]})},S=n(34090),T=n(55484),A=n(40324),z=n(812),I=n(14047),q=n(97181),O=n(70788),N=n(28416);let F=e=>"system_type"in e,{useGenerateMutation:D}=n(78780).u.injectEndpoints({endpoints:e=>({generate:e.mutation({query:e=>({url:"generate",method:"POST",body:e})})})});var Z=n(59301);let R=e=>{let{message:t}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.izJ,{}),(0,s.jsx)(c.W20,{maxH:"50vh",overflow:"auto",children:(0,s.jsx)(c.xvT,{as:"pre","data-testid":"error-log",children:t})}),(0,s.jsx)(c.izJ,{})]})};var W=e=>{let{error:t,scanType:n=""}=e;return(0,s.jsxs)(c.Kqy,{"data-testid":"scanner-error",spacing:"4",children:[(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.j8w,{color:"error",children:"Error"}),(0,s.jsx)(c.X6q,{color:"red.500",size:"lg",children:"Failed to Scan"})]}),403===t.status&&n===g.GC.AWS?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{"data-testid":"permission-msg",children:"Fides was unable to scan AWS. It appears that the credentials were valid to login but they did not have adequate permission to complete the scan."}),(0,s.jsxs)(c.xvT,{children:["To fix this issue, double check that you have granted"," ",(0,s.jsx)(Z.Z,{href:N.zu,children:"the required permissions"})," ","to these credentials as part of your IAM policy. If you need more help in configuring IAM policies, you can read about them"," ",(0,s.jsx)(Z.Z,{href:"https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction_access-management.html",children:"here"}),"."]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{"data-testid":"generic-msg",children:"Fides was unable to scan your infrastructure. Please ensure your credentials are accurate and inspect the error log below for more details."}),(0,s.jsx)(R,{message:t.message}),(0,s.jsxs)(c.xvT,{children:["If this error does not clarify why scanning failed, please"," ",(0,s.jsx)(Z.Z,{href:N.we,children:"create a new issue"}),"."]})]})]})},E=n(57899);let K=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{color:"gray.500",mb:3,children:"Warning, you are about to cancel the scan!"}),(0,s.jsx)(c.xvT,{color:"gray.500",mb:3,children:"If you cancel scanning, the scanner will stop and no systems will be returned."}),(0,s.jsx)(c.xvT,{color:"gray.500",mb:3,children:"Are you sure you want to cancel?"})]});var U=e=>{let{title:t,onClose:n}=e,{isOpen:i,onOpen:r,onClose:a}=(0,c.qY0)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.Kqy,{spacing:8,"data-testid":"scanner-loading",children:[(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.xvT,{alignItems:"center",as:"b",color:"gray.900",display:"flex",fontSize:"xl",children:t}),(0,s.jsx)(c.PZ7,{"data-testid":"close-scan-in-progress",display:"inline-block",onClick:r})]}),(0,s.jsx)(c.Kqy,{alignItems:"center",children:(0,s.jsx)(c.$jN,{thickness:"4px",speed:"0.65s",emptyColor:"gray.200",color:"green.300",size:"xl"})})]}),(0,s.jsx)(E.Z,{isOpen:i,onClose:a,handleConfirm:n,title:"Cancel Scan!",message:K,confirmButtonText:"Yes, Cancel",cancelButtonText:"No, Continue Scanning"})]})};let B={aws_access_key_id:"",aws_secret_access_key:"",aws_session_token:"",region_name:""},P=T.Ry().shape({aws_access_key_id:T.Z_().required().trim().matches(/^\w+$/,"Cannot contain spaces or special characters").label("Access Key ID"),aws_secret_access_key:T.Z_().required().trim().matches(/^[^\s]+$/,"Cannot contain spaces").label("Secret"),aws_session_token:T.Z_().optional().trim().matches(/^[^\s]+$/,"Cannot contain spaces").label("Session Token (for temporary credentials)"),region_name:T.Z_().required().label("Default Region")});var M=()=>{let e=(0,r.C)(o.De),t=(0,r.T)(),{successAlert:n}=(0,I.V)(),[a,l]=(0,i.useState)(),d=e=>{let s=(null!=e?e:[]).filter(F);t((0,o.un)(s)),t((0,o.sz)()),n("Your scan was successfully completed, with ".concat(s.length," new systems detected!"),"Scan Successfully Completed",{isClosable:!0})},u=e=>{l((0,z.nU)(e,{status:500,message:"Our system encountered a problem while connecting to AWS."}))},h=()=>{t((0,o.sz)(2))},[x,{isLoading:m}]=D(),p=async t=>{l(void 0);let n=await x({organization_key:e,generate:{config:t,target:g.GC.AWS,type:g.j.SYSTEMS}});(0,z.D4)(n)?u(n.error):d(n.data.generate_results)};return(0,s.jsx)(S.J9,{initialValues:B,validationSchema:P,onSubmit:p,children:e=>{let{isValid:t,isSubmitting:n,dirty:i}=e;return(0,s.jsx)(S.l0,{"data-testid":"authenticate-aws-form",children:(0,s.jsxs)(c.Kqy,{spacing:10,children:[n?(0,s.jsx)(U,{title:"System scanning in progress",onClose:h}):null,a?(0,s.jsx)(W,{error:a,scanType:"aws"}):null,n||a?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.xuv,{children:[(0,s.jsx)(O.m,{className:"mb-4",items:[{title:"Add systems",href:"",onClick:e=>{e.preventDefault(),h()}},{title:"Authenticate AWS Scanner"}]}),(0,s.jsx)(c.xvT,{children:"To use the scanner to inventory systems in AWS, you must first authenticate to your AWS cloud by providing the following information:"})]}),(0,s.jsxs)(c.Kqy,{children:[(0,s.jsx)(A.j0,{name:"aws_access_key_id",label:"Access Key ID",tooltip:"The Access Key ID created by the cloud hosting provider.",isRequired:!0}),(0,s.jsx)(A.j0,{type:"password",name:"aws_secret_access_key",label:"Secret",tooltip:"The secret associated with the Access Key ID used for authentication.",isRequired:!0}),(0,s.jsx)(A.j0,{type:"password",name:"aws_session_token",label:"Session Token",tooltip:"The session token when using temporary credentials."}),(0,s.jsx)(q.d,{name:"region_name",label:"AWS Region",tooltip:"The geographic region of the cloud hosting provider you would like to scan.",options:N.xO,isRequired:!0,placeholder:"Select a region"})]})]}),n?null:(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.wpx,{onClick:h,children:"Cancel"}),(0,s.jsx)(c.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,loading:m,"data-testid":"submit-btn",children:"Save and continue"})]})]})})}})};let X={orgUrl:"",token:""},L=T.Ry().shape({orgUrl:T.Z_().required().trim().url().label("URL"),token:T.Z_().required().trim().matches(/^[^\s]+$/,"Cannot contain spaces").label("Token")});var V=()=>{let e=(0,r.C)(o.De),t=(0,r.T)(),{successAlert:n}=(0,I.V)(),[a,l]=(0,i.useState)(),d=e=>{let s=(null!=e?e:[]).filter(F);t((0,o.un)(s)),t((0,o.sz)()),n("Your scan was successfully completed, with ".concat(s.length," new systems detected!"),"Scan Successfully Completed",{isClosable:!0})},u=e=>{l((0,z.nU)(e,{status:500,message:"Our system encountered a problem while connecting to Okta."}))},h=()=>{t((0,o.sz)(2))},[x,{isLoading:m}]=D(),p=async t=>{l(void 0);let n=await x({organization_key:e,generate:{config:t,target:g.GC.OKTA,type:g.j.SYSTEMS}});(0,z.D4)(n)?u(n.error):d(n.data.generate_results)};return(0,s.jsx)(S.J9,{initialValues:X,validationSchema:L,onSubmit:p,children:e=>{let{isValid:t,isSubmitting:n,dirty:i}=e;return(0,s.jsx)(S.l0,{"data-testid":"authenticate-okta-form",children:(0,s.jsxs)(c.Kqy,{spacing:10,children:[n?(0,s.jsx)(U,{title:"System scanning in progress",onClose:h}):null,a?(0,s.jsx)(W,{error:a}):null,n||a?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.xuv,{children:[(0,s.jsx)(O.m,{className:"mb-4",items:[{title:"Add systems",href:"",onClick:e=>{e.preventDefault(),h()}},{title:"Authenticate Okta Scanner"}]}),(0,s.jsx)(c.xvT,{children:"To use the scanner to inventory systems in Okta, you must first authenticate to your Okta account by providing the following information:"})]}),(0,s.jsxs)(c.Kqy,{children:[(0,s.jsx)(A.j0,{name:"orgUrl",label:"Domain",tooltip:"The URL for your organization's account on Okta"}),(0,s.jsx)(A.j0,{name:"token",label:"Okta token",type:"password",tooltip:"The token generated by Okta for your account."})]})]}),n?null:(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.wpx,{onClick:h,children:"Cancel"}),(0,s.jsx)(c.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,loading:m,"data-testid":"submit-btn",children:"Save and continue"})]})]})})}})},Y=n(46628),$=n(31883),J=()=>{let e=(0,r.T)(),t=(0,c.pmc)(),[n]=(0,b.J9)(),[a,{data:l}]=(0,b.KW)(),[d,u]=(0,i.useState)(),[h,x]=(0,i.useState)(!1),m=e=>{u((0,z.nU)(e,{status:500,message:"Our system encountered a problem while scanning your infrastructure."}))};(0,i.useEffect)(()=>{(async()=>{let{error:e}=await n();x(!(e&&(0,$.Bw)(e)&&404===e.status));let t=await a({classify:!0});(0,z.D4)(t)&&m(t.error)})()},[a,n]),(0,i.useEffect)(()=>{(async()=>{if(l){let{data:s}=await n(),i=h?(null==s?void 0:s.added_systems)||[]:l.systems;t((0,Y.t5)("Your scan was successfully completed, with ".concat(i.length," new systems detected!"))),e((0,o.un)(i)),e((0,o.sz)())}})()},[l,t,e,h,n]);let p=()=>{e((0,o.sz)(2))};return d?(0,s.jsxs)(c.Kqy,{children:[(0,s.jsx)(W,{error:d}),(0,s.jsx)(c.xuv,{children:(0,s.jsx)(c.wpx,{onClick:p,"data-testid":"cancel-btn",children:"Cancel"})})]}):(0,s.jsx)(U,{title:"Infrastructure scanning in progress",onClose:p})},Q=()=>{let e=(0,r.C)(o.Ll);return(0,s.jsxs)(c.xuv,{w:"40%",children:[e===g.GC.AWS?(0,s.jsx)(M,{}):null,e===g.GC.OKTA?(0,s.jsx)(V,{}):null,e===C.D.DATA_FLOW?(0,s.jsx)(J,{}):null]})},G=n(83265),H=n(46238);let ee=()=>{var e,t;let n=(0,r.T)(),s=e=>{n((0,o.nD)(e)),n((0,o.sz)())},[a]=(0,G.vz)(),[l]=(0,G.$f)(),{data:d,isLoading:u}=(0,G.GQ)(G.Av),[h,x]=(0,i.useState)(!1);(0,i.useEffect)(()=>{!u&&!h&&(null==d?void 0:d.name)&&(null==d?void 0:d.description)&&n((0,o.sz)())},[u,d,n,h]);let m=(0,c.pmc)();return(0,S.TA)({initialValues:{name:null!==(e=null==d?void 0:d.name)&&void 0!==e?e:"",description:null!==(t=null==d?void 0:d.description)&&void 0!==t?t:""},onSubmit:async e=>{var t,n,i;x(!0);let r={name:null!==(t=e.name)&&void 0!==t?t:null==d?void 0:d.name,description:null!==(n=e.description)&&void 0!==n?n:null==d?void 0:d.description,fides_key:null!==(i=null==d?void 0:d.fides_key)&&void 0!==i?i:G.Av,organization_fides_key:G.Av};if(d){let e=await l(r);if((0,z.D4)(e)){m({status:"error",description:(0,z.e$)(e.error)});return}m.closeAll(),s(r)}else{let e=await a(r);if((0,z.D4)(e)){m({status:"error",description:(0,z.e$)(e.error)});return}m.closeAll(),s(r)}},enableReinitialize:!0,validate:e=>{let t={};return e.name||(t.name="Organization name is required"),e.description||(t.description="Organization description is required"),t}})};var et=()=>{let{errors:e,handleBlur:t,handleChange:n,handleSubmit:i,touched:r,values:a,isSubmitting:l}=ee();return(0,s.jsx)(c.m$N.form,{onSubmit:i,w:"40%","data-testid":"organization-info-form",children:(0,s.jsxs)(c.Kqy,{spacing:10,children:[(0,s.jsx)(c.X6q,{as:"h3",size:"lg",children:"Create your Organization"}),(0,s.jsx)("div",{children:"Provide your organization information. This information is used to configure your organization in Fides for data map reporting purposes."}),(0,s.jsx)(c.Kqy,{children:(0,s.jsxs)(c.NIc,{children:[(0,s.jsxs)(c.Kqy,{direction:"row",mb:5,justifyContent:"flex-end",children:[(0,s.jsx)(c.lXp,{w:"100%",children:"Organization name"}),(0,s.jsx)(c.IIB,{type:"text",id:"name",name:"name",focusBorderColor:"gray.700",onChange:n,onBlur:t,value:a.name,isInvalid:r.name&&!!e.name,minW:"65%",w:"65%","data-testid":"input-name"}),(0,s.jsx)(H.b,{label:"The legal name of your organization"})]}),(0,s.jsxs)(c.Kqy,{direction:"row",justifyContent:"flex-end",children:[(0,s.jsx)(c.lXp,{w:"100%",children:"Description"}),(0,s.jsx)(c.IIB,{type:"text",id:"description",name:"description",focusBorderColor:"gray.700",onChange:n,onBlur:t,value:a.description,isInvalid:r.description&&!!e.description,minW:"65%",w:"65%","data-testid":"input-description"}),(0,s.jsx)(H.b,{label:'An explanation of the type of organization and primary activity. For example "Acme Inc. is an e-commerce company that sells scarves."'})]})]})}),(0,s.jsx)(c.wpx,{type:"primary",htmlType:"submit",disabled:!a.name||!a.description,loading:l,"data-testid":"submit-btn",children:"Save and continue"})]})})},en=e=>{let{allColumns:t,selectedColumns:n,onChange:r}=e,a=(0,i.useMemo)(()=>{let e=new Map;return t.forEach(t=>e.set(t.name,!!n.find(e=>e.name===t.name))),e},[t,n]),l=()=>{a.forEach((e,t)=>a.set(t,!1)),r([])},o=e=>{var n;let s=null!==(n=a.get(e.name))&&void 0!==n&&n;a.set(e.name,!s),r(t.filter(e=>a.get(e.name)))};return(0,s.jsx)(c.v2r,{children:e=>{let{onClose:i}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.j2t,{as:c.wpx,icon:(0,s.jsx)(c.mCO,{}),fontWeight:"normal","data-testid":"column-dropdown",children:"Columns"}),(0,s.jsx)(c.qyq,{children:(0,s.jsxs)(c.xuv,{px:2,children:[(0,s.jsxs)(c.xuv,{display:"flex",justifyContent:"space-between",mb:2,children:[(0,s.jsx)(c.wpx,{size:"small",onClick:l,"data-testid":"column-clear-btn",children:"Clear"}),(0,s.jsx)(c.wpx,{type:"primary",size:"small",onClick:i,"data-testid":"column-done-btn",children:"Done"})]}),(0,s.jsx)(c.cOn,{colorScheme:"complimentary",children:(0,s.jsx)(c.Kqy,{children:t.map(e=>{let t=n.filter(t=>t.name===e.name).length>0;return(0,s.jsx)(c.XZJ,{id:e.name,_hover:{bg:"gray.100"},isChecked:t,onChange:()=>o(e),"data-testid":"checkbox-".concat(e.name),children:e.name},e.name)})})})]})})]})}})},es=n(16220);let ei=(e,t)=>t.split(".").reduce((e,t)=>e?e[t]:void 0,e),er=e=>{let{system:t,attribute:n}=e;if("name"===n)return(0,s.jsx)("label",{htmlFor:"checkbox-".concat(t.fides_key),children:t.name});if("fidesctl_meta.resource_id"===n){var i,r;return(0,s.jsx)(c.xuv,{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",title:(null===(i=t.fidesctl_meta)||void 0===i?void 0:i.resource_id)||"",children:null===(r=t.fidesctl_meta)||void 0===r?void 0:r.resource_id})}return(0,s.jsx)(s.Fragment,{children:ei(t,n)})},ea=e=>{let{allSystems:t,checked:n,onChange:i,columns:r,tableHeadProps:a}=e,l=e=>{n.indexOf(e)>=0?i(n.filter(t=>t.fides_key!==e.fides_key)):i([...n,e])},o=t.length===n.length;return 0===r.length?(0,s.jsx)(c.xvT,{children:"No columns selected to display"}):(0,s.jsxs)(c.iA_,{size:"sm",sx:{tableLayout:"fixed"},children:[(0,s.jsx)(c.hrZ,{...a,children:(0,s.jsxs)(c.Tr,{children:[(0,s.jsx)(c.Th,{width:"15px",children:(0,s.jsx)(c.XZJ,{colorScheme:"complimentary",title:"Select All",isChecked:o,onChange:e=>{e.target.checked?i(t):i([])},"data-testid":"select-all"})}),r.map(e=>(0,s.jsx)(c.Th,{children:e.name},e.attribute))]})}),(0,s.jsx)(c.p3B,{children:t.map(e=>(0,s.jsxs)(c.Tr,{children:[(0,s.jsx)(c.Td,{children:(0,s.jsx)(c.XZJ,{colorScheme:"complimentary",value:e.fides_key,isChecked:n.indexOf(e)>=0,onChange:()=>l(e),"data-testid":"checkbox-".concat(e.fides_key)})}),r.map(t=>(0,s.jsx)(c.Td,{children:(0,s.jsx)(er,{system:e,attribute:t.attribute})},t.attribute))]},e.fides_key))})]})};var el=n(1315);let eo=[{name:"Name",attribute:"name"},{name:"System type",attribute:"system_type"},{name:"Resource ID",attribute:"fidesctl_meta.resource_id"}];var ec=()=>{let e=(0,r.C)(o.j4),t=(0,r.T)(),n=(0,h.useRouter)(),{systemOrDatamapRoute:a}=(0,es.V)(),{isOpen:l,onOpen:d,onClose:u}=(0,c.qY0)(),[x]=(0,el.dB)(),[m,p]=(0,i.useState)(e),[y,j]=(0,i.useState)(eo),{handleError:g}=(0,I.H)(),f=e=>{n.push(e).then(()=>{t((0,o.mc)())})},v=async()=>{let e=await x(m);return(0,z.D4)(e)?g(e.error):f(a)},b=()=>{t((0,o.sz)(2))},w=(0,s.jsxs)(c.xvT,{color:"gray.500",mb:3,children:["You’re registering ",m.length," of ",e.length," systems available. Do you want to continue with registration or cancel and register all systems now?"]});return(0,s.jsxs)(c.xuv,{maxW:"full",children:[(0,s.jsxs)(c.Kqy,{spacing:10,"data-testid":"scan-results",children:[(0,s.jsx)(O.m,{className:"mb-4",items:[{title:"Add systems",href:"",onClick:e=>{e.preventDefault(),b()}},{title:"Authenticate"},{title:"Scan results"}]}),0===e.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{"data-testid":"no-results",children:"No results were found for your infrastructure scan."}),(0,s.jsx)(c.Ugi,{children:(0,s.jsx)(c.wpx,{onClick:b,"data-testid":"back-btn",children:"Back"})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.xuv,{children:[(0,s.jsx)(c.xvT,{children:"Below are the results of your infrastructure scan. To continue, select the systems you would like registered in your data map and reports."}),(0,s.jsx)(c.xuv,{display:"flex",justifyContent:"end",children:(0,s.jsx)(en,{allColumns:eo,selectedColumns:y,onChange:j})})]}),(0,s.jsx)(ea,{allSystems:e,checked:m,onChange:p,columns:y}),(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.wpx,{onClick:b,children:"Back"}),(0,s.jsx)(c.wpx,{onClick:()=>{e.length>m.length?d():v()},type:"primary",disabled:0===m.length,"data-testid":"register-btn",children:"Register selected systems"})]})]})]}),(0,s.jsx)(E.Z,{title:"Warning",message:w,handleConfirm:v,isOpen:l,onClose:u})]})},ed=()=>{let e=(0,r.C)(o.xx);return(0,s.jsx)(c.Kqy,{direction:["column","row"],bg:"white",children:(0,s.jsxs)(c.xuv,{display:"flex",justifyContent:"flex-start",w:"100%",children:[1===e?(0,s.jsx)(et,{}):null,2===e?(0,s.jsx)(_,{}):null,3===e?(0,s.jsx)(Q,{}):null,4===e?(0,s.jsx)(c.xuv,{pr:10,children:(0,s.jsx)(ec,{})}):null]})})},eu=()=>{let e=(0,r.T)();return(0,i.useEffect)(()=>{e((0,o.sz)(2))},[e]),(0,s.jsxs)(a.Z,{title:"Add systems",children:[(0,s.jsx)(l.Z,{heading:"Add systems"}),(0,s.jsx)(ed,{})]})}},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return s.Bw},D4:function(){return s.D4}});var s=n(19043)},91507:function(e){e.exports={container:"CalloutNavCard_container__DXPJb",card:"CalloutNavCard_card__q_XX6"}},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return s}});let s=(e,t)=>r(e,t),i=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?i in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>r(n,t[e]));class a{static narrow(e){return new a(t=>s(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,n=e instanceof a?e.NF:e instanceof Function?e:t=>s(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}},function(e){e.O(0,[7553,2888,9774,179],function(){return e(e.s=74245)}),_N_E=e.O()}]);
|