ethyca-fides 2.68.1b3__py2.py3-none-any.whl → 2.69.0rc0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ethyca-fides might be problematic. Click here for more details.
- {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.69.0rc0.dist-info}/METADATA +1 -1
- {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.69.0rc0.dist-info}/RECORD +231 -225
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/b1a2c3d4e5f6_add_location_to_privacy_request.py +26 -0
- fides/api/api/v1/api.py +2 -0
- fides/api/api/v1/endpoints/dsr_package_link.py +167 -0
- fides/api/api/v1/endpoints/privacy_request_endpoints.py +32 -1
- fides/api/api/v1/endpoints/user_endpoints.py +4 -0
- fides/api/models/privacy_request/privacy_request.py +1 -0
- fides/api/models/privacy_request/webhook.py +33 -1
- fides/api/oauth/utils.py +122 -57
- fides/api/schemas/application_config.py +7 -0
- fides/api/schemas/connection_configuration/connection_type_system_map.py +6 -0
- fides/api/schemas/enums/__init__.py +0 -0
- fides/api/schemas/enums/connection_category.py +20 -0
- fides/api/schemas/enums/integration_feature.py +26 -0
- fides/api/schemas/external_https.py +9 -0
- fides/api/schemas/privacy_request.py +16 -0
- fides/api/schemas/saas/display_info.py +19 -0
- fides/api/schemas/saas/saas_config.py +2 -0
- fides/api/schemas/storage/storage.py +2 -0
- fides/api/service/privacy_request/request_runner_service.py +44 -4
- fides/api/util/connection_type.py +20 -0
- fides/api/util/text.py +51 -0
- fides/common/api/v1/urn_registry.py +3 -0
- fides/service/privacy_request/privacy_request_service.py +83 -0
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/0uUBOyZCwjdyYdhNzpRkz/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1099-db533dd22b80bca6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{1345-ab756811e19ff4fc.js → 1345-6986414ab6ad3389.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1817-fd21f1f5ef0faffa.js → 1817-fcb2fd28034d5070.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1975.16126463309143e3.js → 1975.78e719130cfe3fd6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{2921-0e5cc63a82e31830.js → 2921-8a63ec72fa8e1bc0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3620-6cceae71bae5b531.js → 3620-1fba74849114e70f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3729-79255d8b0d22922d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3847-a868f83c065f54fb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3855-64541570e2f838fb.js → 3855-3154d56888ac46ed.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3872-7a18d18a5e287e4e.js → 3872-25eec062abd0f847.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3923-5c87b3d7f1626678.js → 3923-3be9b867f33e524c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{401-3902e3e98790d401.js → 401-029e2ff644cae40c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4121-64ef70ef906bbdd0.js → 4121-bbce1026a2ffe962.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4608-70521532195124de.js → 4608-99e453c666a7b89a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/4786-289c505d7d835feb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4808-5b799757d4564807.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{4844-351f99b6644b654e.js → 4844-a1784e2823ccd0ee.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5258-c6f96dc740eb5fb1.js → 5258-45ec38e6c3780f24.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5487-338800277d36b8d7.js → 5487-aad0e8a240a1979b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/549-81279a1a816487a7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{6084-da63f20d9416a982.js → 6084-3379ca3c1fc77aa9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6853-1d947b75eb07188c.js → 6853-04b15a7b02b1fc19.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6954-24f9a4f27d67b732.js → 6954-0f5d6c1757013eb7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7476-a0dd03bfccf60d0c.js → 7476-2227e21f574bee70.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7630-9fbe06cfb98266fe.js → 7630-267de03b93bbae8d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/768-24269f30db223720.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{787-3dd31844cf7fec55.js → 787-0aa4d9802c976f92.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{79-dcd20e8b09501c17.js → 79-0102f2711b8455cd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{796-8773e04b64ce2260.js → 796-53f0ea567d1da2b9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/8002-98ecd56535cdefa3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9046-57eab238570b8bf4.js → 9046-a349c22448593f94.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9676.bf0a8a6ff6dfd2af.js → 9676.b7d5d1d90b9da224.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9826-756c958aecab59a2.js → 9826-f4755a75d00c1c8c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9951-cdf73904a3adb27b.js → 9951-07989276d153c848.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{404-dd625a559ada46ca.js → 404-fde1f56225d1ef4f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-b6b09b2878b77b21.js → _app-36bec04369a1a7c4.js} +11 -11
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-92cf5e313be1f9e2.js → manual-aff671eda846719f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-d6c525ee731a2993.js → multiple-04894ddffc2a66fc.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-5664a3ea796e5ffb.js → add-systems-e98c4154535bf37d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-78f13de90111fd80.js → add-vendors-b2f80cdb75183bfa.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-0fc678f3d6d2fcec.js → configure-207cabf1b5c453fc.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-126db59dc25ca326.js → [id]-b3db5610ae7e94fb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-289605267d6cce7e.js → privacy-experience-3009481bdd479fd7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-e9fd9b28ac9705af.js → [id]-72e3cd6740c5c5de.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-28c003b6043bd16c.js → new-2aa4d13fb26b59ca.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-c643eff04525298e.js → privacy-notices-6b0885a8c871804f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-3ef5d01779a26455.js → properties-20bc3cf67727dfd3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-baa4a2f8f08ac224.js → reporting-77b491108663a2de.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{consent-8d4be9e7ec7d2a35.js → consent-b3c8efbd960f4e34.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-f27ec4578c674181.js → [resourceUrn]-adc500a03e239857.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-27b6c255bd9e73b6.js → [projectUrn]-fe5f6fb33e34baa7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-0f66dac32040519c.js → projects-3584c90cf3670146.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-3b938562df81c4b0.js → [resourceUrn]-c8b3d090e4ba60d3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-a6cecf48e4e27645.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-844abdb5ea7d78af.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-215d6e2fefc9a5e1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-7721508cc2a9ab3a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-21c141279e66237a.js → activity-6169e49c3787a9bf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-3bc6a207693fd175.js → [resourceUrn]-22eec362dfbb1d2a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-da16e73df395ad1d.js → detection-4decce5ef996e563.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-04b242632a114405.js → [resourceUrn]-01acdd1ad492fd89.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-900fe50183a40d72.js → discovery-85fdbf4cde60d910.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-4f1f7c3a9531a8f4.js → datamap-e17dd4ffcaa4836d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-343294dcb10d9532.js → [...subfieldNames]-4af946dc8c6c967f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-1c097a0809fa5b6f.js → [collectionName]-a65a8ea3872800e7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-b47fa2498b534719.js → [datasetId]-ccc844caef652a7e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-a31f881cab25704a.js → new-3b65c6e9af65ea2e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-858c59c9e67e318d.js → dataset-0566189a0236078d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-16c28d272225afb6.js → [id]-38a7b8826e0abb01.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-c8d2599814eefd35.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-00ba79f6b47bd161.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-fec557d99211f577.js → index-053db342725dc127.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-3db44d6839e8dbd9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-5f34de3c24e67368.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-4a08ca7762a19700.js → [id]-707b72e959233112.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-343a965dcdb3d11e.js → add-template-c68b413f3c9cf318.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-3ade4c54b1c8a11e.js → messaging-d95588f3ef137030.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-9103bfb854f71410.js → ant-components-36cac6f4379587ea.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-3b97029bd4d3c3ea.js → AntForm-d44606c0cf203b47.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-9d9beb8f0d8a278c.js → FormikAntFormItem-341b571fd8da4142.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-84a4d8fc60f839ed.js → FormikControlled-2e99b5eb12982aeb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-1fccf542ab2e33bf.js → FormikField-c7d62113680196dd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-aa75263ae1ba67bb.js → forms-89a24591c3d9e7a8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-db334a1cbb102255.js → table-migration-c54bcfb6b0de8a71.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-11c1e4545c8f528c.js → [id]-7e3f8b6eb83c5142.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-192a986f61c23268.js → messaging-4c8e1a7e407d3c7f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-9216ac993d71387e.js → storage-faf42d1a9cd6a861.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-e55ec84d5380401d.js → configure-3823ee301161be4f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-c9c1c02d7e68c4f8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-a74b51b704b80cb2.js → [id]-8973618b9ba28a50.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-8d23f0c55ff6510a.js → add-property-b449da44de56fd3f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{properties-77acceac4f99e7af.js → properties-5bb059b7057b5583.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-6b26740aeb247bc8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/{alpha-6aad3f563ed03b3f.js → alpha-98c1492dca52f4f8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-c1b8f3606d160bb1.js → about-d176ec152b70f82d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-d9f7f78810d58d08.js → [purpose_id]-ea5077aca3d01dfb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-ee2c7dde99b1dafb.js → consent-68b812269e38c8c3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-79cdee37ceb8665f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-31c270d228e00581.js → domain-records-056f36a8a0509006.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-996b3f250dd3ea1f.js → domains-fea15607939cab70.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-ee94981326ddcbf4.js → email-templates-cce73ddc0012b089.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-0b831c58966782b8.js → locations-8b0a408ed7e3ff28.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-94271ba4a224a353.js → organization-a01838a53677d69e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-41b8136e50320fd3.js → regulations-43e9cafaeb869069.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-52b45569cbc82e60.js → test-datasets-ea1e2483ddf6af6c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-36d74e93e54aabaf.js → [id]-7856e694b009ded3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-24dfc8e2279ced2e.js → systems-2c6dca19bf0a4f0c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-d9675cf5e6083b27.js → taxonomy-ede8ddce10d7d055.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-866826d7959df487.js → [id]-af9bf43612c9676c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-e63b61a8f99ccd57.js → user-management-3b7fea8781dc18b5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{webpack-6d0a487039bcf30c.js → webpack-aa7ff73977a15cb3.js} +1 -1
- fides/ui-build/static/admin/_next/static/css/{dbcf63488933a4d5.css → 98fab0b3e6aa43ed.css} +1 -1
- fides/ui-build/static/admin/_next/static/css/abf2e162b1cd0e61.css +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/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/poc/table-migration.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/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/alpha.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/ui-build/static/admin/_next/static/_BLI2ArqQzY5XnXbrcxa2/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1099-7b2085a3931da9e4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1138-0d846ffef62c580f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3729-7d2d52400f1f7413.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4786-53ef1662f2d0d98c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4808-8713433c84a62efe.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/549-e6453a3526023e85.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/602-80d113e801d7407d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8002-dcd02da6e5649a1c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-ebf5e7fa4e2ffb49.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-b27c660039d951c9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-8ce5d24af470888e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-8e35e33928abbcdc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-68f502d8b0b5792c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-1eb9acb17b133fd1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-e613543818d6cbd2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-8069f7c33695fd45.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-48f447b31c786b80.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-e60d398e255f4e00.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-a4dad8ca9de2d07b.js +0 -1
- fides/ui-build/static/admin/_next/static/css/92441453b27e9c34.css +0 -1
- {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.69.0rc0.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.69.0rc0.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.69.0rc0.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.69.0rc0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{_BLI2ArqQzY5XnXbrcxa2 → 0uUBOyZCwjdyYdhNzpRkz}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3923],{23923:function(e,a,t){t.d(a,{Z:function(){return G}});var s=t(24246),i=t(
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3923],{23923:function(e,a,t){t.d(a,{Z:function(){return G}});var s=t(24246),i=t(96306),n=t(34090),r=t(27378),o=t(55484),l=t(16134),d=t(25980),c=t(40324),u=t(33335),p=t(32885),m=t(1315),_=t(57865),g=t(72774),v=t(36345),f=t(812),h=t(8133),y=t(46628);let b={name:"",consent_use:"",data_use:"",data_categories:["user"]},x=[{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."}],j=e=>x.some(a=>a.value===e.split(".")[0]);var k=t(28079),C=t(69525),w=t(97181);let V=e=>{let{index:a,disabled:t}=e;(0,k.fd)();let r=(0,l.C)(k.oW),{values:o}=(0,n.u6)(),d=r.filter(e=>e.value.split(".")[0]===o.privacy_declarations[a].consent_use);return(0,s.jsxs)(i.gCW,{width:"100%",borderRadius:"4px",border:"1px solid",borderColor:"gray.200",spacing:4,p:4,children:[(0,s.jsx)(w.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:x,layout:"stacked",isRequired:!0,disabled:t}),(0,s.jsx)(w.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:!o.privacy_declarations[a].consent_use||t}),(0,s.jsx)(w.d,{mode:"tags",label:"Cookie names",name:"privacy_declarations.".concat(a,".cookieNames"),options:[],layout:"stacked",disabled:t,className:"w-full"})]})};var F=e=>{var a,t;let{showSuggestions:o,isCreate:d,disabled:c}=e,{values:u,setFieldValue:m}=(0,n.u6)(),{vendor_id:_}=u,{isLoading:g}=(0,p.Wp)({vendor_id:_},{skip:!o||null==_}),v=(0,l.C)((0,p.cL)(_||""));(0,r.useEffect)(()=>{o&&u.vendor_id&&(null==v?void 0:v.length)?m("privacy_declarations",v.filter(e=>j(e.data_use)).map(e=>(0,C.U)(e)).map(e=>{var a;return{name:null!==(a=e.name)&&void 0!==a?a:"",consent_use:e.data_use.split(".")[0],data_use:e.data_use,data_categories:e.data_categories}})):d&&m("privacy_declarations",[b])},[o,d,u.vendor_id,v,m]);let f=(null===(a=u.privacy_declarations[u.privacy_declarations.length-1])||void 0===a?void 0:a.data_use)===b.data_use&&(null===(t=u.privacy_declarations[u.privacy_declarations.length-1])||void 0===t?void 0:t.consent_use)===b.consent_use;return g?(0,s.jsx)(i.$jN,{size:"sm",alignSelf:"center"}):(0,s.jsx)(n.F2,{name:"privacy_declarations",render:e=>(0,s.jsxs)(s.Fragment,{children:[u.privacy_declarations.map((e,a)=>(0,s.jsx)(V,{index:a,disabled:c},e.data_use||a)),(0,s.jsx)(i.wpx,{onClick:()=>e.push(b),size:"small",type:"text",disabled:c||f,"data-testid":"add-data-use-btn",children:"Add data use +"})]})})};let S={name:"",vendor_id:void 0,privacy_declarations:[b]};var G=e=>{let{buttonLabel:a,onButtonClick:t,buttonProps:x}=e,j=(0,i.pmc)(),{isOpen:k,onOpen:C,onClose:w}=(0,i.qY0)(),V=(0,l.T)(),[G]=(0,m.in)(),L=(0,r.useMemo)(()=>o.Ry().shape({name:o.Z_().required().label("Vendor name").test("is-unique","",async(e,a)=>{let{data:t}=await G({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.')})})}),[G]),{tcf:E,dictionaryService:R}=(0,d.hz)(),{isLoading:W}=(0,p.Rd)(void 0,{skip:!R}),q=(0,l.C)(p.o),z=(0,l.C)(_.gU),[N]=(0,m.f7)(),T=(0,l.C)(_.bN),U=()=>{w(),V((0,_.b3)("initial")),V((0,_.gQ)(!1))},Z=(0,r.useRef)(null),A=Z.current?Z.current.values.vendor_id:void 0,M=(0,l.C)((0,p.$e)(A||"")),Q=async(e,a)=>{let t=e.privacy_declarations.filter(e=>e.consent_use!==b.consent_use).flatMap(e=>{let{consent_use:a,...t}=e;return"marketing"!==e.consent_use||e.data_use?{...t,data_use:e.data_use?e.data_use:e.consent_use}:["marketing.advertising.first_party.targeted","marketing.advertising.third_party.targeted"].map(e=>({...t,data_use:e}))}),s={...M,...e,fides_key:(0,u.E)(e.name),system_type:"",privacy_declarations:t},i=await N(s);if((0,f.D4)(i)){j((0,y.Vo)((0,f.e$)(i.error)));return}j((0,y.t5)("Vendor successfully created!")),a.resetForm(),U()},D=e=>{if(R){if(!e){V((0,_.b3)("hiding")),V((0,_.gQ)(!1));return}V((0,_.b3)("showing")),E&&(0,f.cj)(e)===f.c6.GVL?V((0,_.gQ)(!0)):V((0,_.gQ)(!1))}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.wpx,{onClick:()=>{t?t():C()},"data-testid":"add-vendor-btn",...x,children:a}),(0,s.jsx)(n.J9,{initialValues:S,enableReinitialize:!0,onSubmit:Q,validationSchema:L,innerRef:Z,children:e=>{let{dirty:a,isValid:t,resetForm:r}=e;return(0,s.jsx)(h.Z,{isOpen:k,onClose:U,title:"Add a vendor",children:(0,s.jsxs)(i.xuv,{"data-testid":"add-vendor-modal-content",my:4,children:[z?(0,s.jsx)(g.Z,{}):null,(0,s.jsx)(n.l0,{children:(0,s.jsxs)(i.gCW,{alignItems:"start",spacing:6,children:[R?(0,s.jsx)(v.Z,{label:"Vendor name",options:q,isLoading:W,onVendorSelected:D,isCreate:!0,lockedForGVL:z}):(0,s.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,s.jsx)(F,{showSuggestions:"showing"===T,isCreate:!0,disabled:z}),(0,s.jsxs)("div",{className:"flex w-full justify-between",children:[(0,s.jsx)(i.wpx,{onClick:()=>{U(),r()},children:"Cancel"}),(0,s.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:W||!a||!t,loading:W,"data-testid":"save-btn",children:"Save vendor"})]})]})})]})})}})]})}},72774:function(e,a,t){t.d(a,{Z:function(){return r}});var s=t(24246),i=t(96306),n=e=>{let{title:a,description:t,button:n}=e;return(0,s.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:[(0,s.jsx)(i.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,s.jsxs)(i.xuv,{flexGrow:1,children:[(0,s.jsx)(i.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:a}),(0,s.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:t})]}),n]})},r=()=>(0,s.jsx)(i.xuv,{mb:"6",maxW:"720px","data-testid":"locked-for-GVL-notice",children:(0,s.jsx)(n,{title:"This system is part of the TCF Global Vendor List (GVL)",description:(0,s.jsxs)(s.Fragment,{children:["As a result, certain fields are not editable as they come directly from Fides Compass and the Global Vendor List (GVL). In some cases, where the legal basis has been declared to be flexible, you may update the legal basis for particular data uses."," ",(0,s.jsx)(i.rUS,{href:"https://fid.es/tcf_gvl",isExternal:!0,color:"complimentary.500",children:"For more information on the Global Vendor List, click here."})]})})})},69525:function(e,a,t){t.d(a,{U:function(){return s}});let s=e=>{let a=e.data_categories.flatMap(e=>e.split(","));return{data_use:e.data_use,data_categories:a,features:e.features,legal_basis_for_processing:e.legal_basis_for_processing,flexible_legal_basis_for_processing:e.flexible_legal_basis_for_processing,retention_period:e.retention_period?e.retention_period:""}}}}]);
|
fides/ui-build/static/admin/_next/static/chunks/{401-3902e3e98790d401.js → 401-029e2ff644cae40c.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[401],{97181:function(e,a,n){n.d(a,{d:function(){return d}});var l=n(24246),t=n(
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[401],{97181:function(e,a,n){n.d(a,{d:function(){return d}});var l=n(24246),t=n(96306),s=n(34090),i=n(27378),r=n(46238),o=n(40324);let d=e=>{let{name:a,label:n,labelProps:d,tooltip:c,isRequired:u,layout:v="inline",helperText:h,...m}=e,[x,j,{setValue:g}]=(0,s.U$)(a),p=!!(j.touched&&j.error),[f,b]=(0,i.useState)("");x.value||"tags"!==m.mode&&"multiple"!==m.mode||(x.value=[]),"tags"===m.mode&&"string"==typeof x.value&&(x.value=[x.value]);let C="tags"===m.mode?(e,a)=>e?e.value!==f||x.value.includes(f)?m.optionRender?m.optionRender(e,a):e.label:'Create "'.concat(f,'"'):void 0:m.optionRender||void 0,y=e=>{b(e),m.onSearch&&m.onSearch(e)},w=(e,a)=>{g(e),m.onChange&&m.onChange(e,a)};return"inline"===v?(0,l.jsx)(t.NIc,{isInvalid:p,isRequired:u,children:(0,l.jsxs)(t.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,l.jsx)(o.__,{htmlFor:m.id||a,...d,children:n}):null,(0,l.jsxs)(t.jqI,{align:"center",children:[(0,l.jsxs)(t.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(t.WPr,{...x,id:m.id||a,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:C,onSearch:"tags"===m.mode?y:void 0,onChange:w,value:x.value||void 0,status:p?"error":void 0}),h&&(0,l.jsx)(t.Q6r,{children:h}),(0,l.jsx)(o.Bc,{isInvalid:p,message:j.error,fieldName:x.name})]}),(0,l.jsx)(r.b,{label:c,className:p?"mt-2 self-start":void 0})]})]})}):(0,l.jsx)(t.NIc,{isInvalid:p,isRequired:u,children:(0,l.jsxs)(t.gCW,{alignItems:"start",children:[(0,l.jsxs)(t.jqI,{align:"center",children:[n?(0,l.jsx)(o.__,{htmlFor:m.id||a,fontSize:"xs",my:0,mr:1,...d,children:n}):null,(0,l.jsx)(r.b,{label:c})]}),(0,l.jsx)(t.WPr,{...x,id:m.id||a,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:C,onSearch:"tags"===m.mode?y:void 0,onChange:w,value:x.value||void 0,status:p?"error":void 0}),h&&(0,l.jsx)(t.Q6r,{style:{marginTop:0},children:h}),(0,l.jsx)(o.Bc,{isInvalid:p,message:j.error,fieldName:x.name})]})})}},8133:function(e,a,n){var l=n(24246),t=n(96306);a.Z=e=>{let{title:a,children:n,isOpen:s,onClose:i,modalContentProps:r,showCloseButton:o=!1,footer:d,...c}=e;return(0,l.jsxs)(t.u_l,{isOpen:s,onClose:i,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,l.jsx)(t.ZAr,{}),(0,l.jsxs)(t.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...r,children:[o&&(0,l.jsx)(t.olH,{}),(0,l.jsx)(t.xBx,{p:0,children:(0,l.jsx)(t.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,l.jsx)(t.X6q,{as:"h3",size:"sm",children:a})})}),(0,l.jsx)(t.fef,{pb:4,overflow:"auto",children:n}),d&&(0,l.jsx)(t.mzw,{children:d})]})]})}},33335:function(e,a,n){n.d(a,{E:function(){return l}});let l=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")},36345:function(e,a,n){n.d(a,{Z:function(){return j}});var l=n(24246),t=n(96306),s=n(34090),i=n(27378),r=n(16134),o=n(40324);let d=(0,t.IUT)({displayName:"CompassIcon",viewBox:"0 0 512 512",path:(0,l.jsx)("path",{fill:"currentColor",d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm306.7 69.1L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})});var c=n(46238),u=n(57865);let{Text:v}=t.AntTypography,h=e=>{let{searchText:a,suggestion:n,...t}=e;return a&&n?(0,l.jsxs)(v,{"aria-hidden":!0,style:{pointerEvents:"none",position:"absolute",zIndex:10,top:"var(--ant-line-width)",bottom:"var(--ant-line-width)",left:"var(--ant-padding-sm)",lineHeight:"calc(var(--ant-control-height) - var(--ant-line-width))"},...t,children:[(0,l.jsx)(v,{className:"text-transparent",children:a}),(0,l.jsx)(v,{type:"secondary",children:n.substring(a.length)})]}):null},m="Create new system",x=e=>{let{active:a,disabled:n,onRefreshSuggestions:s}=e,i={bg:a?"complimentary.500":"gray.100"};return(0,l.jsxs)(t.gCW,{children:[(0,l.jsx)(t.LZC,{minHeight:"18px"}),(0,l.jsxs)(t.v2r,{children:[(0,l.jsx)(t.j2t,{as:t.hU,size:"sm",isDisabled:n,icon:(0,l.jsx)(d,{color:a?"white":"gray.700",boxSize:4}),"aria-label":"Update information from Compass","data-testid":"refresh-suggestions-btn",_hover:{_disabled:i},...i}),(0,l.jsx)(t.qyq,{children:(0,l.jsx)(t.sNh,{onClick:s,children:(0,l.jsx)(t.xvT,{fontSize:"xs",lineHeight:4,children:"Reset to Compass defaults"})})})]})]})};var j=e=>{var a,n;let{label:d,isCreate:v,lockedForGVL:j,options:g,isLoading:p,onVendorSelected:f}=e,b=(0,r.C)(u.bN),[C,y,{setValue:w}]=(0,s.U$)("name"),_=!!(y.touched&&y.error),I={...C,value:null!==(a=C.value)&&void 0!==a?a:""},{touched:N,values:z,setTouched:S,setFieldValue:R,validateForm:k}=(0,s.u6)(),[q,E]=(0,i.useState)(!0),W=null!==(n=g.find(e=>e.value===I.value))&&void 0!==n?n:{label:I.value,value:I.value,description:""},B=(e,a)=>!!(null==a?void 0:a.label.toLowerCase().startsWith(e.toLowerCase())),[T,U]=(0,i.useState)(""),Z=(0,i.useMemo)(()=>g.filter(e=>B(T,e)),[g,T]),A=(0,i.useMemo)(()=>{let e=g;return v&&T&&(e=[...g,{label:"".concat(m,' "').concat(T,'"...'),value:T}]),e},[v,g,T]),F=!!T&&Z.length>0,L=j&&!v;(0,i.useEffect)(()=>{E(!I.value&&!z.vendor_id)},[I.value,z.vendor_id,E]),(0,i.useEffect)(()=>{k()},[q,k]);let M=async()=>{U(""),R("vendor_id",void 0),await w(""),S({...N,vendor_id:!1,name:!1}),f(void 0)},P=async e=>{if(e){let a=g.some(a=>a.value===e.value)?e.value:void 0;R("vendor_id",a),await w(e.label.startsWith(m)?e.value:e.label),S({...N,vendor_id:!0,name:!0}),f(a)}},H=async e=>{I.onBlur(e),T&&await w(T),S({...N,name:!0})},D=async e=>{Z.length>0&&T!==Z[0].label?(e.preventDefault(),U(Z[0].label),R("vendor_id",Z[0].value),await w(Z[0].label),f(Z[0].value)):(R("vendor_id",void 0),await w(T)),S({...N,name:!0})},O=(0,l.jsx)(t.NIc,{isInvalid:_,isRequired:!0,width:"100%",children:(0,l.jsxs)(t.gCW,{alignItems:"start",position:"relative",width:"100%",children:[(0,l.jsxs)(t.Ugi,{spacing:1,children:[(0,l.jsx)(o.__,{htmlFor:"vendorName",fontSize:"xs",my:0,mr:1,children:d}),(0,l.jsx)(c.b,{label:"Enter the system name"})]}),(0,l.jsxs)(t.xuv,{width:"100%",className:"relative",children:[(0,l.jsx)(t.WPr,{id:"vendorName",labelInValue:!0,autoFocus:!0,allowClear:!0,options:A,loading:p,filterOption:(e,a)=>B(e,a)||!!(null==a?void 0:a.label.startsWith(m)),optionFilterProp:"label",value:W,placeholder:"Enter system name...",disabled:L,onChange:P,onSearch:U,onClear:M,onBlur:H,onInputKeyDown:e=>{T&&"Tab"===e.key&&D(e)},status:_?"error":void 0,"data-testid":"vendor-name-select"}),(0,l.jsx)(h,{searchText:T,suggestion:Z.length?Z[0].label:""})]}),(0,l.jsx)(o.Bc,{isInvalid:_,message:y.error,fieldName:"name"})]})});return(0,l.jsxs)(t.Ugi,{alignItems:"flex-start",width:"full",children:[q?O:(0,l.jsx)(o.j0,{autoFocus:!0,id:"name",name:"name",label:"System name",tooltip:"Enter the system name",variant:"stacked",disabled:L,isRequired:!0,inputRightElement:L?null:(0,l.jsx)(t.PZ7,{onClick:M,size:"sm","data-testid":"clear-btn"})}),(0,l.jsx)(x,{active:!!z.vendor_id||F,disabled:!z.vendor_id||"showing"===b,onRefreshSuggestions:()=>f(z.vendor_id)})]})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4121],{44121:function(e,s,a){a.d(s,{Z:function(){return Q}});var t=a(24246),n=a(39941),i=a(91437),l=()=>(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.xuv,{pb:4,fontSize:"18px",fontWeight:"semibold",children:"Role Description"}),(0,t.jsx)(n.gCW,{spacing:4,children:i.K.map(e=>(0,t.jsxs)(n.xuv,{width:"100%",padding:4,borderRadius:"md",backgroundColor:"gray.75",fontSize:"14px",children:[(0,t.jsx)(n.xuv,{fontWeight:"semibold",children:e.label}),(0,t.jsx)(n.xuv,{color:"gray.700",children:e.description})]},e.roleKey))})]}),r=a(16134),d=a(54682),o=a(19904),c=a(34090),h=a(86677),m=a(27378),p=a(812),u=a(46238),x=a(58452),j=a(77830),w=a(46628),g=a(26917),b=a(1315),f=a(95492),y=a(65497);let v=e=>{let{assignedSystems:s,onAssignedSystemChange:a}=e,i=(0,r.C)(y.Ux);if((0,y.d6)(i,{skip:!i}),0===s.length)return null;let l=e=>{a(s.filter(s=>s.fides_key!==e.fides_key))};return(0,t.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,t.jsx)(n.hrZ,{children:(0,t.jsxs)(n.Tr,{children:[(0,t.jsx)(n.Th,{children:"System"}),(0,t.jsx)(n.Th,{})]})}),(0,t.jsx)(n.p3B,{children:s.map(e=>(0,t.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,t.jsx)(n.Td,{children:e.name}),(0,t.jsx)(n.Td,{textAlign:"end",children:(0,t.jsx)(n.wpx,{"aria-label":"Unassign system from user",icon:(0,t.jsx)(f.l,{}),onClick:()=>l(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var _=e=>{let{allSystems:s,assignedSystems:a,onChange:i}=e,l=e=>{a.find(s=>s.fides_key===e.fides_key)?i(a.filter(s=>s.fides_key!==e.fides_key)):i([...a,e])};return(0,t.jsx)(n.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,t.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,t.jsx)(n.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,t.jsxs)(n.Tr,{children:[(0,t.jsx)(n.Th,{children:"System"}),(0,t.jsx)(n.Th,{children:"Assign"})]})}),(0,t.jsx)(n.p3B,{children:s.map(e=>{let s=!!a.find(s=>s.fides_key===e.fides_key);return(0,t.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,t.jsx)(n.Td,{children:e.name}),(0,t.jsx)(n.Td,{children:(0,t.jsx)(n.rAg,{checked:s,onChange:()=>l(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let C=(e,s)=>{var a,t;return(null===(a=e.name)||void 0===a?void 0:a.toLocaleLowerCase().includes(s.toLocaleLowerCase()))||(null===(t=e.description)||void 0===t?void 0:t.toLocaleLowerCase().includes(s.toLocaleLowerCase()))};var S=e=>{let{isOpen:s,onClose:a,assignedSystems:i,onAssignedSystemChange:l}=e,{data:r}=(0,b.K3)(),[d,o]=(0,m.useState)(""),[c,h]=(0,m.useState)(i),p=async()=>{l(c),a()},u=!r||0===r.length,x=(0,m.useMemo)(()=>r?r.filter(e=>C(e,d)):[],[r,d]),j=(0,m.useMemo)(()=>{let e=new Set(c.map(e=>e.fides_key));return x.every(s=>e.has(s.fides_key))},[x,c]);return(0,t.jsxs)(n.u_l,{isOpen:s,onClose:a,size:"2xl",children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,t.jsxs)(n.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,t.jsx)(n.xvT,{children:"Assign systems"}),(0,t.jsxs)(n.j8w,{color:"success",children:["Assigned to ",i.length," systems"]})]}),(0,t.jsx)(n.fef,{"data-testid":"assign-systems-modal-body",children:u?(0,t.jsx)(n.xvT,{children:"No systems found"}):(0,t.jsxs)(n.Kqy,{spacing:4,children:[(0,t.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Assign systems in your organization to this user"}),(0,t.jsx)(n.xuv,{children:(0,t.jsxs)(n.NIc,{display:"flex",alignItems:"center",children:[(0,t.jsx)(n.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,t.jsx)(n.rAg,{size:"small",id:"assign-all-systems",checked:j,onChange:e=>{e&&r?h(x):h(r?r.filter(e=>!x.includes(e)):[])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,t.jsx)(g.Z,{value:d,onChange:o,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,t.jsx)(_,{allSystems:x,assignedSystems:c,onChange:h})]})}),(0,t.jsx)(n.mzw,{justifyContent:"flex-start",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:a,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),u?null:(0,t.jsx)(n.wpx,{type:"primary",onClick:p,"data-testid":"confirm-btn",children:"Confirm"})]})})]})]})},k=e=>{let{label:s,roleKey:a,isSelected:i,isDisabled:l,assignedSystems:r,onAssignedSystemChange:o}=e,{setFieldValue:h}=(0,c.u6)(),m=(0,n.qY0)(),p=l?"You do not have sufficient permissions to assign this role.":void 0;return i?(0,t.jsxs)(n.Kqy,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",p:4,backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",justifyContent:"space-between",children:[(0,t.jsx)(n.xvT,{fontSize:"md",fontWeight:"semibold",children:s}),(0,t.jsx)(n.StI,{})]}),a!==d.A7.APPROVER&&a!==d.A7.RESPONDENT&&a!==d.A7.EXTERNAL_RESPONDENT?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"Assigned systems"}),(0,t.jsx)(u.b,{label:"Assigned systems refer to those systems that have been specifically allocated to a user for management purposes. Users assigned to a system possess full edit permissions and are listed as the Data Steward for the respective system."})]}),(0,t.jsx)(n.wpx,{disabled:l,title:p,type:"primary",size:"small",onClick:m.onOpen,"data-testid":"assign-systems-btn",children:"Assign systems +"}),(0,t.jsx)(v,{assignedSystems:r,onAssignedSystemChange:o}),m.isOpen?(0,t.jsx)(S,{isOpen:m.isOpen,onClose:m.onClose,assignedSystems:r,onAssignedSystemChange:o}):null]}):null]}):(0,t.jsx)(n.wpx,{onClick:()=>{h("roles",[a])},"data-testid":"role-option-".concat(s),title:p,disabled:l,children:s})};let E={roles:[]};var A=()=>{var e,s;let a=(0,n.pmc)(),l=(0,h.useRouter)(),g=(0,r.C)(y.Ux);(0,y.d6)(g,{skip:!g});let{isOpen:b,onOpen:f,onClose:v}=(0,n.qY0)(),_=(0,r.C)(y.R$),[C,S]=(0,m.useState)(_),[A]=(0,y.G$)();(0,m.useEffect)(()=>{S(_)},[_]);let{data:T,isLoading:P}=(0,y.gU)(null!=g?g:"",{skip:!g}),[R]=(0,y.lD)(),N=!!(null==T?void 0:null===(e=T.roles)||void 0===e?void 0:e.includes(d.A7.EXTERNAL_RESPONDENT)),O=async e=>{if(b&&v(),!g)return;let s=e.roles.includes(d.A7.APPROVER),t=await R({user_id:g,payload:{roles:e.roles}});if((0,p.D4)(t)){a((0,w.Vo)((0,p.e$)(t.error)));return}if(!s){let e=C.map(e=>e.fides_key),s=await A({userId:g,fidesKeys:e});if((0,p.D4)(s)){a((0,w.Vo)((0,p.e$)(s.error)));return}}a((0,w.t5)("Permissions updated"))},I=async e=>{g&&(C.length>0&&e.roles.includes(d.A7.APPROVER)?f():await O(e))},z=(0,o.Tg)([d.Sh.USER_PERMISSION_ASSIGN_OWNERS]);if(!g)return null;if(P)return(0,t.jsx)(n.$jN,{});if(!z&&(null==T?void 0:null===(s=T.roles)||void 0===s?void 0:s.includes(d.A7.OWNER)))return(0,t.jsx)(n.xvT,{"data-testid":"insufficient-access",children:"You do not have sufficient access to change this user's permissions."});let q=(null==T?void 0:T.roles)?{roles:T.roles}:E,U=i.K.filter(e=>N?e.roleKey===d.A7.EXTERNAL_RESPONDENT:e.roleKey!==d.A7.EXTERNAL_RESPONDENT),D=N?"External respondent role cannot be changed":void 0;return(0,t.jsx)(c.J9,{onSubmit:I,initialValues:q,enableReinitialize:!0,children:e=>{let{values:s,isSubmitting:a,dirty:i}=e;return(0,t.jsxs)(c.l0,{children:[(0,t.jsxs)(n.Kqy,{spacing:7,children:[(0,t.jsxs)(n.Kqy,{spacing:3,"data-testid":"role-options",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"User role"}),(0,t.jsx)(u.b,{label:"A user's role in the organization determines what parts of the UI they can access and which functions are available to them."})]}),U.map(e=>{let a=s.roles.indexOf(e.roleKey)>=0,n=e.roleKey===d.A7.OWNER?!z:N;return(0,t.jsx)(k,{isSelected:a,isDisabled:n,assignedSystems:C,onAssignedSystemChange:S,...e},e.roleKey)}),!N&&(0,t.jsx)(n.esZ,{title:"To invite a new External respondent user, create a manual task integration and then click on the 'Manage secure access' button",children:(0,t.jsx)(n.wpx,{disabled:!0,"data-testid":"role-option-External respondent",children:"External respondent"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:()=>l.push(j.e3),children:"Cancel"}),(0,t.jsx)(n.esZ,{title:D,children:(0,t.jsx)(n.wpx,{className:"ml-2",type:"primary",htmlType:"submit",loading:a,disabled:!i&&C===_||N,"data-testid":"save-btn",children:"Save"})})]})]}),(0,t.jsx)(x.Z,{isOpen:b,onClose:v,onConfirm:()=>O(s),title:"Change role to Approver",testId:"downgrade-to-approver-confirmation-modal",continueButtonText:"Yes",message:(0,t.jsx)(n.xvT,{children:"Switching to an approver role will remove all assigned systems. Do you wish to proceed?"})})]})}})},T=a(61038),P=a(55484),R=a(25980),N=a(40324),O=a(96006),I=a(7426);let{useGetEmailInviteStatusQuery:z}=a(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]})})});var q=a(76174),U=a(91317),D=a(31883);let Z=P.Ry().shape({password:O.a.label("Password"),passwordConfirmation:P.Z_().required().oneOf([P.iH("password")],"Passwords must match").label("Password confirmation")}),W={password:"",passwordConfirmation:""},K=e=>{let s=(0,n.qY0)(),a=(0,n.pmc)(),[t]=(0,y.ls)(),i=async n=>{let i=await t({id:e,new_password:n.password});(0,D.D4)(i)?a((0,w.Vo)((0,p.e$)(i.error))):(a((0,w.t5)("Successfully reset user's password. Please inform the user of their new password.")),s.onClose())};return{...s,handleResetPassword:i}};var L=e=>{let{id:s}=e,{handleResetPassword:a,isOpen:i,onClose:l,onOpen:r}=K(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{onClick:r,"data-testid":"reset-password-btn",children:"Reset password"}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:i,onClose:l,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsx)(n.hzk,{children:(0,t.jsx)(c.J9,{initialValues:W,validationSchema:Z,onSubmit:a,children:e=>{let{isSubmitting:s,dirty:a,isValid:i}=e;return(0,t.jsxs)(c.l0,{children:[(0,t.jsx)(n.xBx,{children:"Reset Password"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{children:(0,t.jsxs)(n.Kqy,{direction:"column",spacing:4,children:[(0,t.jsx)(n.xvT,{mb:2,children:"Choose a new password for this user."}),(0,t.jsx)(N.j0,{name:"password",label:"Password",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",autoComplete:"new-password"}),(0,t.jsx)(N.j0,{name:"passwordConfirmation",label:"Confirm Password",placeholder:"********",type:"password",tooltip:"Must match above password.",autoComplete:"confirm-password"})]})}),(0,t.jsx)(n.mzw,{children:(0,t.jsxs)("div",{className:"w-full gap-2",children:[(0,t.jsx)(n.wpx,{onClick:l,className:"w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{type:"primary",disabled:!a||!i,loading:s,htmlType:"submit",className:"w-1/2","data-testid":"submit-btn",children:"Change Password"})]})})]})}})})]})]})};let V=e=>{let s=(0,n.qY0)(),a=(0,n.pmc)(),[t,i]=(0,m.useState)(""),[l,r]=(0,m.useState)(""),[d,{isLoading:o}]=(0,y.ev)(),c=!!(e&&l&&t),h=async()=>{c&&d({id:e,old_password:t,new_password:l}).unwrap().then(()=>{a((0,w.t5)("Password updated")),s.onClose()})};return{...s,changePasswordValidation:c,handleChange:e=>{"oldPassword"===e.target.name?i(e.target.value):r(e.target.value)},handleChangePassword:h,isLoading:o,newPasswordValue:l,oldPasswordValue:t}};var B=e=>{let{id:s}=e,{changePasswordValidation:a,handleChange:i,handleChangePassword:l,isLoading:r,isOpen:d,newPasswordValue:o,oldPasswordValue:c,onClose:h,onOpen:m}=V(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{onClick:m,"data-testid":"update-password-btn",children:"Update password"}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:d,onClose:h,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{children:[(0,t.jsx)(n.xBx,{children:"Update Password"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{pb:6,children:(0,t.jsxs)(n.Kqy,{direction:"column",spacing:"15px",children:[(0,t.jsx)(n.NIc,{children:(0,t.jsx)(n.IIB,{isRequired:!0,name:"oldPassword",onChange:i,placeholder:"Old Password",type:"password",value:c,"data-testid":"input-oldPassword"})}),(0,t.jsx)(n.NIc,{children:(0,t.jsx)(n.IIB,{isRequired:!0,name:"newPassword",onChange:i,placeholder:"New Password",type:"password",value:o,"data-testid":"input-newPassword"})})]})}),(0,t.jsxs)(n.mzw,{children:[(0,t.jsx)(n.wpx,{onClick:h,className:"mr-2 w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{type:"primary",disabled:!a,loading:r,onClick:l,htmlType:"submit",className:"mr-3 w-1/2","data-testid":"submit-btn",children:"Change Password"})]})]})]})]})},Y=()=>{var e;let s=(0,r.C)(y.Ux),a=(0,r.C)(U.dy),i=!!a&&a.id===s,{data:l}=(0,y.gU)(null!=s?s:"",{skip:!s});return(null==l?void 0:null===(e=l.roles)||void 0===e?void 0:e.includes(d.A7.EXTERNAL_RESPONDENT))?null:(0,t.jsx)(n.xuv,{children:s?(0,t.jsxs)(n.Ugi,{children:[i?(0,t.jsx)(B,{id:s}):null,(0,t.jsx)(o.ZP,{scopes:[d.Sh.USER_PASSWORD_RESET],children:(0,t.jsx)(L,{id:s})})]}):null})};let F=(e,s,a,t)=>!e||e&&!s||e&&s&&!0===a&&!!t,$=(e,s,a)=>!!(e&&s&&a),M=(e,s,a,t,n,i)=>!!e&&!s&&F(a,t,n,i),X=(e,s,a,t)=>F(e,s,a,t),H={username:"",first_name:"",email_address:"",last_name:"",password:"",password_login_enabled:!1},G=(e,s,a,t,n)=>P.Ry().shape({username:P.Z_().required().label("Username"),email_address:P.Z_().email().required().label("Email address"),first_name:P.Z_().label("First name"),last_name:P.Z_().label("Last name"),password:P.Z_().when(["password_login_enabled"],{is:i=>M(e,s,a,t,n,i),then:()=>O.a.label("Password"),otherwise:()=>P.Z_().optional().label("Password")}),password_login_enabled:P.O7().label("Allow password login")});var J=e=>{let{onSubmit:s,initialValues:a,canEditNames:i}=e,l=(0,h.useRouter)(),d=(0,n.pmc)(),o=(0,r.T)(),m=(0,n.qY0)(),{data:u}=z(),{data:x}=(0,q.qv)();(0,I.tB)({api_set:!1});let g=(0,r.C)(y.ZC),b=(0,r.C)(I.iR),{plus:v}=(0,R.hz)(),_=(null==u?void 0:u.enabled)||!1,C=(null==b?void 0:b.allow_username_password_login)||!1,S=!g,k=!S&&!i,E=x&&x.length>0||!1,A=$(v,E,C),P=null!=a?a:H;g&&"password_login_enabled"in g&&(P={...P,password_login_enabled:!!g.password_login_enabled});let O=G(S,_,v,E,C),U=async e=>{let a=M(S,_,v,E,C,e.password_login_enabled),t={username:e.username,email_address:e.email_address,first_name:e.first_name,last_name:e.last_name};A&&(t.password_login_enabled=e.password_login_enabled),a&&e.password&&(t.password=e.password);let n=await s(t);if((0,p.D4)(n)){d((0,w.Vo)((0,p.e$)(n.error)));return}d((0,w.t5)("".concat(S?"User created. By default, new users are set to the Viewer role. To change the role, please go to the Permissions tab.":"User updated."))),(null==n?void 0:n.data)&&o((0,y.Vv)(n.data.id))};return(0,t.jsx)(c.J9,{onSubmit:U,initialValues:P,validationSchema:O,"data-testid":"user-form",children:e=>{let{dirty:s,isSubmitting:a,isValid:i,values:r}=e;return(0,t.jsx)(c.l0,{children:(0,t.jsxs)(n.Kqy,{maxW:["xs","xs","100%"],width:"100%",spacing:7,children:[(0,t.jsxs)(n.Kqy,{spacing:6,maxWidth:"55%",children:[(0,t.jsxs)(n.kCb,{children:[(0,t.jsxs)(n.xvT,{display:"flex",alignItems:"center",fontSize:"sm",fontWeight:"semibold",children:["Profile"," ",(null==g?void 0:g.disabled)&&(0,t.jsx)(n.j8w,{color:"success",className:"ml-2","data-testid":"invite-sent-badge",children:"Invite sent"})]}),(0,t.jsx)(n.xuv,{marginLeft:"auto",children:(0,t.jsxs)(n.Ugi,{children:[X(v,E,C||!1,r.password_login_enabled)&&(0,t.jsx)(Y,{"data-testid":"password-management"}),S?null:(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.wpx,{"aria-label":"delete",icon:(0,t.jsx)(f.l,{}),onClick:m.onOpen,"data-testid":"delete-user-btn"}),(0,t.jsx)(T.Z,{user:g,...m})]})]})})]}),(0,t.jsx)(N.j0,{name:"username",label:"Username",variant:"block",placeholder:"Enter new username",disabled:!S,isRequired:!0,"data-testid":"input-username"}),(0,t.jsx)(N.j0,{name:"email_address",label:"Email address",variant:"block",placeholder:"Enter email of user",isRequired:!0,"data-testid":"input-email-address"}),(0,t.jsx)(N.j0,{name:"first_name",label:"First name",variant:"block",placeholder:"Enter first name of user",disabled:k,"data-testid":"input-first-name"}),(0,t.jsx)(N.j0,{name:"last_name",label:"Last name",variant:"block",placeholder:"Enter last name of user",disabled:k,"data-testid":"input-last-name"}),A&&(0,t.jsx)(N.w8,{name:"password_login_enabled",label:"Allow password login",tooltip:"When enabled, user can log in with username and password. When disabled, user must use SSO.",variant:"stacked",isDisabled:!S,"data-testid":"toggle-allow-password-login",size:"default"}),M(S,_,v,E,C,r.password_login_enabled)&&(0,t.jsx)(N.j0,{name:"password",label:"Password",variant:"block",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",isRequired:!0,"data-testid":"input-password"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:()=>l.push(j.e3),className:"mr-3","data-testid":"cancel-btn",children:"Cancel"}),(0,t.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!s||!i,loading:a,"data-testid":"save-user-btn",children:"Save"})]})]})})}})},Q=e=>{let{onSubmit:s,initialValues:a,...i}=e,c=(0,r.C)(y.Ux);(0,y.Fk)(c,{skip:!c});let h=(0,o.Tg)([d.Sh.USER_PERMISSION_UPDATE]),m=!c||!h,p=[{label:"Profile",key:"profile",children:(0,t.jsx)(J,{onSubmit:s,initialValues:a,...i})},{label:"Permissions",key:"permissions",children:(0,t.jsxs)(n.kCb,{gap:"97px",children:[(0,t.jsx)(n.xuv,{w:{base:"100%",md:"50%",xl:"50%"},children:(0,t.jsx)(A,{})}),(0,t.jsx)(n.xuv,{position:"absolute",top:"96px",right:6,height:"calc(100% + 100px)",overflowY:"scroll",padding:6,w:"35%",borderLeftWidth:"1px",children:(0,t.jsx)(l,{})})]}),disabled:m,forceRender:!m}];return(0,t.jsx)(n.A5g,{items:p})}},31883:function(e,s,a){a.d(s,{Bw:function(){return t.Bw},D4:function(){return t.D4}});var t=a(19043)}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4121],{44121:function(e,s,a){a.d(s,{Z:function(){return Q}});var t=a(24246),n=a(96306),i=a(91437),l=()=>(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.xuv,{pb:4,fontSize:"18px",fontWeight:"semibold",children:"Role Description"}),(0,t.jsx)(n.gCW,{spacing:4,children:i.K.map(e=>(0,t.jsxs)(n.xuv,{width:"100%",padding:4,borderRadius:"md",backgroundColor:"gray.75",fontSize:"14px",children:[(0,t.jsx)(n.xuv,{fontWeight:"semibold",children:e.label}),(0,t.jsx)(n.xuv,{color:"gray.700",children:e.description})]},e.roleKey))})]}),r=a(16134),d=a(54682),o=a(19904),c=a(34090),h=a(86677),m=a(27378),p=a(812),u=a(46238),x=a(58452),j=a(77830),w=a(46628),g=a(26917),b=a(1315),f=a(95492),y=a(65497);let v=e=>{let{assignedSystems:s,onAssignedSystemChange:a}=e,i=(0,r.C)(y.Ux);if((0,y.d6)(i,{skip:!i}),0===s.length)return null;let l=e=>{a(s.filter(s=>s.fides_key!==e.fides_key))};return(0,t.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,t.jsx)(n.hrZ,{children:(0,t.jsxs)(n.Tr,{children:[(0,t.jsx)(n.Th,{children:"System"}),(0,t.jsx)(n.Th,{})]})}),(0,t.jsx)(n.p3B,{children:s.map(e=>(0,t.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,t.jsx)(n.Td,{children:e.name}),(0,t.jsx)(n.Td,{textAlign:"end",children:(0,t.jsx)(n.wpx,{"aria-label":"Unassign system from user",icon:(0,t.jsx)(f.l,{}),onClick:()=>l(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var _=e=>{let{allSystems:s,assignedSystems:a,onChange:i}=e,l=e=>{a.find(s=>s.fides_key===e.fides_key)?i(a.filter(s=>s.fides_key!==e.fides_key)):i([...a,e])};return(0,t.jsx)(n.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,t.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,t.jsx)(n.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,t.jsxs)(n.Tr,{children:[(0,t.jsx)(n.Th,{children:"System"}),(0,t.jsx)(n.Th,{children:"Assign"})]})}),(0,t.jsx)(n.p3B,{children:s.map(e=>{let s=!!a.find(s=>s.fides_key===e.fides_key);return(0,t.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,t.jsx)(n.Td,{children:e.name}),(0,t.jsx)(n.Td,{children:(0,t.jsx)(n.rAg,{checked:s,onChange:()=>l(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let C=(e,s)=>{var a,t;return(null===(a=e.name)||void 0===a?void 0:a.toLocaleLowerCase().includes(s.toLocaleLowerCase()))||(null===(t=e.description)||void 0===t?void 0:t.toLocaleLowerCase().includes(s.toLocaleLowerCase()))};var S=e=>{let{isOpen:s,onClose:a,assignedSystems:i,onAssignedSystemChange:l}=e,{data:r}=(0,b.K3)(),[d,o]=(0,m.useState)(""),[c,h]=(0,m.useState)(i),p=async()=>{l(c),a()},u=!r||0===r.length,x=(0,m.useMemo)(()=>r?r.filter(e=>C(e,d)):[],[r,d]),j=(0,m.useMemo)(()=>{let e=new Set(c.map(e=>e.fides_key));return x.every(s=>e.has(s.fides_key))},[x,c]);return(0,t.jsxs)(n.u_l,{isOpen:s,onClose:a,size:"2xl",children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,t.jsxs)(n.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,t.jsx)(n.xvT,{children:"Assign systems"}),(0,t.jsxs)(n.j8w,{color:"success",children:["Assigned to ",i.length," systems"]})]}),(0,t.jsx)(n.fef,{"data-testid":"assign-systems-modal-body",children:u?(0,t.jsx)(n.xvT,{children:"No systems found"}):(0,t.jsxs)(n.Kqy,{spacing:4,children:[(0,t.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Assign systems in your organization to this user"}),(0,t.jsx)(n.xuv,{children:(0,t.jsxs)(n.NIc,{display:"flex",alignItems:"center",children:[(0,t.jsx)(n.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,t.jsx)(n.rAg,{size:"small",id:"assign-all-systems",checked:j,onChange:e=>{e&&r?h(x):h(r?r.filter(e=>!x.includes(e)):[])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,t.jsx)(g.Z,{value:d,onChange:o,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,t.jsx)(_,{allSystems:x,assignedSystems:c,onChange:h})]})}),(0,t.jsx)(n.mzw,{justifyContent:"flex-start",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:a,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),u?null:(0,t.jsx)(n.wpx,{type:"primary",onClick:p,"data-testid":"confirm-btn",children:"Confirm"})]})})]})]})},k=e=>{let{label:s,roleKey:a,isSelected:i,isDisabled:l,assignedSystems:r,onAssignedSystemChange:o}=e,{setFieldValue:h}=(0,c.u6)(),m=(0,n.qY0)(),p=l?"You do not have sufficient permissions to assign this role.":void 0;return i?(0,t.jsxs)(n.Kqy,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",p:4,backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",justifyContent:"space-between",children:[(0,t.jsx)(n.xvT,{fontSize:"md",fontWeight:"semibold",children:s}),(0,t.jsx)(n.StI,{})]}),a!==d.A7.APPROVER&&a!==d.A7.RESPONDENT&&a!==d.A7.EXTERNAL_RESPONDENT?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"Assigned systems"}),(0,t.jsx)(u.b,{label:"Assigned systems refer to those systems that have been specifically allocated to a user for management purposes. Users assigned to a system possess full edit permissions and are listed as the Data Steward for the respective system."})]}),(0,t.jsx)(n.wpx,{disabled:l,title:p,type:"primary",size:"small",onClick:m.onOpen,"data-testid":"assign-systems-btn",children:"Assign systems +"}),(0,t.jsx)(v,{assignedSystems:r,onAssignedSystemChange:o}),m.isOpen?(0,t.jsx)(S,{isOpen:m.isOpen,onClose:m.onClose,assignedSystems:r,onAssignedSystemChange:o}):null]}):null]}):(0,t.jsx)(n.wpx,{onClick:()=>{h("roles",[a])},"data-testid":"role-option-".concat(s),title:p,disabled:l,children:s})};let E={roles:[]};var A=()=>{var e,s;let a=(0,n.pmc)(),l=(0,h.useRouter)(),g=(0,r.C)(y.Ux);(0,y.d6)(g,{skip:!g});let{isOpen:b,onOpen:f,onClose:v}=(0,n.qY0)(),_=(0,r.C)(y.R$),[C,S]=(0,m.useState)(_),[A]=(0,y.G$)();(0,m.useEffect)(()=>{S(_)},[_]);let{data:T,isLoading:P}=(0,y.gU)(null!=g?g:"",{skip:!g}),[R]=(0,y.lD)(),N=!!(null==T?void 0:null===(e=T.roles)||void 0===e?void 0:e.includes(d.A7.EXTERNAL_RESPONDENT)),O=async e=>{if(b&&v(),!g)return;let s=e.roles.includes(d.A7.APPROVER),t=await R({user_id:g,payload:{roles:e.roles}});if((0,p.D4)(t)){a((0,w.Vo)((0,p.e$)(t.error)));return}if(!s){let e=C.map(e=>e.fides_key),s=await A({userId:g,fidesKeys:e});if((0,p.D4)(s)){a((0,w.Vo)((0,p.e$)(s.error)));return}}a((0,w.t5)("Permissions updated"))},I=async e=>{g&&(C.length>0&&e.roles.includes(d.A7.APPROVER)?f():await O(e))},z=(0,o.Tg)([d.Sh.USER_PERMISSION_ASSIGN_OWNERS]);if(!g)return null;if(P)return(0,t.jsx)(n.$jN,{});if(!z&&(null==T?void 0:null===(s=T.roles)||void 0===s?void 0:s.includes(d.A7.OWNER)))return(0,t.jsx)(n.xvT,{"data-testid":"insufficient-access",children:"You do not have sufficient access to change this user's permissions."});let q=(null==T?void 0:T.roles)?{roles:T.roles}:E,U=i.K.filter(e=>N?e.roleKey===d.A7.EXTERNAL_RESPONDENT:e.roleKey!==d.A7.EXTERNAL_RESPONDENT),D=N?"External respondent role cannot be changed":void 0;return(0,t.jsx)(c.J9,{onSubmit:I,initialValues:q,enableReinitialize:!0,children:e=>{let{values:s,isSubmitting:a,dirty:i}=e;return(0,t.jsxs)(c.l0,{children:[(0,t.jsxs)(n.Kqy,{spacing:7,children:[(0,t.jsxs)(n.Kqy,{spacing:3,"data-testid":"role-options",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"User role"}),(0,t.jsx)(u.b,{label:"A user's role in the organization determines what parts of the UI they can access and which functions are available to them."})]}),U.map(e=>{let a=s.roles.indexOf(e.roleKey)>=0,n=e.roleKey===d.A7.OWNER?!z:N;return(0,t.jsx)(k,{isSelected:a,isDisabled:n,assignedSystems:C,onAssignedSystemChange:S,...e},e.roleKey)}),!N&&(0,t.jsx)(n.esZ,{title:"To invite a new External respondent user, create a manual task integration and then click on the 'Manage secure access' button",children:(0,t.jsx)(n.wpx,{disabled:!0,"data-testid":"role-option-External respondent",children:"External respondent"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:()=>l.push(j.e3),children:"Cancel"}),(0,t.jsx)(n.esZ,{title:D,children:(0,t.jsx)(n.wpx,{className:"ml-2",type:"primary",htmlType:"submit",loading:a,disabled:!i&&C===_||N,"data-testid":"save-btn",children:"Save"})})]})]}),(0,t.jsx)(x.Z,{isOpen:b,onClose:v,onConfirm:()=>O(s),title:"Change role to Approver",testId:"downgrade-to-approver-confirmation-modal",continueButtonText:"Yes",message:(0,t.jsx)(n.xvT,{children:"Switching to an approver role will remove all assigned systems. Do you wish to proceed?"})})]})}})},T=a(61038),P=a(55484),R=a(25980),N=a(40324),O=a(96006),I=a(7426);let{useGetEmailInviteStatusQuery:z}=a(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]})})});var q=a(76174),U=a(91317),D=a(31883);let Z=P.Ry().shape({password:O.a.label("Password"),passwordConfirmation:P.Z_().required().oneOf([P.iH("password")],"Passwords must match").label("Password confirmation")}),W={password:"",passwordConfirmation:""},K=e=>{let s=(0,n.qY0)(),a=(0,n.pmc)(),[t]=(0,y.ls)(),i=async n=>{let i=await t({id:e,new_password:n.password});(0,D.D4)(i)?a((0,w.Vo)((0,p.e$)(i.error))):(a((0,w.t5)("Successfully reset user's password. Please inform the user of their new password.")),s.onClose())};return{...s,handleResetPassword:i}};var L=e=>{let{id:s}=e,{handleResetPassword:a,isOpen:i,onClose:l,onOpen:r}=K(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{onClick:r,"data-testid":"reset-password-btn",children:"Reset password"}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:i,onClose:l,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsx)(n.hzk,{children:(0,t.jsx)(c.J9,{initialValues:W,validationSchema:Z,onSubmit:a,children:e=>{let{isSubmitting:s,dirty:a,isValid:i}=e;return(0,t.jsxs)(c.l0,{children:[(0,t.jsx)(n.xBx,{children:"Reset Password"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{children:(0,t.jsxs)(n.Kqy,{direction:"column",spacing:4,children:[(0,t.jsx)(n.xvT,{mb:2,children:"Choose a new password for this user."}),(0,t.jsx)(N.j0,{name:"password",label:"Password",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",autoComplete:"new-password"}),(0,t.jsx)(N.j0,{name:"passwordConfirmation",label:"Confirm Password",placeholder:"********",type:"password",tooltip:"Must match above password.",autoComplete:"confirm-password"})]})}),(0,t.jsx)(n.mzw,{children:(0,t.jsxs)("div",{className:"w-full gap-2",children:[(0,t.jsx)(n.wpx,{onClick:l,className:"w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{type:"primary",disabled:!a||!i,loading:s,htmlType:"submit",className:"w-1/2","data-testid":"submit-btn",children:"Change Password"})]})})]})}})})]})]})};let V=e=>{let s=(0,n.qY0)(),a=(0,n.pmc)(),[t,i]=(0,m.useState)(""),[l,r]=(0,m.useState)(""),[d,{isLoading:o}]=(0,y.ev)(),c=!!(e&&l&&t),h=async()=>{c&&d({id:e,old_password:t,new_password:l}).unwrap().then(()=>{a((0,w.t5)("Password updated")),s.onClose()})};return{...s,changePasswordValidation:c,handleChange:e=>{"oldPassword"===e.target.name?i(e.target.value):r(e.target.value)},handleChangePassword:h,isLoading:o,newPasswordValue:l,oldPasswordValue:t}};var B=e=>{let{id:s}=e,{changePasswordValidation:a,handleChange:i,handleChangePassword:l,isLoading:r,isOpen:d,newPasswordValue:o,oldPasswordValue:c,onClose:h,onOpen:m}=V(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{onClick:m,"data-testid":"update-password-btn",children:"Update password"}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:d,onClose:h,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{children:[(0,t.jsx)(n.xBx,{children:"Update Password"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{pb:6,children:(0,t.jsxs)(n.Kqy,{direction:"column",spacing:"15px",children:[(0,t.jsx)(n.NIc,{children:(0,t.jsx)(n.IIB,{isRequired:!0,name:"oldPassword",onChange:i,placeholder:"Old Password",type:"password",value:c,"data-testid":"input-oldPassword"})}),(0,t.jsx)(n.NIc,{children:(0,t.jsx)(n.IIB,{isRequired:!0,name:"newPassword",onChange:i,placeholder:"New Password",type:"password",value:o,"data-testid":"input-newPassword"})})]})}),(0,t.jsxs)(n.mzw,{children:[(0,t.jsx)(n.wpx,{onClick:h,className:"mr-2 w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{type:"primary",disabled:!a,loading:r,onClick:l,htmlType:"submit",className:"mr-3 w-1/2","data-testid":"submit-btn",children:"Change Password"})]})]})]})]})},Y=()=>{var e;let s=(0,r.C)(y.Ux),a=(0,r.C)(U.dy),i=!!a&&a.id===s,{data:l}=(0,y.gU)(null!=s?s:"",{skip:!s});return(null==l?void 0:null===(e=l.roles)||void 0===e?void 0:e.includes(d.A7.EXTERNAL_RESPONDENT))?null:(0,t.jsx)(n.xuv,{children:s?(0,t.jsxs)(n.Ugi,{children:[i?(0,t.jsx)(B,{id:s}):null,(0,t.jsx)(o.ZP,{scopes:[d.Sh.USER_PASSWORD_RESET],children:(0,t.jsx)(L,{id:s})})]}):null})};let F=(e,s,a,t)=>!e||e&&!s||e&&s&&!0===a&&!!t,$=(e,s,a)=>!!(e&&s&&a),M=(e,s,a,t,n,i)=>!!e&&!s&&F(a,t,n,i),X=(e,s,a,t)=>F(e,s,a,t),H={username:"",first_name:"",email_address:"",last_name:"",password:"",password_login_enabled:!1},G=(e,s,a,t,n)=>P.Ry().shape({username:P.Z_().required().label("Username"),email_address:P.Z_().email().required().label("Email address"),first_name:P.Z_().label("First name"),last_name:P.Z_().label("Last name"),password:P.Z_().when(["password_login_enabled"],{is:i=>M(e,s,a,t,n,i),then:()=>O.a.label("Password"),otherwise:()=>P.Z_().optional().label("Password")}),password_login_enabled:P.O7().label("Allow password login")});var J=e=>{let{onSubmit:s,initialValues:a,canEditNames:i}=e,l=(0,h.useRouter)(),d=(0,n.pmc)(),o=(0,r.T)(),m=(0,n.qY0)(),{data:u}=z(),{data:x}=(0,q.qv)();(0,I.tB)({api_set:!1});let g=(0,r.C)(y.ZC),b=(0,r.C)(I.iR),{plus:v}=(0,R.hz)(),_=(null==u?void 0:u.enabled)||!1,C=(null==b?void 0:b.allow_username_password_login)||!1,S=!g,k=!S&&!i,E=x&&x.length>0||!1,A=$(v,E,C),P=null!=a?a:H;g&&"password_login_enabled"in g&&(P={...P,password_login_enabled:!!g.password_login_enabled});let O=G(S,_,v,E,C),U=async e=>{let a=M(S,_,v,E,C,e.password_login_enabled),t={username:e.username,email_address:e.email_address,first_name:e.first_name,last_name:e.last_name};A&&(t.password_login_enabled=e.password_login_enabled),a&&e.password&&(t.password=e.password);let n=await s(t);if((0,p.D4)(n)){d((0,w.Vo)((0,p.e$)(n.error)));return}d((0,w.t5)("".concat(S?"User created. By default, new users are set to the Viewer role. To change the role, please go to the Permissions tab.":"User updated."))),(null==n?void 0:n.data)&&o((0,y.Vv)(n.data.id))};return(0,t.jsx)(c.J9,{onSubmit:U,initialValues:P,validationSchema:O,"data-testid":"user-form",children:e=>{let{dirty:s,isSubmitting:a,isValid:i,values:r}=e;return(0,t.jsx)(c.l0,{children:(0,t.jsxs)(n.Kqy,{maxW:["xs","xs","100%"],width:"100%",spacing:7,children:[(0,t.jsxs)(n.Kqy,{spacing:6,maxWidth:"55%",children:[(0,t.jsxs)(n.kCb,{children:[(0,t.jsxs)(n.xvT,{display:"flex",alignItems:"center",fontSize:"sm",fontWeight:"semibold",children:["Profile"," ",(null==g?void 0:g.disabled)&&(0,t.jsx)(n.j8w,{color:"success",className:"ml-2","data-testid":"invite-sent-badge",children:"Invite sent"})]}),(0,t.jsx)(n.xuv,{marginLeft:"auto",children:(0,t.jsxs)(n.Ugi,{children:[X(v,E,C||!1,r.password_login_enabled)&&(0,t.jsx)(Y,{"data-testid":"password-management"}),S?null:(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.wpx,{"aria-label":"delete",icon:(0,t.jsx)(f.l,{}),onClick:m.onOpen,"data-testid":"delete-user-btn"}),(0,t.jsx)(T.Z,{user:g,...m})]})]})})]}),(0,t.jsx)(N.j0,{name:"username",label:"Username",variant:"block",placeholder:"Enter new username",disabled:!S,isRequired:!0,"data-testid":"input-username"}),(0,t.jsx)(N.j0,{name:"email_address",label:"Email address",variant:"block",placeholder:"Enter email of user",isRequired:!0,"data-testid":"input-email-address"}),(0,t.jsx)(N.j0,{name:"first_name",label:"First name",variant:"block",placeholder:"Enter first name of user",disabled:k,"data-testid":"input-first-name"}),(0,t.jsx)(N.j0,{name:"last_name",label:"Last name",variant:"block",placeholder:"Enter last name of user",disabled:k,"data-testid":"input-last-name"}),A&&(0,t.jsx)(N.w8,{name:"password_login_enabled",label:"Allow password login",tooltip:"When enabled, user can log in with username and password. When disabled, user must use SSO.",variant:"stacked",isDisabled:!S,"data-testid":"toggle-allow-password-login",size:"default"}),M(S,_,v,E,C,r.password_login_enabled)&&(0,t.jsx)(N.j0,{name:"password",label:"Password",variant:"block",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",isRequired:!0,"data-testid":"input-password"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:()=>l.push(j.e3),className:"mr-3","data-testid":"cancel-btn",children:"Cancel"}),(0,t.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!s||!i,loading:a,"data-testid":"save-user-btn",children:"Save"})]})]})})}})},Q=e=>{let{onSubmit:s,initialValues:a,...i}=e,c=(0,r.C)(y.Ux);(0,y.Fk)(c,{skip:!c});let h=(0,o.Tg)([d.Sh.USER_PERMISSION_UPDATE]),m=!c||!h,p=[{label:"Profile",key:"profile",children:(0,t.jsx)(J,{onSubmit:s,initialValues:a,...i})},{label:"Permissions",key:"permissions",children:(0,t.jsxs)(n.kCb,{gap:"97px",children:[(0,t.jsx)(n.xuv,{w:{base:"100%",md:"50%",xl:"50%"},children:(0,t.jsx)(A,{})}),(0,t.jsx)(n.xuv,{position:"absolute",top:"96px",right:6,height:"calc(100% + 100px)",overflowY:"scroll",padding:6,w:"35%",borderLeftWidth:"1px",children:(0,t.jsx)(l,{})})]}),disabled:m,forceRender:!m}];return(0,t.jsx)(n.A5g,{items:p})}},31883:function(e,s,a){a.d(s,{Bw:function(){return t.Bw},D4:function(){return t.D4}});var t=a(19043)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4608],{77213:function(e,i,t){t.d(i,{Z:function(){return h}});var n=t(24246),r=t(39941),s=t(88038),a=t.n(s),l=t(86677);t(27378);var o=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,l.useRouter)();return(0,n.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(r.xuv,{children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(r.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:i,title:t,padded:s=!0,mainProps:c}=e,h=(0,o.hz)(),x=(0,l.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,p=!(h.flags.privacyRequestsConfiguration&&m),{data:f}=(0,d.JE)(void 0,{skip:p}),{data:g}=(0,d.PW)(void 0,{skip:p}),v=h.flags.privacyRequestsConfiguration&&(!f||!g)&&m;return(0,n.jsxs)(r.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,n.jsxs)(a(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,n.jsx)(u,{}):null,i]})]})}},97181:function(e,i,t){t.d(i,{d:function(){return d}});var n=t(24246),r=t(39941),s=t(34090),a=t(27378),l=t(46238),o=t(40324);let d=e=>{let{name:i,label:t,labelProps:d,tooltip:c,isRequired:u,layout:h="inline",helperText:x,...m}=e,[p,f,{setValue:g}]=(0,s.U$)(i),v=!!(f.touched&&f.error),[j,y]=(0,a.useState)("");p.value||"tags"!==m.mode&&"multiple"!==m.mode||(p.value=[]),"tags"===m.mode&&"string"==typeof p.value&&(p.value=[p.value]);let b="tags"===m.mode?(e,i)=>e?e.value!==j||p.value.includes(j)?m.optionRender?m.optionRender(e,i):e.label:'Create "'.concat(j,'"'):void 0:m.optionRender||void 0,C=e=>{y(e),m.onSearch&&m.onSearch(e)},k=(e,i)=>{g(e),m.onChange&&m.onChange(e,i)};return"inline"===h?(0,n.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(r.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,n.jsx)(o.__,{htmlFor:m.id||i,...d,children:t}):null,(0,n.jsxs)(r.jqI,{align:"center",children:[(0,n.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(r.WPr,{...p,id:m.id||i,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?C:void 0,onChange:k,value:p.value||void 0,status:v?"error":void 0}),x&&(0,n.jsx)(r.Q6r,{children:x}),(0,n.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]}),(0,n.jsx)(l.b,{label:c,className:v?"mt-2 self-start":void 0})]})]})}):(0,n.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(r.gCW,{alignItems:"start",children:[(0,n.jsxs)(r.jqI,{align:"center",children:[t?(0,n.jsx)(o.__,{htmlFor:m.id||i,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,n.jsx)(l.b,{label:c})]}),(0,n.jsx)(r.WPr,{...p,id:m.id||i,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?C:void 0,onChange:k,value:p.value||void 0,status:v?"error":void 0}),x&&(0,n.jsx)(r.Q6r,{style:{marginTop:0},children:x}),(0,n.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]})})}},46782:function(e,i,t){t.d(i,{j:function(){return s},l:function(){return a}});var n=t(30454),r=t.n(n);let s="#/definitions/FidesDatasetReference",a=e=>{let i=(e,i,t)=>{let n;return(void 0===i||""===i||void 0===i)&&(n="".concat(e," is required")),t===s&&((null==i?void 0:i.includes("."))?i.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},t=i=>{var t,n;return null!==(n=null==e?void 0:null===(t=e.required)||void 0===t?void 0:t.includes(i))&&void 0!==n&&n};return{validateField:i,isRequiredField:t,getFieldValidation:(e,n)=>{if(t(e))return e=>{var t;return i(n.title,e,null===(t=n.allOf)||void 0===t?void 0:t[0].$ref)}},preprocessValues:i=>{let t=r()(i);return e&&Object.keys(e.properties).forEach(i=>{var n,r;if((null===(n=e.properties[i].allOf)||void 0===n?void 0:n[0].$ref)===s){let e=null===(r=t.secrets[i])||void 0===r?void 0:r.split(".");e&&(t.secrets[i]={dataset:e.shift(),field:e.join("."),direction:"from"})}"WebsiteSchema"!==e.title||"URL"!==e.properties[i].title||t.secrets[i].startsWith("http://")||t.secrets[i].startsWith("https://")||(t.secrets[i]="https://".concat(t.secrets[i]))}),t}}}},39715:function(e,i,t){var n=t(24246),r=t(39941);t(27378),i.Z=e=>{let{isEmptyState:i,yamlError:t}=e;return(0,n.jsx)(r.Rg9,{in:!0,children:(0,n.jsxs)(r.xuv,{w:"fit-content",bg:"white",p:3,borderRadius:3,children:[(0,n.jsxs)(r.Ugi,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:"YAML"}),(0,n.jsx)(r.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(r.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(r.f9v,{}),i&&(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:"Yaml system is required"})]}),t&&(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:t.message}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:t.reason}),(0,n.jsxs)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:["Ln ",(0,n.jsx)("b",{children:t.mark.line}),", Col"," ",(0,n.jsx)("b",{children:t.mark.column}),", Pos"," ",(0,n.jsx)("b",{children:t.mark.position})]})]})]})})]})})}},41207:function(e,i,t){t.d(i,{F:function(){return a},M:function(){return s}});var n=t(76649),r=t(65218);let s=t.n(r)()(()=>t.e(7088).then(t.bind(t,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),a=e=>(0,n.Ln)({name:"string"},e)&&"YAMLException"===e.name},41337:function(e,i,t){var n=t(24246),r=t(39941);t(27378);var s=t(88337),a=t(16394),l=t(14746);let o=l.Ny+l.iW.get(s.R.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===s.R.WEBSITE,h=e=>(null==e?void 0:e.connection_type)===s.R.SAAS;i.Z=e=>{let{data:i,...t}=e;return(0,n.jsx)(r.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{var e,t;let n;if(c(i)&&i.encoded_icon)return"data:image/svg+xml;base64,".concat(i.encoded_icon);if(u(i)){let t=null===(e=i.secrets)||void 0===e?void 0:e.url;if(!t)return o;let n=(0,a.ge)(t);return(0,a.tl)(n,100)}if(d(i)){if(h(i)&&(null===(t=i.saas_config)||void 0===t?void 0:t.type)){let e=i.saas_config.type,t=l.LN.get(e);return t?l.Ny+t:l.Ny+l.iW.get(s.R.SAAS)}n=[...l.iW].find(e=>{let[t]=e;return i.connection_type.toString()===t.toString()})}else if(c(i)){let{identifier:e}=i;n=[...l.iW].find(i=>{let[t]=i;return t.toLowerCase()===e.toLowerCase()})}return n?l.Ny+n[1]:l.VD})(),fallbackSrc:u(i)?o:l.VD,alt:(()=>{if(d(i)){var e;return null!==(e=i.name)&&void 0!==e?e:i.key}return c(i)?i.human_readable:i})(),...t})}},1226:function(e,i,t){var n=t(24246);t(27378);var r=t(77213);i.Z=e=>{let{children:i}=e;return(0,n.jsx)(r.Z,{title:"Connections",children:i})}},11274:function(e,i,t){t.d(i,{s:function(){return E}});var n=t(24246),r=t(96356),s=t(39941),a=t(86677),l=t(27378),o=t(16134),d=t(77830),c=t(54682),u=t(25010),h=t(84306),x=t(14207),m=t(16125),p=t(33335),f=t(34090),g=t(46782),v=t(46238);let j=(e,i)=>{let t={...e};return Object.entries(i.properties).forEach(i=>{let[n,r]=i;if("integer"===r.type){let i=r.default?Number(r.default):e[n];t[n]=i||0}else{var s;let i=null!==(s=r.default)&&void 0!==s?s:e[n];t[n]=null!=i?i:null}}),t};var y=e=>{let{data:i,defaultValues:t,isSubmitting:a=!1,onSaveClick:d,onTestConnectionClick:h,testButtonLabel:m="Test integration"}=e,p=(0,l.useRef)(!1),{handleError:y}=(0,u.HK)(),{connection:b,connectionOption:C}=(0,o.C)(r.ZZ),[k,_]=(0,x.h2)(),S=e=>{let i;return(void 0===e||""===e)&&(i="Connection Identifier is required"),e&&(0,s.kEn)(e)&&(i="Connection Identifier must be an alphanumeric value"),i},w=(e,i,t)=>{let n;return(void 0===i||""===i)&&(n="".concat(e," is required")),t===g.j&&(i.includes(".")?i.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},I=(e,i)=>(0,n.jsx)(s.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:i}),R=e=>{var i;if((null===(i=e.allOf)||void 0===i?void 0:i[0].$ref)===g.j)return"Enter dataset.collection.field"},z=(e,t)=>{var r;return(0,n.jsx)(f.gN,{id:e,name:e,validate:(null!==(r=i.required)&&void 0!==r&&!!r.includes(e)||"integer"===t.type)&&(e=>{var i;return w(t.title,e,null===(i=t.allOf)||void 0===i?void 0:i[0].$ref)}),children:r=>{var a;let{field:l,form:o}=r;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:null===(a=i.required)||void 0===a?void 0:a.includes(e),isInvalid:o.errors[e]&&o.touched[e],children:[I(e,t.title),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:["integer"!==t.type&&(0,n.jsx)(s.IIB,{...l,value:l.value||"",placeholder:R(t),autoComplete:"off",color:"gray.700",size:"sm"}),"integer"===t.type&&(0,n.jsxs)(s.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(s.zuI,{...l,autoComplete:"off"}),(0,n.jsxs)(s.FiK,{children:[(0,n.jsx)(s.WQu,{}),(0,n.jsx)(s.Y_d,{})]})]}),(0,n.jsx)(s.J1D,{children:o.errors[e]})]}),(0,n.jsx)(s.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(v.b,{label:t.description})})]})}},e)},W=async()=>{try{await k(b.key).unwrap()}catch(e){y(e)}};return(0,l.useEffect)(()=>(p.current=!0,_.isSuccess&&h(_),()=>{p.current=!1}),[h,_]),(0,n.jsx)(f.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==b?void 0:b.key){var n,r;e.name=null!==(r=b.name)&&void 0!==r?r:"",e.description=b.description,e.instance_key=b.connection_type===c.Rj.SAAS?null===(n=b.saas_config)||void 0===n?void 0:n.fides_key:b.key}return j(e,i)})(),onSubmit:(e,t)=>{let n={...e};Object.keys(i.properties).forEach(t=>{var r;if((null===(r=i.properties[t].allOf)||void 0===r?void 0:r[0].$ref)===g.j){let i=e[t].split(".");n[t]={dataset:i.shift(),field:i.join("."),direction:"from"}}}),d(n,t)},validateOnBlur:!1,validateOnChange:!1,children:e=>(0,n.jsx)(f.l0,{noValidate:!0,children:(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(f.gN,{id:"name",name:"name",validate:e=>w("Name",e),children:i=>{let{field:t}=i;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.name&&e.touched.name,children:[I("name","Name"),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",mr:"6",children:[(0,n.jsx)(s.IIB,{...t,autoComplete:"off",autoFocus:!0,color:"gray.700",placeholder:"Enter a friendly name for your new ".concat(C.human_readable," connection"),size:"sm","data-testid":"input-name"}),(0,n.jsx)(s.J1D,{children:e.errors.name})]})]})}}),(0,n.jsx)(f.gN,{id:"description",name:"description",children:e=>{let{field:i}=e;return(0,n.jsxs)(s.NIc,{display:"flex",children:[I("description","Description"),(0,n.jsx)(s.gxH,{...i,color:"gray.700",placeholder:"Enter a description for your new ".concat(C.human_readable," connection"),resize:"none",size:"sm",value:i.value||"",mr:"6"})]})}}),(0,n.jsx)(f.gN,{id:"instance_key",name:"instance_key",validate:S,children:i=>{let{field:t}=i;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.instance_key&&e.touched.instance_key,children:[I("instance_key","Connection Identifier"),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(s.IIB,{...t,autoComplete:"off",color:"gray.700",isDisabled:!!(null==b?void 0:b.key),placeholder:"A unique identifier for your new ".concat(C.human_readable," connection"),size:"sm"}),(0,n.jsx)(s.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(s.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(v.b,{label:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this connection."})})]})}}),Object.entries(i.properties).map(e=>{let[i,t]=e;return"advanced_settings"===i?null:z(i,t)}),(0,n.jsxs)(s.kCb,{gap:2,children:[(0,n.jsx)(s.wpx,{disabled:!(null==b?void 0:b.key),loading:_.isLoading||_.isFetching,onClick:W,"data-testid":"test-connection-button",children:m}),(0,n.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:a,loading:a,children:"Save"})]})]})})})};let b=e=>{let{onConnectionCreated:i,data:t}=e,s=(0,m.I0)(),{errorAlert:a,successAlert:d}=(0,h.V)(),{handleError:f}=(0,u.HK)(),[g,v]=(0,l.useState)(!1),{connection:j,connectionOption:y}=(0,o.C)(r.ZZ),[b]=(0,x.pH)(),[C]=(0,x.Du)();return{isSubmitting:g,handleSubmit:async e=>{try{var l;v(!0);let o={access:c.uv.WRITE,connection_type:null==y?void 0:y.identifier,description:e.description,disabled:!1,key:(0,p.E)(e.instance_key),name:e.name},u=await b(o).unwrap();if((null===(l=u.failed)||void 0===l?void 0:l.length)>0)a(u.failed[0].message);else{let l={connection_key:u.succeeded[0].key,secrets:{}};Object.entries(t.properties).forEach(i=>{l.secrets[i[0]]=e[i[0]]});let o=await C(l).unwrap();"failed"===o.test_status?a((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",o.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",o.failure_reason]})):(s((0,r.lm)(u.succeeded[0])),d("Connector successfully ".concat((null==j?void 0:j.key)?"updated":"added","!")),(null==j?void 0:j.key)||!i||i())}}catch(e){f(e)}finally{v(!1)}},connectionOption:y}},C=e=>{let{data:i,onConnectionCreated:t,onTestConnectionClick:r}=e,{isSubmitting:a,handleSubmit:l,connectionOption:o}=b({onConnectionCreated:t,data:i});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",o.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(y,{data:i,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:a,onSaveClick:l,onTestConnectionClick:r})]})},k={description:"",instance_key:"",name:""},_=e=>{let{data:i,onConnectionCreated:t,onTestEmail:r}=e,{connectionOption:a,isSubmitting:l,handleSubmit:o}=b({onConnectionCreated:t,data:i});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Configure your ",a.human_readable," connector by providing the connector name, description and a test email address. Once you have saved the details, you can click test email to check the format of the email."]}),(0,n.jsx)(y,{data:i,defaultValues:k,isSubmitting:l,onSaveClick:e=>{o(e)},onTestConnectionClick:r,testButtonLabel:"Test email"})]})};var S=t(55484),w=t(27259),I=t(67762),R=e=>{let{defaultValues:i,isSubmitting:t=!1,onSaveClick:l}=e,c=(0,a.useRouter)(),{connection:u,connectionOption:h}=(0,o.C)(r.ZZ);return(0,n.jsx)(f.J9,{initialValues:(()=>{if(null==u?void 0:u.key){var e;i.name=null!==(e=u.name)&&void 0!==e?e:"",i.description=u.description}return i})(),onSubmit:(e,i)=>{l(e,i)},validateOnBlur:!1,validateOnChange:!1,validationSchema:S.Ry().shape({name:S.Z_().required("Name is required")}),children:(0,n.jsx)(f.l0,{noValidate:!0,children:(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(w.Z,{autoFocus:!0,disabled:!!(null==u?void 0:u.key),isRequired:!0,label:"Name",name:"name",placeholder:"Enter a friendly name for your new ".concat(h.human_readable," connection")}),(0,n.jsx)(w.Z,{label:"Description",name:"description",placeholder:"Enter a description for your new ".concat(h.human_readable," connection"),type:"textarea"}),(0,n.jsx)(I.h,{isSubmitting:t,onCancelClick:()=>{c.push(d.JR)}})]})})})};let z=e=>{let{onConnectionCreated:i}=e,t=(0,m.I0)(),{errorAlert:a,successAlert:d}=(0,h.V)(),{handleError:p}=(0,u.HK)(),[f,g]=(0,l.useState)(!1),{connection:v,connectionOption:j}=(0,o.C)(r.ZZ),[y]=(0,x.pH)(),b=async(e,n)=>{try{var s;g(!0);let n={access:c.uv.WRITE,connection_type:null==j?void 0:j.identifier,description:e.description,disabled:!1,name:e.name,key:null==v?void 0:v.key},l=await y(n).unwrap();(null===(s=l.failed)||void 0===s?void 0:s.length)>0?a(l.failed[0].message):(t((0,r.lm)(l.succeeded[0])),d("Connector successfully ".concat((null==v?void 0:v.key)?"updated":"added","!")),(null==v?void 0:v.key)||!i||i())}catch(e){p(e)}finally{g(!1)}};return(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",children:["To begin setting up your new ",j.human_readable," ","connector you must first assign a name to the connector and a description.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Once you have completed this section you can then progress onto"," ",(0,n.jsx)(s.xvT,{display:"inline-block",fontWeight:"700",children:"DSR customization"})," ","using the menu on the left hand side."]}),(0,n.jsx)(R,{defaultValues:{description:"",name:""},isSubmitting:f,onSaveClick:b})]})},W=e=>{let{data:i,onConnectionCreated:t,onTestConnectionClick:a}=e,d=(0,m.I0)(),{errorAlert:f,successAlert:g}=(0,h.V)(),{handleError:v}=(0,u.HK)(),[j,b]=(0,l.useState)(!1),{connection:C,connectionOption:k}=(0,o.C)(r.ZZ),[_]=(0,x.pL)(),[S]=(0,x.pH)(),[w]=(0,x.Du)(),I=async(e,s)=>{try{if(b(!0),C){var a;let t={access:c.uv.WRITE,connection_type:C.connection_type,description:e.description,disabled:!1,key:C.key,name:e.name},s=await S(t).unwrap();if((null===(a=s.failed)||void 0===a?void 0:a.length)>0)f(s.failed[0].message);else{d((0,r.lm)(s.succeeded[0]));let t={connection_key:C.key,secrets:{}};Object.entries(i.properties).forEach(i=>{t.secrets[i[0]]=e[i[0]]});let a=await w(t).unwrap();"failed"===a.test_status?f((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",a.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",a.failure_reason]})):g("Connector successfully updated!")}}else{let n={description:e.description,name:e.name,instance_key:(0,p.E)(e.instance_key),saas_connector_type:k.identifier,secrets:{}};Object.entries(i.properties).forEach(i=>{n.secrets[i[0]]=e[i[0]]});let s=await _(n).unwrap();d((0,r.lm)(s.connection)),g("Connector successfully added!"),null==t||t()}}catch(e){v(e)}finally{b(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",k.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(y,{data:i,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:j,onSaveClick:I,onTestConnectionClick:a})]})};var Z=t(16394);let q=e=>{var i,t;let{response:a}=e,{connectionOption:l}=(0,o.C)(r.ZZ);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{color:"gray.100"}),(0,n.jsxs)(s.gCW,{align:"flex-start",mt:"16px",children:[(null===(i=a.data)||void 0===i?void 0:i.test_status)==="succeeded"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsxs)(s.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Successfully connected to ",l.human_readable]}),(0,n.jsx)(s.Vp9,{colorScheme:"green",size:"sm",variant:"solid",children:"Success"})]}),(0,n.jsx)(s.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(a.fulfilledTimeStamp)}),(0,n.jsx)(s.xuv,{bg:"green.100",border:"1px solid",borderColor:"green.300",color:"green.700",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(s.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(s.StI,{}),(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"green.500",fontWeight:"semibold",size:"xs",children:"Success message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.msg})]})]})})]}),(null===(t=a.data)||void 0===t?void 0:t.test_status)==="failed"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsxs)(s.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Output error to ",l.human_readable]}),(0,n.jsx)(s.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(s.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(a.fulfilledTimeStamp)}),(0,n.jsx)(s.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(s.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(s.f9v,{}),(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.failure_reason}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.msg})]})]})})]})]})]})},E=e=>{let{onConnectionCreated:i}=e,t=(0,a.useRouter)(),{connectionOption:u}=(0,o.C)(r.ZZ),h=u&&u.type===c.Zi.MANUAL,{data:x,isFetching:m,isLoading:p,isSuccess:f}=(0,r.n3)(u.identifier,{skip:h}),[g,v]=(0,l.useState)(),j=e=>{v(e)},y=(0,l.useCallback)(()=>{t.push(d.JR)},[t]),b=(0,l.useCallback)(()=>{switch(null==u?void 0:u.type){case c.Zi.DATABASE:if(f&&x)return(0,n.jsx)(C,{data:x,onConnectionCreated:i,onTestConnectionClick:j});break;case c.Zi.MANUAL:return(0,n.jsx)(z,{onConnectionCreated:i});case c.Zi.SAAS:if(f&&x)return(0,n.jsx)(W,{data:x,onConnectionCreated:i,onTestConnectionClick:j});break;case c.Zi.EMAIL:if(f&&x)return(0,n.jsx)(_,{data:x,onConnectionCreated:y,onTestEmail:j})}},[null==u?void 0:u.type,x,f,i,y]);return(0,n.jsxs)(s.kCb,{gap:"97px",children:[(0,n.jsxs)(s.gCW,{w:"579px",gap:"16px",align:"stretch",children:[(m||p)&&(0,n.jsx)(s.M5Y,{children:(0,n.jsx)(s.$jN,{})}),b()]}),g&&(0,n.jsxs)(s.Rg9,{in:!0,children:[" ",(0,n.jsx)(s.xuv,{mt:"16px",maxW:"528px",w:"fit-content",children:(0,n.jsx)(q,{response:g})})]})]})}},38212:function(e,i,t){t.d(i,{Z:function(){return y}});var n=t(24246),r=t(25010),s=t(96356),a=t(14207),l=t(39941),o=t(86677),d=t(27378),c=t(16134),u=t(812),h=t(77830),x=t(41966),m=t(84306),p=t(66527),f=t(41207),g=t(39715),v=e=>{let{data:i=[],isSubmitting:t=!1,onSubmit:r,onCancel:s,disabled:a}=e,o=(0,d.useRef)(null),{errorAlert:c}=(0,m.V)(),u=i.length>0?p.ZP.dump(i):void 0,[h,v]=(0,d.useState)(void 0),[j,y]=(0,d.useState)(!1),[b,C]=(0,d.useState)(!u),k=(0,l.qY0)(),{data:_}=(0,x.LH)({minimal:!0}),[S,w]=(0,d.useState)([]),I=e=>{p.ZP.load(e,{json:!0}),v(void 0)},R=()=>{let e=o.current.getValue();r(p.ZP.load(e,{json:!0})),w([])};return(0,n.jsxs)(l.kCb,{gap:"97px",children:[(0,n.jsxs)(l.gCW,{align:"stretch",w:"800px",children:[(0,n.jsx)(f.M,{defaultLanguage:"yaml",defaultValue:u,height:"calc(100vh - 526px)",onChange:e=>{try{y(!0),I(e),C(!!(!e||""===e.trim()))}catch(e){(0,f.F)(e)?v(e):c("Could not parse the supplied YAML")}},onMount:(e,i)=>{o.current=e,o.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0},readOnly:a},theme:"light"}),(0,n.jsxs)(l.Ugi,{justifyContent:"flex-end",pr:6,children:[s&&(0,n.jsx)(l.wpx,{onClick:s,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",disabled:a||b||!!h||t,loading:t,onClick:()=>{if(_&&_.length){let e=o.current.getValue(),i=_.filter(i=>e.includes("fides_key: ".concat(i.fides_key,"\n"))).map(e=>e.fides_key);if(w(i),i.length){k.onOpen();return}}R()},htmlType:"submit","data-testid":"save-yaml-btn",children:"Save"})]})]}),j&&(b||h)&&(0,n.jsx)(g.Z,{isEmptyState:b,yamlError:h}),(0,n.jsx)(l.cVQ,{isOpen:k.isOpen,onClose:k.onClose,onConfirm:()=>{R(),k.onClose()},title:"Overwrite dataset",message:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xvT,{children:["You are about to overwrite the dataset",S.length>1?"s":""," ",S.map((e,i)=>{let t=i===S.length-1;return(0,n.jsxs)(d.Fragment,{children:[(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),t?".":", "]},e)})]}),(0,n.jsx)(l.xvT,{children:"Are you sure you would like to continue?"})]})})]})};let j=e=>{let{children:i,...t}=e;return(0,n.jsx)(l.xvT,{color:"gray.700",fontSize:"14px",...t,children:i})};var y=()=>{let e=(0,o.useRouter)(),{errorAlert:i,successAlert:t}=(0,r.VY)(),{handleError:m}=(0,r.HK)(),[p,f]=(0,d.useState)(!1),{connection:g}=(0,c.C)(s.ZZ),{data:y,isFetching:b,isLoading:C,isSuccess:k}=(0,a.Eg)(g.key),[_]=(0,a.Lz)(),[S]=(0,x.EG)(),{data:w,isLoading:I,error:R}=(0,x.LH)({minimal:!0}),[z,W]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{y&&y.items.length&&W(y.items[0].ctl_dataset.fides_key)},[y]);let Z=async n=>{var r;let s={connection_key:null==g?void 0:g.key,dataset_pairs:n},a=await _(s).unwrap();(null===(r=a.failed)||void 0===r?void 0:r.length)>0?i(a.failed[0].message):t("Dataset successfully updated!"),e.push(h.JR)},q=async()=>{if(z)try{let e=z;y&&y.items.length&&(e=y.items[0].fides_key);let i=[{fides_key:e,ctl_dataset_fides_key:z}];Z(i)}catch(e){m(e)}},E=async e=>{try{f(!0);let t=Array.isArray(e)?e:[e],n=await S(t);if((0,u.D4)(n)){let e=(0,u.e$)(n.error);i(e);return}let r=t.map(e=>({fides_key:e.fides_key,ctl_dataset_fides_key:e.fides_key}));if(y&&y.items.length){let{items:e}=y;r=e.map((e,i)=>({fides_key:e.fides_key,ctl_dataset_fides_key:t[i].fides_key}))}Z(r)}catch(e){m(e)}finally{f(!1)}},F=""!==z&&void 0!==z;if(b||C||I&&!R)return(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})});let T=w&&w.length;return(0,n.jsxs)(l.gCW,{alignItems:"left",gap:4,children:[R&&(0,n.jsx)(j,{color:"red",children:"There was a problem loading existing datasets, please try again."}),(0,n.jsxs)(l.gCW,{alignItems:"flex-start",children:[T&&(0,n.jsx)("div",{children:(0,n.jsx)(l.gCW,{alignSelf:"start",gap:4,children:(0,n.jsxs)(l.xuv,{"data-testid":"dataset-selector-section",children:[(0,n.jsx)(j,{mb:4,children:"Choose a dataset to associate with this connector."}),(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.WPr,{allowClear:!0,options:w.map(e=>({label:e.fides_key,value:e.fides_key})),className:"w-full",placeholder:"Select",onChange:e=>W(e),value:z,"data-testid":"dataset-selector"}),(0,n.jsx)(l.wpx,{onClick:q,type:"primary",className:"self-start",disabled:!F,"data-testid":"save-dataset-link-btn",children:"Save"})]})]})})}),T&&k&&(null==y?void 0:y.items)&&(0,n.jsx)(l.htM,{plain:!0,children:"or"}),k&&(null==y?void 0:y.items)&&(0,n.jsxs)(l.xuv,{"data-testid":"yaml-editor-section",children:[(0,n.jsx)(j,{mb:4,children:"View your dataset YAML below!"}),(0,n.jsx)(v,{data:y.items.map(e=>e.ctl_dataset),isSubmitting:p,onSubmit:E,disabled:F})]})]})]})}},27259:function(e,i,t){var n=t(24246),r=t(39941),s=t(34090);i.Z=e=>{let{disabled:i=!1,isRequired:t=!1,label:a,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[h,x]=(0,s.U$)(d);return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:t,isInvalid:!!(x.error&&x.touched),children:[a&&(0,n.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:a}),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,n.jsxs)(r.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(r.zuI,{...h,autoComplete:"off",autoFocus:u}),(0,n.jsxs)(r.FiK,{children:[(0,n.jsx)(r.WQu,{}),(0,n.jsx)(r.Y_d,{})]})]}),"text"===o&&(0,n.jsx)(r.IIB,{...h,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:i,placeholder:l,size:"sm"}),"textarea"===o&&(0,n.jsx)(r.gxH,{...h,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:h.value||""}),(0,n.jsx)(r.J1D,{children:x.error})]})]})}},67762:function(e,i,t){t.d(i,{h:function(){return s}});var n=t(24246),r=t(39941);t(27378);let s=e=>{let{isSubmitting:i=!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:i,isLoading:i,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})}},50881:function(e,i,t){t.d(i,{Z:function(){return y}});var n=t(24246),r=t(25010),s=t(96356),a=t(14207),l=t(39941),o=t(86677),d=t(27378),c=t(16134),u=t(77830),h=t(34090),x=t(55484),m=t(97181),p=t(57072),f=t(39864),g=t(27259),v=t(67762),j=e=>{let{data:i=[],isSubmitting:t=!1,onSaveClick:s}=e,{isLoading:a}=(0,p.MO)(),d=(0,c.C)(f.qb),j=(0,o.useRouter)(),{errorAlert:y}=(0,r.VY)(),b=()=>{j.push(u.JR)};return a?null:(0,n.jsx)(h.J9,{enableReinitialize:!0,initialValues:{fields:i.length>0?i:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,i)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){y("PII Field must be unique");return}s(e,i)},validateOnBlur:!1,validateOnChange:!1,validationSchema:x.Ry({fields:x.IX().of(x.Ry().shape({pii_field:x.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:x.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:x.IX(x.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(h.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(h.F2,{name:"fields",render:i=>{let{fields:r}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(l.xuv,{visibility:"hidden",children:(0,n.jsx)(l.lr0,{})})]}),(0,n.jsx)(l.xuv,{children:r&&r.length>0?r.map((e,t)=>(0,n.jsxs)(l.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{autoFocus:0===t,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(m.d,{name:"fields.".concat(t,".data_categories"),options:d.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>i.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{i.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(v.h,{isSubmitting:t,onCancelClick:b})]})}})})})})},y=()=>{let e=(0,d.useRef)(!1),i=(0,o.useRouter)(),{successAlert:t}=(0,r.VY)(),{handleError:h}=(0,r.HK)(),[x,m]=(0,d.useState)(!1),[p,f]=(0,d.useState)([]),{connection:g}=(0,c.C)(s.ZZ),{data:v,isFetching:y,isLoading:b,isSuccess:C}=(0,a.QV)(g.key),[k]=(0,a.jF)(),[_]=(0,a._d)(),S=async(e,n)=>{try{m(!0);let n={connection_key:null==g?void 0:g.key,body:{...e}};p.length>0?await _(n).unwrap():await k(n).unwrap(),t("DSR customization ".concat(p.length>0?"updated":"added","!")),i.push(u.JR)}catch(e){h(e)}finally{m(!1)}};return(0,d.useEffect)(()=>(e.current=!0,C&&v&&f(v.fields),()=>{e.current=!1}),[v,C]),(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",w:"572px",children:"Customize your PII fields to create a friendly label name for your privacy request packages. This “Package Label” is the label your user will see in their downloaded package."}),(y||b)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),e.current&&!b?(0,n.jsx)(j,{data:p,isSubmitting:x,onSaveClick:S}):null]})}},33335:function(e,i,t){t.d(i,{E:function(){return n}});let n=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4608],{77213:function(e,i,t){t.d(i,{Z:function(){return h}});var n=t(24246),r=t(96306),s=t(88038),a=t.n(s),l=t(86677);t(27378);var o=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,l.useRouter)();return(0,n.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(r.xuv,{children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(r.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:i,title:t,padded:s=!0,mainProps:c}=e,h=(0,o.hz)(),x=(0,l.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,p=!(h.flags.privacyRequestsConfiguration&&m),{data:f}=(0,d.JE)(void 0,{skip:p}),{data:g}=(0,d.PW)(void 0,{skip:p}),v=h.flags.privacyRequestsConfiguration&&(!f||!g)&&m;return(0,n.jsxs)(r.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,n.jsxs)(a(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,n.jsx)(u,{}):null,i]})]})}},97181:function(e,i,t){t.d(i,{d:function(){return d}});var n=t(24246),r=t(96306),s=t(34090),a=t(27378),l=t(46238),o=t(40324);let d=e=>{let{name:i,label:t,labelProps:d,tooltip:c,isRequired:u,layout:h="inline",helperText:x,...m}=e,[p,f,{setValue:g}]=(0,s.U$)(i),v=!!(f.touched&&f.error),[j,y]=(0,a.useState)("");p.value||"tags"!==m.mode&&"multiple"!==m.mode||(p.value=[]),"tags"===m.mode&&"string"==typeof p.value&&(p.value=[p.value]);let b="tags"===m.mode?(e,i)=>e?e.value!==j||p.value.includes(j)?m.optionRender?m.optionRender(e,i):e.label:'Create "'.concat(j,'"'):void 0:m.optionRender||void 0,C=e=>{y(e),m.onSearch&&m.onSearch(e)},k=(e,i)=>{g(e),m.onChange&&m.onChange(e,i)};return"inline"===h?(0,n.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(r.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,n.jsx)(o.__,{htmlFor:m.id||i,...d,children:t}):null,(0,n.jsxs)(r.jqI,{align:"center",children:[(0,n.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(r.WPr,{...p,id:m.id||i,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?C:void 0,onChange:k,value:p.value||void 0,status:v?"error":void 0}),x&&(0,n.jsx)(r.Q6r,{children:x}),(0,n.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]}),(0,n.jsx)(l.b,{label:c,className:v?"mt-2 self-start":void 0})]})]})}):(0,n.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(r.gCW,{alignItems:"start",children:[(0,n.jsxs)(r.jqI,{align:"center",children:[t?(0,n.jsx)(o.__,{htmlFor:m.id||i,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,n.jsx)(l.b,{label:c})]}),(0,n.jsx)(r.WPr,{...p,id:m.id||i,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?C:void 0,onChange:k,value:p.value||void 0,status:v?"error":void 0}),x&&(0,n.jsx)(r.Q6r,{style:{marginTop:0},children:x}),(0,n.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]})})}},46782:function(e,i,t){t.d(i,{j:function(){return s},l:function(){return a}});var n=t(30454),r=t.n(n);let s="#/definitions/FidesDatasetReference",a=e=>{let i=(e,i,t)=>{let n;return(void 0===i||""===i||void 0===i)&&(n="".concat(e," is required")),t===s&&((null==i?void 0:i.includes("."))?i.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},t=i=>{var t,n;return null!==(n=null==e?void 0:null===(t=e.required)||void 0===t?void 0:t.includes(i))&&void 0!==n&&n};return{validateField:i,isRequiredField:t,getFieldValidation:(e,n)=>{if(t(e))return e=>{var t;return i(n.title,e,null===(t=n.allOf)||void 0===t?void 0:t[0].$ref)}},preprocessValues:i=>{let t=r()(i);return e&&Object.keys(e.properties).forEach(i=>{var n,r;if((null===(n=e.properties[i].allOf)||void 0===n?void 0:n[0].$ref)===s){let e=null===(r=t.secrets[i])||void 0===r?void 0:r.split(".");e&&(t.secrets[i]={dataset:e.shift(),field:e.join("."),direction:"from"})}"WebsiteSchema"!==e.title||"URL"!==e.properties[i].title||t.secrets[i].startsWith("http://")||t.secrets[i].startsWith("https://")||(t.secrets[i]="https://".concat(t.secrets[i]))}),t}}}},39715:function(e,i,t){var n=t(24246),r=t(96306);t(27378),i.Z=e=>{let{isEmptyState:i,yamlError:t}=e;return(0,n.jsx)(r.Rg9,{in:!0,children:(0,n.jsxs)(r.xuv,{w:"fit-content",bg:"white",p:3,borderRadius:3,children:[(0,n.jsxs)(r.Ugi,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:"YAML"}),(0,n.jsx)(r.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(r.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(r.f9v,{}),i&&(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:"Yaml system is required"})]}),t&&(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:t.message}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:t.reason}),(0,n.jsxs)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:["Ln ",(0,n.jsx)("b",{children:t.mark.line}),", Col"," ",(0,n.jsx)("b",{children:t.mark.column}),", Pos"," ",(0,n.jsx)("b",{children:t.mark.position})]})]})]})})]})})}},41207:function(e,i,t){t.d(i,{F:function(){return a},M:function(){return s}});var n=t(76649),r=t(65218);let s=t.n(r)()(()=>t.e(7088).then(t.bind(t,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),a=e=>(0,n.Ln)({name:"string"},e)&&"YAMLException"===e.name},41337:function(e,i,t){var n=t(24246),r=t(96306);t(27378);var s=t(88337),a=t(16394),l=t(14746);let o=l.Ny+l.iW.get(s.R.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===s.R.WEBSITE,h=e=>(null==e?void 0:e.connection_type)===s.R.SAAS;i.Z=e=>{let{data:i,...t}=e;return(0,n.jsx)(r.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{var e,t;let n;if(c(i)&&i.encoded_icon)return"data:image/svg+xml;base64,".concat(i.encoded_icon);if(u(i)){let t=null===(e=i.secrets)||void 0===e?void 0:e.url;if(!t)return o;let n=(0,a.ge)(t);return(0,a.tl)(n,100)}if(d(i)){if(h(i)&&(null===(t=i.saas_config)||void 0===t?void 0:t.type)){let e=i.saas_config.type,t=l.LN.get(e);return t?l.Ny+t:l.Ny+l.iW.get(s.R.SAAS)}n=[...l.iW].find(e=>{let[t]=e;return i.connection_type.toString()===t.toString()})}else if(c(i)){let{identifier:e}=i;n=[...l.iW].find(i=>{let[t]=i;return t.toLowerCase()===e.toLowerCase()})}return n?l.Ny+n[1]:l.VD})(),fallbackSrc:u(i)?o:l.VD,alt:(()=>{if(d(i)){var e;return null!==(e=i.name)&&void 0!==e?e:i.key}return c(i)?i.human_readable:i})(),...t})}},1226:function(e,i,t){var n=t(24246);t(27378);var r=t(77213);i.Z=e=>{let{children:i}=e;return(0,n.jsx)(r.Z,{title:"Connections",children:i})}},11274:function(e,i,t){t.d(i,{s:function(){return E}});var n=t(24246),r=t(96356),s=t(96306),a=t(86677),l=t(27378),o=t(16134),d=t(77830),c=t(54682),u=t(75573),h=t(84306),x=t(14207),m=t(16125),p=t(33335),f=t(34090),g=t(46782),v=t(46238);let j=(e,i)=>{let t={...e};return Object.entries(i.properties).forEach(i=>{let[n,r]=i;if("integer"===r.type){let i=r.default?Number(r.default):e[n];t[n]=i||0}else{var s;let i=null!==(s=r.default)&&void 0!==s?s:e[n];t[n]=null!=i?i:null}}),t};var y=e=>{let{data:i,defaultValues:t,isSubmitting:a=!1,onSaveClick:d,onTestConnectionClick:h,testButtonLabel:m="Test integration"}=e,p=(0,l.useRef)(!1),{handleError:y}=(0,u.HK)(),{connection:b,connectionOption:C}=(0,o.C)(r.ZZ),[k,_]=(0,x.h2)(),S=e=>{let i;return(void 0===e||""===e)&&(i="Connection Identifier is required"),e&&(0,s.kEn)(e)&&(i="Connection Identifier must be an alphanumeric value"),i},w=(e,i,t)=>{let n;return(void 0===i||""===i)&&(n="".concat(e," is required")),t===g.j&&(i.includes(".")?i.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},I=(e,i)=>(0,n.jsx)(s.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:i}),R=e=>{var i;if((null===(i=e.allOf)||void 0===i?void 0:i[0].$ref)===g.j)return"Enter dataset.collection.field"},z=(e,t)=>{var r;return(0,n.jsx)(f.gN,{id:e,name:e,validate:(null!==(r=i.required)&&void 0!==r&&!!r.includes(e)||"integer"===t.type)&&(e=>{var i;return w(t.title,e,null===(i=t.allOf)||void 0===i?void 0:i[0].$ref)}),children:r=>{var a;let{field:l,form:o}=r;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:null===(a=i.required)||void 0===a?void 0:a.includes(e),isInvalid:o.errors[e]&&o.touched[e],children:[I(e,t.title),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:["integer"!==t.type&&(0,n.jsx)(s.IIB,{...l,value:l.value||"",placeholder:R(t),autoComplete:"off",color:"gray.700",size:"sm"}),"integer"===t.type&&(0,n.jsxs)(s.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(s.zuI,{...l,autoComplete:"off"}),(0,n.jsxs)(s.FiK,{children:[(0,n.jsx)(s.WQu,{}),(0,n.jsx)(s.Y_d,{})]})]}),(0,n.jsx)(s.J1D,{children:o.errors[e]})]}),(0,n.jsx)(s.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(v.b,{label:t.description})})]})}},e)},W=async()=>{try{await k(b.key).unwrap()}catch(e){y(e)}};return(0,l.useEffect)(()=>(p.current=!0,_.isSuccess&&h(_),()=>{p.current=!1}),[h,_]),(0,n.jsx)(f.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==b?void 0:b.key){var n,r;e.name=null!==(r=b.name)&&void 0!==r?r:"",e.description=b.description,e.instance_key=b.connection_type===c.Rj.SAAS?null===(n=b.saas_config)||void 0===n?void 0:n.fides_key:b.key}return j(e,i)})(),onSubmit:(e,t)=>{let n={...e};Object.keys(i.properties).forEach(t=>{var r;if((null===(r=i.properties[t].allOf)||void 0===r?void 0:r[0].$ref)===g.j){let i=e[t].split(".");n[t]={dataset:i.shift(),field:i.join("."),direction:"from"}}}),d(n,t)},validateOnBlur:!1,validateOnChange:!1,children:e=>(0,n.jsx)(f.l0,{noValidate:!0,children:(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(f.gN,{id:"name",name:"name",validate:e=>w("Name",e),children:i=>{let{field:t}=i;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.name&&e.touched.name,children:[I("name","Name"),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",mr:"6",children:[(0,n.jsx)(s.IIB,{...t,autoComplete:"off",autoFocus:!0,color:"gray.700",placeholder:"Enter a friendly name for your new ".concat(C.human_readable," connection"),size:"sm","data-testid":"input-name"}),(0,n.jsx)(s.J1D,{children:e.errors.name})]})]})}}),(0,n.jsx)(f.gN,{id:"description",name:"description",children:e=>{let{field:i}=e;return(0,n.jsxs)(s.NIc,{display:"flex",children:[I("description","Description"),(0,n.jsx)(s.gxH,{...i,color:"gray.700",placeholder:"Enter a description for your new ".concat(C.human_readable," connection"),resize:"none",size:"sm",value:i.value||"",mr:"6"})]})}}),(0,n.jsx)(f.gN,{id:"instance_key",name:"instance_key",validate:S,children:i=>{let{field:t}=i;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.instance_key&&e.touched.instance_key,children:[I("instance_key","Connection Identifier"),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(s.IIB,{...t,autoComplete:"off",color:"gray.700",isDisabled:!!(null==b?void 0:b.key),placeholder:"A unique identifier for your new ".concat(C.human_readable," connection"),size:"sm"}),(0,n.jsx)(s.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(s.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(v.b,{label:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this connection."})})]})}}),Object.entries(i.properties).map(e=>{let[i,t]=e;return"advanced_settings"===i?null:z(i,t)}),(0,n.jsxs)(s.kCb,{gap:2,children:[(0,n.jsx)(s.wpx,{disabled:!(null==b?void 0:b.key),loading:_.isLoading||_.isFetching,onClick:W,"data-testid":"test-connection-button",children:m}),(0,n.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:a,loading:a,children:"Save"})]})]})})})};let b=e=>{let{onConnectionCreated:i,data:t}=e,s=(0,m.I0)(),{errorAlert:a,successAlert:d}=(0,h.V)(),{handleError:f}=(0,u.HK)(),[g,v]=(0,l.useState)(!1),{connection:j,connectionOption:y}=(0,o.C)(r.ZZ),[b]=(0,x.pH)(),[C]=(0,x.Du)();return{isSubmitting:g,handleSubmit:async e=>{try{var l;v(!0);let o={access:c.uv.WRITE,connection_type:null==y?void 0:y.identifier,description:e.description,disabled:!1,key:(0,p.E)(e.instance_key),name:e.name},u=await b(o).unwrap();if((null===(l=u.failed)||void 0===l?void 0:l.length)>0)a(u.failed[0].message);else{let l={connection_key:u.succeeded[0].key,secrets:{}};Object.entries(t.properties).forEach(i=>{l.secrets[i[0]]=e[i[0]]});let o=await C(l).unwrap();"failed"===o.test_status?a((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",o.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",o.failure_reason]})):(s((0,r.lm)(u.succeeded[0])),d("Connector successfully ".concat((null==j?void 0:j.key)?"updated":"added","!")),(null==j?void 0:j.key)||!i||i())}}catch(e){f(e)}finally{v(!1)}},connectionOption:y}},C=e=>{let{data:i,onConnectionCreated:t,onTestConnectionClick:r}=e,{isSubmitting:a,handleSubmit:l,connectionOption:o}=b({onConnectionCreated:t,data:i});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",o.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(y,{data:i,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:a,onSaveClick:l,onTestConnectionClick:r})]})},k={description:"",instance_key:"",name:""},_=e=>{let{data:i,onConnectionCreated:t,onTestEmail:r}=e,{connectionOption:a,isSubmitting:l,handleSubmit:o}=b({onConnectionCreated:t,data:i});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Configure your ",a.human_readable," connector by providing the connector name, description and a test email address. Once you have saved the details, you can click test email to check the format of the email."]}),(0,n.jsx)(y,{data:i,defaultValues:k,isSubmitting:l,onSaveClick:e=>{o(e)},onTestConnectionClick:r,testButtonLabel:"Test email"})]})};var S=t(55484),w=t(27259),I=t(67762),R=e=>{let{defaultValues:i,isSubmitting:t=!1,onSaveClick:l}=e,c=(0,a.useRouter)(),{connection:u,connectionOption:h}=(0,o.C)(r.ZZ);return(0,n.jsx)(f.J9,{initialValues:(()=>{if(null==u?void 0:u.key){var e;i.name=null!==(e=u.name)&&void 0!==e?e:"",i.description=u.description}return i})(),onSubmit:(e,i)=>{l(e,i)},validateOnBlur:!1,validateOnChange:!1,validationSchema:S.Ry().shape({name:S.Z_().required("Name is required")}),children:(0,n.jsx)(f.l0,{noValidate:!0,children:(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(w.Z,{autoFocus:!0,disabled:!!(null==u?void 0:u.key),isRequired:!0,label:"Name",name:"name",placeholder:"Enter a friendly name for your new ".concat(h.human_readable," connection")}),(0,n.jsx)(w.Z,{label:"Description",name:"description",placeholder:"Enter a description for your new ".concat(h.human_readable," connection"),type:"textarea"}),(0,n.jsx)(I.h,{isSubmitting:t,onCancelClick:()=>{c.push(d.JR)}})]})})})};let z=e=>{let{onConnectionCreated:i}=e,t=(0,m.I0)(),{errorAlert:a,successAlert:d}=(0,h.V)(),{handleError:p}=(0,u.HK)(),[f,g]=(0,l.useState)(!1),{connection:v,connectionOption:j}=(0,o.C)(r.ZZ),[y]=(0,x.pH)(),b=async(e,n)=>{try{var s;g(!0);let n={access:c.uv.WRITE,connection_type:null==j?void 0:j.identifier,description:e.description,disabled:!1,name:e.name,key:null==v?void 0:v.key},l=await y(n).unwrap();(null===(s=l.failed)||void 0===s?void 0:s.length)>0?a(l.failed[0].message):(t((0,r.lm)(l.succeeded[0])),d("Connector successfully ".concat((null==v?void 0:v.key)?"updated":"added","!")),(null==v?void 0:v.key)||!i||i())}catch(e){p(e)}finally{g(!1)}};return(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",children:["To begin setting up your new ",j.human_readable," ","connector you must first assign a name to the connector and a description.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Once you have completed this section you can then progress onto"," ",(0,n.jsx)(s.xvT,{display:"inline-block",fontWeight:"700",children:"DSR customization"})," ","using the menu on the left hand side."]}),(0,n.jsx)(R,{defaultValues:{description:"",name:""},isSubmitting:f,onSaveClick:b})]})},W=e=>{let{data:i,onConnectionCreated:t,onTestConnectionClick:a}=e,d=(0,m.I0)(),{errorAlert:f,successAlert:g}=(0,h.V)(),{handleError:v}=(0,u.HK)(),[j,b]=(0,l.useState)(!1),{connection:C,connectionOption:k}=(0,o.C)(r.ZZ),[_]=(0,x.pL)(),[S]=(0,x.pH)(),[w]=(0,x.Du)(),I=async(e,s)=>{try{if(b(!0),C){var a;let t={access:c.uv.WRITE,connection_type:C.connection_type,description:e.description,disabled:!1,key:C.key,name:e.name},s=await S(t).unwrap();if((null===(a=s.failed)||void 0===a?void 0:a.length)>0)f(s.failed[0].message);else{d((0,r.lm)(s.succeeded[0]));let t={connection_key:C.key,secrets:{}};Object.entries(i.properties).forEach(i=>{t.secrets[i[0]]=e[i[0]]});let a=await w(t).unwrap();"failed"===a.test_status?f((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",a.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",a.failure_reason]})):g("Connector successfully updated!")}}else{let n={description:e.description,name:e.name,instance_key:(0,p.E)(e.instance_key),saas_connector_type:k.identifier,secrets:{}};Object.entries(i.properties).forEach(i=>{n.secrets[i[0]]=e[i[0]]});let s=await _(n).unwrap();d((0,r.lm)(s.connection)),g("Connector successfully added!"),null==t||t()}}catch(e){v(e)}finally{b(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",k.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(y,{data:i,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:j,onSaveClick:I,onTestConnectionClick:a})]})};var Z=t(16394);let q=e=>{var i,t;let{response:a}=e,{connectionOption:l}=(0,o.C)(r.ZZ);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{color:"gray.100"}),(0,n.jsxs)(s.gCW,{align:"flex-start",mt:"16px",children:[(null===(i=a.data)||void 0===i?void 0:i.test_status)==="succeeded"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsxs)(s.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Successfully connected to ",l.human_readable]}),(0,n.jsx)(s.Vp9,{colorScheme:"green",size:"sm",variant:"solid",children:"Success"})]}),(0,n.jsx)(s.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(a.fulfilledTimeStamp)}),(0,n.jsx)(s.xuv,{bg:"green.100",border:"1px solid",borderColor:"green.300",color:"green.700",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(s.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(s.StI,{}),(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"green.500",fontWeight:"semibold",size:"xs",children:"Success message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.msg})]})]})})]}),(null===(t=a.data)||void 0===t?void 0:t.test_status)==="failed"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsxs)(s.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Output error to ",l.human_readable]}),(0,n.jsx)(s.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(s.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(a.fulfilledTimeStamp)}),(0,n.jsx)(s.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(s.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(s.f9v,{}),(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.failure_reason}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.msg})]})]})})]})]})]})},E=e=>{let{onConnectionCreated:i}=e,t=(0,a.useRouter)(),{connectionOption:u}=(0,o.C)(r.ZZ),h=u&&u.type===c.Zi.MANUAL,{data:x,isFetching:m,isLoading:p,isSuccess:f}=(0,r.n3)(u.identifier,{skip:h}),[g,v]=(0,l.useState)(),j=e=>{v(e)},y=(0,l.useCallback)(()=>{t.push(d.JR)},[t]),b=(0,l.useCallback)(()=>{switch(null==u?void 0:u.type){case c.Zi.DATABASE:if(f&&x)return(0,n.jsx)(C,{data:x,onConnectionCreated:i,onTestConnectionClick:j});break;case c.Zi.MANUAL:return(0,n.jsx)(z,{onConnectionCreated:i});case c.Zi.SAAS:if(f&&x)return(0,n.jsx)(W,{data:x,onConnectionCreated:i,onTestConnectionClick:j});break;case c.Zi.EMAIL:if(f&&x)return(0,n.jsx)(_,{data:x,onConnectionCreated:y,onTestEmail:j})}},[null==u?void 0:u.type,x,f,i,y]);return(0,n.jsxs)(s.kCb,{gap:"97px",children:[(0,n.jsxs)(s.gCW,{w:"579px",gap:"16px",align:"stretch",children:[(m||p)&&(0,n.jsx)(s.M5Y,{children:(0,n.jsx)(s.$jN,{})}),b()]}),g&&(0,n.jsxs)(s.Rg9,{in:!0,children:[" ",(0,n.jsx)(s.xuv,{mt:"16px",maxW:"528px",w:"fit-content",children:(0,n.jsx)(q,{response:g})})]})]})}},38212:function(e,i,t){t.d(i,{Z:function(){return y}});var n=t(24246),r=t(75573),s=t(96356),a=t(14207),l=t(96306),o=t(86677),d=t(27378),c=t(16134),u=t(812),h=t(77830),x=t(41966),m=t(84306),p=t(66527),f=t(41207),g=t(39715),v=e=>{let{data:i=[],isSubmitting:t=!1,onSubmit:r,onCancel:s,disabled:a}=e,o=(0,d.useRef)(null),{errorAlert:c}=(0,m.V)(),u=i.length>0?p.ZP.dump(i):void 0,[h,v]=(0,d.useState)(void 0),[j,y]=(0,d.useState)(!1),[b,C]=(0,d.useState)(!u),k=(0,l.qY0)(),{data:_}=(0,x.LH)({minimal:!0}),[S,w]=(0,d.useState)([]),I=e=>{p.ZP.load(e,{json:!0}),v(void 0)},R=()=>{let e=o.current.getValue();r(p.ZP.load(e,{json:!0})),w([])};return(0,n.jsxs)(l.kCb,{gap:"97px",children:[(0,n.jsxs)(l.gCW,{align:"stretch",w:"800px",children:[(0,n.jsx)(f.M,{defaultLanguage:"yaml",defaultValue:u,height:"calc(100vh - 526px)",onChange:e=>{try{y(!0),I(e),C(!!(!e||""===e.trim()))}catch(e){(0,f.F)(e)?v(e):c("Could not parse the supplied YAML")}},onMount:(e,i)=>{o.current=e,o.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0},readOnly:a},theme:"light"}),(0,n.jsxs)(l.Ugi,{justifyContent:"flex-end",pr:6,children:[s&&(0,n.jsx)(l.wpx,{onClick:s,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",disabled:a||b||!!h||t,loading:t,onClick:()=>{if(_&&_.length){let e=o.current.getValue(),i=_.filter(i=>e.includes("fides_key: ".concat(i.fides_key,"\n"))).map(e=>e.fides_key);if(w(i),i.length){k.onOpen();return}}R()},htmlType:"submit","data-testid":"save-yaml-btn",children:"Save"})]})]}),j&&(b||h)&&(0,n.jsx)(g.Z,{isEmptyState:b,yamlError:h}),(0,n.jsx)(l.cVQ,{isOpen:k.isOpen,onClose:k.onClose,onConfirm:()=>{R(),k.onClose()},title:"Overwrite dataset",message:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xvT,{children:["You are about to overwrite the dataset",S.length>1?"s":""," ",S.map((e,i)=>{let t=i===S.length-1;return(0,n.jsxs)(d.Fragment,{children:[(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),t?".":", "]},e)})]}),(0,n.jsx)(l.xvT,{children:"Are you sure you would like to continue?"})]})})]})};let j=e=>{let{children:i,...t}=e;return(0,n.jsx)(l.xvT,{color:"gray.700",fontSize:"14px",...t,children:i})};var y=()=>{let e=(0,o.useRouter)(),{errorAlert:i,successAlert:t}=(0,r.VY)(),{handleError:m}=(0,r.HK)(),[p,f]=(0,d.useState)(!1),{connection:g}=(0,c.C)(s.ZZ),{data:y,isFetching:b,isLoading:C,isSuccess:k}=(0,a.Eg)(g.key),[_]=(0,a.Lz)(),[S]=(0,x.EG)(),{data:w,isLoading:I,error:R}=(0,x.LH)({minimal:!0}),[z,W]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{y&&y.items.length&&W(y.items[0].ctl_dataset.fides_key)},[y]);let Z=async n=>{var r;let s={connection_key:null==g?void 0:g.key,dataset_pairs:n},a=await _(s).unwrap();(null===(r=a.failed)||void 0===r?void 0:r.length)>0?i(a.failed[0].message):t("Dataset successfully updated!"),e.push(h.JR)},q=async()=>{if(z)try{let e=z;y&&y.items.length&&(e=y.items[0].fides_key);let i=[{fides_key:e,ctl_dataset_fides_key:z}];Z(i)}catch(e){m(e)}},E=async e=>{try{f(!0);let t=Array.isArray(e)?e:[e],n=await S(t);if((0,u.D4)(n)){let e=(0,u.e$)(n.error);i(e);return}let r=t.map(e=>({fides_key:e.fides_key,ctl_dataset_fides_key:e.fides_key}));if(y&&y.items.length){let{items:e}=y;r=e.map((e,i)=>({fides_key:e.fides_key,ctl_dataset_fides_key:t[i].fides_key}))}Z(r)}catch(e){m(e)}finally{f(!1)}},F=""!==z&&void 0!==z;if(b||C||I&&!R)return(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})});let T=w&&w.length;return(0,n.jsxs)(l.gCW,{alignItems:"left",gap:4,children:[R&&(0,n.jsx)(j,{color:"red",children:"There was a problem loading existing datasets, please try again."}),(0,n.jsxs)(l.gCW,{alignItems:"flex-start",children:[T&&(0,n.jsx)("div",{children:(0,n.jsx)(l.gCW,{alignSelf:"start",gap:4,children:(0,n.jsxs)(l.xuv,{"data-testid":"dataset-selector-section",children:[(0,n.jsx)(j,{mb:4,children:"Choose a dataset to associate with this connector."}),(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.WPr,{allowClear:!0,options:w.map(e=>({label:e.fides_key,value:e.fides_key})),className:"w-full",placeholder:"Select",onChange:e=>W(e),value:z,"data-testid":"dataset-selector"}),(0,n.jsx)(l.wpx,{onClick:q,type:"primary",className:"self-start",disabled:!F,"data-testid":"save-dataset-link-btn",children:"Save"})]})]})})}),T&&k&&(null==y?void 0:y.items)&&(0,n.jsx)(l.htM,{plain:!0,children:"or"}),k&&(null==y?void 0:y.items)&&(0,n.jsxs)(l.xuv,{"data-testid":"yaml-editor-section",children:[(0,n.jsx)(j,{mb:4,children:"View your dataset YAML below!"}),(0,n.jsx)(v,{data:y.items.map(e=>e.ctl_dataset),isSubmitting:p,onSubmit:E,disabled:F})]})]})]})}},27259:function(e,i,t){var n=t(24246),r=t(96306),s=t(34090);i.Z=e=>{let{disabled:i=!1,isRequired:t=!1,label:a,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[h,x]=(0,s.U$)(d);return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:t,isInvalid:!!(x.error&&x.touched),children:[a&&(0,n.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:a}),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,n.jsxs)(r.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(r.zuI,{...h,autoComplete:"off",autoFocus:u}),(0,n.jsxs)(r.FiK,{children:[(0,n.jsx)(r.WQu,{}),(0,n.jsx)(r.Y_d,{})]})]}),"text"===o&&(0,n.jsx)(r.IIB,{...h,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:i,placeholder:l,size:"sm"}),"textarea"===o&&(0,n.jsx)(r.gxH,{...h,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:h.value||""}),(0,n.jsx)(r.J1D,{children:x.error})]})]})}},67762:function(e,i,t){t.d(i,{h:function(){return s}});var n=t(24246),r=t(96306);t(27378);let s=e=>{let{isSubmitting:i=!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:i,isLoading:i,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})}},50881:function(e,i,t){t.d(i,{Z:function(){return y}});var n=t(24246),r=t(75573),s=t(96356),a=t(14207),l=t(96306),o=t(86677),d=t(27378),c=t(16134),u=t(77830),h=t(34090),x=t(55484),m=t(97181),p=t(57072),f=t(39864),g=t(27259),v=t(67762),j=e=>{let{data:i=[],isSubmitting:t=!1,onSaveClick:s}=e,{isLoading:a}=(0,p.MO)(),d=(0,c.C)(f.qb),j=(0,o.useRouter)(),{errorAlert:y}=(0,r.VY)(),b=()=>{j.push(u.JR)};return a?null:(0,n.jsx)(h.J9,{enableReinitialize:!0,initialValues:{fields:i.length>0?i:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,i)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){y("PII Field must be unique");return}s(e,i)},validateOnBlur:!1,validateOnChange:!1,validationSchema:x.Ry({fields:x.IX().of(x.Ry().shape({pii_field:x.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:x.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:x.IX(x.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(h.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(h.F2,{name:"fields",render:i=>{let{fields:r}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(l.xuv,{visibility:"hidden",children:(0,n.jsx)(l.lr0,{})})]}),(0,n.jsx)(l.xuv,{children:r&&r.length>0?r.map((e,t)=>(0,n.jsxs)(l.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{autoFocus:0===t,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(m.d,{name:"fields.".concat(t,".data_categories"),options:d.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>i.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{i.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(v.h,{isSubmitting:t,onCancelClick:b})]})}})})})})},y=()=>{let e=(0,d.useRef)(!1),i=(0,o.useRouter)(),{successAlert:t}=(0,r.VY)(),{handleError:h}=(0,r.HK)(),[x,m]=(0,d.useState)(!1),[p,f]=(0,d.useState)([]),{connection:g}=(0,c.C)(s.ZZ),{data:v,isFetching:y,isLoading:b,isSuccess:C}=(0,a.QV)(g.key),[k]=(0,a.jF)(),[_]=(0,a._d)(),S=async(e,n)=>{try{m(!0);let n={connection_key:null==g?void 0:g.key,body:{...e}};p.length>0?await _(n).unwrap():await k(n).unwrap(),t("DSR customization ".concat(p.length>0?"updated":"added","!")),i.push(u.JR)}catch(e){h(e)}finally{m(!1)}};return(0,d.useEffect)(()=>(e.current=!0,C&&v&&f(v.fields),()=>{e.current=!1}),[v,C]),(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",w:"572px",children:"Customize your PII fields to create a friendly label name for your privacy request packages. This “Package Label” is the label your user will see in their downloaded package."}),(y||b)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),e.current&&!b?(0,n.jsx)(j,{data:p,isSubmitting:x,onSaveClick:S}):null]})}},33335:function(e,i,t){t.d(i,{E:function(){return n}});let n=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")}}]);
|