ethyca-fides 2.62.1b3__py2.py3-none-any.whl → 2.62.1rc1__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.1b3.dist-info → ethyca_fides-2.62.1rc1.dist-info}/METADATA +1 -2
- {ethyca_fides-2.62.1b3.dist-info → ethyca_fides-2.62.1rc1.dist-info}/RECORD +229 -233
- fides/_version.py +3 -3
- fides/api/api/v1/endpoints/privacy_request_endpoints.py +2 -2
- fides/api/db/base.py +0 -3
- fides/api/main.py +1 -0
- fides/api/models/attachment.py +10 -117
- fides/api/models/audit_log.py +3 -0
- fides/api/models/detection_discovery.py +1 -66
- fides/api/models/fides_user.py +4 -51
- fides/api/models/fides_user_permissions.py +7 -25
- fides/api/models/privacy_request/privacy_request.py +1 -40
- fides/api/oauth/roles.py +0 -19
- 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/privacy_request/request_runner_service.py +18 -47
- fides/api/service/storage/s3.py +15 -40
- fides/api/tasks/storage.py +5 -6
- fides/api/util/storage_util.py +8 -14
- fides/common/api/scope_registry.py +0 -6
- 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/service/messaging/aws_ses_service.py +5 -1
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/W6B1Xt1795h6VsbJCzmnd/_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-f1add6386651ca3d.js → _app-814e3d1cb7005cd4.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/api/alembic/migrations/versions/440a5b9a3493_add_fides_user_respondent_email_.py +0 -80
- fides/api/models/fides_user_respondent_email_verification.py +0 -112
- fides/ui-build/static/admin/_next/static/D-B-G-FV05_6iwXWBGS0J/_buildManifest.js +0 -1
- 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/poc/table-migration.html +0 -1
- {ethyca_fides-2.62.1b3.dist-info → ethyca_fides-2.62.1rc1.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.62.1b3.dist-info → ethyca_fides-2.62.1rc1.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.62.1b3.dist-info → ethyca_fides-2.62.1rc1.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.62.1b3.dist-info → ethyca_fides-2.62.1rc1.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{D-B-G-FV05_6iwXWBGS0J → W6B1Xt1795h6VsbJCzmnd}/_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
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4481],{26917:function(e,t,n){var l=n(24246),o=n(91942);t.Z=e=>{let{onChange:t,withIcon:n,onClear:i,placeholder:r,...a}=e;return(0,l.jsxs)(o.vyj.Compact,{className:"w-96","data-testid":"search-bar",children:[(0,l.jsx)(o.uFc,{autoComplete:"off",onChange:e=>t(e.target.value),placeholder:r||"Search...",prefix:n?(0,l.jsx)(o.PTu,{boxSize:4}):void 0,...a}),i?(0,l.jsx)(o.wpx,{onClick:i,children:"Clear"}):null]})}},812:function(e,t,n){n.d(t,{D4:function(){return i.D4},MM:function(){return g},Ot:function(){return c},c6:function(){return o},cj:function(){return h},e$:function(){return a},fn:function(){return s},iC:function(){return x},nU:function(){return u},tB:function(){return d}});var l,o,i=n(19043);let r="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;if((0,i.Bw)(e)){if((0,i.hE)(e.data))return e.data.detail;if((0,i.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,i.Dy)(e.data)||404===e.status&&(0,i.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function s(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:r};if((0,i.oK)(e))return{status:e.originalStatus,message:e.data};if((0,i.Bw)(e)){let{status:n}=e;return{status:n,message:a(e,t.message)}}return t},g=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(l=o||(o={})).GVL="gvl",l.AC="gacp",l.COMPASS="compass";let x={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},h=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},71795:function(e,t,n){n.d(t,{_:function(){return o}});var l=n(27378);function o(e,t){let[n,o]=(0,l.useState)(()=>{if(!e)return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return console.error(e),t}});return[n,t=>{try{let l=t instanceof Function?t(n):t;o(l),e&&window.localStorage.setItem(e,JSON.stringify(l))}catch(e){console.error(e)}}]}},58452:function(e,t,n){var l=n(24246),o=n(91942);t.Z=e=>{let{isOpen:t,onClose:n,onConfirm:i,onCancel:r,title:a,message:s,cancelButtonText:c,continueButtonText:d,isLoading:u,returnFocusOnClose:g,isCentered:x,testId:h="confirmation-modal",icon:m}=e;return(0,l.jsxs)(o.u_l,{isOpen:t,onClose:n,size:"lg",returnFocusOnClose:null==g||g,isCentered:x,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{textAlign:"center",p:6,"data-testid":h,children:[m?(0,l.jsx)(o.M5Y,{mb:2,children:m}):null,a?(0,l.jsx)(o.xBx,{fontWeight:"medium",pb:0,children:a}):null,s?(0,l.jsx)(o.fef,{children:s}):null,(0,l.jsx)(o.mzw,{children:(0,l.jsxs)(o.MIq,{columns:2,width:"100%",children:[(0,l.jsx)(o.wpx,{onClick:()=>{r&&r(),n()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:u,children:c||"Cancel"}),(0,l.jsx)(o.wpx,{type:"primary",size:"large",onClick:i,"data-testid":"continue-btn",loading:u,children:d||"Continue"})]})})]})]})}},42904:function(e,t,n){n.d(t,{W3:function(){return r},bX:function(){return a},oi:function(){return s},s8:function(){return c}});var l=n(24246),o=n(91942),i=n(27378);let r=[25,50,100],a=e=>{let t=e.getFilteredRowModel().rows.length,{pageIndex:n}=e.getState().pagination,{pageSize:l}=e.getState().pagination,o=e.previousPage,i=!e.getCanPreviousPage(),r=e.nextPage,a=!e.getCanNextPage(),{setPageSize:s}=e;return{totalRows:t,onPreviousPageClick:o,isPreviousPageDisabled:i,onNextPageClick:r,isNextPageDisabled:a,setPageSize:s,startRange:n*l==0?1:n*l,endRange:n*l+l}},s=()=>{let e,t;let[n,l]=(0,i.useState)(r[0]),[o,a]=(0,i.useState)(1),[s,c]=(0,i.useState)(1),d=(0,i.useCallback)(()=>{a(e=>e-1)},[a]),u=(0,i.useMemo)(()=>1===o,[o]),g=(0,i.useCallback)(()=>{a(e=>e+1)},[a]),x=(0,i.useMemo)(()=>{let e=!s,t=!!s&&o===s;return e||t},[o,s]);if(s){let l=(o-1)*n;e=l+1,t=l+n}else e=0,t=0;let h=(0,i.useCallback)(()=>{a(1)},[]);return{onPreviousPageClick:d,isPreviousPageDisabled:u,onNextPageClick:g,isNextPageDisabled:x,pageSize:n,setPageSize:e=>{l(e),h()},PAGE_SIZES:r,startRange:e,endRange:t,pageIndex:o,resetPageIndexToDefault:h,setTotalPages:c}},c=e=>{let{pageSizes:t,totalRows:n,onPreviousPageClick:i,isPreviousPageDisabled:r,onNextPageClick:a,isNextPageDisabled:s,setPageSize:c,startRange:d,endRange:u}=e;return(0,l.jsxs)(o.Ugi,{ml:1,mt:3,mb:1,children:[(0,l.jsxs)(o.v2r,{children:[(0,l.jsx)(o.j2t,{as:o.wpx,size:"small","data-testid":"pagination-btn",children:(0,l.jsxs)(o.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"semibold",userSelect:"none",style:{fontVariantNumeric:"tabular-nums"},children:[d.toLocaleString("en"),"-",u<=n?u.toLocaleString("en"):n.toLocaleString("en")," ","of ",n.toLocaleString("en")]})}),(0,l.jsx)(o.qyq,{minWidth:"0",children:t.map(e=>(0,l.jsxs)(o.sNh,{onClick:()=>{c(e)},"data-testid":"pageSize-".concat(e),fontSize:"xs",children:[e," per view"]},e))})]}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.wyc,{}),size:"small","aria-label":"previous page",onClick:i,disabled:r}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.XCv,{}),size:"small","aria-label":"next page",onClick:a,disabled:s})]})}},72625:function(e,t,n){n.d(t,{A4:function(){return v},CI:function(){return j},Cy:function(){return p},G3:function(){return m},Hm:function(){return k},Rr:function(){return y},S1:function(){return z},WP:function(){return w},k:function(){return S},mb:function(){return b},tc:function(){return C},vs:function(){return W}});var l=n(24246),o=n(7195),i=n(91942),r=n(34090),a=n(3819),s=n.n(a),c=n(27378),d=n(812),u=n(58452),g=n(46628),x=n(16394),h=n(46238);let m=e=>{var t,n;let{value:o,cellProps:r,...a}=e,c=!!(null==r?void 0:null===(t=r.cell.column.columnDef.meta)||void 0===t?void 0:t.showHeaderMenu)&&!!(null==r?void 0:null===(n=r.cellState)||void 0===n?void 0:n.isExpanded);return(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,py:1.5,fontWeight:"normal",textOverflow:"ellipsis",overflow:c?void 0:"hidden",whiteSpace:c?"normal":void 0,title:c&&o?void 0:null==o?void 0:o.toString(),...a,children:s()(o)?o.toString():o})},p=e=>{let{time:t}=e;if(!t)return(0,l.jsx)(m,{value:"N/A"});let n=(0,o.B)(new Date(t),new Date,{addSuffix:!0}),r=(0,x.p6)(new Date(t));return(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",children:(0,l.jsx)(i.esZ,{title:r,children:(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,x.G8)(n)})})})},f=e=>{let{children:t,...n}=e;return(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",mr:2,overflow:"auto",...n,children:t})},v=e=>{let{value:t,suffix:n,...o}=e;return(0,l.jsx)(f,{children:(0,l.jsxs)(i.j8w,{...o,children:[t,n]})})},j=e=>{let{count:t,singSuffix:n,plSuffix:o,...r}=e,a=null;return a=1===t?(0,l.jsxs)(i.j8w,{...r,children:[t,n?" ".concat(n):null]}):(0,l.jsxs)(i.j8w,{...r,children:[t,o?" ".concat(o):null]}),(0,l.jsx)(f,{children:a})},b=e=>{let{values:t,cellProps:n,...o}=e,{isExpanded:r,isWrapped:a,version:s}=(null==n?void 0:n.cellState)||{},[d,u]=(0,c.useState)(!r),[g,x]=(0,c.useState)(!!a),[h,m]=(0,c.useState)(r?t:null==t?void 0:t.slice(0,2));return(0,c.useEffect)(()=>{u(!r)},[r,s]),(0,c.useEffect)(()=>{x(!!a)},[a]),(0,c.useEffect)(()=>{(null==t?void 0:t.length)&&m(d?t.slice(0,2):t)},[d,t]),(0,c.useMemo)(()=>(null==h?void 0:h.length)?(0,l.jsxs)(i.kCb,{alignItems:d?"center":"flex-start",flexDirection:d||g?"row":"column",flexWrap:g?"wrap":"nowrap",gap:1.5,pt:2,pb:2,overflowX:"auto",onClick:e=>{d||(e.stopPropagation(),u(!0))},cursor:d?void 0:"pointer",children:[h.map(e=>(0,l.jsx)(i.j8w,{color:"white","data-testid":e.key,...o,children:e.label},e.key)),d&&t&&t.length>2&&(0,l.jsxs)(i.wpx,{type:"link",size:"small",onClick:()=>u(!1),className:"text-xs font-normal",children:["+",t.length-2," more"]})]}):null,[h,d,g,t,o])},C=e=>{let{values:t,valueSuffix:n,cellProps:o}=e,{isExpanded:r,version:a}=(null==o?void 0:o.cellState)||{},[s,d]=(0,c.useState)(!r);return(0,c.useEffect)(()=>{d(!r)},[r,a]),(0,c.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"normal",textOverflow:"ellipsis",overflow:"hidden",children:t[0]}):(0,l.jsxs)(i.kCb,{flexDirection:"row",alignItems:"center",gap:1,pt:2,pb:2,onClick:e=>{s||(e.stopPropagation(),d(!0))},cursor:s?void 0:"pointer",children:[s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(i.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"normal",children:[t.length," ",n]}),(0,l.jsx)(i.wpx,{type:"link",size:"small",onClick:()=>d(!1),className:"text-xs font-normal",children:"View"})]}),!s&&(0,l.jsx)(i.aVo,{overflow:"hidden",children:t.map(e=>(0,l.jsx)(i.HCh,{fontSize:"xs",lineHeight:4,listStyleType:"none",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:e},e))})]}):null,[s,t,n])},w=e=>{let{value:t,suffix:n,cellState:o,ignoreZero:r,tagProps:a}=e,s=null;return t?(s=Array.isArray(t)?1===t.length?(0,l.jsx)(i.j8w,{...a,children:t}):(null==o?void 0:o.isExpanded)&&t.length>0?t.map((e,t)=>(0,l.jsx)(i.j8w,{...a,children:e},(null==e?void 0:e.toString())||t)):(0,l.jsxs)(i.j8w,{...a,children:[t.length,n?" ".concat(n):null]}):(0,l.jsx)(i.j8w,{...a,children:t}),(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",gap:2,overflowX:"hidden",children:s})):r?null:(0,l.jsxs)(i.j8w,{...a,children:["0",n?" ".concat(n):""]})},S=e=>{let{dataTestId:t,...n}=e;return(0,l.jsx)(i.kCb,{alignItems:"center",justifyContent:"center",onClick:e=>e.stopPropagation(),children:(0,l.jsx)(i.XZJ,{"data-testid":t||void 0,...n})})},y=e=>{let{value:t,...n}=e;return(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:9,fontWeight:"medium",flex:1,...n,children:t})},k=e=>{let{value:t,defaultValue:n,isEditing:o,...a}=e,s=a.column.columnDef.id||"",{submitForm:c}=(0,r.u6)();return o?(0,l.jsx)(r.Rt,{name:s,as:i.uFc,maxLength:80,placeholder:n,"aria-label":"Edit column name",size:"small","data-testid":"column-".concat(s,"-input"),onPressEnter:c}):(0,l.jsx)(y,{value:t,...a})},z=e=>{let{enabled:t,onToggle:n,title:o,message:r,isDisabled:a,...s}=e,c=(0,i.qY0)(),x=(0,i.pmc)(),h=async e=>{let{enable:t}=e,l=await n(t);(0,d.D4)(l)&&x((0,g.Vo)((0,d.e$)(l.error)))},m=async e=>{e?await h({enable:!0}):c.onOpen()};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.rAg,{checked:t,onChange:m,disabled:a,"data-testid":"toggle-switch",...s}),(0,l.jsx)(u.Z,{isOpen:c.isOpen,onClose:c.onClose,onConfirm:()=>{h({enable:!1}),c.onClose()},title:o,message:(0,l.jsx)(i.xvT,{color:"gray.500",children:r}),continueButtonText:"Confirm",isCentered:!0,icon:(0,l.jsx)(i.aNP,{color:"orange.100"})})]})},W=e=>{let{value:t,helperText:n,...o}=e;return(0,l.jsxs)(i.kCb,{alignItems:"center",gap:1,...o,children:[(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:9,fontWeight:"medium",children:t}),(0,l.jsx)(h.b,{label:n})]})}},14481:function(e,t,n){n.d(t,{A4:function(){return l.A4},CI:function(){return l.CI},F1:function(){return p},G3:function(){return l.G3},Rr:function(){return l.Rr},vr:function(){return R},ZK:function(){return W},HO:function(){return D},WP:function(){return l.WP},k:function(){return l.k},W3:function(){return A.W3},s8:function(){return A.s8},AA:function(){return _},Q$:function(){return H},I4:function(){return P},bX:function(){return A.bX},oi:function(){return A.oi}});var l=n(72625),o=n(24246),i=n(91942),r=n(27378),a=n(43862),s=n(65201),c=n(75383),d=n(52202);let u="DraggableColumnListItem",g=e=>{let{id:t,index:n,moveColumn:l,setColumnVisible:o}=e,i=(0,r.useRef)(null),[{handlerId:a},s]=(0,c.L)({accept:u,collect:e=>({handlerId:e.getHandlerId()}),hover(e,t){var o;if(!i.current)return;let r=e.index;if(r===n)return;let a=null===(o=i.current)||void 0===o?void 0:o.getBoundingClientRect(),s=(a.bottom-a.top)/2,c=t.getClientOffset().y-a.top;r<n&&c<s||r>n&&c>s||(l(r,n),Object.assign(e,{index:n}))}}),[{isDragging:g},x,h]=(0,d.c)({type:u,item:()=>({id:t,index:n}),collect:e=>({isDragging:!!e.isDragging()})});return x(s(i)),{isDragging:g,ref:i,handlerId:a,preview:h,handleColumnVisibleToggle:e=>{o(n,e)}}},x=e=>{let{id:t,index:n,isVisible:l,moveColumn:r,setColumnVisible:a,text:s}=e,{ref:c,isDragging:d,handlerId:u,preview:x,handleColumnVisibleToggle:h}=g({index:n,id:t,moveColumn:r,setColumnVisible:a});return(0,o.jsxs)(i.HCh,{alignItems:"center",display:"flex",minWidth:0,ref:e=>{x(e)},"data-handler-id":u,opacity:d?.2:1,"data-testid":"column-list-item-".concat(t),children:[(0,o.jsx)(i.xuv,{ref:c,cursor:d?"grabbing":"grab","data-testid":"column-dragger-".concat(t),children:(0,o.jsx)(i.DE2,{as:i.zGR,color:"gray.300",flexShrink:0,height:"20px",width:"20px",_hover:{color:"gray.700"}})}),(0,o.jsxs)(i.NIc,{alignItems:"center",display:"flex",minWidth:0,title:s,children:[(0,o.jsx)(i.lXp,{color:"gray.700",fontSize:"normal",fontWeight:400,htmlFor:"".concat(t),mb:"0",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flexGrow:1,children:s}),(0,o.jsx)(i.rAg,{id:"".concat(t),checked:l,onChange:h})]})]})},h=e=>{let{columns:t}=e,[n,l]=(0,r.useState)(null!=t?t:[]);return(0,r.useEffect)(()=>{l((null==t?void 0:t.map(e=>({...e})))||[])},[t]),{columns:n,moveColumn:(0,r.useCallback)((e,t)=>{l(n=>(0,s.ZP)(n,n=>{let l=n[e];n.splice(e,1),n.splice(t,0,l)}))},[]),setColumnVisible:(0,r.useCallback)((e,t)=>{l(n=>(0,s.ZP)(n,n=>{n[e]&&(n[e].isVisible=t)}))},[])}},m=e=>{let{columns:t,columnEditor:n}=e;return(0,o.jsx)(i.aVo,{spacing:4,children:t.map((e,t)=>(0,o.jsx)(x,{id:e.id,index:t,isVisible:e.isVisible,moveColumn:n.moveColumn,setColumnVisible:n.setColumnVisible,text:e.displayText},e.id))})},p=e=>{let{isOpen:t,onClose:n,headerText:l,tableInstance:s,columnNameMap:c,prefixColumns:d,savedCustomReportId:u,onColumnOrderChange:g,onColumnVisibilityChange:x}=e,p=h({columns:(0,r.useMemo)(()=>s.getAllColumns().filter(e=>!d.includes(e.id)).map(e=>{var t;return{id:e.id,displayText:(0,a.AH)({columnNameMap:c,columnId:e.id}),isVisible:null!==(t=s.getState().columnVisibility[e.id])&&void 0!==t?t:e.getIsVisible()}}).sort((e,t)=>{let{columnOrder:n}=s.getState(),l=n.indexOf(e.id),o=n.indexOf(t.id);return -1===l&&-1===o?0:-1===l?1:-1===o?-1:l-o}),[u,c])}),f=(0,r.useCallback)(()=>{let e=[...d,...p.columns.map(e=>e.id)],t=p.columns.reduce((e,t)=>(e[t.id]=t.isVisible,e),{});g(e),x(t),n()},[n,d,p.columns,g,x]);return(0,o.jsxs)(i.u_l,{isOpen:t,onClose:n,isCentered:!0,size:"2xl",children:[(0,o.jsx)(i.ZAr,{}),(0,o.jsxs)(i.hzk,{children:[(0,o.jsx)(i.xBx,{pb:0,children:l}),(0,o.jsx)(i.olH,{"data-testid":"column-settings-close-button"}),(0,o.jsxs)(i.fef,{children:[(0,o.jsx)(i.xvT,{fontSize:"sm",color:"gray.500",mb:2,children:"You can toggle columns on and off to hide or show them in the table. Additionally, you can drag columns up or down to change the order"}),(0,o.jsxs)(i.mQc,{colorScheme:"complimentary",children:[(0,o.jsx)(i.tdY,{children:(0,o.jsx)(i.OK9,{color:"complimentary.500",children:"Columns"})}),(0,o.jsx)(i.nPR,{children:(0,o.jsx)(i.x45,{p:0,pt:4,maxHeight:"270px",overflowY:"scroll",children:(0,o.jsx)(m,{columns:p.columns,columnEditor:p})})})]})]}),(0,o.jsx)(i.mzw,{children:(0,o.jsxs)(i.xuv,{display:"flex",justifyContent:"space-between",width:"100%",children:[(0,o.jsx)(i.wpx,{onClick:n,className:"mr-3 grow",children:"Cancel"}),(0,o.jsx)(i.wpx,{onClick:f,type:"primary",className:"grow","data-testid":"save-button",children:"Save"})]})})]})]})};var f=n(59003),v=n(71795),j=n(14048);let b=e=>{var t,n,l,r,s,c,d,u;let g,{cell:x,onRowClick:h,cellState:m}=e,p=x.getContext().table.getState().grouping.length>0,v=p?x.getContext().table.getState().grouping[0]:void 0,j=x.column.id===v,b=!1,C=!1,w=!1,{rows:S}=x.getContext().table.getRowModel(),y=S[0].id===x.row.id,k=S[S.length-1].id===x.row.id;if(x.getValue()&&j){let e=x.getContext().table.getRow("".concat(x.column.id,":").concat(x.getValue()));w=1===e.subRows.length,b=e.subRows[0].id===x.row.id,C=e.subRows[e.subRows.length-1].id===x.row.id}let z=(!j||b)&&!!(null===(t=x.column.columnDef.meta)||void 0===t?void 0:t.onCellClick);return(null===(n=x.column.columnDef.meta)||void 0===n?void 0:n.disableRowClick)||!h?z&&(g=()=>{var e,t;null===(t=x.column.columnDef.meta)||void 0===t||null===(e=t.onCellClick)||void 0===e||e.call(t,x.row.original)}):g=e=>{h(x.row.original,e)},(0,o.jsx)(i.Td,{width:(null===(l=x.column.columnDef.meta)||void 0===l?void 0:l.width)?x.column.columnDef.meta.width:"unset",overflow:(null===(r=x.column.columnDef.meta)||void 0===r?void 0:r.overflow)?null===(s=x.column.columnDef.meta)||void 0===s?void 0:s.overflow:"auto",borderBottomWidth:k||j?"0px":"1px",borderBottomColor:"gray.200",borderRightWidth:"1px",borderRightColor:"gray.200",sx:{article:{borderTopWidth:"2x",borderTopColor:"red"},...(0,a.J9)("select"===x.column.id||(null===(c=x.column.columnDef.meta)||void 0===c?void 0:c.noPadding)),maxWidth:"calc(var(--col-".concat(x.column.id,"-size) * 1px)"),minWidth:"calc(var(--col-".concat(x.column.id,"-size) * 1px)"),"&:hover":{backgroundColor:z?"gray.50":void 0,cursor:z?"pointer":void 0}},_hover:!h||(null===(d=x.column.columnDef.meta)||void 0===d?void 0:d.disableRowClick)?void 0:{cursor:"pointer"},_first:{borderBottomWidth:(p||k)&&(!C||y||k)&&(!b||!w||k)?"0px":"1px"},_last:{borderRightWidth:0},height:"inherit",onClick:g,"data-testid":"row-".concat(x.row.id,"-col-").concat(x.column.id),...null===(u=x.column.columnDef.meta)||void 0===u?void 0:u.cellProps,children:!x.getIsPlaceholder()||b?(0,f.ie)(x.column.columnDef.cell,{...x.getContext(),cellState:m}):null})},C=e=>{let{row:t,renderRowTooltipLabel:n,onRowClick:l,expandedColumns:r,wrappedColumns:s}=e;if(t.getIsGrouped())return null;let c=(0,o.jsx)(i.Tr,{height:"36px",_hover:l?{backgroundColor:"gray.50"}:void 0,"data-testid":"row-".concat(t.id),backgroundColor:t.getCanSelect()?void 0:"gray.50",children:t.getVisibleCells().map(e=>{let t=(0,a.tt)(e.column.id,r),n={isExpanded:!!t&&t>0,isWrapped:!!s.find(t=>t===e.column.id),version:t};return(0,o.jsx)(b,{cell:e,onRowClick:l,cellState:n},e.id)})},t.id);return n?(0,o.jsx)(i.esZ,{title:n?n(t):void 0,placement:"top",children:c}):c},w={asc:{icon:(0,o.jsx)(i.Hf3,{}),title:"Sort ascending"},desc:{icon:(0,o.jsx)(i.veu,{}),title:"Sort descending"}},S={height:i.rSc.space[9],width:"100%",textAlign:"start","&:focus-visible":{backgroundColor:"gray.100"},"&:focus":{outline:"none"},letterSpacing:"0.6px"},y=e=>{var t,n,l,r,s,c,d,u,g;let{header:x,onGroupAll:h,onExpandAll:m,onWrapToggle:p,isExpandAll:v,isWrapped:b,enableSorting:C}=e,{meta:y}=x.column.columnDef;return(null==y?void 0:y.showHeaderMenu)?(0,o.jsxs)(i.v2r,{placement:"bottom-end",closeOnSelect:!y.showHeaderMenuWrapOption,children:[(0,o.jsx)(i.j2t,{as:i.zxk,rightIcon:(0,o.jsxs)(i.Ugi,{children:[null===(t=w[x.column.getIsSorted()])||void 0===t?void 0:t.icon,(0,o.jsx)(i.nXP,{transform:"rotate(90deg)"})]}),title:"Column options",variant:"ghost",size:"sm",sx:{...(0,a.J9)("select"===x.column.id),...S},"data-testid":"".concat(x.id,"-header-menu"),children:(0,f.ie)(x.column.columnDef.header,x.getContext())}),(0,o.jsx)(i.h_i,{children:(0,o.jsxs)(i.qyq,{fontSize:"xs",minW:"0",w:"158px","data-testid":"".concat(x.id,"-header-menu-list"),children:[(0,o.jsxs)(i.sNh,{gap:2,color:v?"complimentary.500":void 0,onClick:()=>m(x.id),children:[(0,o.jsx)(j.oq,{})," Expand all"]}),(0,o.jsxs)(i.sNh,{gap:2,color:v?void 0:"complimentary.500",onClick:()=>h(x.id),children:[(0,o.jsx)(j.Kc,{})," Collapse all"]}),C&&x.column.getCanSort()&&(0,o.jsxs)(i.sNh,{gap:2,onClick:x.column.getToggleSortingHandler(),children:[null!==(u=null===(n=w[x.column.getNextSortingOrder()])||void 0===n?void 0:n.icon)&&void 0!==u?u:(0,o.jsx)(i.Dbz,{}),null!==(g=null===(l=w[x.column.getNextSortingOrder()])||void 0===l?void 0:l.title)&&void 0!==g?g:"Clear sort"]}),y.showHeaderMenuWrapOption&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.RaW,{}),(0,o.jsx)(i.xuv,{px:3,children:(0,o.jsx)(i.XZJ,{size:"sm",isChecked:b,onChange:()=>p(x.id,!b),colorScheme:"complimentary",children:(0,o.jsx)(i.xvT,{fontSize:"xs",children:"Wrap results"})})})]})]})})]}):C&&x.column.getCanSort()?(0,o.jsx)(i.zxk,{"data-testid":"".concat(x.id,"-header-sort"),onClick:x.column.getToggleSortingHandler(),rightIcon:null===(s=w[x.column.getIsSorted()])||void 0===s?void 0:s.icon,title:null!==(d=null===(c=w[x.column.getNextSortingOrder()])||void 0===c?void 0:c.title)&&void 0!==d?d:"Clear sort",variant:"ghost",size:"sm",sx:{...(0,a.J9)("select"===x.column.id),...S},children:(0,f.ie)(x.column.columnDef.header,x.getContext())}):(0,o.jsx)(i.xuv,{"data-testid":"".concat(x.id,"-header"),sx:{...(0,a.J9)("select"===x.column.id)},fontSize:"xs",lineHeight:9,fontWeight:"medium",style:null===(r=x.column.columnDef.meta)||void 0===r?void 0:r.headerProps,children:(0,f.ie)(x.column.columnDef.header,x.getContext())})},k=e=>{var t;let{tableInstance:n,rowActionBar:l,onRowClick:r,getRowIsClickable:a,renderRowTooltipLabel:s,expandedColumns:c,wrappedColumns:d,emptyTableNotice:u}=e,g=e=>a?a(e)?r:void 0:r;return(0,o.jsxs)(i.p3B,{"data-testid":"fidesTable-body",children:[l,n.getRowModel().rows.map(e=>(0,o.jsx)(C,{row:e,onRowClick:g(e.original),renderRowTooltipLabel:s,expandedColumns:c,wrappedColumns:d},e.id)),0===n.getRowModel().rows.length&&!(null===(t=n.getState())||void 0===t?void 0:t.globalFilter)&&u&&(0,o.jsx)(i.Tr,{children:(0,o.jsx)(i.Td,{colSpan:100,children:u})})]})},z=r.memo(k,(e,t)=>e.tableInstance.options.data===t.tableInstance.options.data),W=e=>{let{tableInstance:t,rowActionBar:n,footer:l,onRowClick:s,getRowIsClickable:c,renderRowTooltipLabel:d,emptyTableNotice:u,overflow:g="auto",onSort:x,enableSorting:h=!!x,columnExpandStorageKey:m,columnWrapStorageKey:p}=e,[f,j]=(0,r.useState)(1),[b,C]=(0,v._)(m,[]),[w,S]=(0,v._)(p,[]),W=e=>{C([...b.filter(t=>t.split(a.mb)[0]!==e),"".concat(e).concat(a.mb).concat(f)]),j(f+1)},R=e=>{C([...b.filter(t=>t.split(a.mb)[0]!==e),"".concat(e).concat(a.mb).concat(-1*f)]),j(f+1)},I=(e,t)=>{S(t?[...w,e]:w.filter(t=>t!==e))},T=(0,r.useMemo)(()=>{let e=t.getFlatHeaders(),n={};for(let i=0;i<e.length;i+=1){var l,o;let r=e[i],a=!!(null===(l=t.getState().columnSizing)||void 0===l?void 0:l[r.id]),s="auto"===(null===(o=r.column.columnDef.meta)||void 0===o?void 0:o.width);!a&&s?setTimeout(()=>{var e;let l=null===(e=document.getElementById("column-".concat(r.id)))||void 0===e?void 0:e.offsetWidth;l&&(t.setColumnSizing(e=>({...e,[r.id]:l})),n["--header-".concat(r.id,"-size")]=l,n["--col-".concat(r.column.id,"-size")]=l)}):(n["--header-".concat(r.id,"-size")]=r.getSize(),n["--col-".concat(r.column.id,"-size")]=r.column.getSize())}return n},[t.getState().columnSizingInfo]);return(0,r.useEffect)(()=>{x&&x(t.getState().sorting[0])},[t.getState().sorting]),(0,o.jsx)(i.xJi,{"data-testid":"fidesTable",overflowY:g,overflowX:g,borderColor:"gray.200",borderBottomWidth:"1px",borderRightWidth:"1px",borderLeftWidth:"1px",children:(0,o.jsxs)(i.iA_,{variant:"unstyled",style:{borderCollapse:"separate",borderSpacing:0,...T,minWidth:"100%"},children:[(0,o.jsx)(i.hrZ,{position:"sticky",top:"0",height:"36px",zIndex:10,backgroundColor:"gray.50",children:t.getHeaderGroups().map(e=>(0,o.jsx)(i.Tr,{height:"inherit",children:e.headers.map(e=>{var t;let n=(0,a.tt)(e.id,b);return(0,o.jsxs)(i.Th,{borderColor:"gray.200",borderTopWidth:"1px",borderBottomWidth:"1px",borderRightWidth:"1px",_last:{borderRightWidth:0},colSpan:e.colSpan,"data-testid":"column-".concat(e.id),id:"column-".concat(e.id),sx:{padding:0,width:"calc(var(--header-".concat(e.id,"-size) * 1px)"),overflowX:"auto"},textTransform:"unset",position:"relative",_hover:{"& .resizer":{opacity:1}},...null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.cellProps,children:[(0,o.jsx)(y,{header:e,onGroupAll:R,onExpandAll:W,onWrapToggle:I,isExpandAll:!!n&&n>0,isWrapped:!!w.find(t=>e.id===t),enableSorting:h}),e.column.getCanResize()?(0,o.jsx)(i.xuv,{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),position:"absolute",height:"100%",top:"0",right:"0",width:"5px",cursor:"col-resize",userSelect:"none",className:"resizer",opacity:0,backgroundColor:e.column.getIsResizing()?"complimentary.500":"gray.200"}):null]},e.id)})},e.id))}),t.getState().columnSizingInfo.isResizingColumn?(0,o.jsx)(z,{tableInstance:t,rowActionBar:n,onRowClick:s,getRowIsClickable:c,renderRowTooltipLabel:d,expandedColumns:b,wrappedColumns:w,emptyTableNotice:u}):(0,o.jsx)(k,{tableInstance:t,rowActionBar:n,onRowClick:s,getRowIsClickable:c,renderRowTooltipLabel:d,expandedColumns:b,wrappedColumns:w,emptyTableNotice:u}),l]})})},R=e=>{let{totalColumns:t,children:n}=e;return(0,o.jsx)(i.$RU,{backgroundColor:"gray.50",children:(0,o.jsx)(i.Tr,{children:(0,o.jsx)(i.Td,{colSpan:t,px:4,py:2,borderTop:"1px solid",borderColor:"gray.200",children:n})})})};var I=n(16394),T=n(26917);let D=e=>{let{globalFilter:t,setGlobalFilter:n,placeholder:l,testid:a="global-text-filter"}=e,[s,c]=(0,r.useState)(t),d=(0,r.useMemo)(()=>(0,I.Ds)(n,200),[n]),u=(0,r.useCallback)(()=>{c(void 0),n(void 0)},[c,n]);return(0,r.useEffect)(()=>{s||u()},[s,u]),(0,o.jsx)(i.xuv,{maxWidth:"424px",width:"100%",children:(0,o.jsx)(T.Z,{onChange:e=>{c(e),d(e)},onClear:u,value:s||"",placeholder:l,"data-testid":a})})};var A=n(42904),N=n(3124),O=n.n(N);let _=e=>{let{tableInstance:t,selectedRows:n,isOpen:l}=e;return l?(0,o.jsx)(i.Tr,{position:"sticky",zIndex:"10",top:"36px",backgroundColor:"neutral.100",height:"36px",p:0,boxShadow:"0px 4px 6px -1px rgba(0, 0, 0, 0.05)",children:(0,o.jsx)(i.Td,{borderWidth:"1px",borderColor:"gray.200",height:"inherit",pl:4,pr:2,py:0,colSpan:t.getAllColumns().length,bgColor:O().FIDESUI_FULL_WHITE,children:(0,o.jsxs)(i.Ugi,{children:[(0,o.jsxs)(i.xvT,{"data-testid":"selected-row-count",fontSize:"xs",children:[n.toLocaleString("en")," row(s) selected."]}),t.getIsAllRowsSelected()?null:(0,o.jsxs)(i.wpx,{"data-testid":"select-all-rows-btn",onClick:()=>{t.toggleAllRowsSelected()},type:"link",size:"small",className:"text-xs font-normal text-black underline",children:["Select all ",t.getFilteredRowModel().rows.length," rows."]})]})})}):null},H=e=>{let{children:t,...n}=e;return(0,o.jsx)(i.Ugi,{justifyContent:"space-between",alignItems:"center",p:2,borderWidth:"1px",borderBottomWidth:"0px",borderColor:"gray.200",zIndex:11,...n,children:t})},P=e=>{let{rowHeight:t,numRows:n}=e,l=[];for(let e=0;e<n;e+=1)l.push((0,o.jsx)(i.OdW,{height:"".concat(t,"px")},e));return(0,o.jsx)(i.Kqy,{children:l})}},43862:function(e,t,n){n.d(t,{AH:function(){return c},J9:function(){return a},mb:function(){return r},tt:function(){return s}});var l=n(91942),o=n(98784),i=n.n(o);let r="::",a=e=>e?{padding:"0px"}:{paddingLeft:l.rSc.space[3],paddingRight:"calc(".concat(l.rSc.space[3]," - 5px)"),paddingTop:"0px",paddingBottom:"0px",borderRadius:"0px"},s=(e,t)=>{let n=t.find(t=>t.startsWith(e));return n?parseInt(n.split(r)[1],10):void 0},c=e=>{let{columnId:t,columnNameMap:n}=e;if(!t)return"";let l=t.replace(/^(system_|privacy_declaration_)/,""),o=i().upperFirst(l.replaceAll("_"," "));return(null==n?void 0:n[t])||o}},19043:function(e,t,n){n.d(t,{Bw:function(){return r},D4:function(){return o},Dy:function(){return s},XD:function(){return c},cz:function(){return d},hE:function(){return a},oK:function(){return i}});var l=n(76649);let o=e=>"error"in e,i=e=>(0,l.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,r=e=>(0,l.Ln)({status:"number",data:{}},e),a=e=>(0,l.Ln)({detail:"string"},e),s=e=>(0,l.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,l.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,l.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4723],{58754:function(e,a,t){var i=t(24246),n=t(91942),s=t(70788);a.Z=e=>{let{heading:a,breadcrumbItems:t,isSticky:r=!0,children:l,rightContent:o,style:d,...c}=e;return(0,i.jsxs)("div",{...c,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,i.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof a?(0,i.jsx)(n.lQT,{className:t||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:a}):a,o&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!t&&(0,i.jsx)(s.m,{className:l?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,a,t){t.d(a,{d:function(){return d}});var i=t(24246),n=t(91942),s=t(34090),r=t(27378),l=t(46238),o=t(40324);let d=e=>{let{name:a,label:t,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:m,...v}=e,[g,h,{setValue:x}]=(0,s.U$)(a),y=!!(h.touched&&h.error),[f,_]=(0,r.useState)("");g.value||"tags"!==v.mode&&"multiple"!==v.mode||(g.value=[]),"tags"===v.mode&&"string"==typeof g.value&&(g.value=[g.value]);let j="tags"===v.mode?(e,a)=>e?e.value!==f||g.value.includes(f)?v.optionRender?v.optionRender(e,a):e.label:'Create "'.concat(f,'"'):void 0:v.optionRender||void 0,b=e=>{_(e),v.onSearch&&v.onSearch(e)},k=(e,a)=>{x(e),v.onChange&&v.onChange(e,a)};return"inline"===p?(0,i.jsx)(n.NIc,{isInvalid:y,isRequired:u,children:(0,i.jsxs)(n.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,i.jsx)(o.__,{htmlFor:v.id||a,...d,children:t}):null,(0,i.jsxs)(n.jqI,{align:"center",children:[(0,i.jsxs)(n.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(n.WPr,{...g,id:v.id||a,"data-testid":"controlled-select-".concat(g.name),...v,optionRender:j,onSearch:"tags"===v.mode?b:void 0,onChange:k,value:g.value||void 0,status:y?"error":void 0}),m&&(0,i.jsx)(n.Q6r,{children:m}),(0,i.jsx)(o.Bc,{isInvalid:y,message:h.error,fieldName:g.name})]}),(0,i.jsx)(l.b,{label:c})]})]})}):(0,i.jsx)(n.NIc,{isInvalid:y,isRequired:u,children:(0,i.jsxs)(n.gCW,{alignItems:"start",children:[(0,i.jsxs)(n.jqI,{align:"center",children:[t?(0,i.jsx)(o.__,{htmlFor:v.id||a,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,i.jsx)(l.b,{label:c})]}),(0,i.jsx)(n.WPr,{...g,id:v.id||a,"data-testid":"controlled-select-".concat(g.name),...v,optionRender:j,onSearch:"tags"===v.mode?b:void 0,onChange:k,value:g.value||void 0,status:y?"error":void 0}),m&&(0,i.jsx)(n.Q6r,{style:{marginTop:0},children:m}),(0,i.jsx)(o.Bc,{isInvalid:y,message:h.error,fieldName:g.name})]})})}},70788:function(e,a,t){t.d(a,{m:function(){return d}});var i=t(24246),n=t(91942),s=t(79894),r=t.n(s),l=t(27378);let{Text:o}=n.AntTypography,d=e=>{let{items:a,...t}=e,s=(0,l.useMemo)(()=>null==a?void 0:a.map((e,t)=>{let s=t===a.length-1,l={...e},d=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,i.jsx)(o,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:l.title})),d)?l.title=(0,i.jsx)(n.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,i.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[a]);return(0,i.jsx)(n.zrq,{items:s,...t})}},31435:function(e,a,t){t.d(a,{Z:function(){return I}});var i=t(24246),n=t(91942),s=t(34090),r=t(27378),l=t(55484),o=t(16134),d=t(25980),c=t(40324),u=t(33335),p=t(32885),m=t(1315),v=t(57865),g=t(72774),h=t(36345),x=t(812),y=t(8133),f=t(46628);let _={name:"",consent_use:"",data_use:"",data_categories:["user"],cookieNames:[],cookies:[]},j=[{label:"Analytics",value:"analytics",description:"Provides analytics for activities such as system and advertising performance reporting, insights and fraud detection."},{label:"Essential",value:"essential",description:"Operates the service or product, including legal obligations, support and basic system operations."},{label:"Functional",value:"functional",description:"Used for specific, necessary, and legitimate purposes."},{label:"Marketing",value:"marketing",description:"Enables marketing, promotion, advertising and sales activities for the product, service, application or system."}],b=e=>j.some(a=>a.value===e.split(".")[0]);var k=t(28079),C=t(69525),N=t(97181);let w=e=>{let{index:a,disabled:t}=e;(0,k.fd)();let r=(0,o.C)(k.oW),{values:l}=(0,s.u6)(),d=r.filter(e=>e.value.split(".")[0]===l.privacy_declarations[a].consent_use);return(0,i.jsxs)(n.gCW,{width:"100%",borderRadius:"4px",border:"1px solid",borderColor:"gray.200",spacing:4,p:4,children:[(0,i.jsx)(N.d,{label:"Consent category",tooltip:"What is the system using the data for. For example, is it for third party advertising or perhaps simply providing system operations.",name:"privacy_declarations.".concat(a,".consent_use"),options:j,layout:"stacked",isRequired:!0,disabled:t}),(0,i.jsx)(N.d,{allowClear:!0,label:"Detailed consent category (optional)",tooltip:"Select a more specific consent category",name:"privacy_declarations.".concat(a,".data_use"),options:d,layout:"stacked",disabled:!l.privacy_declarations[a].consent_use||t}),(0,i.jsx)(N.d,{mode:"tags",label:"Cookie names",name:"privacy_declarations.".concat(a,".cookieNames"),options:[],layout:"stacked",disabled:t,className:"w-full"})]})};var R=e=>{var a,t;let{showSuggestions:l,isCreate:d,disabled:c}=e,{values:u,setFieldValue:m}=(0,s.u6)(),{vendor_id:v}=u,{isLoading:g}=(0,p.Wp)({vendor_id:v},{skip:!l||null==v}),h=(0,o.C)((0,p.cL)(v||""));(0,r.useEffect)(()=>{l&&u.vendor_id&&(null==h?void 0:h.length)?m("privacy_declarations",h.filter(e=>b(e.data_use)).map(e=>(0,C.U)(e)).map(e=>{var a,t,i;return{name:null!==(t=e.name)&&void 0!==t?t:"",consent_use:e.data_use.split(".")[0],data_use:e.data_use,data_categories:e.data_categories,cookieNames:(null===(a=e.cookies)||void 0===a?void 0:a.map(e=>e.name))||[],cookies:null!==(i=e.cookies)&&void 0!==i?i:[]}})):d&&m("privacy_declarations",[_])},[l,d,u.vendor_id,h,m]);let x=(null===(a=u.privacy_declarations[u.privacy_declarations.length-1])||void 0===a?void 0:a.data_use)===_.data_use&&(null===(t=u.privacy_declarations[u.privacy_declarations.length-1])||void 0===t?void 0:t.consent_use)===_.consent_use;return g?(0,i.jsx)(n.$jN,{size:"sm",alignSelf:"center"}):(0,i.jsx)(s.F2,{name:"privacy_declarations",render:e=>(0,i.jsxs)(i.Fragment,{children:[u.privacy_declarations.map((e,a)=>(0,i.jsx)(w,{index:a,disabled:c},e.data_use||a)),(0,i.jsx)(n.wpx,{onClick:()=>e.push(_),size:"small",type:"text",disabled:c||x,"data-testid":"add-data-use-btn",children:"Add data use +"})]})})};let q={name:"",vendor_id:void 0,privacy_declarations:[_]};var I=e=>{let{buttonLabel:a,onButtonClick:t,buttonProps:j}=e,b=(0,n.pmc)(),{isOpen:k,onOpen:C,onClose:N}=(0,n.qY0)(),w=(0,o.T)(),[I]=(0,m.in)(),S=(0,r.useMemo)(()=>l.Ry().shape({name:l.Z_().required().label("Vendor name").test("is-unique","",async(e,a)=>{let{data:t}=await I({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).some(a=>a.name===e)||a.createError({message:'You already have a vendor called "'.concat(e,'". Please specify a unique name for this vendor.')})})}),[I]),{tcf:F,dictionaryService:W}=(0,d.hz)(),{isLoading:z}=(0,p.Rd)(void 0,{skip:!W}),V=(0,o.C)(p.o),E=(0,o.C)(v.gU),[Q]=(0,m.f7)(),T=(0,o.C)(v.bN),Z=()=>{N(),w((0,v.b3)("initial")),w((0,v.gQ)(!1))},L=(0,r.useRef)(null),A=L.current?L.current.values.vendor_id:void 0,B=(0,o.C)((0,p.$e)(A||"")),M=async(e,a)=>{let t=e.privacy_declarations.filter(e=>e.consent_use!==_.consent_use).flatMap(e=>{let a=e.cookieNames.map(a=>{let t=e.cookies.find(e=>e.name===a);return null!=t?t:{name:a,path:"/"}}),{cookieNames:t,consent_use:i,...n}=e;return"marketing"!==e.consent_use||e.data_use?{...n,data_use:e.data_use?e.data_use:e.consent_use,cookies:a}:["marketing.advertising.first_party.targeted","marketing.advertising.third_party.targeted"].map(e=>({...n,data_use:e,cookies:a}))}),i={...B,...e,fides_key:(0,u.E)(e.name),system_type:"",privacy_declarations:t},n=await Q(i);if((0,x.D4)(n)){b((0,f.Vo)((0,x.e$)(n.error)));return}b((0,f.t5)("Vendor successfully created!")),a.resetForm(),Z()},P=e=>{if(W){if(!e){w((0,v.b3)("hiding")),w((0,v.gQ)(!1));return}w((0,v.b3)("showing")),F&&(0,x.cj)(e)===x.c6.GVL?w((0,v.gQ)(!0)):w((0,v.gQ)(!1))}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.wpx,{onClick:()=>{t?t():C()},"data-testid":"add-vendor-btn",...j,children:a}),(0,i.jsx)(s.J9,{initialValues:q,enableReinitialize:!0,onSubmit:M,validationSchema:S,innerRef:L,children:e=>{let{dirty:a,isValid:t,resetForm:r}=e;return(0,i.jsx)(y.Z,{isOpen:k,onClose:Z,title:"Add a vendor",children:(0,i.jsxs)(n.xuv,{"data-testid":"add-vendor-modal-content",my:4,children:[E?(0,i.jsx)(g.Z,{}):null,(0,i.jsx)(s.l0,{children:(0,i.jsxs)(n.gCW,{alignItems:"start",spacing:6,children:[W?(0,i.jsx)(h.Z,{label:"Vendor name",options:V,isLoading:z,onVendorSelected:P,isCreate:!0,lockedForGVL:E}):(0,i.jsx)(c.j0,{id:"name",name:"name",isRequired:!0,label:"Vendor name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked"}),(0,i.jsx)(R,{showSuggestions:"showing"===T,isCreate:!0,disabled:E}),(0,i.jsxs)("div",{className:"flex w-full justify-between",children:[(0,i.jsx)(n.wpx,{onClick:()=>{Z(),r()},children:"Cancel"}),(0,i.jsx)(n.wpx,{type:"primary",htmlType:"submit",disabled:z||!a||!t,loading:z,"data-testid":"save-btn",children:"Save vendor"})]})]})})]})})}})]})}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5258],{35258:function(e,a,t){t.d(a,{Z:function(){return A}});var i=t(24246),s=t(84720),n=t(91942),r=t(27378),l=t(52368),d=t(812),o=t(46628),c=t(65450),u=t(31883),m=t(34090),p=t(45938),x=t(95346),h=t(55484),y=t(97181),v=t(40324),b=t(7448);let j=h.Ry().shape({data_categories:h.IX(h.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:h.Z_().required().label("Data use"),data_subjects:h.IX(h.Z_()).min(1,"Must assign at least one data subject").label("Data subjects")}),g={data_categories:[],data_subjects:[],data_use:"",dataset_references:[],customFieldValues:{},id:"",cookies:[]},f=e=>{var a;let{customFieldValues:t,...i}=e;return{...i,name:null!==(a=e.name)&&void 0!==a?a:"",cookies:i.cookies.map(e=>({name:e,path:"/"}))}},_=e=>{let{allDataUses:a,allDataCategories:t,allDataSubjects:s,allDatasets:r,privacyDeclarationId:l,includeCustomFields:d}=e,o=r?r.map(e=>{var a;return{label:null!==(a=e.name)&&void 0!==a?a:e.fides_key,value:e.fides_key}}):[];return(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsx)(y.d,{id:"data_use",label:"Data use",name:"data_use",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What is the system using the data for. For example, is it for third party advertising or perhaps simply providing system operations.",layout:"stacked",disabled:!!l}),(0,i.jsx)(v.j0,{id:"name",label:"Processing Activity",name:"name",variant:"stacked",tooltip:"The personal data processing activity or activities associated with this data use.",disabled:!!l}),(0,i.jsx)(y.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What type of data is your system processing? This could be various types of user or system data.",mode:"multiple",layout:"stacked",disabled:!0}),(0,i.jsx)(y.d,{name:"data_subjects",label:"Data subjects",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Whose data are you processing? This could be customers, employees or any other type of user in your system.",mode:"multiple",layout:"stacked",disabled:!0}),r?(0,i.jsx)(y.d,{name:"dataset_references",label:"Dataset references",options:o,tooltip:"Referenced Dataset fides keys used by the system.",mode:"multiple",layout:"stacked"}):null,d?(0,i.jsx)(x.uc,{resourceType:b.P6.PRIVACY_DECLARATION,resourceFidesKey:l}):null]})},k=(e,a)=>{var t,i;return e?{...e,customFieldValues:a||{},cookies:null!==(i=null===(t=e.cookies)||void 0===t?void 0:t.map(e=>e.name))&&void 0!==i?i:[]}:g},D=e=>{let{onSubmit:a,initialValues:t,allDataUses:s,privacyDeclarationId:l}=e,{customFieldValues:d,upsertCustomFields:o}=(0,x.mZ)({resourceType:b.P6.PRIVACY_DECLARATION,resourceFidesKey:l}),c=(0,r.useMemo)(()=>k(t,d),[t,d]),[u,m]=(0,r.useState)(!1),p=(0,r.useMemo)(()=>{let e=s.filter(e=>e.fides_key===c.data_use)[0];if(e)return c.name?"".concat(e.name," - ").concat(c.name):e.name},[s,c]);return{handleSubmit:async(e,t)=>{let{customFieldValues:i}=e,s=f(e),n=await a(s,t);if(n){let a=n.filter(a=>a.data_use===e.data_use&&(!a.name||a.name===e.name));a.length>0&&await o({customFieldValues:i,fides_key:a[0].id}),t.resetForm({values:e}),m(!0)}},renderHeader:e=>{let{dirty:a,boxProps:t,hideSaved:s}=e;return(0,i.jsxs)(n.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",...t,children:[p?(0,i.jsx)(n.X6q,{as:"h4",size:"xs",fontWeight:"medium",mr:4,children:p}):null,!s&&u&&!a&&c.data_use?(0,i.jsxs)(n.xvT,{fontSize:"sm","data-testid":"saved-indicator",children:[(0,i.jsx)(n.StI,{})," Saved"]}):null]})},initialValues:c}},w=e=>{let{onSubmit:a,initialValues:t,onDelete:s,...r}=e,{handleSubmit:l,renderHeader:d,initialValues:o}=D({onSubmit:a,initialValues:t,allDataUses:r.allDataUses,privacyDeclarationId:null==t?void 0:t.id});return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:o,onSubmit:l,validationSchema:j,children:e=>{let{dirty:a}=e;return(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(p.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsx)(n.xuv,{"data-testid":"header",children:d({dirty:a})}),(0,i.jsx)(_,{onDelete:s,...r})]})]})}})},S=e=>{let{privacyDeclaration:a,onEdit:t,onDelete:s,includeCustomFields:r,...l}=e,{initialValues:d,renderHeader:o,handleSubmit:c}=D({initialValues:a,onSubmit:e=>t(a,e),privacyDeclarationId:a.id,...l});return(0,i.jsx)(n.Qdk,{children:e=>{let{isExpanded:t}=e;return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:d,onSubmit:c,validationSchema:j,children:e=>{let{dirty:d}=e;return(0,i.jsxs)(m.l0,{"data-testid":"".concat(a.data_use,"-form"),children:[(0,i.jsx)(p.Gt,{id:"".concat(a.id,"-form"),name:a.id}),(0,i.jsxs)(n.KFZ,{py:4,borderBottomWidth:t?"0px":"1px",backgroundColor:t?"gray.50":void 0,"data-testid":"accordion-header-".concat(a.data_use),children:[o({dirty:d,boxProps:{flex:"1",textAlign:"left"},hideSaved:!t}),(0,i.jsx)(n.XEm,{})]}),(0,i.jsx)(n.Hk3,{backgroundColor:"gray.50",pt:0,children:(0,i.jsx)(n.Kqy,{spacing:4,children:(0,i.jsx)(_,{privacyDeclarationId:a.id,onDelete:s,includeCustomFields:r,...l})})})]})}})}})};var C=e=>{let{privacyDeclarations:a,...t}=e;return(0,i.jsx)(n.UQy,{allowToggle:!0,border:"transparent","data-testid":"privacy-declaration-accordion",children:a.map(e=>(0,i.jsx)(S,{privacyDeclaration:e,...t},e.id))})},T=e=>{let{system:a,includeCustomFields:t,onSave:s,...l}=e,m=(0,n.pmc)(),[p]=(0,c.qQ)(),[x,h]=(0,r.useState)(!1),[y,v]=(0,r.useState)(void 0),b=(0,r.useMemo)(()=>y?a.privacy_declarations.filter(e=>e.id!==y.id):a.privacy_declarations,[y,a]),j=e=>b.filter(a=>a.data_use===e.data_use&&a.name===e.name).length>0&&(m((0,o.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),g=async(e,t)=>{let i=e.map(e=>{var a;return{...e,name:null!==(a=e.name)&&void 0!==a?a:""}}),n={...a,privacy_declarations:i};return(e=>{if((0,u.D4)(e)){let a=(0,d.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");m((0,o.Vo)(a));return}return m.closeAll(),m((0,o.t5)(t?"Data use deleted":"Data use saved")),s&&s(e.data),e.data.privacy_declarations})(await p(n))},f=async(e,t)=>{if(!(t.id!==e.id&&j(t)))return g(a.privacy_declarations.map(a=>a.id===e.id?t:a))},_=async e=>{if(j(e))return;m.closeAll();let a=[...b,e],t=await g(a);return t&&v(t.filter(a=>(!a.name||a.name===e.name)&&a.data_use===e.data_use)[0]),t},k=async e=>g(a.privacy_declarations.filter(a=>a.id!==e.id),!0),D=async e=>{let a=await k(e);return a&&(h(!1),v(void 0)),a};return(0,r.useEffect)(()=>{h(!1)},[a.fides_key]),(0,i.jsxs)(n.Kqy,{spacing:3,children:[(0,i.jsx)(C,{privacyDeclarations:b,onEdit:f,onDelete:k,includeCustomFields:t,...l}),x?(0,i.jsx)(n.xuv,{backgroundColor:"gray.50",p:4,"data-testid":"new-declaration-form",children:(0,i.jsx)(w,{initialValues:y,onSubmit:_,onDelete:D,includeCustomFields:t,...l})}):null,0===a.privacy_declarations.length?(0,i.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",pl:2,children:"No data uses"}):null]})},I=t(19043);let V=e=>{let[a]=(0,c.dB)(),t=(0,n.pmc)();return{handleUpsertSystem:async(i,s)=>{let n=[{...e,name:i.name,description:i.description}],r=await a(n);(0,I.D4)(r)?t((0,o.Vo)((0,d.e$)(r.error))):(t((0,o.t5)("Successfully saved system info")),s.resetForm({values:i}))},validationSchema:h.Ry().shape({name:h.Z_().required().label("Name"),description:h.Z_().required().label("Description")})}},F={name:"",description:""};var W=e=>{let{system:a}=e,t="/systems/configure/".concat(a.fides_key),{handleUpsertSystem:s,validationSchema:r}=V(a);return(0,i.jsxs)(n.xuv,{children:[(0,i.jsxs)(n.kCb,{alignItems:"center",children:[(0,i.jsx)(n.xvT,{color:"gray.600",size:"md",lineHeight:6,fontWeight:"semibold",marginBottom:2,children:"System details"}),(0,i.jsx)(n.LZC,{}),(0,i.jsxs)(n._pl,{color:"complimentary.500",href:t,children:["View more",(0,i.jsx)(n.h0n,{ml:2})]})]}),(0,i.jsx)(n.xuv,{width:"100%",padding:4,borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:null!=a?a:F,validationSchema:r,onSubmit:s,children:e=>{let{isSubmitting:a,dirty:t,isValid:s}=e;return(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(p.Gt,{id:"SystemInfoDrawer",name:"System Info"}),(0,i.jsx)(n.xuv,{marginTop:3,children:(0,i.jsx)(v.j0,{label:"System name",name:"name",variant:"stacked"})}),(0,i.jsx)(n.xuv,{marginTop:3,children:(0,i.jsx)(v.Ks,{label:"System description",name:"description",variant:"stacked"})}),(0,i.jsx)(n.kCb,{marginTop:6,justifyContent:"flex-end",children:(0,i.jsx)(n.wpx,{htmlType:"submit",disabled:!t||!s,loading:a,type:"primary",children:"Save"})})]})}})})]})},A=e=>{var a;let{selectedSystemId:t,resetSelectedSystemId:d}=e,o=(0,r.useMemo)(()=>!!t,[t]),{isLoading:u,...m}=(0,l.f)({includeDatasets:!1,includeDisabled:!1}),{data:p}=(0,c.rn)(t,{skip:!t});return(0,i.jsx)(n.xuv,{position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,overflow:"hidden",children:(0,i.jsx)(n.Mi4,{transition:{enter:{ease:"easeInOut",duration:.5},exit:{ease:"easeInOut",duration:.5}},direction:"right",in:o,unmountOnExit:!0,style:{zIndex:11,pointerEvents:"none",position:"absolute"},children:(0,i.jsxs)(n.xuv,{position:"absolute",right:"0px",height:"100%",width:"100%",maxWidth:"480px",pointerEvents:"auto",borderWidth:0,boxShadow:"0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)",display:t?"unset":"none",backgroundColor:"white","data-testid":"datamap-drawer",children:[(0,i.jsx)(n.xuv,{id:"drawer-header",borderBottomWidth:1,paddingX:6,paddingY:3,children:(0,i.jsxs)(n.kCb,{children:[(0,i.jsx)(n.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:(0,i.jsx)(n.xvT,{fontWeight:"semibold",fontSize:"lg",lineHeight:"7",color:"gray.900",children:null!==(a=null==p?void 0:p.name)&&void 0!==a?a:"System Information"})}),(0,i.jsx)(n.LZC,{}),(0,i.jsx)(n.kCb,{alignItems:"center",children:(0,i.jsx)(n.wpx,{icon:(0,i.jsx)(n.Two,{}),"aria-label":"Close error message",type:"text",onClick:d,"data-testid":"datamap-drawer-close"})})]})}),(0,i.jsx)(n.xuv,{id:"drawer-body",height:"calc(100% - 46px)",overflowY:"auto",padding:6,style:{scrollbarGutter:"stable"},children:p?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(W,{system:p}),(0,i.jsx)(n.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,children:"Data uses"}),(0,i.jsx)(n.xuv,{borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(n.xuv,{pb:3,children:(0,i.jsx)(T,{system:p,...m})})}),(0,i.jsx)(n.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,paddingBottom:2,children:"Data flow"}),(0,i.jsx)(s.q,{system:p})]}):null})]})})})}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5487],{624:function(e,t,i){var n=i(24246),l=i(91942),r=i(27378);let a=e=>{let t=e.split("."),i=[];return t.forEach(e=>{let t=i.length>0?i[i.length-1]:null;t?i.push("".concat(t,".").concat(e)):i.push(e)}),i},s=(e,t)=>{let i=a(t).filter(e=>e!==t);return e.filter(e=>i.includes(e)).length>0},o=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,i)=>{let n=null!=i?i:[];return e.forEach(e=>{e.children&&c(e.children,t,n),o(e.value,t)&&n.push(e)}),n},d=e=>{let{node:t,isChecked:i,onChecked:r,isExpanded:a,onExpanded:s,isIndeterminate:o,isDisabled:c,children:d}=e,{value:u,label:h}=t,x=!!t.children&&t.children.length>0;return(0,n.jsxs)(l.xuv,{children:[(0,n.jsxs)(l.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>s(t),minHeight:8,children:[(0,n.jsx)(l.XZJ,{colorScheme:"complimentary",value:u,isChecked:!o&&i,isIndeterminate:o,isDisabled:c,onChange:()=>r(t),mx:2,"data-testid":"checkbox-".concat(h),children:h}),x?(0,n.jsx)(l.wpx,{"data-testid":"expand-".concat(h),"aria-label":a?"collapse":"expand",icon:(0,n.jsx)(l.v4q,{boxSize:5}),type:"text",onClick:()=>s(t),className:a?"rotate-180":void 0}):null]}),d&&(0,n.jsx)(l.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:i,onSelected:u,...h}=e,[x,p]=(0,r.useState)([]),[f,m]=(0,r.useState)([]);(0,r.useEffect)(()=>{let e=Array.from(new Set([...i.map(e=>a(e)).reduce((e,t)=>e.concat(t),[]),...i.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));m(e),p(e)},[i,t]);let j=e=>{let n=[],l=[];x.indexOf(e.value)>=0?(n=x.filter(t=>!o(t,e.value)),l=i.filter(t=>!o(t,e.value))):(n=[...x,...c(t,e.value).map(e=>e.value)],l=[...i,e.value]),p(n),u(l)},v=e=>{f.indexOf(e.value)>=0?m(f.filter(t=>!o(t,e.value))):m([...f,e.value])},C=e=>{if(e.children){let l=x.indexOf(e.value)>=0,a=f.indexOf(e.value)>=0,o=c(t,e.value),u=l&&e.children.length>0&&x.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==o.length,h=s(i,e.value);return(0,n.jsx)(d,{node:e,isChecked:l,onChecked:j,isExpanded:a,onExpanded:v,isDisabled:h,isIndeterminate:u,children:a?e.children.map(e=>(0,n.jsx)(r.Fragment,{children:C(e)},e.value)):void 0})}return null};return(0,n.jsx)(l.xuv,{...h,children:t.map(e=>(0,n.jsx)(l.xuv,{children:C(e)},e.value))})}},79806:function(e,t,i){i.d(t,{Gn:function(){return s},zR:function(){return a}});var n=i(24246),l=i(91942),r=i(56358);let a=e=>{let{title:t}=e;return(0,n.jsx)(l.OXI,{py:0,display:"flex",alignItems:"flex-start",children:(0,n.jsx)(l.xvT,{mr:"2",color:"gray.700",fontSize:"lg",lineHeight:1.8,children:t})})},s=e=>{let{onDelete:t,onEditYaml:i,formId:a,isSaving:s}=e;return(0,n.jsxs)(l.zeN,{justifyContent:"space-between",children:[t?(0,n.jsx)(l.wpx,{"aria-label":"delete",icon:(0,n.jsx)(r.q,{fontSize:"small"}),onClick:t,"data-testid":"delete-btn"}):null,(0,n.jsxs)("div",{className:"flex gap-2",children:[i&&(0,n.jsx)(l.wpx,{onClick:i,"data-testid":"edit-yaml-btn",children:"Edit YAML"}),(0,n.jsx)(l.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:a,loading:s,children:"Save"})]})]})};t.ZP=e=>{let{header:t,description:i,isOpen:r,onClose:a,children:s,footer:o}=e;return(0,n.jsxs)(l.dys,{placement:"right",isOpen:r,onClose:a,size:"md",children:[(0,n.jsx)(l.P1B,{}),(0,n.jsxs)(l.scA,{"data-testid":"edit-drawer-content",py:2,children:[(0,n.jsxs)(l.xuv,{display:"flex",justifyContent:"space-between",alignItems:"top",mr:2,py:2,gap:2,children:[(0,n.jsx)(l.xuv,{flex:1,minH:8,children:t}),(0,n.jsx)(l.xuv,{display:"flex",justifyContent:"flex-end",mr:2,children:(0,n.jsx)(l.wpx,{"aria-label":"Close editor",onClick:a,"data-testid":"close-drawer-btn",icon:(0,n.jsx)(l.Two,{fontSize:"smaller"})})})]}),(0,n.jsxs)(l.Ng0,{pt:1,children:[i?(0,n.jsx)(l.xvT,{fontSize:"sm",mb:4,color:"gray.600",children:i}):null,s]}),o]})]})}},56358:function(e,t,i){i.d(t,{q:function(){return l}});var n=i(24246);let l=(0,i(91942).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,n.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,i){i.d(t,{Z:function(){return h}});var n=i(24246),l=i(91942),r=i(88038),a=i.n(r),s=i(86677);i(27378);var o=i(25980),c=i(90867),d=i(77830),u=()=>{let e=(0,s.useRouter)();return(0,n.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,n.jsxs)(l.xuv,{children:[(0,n.jsxs)(l.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(l.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(l.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,n.jsxs)(l.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:i,padded:r=!0,mainProps:d}=e,h=(0,o.hz)(),x=(0,s.useRouter)(),p="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,f=!(h.flags.privacyRequestsConfiguration&&p),{data:m}=(0,c.JE)(void 0,{skip:f}),{data:j}=(0,c.PW)(void 0,{skip:f}),v=h.flags.privacyRequestsConfiguration&&(!m||!j)&&p;return(0,n.jsxs)(l.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(a(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(l.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:[v?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){var n=i(24246),l=i(91942),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:a=!0,children:s,rightContent:o,style:c,...d}=e;return(0,n.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,n.jsxs)(l.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(l.lQT,{className:i||s?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:s?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),s]})}},70788:function(e,t,i){i.d(t,{m:function(){return c}});var n=i(24246),l=i(91942),r=i(79894),a=i.n(r),s=i(27378);let{Text:o}=l.AntTypography,c=e=>{let{items:t,...i}=e,r=(0,s.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,s={...e},c=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:s.title})),c)?s.title=(0,n.jsx)(l.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,n.jsx)(a(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[t]);return(0,n.jsx)(l.zrq,{items:r,...i})}},69828:function(e,t,i){i.d(t,{Y:function(){return a}});var n=i(24246),l=i(91942),r=i(70788);let a=[(0,n.jsx)(l.PJP.S9g,{},"layers"),(0,n.jsx)(l.PJP.ehp,{},"dataset"),(0,n.jsx)(l.PJP.iA_,{},"table"),(0,n.jsx)(l.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];t.Z=e=>{let{resourceUrn:t,parentLink:i,onPathClick:l=()=>{}}=e,s=[];if(t||s.push({title:"All activity"}),t){s.push({title:"All activity",href:i});let e=t.split(".");e.forEach((t,i)=>{0!==i&&s.push({title:t,icon:a[i-1],onClick:t=>{t.preventDefault(),l(e.slice(0,i+1).join("."))}})})}return(0,n.jsx)(r.m,{"data-testid":"results-breadcrumb",items:s})}},63927:function(e,t,i){i.d(t,{e:function(){return m},Z:function(){return j}});var n=i(24246),l=i(91942),r=i(34090),a=i(27378),s=i(16125),o=i(40324),c=i(39864),d=i(56026),u=i(46238),h=i(624),x=i(90673),p=e=>{let{dataCategories:t,checked:i,onChecked:r,buttonLabel:s}=e,o=(0,a.useMemo)(()=>(0,x.Cd)(t),[t]);return(0,n.jsxs)(l.v2r,{closeOnSelect:!0,children:[(0,n.jsx)(l.j2t,{as:l.wpx,icon:(0,n.jsx)(l.mCO,{}),className:"!bg-transparent",block:!0,"data-testid":"data-category-dropdown",children:null!=s?s:"Select data categories"}),(0,n.jsx)(l.qyq,{children:(0,n.jsxs)(l.xuv,{maxHeight:"50vh",minWidth:"300px",maxW:"full",overflowY:"scroll",children:[(0,n.jsxs)(l.xuv,{position:"sticky",top:0,zIndex:1,backgroundColor:"white",pt:1,children:[(0,n.jsx)(l.__7,{children:(0,n.jsxs)(l.xuv,{display:"flex",justifyContent:"space-between",px:2,mb:2,children:[(0,n.jsx)(l.sNh,{as:l.wpx,size:"small",className:"mr-2 !w-auto",onClick:()=>r([]),closeOnSelect:!1,"data-testid":"data-category-clear-btn",children:"Clear"}),(0,n.jsx)(l.xvT,{mr:2,children:"Data Categories"}),(0,n.jsx)(l.sNh,{as:l.wpx,size:"small",className:"!w-auto","data-testid":"data-category-done-btn",children:"Done"})]})}),(0,n.jsx)(l.RaW,{})]}),(0,n.jsx)(l.xuv,{px:2,"data-testid":"data-category-checkbox-tree",children:(0,n.jsx)(h.ZP,{nodes:o,selected:i,onSelected:r})})]})})]})},f=e=>{let{dataCategories:t,checked:i,onChecked:r,tooltip:a}=e,s=e=>{r(i.filter(t=>t!==e))},o=i.slice().sort((e,t)=>e.localeCompare(t));return(0,n.jsxs)(l.rjZ,{templateColumns:"1fr 3fr",children:[(0,n.jsx)(l.lXp,{children:"Data Categories"}),(0,n.jsxs)(l.vyj,{direction:"vertical",size:"small",children:[(0,n.jsxs)(l.xuv,{display:"flex",alignItems:"center",children:[(0,n.jsx)(l.xuv,{mr:"2",width:"100%",children:(0,n.jsx)(p,{dataCategories:t,checked:i,onChecked:r})}),(0,n.jsx)(u.b,{label:a})]}),(0,n.jsx)(l.vyj,{direction:"vertical",size:2,"data-testid":"selected-categories",children:o.map(e=>(0,n.jsx)(l.j8w,{closable:!0,onClose:()=>{s(e)},children:e},e))})]})]})};let m="edit-collection-or-field-form";var j=e=>{var t;let{values:i,onSubmit:u,dataType:h,showDataCategories:x=!0}=e,p={description:null!==(t=i.description)&&void 0!==t?t:"",data_categories:i.data_categories},j=(0,s.v9)(c.qb).filter(e=>e.active),[v,C]=(0,a.useState)(p.data_categories||[]),g="collection"===h?d.du.description.tooltip:d.QL.description.tooltip,y="collection"===h?d.du.data_categories.tooltip:d.QL.data_categories.tooltip;return(0,n.jsx)(r.J9,{initialValues:p,onSubmit:e=>{u({...e,data_categories:v})},children:(0,n.jsx)(r.l0,{id:m,children:(0,n.jsxs)(l.Kqy,{children:[(0,n.jsx)(o.j0,{name:"description",label:"Description",tooltip:g,"data-testid":"description-input"}),x&&(0,n.jsx)(f,{dataCategories:j,checked:v,onChecked:C,tooltip:y})]})})})}},56026:function(e,t,i){i.d(t,{QL:function(){return r},du:function(){return l},tz:function(){return n}});let n={name:{tooltip:"A UI-friendly label for the Dataset."},description:{tooltip:"A human-readable description of the Dataset."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to all collections in the Dataset."}},l={description:{tooltip:"A human-readable description of the collection."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to all fields in the collection."}},r={description:{tooltip:"A human-readable description of the field."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to this field."}}},69435:function(e,t,i){i.d(t,{Fk:function(){return c},_n:function(){return s},jC:function(){return r},qe:function(){return o}});var n=i(99729),l=i.n(n);let r=(e,t,i)=>{let n=e.collections.map((e,n)=>n===i?t:e);return{...e,collections:n}},a=(e,t,i)=>{let n=e.fields.map((e,n)=>n===i?t:e);return{...e,fields:n}},s=(e,t,i,n)=>{let l=a(e.collections[i],t,n);return r(e,l,i)},o=(e,t)=>{let i=e.collections.filter((e,i)=>i!==t);return{...e,collections:i}},c=e=>{let{dataset:t,collectionName:i,subfields:n}=e,r="",a=t.collections.findIndex(e=>e.name===i);return r+="collections[".concat(a,"]"),n&&n.forEach(e=>{let i=l()(t,r).fields.findIndex(t=>t.name===e);r+=".fields[".concat(i,"]")}),r}},59001:function(e,t,i){i.d(t,{Ch:function(){return a},Hy:function(){return s},Lo:function(){return l}});var n,l,r=i(61317);let a="root";(n=l||(l={})).DATA_CATEGORIES="Data categories",n.DATA_USES="Data uses",n.DATA_SUBJECTS="Data subjects";let s=e=>{switch(e){case"Data categories":return{UPDATE:r.Sh.DATA_CATEGORY_UPDATE,CREATE:r.Sh.DATA_CATEGORY_CREATE,DELETE:r.Sh.DATA_CATEGORY_DELETE,READ:r.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:r.Sh.DATA_USE_UPDATE,CREATE:r.Sh.DATA_USE_CREATE,DELETE:r.Sh.DATA_USE_DELETE,READ:r.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:r.Sh.DATA_SUBJECT_UPDATE,CREATE:r.Sh.DATA_SUBJECT_CREATE,DELETE:r.Sh.DATA_SUBJECT_DELETE,READ:r.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,i){i.d(t,{Cd:function(){return r},Xl:function(){return a}});var n=i(61317),l=i(59001);let r=(e,t)=>{let i;if(null==t&&e.every(e=>void 0===e.parent_key))i=e;else{let n=null!=t?t:null;i=e.filter(e=>e.parent_key===n)}return i.map(t=>{var i,n;let l=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:r(e,l),is_default:null!==(i=t.is_default)&&void 0!==i&&i,active:null!==(n=t.active)&&void 0!==n&&n}})},a=e=>{switch(e){case l.Lo.DATA_CATEGORIES:return n.P6.DATA_CATEGORY;case l.Lo.DATA_SUBJECTS:return n.P6.DATA_SUBJECT;case l.Lo.DATA_USES:return n.P6.DATA_USE;default:return}}}}]);
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5487],{624:function(e,t,i){var n=i(24246),l=i(91942),r=i(27378);let a=e=>{let t=e.split("."),i=[];return t.forEach(e=>{let t=i.length>0?i[i.length-1]:null;t?i.push("".concat(t,".").concat(e)):i.push(e)}),i},s=(e,t)=>{let i=a(t).filter(e=>e!==t);return e.filter(e=>i.includes(e)).length>0},o=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,i)=>{let n=null!=i?i:[];return e.forEach(e=>{e.children&&c(e.children,t,n),o(e.value,t)&&n.push(e)}),n},d=e=>{let{node:t,isChecked:i,onChecked:r,isExpanded:a,onExpanded:s,isIndeterminate:o,isDisabled:c,children:d}=e,{value:u,label:h}=t,x=!!t.children&&t.children.length>0;return(0,n.jsxs)(l.xuv,{children:[(0,n.jsxs)(l.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>s(t),minHeight:8,children:[(0,n.jsx)(l.XZJ,{colorScheme:"complimentary",value:u,isChecked:!o&&i,isIndeterminate:o,isDisabled:c,onChange:()=>r(t),mx:2,"data-testid":"checkbox-".concat(h),children:h}),x?(0,n.jsx)(l.wpx,{"data-testid":"expand-".concat(h),"aria-label":a?"collapse":"expand",icon:(0,n.jsx)(l.v4q,{boxSize:5}),type:"text",onClick:()=>s(t),className:a?"rotate-180":void 0}):null]}),d&&(0,n.jsx)(l.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:i,onSelected:u,...h}=e,[x,p]=(0,r.useState)([]),[f,m]=(0,r.useState)([]);(0,r.useEffect)(()=>{let e=Array.from(new Set([...i.map(e=>a(e)).reduce((e,t)=>e.concat(t),[]),...i.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));m(e),p(e)},[i,t]);let j=e=>{let n=[],l=[];x.indexOf(e.value)>=0?(n=x.filter(t=>!o(t,e.value)),l=i.filter(t=>!o(t,e.value))):(n=[...x,...c(t,e.value).map(e=>e.value)],l=[...i,e.value]),p(n),u(l)},v=e=>{f.indexOf(e.value)>=0?m(f.filter(t=>!o(t,e.value))):m([...f,e.value])},C=e=>{if(e.children){let l=x.indexOf(e.value)>=0,a=f.indexOf(e.value)>=0,o=c(t,e.value),u=l&&e.children.length>0&&x.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==o.length,h=s(i,e.value);return(0,n.jsx)(d,{node:e,isChecked:l,onChecked:j,isExpanded:a,onExpanded:v,isDisabled:h,isIndeterminate:u,children:a?e.children.map(e=>(0,n.jsx)(r.Fragment,{children:C(e)},e.value)):void 0})}return null};return(0,n.jsx)(l.xuv,{...h,children:t.map(e=>(0,n.jsx)(l.xuv,{children:C(e)},e.value))})}},79806:function(e,t,i){i.d(t,{Gn:function(){return s},zR:function(){return a}});var n=i(24246),l=i(91942),r=i(56358);let a=e=>{let{title:t}=e;return(0,n.jsx)(l.OXI,{py:0,display:"flex",alignItems:"flex-start",children:(0,n.jsx)(l.xvT,{mr:"2",color:"gray.700",fontSize:"lg",lineHeight:1.8,children:t})})},s=e=>{let{onDelete:t,onEditYaml:i,formId:a,isSaving:s}=e;return(0,n.jsxs)(l.zeN,{justifyContent:"space-between",children:[t?(0,n.jsx)(l.wpx,{"aria-label":"delete",icon:(0,n.jsx)(r.q,{fontSize:"small"}),onClick:t,"data-testid":"delete-btn"}):null,(0,n.jsxs)("div",{className:"flex gap-2",children:[i&&(0,n.jsx)(l.wpx,{onClick:i,"data-testid":"edit-yaml-btn",children:"Edit YAML"}),(0,n.jsx)(l.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:a,loading:s,children:"Save"})]})]})};t.ZP=e=>{let{header:t,description:i,isOpen:r,onClose:a,children:s,footer:o}=e;return(0,n.jsxs)(l.dys,{placement:"right",isOpen:r,onClose:a,size:"md",children:[(0,n.jsx)(l.P1B,{}),(0,n.jsxs)(l.scA,{"data-testid":"edit-drawer-content",py:2,children:[(0,n.jsxs)(l.xuv,{display:"flex",justifyContent:"space-between",alignItems:"top",mr:2,py:2,gap:2,children:[(0,n.jsx)(l.xuv,{flex:1,minH:8,children:t}),(0,n.jsx)(l.xuv,{display:"flex",justifyContent:"flex-end",mr:2,children:(0,n.jsx)(l.wpx,{"aria-label":"Close editor",onClick:a,"data-testid":"close-drawer-btn",icon:(0,n.jsx)(l.Two,{fontSize:"smaller"})})})]}),(0,n.jsxs)(l.Ng0,{pt:1,children:[i?(0,n.jsx)(l.xvT,{fontSize:"sm",mb:4,color:"gray.600",children:i}):null,s]}),o]})]})}},56358:function(e,t,i){i.d(t,{q:function(){return l}});var n=i(24246);let l=(0,i(91942).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,n.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,i){i.d(t,{Z:function(){return h}});var n=i(24246),l=i(91942),r=i(88038),a=i.n(r),s=i(86677);i(27378);var o=i(25980),c=i(90867),d=i(77830),u=()=>{let e=(0,s.useRouter)();return(0,n.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,n.jsxs)(l.xuv,{children:[(0,n.jsxs)(l.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(l.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(l.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,n.jsxs)(l.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:i,padded:r=!0,mainProps:d}=e,h=(0,o.hz)(),x=(0,s.useRouter)(),p="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,f=!(h.flags.privacyRequestsConfiguration&&p),{data:m}=(0,c.JE)(void 0,{skip:f}),{data:j}=(0,c.PW)(void 0,{skip:f}),v=h.flags.privacyRequestsConfiguration&&(!m||!j)&&p;return(0,n.jsxs)(l.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(a(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(l.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:[v?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){var n=i(24246),l=i(91942),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:a=!0,children:s,rightContent:o,style:c,...d}=e;return(0,n.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,n.jsxs)(l.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(l.lQT,{className:i||s?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:s?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),s]})}},70788:function(e,t,i){i.d(t,{m:function(){return c}});var n=i(24246),l=i(91942),r=i(79894),a=i.n(r),s=i(27378);let{Text:o}=l.AntTypography,c=e=>{let{items:t,...i}=e,r=(0,s.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,s={...e},c=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:s.title})),c)?s.title=(0,n.jsx)(l.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,n.jsx)(a(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[t]);return(0,n.jsx)(l.zrq,{items:r,...i})}},69828:function(e,t,i){i.d(t,{Y:function(){return a}});var n=i(24246),l=i(91942),r=i(70788);let a=[(0,n.jsx)(l.PJP.S9g,{},"layers"),(0,n.jsx)(l.PJP.ehp,{},"dataset"),(0,n.jsx)(l.PJP.iA_,{},"table"),(0,n.jsx)(l.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];t.Z=e=>{let{resourceUrn:t,parentLink:i,onPathClick:l=()=>{}}=e,s=[];if(t||s.push({title:"All activity"}),t){s.push({title:"All activity",href:i});let e=t.split(".");e.forEach((t,i)=>{0!==i&&s.push({title:t,icon:a[i-1],onClick:t=>{t.preventDefault(),l(e.slice(0,i+1).join("."))}})})}return(0,n.jsx)(r.m,{"data-testid":"results-breadcrumb",items:s})}},63927:function(e,t,i){i.d(t,{e:function(){return m},Z:function(){return j}});var n=i(24246),l=i(91942),r=i(34090),a=i(27378),s=i(16125),o=i(40324),c=i(39864),d=i(56026),u=i(46238),h=i(624),x=i(90673),p=e=>{let{dataCategories:t,checked:i,onChecked:r,buttonLabel:s}=e,o=(0,a.useMemo)(()=>(0,x.Cd)(t),[t]);return(0,n.jsxs)(l.v2r,{closeOnSelect:!0,children:[(0,n.jsx)(l.j2t,{as:l.wpx,icon:(0,n.jsx)(l.mCO,{}),className:"!bg-transparent",block:!0,"data-testid":"data-category-dropdown",children:null!=s?s:"Select data categories"}),(0,n.jsx)(l.qyq,{children:(0,n.jsxs)(l.xuv,{maxHeight:"50vh",minWidth:"300px",maxW:"full",overflowY:"scroll",children:[(0,n.jsxs)(l.xuv,{position:"sticky",top:0,zIndex:1,backgroundColor:"white",pt:1,children:[(0,n.jsx)(l.__7,{children:(0,n.jsxs)(l.xuv,{display:"flex",justifyContent:"space-between",px:2,mb:2,children:[(0,n.jsx)(l.sNh,{as:l.wpx,size:"small",className:"mr-2 !w-auto",onClick:()=>r([]),closeOnSelect:!1,"data-testid":"data-category-clear-btn",children:"Clear"}),(0,n.jsx)(l.xvT,{mr:2,children:"Data Categories"}),(0,n.jsx)(l.sNh,{as:l.wpx,size:"small",className:"!w-auto","data-testid":"data-category-done-btn",children:"Done"})]})}),(0,n.jsx)(l.RaW,{})]}),(0,n.jsx)(l.xuv,{px:2,"data-testid":"data-category-checkbox-tree",children:(0,n.jsx)(h.ZP,{nodes:o,selected:i,onSelected:r})})]})})]})},f=e=>{let{dataCategories:t,checked:i,onChecked:r,tooltip:a}=e,s=e=>{r(i.filter(t=>t!==e))},o=i.slice().sort((e,t)=>e.localeCompare(t));return(0,n.jsxs)(l.rjZ,{templateColumns:"1fr 3fr",children:[(0,n.jsx)(l.lXp,{children:"Data Categories"}),(0,n.jsxs)(l.vyj,{direction:"vertical",size:"small",children:[(0,n.jsxs)(l.xuv,{display:"flex",alignItems:"center",children:[(0,n.jsx)(l.xuv,{mr:"2",width:"100%",children:(0,n.jsx)(p,{dataCategories:t,checked:i,onChecked:r})}),(0,n.jsx)(u.b,{label:a})]}),(0,n.jsx)(l.vyj,{direction:"vertical",size:2,"data-testid":"selected-categories",children:o.map(e=>(0,n.jsx)(l.j8w,{closable:!0,onClose:()=>{s(e)},children:e},e))})]})]})};let m="edit-collection-or-field-form";var j=e=>{var t;let{values:i,onSubmit:u,dataType:h,showDataCategories:x=!0}=e,p={description:null!==(t=i.description)&&void 0!==t?t:"",data_categories:i.data_categories},j=(0,s.v9)(c.qb).filter(e=>e.active),[v,C]=(0,a.useState)(p.data_categories||[]),g="collection"===h?d.du.description.tooltip:d.QL.description.tooltip,y="collection"===h?d.du.data_categories.tooltip:d.QL.data_categories.tooltip;return(0,n.jsx)(r.J9,{initialValues:p,onSubmit:e=>{u({...e,data_categories:v})},children:(0,n.jsx)(r.l0,{id:m,children:(0,n.jsxs)(l.Kqy,{children:[(0,n.jsx)(o.j0,{name:"description",label:"Description",tooltip:g,"data-testid":"description-input"}),x&&(0,n.jsx)(f,{dataCategories:j,checked:v,onChecked:C,tooltip:y})]})})})}},56026:function(e,t,i){i.d(t,{QL:function(){return r},du:function(){return l},tz:function(){return n}});let n={name:{tooltip:"A UI-friendly label for the Dataset."},description:{tooltip:"A human-readable description of the Dataset."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to all collections in the Dataset."}},l={description:{tooltip:"A human-readable description of the collection."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to all fields in the collection."}},r={description:{tooltip:"A human-readable description of the field."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to this field."}}},69435:function(e,t,i){i.d(t,{Fk:function(){return c},_n:function(){return s},jC:function(){return r},qe:function(){return o}});var n=i(99729),l=i.n(n);let r=(e,t,i)=>{let n=e.collections.map((e,n)=>n===i?t:e);return{...e,collections:n}},a=(e,t,i)=>{let n=e.fields.map((e,n)=>n===i?t:e);return{...e,fields:n}},s=(e,t,i,n)=>{let l=a(e.collections[i],t,n);return r(e,l,i)},o=(e,t)=>{let i=e.collections.filter((e,i)=>i!==t);return{...e,collections:i}},c=e=>{let{dataset:t,collectionName:i,subfields:n}=e,r="",a=t.collections.findIndex(e=>e.name===i);return r+="collections[".concat(a,"]"),n&&n.forEach(e=>{let i=l()(t,r).fields.findIndex(t=>t.name===e);r+=".fields[".concat(i,"]")}),r}},59001:function(e,t,i){i.d(t,{Ch:function(){return a},Hy:function(){return s},Lo:function(){return l}});var n,l,r=i(7448);let a="root";(n=l||(l={})).DATA_CATEGORIES="Data categories",n.DATA_USES="Data uses",n.DATA_SUBJECTS="Data subjects";let s=e=>{switch(e){case"Data categories":return{UPDATE:r.Sh.DATA_CATEGORY_UPDATE,CREATE:r.Sh.DATA_CATEGORY_CREATE,DELETE:r.Sh.DATA_CATEGORY_DELETE,READ:r.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:r.Sh.DATA_USE_UPDATE,CREATE:r.Sh.DATA_USE_CREATE,DELETE:r.Sh.DATA_USE_DELETE,READ:r.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:r.Sh.DATA_SUBJECT_UPDATE,CREATE:r.Sh.DATA_SUBJECT_CREATE,DELETE:r.Sh.DATA_SUBJECT_DELETE,READ:r.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,i){i.d(t,{Cd:function(){return r},Xl:function(){return a}});var n=i(7448),l=i(59001);let r=(e,t)=>{let i;if(null==t&&e.every(e=>void 0===e.parent_key))i=e;else{let n=null!=t?t:null;i=e.filter(e=>e.parent_key===n)}return i.map(t=>{var i,n;let l=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:r(e,l),is_default:null!==(i=t.is_default)&&void 0!==i&&i,active:null!==(n=t.active)&&void 0!==n&&n}})},a=e=>{switch(e){case l.Lo.DATA_CATEGORIES:return n.P6.DATA_CATEGORY;case l.Lo.DATA_SUBJECTS:return n.P6.DATA_SUBJECT;case l.Lo.DATA_USES:return n.P6.DATA_USE;default:return}}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5626],{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})},19904:function(e,s,t){t.d(s,{Tg:function(){return l}});var a=t(24246),i=t(16134),n=t(31793);let l=e=>(0,i.C)(n.uu).filter(s=>e.includes(s)).length>0;s.ZP=e=>{let{scopes:s,children:t}=e;return l(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,...l}=e,{getDataUseDisplayNameProps:r,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}=r(e.fides_key);return{value:e.fides_key,name:s,primaryName:t,description:e.description||""}});return(0,a.jsx)(i.l,{options:d,...l})}},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),l=t(45277),r=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,r.I0)(),[m,h]=(0,n.useState)(null),g=(0,i.pmc)(),{getRootProps:y,getInputProps:f,isDragActive:_}=(0,l.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])}}),[v,{isLoading:b}]=x(),{refetch:j}=(0,c.$I)({search:""},{skip:!1}),k=async()=>{if(m)try{var e;await v(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:b,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!m||b,onClick:k,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},3765:function(e,s,t){var a=t(91942),i=t(812),n=t(46628),l=t(1315),r=t(31883);s.Z=e=>{let s=(0,a.pmc)(),[t]=(0,l.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,r.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(7448),l=t(16394),r=t(14746);let o=r.Ny+r.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,l.ge)(e);return(0,l.tl)(a,100)}if(d(s))e=[...r.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=[...r.iW].find(e=>{let[s]=e;return s.toLowerCase()===t.toLowerCase()})}return e?r.Ny+e[1]:r.VD})(),fallbackSrc:u(s)?o:r.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:l,access_type:r,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:l,disabled:!t,access:r,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 r}});var a=t(24246),i=t(91942),n=t(77867),l=t(16394);let r=e=>{let{succeeded:s,timestamp:t}=e,r=t?(0,l.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(r):"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:l,placeholder:r,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:[l&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:l}),(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:r,size:"sm"}),"textarea"===o&&(0,a.jsx)(i.gxH,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:r,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 r}});var a=t(14047),i=t(14207),n=t(27378),l=t(41966);let r=e=>{var s,t,r;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!==(r=null==c?void 0:null===(s=c.items)||void 0===s?void 0:s.map(e=>e.fides_key))&&void 0!==r?r:[],p=u.map(e=>({label:e,value:e})),{data:m}=(0,l.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]:{},l=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:[],r=await d({connection_key:s,dataset_pairs:l}).unwrap();(null===(a=r.failed)||void 0===a?void 0:a.length)>0?x(r.failed[0].message):n&&g("Dataset successfully updated!")}}}},65626:function(e,s,t){t.d(s,{Z:function(){return sH}});var a,i,n=t(24246),l=t(84720),r=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),v=t(19904),b=t(16394),j=t(20682),k=t(41337);let w=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,l]=(0,p.useState)(),r=(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==r||r.map(s=>e.set(s.human_readable,{value:s})),e},[r]),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&&l(e)},[s,i]),{dropDownOptions:o,selectedValue:n,setSelectedValue:l,systemType:d}};var C=e=>{var s;let{disabled:t,hasClear:a=!0,label:i,list:l,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=[...l].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,b.Ds)(f,100),[f]),v=(0,p.useMemo)(()=>[...l].filter(e=>e[0].toLowerCase().includes(h.toLowerCase())),[l,h]);return(0,n.jsxs)(r.v2r,{isLazy:!0,onClose:g,onOpen:()=>{m(!0)},strategy:"fixed",matchWidth:!0,children:[(0,n.jsx)(r.j2t,{"aria-label":null!=y?y:i,as:r.wpx,color:y?"complimentary.500":void 0,disabled:t,icon:(0,n.jsx)(r.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)(r.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=y?y:i})}),u?(0,n.jsxs)(r.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,n.jsx)(r.xuv,{px:"8px",mt:2,children:(0,n.jsxs)(r.BZy,{size:"sm",children:[(0,n.jsx)(r.Z8_,{pointerEvents:"none",children:(0,n.jsx)(r.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,n.jsx)(r.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)(r.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,n.jsx)(r.wpx,{onClick:()=>{o(void 0),x(""),g()},size:"small",children:"Clear"})}),(0,n.jsx)(r.xuv,{overflowY:"auto",maxHeight:"272px",children:v.map(e=>{let[s,t]=e;return(0,n.jsx)(r.esZ,{title:t.toolTip,placement:"rightTop",mouseEnterDelay:.5,children:(0,n.jsxs)(r.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)(k.Z,{data:t.value}),(0,n.jsx)(r.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},S=t(14047),D=t(1315),T=t(7448),A=t(84306),I=t(14207),E=t(59301),q=(0,r.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)(r.xvT,{"data-testid":"toast-error-msg",children:e})}return(0,n.jsx)(r.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)(r.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(r.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,n.jsx)(r.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:l}=(0,N.MO)(),o=(0,m.C)(U.qb),{errorAlert:d}=(0,S.V)();return l?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)(r.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)(r.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(r.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(r.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(r.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(r.xuv,{visibility:"hidden",children:(0,n.jsx)(r.lr0,{})})]}),(0,n.jsx)(r.xuv,{children:a&&a.length>0?a.map((e,t)=>(0,n.jsxs)(r.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(r.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)(r.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(V.Z,{isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,n.jsx)(r.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)(r.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,n.jsx)(r.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,n.jsx)(r.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)(),[l,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)([]),{isOpen:u,onOpen:m,onClose:h}=(0,r.qY0)(),{data:x,isFetching:g,isLoading:y,isSuccess:f}=(0,I.QV)(s?s.key:"",{skip:!s}),[_]=(0,I.jF)(),[v]=(0,I._d)(),b=async(e,t)=>{try{o(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await v(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)(r.wpx,{disabled:!s||l,loading:l,onClick:m,children:"Customize DSR"});return(0,n.jsxs)(n.Fragment,{children:[s?j:(0,n.jsx)(r.esZ,{title:"Save an Integration first to customize the DSR",placement:"top",children:j}),(0,n.jsxs)(r.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:h,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{minWidth:"775px",children:[(0,n.jsx)(r.xBx,{children:"Customize DSR"}),(0,n.jsx)(r.olH,{}),(0,n.jsx)(r.fef,{pb:6,children:(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(r.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)(r.M5Y,{children:(0,n.jsx)(r.$jN,{})}),t.current&&!y?(0,n.jsx)(B,{data:d,isSubmitting:l,onSaveClick:b,onCancel:h}):null]})})]})]})]})},H=t(98784),Y=t.n(H),$=t(46238),G=t(73183),Q=e=>{let{options:s}=e,[t,{error:a},i]=(0,W.U$)("dataset"),{setValue:l}=i;return(0,n.jsxs)(r.NIc,{display:"flex",children:[(0,n.jsx)(r.lXp,{color:"gray.900",fontWeight:"semibold",fontSize:"sm",htmlFor:"dataset",minWidth:"150px",children:"Datasets"}),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"100%",children:[(0,n.jsx)(r.xuv,{w:"full",children:(0,n.jsx)(r.WPr,{...t,id:"dataset",placeholder:"Select datasets...",options:s,onChange:e=>l(e),mode:"multiple",className:"w-full"})}),(0,n.jsx)(r.J1D,{children:a})]}),(0,n.jsx)("div",{style:{marginLeft:"8px"},children:(0,n.jsx)($.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:l}=(0,r.qY0)(),o=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&l()};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.LZC,{}),(0,n.jsxs)(r.kCb,{alignItems:"center",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",children:"Delete integration"}),(0,n.jsx)(r.wpx,{"aria-label":"Delete integration",icon:(0,n.jsx)(J.l,{}),disabled:t.isLoading,onClick:i,className:"ml-2"})]})]}),(0,n.jsxs)(r.u_l,{isCentered:!0,isOpen:a,onClose:o,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{children:[(0,n.jsx)(r.xBx,{children:"Delete integration"}),(0,n.jsx)(r.olH,{}),(0,n.jsx)(r.fef,{pb:6,children:(0,n.jsx)(r.Kqy,{direction:"column",spacing:"15px",children:(0,n.jsx)(r.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)(r.mzw,{children:[(0,n.jsx)(r.wpx,{onClick:o,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(r.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:l,onTestConnectionClick:o,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:p,connectionConfig:m,initialDatasets:x,datasetDropdownOptions:g,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[v,{isLoading:b,isFetching:j}]=(0,I.h2)(),{plus:k}=(0,h.hz)(),w=(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)(r.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 w(s.title,e,null===(t=s.allOf)||void 0===t?void 0:t[0].$ref)}),children:t=>{var a;let{field:i,form:l}=t,o=l.errors.secrets&&l.errors.secrets[e],d=!!l.touched.secrets&&l.touched.secrets[e],c="boolean"===s.type,u="integer"===s.type;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:D(e)&&!c,isInvalid:o&&d,children:[C(e,s.title),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:[!u&&!c&&(0,n.jsx)(r.IIB,{...i,type:s.sensitive?"password":"text",placeholder:S(s),autoComplete:"off",color:"gray.700",size:"sm"}),c&&(0,n.jsx)(r.WPr,{value:!!i.value,onChange:e=>l.setFieldValue(i.name,e),options:[{label:"False",value:!1},{label:"True",value:!0}]}),u&&(0,n.jsxs)(r.Y2U,{allowMouseWheel:!0,color:"gray.700",onChange:e=>{l.setFieldValue(i.name,e)},value:null!==(a=i.value)&&void 0!==a?a:0,min:0,size:"sm",children:[(0,n.jsx)(r.zuI,{...i,autoComplete:"off"}),(0,n.jsxs)(r.FiK,{children:[(0,n.jsx)(r.WQu,{}),(0,n.jsx)(r.Y_d,{})]})]}),(0,n.jsx)(r.J1D,{children:o})]}),(0,n.jsx)(r.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)($.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 v(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)=>{l(E(e),s)},validateOnBlur:!1,validateOnChange:!1,children:e=>{var t;let l=!e.dirty&&(null==m?void 0:m.authorized);return(0,n.jsx)(W.l0,{noValidate:!0,children:(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)("div",{className:"flex flex-row",children:[m?(0,n.jsx)(G.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)(r.NIc,{display:"flex",children:[C("instance_key","Integration identifier"),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(r.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)(r.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(r.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)($.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,k&&(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)(r.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)(r.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(r.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)(r.J1D,{children:e.errors.enabled_actions})]}),(0,n.jsx)(r.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)($.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||l?(0,n.jsx)(r.wpx,{disabled:!(null==m?void 0:m.key)||a||_.isLoading,loading:b||j,onClick:()=>R(e),"data-testid":"test-connection-button",children:u}):null,k&&T.Zi.DATABASE===p.type&&!Y().isEmpty(x)&&(0,n.jsx)(r.wpx,{onClick:()=>d(),children:"Test datasets"}),p.authorization_required&&!l?(0,n.jsx)(r.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)(r.LZC,{}),(0,n.jsx)(r.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}:{}},l={systemFidesKey:a,connectionConfig:n};return Object.entries(s.properties).forEach(s=>{l.connectionConfig.secrets[s[0]]=e.secrets[s[0]]}),await i(l).unwrap()},el=async(e,s,t,a,i)=>{var n;let l=a?a.key:et(t,s),r={access:T.uv.WRITE,connection_type:s.type===T.Zi.SAAS?s.type:s.identifier,description:e.description,key:l,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:t,connectionConfigs:[r]}).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},er=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:l}=(0,A.V)(),{handleError:r}=(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)(),[v]=(0,L.IB)(),[b]=(0,I.rO)(),[j]=(0,O.Zh)(),[k]=(0,O.qd)(),[w]=(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?v:_)).connection;else{let n=await el(e,a,t,i,E?w:k);i||a.type!==T.Zi.DATABASE||(i=n.succeeded[0]),a.type!==T.Zi.MANUAL&&await er(e,s,t,q,j)}i&&e.dataset&&a.type===T.Zi.DATABASE&&await y(e,i.key,{showSuccessAlert:!1}),l("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){r(e)}finally{c(!1)}},handleAuthorization:async e=>{let n=!i;try{x(!0),n?i=(await en(e,s,a,t,_)).connection:await er(e,s,t,q,j);let l=await b(i.key).unwrap();x(!1),setTimeout(()=>{window.location.href=l},0)}catch(e){r(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),l("Integration successfully deleted!")}catch(e){r(e)}},deleteDatastoreConnectionResult:D}},ed=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i}=e,[l,o]=(0,p.useState)(),d=(0,r.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:v,handleDelete:b,deleteDatastoreConnectionResult:k}=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)(r.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:v,isCreatingConnectionConfig:!a,onDelete:b,deleteResult:k}),a?(0,n.jsxs)(r.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[l&&l.data&&void 0!==l.fulfilledTimeStamp?(0,n.jsx)(F.s,{succeeded:"succeeded"===l.data.test_status,timestamp:l.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)(r.LZC,{})]}):null]}):null};var ec=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:a,onOpen:i,onClose:l}=(0,r.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),l())},v=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 el(s,a,t,o,u)).succeeded[0]&&c("Integration successfully linked!"),d(null),l()}}catch(e){f(e)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.wpx,{onClick:i,children:"Link integration"}),(0,n.jsxs)(r.u_l,{isCentered:!0,isOpen:a,size:"lg",onClose:_,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{children:[(0,n.jsx)(r.xBx,{children:"Unlinked Integrations"}),(0,n.jsx)(r.olH,{}),(0,n.jsx)(r.fef,{pb:6,children:(0,n.jsxs)(r.Kqy,{direction:"column",spacing:"15px",children:[(0,n.jsx)(r.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)(r.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,n.jsxs)(r.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)(k.Z,{data:e}),(0,n.jsx)(r.xvT,{children:e.name})]},e.key))})]})}),(0,n.jsxs)(r.mzw,{className:"flex gap-4",children:[(0,n.jsx)(r.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(r.wpx,{onClick:v,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:l}=w({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,r.qY0)();return(0,n.jsxs)(r.xuv,{id:"con-wrapper",px:6,children:[(0,n.jsxs)(r.kCb,{py:5,children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",lg:"row"},children:[(0,n.jsx)(C,{list:a,label:"Integration type",selectedValue:i,onChange:l,disabled:!!(s&&null!==s)}),!s&&c.length>0?(0,n.jsx)(ec,{connectionConfigs:c,systemFidesKey:t}):null,(0,n.jsx)(v.ZP,{scopes:[T.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,n.jsx)(r.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:l,systemFidesKey:t}):null]})},em=t(71922),eh=t(31883);let ex=e=>{let{item:s,options:t=[],onNoticeChange:a,isChild:i}=e,{external_id:l,name:o}=s,d="".concat(l,"-notice_id"),[c,,u]=(0,W.U$)(d),{setValue:p}=u;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.Ugi,{flexGrow:1,children:[i&&(0,n.jsx)(r.LqM,{}),(0,n.jsx)(r.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(i?"-child":""),m:0,fontSize:"14px",fontWeight:i?"normal":"semibold",children:o})]}),(0,n.jsx)(r.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,r.pmc)(),{data:i,isLoading:l}=(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)(),[_,v]=(0,p.useState)([]),b=(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 _},k=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)(r.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&&v(h.items.map(e=>({label:e.name,value:e.id})))},[h]),l||x)return(0,n.jsx)(r.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(r.OdW,{height:"35px"})});if(!g||!g.length||!h)return null;let w=(e,s)=>{y(g.map(t=>{if(s?t.external_id===s.external_id:t.external_id===e.external_id){if(s){var a;return{...t,children:null===(a=t.children)||void 0===a?void 0:a.map(s=>s.external_id===e.external_id?e:s)}}return e}return t}))};return(0,n.jsx)(r.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(r.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,n.jsxs)(r.Qdk,{border:"none",children:[(0,n.jsxs)(r.KFZ,{children:[(0,n.jsx)(r.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,n.jsx)(r.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Consent automation"})}),(0,n.jsx)(r.XEm,{})]}),(0,n.jsxs)(r.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,n.jsx)(r.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:b||{},onSubmit:k,children:(0,n.jsxs)(W.l0,{children:[(0,n.jsx)(r.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:w}),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=>w(s,e)},s.external_id))]},e.external_id)})}),(0,n.jsx)(r.Ugi,{justifyContent:"flex-end",mt:3,children:(0,n.jsx)(r.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),ev=(0,r.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"}),eb=(0,r.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"})}},ek=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,ew=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let l=ek(t),r=e[t],o=s[t];if("boolean"==typeof r||"boolean"==typeof o||"number"==typeof r||"number"==typeof o){r!==o&&n.push(l);return}!((Y().isNil(r)||Y().isEmpty(r))&&(Y().isNil(o)||Y().isEmpty(o)))&&(Y().isEqual(r,o)||(Y().isNil(r)||Y().isEmpty(r)?a.push(l):Y().isNil(o)||Y().isEmpty(o)?i.push(l):n.push(l)))}),{addedFields:a,removedFields:i,changedFields:n}},eC=e=>{let{edited_by:s,before:t,after:a,created_at:i}=e,l=[],r=[],o=[];t.custom_fields||a.custom_fields?{addedFields:l,removedFields:r,changedFields:o}=ew(t.custom_fields,a.custom_fields):{addedFields:l,removedFields:r,changedFields:o}=ew(t,a);let d=[];if(l.length>0&&d.push(["added ",(0,n.jsx)("b",{children:l.join(", ")})]),r.length>0&&d.push(["removed ",(0,n.jsx)("b",{children:r.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:[]},l=t.find(s=>s.data_use===e)||{data_use:"",data_categories:[]};i.push(a),n.push(l)}),{...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),l="boolean"!=typeof i&&"number"!=typeof i&&Y().isEmpty(i);return!n||!l}return!1});return 0===i.length?null:(0,n.jsx)(r.Kqy,{marginTop:"0px !important",children:(0,n.jsxs)(r.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,n.jsx)(r.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)(r.X6q,{as:"h3",size:"xs",children:s})}),(0,n.jsx)(r.Kqy,{children:i})]})})},eO=t(40324),eW=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:l,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==l?void 0:l.before,i.name)||[],s=Y().get(null==l?void 0:l.after,i.name)||[];f(!Y().isEqual(e,s)),g(e.length>s.length?e:s)},[l,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)(r.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(r.gCW,{alignItems:"start",children:[(0,n.jsxs)(r.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,n.jsx)($.b,{label:a})]}),(0,n.jsx)(r.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(m,"px")},children:(m?c.value:x).map((e,s)=>(0,n.jsx)(r.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:l,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==l?void 0:l.before,i.name)||"",s=Y().get(null==l?void 0:l.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)},[l,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)(r.NIc,{style:y,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(r.gCW,{alignItems:"start",children:[(0,n.jsxs)(r.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,n.jsx)($.b,{label:a})]}),(0,n.jsx)(r.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),l=t===T.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",r=Object.keys(s).sort();return(0,n.jsx)(eL,{heading:"Custom fields",children:r.map(e=>i(e)?(0,n.jsx)(eW,{label:e,name:"".concat(l,".").concat(e)},e):(0,n.jsx)(eZ,{label:e,name:"".concat(l,".").concat(e)},e))})},eN=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:l}=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"===l?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,n.jsx)(r.NIc,{style:m,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(r.gCW,{alignItems:"start",minHeight:"46px",children:[(0,n.jsxs)(r.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),(0,n.jsx)($.b,{label:t})]}),void 0!==d.value&&(0,n.jsx)(r.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===l&&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)(r.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)(r.u_l,{isOpen:t,onClose:a,size:"4xl",children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{children:[(0,n.jsxs)(r.xBx,{backgroundColor:e_().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,n.jsxs)(r.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)(r.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.LZC,{}),(0,n.jsx)(r.olH,{})]})]}),(0,n.jsx)(r.fef,{paddingTop:0,paddingBottom:6,children:(0,n.jsxs)(r.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}),[l,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)(r.iA_,{ml:"24px",children:[(0,n.jsx)(r.hrZ,{children:(0,n.jsx)(r.Tr,{children:(0,n.jsxs)(r.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:e_().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,n.jsx)(r.p3B,{children:x.map((e,s)=>{let t=eC(e);return t?(0,n.jsx)(r.Tr,{onClick:()=>g(e),style:{cursor:"pointer"},children:(0,n.jsx)(r.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)(r.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,n.jsxs)(r.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)(r.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&a(t-1)},disabled:1===t,icon:(0,n.jsx)(eb,{})}),(0,n.jsx)(r.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,n.jsx)(ev,{})})]}),(0,n.jsx)(eM,{selectedHistory:d,isOpen:l,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)(r.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)(r.Ugi,{children:[(0,n.jsx)(r.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,n.jsx)(r.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,n.jsx)(r.Ugi,{mt:4,children:(0,n.jsx)(r.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:a,icon:(0,n.jsx)(r.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},e$=t(58452);let eG=e=>{let{declaration:s,title:t,handleDelete:a,handleEdit:i}=e,{isOpen:l,onOpen:o,onClose:d}=(0,r.qY0)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,n.jsx)(r.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,n.jsxs)(r.Ugi,{children:[(0,n.jsx)(r.AB5,{onClick:()=>i(s),role:"button",tabIndex:0,children:(0,n.jsx)(r.xvT,{children:t||s.data_use})}),(0,n.jsx)(r.LZC,{}),a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:o,"data-testid":"delete-btn",children:(0,n.jsx)(r.pJl,{})}),(0,n.jsx)(e$.Z,{isOpen:l,onClose:d,onConfirm:()=>a(s),title:"Delete data use declaration",message:(0,n.jsxs)(r.xvT,{children:["You are about to delete the data use declaration"," ",(0,n.jsx)(r.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)(r.izJ,{})]})},eQ=e=>{let{heading:s,children:t,headerButton:a,footerButton:i}=e;return(0,n.jsx)(r.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,n.jsxs)(r.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,n.jsxs)(r.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,n.jsx)(r.X6q,{as:"h3",size:"xs",children:s}),(0,n.jsx)(r.LZC,{}),a||null]}),(0,n.jsx)(r.Kqy,{spacing:0,children:t}),(0,n.jsx)(r.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:l,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)(r.wpx,{onClick:a,size:"small",icon:(0,n.jsx)(r.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,n.jsx)(eG,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:l},e.id))})};var eX=t(95346),e0=t(54748),e1=t(28325),e4=t(30234);let e2=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:""},e9=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}},e5=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,values:l,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)(r.Kqy,{spacing:4,children:[(0,n.jsxs)(e4.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)(r.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)(r.UO1,{in:"Legitimate interests"===l.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(r.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)(r.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)(e4.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)(e4.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)(e4.Z,{heading:"Special category data",children:(0,n.jsxs)(r.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)(r.UO1,{in:l.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(r.xuv,{mt:4,children:(0,n.jsx)(P.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:h,isRequired:l.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)(e4.Z,{heading:"Third parties",children:(0,n.jsxs)(r.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)(r.UO1,{in:l.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsxs)(r.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=e9(e),l=await s(i,t);if(l){let s=l.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,l=null==a?void 0:a.id,{handleSubmit:o,initialValues:d}=e8({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:l}),c=(0,m.C)(ey.gU);return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:d,onSubmit:o,validationSchema:e2,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)(r.Kqy,{spacing:4,children:[(0,n.jsx)(e5,{values:a,lockedForGVL:c,privacyDeclarationId:l,...i}),(0,n.jsxs)(r.kCb,{w:"100%",children:[(0,n.jsx)(r.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),c?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.LZC,{}),(0,n.jsx)(r.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:l="privacy-declaration-modal",children:o}=e;return(0,n.jsxs)(r.u_l,{isOpen:s,onClose:t,isCentered:i,scrollBehavior:"inside",size:"3xl",children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"left",p:0,"data-testid":l,children:[(0,n.jsx)(r.xBx,{p:0,children:(0,n.jsx)(r.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,n.jsx)(r.X6q,{as:"h3",size:"sm",children:a})})}),(0,n.jsx)(r.fef,{pb:4,children:o})]})]})};var ss=e=>{let{system:s,addButtonProps:t,includeCustomFields:a,...i}=e,{isOpen:l,onClose:o,onOpen:d}=(0,r.qY0)(),[c,u]=(0,p.useState)(void 0),{createDataUse:m,updateDataUse:h,deleteDataUse:x}=(0,eH.Z)(s),g=[...s.privacy_declarations.filter(e=>void 0!==e.cookies).flatMap(e=>e.cookies)],y=s.cookies?s.cookies.filter(e=>0===g.filter(s=>s&&s.name===e.name).length):void 0,f=()=>{o(),u(void 0)},_=()=>{d(),u(void 0)},v=async e=>(f(),c)?h(c,e):m(e);return(0,p.useEffect)(()=>{o()},[o,s.fides_key]),(0,n.jsxs)(r.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:_}):(0,n.jsx)(eJ,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:_,handleEdit:e=>{d(),u(e)},handleDelete:x,allDataUses:i.allDataUses}),y&&y.length>0?(0,n.jsx)(eQ,{heading:"Unassigned cookies",children:y.map(e=>(0,n.jsxs)(p.Fragment,{children:[(0,n.jsx)(r.xuv,{px:6,py:4,children:(0,n.jsx)(r.xvT,{children:e.name})}),(0,n.jsx)(r.izJ,{})]},e.name))}):null,(0,n.jsx)(se,{isOpen:l,onClose:f,heading:"Configure data use",children:(0,n.jsx)(e7,{initialValues:c,onSubmit:v,onCancel:f,includeCustomFields:a,...i})})]})},st=e=>{let{system:s}=e,{isLoading:t,...a}=(0,eK.f)({includeDatasets:!0,includeDisabled:!1}),i=a.allDataCategories.filter(e=>e.active),l=a.allDataUses.filter(e=>e.active),o=a.allDataSubjects.filter(e=>e.active),c={...a,allDataCategories:i,allDataUses:l,allDataSubject:o,cookies:s.cookies};return(0,n.jsxs)(r.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,n.jsx)(r.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,n.jsxs)(r.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)(r.rUS,{as:d(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,n.jsx)(r.$jN,{}):(0,n.jsx)(ss,{system:s,includeCustomFields:!0,...c})]})},sa=t(812),si=t(93237),sn=t(69525),sl=t(33335);let sr={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,sl.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,cookies:e.cookies,cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:void 0,uses_cookies:e.uses_cookies,cookie_refresh:e.cookie_refresh,uses_non_cookie_access:e.uses_non_cookie_access,legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:void 0,vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0};return e.processes_personal_data&&(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,b.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)(r.X6q,{as:"h3",size:"lg",children:["Describe ",a]})};var sv=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:l=[]}=(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):sr,[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)(),[_,v]=(0,O.f7)(),[b,j]=(0,O.qQ)(),[k]=sh();(0,L.Rd)(void 0,{skip:!y.dictionaryService});let[w]=(0,L.qz)(),C=(0,m.C)(L.o),S=(0,m.C)(ey.gU),D=(0,p.useMemo)(()=>!!(t&&(null==l?void 0:l.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,l]),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,r.pmc)(),E=async(e,t)=>{var a;let i,n;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await w({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 l=sd({...e,privacy_declarations:null!=i?i:e.privacy_declarations});if(n=D?await b(l):await _(l),await d.upsertCustomFields(e),!D&&e.vendor_id&&(null===(a=n.data)||void 0===a?void 0:a.fides_key)){let e=await k({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||v.isLoading||d.isLoading;return(0,n.jsx)(W.J9,{initialValues:u,enableReinitialize:!0,onSubmit:E,validationSchema:g,children:e=>{let{dirty:s,values:l,isValid:o}=e;return(0,n.jsxs)(W.l0,{children:[(0,n.jsx)(x.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,n.jsxs)(r.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[a?(0,n.jsx)(s_,{system:t}):null,(0,n.jsx)(r.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)(e4.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)(e4.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)(e4.Z,{heading:"Data processing properties",children:(0,n.jsxs)(r.Kqy,{spacing:0,children:[(0,n.jsx)(r.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)(r.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,n.jsxs)(r.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:!l.processes_personal_data||S}),(0,n.jsx)(r.UO1,{in:l.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,n.jsx)(r.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:l.exempt_from_privacy_regulations,disabled:S})})})]})}),(0,n.jsx)(r.UO1,{in:l.processes_personal_data&&!l.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,n.jsxs)(r.Kqy,{spacing:4,mt:4,children:[(0,n.jsxs)(r.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)(r.UO1,{in:l.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(r.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:l.uses_profiling})})})]}),(0,n.jsxs)(r.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)(r.UO1,{in:l.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(r.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:l.does_international_transfers,disabled:S})})})]}),(0,n.jsxs)(r.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)(r.UO1,{in:l.requires_data_protection_assessments,animateOpacity:!0,children:(0,n.jsx)(r.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:l.requires_data_protection_assessments})})})]})]})})]})}),(0,n.jsxs)(r.UO1,{in:l.processes_personal_data&&!l.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,n.jsxs)(e4.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)(e4.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:!l.processes_personal_data||l.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:!l.processes_personal_data||l.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:!l.processes_personal_data||l.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})]}),l.fides_key?(0,n.jsx)(eX.uc,{resourceType:T.P6.SYSTEM,resourceFidesKey:l.fides_key}):null]})]}),(0,n.jsx)(r.xuv,{mt:6,children:(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:R||!s||!o,loading:R,"data-testid":"save-btn",children:"Save"})}),i]})}})},sb=t(59003),sj=t(92222),sk=t(30952),sw=t(14481),sC=t(90111),sS=t(8133),sD=t(83099),sT=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[l,o,{setValue:d,setTouched:c}]=(0,W.U$)(s),u=!!(o.touched&&o.error);return(0,n.jsx)(r.NIc,{isInvalid:u,isRequired:!0,children:(0,n.jsxs)(r.jqI,{vertical:!0,children:[(0,n.jsxs)(r.jqI,{align:"center",children:[t&&(0,n.jsx)(eO.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,n.jsx)($.b,{label:i})]}),(0,n.jsx)(sD.Z,{...l,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:l,...o}=e,d=!l,[c,{isLoading:u}]=su(),[p,{isLoading:m}]=sp(),h=(0,r.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!=l?l:sI,onSubmit:e=>{d?x(e):g(e)},validationSchema:sA,children:e=>{let{values:s,isValid:a,dirty:l}=e;return(0,n.jsxs)(W.l0,{children:[(0,n.jsxs)(r.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,n.jsx)(sC.Z,{children:(0,n.jsx)(r.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)(r.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)(r.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)(r.jqI,{justify:"space-between",children:[(0,n.jsx)(r.wpx,{onClick:t,children:"Cancel"}),(0,n.jsx)(r.wpx,{type:"primary",htmlType:"submit",loading:u||m,disabled:!a||!l,"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,[l,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,r.qY0)(),{asset_type:_,name:v}=a,b=(0,p.useCallback)(e=>{e.preventDefault(),m(!0)},[]),j=async e=>{if(!e)return;let{newSystemKey:t,newSystemName:i,isNewSystem:n}=e,l=await h({systemKey:s,assets:[{id:a.id,system_key:t}]});(0,eh.D4)(l)?y((0,sa.e$)(l.error)):g(n?"".concat(i," has been added to your system inventory and the ").concat(_,' "').concat(v,'" has been assigned to that system.'):"".concat(_," ").concat(v," has been assigned to ").concat(i)),o(!1),c(void 0)},k=e=>{c(e),f.onOpen()};return i?(0,n.jsx)(r.j8w,{"data-testid":"system-badge",color:"white",children:t}):(0,n.jsxs)(n.Fragment,{children:[!l&&(0,n.jsxs)(r.j8w,{"data-testid":"system-badge",color:"white",onClick:()=>o(!0),children:[t," ",(0,n.jsx)(r.PJP.I8b,{})]}),!!l&&(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:b,onSelect:(e,s)=>k({newSystemKey:e,newSystemName:s.label}),loading:x}),u&&(0,n.jsx)(sF.i,{isOpen:!0,onClose:()=>m(!1),onSuccessfulSubmit:(e,s)=>k({newSystemKey:e,newSystemName:s,isNewSystem:!0})}),(0,n.jsx)(r.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:l}]=sm(),o=(0,r.pmc)(),{isOpen:d,onClose:c,onOpen:u}=(0,r.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)(r.jqI,{className:"gap-1",children:[(0,n.jsx)(r.wpx,{size:"small",onClick:a,"data-testid":"edit-btn",children:"Edit"}),(0,n.jsx)(r.wpx,{size:"small",onClick:u,loading:l,"data-testid":"remove-btn",children:"Remove"}),(0,n.jsx)(r.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:l}=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 l?(0,n.jsx)(sZ.Z,{children:y.map(e=>(0,n.jsx)(r.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)(r.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)(r.j8w,{onClick:()=>h(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),m&&(0,n.jsx)(r.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,l=(0,sj.Cl)(),r=l.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=l.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(sw.G3,{value:e.getValue()}),header:"Asset"}),d=l.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,n.jsx)(sw.G3,{value:e.getValue()}),header:"Type"}),c=l.display({id:"system",cell:e=>(0,n.jsx)(sL,{systemKey:s,systemName:t,asset:e.row.original,readonly:a}),header:"System"}),u=l.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=l.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=l.accessor(e=>e.domain,{id:"domain",cell:e=>(0,n.jsx)(sw.G3,{value:e.getValue()}),header:"Domain"}),h=l.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=l.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:[r,...g,x]},sU=e=>{var s;let{system:t}=e,{PAGE_SIZES:a,pageSize:i,setPageSize:l,onPreviousPageClick:o,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:h,endRange:x,pageIndex:g,setTotalPages:y,resetPageIndexToDefault:_}=(0,sw.oi)(),[v,b]=(0,p.useState)(""),[j,k]=(0,p.useState)(void 0),[w,C]=(0,p.useState)({}),[S]=sm(),D=(0,m.C)(ey.gU),T=(0,r.pmc)(),{data:A,isLoading:I,isFetching:E}=sc({fides_key:t.fides_key,search:v,page:g,size:i}),{isOpen:q,onClose:R,onOpen:z}=(0,r.qY0)(),{isOpen:F,onClose:L,onOpen:O}=(0,r.qY0)();(0,p.useEffect)(()=>{_()},[v,_]),(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=>{k(e),z()},lockedForGVL:D}),Z=(0,sb.b7)({getCoreRowModel:(0,sj.sC)(),columns:W,manualPagination:!0,data:(null==A?void 0:A.items)||[],columnResizeMode:"onChange",onRowSelectionChange:C,state:{rowSelection:w}}),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)(sw.I4,{rowHeight:36,numRows:36}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.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)(sw.Q$,{children:[(0,n.jsx)(sk.f,{value:v,onChange:b}),!D&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.LZC,{}),(0,n.jsx)(r.wpx,{icon:(0,n.jsx)(r.PJP.mm_,{}),iconPosition:"end",onClick:z,"data-testid":"add-asset-btn",children:"Add asset"}),(0,n.jsx)(sE,{isOpen:q,onClose:()=>{k(void 0),R()},systemKey:t.fides_key,asset:j}),(0,n.jsx)(r.wpx,{icon:(0,n.jsx)(r.PJP.ZNm,{}),iconPosition:"end",onClick:O,disabled:!P.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,n.jsx)(r.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)(sw.ZK,{tableInstance:Z,emptyTableNotice:(0,n.jsx)(r.oj8,{image:r.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,n.jsx)(sw.s8,{totalRows:(null==A?void 0:A.total)||0,pageSizes:a,setPageSize:l,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)(r.xuv,{children:[(0,n.jsx)(r.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,n.jsxs)(r.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})()),[_,v]=(0,p.useState)(!1),{systemOrDatamapRoute:b}=(0,g.V)(),j=(0,r.pmc)(),k=(0,m.T)(),w=(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==w?void 0:w.fides_key,{skip:!w});(0,p.useEffect)(()=>{k((0,O.db)(A))},[A,k]),(0,p.useEffect)(()=>{w&&S(w.processes_personal_data)},[w]);let I=(0,p.useCallback)(e=>{void 0===w&&v(!0),k((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(b).then(()=>{j.closeAll()})},onAddPrivacyDeclaration:()=>{u(1),j.closeAll()}})};j({...s})},[w,k,i,b,j]);(0,p.useEffect)(()=>(a&&(k((0,O.db)(void 0)),k((0,ey.b3)("initial")),k((0,ey.gQ)(!1))),()=>{k((0,O.db)(void 0))}),[k,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)(r.xuv,{px:6,mb:9,children:[(0,n.jsx)(x.eB,{}),(0,n.jsx)(sv,{onSuccess:I,system:w})]}),_?(0,n.jsx)(r.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,n.jsxs)(r.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)(r.rUS,{as:d(),href:b,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:w?(0,n.jsx)(r.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,n.jsx)(st,{system:w})}):null,isDisabled:!w||!C},{label:"Data flow",content:w?(0,n.jsxs)(r.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsxs)(r.xuv,{px:6,paddingBottom:2,children:[(0,n.jsx)(r.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,n.jsx)(r.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)(l.q,{system:w,isSystemTab:!0})]}):null,isDisabled:!w},{label:"Integrations",content:w?(0,n.jsxs)(r.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(r.xuv,{px:6,paddingBottom:2,children:(0,n.jsx)(r.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)(r.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:w.connection_configs,systemFidesKey:w.fides_key}),(null===(s=w.connection_configs)||void 0===s?void 0:s.key)&&(0,n.jsx)(eg,{m:6,connectionKey:null===(t=w.connection_configs)||void 0===t?void 0:t.key})]}):null,isDisabled:!w}];return D&&R.push({label:"Assets",content:w?(0,n.jsx)(sU,{system:w}):null,isDisabled:!w}),D&&R.push({label:"History",content:w?(0,n.jsxs)(r.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(r.xuv,{px:6,paddingBottom:6,children:(0,n.jsx)(r.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:w})]}):null,isDisabled:!w}),{tabData:R,tabIndex:o,onTabChange:q}}},54748:function(e,s,t){var a=t(27378),i=t(7448);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(7448);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5683],{11611:function(e){e.exports=function(e){var i=typeof e;return null!=e&&("object"==i||"function"==i)}},55193:function(e,i,r){var a=r(99736),t=r(92360);e.exports=function(e){return"symbol"==typeof e||t(e)&&"[object Symbol]"==a(e)}},1039:function(e,i,r){"use strict";r.d(i,{Z:function(){return C}});var a=r(24246),t=r(59003),s=r(92222),o=r(91942),n=r(86677),l=r(27378),d=r(14481),c=r(45896),u=r(70675),g=r(72625),h=r(54409),m=r(79947),L=r(87667),x=r(50169),j=r(28278),v=r(7448),f=r(74241),p=e=>{let{resourceType:i,changeTypeOverride:r}=e,t=(0,s.Cl)(),o=[];return i?i===v.D$.SCHEMA?{columns:[t.accessor(e=>e.name,{id:"name",cell:e=>(0,a.jsx)(L.Z,{changeTypeOverride:r,result:e.row.original}),header:e=>(0,a.jsx)(d.Rr,{value:"Name",...e}),size:300}),t.accessor(e=>e.urn,{id:"project",cell:e=>(0,a.jsx)(d.G3,{value:(0,f.Z)(e.getValue())}),header:e=>(0,a.jsx)(d.Rr,{value:"Project",...e})}),t.display({id:"status",cell:e=>(0,a.jsx)(x.Z,{changeTypeOverride:r,result:e.row.original}),header:e=>(0,a.jsx)(d.Rr,{value:"Status",...e})}),t.accessor(e=>e.system,{id:"system",cell:e=>(0,a.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,a.jsx)(d.Rr,{value:"System",...e})}),t.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,a.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,a.jsx)(d.Rr,{value:"Detected by",...e})}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,a.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,a.jsx)(d.Rr,{value:"When",...e})}),t.display({id:"actions",cell:e=>(0,a.jsx)(h.Z,{ignoreChildActions:r===j.E.MONITORED||r===j.E.MUTED,resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:i===v.D$.TABLE?{columns:[t.accessor(e=>e.name,{id:"name",cell:e=>(0,a.jsx)(L.Z,{changeTypeOverride:r,result:e.row.original}),header:e=>(0,a.jsx)(d.Rr,{value:"Table name",...e}),size:300}),t.accessor(e=>e.description,{id:"description",cell:e=>(0,a.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,a.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),t.display({id:"status",cell:e=>(0,a.jsx)(x.Z,{changeTypeOverride:r,result:e.row.original}),header:e=>(0,a.jsx)(d.Rr,{value:"Status",...e})}),t.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,a.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,a.jsx)(d.Rr,{value:"Detected by",...e})}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,a.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,a.jsx)(d.Rr,{value:"When",...e})}),t.display({id:"actions",cell:e=>(0,a.jsx)(h.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:i===v.D$.FIELD?{columns:[t.accessor(e=>e.name,{id:"name",cell:e=>(0,a.jsx)(L.Z,{changeTypeOverride:r,result:e.row.original}),header:e=>(0,a.jsx)(d.Rr,{value:"Field name",...e}),size:300}),t.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,a.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,a.jsx)(d.Rr,{value:"Data type",...e})}),t.accessor(e=>e.description,{id:"description",cell:e=>(0,a.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,a.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),t.display({id:"status",cell:e=>(0,a.jsx)(x.Z,{changeTypeOverride:r,result:e.row.original}),header:e=>(0,a.jsx)(d.Rr,{value:"Status",...e})}),t.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,a.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,a.jsx)(d.Rr,{value:"Detected by",...e})}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,a.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,a.jsx)(d.Rr,{value:"When",...e})}),t.display({id:"actions",cell:e=>(0,a.jsx)(h.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:{columns:o}:{columns:o}},y=e=>{let{initialFilterTabIndex:i=0}=e,[r,a]=(0,l.useState)(i),t=(0,l.useMemo)(()=>[{label:"Action Required",filters:[v.LL.ADDITION,v.LL.REMOVAL],childFilters:[v.LL.ADDITION,v.LL.REMOVAL]},{label:"Monitored",filters:[v.LL.MONITORED],childFilters:[],changeTypeOverride:j.E.MONITORED},{label:"Unmonitored",filters:[v.LL.MUTED],childFilters:[],changeTypeOverride:j.E.MUTED}],[]);return{filterTabs:t,filterTabIndex:r,setFilterTabIndex:a,activeDiffFilters:t[r].filters,activeChildDiffFilters:t[r].childFilters,activeChangeTypeOverride:t[r].changeTypeOverride}},_=r(47182),D=r(38347),b=r(7940),T=r(80285),w=r(36168),R=r(30952);let H={items:[],total:0,page:1,size:50,pages:1},M=()=>(0,a.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,a.jsxs)(o.gCW,{children:[(0,a.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,a.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var C=e=>{var i,r;let{resourceUrn:g}=e,h=(0,n.useRouter)(),[m,L]=(0,l.useState)(""),{filterTabs:x,setFilterTabIndex:j,filterTabIndex:f,activeDiffFilters:C,activeChildDiffFilters:Z,activeChangeTypeOverride:I}=y({initialFilterTabIndex:(null===(i=h.query)||void 0===i?void 0:i.filterTabIndex)?Number(null===(r=h.query)||void 0===r?void 0:r.filterTabIndex):void 0}),{PAGE_SIZES:E,pageSize:O,setPageSize:k,onPreviousPageClick:F,isPreviousPageDisabled:V,onNextPageClick:N,isNextPageDisabled:A,startRange:S,endRange:z,pageIndex:P,setTotalPages:U,resetPageIndexToDefault:$}=(0,d.oi)();(0,l.useEffect)(()=>{$()},[g,m,$,C,Z]);let{isFetching:G,isLoading:W,data:B}=(0,u.z8)({staged_resource_urn:g,page:P,size:O,child_diff_status:Z,diff_status:C,search:m}),q=(0,b.G)(null==B?void 0:B.items[0]),{columns:Q}=p({resourceType:q,changeTypeOverride:I}),{items:K,total:Y,pages:J}=(0,l.useMemo)(()=>null!=B?B:H,[B]);(0,l.useEffect)(()=>{U(J)},[J,U]);let X=(0,l.useMemo)(()=>Q,[Q]),{navigateToDetectionResults:ee}=(0,_.Z)(),ei=(0,t.b7)({getCoreRowModel:(0,s.sC)(),getGroupedRowModel:(0,s.qe)(),getExpandedRowModel:(0,s.rV)(),getRowId:T.Z,columns:X,manualPagination:!0,data:K,columnResizeMode:"onChange"});return W?(0,a.jsx)(d.I4,{rowHeight:36,numRows:36}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{filterTabs:x,filterTabIndex:f,onChange:j}),(0,a.jsx)(d.Q$,{children:(0,a.jsx)(o.kCb,{direction:"row",alignItems:"center",justifyContent:"space-between",width:"full",children:(0,a.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,a.jsx)(o.xuv,{flexShrink:0,children:(0,a.jsx)(R.f,{value:m,onChange:L})}),(0,a.jsx)(D.Z,{})]})})}),(0,a.jsx)(d.ZK,{tableInstance:ei,onRowClick:e=>ee({resourceUrn:e.urn,filterTabIndex:f}),getRowIsClickable:e=>q!==v.D$.FIELD||(0,w.Z)(e),emptyTableNotice:(0,a.jsx)(M,{})}),(0,a.jsx)(d.s8,{totalRows:Y||0,pageSizes:E,setPageSize:k,onPreviousPageClick:F,isPreviousPageDisabled:V||G,onNextPageClick:N,isNextPageDisabled:A||G,startRange:S,endRange:z})]})}},54409:function(e,i,r){"use strict";r.d(i,{Z:function(){return m}});var a=r(24246),t=r(91942),s=r(812),o=r(14047),n=r(7448),l=r(31883);let d=(0,t.IUT)({displayName:"MonitorOffIcon",viewBox:"0 0 12 12",path:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.47125 1H5.85H6.15H6.51188L6.58875 1.36914L7.52062 5.83268L6.42408 4.98635L6.03375 3.11719L5.8038 4.50761L4.99323 3.882L5.40562 1.38867L5.47125 1ZM4.80795 5.0022L4.67675 5.79545L5.48735 6.42109L5.61854 5.62783L4.80795 5.0022ZM6.73856 6.49227L6.96125 7.55866L8.42407 8.6877L8.69498 8.00228L7.94864 7.42624L7.88625 7.58398L7.83501 7.33853L6.73856 6.49227ZM8.33138 6.45844L9.07755 7.03434L9.30188 6.4668H11.55H12V5.5293H11.55H9H8.69812L8.58375 5.82031L8.33138 6.45844ZM7.27551 9.06443L7.35399 9.125H7.28813L7.27551 9.06443ZM4.49147 6.91566L5.30209 7.54131L4.79437 10.6113L4.72875 11H4.35H4.05H3.69563L3.61313 10.6406L2.64563 6.46875H0.45H0V5.53125H0.45H2.69777L3.49646 6.1477L4.15125 8.97266L4.49147 6.91566Z",fill:"currentColor"}),(0,a.jsx)("g",{"clip-path":"url(#clip0_341_3102)",children:(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.6755 10.4168L0.164222 2.304L0.775218 1.51237L11.2865 9.62517L10.6755 10.4168Z",fill:"currentColor"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_341_3102",children:(0,a.jsx)("rect",{width:"11.5",height:"9",fill:"white",transform:"translate(0 1.5)"})})})]})}),c=(0,t.IUT)({displayName:"MonitorOnIcon",viewBox:"0 0 12 10",path:(0,a.jsx)("path",{d:"M5.47125 0H5.85H6.15H6.51188L6.58875 0.369141L7.88625 6.58398L8.58375 4.82031L8.69812 4.5293H9H11.55H12V5.4668H11.55H9.30188L8.36625 7.83398L8.25188 8.125H7.95H7.65H7.28813L7.21125 7.75586L6.03375 2.11719L4.79437 9.61133L4.72875 10H4.35H4.05H3.69563L3.61313 9.64062L2.64563 5.46875H0.45H0V4.53125H0.45H3H3.35438L3.43688 4.89062L4.15125 7.97266L5.40562 0.388672L5.47125 0Z",fill:"currentColor"})});var u=r(79494),g=r(70675),h=r(7940),m=e=>{let{resource:i,ignoreChildActions:r=!1}=e,m=(0,h.G)(i),[L,{isLoading:x}]=(0,g.v8)(),[j,{isLoading:v}]=(0,g.vi)(),[f,{isLoading:p}]=(0,g.Tl)(),{successAlert:y,errorAlert:_}=(0,o.V)(),D=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id});(0,l.D4)(e)?_((0,s.e$)(e.error,"Failed to confirm resource")):y("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(i.name||"The resource"," is now being monitored."))},b=async()=>{let e=await f({staged_resource_urn:i.urn});(0,l.D4)(e)?_((0,s.e$)(e.error),"Failed to un-mute resource"):y("".concat(i.name||"The resource"," has been un-muted and is now being monitored."))},T=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0});(0,l.D4)(e)?_((0,s.e$)(e.error),"Failed to un-mute resource"):y("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(i.name||"The resource"," is now being monitored."))},w=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id});(0,l.D4)(e)?_((0,s.e$)(e.error),"Failed to confirm resource"):y('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},R=async()=>{let e=await j({staged_resource_urn:i.urn});(0,l.D4)(e)?_((0,s.e$)(e.error),"Failed to mute resource"):y("Ignored data will not be monitored for changes or added to Fides datasets.","".concat(i.name||"Resource"," ignored"))},H=x||v||p,{diff_status:M,child_diff_statuses:C}=i,Z=m===n.D$.SCHEMA,I=m===n.D$.FIELD,E=Z&&void 0===M||!I&&M===n.LL.ADDITION,O=M!==n.LL.MUTED,k=M===n.LL.MUTED&&!I,F=M===n.LL.MUTED&&I,V=C&&(C[n.LL.ADDITION]||C[n.LL.REMOVAL]),N=M===n.LL.MONITORED&&!r&&V;return(0,a.jsxs)(t.Ugi,{children:[E&&(0,a.jsx)(u.Z,{title:"Monitor",icon:(0,a.jsx)(c,{}),onClick:D,disabled:H,loading:x}),F&&(0,a.jsx)(u.Z,{title:"Un-Mute",icon:(0,a.jsx)(c,{}),onClick:b,disabled:H,loading:x}),k&&(0,a.jsx)(u.Z,{title:"Monitor",icon:(0,a.jsx)(c,{}),onClick:T,disabled:H,loading:x}),N&&(0,a.jsx)(u.Z,{title:"Confirm",icon:(0,a.jsx)(t.nQG,{}),onClick:w,disabled:H,loading:x}),O&&(0,a.jsx)(u.Z,{title:"Ignore",icon:(0,a.jsx)(d,{}),onClick:R,disabled:H,loading:v})]})}},31883:function(e,i,r){"use strict";r.d(i,{Bw:function(){return a.Bw},D4:function(){return a.D4}});var a=r(19043)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5826],{15826:function(e,t,l){l.d(t,{$:function(){return y}});var n=l(24246),s=l(92222),i=l(59003),o=l(25980),a=l(812),r=l(14481),d=l(46628),c=l(91942),g=l(86677),u=l(27378),h=l(16134),x=l(58452),m=l(77830),C=l(31435),j=l(32885);let p=e=>{let{onChange:t,displayText:l,isChecked:s,value:i}=e;return(0,n.jsx)(c.XZJ,{id:"checkbox-".concat(i),value:i,height:"20px",mb:3,isChecked:s,onChange:t,colorScheme:"complimentary",mr:5,children:(0,n.jsx)(c.xvT,{fontSize:"sm",lineHeight:5,height:"20px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",children:l})},i)},b={GVL:!1,AC:!1,COMPASS:!1};var w=e=>{let{isOpen:t,onClose:l,tableInstance:s}=e,[i,o]=(0,u.useState)(b);return(0,u.useMemo)(()=>{let e={id:"vendor_id",value:[]};i.GVL&&e.value.push("gvl"),i.AC&&e.value.push("gacp"),s.setColumnFilters([e])},[i,s]),(0,n.jsxs)(c.u_l,{isOpen:t,onClose:l,isCentered:!0,size:"2xl",children:[(0,n.jsx)(c.ZAr,{}),(0,n.jsxs)(c.hzk,{children:[(0,n.jsx)(c.xBx,{children:"Filters"}),(0,n.jsx)(c.olH,{}),(0,n.jsx)(c.izJ,{}),(0,n.jsxs)(c.fef,{maxH:"85vh",px:6,py:4,overflowX:"auto",children:[(0,n.jsx)(c.xvT,{fontSize:"md",fontWeight:"bold",mb:2,children:"Sources"}),(0,n.jsx)(p,{onChange:()=>{o(e=>({...e,GVL:!e.GVL}))},displayText:a.iC.gvl.fullName,isChecked:i.GVL,value:"gvl"}),(0,n.jsx)(p,{onChange:()=>{o(e=>({...e,AC:!e.AC}))},displayText:a.iC.gacp.fullName,isChecked:i.AC,value:"gacp"})]}),(0,n.jsx)(c.mzw,{children:(0,n.jsxs)(c.xuv,{display:"flex",justifyContent:"space-between",width:"100%",children:[(0,n.jsx)(c.wpx,{onClick:()=>{s.setColumnFilters([]),o(b)},className:"mr-3 grow",children:"Reset Filters"}),(0,n.jsx)(c.wpx,{"data-testid":"filter-done-btn",type:"primary",onClick:l,className:"grow",children:"Done"})]})})]})]})};let f=e=>{var t;let{value:l}=e,s=(0,a.cj)(l),i=null!==(t=a.iC[s])&&void 0!==t?t:{label:"",fullName:""};return(0,n.jsx)(c.kCb,{alignItems:"center",justifyContent:"center",height:"100%",mr:"2",children:(0,n.jsx)(c.esZ,{title:i.fullName,children:(0,n.jsx)(c.j8w,{children:i.label})})})},v=(0,s.Cl)(),S=()=>(0,n.jsxs)(c.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:[(0,n.jsxs)(c.gCW,{children:[(0,n.jsx)(c.xvT,{fontSize:"md",fontWeight:"600",children:"No results found."}),(0,n.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,n.jsx)(C.Z,{buttonLabel:"Add custom vendor",buttonProps:{type:"primary"}})]}),y=e=>{let{redirectRoute:t}=e,l="Vendor",p=(0,c.pmc)(),{dictionaryService:b,tcf:y}=(0,o.hz)(),{isLoading:k}=(0,j.x8)(),R=(0,g.useRouter)(),{isLoading:L}=(0,j.iN)(void 0,{skip:!b}),[_,{isLoading:z,isSuccess:A}]=(0,j.Qk)(),I=(0,h.C)(j.gG),[N,F]=(0,u.useState)(),{isOpen:M,onOpen:P,onClose:T}=(0,c.qY0)(),{isOpen:G,onClose:O,onOpen:V}=(0,c.qY0)(),[W,Z]=(0,u.useState)(!1),H=I.every(e=>e.linked_system),D=(0,u.useMemo)(()=>[v.display({id:"select",header:e=>{let{table:t}=e;return(0,n.jsx)(r.k,{dataTestId:"select-page-checkbox",isChecked:t.getIsAllPageRowsSelected(),isDisabled:H||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 l={...e};return t.getRowModel().rows.forEach(e=>{e.getCanSelect()&&(l[e.id]=!l[e.id])}),l}),Z(e=>!e)}})},cell:e=>{let{row:t}=e;return(0,n.jsx)(r.k,{isChecked:t.getIsSelected(),isDisabled:!t.getCanSelect(),isIndeterminate:t.getIsSomeSelected(),onChange:t.getToggleSelectedHandler()})}}),v.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(r.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(r.Rr,{value:l,...e})}),v.accessor(e=>e.vendor_id,{id:"vendor_id",cell:e=>(0,n.jsx)(f,{value:e.getValue()}),header:e=>(0,n.jsx)(r.Rr,{value:"Source",...e}),enableColumnFilter:y,filterFn:"arrIncludesSome"})],[H,l,y]),E=(0,i.b7)({columns:D,data:I,getCoreRowModel:(0,s.sC)(),getSortedRowModel:(0,s.tj)(),getFilteredRowModel:(0,s.vL)(),getPaginationRowModel:(0,s.G_)(),onGlobalFilterChange:F,enableRowSelection:e=>!e.original.linked_system,enableSorting:!0,enableGlobalFilter:!0,state:{globalFilter:N,columnVisibility:{vendor_id:y}},initialState:{pagination:{pageSize:r.W3[0]},columnSizing:{select:0,vendor_id:0}},enableColumnResizing:!0,columnResizeMode:"onChange"});(0,u.useEffect)(()=>{let e={};I.forEach((t,l)=>{t.linked_system&&(e[l]=!0)}),Object.keys(e).length&&E.setRowSelection(e)},[I,E]);let{totalRows:Y,onPreviousPageClick:$,isPreviousPageDisabled:X,onNextPageClick:q,isNextPageDisabled:B,setPageSize:J,startRange:Q,endRange:K}=(0,r.bX)(E),U=async()=>{let e=E.getSelectedRowModel().rows.filter(e=>!e.original.linked_system).map(e=>e.original.vendor_id);if(e.length>0){let n=await _(e);R.push(t),(0,a.D4)(n)?p((0,d.Vo)((0,a.e$)(n.error))):p((0,d.t5)("Successfully added ".concat(e.length," ").concat(l.toLocaleLowerCase()).concat(e.length>1?"s":"")))}},ee=E.getSelectedRowModel().rows.some(e=>!e.original.linked_system);if(!b&&!k)return R.push(m.gp),null;if(z||A)return(0,n.jsx)(c.kCb,{height:"100%",justifyContent:"center",alignItems:"center",children:(0,n.jsx)(c.$jN,{})});if(L)return(0,n.jsx)(r.I4,{rowHeight:36,numRows:15});let et=H?"All ".concat(l.toLocaleLowerCase()," have already been added"):"Select a ".concat(l.toLocaleLowerCase()," "),el=E.getSelectedRowModel().rows.filter(e=>!e.original.linked_system).length,en=E.getState().columnFilters.length>0?E.getState().columnFilters.filter(e=>"vendor_id"===e.id)[0].value.length:0;return(0,n.jsxs)(c.kCb,{flex:1,direction:"column",overflow:"auto","data-testid":"add-multiple-systems-tbl",children:[(0,n.jsx)(x.Z,{isOpen:G,isCentered:!0,onCancel:O,onClose:O,onConfirm:U,title:"Confirmation",message:"You are about to add ".concat(el.toLocaleString("en")," ").concat(l.toLocaleLowerCase()).concat(el>1?"s":"")}),(0,n.jsx)(w,{isOpen:M,onClose:T,tableInstance:E}),(0,n.jsxs)(r.Q$,{children:[(0,n.jsxs)(c.kCb,{alignItems:"center",grow:1,children:[(0,n.jsx)(c.xuv,{maxW:"420px",width:"100%",children:(0,n.jsx)(r.HO,{globalFilter:N,setGlobalFilter:F,placeholder:"Search"})}),el>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(c.xvT,{fontWeight:"700",fontSize:"sm",lineHeight:"2",ml:4,children:[el.toLocaleString("en")," selected"]}),(0,n.jsx)(c.esZ,{title:et,children:(0,n.jsx)(c.wpx,{onClick:V,"data-testid":"add-multiple-systems-btn",disabled:!ee,className:"ml-4",children:"Add"})})]}):null]}),(0,n.jsxs)(c.Ugi,{spacing:4,alignItems:"center",children:[(0,n.jsx)(C.Z,{buttonLabel:"Add custom vendor"}),y?(0,n.jsx)("span",{children:(0,n.jsxs)(c.wpx,{onClick:P,"data-testid":"filter-multiple-systems-btn",children:["Filter",en>0?(0,n.jsx)(c.j8w,{className:"mr-0",children:en}):null]})}):null]})]}),(0,n.jsx)(r.ZK,{tableInstance:E,rowActionBar:(0,n.jsx)(r.AA,{tableInstance:E,selectedRows:el,isOpen:W}),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,n.jsx)(S,{})}),(0,n.jsx)(r.s8,{pageSizes:r.W3,totalRows:Y||0,onPreviousPageClick:$,isPreviousPageDisabled:X,onNextPageClick:q,isNextPageDisabled:B,setPageSize:J,startRange:Q,endRange:K})]})}}}]);
|