ethyca-fides 2.69.1b0__py2.py3-none-any.whl → 2.69.1b2__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.69.1b0.dist-info → ethyca_fides-2.69.1b2.dist-info}/METADATA +1 -1
- {ethyca_fides-2.69.1b0.dist-info → ethyca_fides-2.69.1b2.dist-info}/RECORD +226 -224
- fides/_version.py +3 -3
- fides/api/api/v1/endpoints/dsr_package_link.py +5 -3
- fides/api/api/v1/endpoints/oauth_endpoints.py +1 -1
- fides/api/api/v1/endpoints/privacy_request_endpoints.py +3 -5
- fides/api/api/v1/endpoints/user_endpoints.py +1 -24
- fides/api/app_setup.py +16 -2
- fides/api/main.py +22 -0
- fides/api/models/client.py +5 -9
- fides/api/models/fides_user.py +2 -1
- fides/api/oauth/utils.py +11 -27
- fides/api/service/privacy_request/request_service.py +19 -2
- fides/api/service/storage/storage_uploader_service.py +1 -21
- fides/api/service/storage/streaming/dsr_storage.py +1 -5
- fides/api/service/storage/streaming/s3/s3_storage_client.py +78 -40
- fides/api/service/storage/streaming/s3/streaming_s3.py +9 -21
- fides/api/service/storage/streaming/smart_open_client.py +8 -7
- fides/api/service/storage/streaming/smart_open_streaming_storage.py +4 -28
- fides/api/service/storage/streaming/storage_client_factory.py +7 -3
- fides/api/task/graph_runners.py +2 -32
- fides/api/task/graph_task.py +4 -2
- fides/api/task/scheduler_utils.py +39 -0
- fides/api/util/endpoint_utils.py +0 -13
- fides/api/util/rate_limit.py +194 -0
- fides/config/execution_settings.py +0 -4
- fides/config/redis_settings.py +27 -3
- fides/config/security_settings.py +24 -6
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/0agWtBSaxTBxQfxPA99Ra/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{1345-04e37a66c0d40dc1.js → 1345-5e1c5b66e25c566e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3729-f5f2976904dce90d.js → 3729-a1ca1608efc11ac4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3847-2c0126e6eb54c526.js → 3847-230bf61b053bc706.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3855-9dd54ded74f4036b.js → 3855-ef5194cdb228beb6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/4121-c8d5d717e31899e1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4164-355644b916ae0094.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{4608-d101417a3abb4ad6.js → 4608-23bbd4c3c4a59f42.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4786-7aafb744445445b2.js → 4786-0827aae7aceadd22.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4808-357ca7ea7bbd24c6.js → 4808-78ca630f2d2503cd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4844-707b20a6c4b127cc.js → 4844-46324c3d848b8b6a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9046-058a4d8f0b5e08f9.js → 9046-712156d461165f56.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9676.b7d5d1d90b9da224.js → 9676.9fd9552ef744c717.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9951-b954027a046ce553.js → 9951-a88367a129b724ba.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-f18537fd2c4288e7.js → _app-ef8e1c986bc5b795.js} +2 -2
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-20253dd047fb9736.js → manual-9dc7e70ab5b05723.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-169099ff7b305cf5.js → add-systems-1632a59203fe8eab.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-28b192e2c074b0f3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-adc500a03e239857.js → [resourceUrn]-da1a48336daff6f8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-c8b3d090e4ba60d3.js → [resourceUrn]-470da05db63767cd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-cfb0b1200bc1a2c9.js → [systemId]-2f0a33ef9ba1f1da.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-fed8b879c13c2bf3.js → [monitorId]-e9d4f25b20ff6781.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-58a110542d6bcd0f.js → activity-b6ae7adb8ef0b525.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-22eec362dfbb1d2a.js → [resourceUrn]-c3a97e6721ca0abe.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-4decce5ef996e563.js → detection-a0a7de552ef71f5b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-01acdd1ad492fd89.js → [resourceUrn]-109754fec0755339.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-85fdbf4cde60d910.js → discovery-88654783b06b3b21.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-60e27b673c68bd27.js → datamap-89136e6800dc9369.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-2c7b1213b6604d30.js → new-97f06e21580f1f6a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-7ed3f05700dc397b.js → [id]-6f77d8647fca71e0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-95f6d64f84fc6bf3.js → new-821dd1269834cfa2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-3a4cd3fe9094fba3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-0f12d5b658c98c9f.js → integrations-57e618d7b16ac69a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-b379873a5771e55b.js → [id]-0d0bb9eb004a3336.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-a9bb257906dcd7e0.js → messaging-f9320a58f489f5b7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-de0036c74b78e9b7.js → storage-d0cfa8aeddd43a40.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-91f578139548652c.js → privacy-requests-5a5edc8a4aa7c30a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-83019a6753e14857.js → datamap-6903f42a0412bfa6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-e5331508e81222fc.js → consent-be47008304106395.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-74f0fe9656f4a1f6.js → custom-fields-ae1b57589da7b175.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-e91da49c0681a300.js → [id]-5a43f108d8047d5b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-78c3a5200d362cff.js → taxonomy-1b3f2d4bcb0e164d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{webpack-b5eb3e1da37616d2.js → webpack-678e89d68dbcd94f.js} +1 -1
- fides/ui-build/static/admin/_next/static/css/650df9c348000a26.css +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/poc/ant-components.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
- fides/ui-build/static/admin/poc/forms.html +1 -1
- fides/ui-build/static/admin/poc/table-migration.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/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/4lPKe7mco0KEv09aOQH9A/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4121-bb71a24d41d04a28.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/768-7eac4b30d7477b0a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-60e3394c887f3d5e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-3d24c1510aa4c555.js +0 -1
- fides/ui-build/static/admin/_next/static/css/abf2e162b1cd0e61.css +0 -1
- {ethyca_fides-2.69.1b0.dist-info → ethyca_fides-2.69.1b2.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.69.1b0.dist-info → ethyca_fides-2.69.1b2.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.69.1b0.dist-info → ethyca_fides-2.69.1b2.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.69.1b0.dist-info → ethyca_fides-2.69.1b2.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{4lPKe7mco0KEv09aOQH9A → 0agWtBSaxTBxQfxPA99Ra}/_ssgManifest.js +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1099-c34f76b4da5f3d15.js → 1099-79646e64f26d62fa.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1817-e6934e258111a961.js → 1817-3d9e110e007853f0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2921-0696287bb8de1f0b.js → 2921-52328140bc420d0f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3620-8c0ee3d0b19c342d.js → 3620-31ebb43dba84cbbd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3872-72ea3eb040366277.js → 3872-a91143aa35fa8ef8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3923-c4f2b03706ddbe39.js → 3923-bb2417b8dcade7a4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{401-959a15ed18a8abdf.js → 401-4af0a912e249d30f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5258-1a8b9f66b97761fc.js → 5258-e880b606a2293803.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5487-fd9724519f31caff.js → 5487-8c635883dcaa9c2a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{549-d3bef0990071230c.js → 549-38ea1d91ee2addaa.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6084-487d27d017c45e05.js → 6084-0096d7de64ef8015.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6853-f7ab74e30abbdeaf.js → 6853-b17673391117c976.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6954-b0a7b8ac6db238f8.js → 6954-9d46e2276c461c26.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{7476-9a57db910472b48e.js → 7476-d1b0af9ade392e5b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{7630-46807321449479c7.js → 7630-da0a7ce4e3a0d62c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{787-79e8e558bd80ece6.js → 787-3499983fa346b380.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{79-3e5047415bee9391.js → 79-f197fc4db8d530e5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{796-fb2af44165f37ecc.js → 796-db1e30119ea973c7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8002-c1f66179adabece8.js → 8002-971e29181f72edd1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9826-0d9a7f61c08ed88a.js → 9826-b0b3d3cfb13bfbc1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{404-9c9efb820bb6b432.js → 404-471a6b18e712f050.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-caadc3c0e86a7bfe.js → multiple-4b79a1652297ed9a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-acefb9e08c6c4082.js → add-vendors-1ca9df7ca91bd101.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-558fbb1667473abb.js → configure-07bdbc9ae4137db4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-b1ff1c9683841815.js → [id]-f80cf2d3966816fd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-674906d2d9a0a3a6.js → privacy-experience-2795cd4115a77c94.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-5b7aa7971f070513.js → [id]-e02921dc82dccbb1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-285958a12a66575e.js → new-98f9e4ba3610628a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-dc56bbdb6dd7a670.js → privacy-notices-17ed82777810d1c6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-0843757f00eeaaec.js → properties-226efa1dcd41437f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-5cba58ebecb4511f.js → consent-09610b10923d9268.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-0f90cac9f190130c.js → [projectUrn]-d8e776f1e64e4ba8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-f9117645c941342c.js → projects-75b9629b0d9cdf96.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-c566640eecc6f3fe.js → data-catalog-6984c033b8fe3a13.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-991659e916ad60b1.js → action-center-9c428d3ef0985915.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-3f4ba87513e030a2.js → [...subfieldNames]-8f58192dcb54883d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-a6cd31103deba465.js → [collectionName]-dcb4ab380a77aa1e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-491d2c8dd559d0cb.js → [datasetId]-6f16d43071fb9c11.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-c8bcd568d3b0ee7f.js → dataset-674bb3940f088ecc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-9a33a412a5f36960.js → datastore-connection-23e4caf79faa8106.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{index-1299410f671fac23.js → index-23eb64eed81dcb69.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-ba232c4b17576ccb.js → [id]-c9a323eb6a929476.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-b97883026fbc5b1e.js → add-template-b9bb09e46921a590.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-38189c1058aa4acf.js → messaging-82c631a12b5a008c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-3119bdb3811409bf.js → ant-components-bc0e2adf6e0d3ac7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-8f9d0434dc3eb8cf.js → AntForm-86ffcc1ad3fa912e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-a14e51c7f22f3395.js → FormikAntFormItem-ec04f595465bdf69.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-a40645b57822684d.js → FormikControlled-41d309754ff0c1de.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-c55df6527b700701.js → FormikField-cab1f78cec7808f9.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-292d761616b162a0.js → forms-eb6058221403b156.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-135bcf384b81820a.js → table-migration-38360083348c3d6c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-70efccbe0732786b.js → configure-72ca94ec5ed85733.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-63c6f0193634add5.js → [id]-5ec775c4904fdbfe.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-e76567f0374d5912.js → add-property-a6812c0916f2949e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-2050b7dac0413c11.js → properties-da734840e4f9d04b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/{alpha-913f8eab62460f31.js → alpha-3e72e9f91991c119.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-2ed1ee6017c0656a.js → about-6aab092f4871cecb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-bffd6292e7e0302a.js → [purpose_id]-9495e2eb506606c7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-a649ca07ce51b0fe.js → domain-records-23a6d7a921150188.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-eb675ba600cea2a8.js → domains-2a9e8859ab4d9de6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-4db2f42f90867890.js → email-templates-4f9f0fdf9925ae90.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-89b404989b4ea21c.js → locations-46f7af35cee4a8bb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-eb1ecff37fd85c72.js → organization-a596a96cb8d0aa8e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-07d883b5aaec58f2.js → regulations-6ed5fc2410e00857.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-61ecb7546830c345.js → test-datasets-86811e3cda277e77.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{systems-44d714017dd87e62.js → systems-045a841e22e85ea8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-4f9001870e2b3aff.js → [id]-05d61c80a556b2d5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-583a7f0c1bead240.js → user-management-2cab41659f1ee7da.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53748:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return t(96236)}])},59301:function(e,i,t){"use strict";var n=t(24246);let{Link:r}=t(96306).AntTypography;i.Z=e=>(0,n.jsx)(r,{target:"_blank",rel:"noopener noreferrer",...e})},56358:function(e,i,t){"use strict";t.d(i,{q:function(){return r}});var n=t(24246);let r=(0,t(96306).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,n.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return p}});var n=t(24246),r=t(96306),s=t(88038),l=t.n(s),o=t(86677);t(27378);var a=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,o.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."," "]})]})})},p=e=>{let{children:i,title:t,padded:s=!0,mainProps:c}=e,p=(0,a.hz)(),h=(0,o.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,g=!(p.flags.privacyRequestsConfiguration&&x),{data:b}=(0,d.JE)(void 0,{skip:g}),{data:v}=(0,d.PW)(void 0,{skip:g}),m=p.flags.privacyRequestsConfiguration&&(!b||!v)&&x;return(0,n.jsxs)(r.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{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:[m?(0,n.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var n=t(24246),r=t(96306),s=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:l=!0,children:o,rightContent:a,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof i?(0,n.jsx)(r.lQT,{className:t||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!t&&(0,n.jsx)(s.m,{className:o?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,i,t){"use strict";t.d(i,{Tg:function(){return l}});var n=t(24246),r=t(16134),s=t(31793);let l=e=>(0,r.C)(s.uu).filter(i=>e.includes(i)).length>0;i.ZP=e=>{let{scopes:i,children:t}=e;return l(i)?(0,n.jsx)(n.Fragment,{children:t}):null}},8133:function(e,i,t){"use strict";var n=t(24246),r=t(96306);i.Z=e=>{let{title:i,children:t,isOpen:s,onClose:l,modalContentProps:o,showCloseButton:a=!1,footer:d,...c}=e;return(0,n.jsxs)(r.u_l,{isOpen:s,onClose:l,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...o,children:[a&&(0,n.jsx)(r.olH,{}),(0,n.jsx)(r.xBx,{p:0,children:(0,n.jsx)(r.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,n.jsx)(r.X6q,{as:"h3",size:"sm",children:i})})}),(0,n.jsx)(r.fef,{pb:4,overflow:"auto",children:t}),d&&(0,n.jsx)(r.mzw,{children:d})]})]})}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return d}});var n=t(24246),r=t(96306),s=t(79894),l=t.n(s),o=t(27378);let{Text:a}=r.AntTypography,d=e=>{let{items:i,...t}=e,s=(0,o.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let s=t===i.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(a,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,id:s?"breadcrumb-current-page":void 0,children:o.title})),d)?o.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,n.jsx)(l(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[i]);return(0,n.jsx)(r.zrq,{items:s,...t})}},6675:function(e,i,t){"use strict";t.d(i,{ZS:function(){return o},a4:function(){return s}});var n=t(3228);let r=t(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:s}=r,l={purposes:{},special_purposes:{}},o=(0,n.P1)(r.endpoints.getPurposes.select(),e=>{let{data:i}=e;return i||l})},51263:function(e,i,t){"use strict";var n=t(24246),r=t(96306);i.Z=e=>{let{title:i,children:t,...s}=e;return(0,n.jsxs)(r.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(i),...s,children:[(0,n.jsx)(r.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:i}),t]})}},59512:function(e,i,t){"use strict";t.d(i,{Cu:function(){return o},Py:function(){return r},fj:function(){return l},uh:function(){return s}});var n=t(54682);let r=[1,3,4,5,6],s="https://ethyca.com/docs/tutorials/consent-management/consent-management-configuration/configure-tcf#vendor-overrides",l={[n.FF.PURPOSE_RESTRICTION]:"Purpose restriction",[n.FF.REQUIRE_CONSENT]:"Require consent",[n.FF.REQUIRE_LEGITIMATE_INTEREST]:"Require legitimate interest"},o={[n.PY.RESTRICT_ALL_VENDORS]:"Restrict all vendors",[n.PY.RESTRICT_SPECIFIC_VENDORS]:"Restrict specific vendors",[n.PY.ALLOW_SPECIFIC_VENDORS]:"Allow specific vendors"}},60325:function(e,i,t){"use strict";t.d(i,{DD:function(){return o},Go:function(){return a},TK:function(){return r},Uv:function(){return c},k1:function(){return s},y3:function(){return u}});var n=t(54682);let r=e=>{var i;return null!==(i=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==i?i:[]},s=e=>{var i;return null!==(i=null==e?void 0:e.filter(e=>e.selected))&&void 0!==i?i:[]},l=[{language:n.eU.EN,is_default:!0,title:"Title",description:"Description",accept_button_label:"Accept",reject_button_label:"Reject",save_button_label:"Save",acknowledge_button_label:"OK",privacy_preferences_link_label:"Privacy Preferences"}],o={name:"",disabled:!1,dismissable:!0,allow_language_selection:!1,show_layer1_notices:!1,layer1_button_options:n.Of.OPT_IN_OPT_OUT,regions:[],translations:l,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0},a=(e,i)=>{let t=i.find(i=>i.id===e.language);return t?t.name:e.language},d=e=>{var i,t,n,r,s,l,o,a,d;let{language:c,is_default:u,accept_button_label:p,reject_button_label:h}=e;return{language:c,is_default:u,accept_button_label:p,reject_button_label:h,title:e.title,description:e.description,acknowledge_button_label:null!==(i=e.acknowledge_button_label)&&void 0!==i?i:void 0,banner_title:null!==(t=e.banner_title)&&void 0!==t?t:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(r=e.purpose_header)&&void 0!==r?r:void 0,privacy_policy_link_label:null!==(s=e.privacy_policy_link_label)&&void 0!==s?s:void 0,privacy_policy_url:null!==(l=e.privacy_policy_url)&&void 0!==l?l:void 0,privacy_preferences_link_label:null!==(o=e.privacy_preferences_link_label)&&void 0!==o?o:void 0,save_button_label:null!==(a=e.save_button_label)&&void 0!==a?a:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},c=e=>{let{created_at:i,updated_at:t,privacy_notices:n,origin:r,id:s,...l}=e;return{...l,privacy_notice_ids:n?n.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>d(e)):[]}},u=e=>e===n.re.PRIVACY_CENTER?{title:{included:!0,required:!0},description:{included:!0,required:!0},save_button_label:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},modal_link_label:{included:!0}}:e===n.re.MODAL?{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0},modal_link_label:{included:!0}}:e===n.re.BANNER_AND_MODAL?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:e===n.re.TCF_OVERLAY?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},purpose_header:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}},96236:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return J}});var n=t(24246),r=t(96306),s=t(34090),l=t(27378),o=t(16134),a=t(25980),d=t(812),c=t(77213),u=t(58754),p=t(6675),h=t(46628),x=t(7426),g=t(40324);let b=e=>{let{children:i,purpose:t,endCol:s}=e;return(0,n.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderRight:s?"solid 1px":"unset",borderColor:"gray.200",height:"100%",minWidth:"36px",children:[1,3,4,5,6].includes(t)?null:(0,n.jsx)(r.xuv,{children:i})})};var v=()=>{let{values:e,setFieldValue:i}=(0,s.u6)(),{purposes:t}=(0,o.C)(p.ZS);return(0,n.jsx)(s.F2,{name:"purposeOverrides",render:()=>(0,n.jsxs)(r.kCb,{flexDirection:"column",minWidth:"944px",children:[(0,n.jsxs)(r.kCb,{width:"100%",border:"solid 1px",borderColor:"gray.200",backgroundColor:"gray.50",height:"36px",children:[(0,n.jsx)(r.kCb,{width:"600px",pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:"TCF purpose"}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",minWidth:"36px",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Allowed"})}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Consent"})}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Legitimate interest"})})]}),e.purposeOverrides.map((s,l)=>(0,n.jsxs)(r.kCb,{width:"100%",height:"36px",alignItems:"center",borderBottom:"solid 1px",borderColor:"gray.200",backgroundColor:"#fff",children:[(0,n.jsxs)(r.kCb,{width:"600px",borderLeft:"solid 1px",borderColor:"gray.200",p:0,alignItems:"center",height:"100%",pl:"4",fontSize:"xs",fontWeight:"normal",lineHeight:"4",children:["Purpose ",s.purpose,": ",t[s.purpose].name]}),(0,n.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderColor:"gray.200",height:"100%",children:(0,n.jsx)(r.xuv,{children:(0,n.jsx)(g.w8,{name:"purposeOverrides[".concat(l,"].is_included"),onChange:e=>{e||(i("purposeOverrides[".concat(l,"].is_consent"),!1),i("purposeOverrides[".concat(l,"].is_legitimate_interest"),!1))}})})}),(0,n.jsx)(b,{purpose:s.purpose,children:(0,n.jsx)(g.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_legitimate_interest,name:"purposeOverrides[".concat(l,"].is_consent")})}),(0,n.jsx)(b,{purpose:s.purpose,endCol:!0,children:(0,n.jsx)(g.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_consent,name:"purposeOverrides[".concat(l,"].is_legitimate_interest")})})]},s.purpose))]})})},m=t(59301),_=e=>{let{name:i,enabled:t}=e;return(0,n.jsxs)(r.Kqy,{spacing:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:[(0,n.jsxs)(r.xvT,{children:[i," status"," ",t?(0,n.jsx)(r.j8w,{color:"success",children:"Enabled"}):(0,n.jsx)(r.j8w,{color:"error",children:"Disabled"})]}),(0,n.jsxs)(r.xvT,{children:["To ",t?"disable":"enable"," ",i,", please contact your Fides administrator or"," ",(0,n.jsx)(m.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},f=t(46238),j=e=>{var i,t;let{label:l,options:o,layout:a,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,s.U$)(c),h={...u,value:null!==(i=u.value)&&void 0!==i?i:""},x=!!(p.touched&&p.error),b=d?o[0]:void 0,v=null!==(t=o.find(e=>e.value===h.value))&&void 0!==t?t:b,m=e=>{h.onChange(c.name)(e.target.value)};return"stacked"===a?(0,n.jsxs)(r.NIc,{isInvalid:x,children:[(0,n.jsxs)(r.jqI,{className:"w-fit",children:[l?(0,n.jsx)(g.__,{children:l}):null,(0,n.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{className:"flex-col gap-3",children:o.map(e=>{let{value:i,label:t,tooltip:s}=e;return(0,n.jsx)(r.y02,{value:i,"data-testid":"option-".concat(i),children:(0,n.jsxs)(r.jqI,{className:"items-center gap-2",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:t}),s?(0,n.jsx)(f.b,{label:s}):null]})},i)})})})]}),(0,n.jsx)(g.Bc,{isInvalid:x,message:p.error,fieldName:h.name})]}):(0,n.jsxs)(r.NIc,{isInvalid:x,children:[(0,n.jsxs)(r.rjZ,{templateColumns:"1fr 3fr",children:[(0,n.jsx)(g.__,{children:l}),(0,n.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{children:o.map(e=>(0,n.jsx)(r.y02,{value:e.value,"data-testid":"option-".concat(e.value),children:e.label},e.value))})})]}),(0,n.jsx)(g.Bc,{isInvalid:x,message:p.error,fieldName:h.name})]})},y=t(54682),C=t(51263);let w=e=>{let{title:i,children:t}=e;return(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(i),children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:i}),t]})};var T=()=>{let{tcf:e}=(0,a.hz)(),i=!!(0,o.C)(x.D2).enabled,{values:t,setFieldValue:l}=(0,s.u6)(),d=!!t.gpp.us_approach;return(0,n.jsx)(C.Z,{title:"Global Privacy Platform",children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[(0,n.jsx)(_,{name:"GPP",enabled:i}),i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{title:"GPP U.S.",children:(0,n.jsx)(j,{name:"gpp.us_approach",layout:"stacked",defaultFirstSelected:!1,options:[{label:"Enable U.S. National",value:y.en.NATIONAL,tooltip:"When US National is selected, Fides will present the same privacy notices to all consumers located anywhere in the United States."},{label:"Enable U.S. State-by-State",value:y.en.STATE,tooltip:"When state-by-state is selected, Fides will only present consent to consumers and save their preferences if they are located in a state that is supported by the GPP. The consent options presented to consumers will vary depending on the regulations in each state."},{label:"Enable US National and State-by-State notices",value:y.en.ALL,tooltip:"When enabled, Fides can be configured to serve the National and U.S. state notices. This mode is intended to provide consent coverage to U.S. states with new privacy laws where GPP support lags behind the effective date of state laws."}]})}),d?(0,n.jsxs)(w,{title:"MSPA",children:[(0,n.jsx)(g.Xl,{name:"gpp.mspa_covered_transactions",label:"All transactions covered by MSPA",tooltip:"When selected, the Fides CMP will communicate to downstream vendors that all preferences are covered under the MSPA.",onChange:e=>{e||(l("gpp.mspa_service_provider_mode",!1),l("gpp.mspa_opt_out_option_mode",!1))}}),(0,n.jsx)(g.w8,{label:"Enable MSPA service provider mode",name:"gpp.mspa_service_provider_mode",variant:"switchFirst",tooltip:"Enable service provider mode if you do not engage in any sales or sharing of personal information.",isDisabled:!!t.gpp.mspa_opt_out_option_mode||!t.gpp.mspa_covered_transactions}),(0,n.jsx)(g.w8,{label:"Enable MSPA opt-out option mode",name:"gpp.mspa_opt_out_option_mode",variant:"switchFirst",tooltip:"Enable opt-out option mode if you engage or may engage in the sales or sharing of personal information, or process any information for the purpose of targeted advertising.",isDisabled:!!t.gpp.mspa_service_provider_mode||!t.gpp.mspa_covered_transactions})]}):null]}):null,e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.izJ,{color:"gray.200"}),(0,n.jsxs)(w,{title:"GPP Europe",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:"Configure TCF string for Global Privacy Platform"}),(0,n.jsx)(g.w8,{label:"Enable TC string",name:"gpp.enable_tcfeu_string",variant:"switchFirst",tooltip:"When enabled, the GPP API will include a TCF EU consent string for users who are in regions where TCF applies."})]})]}):null]})})},S=t(64781),k=t(60325),q=()=>{var e,i,t;let{tcf:l}=(0,a.hz)(),{values:o,setFieldValue:d}=(0,s.u6)(),{data:c,isLoading:u}=(0,S.gT)(),p=[...(0,k.k1)(null!==(i=null==c?void 0:c.locations)&&void 0!==i?i:[]),...(0,k.k1)(null!==(t=null==c?void 0:c.location_groups)&&void 0!==t?t:[])].sort((e,i)=>e.name<i.name?-1:1);return l?(0,n.jsxs)(C.Z,{title:"Publisher settings",children:[(0,n.jsx)(r.AntTypography.Paragraph,{className:"mb-3",children:"Specify the country in which your organization operates for TCF compliance. This setting will determine the 'Publisher Country Code ' transmitted in the Transparency and Consent (TC) Data."}),(0,n.jsx)(r.PPS.Item,{label:"Publisher country",htmlFor:"publisher_country_code",children:(0,n.jsx)(r.AOh,{"data-testid":"input-publisher_settings.publisher_country_code",id:"publisher_country_code",loading:u,allowClear:!0,options:(0,r.Ky_)(null==p?void 0:p.map(e=>e.id)),placeholder:"Select a country",value:null===(e=o.tcfPublisherSettings.publisher_country_code)||void 0===e?void 0:e.replace("_","-").toUpperCase(),onChange:e=>d("tcfPublisherSettings.publisher_country_code",null==e?void 0:e.toLowerCase()),className:"w-80"})})]}):null},I=t(52955),N=t(71795),E=t(59512),P=t(55484),O=t(8133),R=t(31883);let F=P.Ry().shape({name:P.Z_().required().label("Name")}),L=e=>{let{isOpen:i,onClose:t,onSuccess:l}=e,o=(0,r.pmc)(),[a]=(0,I.LK)(),c=async e=>{let i=await a({name:e.name});(0,R.D4)(i)?o((0,h.Vo)((0,d.e$)(i.error))):(o((0,h.t5)("Successfully created TCF configuration")),null==l||l(i.data.id),t())};return(0,n.jsx)(O.Z,{title:"Create a new TCF configuration",isOpen:i,onClose:t,children:(0,n.jsx)(s.J9,{initialValues:{name:""},onSubmit:c,validationSchema:F,children:e=>{let{isValid:i,dirty:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",className:"w-full",children:[(0,n.jsx)(r.xvT,{children:"TCF configurations allow you to define unique sets of publisher restrictions. These configurations can be added to privacy experiences."}),(0,n.jsx)(g.j0,{id:"name",name:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsxs)(r.vyj,{className:"w-full justify-end pt-6",children:[(0,n.jsx)(r.wpx,{onClick:t,children:"Cancel"}),(0,n.jsx)(r.wpx,{type:"primary",htmlType:"submit",disabled:!i||!l,"data-testid":"save-config-button",children:"Save"})]})]})})}})})};var A=t(79894),z=t.n(A);let W=e=>{let{width:i,style:t,borderLeft:s=!1,borderRight:l=!1,...o}=e;return(0,n.jsx)(r.jqI,{align:"center",className:"h-full px-4",...o,style:{borderLeft:s?"solid 1px":"none",borderRight:l?"solid 1px":"none",borderColor:"var(--ant-color-border)",width:i,...t},role:"cell"})},Z=e=>{let{width:i,style:t,borderLeft:s=!1,children:l,...o}=e;return(0,n.jsx)(r.jqI,{align:"center",role:"columnheader",className:"px-4",...o,style:{borderLeft:s?"solid 1px":"none",borderColor:"var(--ant-color-border)",fontWeight:500,whiteSpace:"nowrap",width:i,...t},children:l})},D=e=>{let{isHeader:i=!1,isLastRow:t=!1,style:s,...l}=e;return(0,n.jsx)(r.jqI,{role:i?"rowheader":"row",className:"h-9 w-full",...l,style:{backgroundColor:i?"var(--fidesui-bg-default)":void 0,borderBottom:t?"none":"solid 1px",borderColor:"var(--ant-color-border)",...s}})},M=e=>{let{config:i,isLoading:t,style:s,...l}=e,{purposes:a}=(0,o.C)(p.ZS);return(0,n.jsxs)(r.jqI,{vertical:!0,...l,style:{maxWidth:"1200px",border:"solid 1px",borderColor:"var(--ant-color-border)",backgroundColor:"var(--ant-color-bg-base)",fontSize:"12px",...s},"aria-label":"Publisher restrictions table",role:"table","data-testid":"publisher-restrictions-table",children:[(0,n.jsxs)(D,{isHeader:!0,style:{width:"100%"},children:[(0,n.jsx)(Z,{width:"600px",children:"TCF purpose"}),(0,n.jsxs)(Z,{flex:1,gap:3,borderLeft:!0,children:["Restrictions",(0,n.jsx)(f.b,{label:"Restrictions control how vendors are permitted to process data for specific purposes. Fides supports three restriction types: Purpose Restriction to completely disallow data processing for a purpose, Require Consent to allow processing only with explicit user consent, and Require Legitimate Interest to allow processing based on legitimate business interest unless the user objects."})]}),(0,n.jsxs)(Z,{width:"100px",gap:3,borderLeft:!0,children:["Flexible",(0,n.jsx)(f.b,{label:'Indicates whether the legal basis for this purpose can be overridden by publisher restrictions. If marked "No," the purpose has a fixed legal basis defined by the TCF and cannot be changed.'})]}),(0,n.jsx)(Z,{width:"100px",borderLeft:!0,children:"Actions"})]}),Object.values(a).map((e,s)=>(0,n.jsxs)(D,{isLastRow:s===Object.values(a).length-1,children:[(0,n.jsxs)(W,{width:"600px",children:["Purpose ",e.id,": ",e.name]}),(0,n.jsx)(W,{flex:1,borderLeft:!0,"data-testid":"restriction-type-cell-".concat(e.id),children:t?(0,n.jsx)(r.OdW,{height:"16px",width:"100%"}):(()=>{var t;let s=(null==i?void 0:null===(t=i.restriction_types_per_purpose)||void 0===t?void 0:t[e.id])||[];return 0===s.length?"none":1===s.length?(0,n.jsx)(r.xvT,{size:"sm",whiteSpace:"nowrap",children:E.fj[s[0]]}):(0,n.jsxs)(r.xvT,{children:[s.length," restrictions"]})})()}),(0,n.jsx)(W,{width:"100px",borderLeft:!0,children:E.Py.includes(e.id)?(0,n.jsx)(r.j8w,{color:"error","data-testid":"flexibility-tag-".concat(e.id),children:"No"}):(0,n.jsx)(r.j8w,{color:"success","data-testid":"flexibility-tag-".concat(e.id),children:"Yes"})}),(0,n.jsx)(W,{width:"100px",borderLeft:!0,children:(0,n.jsx)(z(),{href:"/settings/consent/".concat(null==i?void 0:i.id,"/").concat(e.id),passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(r.wpx,{size:"small","data-testid":"edit-restriction-btn-".concat(e.id),children:"Edit"})})})]},e.id))]})};var V=t(56358),H=t(19904);let U=()=>(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"})]}),B=e=>{let{searchResults:i,selectedConfigId:t,handleSelection:s,userCanDeleteConfigs:l,onDeleteOpen:o,setConfigToDelete:a}=e;return(0,n.jsx)(r.y02.Group,{onChange:e=>s(e.target.value),value:t,className:"flex flex-col gap-2",children:i.map(e=>(0,n.jsxs)(r.jqI,{className:l?"justify-between":"justify-start","data-testid":"tcf-config-item-".concat(e.id),children:[(0,n.jsx)(r.y02,{value:e.id,name:"tcf-config-id","data-testid":"tcf-config-item",children:(0,n.jsx)(r.xvT,{className:"text-sm",children:e.name})}),l&&(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:(0,n.jsx)(V.q,{fontSize:16}),onClick:i=>{i.stopPropagation(),a(e),o()},"data-testid":"delete-config-button"})]},e.id))})},G=e=>{let i,{searchTerm:t,setSearchTerm:s,searchResults:o,selectedConfigId:a,handleSelection:d,userCanCreateConfigs:c,userCanDeleteConfigs:u,modalOnOpen:p,onDeleteOpen:h,setConfigToDelete:x,isLoading:g,setDropdownOpen:b,configurations:v}=e,[m,_]=(0,l.useState)(a);return(0,l.useEffect)(()=>{_(a)},[a]),i=g?(0,n.jsx)(U,{}):0===o.length?(0,n.jsx)(r.xvT,{className:"text-center",children:"No configurations found."}):(0,n.jsx)(B,{searchResults:o,selectedConfigId:m,handleSelection:e=>{_(e)},userCanDeleteConfigs:u,onDeleteOpen:h,setConfigToDelete:x}),(0,n.jsxs)(r.V4A,{title:"TCF configurations",className:"min-w-[300px]",extra:(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:(0,n.jsx)(r.Two,{}),onClick:()=>b(!1),"data-testid":"close-config-dropdown"}),style:{boxShadow:"var(--ant-box-shadow)"},children:[v.length>10&&(0,n.jsx)(r.BZy,{size:"sm",children:(0,n.jsx)(r.uFc,{className:"mb-4",placeholder:"Search...",onChange:e=>s(e.target.value),value:t})}),i,(0,n.jsxs)(r.jqI,{gap:"small",className:"mt-4",children:[c&&(0,n.jsx)(r.wpx,{size:"small",onClick:()=>{p(),b(!1)},className:"flex-1","data-testid":"create-config-button",children:"+ Create"}),(0,n.jsx)(r.wpx,{size:"small",onClick:()=>d(m),className:"flex-1","data-testid":"apply-config-button",disabled:m===a,children:"Apply"})]})]})},$=e=>(0,n.jsx)(G,{...e}),K=e=>{var i;let{selectedConfigId:t,configurations:s,isLoading:o=!1,onConfigurationSelect:a,onConfigurationDelete:c}=e,u=(0,H.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),p=(0,H.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),h=(0,r.pmc)({id:"tcf-config-toast"}),[x]=(0,I.Cm)(),{isOpen:g,onOpen:b,onClose:v}=(0,r.qY0)(),{isOpen:m,onOpen:_,onClose:f}=(0,r.qY0)(),[j,C]=(0,l.useState)(""),[w,T]=(0,l.useState)(),[S,k]=(0,l.useState)(!1),q=(0,l.useMemo)(()=>j?s.filter(e=>e.name.toLowerCase().includes(j.toLowerCase())):s,[s,j]),N=(0,l.useMemo)(()=>s.find(e=>e.id===t),[s,t]),E=null!==(i=null==N?void 0:N.name)&&void 0!==i?i:"Select Configuration",P=e=>{a(e),k(!1)},O=async e=>{try{await x(e).unwrap(),null==c||c(e),T(void 0),f(),h({status:"success",description:'Configuration "'.concat(null==w?void 0:w.name,'" was successfully deleted.')})}catch(e){h({status:"error",description:(0,d.e$)(e,"A problem occurred while deleting the configuration.")})}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.S0p,{open:S,onOpenChange:k,trigger:["click"],overlayStyle:{zIndex:999},dropdownRender:()=>$({searchTerm:j,setSearchTerm:C,searchResults:q,selectedConfigId:t,handleSelection:P,userCanCreateConfigs:u,userCanDeleteConfigs:p,modalOnOpen:b,onDeleteOpen:_,setConfigToDelete:T,isLoading:o,setDropdownOpen:k,configurations:s}),children:(0,n.jsx)(r.wpx,{icon:(0,n.jsx)(r.v4q,{}),iconPosition:"end","data-testid":"tcf-config-dropdown-trigger",children:E})}),(0,n.jsx)(L,{isOpen:g,onClose:v,onSuccess:e=>{a(e)}}),(0,n.jsx)(r.cVQ,{isOpen:m,onClose:()=>{T(void 0),f()},onConfirm:()=>{w&&O(w.id)},title:"Delete configuration",message:"Are you sure you want to delete this configuration? This action cannot be undone."})]})};var Y=t(32885);let X=e=>{let{defaultChecked:i,onChange:t,...s}=e,o=(0,r.pmc)(),[a,c]=(0,l.useState)(i),[u,p]=(0,l.useState)(!1),{isLoading:g}=(0,Y.x8)(),[b,{isLoading:v}]=(0,x.L)(),[m]=(0,Y.M7)(),{data:_}=(0,Y.n3)(void 0,{skip:g}),j=async e=>{let i=await b({consent:{override_vendor_purposes:e}});e&&_&&await m(_.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(i=>{if(o.closeAll(),null==t||t(e),(0,R.D4)(i)){let e=(0,d.e$)(i.error,"An unexpected error occurred while saving vendor override settings. Please try again.");null==t||t(!1),o((0,h.Vo)(e))}})(i)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(r.xvT,{children:"Configure overrides for TCF related purposes."}),(0,n.jsxs)(r.vyj,{size:"small",children:[(0,n.jsx)(r.rAg,{size:"small",disabled:v,loading:v,...s,checked:a,defaultChecked:i,onClick:e=>{e?(c(e),j(e)):p(!0)},"data-testid":"tcf-override-toggle"}),(0,n.jsx)(r.xvT,{children:"Override vendor purposes"}),(0,n.jsx)(f.b,{label:"Toggle on if you want to globally change any flexible legal bases or remove TCF purposes from your CMP"})]})]}),(0,n.jsx)(r.cVQ,{isOpen:u,onClose:()=>p(!1),onConfirm:()=>{c(!1),j(!1),p(!1)},title:"Disable Vendor Overrides",message:"Are you sure you want to disable vendor overrides? Clicking 'Continue' will immediately remove any custom configurations you have set for TCF purposes for all experiences."})]})},Q=e=>{var i;let{isTCFOverrideEnabled:t}=e,[s,o]=(0,l.useState)(t),[a,d]=(0,l.useState)(!1),[c,u]=(0,N._)("selectedTCFConfigId",null),{data:p,isLoading:h}=(0,I.LS)({page:1,size:50},{skip:!t}),{data:x,isFetching:g}=(0,I.NZ)(c||"",{skip:!c});return(0,l.useEffect)(()=>{var e,i;!h&&(null==p?void 0:null===(e=p.items)||void 0===e?void 0:e.length)&&!c&&u(p.items[0].id),h||!c||(null==p?void 0:null===(i=p.items)||void 0===i?void 0:i.length)||u(null)},[h,null==p?void 0:p.items,c,u]),(0,n.jsxs)(C.Z,{title:"Publisher restrictions",fontSize:"sm",children:[(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",style:{width:"100%"},children:[(0,n.jsx)(X,{defaultChecked:s,onChange:e=>o(e)}),s&&(0,n.jsxs)(n.Fragment,{children:[h&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.OdW,{height:"20px"}),(0,n.jsx)(r.OdW,{height:"20px"}),(0,n.jsx)(r.OdW,{height:"32px",width:"200px"})]}),!h&&(null==p?void 0:null===(i=p.items)||void 0===i?void 0:i.length)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activities."}),(0,n.jsxs)(r.xvT,{children:["To configure this section, select a TCF purpose to edit the restriction type and vendors."," ",(0,n.jsx)(m.Z,{href:E.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)(K,{selectedConfigId:c||"",configurations:(null==p?void 0:p.items)||[],onConfigurationSelect:u})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xvT,{children:['To define custom publisher restrictions select "create configuration" below.'," ",(0,n.jsx)(m.Z,{href:E.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)(r.wpx,{onClick:()=>d(!0),"data-testid":"create-config-button",children:"Create configuration +"})]})]})]}),(0,n.jsx)(L,{isOpen:a,onClose:()=>d(!1),onSuccess:e=>{u(e)}}),s&&c&&(0,n.jsx)(M,{className:"mt-3",config:x,isLoading:g})]})};var J=()=>{var e,i;let{isLoading:t}=(0,Y.x8)(),{tcf:g}=(0,a.hz)(),{data:b,isLoading:m}=(0,Y.n3)(void 0,{skip:t||!g}),[f,{isLoading:j}]=(0,Y.M7)(),{data:w,isLoading:S}=(0,x.tB)({api_set:!0}),{data:k,isLoading:I}=(0,x.tB)({api_set:!1}),[N]=(0,x.L)(),E=(0,o.C)(x.D2),P=(0,o.C)(x.Yh),O=(0,l.useMemo)(()=>w&&(null==w?void 0:w.consent)&&"override_vendor_purposes"in w.consent?w.consent.override_vendor_purposes:!!k&&null!=k&&!!k.consent&&"override_vendor_purposes"in k.consent&&k.consent.override_vendor_purposes,[w,k]),{isLoading:R}=(0,p.a4)(),F=(0,r.pmc)(),L=async e=>{var i;let t=e=>{if(F.closeAll(),(0,d.D4)(e)){let i=(0,d.e$)(e.error,"An unexpected error occurred while saving. Please try again.");F((0,h.Vo)(i))}else F((0,h.t5)("Settings saved successfully"))},n=[...e.purposeOverrides.map(e=>{let i;return e.is_consent&&(i=y.I$.CONSENT),e.is_legitimate_interest&&(i=y.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:i}})];if(O){let e=await f(n);if((0,d.D4)(e)){t(e);return}}let{enabled:r,...s}=e.gpp;t(await N({gpp:s,plus_consent_settings:{tcf_publisher_country_code:null!==(i=e.tcfPublisherSettings.publisher_country_code)&&void 0!==i?i:null}}))},A=(0,l.useMemo)(()=>({purposeOverrides:b?b.map(e=>({purpose:e.purpose,is_included:e.is_included,is_consent:e.required_legal_basis===y.I$.CONSENT,is_legitimate_interest:e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS})):[],gpp:E,tcfPublisherSettings:{publisher_country_code:P.tcf_publisher_country_code}}),[b,E,P]),z=(0,l.useMemo)(()=>(null==b?void 0:b.some(e=>!e.is_included||e.required_legal_basis===y.I$.CONSENT||e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS))||!1,[b]),W=null===(i=(0,a.hz)())||void 0===i?void 0:null===(e=i.flags)||void 0===e?void 0:e.publisherRestrictions;return(0,n.jsx)(c.Z,{title:"Consent Configuration",children:t||R||m||S||I?(0,n.jsx)(r.kCb,{justifyContent:"center",alignItems:"center",height:"100%",children:(0,n.jsx)(r.$jN,{})}):(0,n.jsxs)(r.xuv,{"data-testid":"consent-configuration",children:[(0,n.jsx)(u.Z,{heading:"Consent settings"}),(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,children:[(0,n.jsx)(C.Z,{title:"Transparency & Consent Framework settings",children:(0,n.jsx)(_,{name:"TCF",enabled:g})}),g&&!z&&W&&(0,n.jsx)(Q,{isTCFOverrideEnabled:O})]}),(0,n.jsx)(s.J9,{initialValues:A,enableReinitialize:!0,onSubmit:L,children:e=>{let{dirty:i,isValid:t,isSubmitting:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[g&&(z||!W)&&(0,n.jsxs)(C.Z,{title:"Vendor overrides",fontSize:"sm",children:[(0,n.jsx)(X,{defaultChecked:O,disabled:j}),O&&(0,n.jsxs)(r.Kqy,{mt:2,spacing:2,children:[(0,n.jsx)(r.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activites."}),(0,n.jsx)(r.xvT,{children:"To configure this section, select the purposes you allow and where available, the appropriate legal bases (either Consent or Legitimate Interest)."}),(0,n.jsx)(v,{})]})]}),(0,n.jsx)(q,{}),(0,n.jsx)(T,{}),(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,loading:l,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},31883:function(e,i,t){"use strict";t.d(i,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=t(19043)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=53748)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53748:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return t(96236)}])},59301:function(e,i,t){"use strict";var n=t(24246);let{Link:r}=t(96306).AntTypography;i.Z=e=>(0,n.jsx)(r,{target:"_blank",rel:"noopener noreferrer",...e})},56358:function(e,i,t){"use strict";t.d(i,{q:function(){return r}});var n=t(24246);let r=(0,t(96306).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,n.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return p}});var n=t(24246),r=t(96306),s=t(88038),l=t.n(s),o=t(86677);t(27378);var a=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,o.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."," "]})]})})},p=e=>{let{children:i,title:t,padded:s=!0,mainProps:c}=e,p=(0,a.hz)(),h=(0,o.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,g=!(p.flags.privacyRequestsConfiguration&&x),{data:b}=(0,d.JE)(void 0,{skip:g}),{data:v}=(0,d.PW)(void 0,{skip:g}),m=p.flags.privacyRequestsConfiguration&&(!b||!v)&&x;return(0,n.jsxs)(r.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{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:[m?(0,n.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var n=t(24246),r=t(96306),s=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:l=!0,children:o,rightContent:a,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof i?(0,n.jsx)(r.lQT,{className:t||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!t&&(0,n.jsx)(s.m,{className:o?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,i,t){"use strict";t.d(i,{Tg:function(){return l}});var n=t(24246),r=t(16134),s=t(31793);let l=e=>(0,r.C)(s.uu).filter(i=>e.includes(i)).length>0;i.ZP=e=>{let{scopes:i,children:t}=e;return l(i)?(0,n.jsx)(n.Fragment,{children:t}):null}},8133:function(e,i,t){"use strict";var n=t(24246),r=t(96306);i.Z=e=>{let{title:i,children:t,isOpen:s,onClose:l,modalContentProps:o,showCloseButton:a=!1,footer:d,...c}=e;return(0,n.jsxs)(r.u_l,{isOpen:s,onClose:l,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...o,children:[a&&(0,n.jsx)(r.olH,{}),(0,n.jsx)(r.xBx,{p:0,children:(0,n.jsx)(r.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,n.jsx)(r.X6q,{as:"h3",size:"sm",children:i})})}),(0,n.jsx)(r.fef,{pb:4,overflow:"auto",children:t}),d&&(0,n.jsx)(r.mzw,{children:d})]})]})}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return d}});var n=t(24246),r=t(96306),s=t(79894),l=t.n(s),o=t(27378);let{Text:a}=r.AntTypography,d=e=>{let{items:i,...t}=e,s=(0,o.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let s=t===i.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(a,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,id:s?"breadcrumb-current-page":void 0,children:o.title})),d)?o.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,n.jsx)(l(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[i]);return(0,n.jsx)(r.zrq,{items:s,...t})}},6675:function(e,i,t){"use strict";t.d(i,{ZS:function(){return o},a4:function(){return s}});var n=t(3228);let r=t(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:s}=r,l={purposes:{},special_purposes:{}},o=(0,n.P1)(r.endpoints.getPurposes.select(),e=>{let{data:i}=e;return i||l})},51263:function(e,i,t){"use strict";var n=t(24246),r=t(96306);i.Z=e=>{let{title:i,children:t,...s}=e;return(0,n.jsxs)(r.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(i),...s,children:[(0,n.jsx)(r.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:i}),t]})}},59512:function(e,i,t){"use strict";t.d(i,{Cu:function(){return o},Py:function(){return r},fj:function(){return l},uh:function(){return s}});var n=t(54682);let r=[1,3,4,5,6],s="https://ethyca.com/docs/tutorials/consent-management/consent-management-configuration/configure-tcf#vendor-overrides",l={[n.FF.PURPOSE_RESTRICTION]:"Purpose restriction",[n.FF.REQUIRE_CONSENT]:"Require consent",[n.FF.REQUIRE_LEGITIMATE_INTEREST]:"Require legitimate interest"},o={[n.PY.RESTRICT_ALL_VENDORS]:"Restrict all vendors",[n.PY.RESTRICT_SPECIFIC_VENDORS]:"Restrict specific vendors",[n.PY.ALLOW_SPECIFIC_VENDORS]:"Allow specific vendors"}},60325:function(e,i,t){"use strict";t.d(i,{DD:function(){return o},Go:function(){return a},TK:function(){return r},Uv:function(){return c},k1:function(){return s},y3:function(){return u}});var n=t(54682);let r=e=>{var i;return null!==(i=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==i?i:[]},s=e=>{var i;return null!==(i=null==e?void 0:e.filter(e=>e.selected))&&void 0!==i?i:[]},l=[{language:n.eU.EN,is_default:!0,title:"Title",description:"Description",accept_button_label:"Accept",reject_button_label:"Reject",save_button_label:"Save",acknowledge_button_label:"OK",privacy_preferences_link_label:"Privacy Preferences"}],o={name:"",disabled:!1,dismissable:!0,allow_language_selection:!1,show_layer1_notices:!1,layer1_button_options:n.Of.OPT_IN_OPT_OUT,regions:[],translations:l,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0},a=(e,i)=>{let t=i.find(i=>i.id===e.language);return t?t.name:e.language},d=e=>{var i,t,n,r,s,l,o,a,d;let{language:c,is_default:u,accept_button_label:p,reject_button_label:h}=e;return{language:c,is_default:u,accept_button_label:p,reject_button_label:h,title:e.title,description:e.description,acknowledge_button_label:null!==(i=e.acknowledge_button_label)&&void 0!==i?i:void 0,banner_title:null!==(t=e.banner_title)&&void 0!==t?t:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(r=e.purpose_header)&&void 0!==r?r:void 0,privacy_policy_link_label:null!==(s=e.privacy_policy_link_label)&&void 0!==s?s:void 0,privacy_policy_url:null!==(l=e.privacy_policy_url)&&void 0!==l?l:void 0,privacy_preferences_link_label:null!==(o=e.privacy_preferences_link_label)&&void 0!==o?o:void 0,save_button_label:null!==(a=e.save_button_label)&&void 0!==a?a:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},c=e=>{let{created_at:i,updated_at:t,privacy_notices:n,origin:r,id:s,...l}=e;return{...l,privacy_notice_ids:n?n.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>d(e)):[]}},u=e=>e===n.re.PRIVACY_CENTER?{title:{included:!0,required:!0},description:{included:!0,required:!0},save_button_label:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},modal_link_label:{included:!0}}:e===n.re.MODAL?{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0},modal_link_label:{included:!0}}:e===n.re.BANNER_AND_MODAL?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:e===n.re.TCF_OVERLAY?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},purpose_header:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}},96236:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return J}});var n=t(24246),r=t(96306),s=t(34090),l=t(27378),o=t(16134),a=t(25980),d=t(812),c=t(77213),u=t(58754),p=t(6675),h=t(46628),x=t(7426),g=t(40324);let b=e=>{let{children:i,purpose:t,endCol:s}=e;return(0,n.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderRight:s?"solid 1px":"unset",borderColor:"gray.200",height:"100%",minWidth:"36px",children:[1,3,4,5,6].includes(t)?null:(0,n.jsx)(r.xuv,{children:i})})};var v=()=>{let{values:e,setFieldValue:i}=(0,s.u6)(),{purposes:t}=(0,o.C)(p.ZS);return(0,n.jsx)(s.F2,{name:"purposeOverrides",render:()=>(0,n.jsxs)(r.kCb,{flexDirection:"column",minWidth:"944px",children:[(0,n.jsxs)(r.kCb,{width:"100%",border:"solid 1px",borderColor:"gray.200",backgroundColor:"gray.50",height:"36px",children:[(0,n.jsx)(r.kCb,{width:"600px",pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:"TCF purpose"}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",minWidth:"36px",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Allowed"})}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Consent"})}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Legitimate interest"})})]}),e.purposeOverrides.map((s,l)=>(0,n.jsxs)(r.kCb,{width:"100%",height:"36px",alignItems:"center",borderBottom:"solid 1px",borderColor:"gray.200",backgroundColor:"#fff",children:[(0,n.jsxs)(r.kCb,{width:"600px",borderLeft:"solid 1px",borderColor:"gray.200",p:0,alignItems:"center",height:"100%",pl:"4",fontSize:"xs",fontWeight:"normal",lineHeight:"4",children:["Purpose ",s.purpose,": ",t[s.purpose].name]}),(0,n.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderColor:"gray.200",height:"100%",children:(0,n.jsx)(r.xuv,{children:(0,n.jsx)(g.w8,{name:"purposeOverrides[".concat(l,"].is_included"),onChange:e=>{e||(i("purposeOverrides[".concat(l,"].is_consent"),!1),i("purposeOverrides[".concat(l,"].is_legitimate_interest"),!1))}})})}),(0,n.jsx)(b,{purpose:s.purpose,children:(0,n.jsx)(g.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_legitimate_interest,name:"purposeOverrides[".concat(l,"].is_consent")})}),(0,n.jsx)(b,{purpose:s.purpose,endCol:!0,children:(0,n.jsx)(g.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_consent,name:"purposeOverrides[".concat(l,"].is_legitimate_interest")})})]},s.purpose))]})})},m=t(59301),_=e=>{let{name:i,enabled:t}=e;return(0,n.jsxs)(r.Kqy,{spacing:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:[(0,n.jsxs)(r.xvT,{children:[i," status"," ",t?(0,n.jsx)(r.j8w,{color:"success",children:"Enabled"}):(0,n.jsx)(r.j8w,{color:"error",children:"Disabled"})]}),(0,n.jsxs)(r.xvT,{children:["To ",t?"disable":"enable"," ",i,", please contact your Fides administrator or"," ",(0,n.jsx)(m.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},f=t(46238),j=e=>{var i,t;let{label:l,options:o,layout:a,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,s.U$)(c),h={...u,value:null!==(i=u.value)&&void 0!==i?i:""},x=!!(p.touched&&p.error),b=d?o[0]:void 0,v=null!==(t=o.find(e=>e.value===h.value))&&void 0!==t?t:b,m=e=>{h.onChange(c.name)(e.target.value)};return"stacked"===a?(0,n.jsxs)(r.NIc,{isInvalid:x,children:[(0,n.jsxs)(r.jqI,{className:"w-fit",children:[l?(0,n.jsx)(g.__,{children:l}):null,(0,n.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{className:"flex-col gap-3",children:o.map(e=>{let{value:i,label:t,tooltip:s}=e;return(0,n.jsx)(r.y02,{value:i,"data-testid":"option-".concat(i),children:(0,n.jsxs)(r.jqI,{className:"items-center gap-2",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:t}),s?(0,n.jsx)(f.b,{label:s}):null]})},i)})})})]}),(0,n.jsx)(g.Bc,{isInvalid:x,message:p.error,fieldName:h.name})]}):(0,n.jsxs)(r.NIc,{isInvalid:x,children:[(0,n.jsxs)(r.rjZ,{templateColumns:"1fr 3fr",children:[(0,n.jsx)(g.__,{children:l}),(0,n.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{children:o.map(e=>(0,n.jsx)(r.y02,{value:e.value,"data-testid":"option-".concat(e.value),children:e.label},e.value))})})]}),(0,n.jsx)(g.Bc,{isInvalid:x,message:p.error,fieldName:h.name})]})},y=t(54682),C=t(51263);let w=e=>{let{title:i,children:t}=e;return(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(i),children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:i}),t]})};var T=()=>{let{tcf:e}=(0,a.hz)(),i=!!(0,o.C)(x.D2).enabled,{values:t,setFieldValue:l}=(0,s.u6)(),d=!!t.gpp.us_approach;return(0,n.jsx)(C.Z,{title:"Global Privacy Platform",children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[(0,n.jsx)(_,{name:"GPP",enabled:i}),i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{title:"GPP U.S.",children:(0,n.jsx)(j,{name:"gpp.us_approach",layout:"stacked",defaultFirstSelected:!1,options:[{label:"Enable U.S. National",value:y.en.NATIONAL,tooltip:"When US National is selected, Fides will present the same privacy notices to all consumers located anywhere in the United States."},{label:"Enable U.S. State-by-State",value:y.en.STATE,tooltip:"When state-by-state is selected, Fides will only present consent to consumers and save their preferences if they are located in a state that is supported by the GPP. The consent options presented to consumers will vary depending on the regulations in each state."},{label:"Enable US National and State-by-State notices",value:y.en.ALL,tooltip:"When enabled, Fides can be configured to serve the National and U.S. state notices. This mode is intended to provide consent coverage to U.S. states with new privacy laws where GPP support lags behind the effective date of state laws."}]})}),d?(0,n.jsxs)(w,{title:"MSPA",children:[(0,n.jsx)(g.Xl,{name:"gpp.mspa_covered_transactions",label:"All transactions covered by MSPA",tooltip:"When selected, the Fides CMP will communicate to downstream vendors that all preferences are covered under the MSPA.",onChange:e=>{e||(l("gpp.mspa_service_provider_mode",!1),l("gpp.mspa_opt_out_option_mode",!1))}}),(0,n.jsx)(g.w8,{label:"Enable MSPA service provider mode",name:"gpp.mspa_service_provider_mode",variant:"switchFirst",tooltip:"Enable service provider mode if you do not engage in any sales or sharing of personal information.",isDisabled:!!t.gpp.mspa_opt_out_option_mode||!t.gpp.mspa_covered_transactions}),(0,n.jsx)(g.w8,{label:"Enable MSPA opt-out option mode",name:"gpp.mspa_opt_out_option_mode",variant:"switchFirst",tooltip:"Enable opt-out option mode if you engage or may engage in the sales or sharing of personal information, or process any information for the purpose of targeted advertising.",isDisabled:!!t.gpp.mspa_service_provider_mode||!t.gpp.mspa_covered_transactions})]}):null]}):null,e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.izJ,{color:"gray.200"}),(0,n.jsxs)(w,{title:"GPP Europe",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:"Configure TCF string for Global Privacy Platform"}),(0,n.jsx)(g.w8,{label:"Enable TC string",name:"gpp.enable_tcfeu_string",variant:"switchFirst",tooltip:"When enabled, the GPP API will include a TCF EU consent string for users who are in regions where TCF applies."})]})]}):null]})})},S=t(64781),k=t(60325),q=()=>{var e,i,t;let{tcf:l}=(0,a.hz)(),{values:o,setFieldValue:d}=(0,s.u6)(),{data:c,isLoading:u}=(0,S.gT)(),p=[...(0,k.k1)(null!==(i=null==c?void 0:c.locations)&&void 0!==i?i:[]),...(0,k.k1)(null!==(t=null==c?void 0:c.location_groups)&&void 0!==t?t:[])].sort((e,i)=>e.name<i.name?-1:1);return l?(0,n.jsxs)(C.Z,{title:"Publisher settings",children:[(0,n.jsx)(r.AntTypography.Paragraph,{className:"mb-3",children:"Specify the country in which your organization operates for TCF compliance. This setting will determine the 'Publisher Country Code ' transmitted in the Transparency and Consent (TC) Data."}),(0,n.jsx)(r.PPS.Item,{label:"Publisher country",htmlFor:"publisher_country_code",children:(0,n.jsx)(r.AOh,{"data-testid":"input-publisher_settings.publisher_country_code",id:"publisher_country_code",loading:u,allowClear:!0,options:(0,r.Ky_)(null==p?void 0:p.map(e=>e.id)),placeholder:"Select a country",value:null===(e=o.tcfPublisherSettings.publisher_country_code)||void 0===e?void 0:e.replace("_","-").toUpperCase(),onChange:e=>d("tcfPublisherSettings.publisher_country_code",null==e?void 0:e.toLowerCase()),className:"!w-80"})})]}):null},I=t(52955),N=t(71795),E=t(59512),P=t(55484),O=t(8133),R=t(31883);let F=P.Ry().shape({name:P.Z_().required().label("Name")}),L=e=>{let{isOpen:i,onClose:t,onSuccess:l}=e,o=(0,r.pmc)(),[a]=(0,I.LK)(),c=async e=>{let i=await a({name:e.name});(0,R.D4)(i)?o((0,h.Vo)((0,d.e$)(i.error))):(o((0,h.t5)("Successfully created TCF configuration")),null==l||l(i.data.id),t())};return(0,n.jsx)(O.Z,{title:"Create a new TCF configuration",isOpen:i,onClose:t,children:(0,n.jsx)(s.J9,{initialValues:{name:""},onSubmit:c,validationSchema:F,children:e=>{let{isValid:i,dirty:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",className:"w-full",children:[(0,n.jsx)(r.xvT,{children:"TCF configurations allow you to define unique sets of publisher restrictions. These configurations can be added to privacy experiences."}),(0,n.jsx)(g.j0,{id:"name",name:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsxs)(r.vyj,{className:"w-full justify-end pt-6",children:[(0,n.jsx)(r.wpx,{onClick:t,children:"Cancel"}),(0,n.jsx)(r.wpx,{type:"primary",htmlType:"submit",disabled:!i||!l,"data-testid":"save-config-button",children:"Save"})]})]})})}})})};var A=t(79894),z=t.n(A);let W=e=>{let{width:i,style:t,borderLeft:s=!1,borderRight:l=!1,...o}=e;return(0,n.jsx)(r.jqI,{align:"center",className:"h-full px-4",...o,style:{borderLeft:s?"solid 1px":"none",borderRight:l?"solid 1px":"none",borderColor:"var(--ant-color-border)",width:i,...t},role:"cell"})},Z=e=>{let{width:i,style:t,borderLeft:s=!1,children:l,...o}=e;return(0,n.jsx)(r.jqI,{align:"center",role:"columnheader",className:"px-4",...o,style:{borderLeft:s?"solid 1px":"none",borderColor:"var(--ant-color-border)",fontWeight:500,whiteSpace:"nowrap",width:i,...t},children:l})},D=e=>{let{isHeader:i=!1,isLastRow:t=!1,style:s,...l}=e;return(0,n.jsx)(r.jqI,{role:i?"rowheader":"row",className:"h-9 w-full",...l,style:{backgroundColor:i?"var(--fidesui-bg-default)":void 0,borderBottom:t?"none":"solid 1px",borderColor:"var(--ant-color-border)",...s}})},M=e=>{let{config:i,isLoading:t,style:s,...l}=e,{purposes:a}=(0,o.C)(p.ZS);return(0,n.jsxs)(r.jqI,{vertical:!0,...l,style:{maxWidth:"1200px",border:"solid 1px",borderColor:"var(--ant-color-border)",backgroundColor:"var(--ant-color-bg-base)",fontSize:"12px",...s},"aria-label":"Publisher restrictions table",role:"table","data-testid":"publisher-restrictions-table",children:[(0,n.jsxs)(D,{isHeader:!0,style:{width:"100%"},children:[(0,n.jsx)(Z,{width:"600px",children:"TCF purpose"}),(0,n.jsxs)(Z,{flex:1,gap:3,borderLeft:!0,children:["Restrictions",(0,n.jsx)(f.b,{label:"Restrictions control how vendors are permitted to process data for specific purposes. Fides supports three restriction types: Purpose Restriction to completely disallow data processing for a purpose, Require Consent to allow processing only with explicit user consent, and Require Legitimate Interest to allow processing based on legitimate business interest unless the user objects."})]}),(0,n.jsxs)(Z,{width:"100px",gap:3,borderLeft:!0,children:["Flexible",(0,n.jsx)(f.b,{label:'Indicates whether the legal basis for this purpose can be overridden by publisher restrictions. If marked "No," the purpose has a fixed legal basis defined by the TCF and cannot be changed.'})]}),(0,n.jsx)(Z,{width:"100px",borderLeft:!0,children:"Actions"})]}),Object.values(a).map((e,s)=>(0,n.jsxs)(D,{isLastRow:s===Object.values(a).length-1,children:[(0,n.jsxs)(W,{width:"600px",children:["Purpose ",e.id,": ",e.name]}),(0,n.jsx)(W,{flex:1,borderLeft:!0,"data-testid":"restriction-type-cell-".concat(e.id),children:t?(0,n.jsx)(r.OdW,{height:"16px",width:"100%"}):(()=>{var t;let s=(null==i?void 0:null===(t=i.restriction_types_per_purpose)||void 0===t?void 0:t[e.id])||[];return 0===s.length?"none":1===s.length?(0,n.jsx)(r.xvT,{size:"sm",whiteSpace:"nowrap",children:E.fj[s[0]]}):(0,n.jsxs)(r.xvT,{children:[s.length," restrictions"]})})()}),(0,n.jsx)(W,{width:"100px",borderLeft:!0,children:E.Py.includes(e.id)?(0,n.jsx)(r.j8w,{color:"error","data-testid":"flexibility-tag-".concat(e.id),children:"No"}):(0,n.jsx)(r.j8w,{color:"success","data-testid":"flexibility-tag-".concat(e.id),children:"Yes"})}),(0,n.jsx)(W,{width:"100px",borderLeft:!0,children:(0,n.jsx)(z(),{href:"/settings/consent/".concat(null==i?void 0:i.id,"/").concat(e.id),passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(r.wpx,{size:"small","data-testid":"edit-restriction-btn-".concat(e.id),children:"Edit"})})})]},e.id))]})};var V=t(56358),H=t(19904);let U=()=>(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"})]}),B=e=>{let{searchResults:i,selectedConfigId:t,handleSelection:s,userCanDeleteConfigs:l,onDeleteOpen:o,setConfigToDelete:a}=e;return(0,n.jsx)(r.y02.Group,{onChange:e=>s(e.target.value),value:t,className:"flex flex-col gap-2",children:i.map(e=>(0,n.jsxs)(r.jqI,{className:l?"justify-between":"justify-start","data-testid":"tcf-config-item-".concat(e.id),children:[(0,n.jsx)(r.y02,{value:e.id,name:"tcf-config-id","data-testid":"tcf-config-item",children:(0,n.jsx)(r.xvT,{className:"text-sm",children:e.name})}),l&&(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:(0,n.jsx)(V.q,{fontSize:16}),onClick:i=>{i.stopPropagation(),a(e),o()},"data-testid":"delete-config-button"})]},e.id))})},G=e=>{let i,{searchTerm:t,setSearchTerm:s,searchResults:o,selectedConfigId:a,handleSelection:d,userCanCreateConfigs:c,userCanDeleteConfigs:u,modalOnOpen:p,onDeleteOpen:h,setConfigToDelete:x,isLoading:g,setDropdownOpen:b,configurations:v}=e,[m,_]=(0,l.useState)(a);return(0,l.useEffect)(()=>{_(a)},[a]),i=g?(0,n.jsx)(U,{}):0===o.length?(0,n.jsx)(r.xvT,{className:"text-center",children:"No configurations found."}):(0,n.jsx)(B,{searchResults:o,selectedConfigId:m,handleSelection:e=>{_(e)},userCanDeleteConfigs:u,onDeleteOpen:h,setConfigToDelete:x}),(0,n.jsxs)(r.V4A,{title:"TCF configurations",className:"min-w-[300px]",extra:(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:(0,n.jsx)(r.Two,{}),onClick:()=>b(!1),"data-testid":"close-config-dropdown"}),style:{boxShadow:"var(--ant-box-shadow)"},children:[v.length>10&&(0,n.jsx)(r.BZy,{size:"sm",children:(0,n.jsx)(r.uFc,{className:"mb-4",placeholder:"Search...",onChange:e=>s(e.target.value),value:t})}),i,(0,n.jsxs)(r.jqI,{gap:"small",className:"mt-4",children:[c&&(0,n.jsx)(r.wpx,{size:"small",onClick:()=>{p(),b(!1)},className:"flex-1","data-testid":"create-config-button",children:"+ Create"}),(0,n.jsx)(r.wpx,{size:"small",onClick:()=>d(m),className:"flex-1","data-testid":"apply-config-button",disabled:m===a,children:"Apply"})]})]})},$=e=>(0,n.jsx)(G,{...e}),K=e=>{var i;let{selectedConfigId:t,configurations:s,isLoading:o=!1,onConfigurationSelect:a,onConfigurationDelete:c}=e,u=(0,H.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),p=(0,H.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),h=(0,r.pmc)({id:"tcf-config-toast"}),[x]=(0,I.Cm)(),{isOpen:g,onOpen:b,onClose:v}=(0,r.qY0)(),{isOpen:m,onOpen:_,onClose:f}=(0,r.qY0)(),[j,C]=(0,l.useState)(""),[w,T]=(0,l.useState)(),[S,k]=(0,l.useState)(!1),q=(0,l.useMemo)(()=>j?s.filter(e=>e.name.toLowerCase().includes(j.toLowerCase())):s,[s,j]),N=(0,l.useMemo)(()=>s.find(e=>e.id===t),[s,t]),E=null!==(i=null==N?void 0:N.name)&&void 0!==i?i:"Select Configuration",P=e=>{a(e),k(!1)},O=async e=>{try{await x(e).unwrap(),null==c||c(e),T(void 0),f(),h({status:"success",description:'Configuration "'.concat(null==w?void 0:w.name,'" was successfully deleted.')})}catch(e){h({status:"error",description:(0,d.e$)(e,"A problem occurred while deleting the configuration.")})}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.S0p,{open:S,onOpenChange:k,trigger:["click"],overlayStyle:{zIndex:999},dropdownRender:()=>$({searchTerm:j,setSearchTerm:C,searchResults:q,selectedConfigId:t,handleSelection:P,userCanCreateConfigs:u,userCanDeleteConfigs:p,modalOnOpen:b,onDeleteOpen:_,setConfigToDelete:T,isLoading:o,setDropdownOpen:k,configurations:s}),children:(0,n.jsx)(r.wpx,{icon:(0,n.jsx)(r.v4q,{}),iconPosition:"end","data-testid":"tcf-config-dropdown-trigger",children:E})}),(0,n.jsx)(L,{isOpen:g,onClose:v,onSuccess:e=>{a(e)}}),(0,n.jsx)(r.cVQ,{isOpen:m,onClose:()=>{T(void 0),f()},onConfirm:()=>{w&&O(w.id)},title:"Delete configuration",message:"Are you sure you want to delete this configuration? This action cannot be undone."})]})};var Y=t(32885);let X=e=>{let{defaultChecked:i,onChange:t,...s}=e,o=(0,r.pmc)(),[a,c]=(0,l.useState)(i),[u,p]=(0,l.useState)(!1),{isLoading:g}=(0,Y.x8)(),[b,{isLoading:v}]=(0,x.L)(),[m]=(0,Y.M7)(),{data:_}=(0,Y.n3)(void 0,{skip:g}),j=async e=>{let i=await b({consent:{override_vendor_purposes:e}});e&&_&&await m(_.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(i=>{if(o.closeAll(),null==t||t(e),(0,R.D4)(i)){let e=(0,d.e$)(i.error,"An unexpected error occurred while saving vendor override settings. Please try again.");null==t||t(!1),o((0,h.Vo)(e))}})(i)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(r.xvT,{children:"Configure overrides for TCF related purposes."}),(0,n.jsxs)(r.vyj,{size:"small",children:[(0,n.jsx)(r.rAg,{size:"small",disabled:v,loading:v,...s,checked:a,defaultChecked:i,onClick:e=>{e?(c(e),j(e)):p(!0)},"data-testid":"tcf-override-toggle"}),(0,n.jsx)(r.xvT,{children:"Override vendor purposes"}),(0,n.jsx)(f.b,{label:"Toggle on if you want to globally change any flexible legal bases or remove TCF purposes from your CMP"})]})]}),(0,n.jsx)(r.cVQ,{isOpen:u,onClose:()=>p(!1),onConfirm:()=>{c(!1),j(!1),p(!1)},title:"Disable Vendor Overrides",message:"Are you sure you want to disable vendor overrides? Clicking 'Continue' will immediately remove any custom configurations you have set for TCF purposes for all experiences."})]})},Q=e=>{var i;let{isTCFOverrideEnabled:t}=e,[s,o]=(0,l.useState)(t),[a,d]=(0,l.useState)(!1),[c,u]=(0,N._)("selectedTCFConfigId",null),{data:p,isLoading:h}=(0,I.LS)({page:1,size:50},{skip:!t}),{data:x,isFetching:g}=(0,I.NZ)(c||"",{skip:!c});return(0,l.useEffect)(()=>{var e,i;!h&&(null==p?void 0:null===(e=p.items)||void 0===e?void 0:e.length)&&!c&&u(p.items[0].id),h||!c||(null==p?void 0:null===(i=p.items)||void 0===i?void 0:i.length)||u(null)},[h,null==p?void 0:p.items,c,u]),(0,n.jsxs)(C.Z,{title:"Publisher restrictions",fontSize:"sm",children:[(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",style:{width:"100%"},children:[(0,n.jsx)(X,{defaultChecked:s,onChange:e=>o(e)}),s&&(0,n.jsxs)(n.Fragment,{children:[h&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.OdW,{height:"20px"}),(0,n.jsx)(r.OdW,{height:"20px"}),(0,n.jsx)(r.OdW,{height:"32px",width:"200px"})]}),!h&&(null==p?void 0:null===(i=p.items)||void 0===i?void 0:i.length)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activities."}),(0,n.jsxs)(r.xvT,{children:["To configure this section, select a TCF purpose to edit the restriction type and vendors."," ",(0,n.jsx)(m.Z,{href:E.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)(K,{selectedConfigId:c||"",configurations:(null==p?void 0:p.items)||[],onConfigurationSelect:u})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xvT,{children:['To define custom publisher restrictions select "create configuration" below.'," ",(0,n.jsx)(m.Z,{href:E.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)(r.wpx,{onClick:()=>d(!0),"data-testid":"create-config-button",children:"Create configuration +"})]})]})]}),(0,n.jsx)(L,{isOpen:a,onClose:()=>d(!1),onSuccess:e=>{u(e)}}),s&&c&&(0,n.jsx)(M,{className:"mt-3",config:x,isLoading:g})]})};var J=()=>{var e,i;let{isLoading:t}=(0,Y.x8)(),{tcf:g}=(0,a.hz)(),{data:b,isLoading:m}=(0,Y.n3)(void 0,{skip:t||!g}),[f,{isLoading:j}]=(0,Y.M7)(),{data:w,isLoading:S}=(0,x.tB)({api_set:!0}),{data:k,isLoading:I}=(0,x.tB)({api_set:!1}),[N]=(0,x.L)(),E=(0,o.C)(x.D2),P=(0,o.C)(x.Yh),O=(0,l.useMemo)(()=>w&&(null==w?void 0:w.consent)&&"override_vendor_purposes"in w.consent?w.consent.override_vendor_purposes:!!k&&null!=k&&!!k.consent&&"override_vendor_purposes"in k.consent&&k.consent.override_vendor_purposes,[w,k]),{isLoading:R}=(0,p.a4)(),F=(0,r.pmc)(),L=async e=>{var i;let t=e=>{if(F.closeAll(),(0,d.D4)(e)){let i=(0,d.e$)(e.error,"An unexpected error occurred while saving. Please try again.");F((0,h.Vo)(i))}else F((0,h.t5)("Settings saved successfully"))},n=[...e.purposeOverrides.map(e=>{let i;return e.is_consent&&(i=y.I$.CONSENT),e.is_legitimate_interest&&(i=y.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:i}})];if(O){let e=await f(n);if((0,d.D4)(e)){t(e);return}}let{enabled:r,...s}=e.gpp;t(await N({gpp:s,plus_consent_settings:{tcf_publisher_country_code:null!==(i=e.tcfPublisherSettings.publisher_country_code)&&void 0!==i?i:null}}))},A=(0,l.useMemo)(()=>({purposeOverrides:b?b.map(e=>({purpose:e.purpose,is_included:e.is_included,is_consent:e.required_legal_basis===y.I$.CONSENT,is_legitimate_interest:e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS})):[],gpp:E,tcfPublisherSettings:{publisher_country_code:P.tcf_publisher_country_code}}),[b,E,P]),z=(0,l.useMemo)(()=>(null==b?void 0:b.some(e=>!e.is_included||e.required_legal_basis===y.I$.CONSENT||e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS))||!1,[b]),W=null===(i=(0,a.hz)())||void 0===i?void 0:null===(e=i.flags)||void 0===e?void 0:e.publisherRestrictions;return(0,n.jsx)(c.Z,{title:"Consent Configuration",children:t||R||m||S||I?(0,n.jsx)(r.kCb,{justifyContent:"center",alignItems:"center",height:"100%",children:(0,n.jsx)(r.$jN,{})}):(0,n.jsxs)(r.xuv,{"data-testid":"consent-configuration",children:[(0,n.jsx)(u.Z,{heading:"Consent settings"}),(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,children:[(0,n.jsx)(C.Z,{title:"Transparency & Consent Framework settings",children:(0,n.jsx)(_,{name:"TCF",enabled:g})}),g&&!z&&W&&(0,n.jsx)(Q,{isTCFOverrideEnabled:O})]}),(0,n.jsx)(s.J9,{initialValues:A,enableReinitialize:!0,onSubmit:L,children:e=>{let{dirty:i,isValid:t,isSubmitting:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[g&&(z||!W)&&(0,n.jsxs)(C.Z,{title:"Vendor overrides",fontSize:"sm",children:[(0,n.jsx)(X,{defaultChecked:O,disabled:j}),O&&(0,n.jsxs)(r.Kqy,{mt:2,spacing:2,children:[(0,n.jsx)(r.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activites."}),(0,n.jsx)(r.xvT,{children:"To configure this section, select the purposes you allow and where available, the appropriate legal bases (either Consent or Legitimate Interest)."}),(0,n.jsx)(v,{})]})]}),(0,n.jsx)(q,{}),(0,n.jsx)(T,{}),(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,loading:l,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},31883:function(e,i,t){"use strict";t.d(i,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=t(19043)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=53748)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4065],{70378:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/custom-fields",function(){return t(78422)}])},56358:function(e,l,t){"use strict";t.d(l,{q:function(){return s}});var i=t(24246);let s=(0,t(96306).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,i.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},95492:function(e,l,t){"use strict";t.d(l,{l:function(){return s}});var i=t(24246);let s=(0,t(96306).IUT)({displayName:"TrashCanSolidIcon",viewBox:"0 0 12 15",path:(0,i.jsx)("path",{d:"M8.37857 1.18083C8.23393 0.892838 7.93661 0.710938 7.6125 0.710938H4.3875C4.06339 0.710938 3.76607 0.892838 3.62143 1.18083L3.42857 1.56094H0.857143C0.383036 1.56094 -1.19209e-07 1.94158 -1.19209e-07 2.41094C-1.19209e-07 2.8803 0.383036 3.26094 0.857143 3.26094H11.1429C11.6162 3.26094 12 2.8803 12 2.41094C12 1.94158 11.6162 1.56094 11.1429 1.56094H8.57143L8.37857 1.18083ZM11.167 4.11094H0.857143V12.6109C0.857143 13.5486 1.62589 14.3109 2.57143 14.3109H9.45268C10.3754 14.3109 11.167 13.5486 11.167 12.6109V4.11094ZM9.02411 6.23594V12.1859C9.02411 12.4197 8.80714 12.6109 8.59554 12.6109C8.33571 12.6109 8.16696 12.4197 8.16696 12.1859V6.23594C8.16696 6.00219 8.33571 5.81094 8.59554 5.81094C8.80714 5.81094 9.02411 6.00219 9.02411 6.23594ZM6.45268 6.23594V12.1859C6.45268 12.4197 6.23571 12.6109 6.02411 12.6109C5.76429 12.6109 5.57143 12.4197 5.57143 12.1859V6.23594C5.57143 6.00219 5.76429 5.81094 6.02411 5.81094C6.23571 5.81094 6.45268 6.00219 6.45268 6.23594ZM3.85714 6.23594V12.1859C3.85714 12.4197 3.66429 12.6109 3.42857 12.6109C3.19286 12.6109 3 12.4197 3 12.1859V6.23594C3 6.00219 3.19286 5.81094 3.42857 5.81094C3.66429 5.81094 3.85714 6.00219 3.85714 6.23594Z",fill:"currentColor"})})},77213:function(e,l,t){"use strict";t.d(l,{Z:function(){return p}});var i=t(24246),s=t(96306),a=t(88038),n=t.n(a),o=t(86677);t(27378);var r=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,o.useRouter)();return(0,i.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(s.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:l,title:t,padded:a=!0,mainProps:c}=e,p=(0,r.hz)(),x=(0,o.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,h=!(p.flags.privacyRequestsConfiguration&&m),{data:f}=(0,d.JE)(void 0,{skip:h}),{data:v}=(0,d.PW)(void 0,{skip:h}),C=p.flags.privacyRequestsConfiguration&&(!f||!v)&&m;return(0,i.jsxs)(s.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,i.jsxs)(n(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(s.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[C?(0,i.jsx)(u,{}):null,l]})]})}},19904:function(e,l,t){"use strict";t.d(l,{Tg:function(){return n}});var i=t(24246),s=t(16134),a=t(31793);let n=e=>(0,s.C)(a.uu).filter(l=>e.includes(l)).length>0;l.ZP=e=>{let{scopes:l,children:t}=e;return n(l)?(0,i.jsx)(i.Fragment,{children:t}):null}},94799:function(e,l,t){"use strict";t.d(l,{k:function(){return a}});var i=t(76649);let s=e=>(0,i.Ln)({id:"string"},e),a=e=>(null!=e?e:[]).filter(s)},30320:function(e,l,t){"use strict";t.d(l,{m:function(){return r}});var i=t(27378),s=t(25980),a=t(75573),n=t(32885),o=t(94799);let r=e=>{let{resourceFidesKey:l,resourceType:t}=e,{errorAlert:r}=(0,a.VY)(),{plus:d}=(0,s.hz)(),c=(0,i.useMemo)(()=>null!=l?l:"",[]),u=(0,n.YU)(!0,{skip:!d}),p=(0,n.VN)(t,{skip:!d}),{data:x,isLoading:m,error:h,isError:f}=(0,n.PV)(null!=l?l:"",{skip:""!==c&&!(d&&c)}),[v]=(0,n._D)(),C=u.isLoading||p.isLoading||m,_=(0,i.useMemo)(()=>new Map((0,o.k)(u.data).map(e=>{var l;return[e.id,{...e,options:(null!==(l=e.allowed_values)&&void 0!==l?l:[]).map(e=>({value:e,label:e}))}]})),[u.data]),g=(0,i.useMemo)(()=>{var e;return null===(e=p.data)||void 0===e?void 0:e.filter(e=>e.active)},[p.data]),j=(0,i.useMemo)(()=>new Map((0,o.k)(g).map(e=>[e.id,e])),[g]),b=(0,i.useMemo)(()=>f&&(null==h?void 0:h.status)===404?new Map:new Map((0,o.k)(x).map(e=>[e.custom_field_definition_id,e])),[x,f,h]),y=(0,i.useMemo)(()=>{let e=[...j.keys()];return e.sort(),e},[j]),T=(0,i.useMemo)(()=>{let e={};return g&&b&&g.forEach(l=>{let t=b.get(l.id||"");t&&(l.allow_list_id&&"string[]"===l.field_type?e[t.custom_field_definition_id]=t.value:e[t.custom_field_definition_id]=t.value.toString())}),e},[g,b]),w=(0,i.useCallback)(async e=>{if(!d)return;let i="fides_key"in e&&""!==e.fides_key?e.fides_key:l;if(!i)return;let{customFieldValues:s}=e;if(!s||0===Object.keys(s).length)return;let a=[],n=[];y.forEach(e=>{let l=b.get(e),t=s[e];void 0===t||""===t||Array.isArray(t)&&0===t.length?(null==l?void 0:l.id)&&n.push(l.id):a.push({custom_field_definition_id:e,resource_id:i,id:null==l?void 0:l.id,value:t})});try{await v({resource_type:t,resource_id:i,upsert:a,delete:n})}catch(e){r("One or more custom fields have failed to save, please try again."),console.error(e)}},[d,b,r,l,y,v,t]);return{customFieldValues:T,definitionIdToCustomField:b,idToAllowListWithOptions:_,idToCustomFieldDefinition:j,isEnabled:d,isLoading:C,sortedCustomFieldDefinitionIds:y,upsertCustomFields:w}}},95346:function(e,l,t){"use strict";t.d(l,{uc:function(){return v},Hn:function(){return r},Uv:function(){return n},C7:function(){return d},mZ:function(){return f.m}});var i,s,a,n,o=t(54682);(i=a||(a={}))[i.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",i[i.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",i[i.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",o.AL.STRING,o.AL.STRING,o.AL.STRING_,(s=n||(n={})).SINGLE_SELECT="singleSelect",s.MULTIPLE_SELECT="multipleSelect",s.LOCATION_SELECT="locationSelect",s.OPEN_TEXT="openText";let r=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Location select",value:"locationSelect"},{label:"Open Text",value:"openText"}],d=[{label:"taxonomy:".concat(o.P6.DATA_CATEGORY),value:o.P6.DATA_CATEGORY},{label:"taxonomy:".concat(o.P6.DATA_SUBJECT),value:o.P6.DATA_SUBJECT},{label:"taxonomy:".concat(o.P6.DATA_USE),value:o.P6.DATA_USE},{label:"".concat(o.P6.SYSTEM,":information"),value:o.P6.SYSTEM},{label:"system:data use",value:o.P6.PRIVACY_DECLARATION}];var c=t(24246),u=t(96306),p=t(34090),x=t(30234),m=t(97181),h=t(40324),f=t(30320);let v=e=>{let{resourceFidesKey:l,resourceType:t}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:s,isEnabled:a,isLoading:n,sortedCustomFieldDefinitionIds:r}=(0,f.m)({resourceFidesKey:l,resourceType:t});return a&&0!==r.length?(0,c.jsx)(x.Z,{heading:"Custom fields",children:(0,c.jsx)(u.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(u.kCb,{flexDir:"column",gap:"24px",children:n?(0,c.jsx)(u.M5Y,{children:(0,c.jsx)(u.$jN,{})}):r.length>0&&(0,c.jsx)(u.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:r.map(e=>{let l=s.get(e);if(!l)return null;let t="customFieldValues.".concat(l.id);if(!l.allow_list_id&&l.field_type===o.AL.STRING)return(0,c.jsx)(p.gN,{name:t,children:e=>{let{field:t}=e;return(0,c.jsx)(h.j0,{...t,label:l.name,tooltip:l.description,variant:"stacked"})}},e);let a=i.get(l.allow_list_id);if(!a)return null;let{options:n}=a;return(0,c.jsx)(m.d,{name:t,allowClear:!0,mode:l.field_type!==o.AL.STRING?"multiple":void 0,label:l.name,options:n,tooltip:l.description,layout:"stacked",className:"w-full"},e)})})})})}):null};t(94799)},97181:function(e,l,t){"use strict";t.d(l,{d:function(){return d}});var i=t(24246),s=t(96306),a=t(34090),n=t(27378),o=t(46238),r=t(40324);let d=e=>{let{name:l,label:t,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:x,...m}=e,[h,f,{setValue:v}]=(0,a.U$)(l),C=!!(f.touched&&f.error),[_,g]=(0,n.useState)("");h.value||"tags"!==m.mode&&"multiple"!==m.mode||(h.value=[]),"tags"===m.mode&&"string"==typeof h.value&&(h.value=[h.value]);let j="tags"===m.mode?(e,l)=>e?e.value!==_||h.value.includes(_)?m.optionRender?m.optionRender(e,l):e.label:'Create "'.concat(_,'"'):void 0:m.optionRender||void 0,b=e=>{g(e),m.onSearch&&m.onSearch(e)},y=(e,l)=>{v(e),m.onChange&&m.onChange(e,l)};return"inline"===p?(0,i.jsx)(s.NIc,{isInvalid:C,isRequired:u,children:(0,i.jsxs)(s.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,i.jsx)(r.__,{htmlFor:m.id||l,...d,children:t}):null,(0,i.jsxs)(s.jqI,{align:"center",children:[(0,i.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(s.WPr,{...h,id:m.id||l,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:j,onSearch:"tags"===m.mode?b:void 0,onChange:y,value:h.value||void 0,status:C?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{children:x}),(0,i.jsx)(r.Bc,{isInvalid:C,message:f.error,fieldName:h.name})]}),(0,i.jsx)(o.b,{label:c,className:C?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(s.NIc,{isInvalid:C,isRequired:u,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[t?(0,i.jsx)(r.__,{htmlFor:m.id||l,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,i.jsx)(o.b,{label:c})]}),(0,i.jsx)(s.WPr,{...h,id:m.id||l,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:j,onSearch:"tags"===m.mode?b:void 0,onChange:y,value:h.value||void 0,status:C?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{style:{marginTop:0},children:x}),(0,i.jsx)(r.Bc,{isInvalid:C,message:f.error,fieldName:h.name})]})})}},10342:function(e,l,t){"use strict";var i=t(24246),s=t(96306),a=t(46238);l.Z=e=>{let{title:l,tooltip:t,children:n,...o}=e;return(0,i.jsxs)(s.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...o,children:[(0,i.jsxs)(s.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[l,t?(0,i.jsx)(s.xvT,{as:"span",mx:1,children:(0,i.jsx)(a.b,{label:t})}):void 0]}),(0,i.jsx)(s.Kqy,{p:6,spacing:6,children:n})]})}},30234:function(e,l,t){"use strict";var i=t(24246),s=t(96306);l.Z=e=>{let{heading:l,HeadingButton:t,children:a}=e;return(0,i.jsx)(s.Kqy,{spacing:4,children:(0,i.jsxs)(s.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,i.jsxs)(s.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,i.jsx)(s.X6q,{as:"h3",size:"xs",children:l}),t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.LZC,{}),(0,i.jsx)(t,{})]}):null]}),(0,i.jsx)(s.Kqy,{spacing:4,px:6,py:6,children:a})]})})}},78422:function(e,l,t){"use strict";t.r(l),t.d(l,{default:function(){return X}});var i=t(24246),s=t(77213),a=t(96306),n=t(27378),o=t(58754),r=t(92222),d=t(59003),c=t(16134),u=t(812),p=t(19904),x=t(47935),m=t(46628),h=t(72625),f=t(54682);let v=new Map([["string","Single Select"],["string[]","Multi Select"],["open-text","Open Text"]]),C=new Map([[f.P6.SYSTEM,"system:information"],[f.P6.DATA_USE,"taxonomy:data use"],[f.P6.DATA_CATEGORY,"taxonomy:data category"],[f.P6.DATA_SUBJECT,"taxonomy:data subject"],[f.P6.PRIVACY_DECLARATION,"system:data use"]]);var _=t(32885);let g=e=>{var l;let t=null!==(l=C.get(e.getValue()))&&void 0!==l?l:e.getValue();return(0,i.jsx)(h.G3,{...e,value:t})},j=e=>{let{row:l,getValue:t}=e,s=l.original.allow_list_id?t():"open-text",a=v.get(s)||s;return(0,i.jsx)(h.A4,{value:a})},b=e=>{let{row:l,getValue:t,isDisabled:s}=e,a=!!t(),[n]=(0,_.yM)(),o=async e=>n({...l.original,active:e});return(0,i.jsx)(h.S1,{enabled:a,onToggle:o,title:"Disable custom field",message:"Are you sure you want to disable this custom field?",isDisabled:s,"aria-label":a?"Disable custom field":"Enable custom field"})};var y=t(56358),T=t(58452);let w=e=>{let{customField:l,onEdit:t,onDelete:s,...n}=e,o=(0,a.qY0)();return(0,i.jsxs)(a.xuv,{...n,children:[(0,i.jsx)(a.wpx,{"aria-label":"Edit property","data-testid":"edit-property-button",size:"small",className:"mr-[10px]",icon:(0,i.jsx)(a.dY8,{}),onClick:e=>{e.stopPropagation(),t(l,e)}}),(0,i.jsx)(a.wpx,{"aria-label":"Delete property","data-testid":"delete-property-button",size:"small",className:"mr-[10px]",icon:(0,i.jsx)(y.q,{}),onClick:e=>{e.stopPropagation(),o.onOpen()}}),(0,i.jsx)(T.Z,{isOpen:o.isOpen,onClose:o.onClose,onConfirm:()=>{s(l),o.onClose()},title:"Delete custom field",message:(0,i.jsx)(a.xvT,{color:"gray.500",children:"Are you sure you want to delete this custom field? This will remove the custom field and all stored values and this action can't be undone."}),continueButtonText:"Confirm",isCentered:!0,icon:(0,i.jsx)(a.aNP,{})})]})};var E=t(34090),S=t(55484),L=t(95346),I=t(75573);let R={color:"gray.600",fontSize:"14px",fontWeight:"semibold",minWidth:"150px"};var A=e=>{let{customLabelProps:l,disabled:t=!1,isRequired:s=!1,label:n,type:o="text",placeholder:r,...d}=e,[c,u]=(0,E.U$)(d),{id:p,name:x,autoFocus:m}=d,h="custom-input-".concat(c.name);return(0,i.jsxs)(a.NIc,{display:"flex",isRequired:s,isInvalid:!!(u.error&&u.touched),children:[n&&(0,i.jsx)(a.lXp,{htmlFor:p||x,...l||R,children:n}),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,i.jsxs)(a.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,i.jsx)(a.zuI,{...c,autoComplete:"off",autoFocus:m,"data-testid":h}),(0,i.jsxs)(a.FiK,{children:[(0,i.jsx)(a.WQu,{}),(0,i.jsx)(a.Y_d,{})]})]}),"text"===o&&(0,i.jsx)(a.IIB,{...c,autoComplete:"off",autoFocus:m,color:"gray.700",isDisabled:t,placeholder:r,size:"sm","data-testid":h}),"textarea"===o&&(0,i.jsx)(a.gxH,{...c,autoComplete:"off",autoFocus:m,color:"gray.700",placeholder:r,resize:"none",size:"sm",value:c.value||"","data-testid":h}),(0,i.jsx)(a.J1D,{children:u.error})]})]})};let N=(0,a.IUT)({displayName:"AddIcon",viewBox:"0 0 10 10",path:(0,i.jsx)("path",{d:"M4.33331 4.33398V0.333984H5.66665V4.33398H9.66665V5.66732H5.66665V9.66732H4.33331V5.66732H0.333313V4.33398H4.33331Z",fill:"currentColor"})});var M=t(10342),O=t(95492),P=t(97181);let k={...R,minWidth:"unset"},U=e=>{let{values:l,validationSchema:t,errors:s,dirty:o,isValid:r,isSubmitting:d,isLoading:c,onClose:u,handleDropdownChange:p,isEditing:x}=e,{validateForm:m}=(0,E.u6)();return(0,n.useEffect)(()=>{m()},[t,m]),(0,i.jsxs)(E.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(M.Z,{title:"Field Information",children:[(0,i.jsx)(A,{isRequired:!0,label:"Name",name:"name",customLabelProps:k}),(0,i.jsx)(A,{label:"Description",name:"description",customLabelProps:k}),(0,i.jsx)(P.d,{label:"Location",name:"resource_type",options:L.C7,labelProps:k,disabled:x})]})}),(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(M.Z,{title:"Configuration",children:[(0,i.jsx)(P.d,{label:"Field Type",name:"field_type",labelProps:k,options:L.Hn,onChange:p}),l.field_type!==L.Uv.OPEN_TEXT&&l.field_type!==L.Uv.LOCATION_SELECT?(0,i.jsx)(a.kCb,{flexDirection:"column",gap:"12px",paddingTop:"6px",paddingBottom:"24px",children:(0,i.jsx)(E.F2,{name:"allow_list.allowed_values",render:e=>{let{allowed_values:t}=l.allow_list;return(0,i.jsxs)(a.kCb,{flexDirection:"column",gap:"6",pl:"6",children:[(0,i.jsx)(a.kCb,{flexDirection:"column",children:t.map((l,s)=>(0,i.jsxs)(a.kCb,{flexGrow:1,gap:"3",mt:s>0?3:void 0,children:[(0,i.jsx)(A,{customLabelProps:{color:"gray.600",fontSize:"sm",fontWeight:"500",lineHeight:"20px",minW:"126px",pr:"8px"},isRequired:!0,label:"List item ".concat(s+1),name:"allow_list.allowed_values[".concat(s,"]")}),(0,i.jsx)(a.wpx,{"aria-label":"Remove this list value","data-testid":"remove-list-value-btn-".concat(s),icon:(0,i.jsx)(O.l,{}),disabled:t.length<=1,onClick:()=>e.remove(s),type:"text"})]},s))}),(0,i.jsxs)(a.kCb,{alignItems:"center",children:[(0,i.jsx)(a.xvT,{color:"gray.600",fontSize:"xs",fontWeight:"500",lineHeight:"16px",pr:"8px",children:"Add a list value"}),(0,i.jsx)(a.wpx,{"aria-label":"Add a list value","data-testid":"add-list-value-btn",icon:(0,i.jsx)(N,{h:"7px",w:"7px"}),onClick:()=>{e.push("")},size:"small"}),0===t.length&&(null==s?void 0:s.allow_list)?(0,i.jsx)(a.xvT,{color:"red.500",pl:"18px",size:"sm",children:s.allow_list.allowed_values}):null]})]})}})}):null]})}),(0,i.jsxs)(a.kCb,{justifyContent:"space-between",width:"100%",children:[(0,i.jsx)(a.wpx,{onClick:u,disabled:c||d,className:"mr-3","data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",loading:c,disabled:!o||!r||d,children:"Save"})]})]})},D={description:"",field_type:L.Uv.OPEN_TEXT,name:"",resource_type:f.P6.SYSTEM,allow_list:{name:"",description:"",allowed_values:[]}},H=S.IX(S.Z_().optional().label("allowed_values")),V=S.IX(S.Z_().required("List item is required")).min(1,"Must add at least one list value").label("allowed_values"),F=S.Ry().shape({name:S.Z_().required("Name is required").trim(),allow_list:S.Ry().shape({allowed_values:H})}),Z=S.Ry().shape({name:S.Z_().required("Name is required").trim(),allow_list:S.Ry().shape({allowed_values:V})}),z=(e,l)=>{var t,i,s;let a;if(!e)return;e.field_type!==f.AL.STRING||e.allow_list_id||(a=L.Uv.OPEN_TEXT),e.field_type===f.AL.STRING&&e.allow_list_id&&(a=L.Uv.SINGLE_SELECT),e.field_type===f.AL.STRING_&&e.allow_list_id&&(a=L.Uv.MULTIPLE_SELECT);let n=l?{name:null!==(t=l.name)&&void 0!==t?t:"",description:null!==(i=l.description)&&void 0!==i?i:"",allowed_values:null!==(s=l.allowed_values)&&void 0!==s?s:[]}:D.allow_list;return{...e,field_type:a||L.Uv.OPEN_TEXT,allow_list:n}},q=e=>{let{isOpen:l,onClose:t,isLoading:s,customField:o}=e,{errorAlert:r,successAlert:d}=(0,I.VY)(),[c]=(0,_.Ld)(),[p]=(0,_.yM)(),[x]=(0,_.Nt)(),{data:m,isLoading:h}=(0,_.vA)(null==o?void 0:o.allow_list_id,{skip:!(null==o?void 0:o.allow_list_id)}),[v,C]=(0,n.useState)(F);if(h||!l)return null;let g=z(o,m),j=!!g,b=e=>{e===L.Uv.OPEN_TEXT||e===L.Uv.LOCATION_SELECT?C(F):C(Z)},y=async e=>{if([L.Uv.SINGLE_SELECT,L.Uv.MULTIPLE_SELECT].includes(e.field_type)){var l,i;if(new Set(null===(l=e.allow_list)||void 0===l?void 0:l.allowed_values.map(e=>e.toLowerCase().trim()).map(e=>e)).size<e.allow_list.allowed_values.length){r("List item value must be unique");return}let{allow_list:t}=e;e.allow_list_id&&(t.id=e.allow_list_id),t.name||(t.name=Date.now().toString()+Math.random().toString());let s=await x(t);(0,u.D4)(s)||e.allow_list_id||(e.allow_list_id=null===(i=s.data)||void 0===i?void 0:i.id)}(e.field_type===L.Uv.OPEN_TEXT||e.field_type===L.Uv.LOCATION_SELECT)&&(e.allow_list_id=void 0),[L.Uv.SINGLE_SELECT,L.Uv.OPEN_TEXT,L.Uv.LOCATION_SELECT].includes(e.field_type)&&(e.field_type=f.AL.STRING),e.field_type===L.Uv.MULTIPLE_SELECT&&(e.field_type=f.AL.STRING_);let s={...e};delete s.allow_list;let a=o?await p(s):await c(s);(0,u.D4)(a)?r((0,u.e$)(a.error),"Custom field has failed to save due to the following:"):(t(),d("Custom field successfully saved"))};return(0,i.jsxs)(a.u_l,{id:"custom-field-modal-hello-world",isOpen:l,onClose:t,size:"lg",returnFocusOnClose:!1,isCentered:!0,children:[(0,i.jsx)(a.ZAr,{}),(0,i.jsxs)(a.hzk,{id:"modal-content","data-testid":"custom-field-modal",maxHeight:"80%",overflowY:"auto",children:[(0,i.jsx)(a.xBx,{id:"modal-header",fontWeight:"semibold",lineHeight:5,fontSize:"sm",py:"18px",px:6,height:"56px",backgroundColor:"gray.50",borderColor:"gray.200",borderWidth:"0px 0px 1px 1p",borderTopRightRadius:"8px",borderTopLeftRadius:"8px",boxSizing:"border-box",children:o?"Manage Custom Field":"Add a custom field"}),(0,i.jsx)(a.fef,{px:6,py:0,children:(0,i.jsx)(E.J9,{initialValues:g||D,validationSchema:v,onSubmit:y,enableReinitialize:!0,validateOnChange:!0,children:e=>(0,i.jsx)(U,{isEditing:j,validationSchema:v,isLoading:s,onClose:t,handleDropdownChange:b,...e})})})]})]})},W="Add a custom field",G=()=>(0,i.jsx)(a.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,i.jsxs)(a.gCW,{children:[(0,i.jsx)(a.xvT,{fontSize:"md",fontWeight:"600",children:"It looks like it’s your first time here!"}),(0,i.jsxs)(a.xvT,{fontSize:"sm",children:["You haven’t created any custom fields yet.",(0,i.jsx)("br",{}),"To create a custom field, click on the"," ",(0,i.jsxs)("strong",{children:['"',W,'"']})," button"]})]})}),Y=(0,r.Cl)(),B=e=>{let{...l}=e,t=(0,a.pmc)(),{isLoading:s}=(0,_.GH)(),o=(0,c.C)(_.fN),[h]=(0,_.UF)(),{isOpen:v,onClose:C,onOpen:y}=(0,a.qY0)(),[T,E]=(0,n.useState)(),[S,L]=(0,n.useState)(),I=(0,p.Tg)([f.Sh.CUSTOM_FIELD_UPDATE]),R=(0,p.Tg)([f.Sh.CUSTOM_FIELD_DELETE]),A=e=>{I&&(E(e),y())},N=async e=>{if(R&&e.id){let l=await h({id:e.id});if((0,u.D4)(l)){t((0,m.Vo)((0,u.e$)(l.error)));return}t((0,m.t5)("Custom field deleted"))}},M=(0,n.useMemo)(()=>[Y.accessor(e=>e.name,{id:"name",cell:e=>(0,i.jsx)(x.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,i.jsx)(x.Rr,{value:"Label",...e})}),Y.accessor(e=>e.description,{id:"description",cell:e=>(0,i.jsx)(x.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,i.jsx)(x.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),Y.accessor(e=>e.field_type,{id:"field_type",cell:j,header:e=>(0,i.jsx)(x.Rr,{value:"Field Type",...e})}),Y.accessor(e=>e.resource_type,{id:"resource_type",cell:g,header:e=>(0,i.jsx)(x.Rr,{value:"Locations",...e})}),I&&Y.accessor(e=>e.active,{id:"enable",cell:b,header:e=>(0,i.jsx)(x.Rr,{value:"Enable",...e}),meta:{disableRowClick:!0}}),(I||R)&&Y.display({id:"actions",header:"Actions",cell:e=>{let{row:l}=e;return(0,i.jsx)(w,{customField:l.original,onEdit:A,onDelete:N})},meta:{disableRowClick:!0}})].filter(Boolean),[R,I]),O=(0,d.b7)({getCoreRowModel:(0,r.sC)(),getFilteredRowModel:(0,r.vL)(),getSortedRowModel:(0,r.tj)(),onGlobalFilterChange:L,globalFilterFn:"includesString",columns:M,data:o,state:{globalFilter:S},columnResizeMode:"onChange"});return(0,i.jsxs)(a.xuv,{...l,children:[(0,i.jsx)(a.xuv,{maxWidth:600,children:(0,i.jsx)(a.xvT,{mb:10,fontSize:"sm",children:o.length>0?"Custom fields enable you to capture metrics specific to your organization and have those metrics appear in the data map and in reports.":"Custom fields provide organizations with the capability to capture metrics that are unique to their specific needs, allowing them to create customized reports. These fields can be added to either systems or elements within a taxonomy, and once added, they become reportable fields that are visible on the data map."})}),(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-page",children:[(0,i.jsxs)(x.Q$,{children:[(0,i.jsx)(x.HO,{globalFilter:S,setGlobalFilter:L,placeholder:"Search for a custom field"}),(0,i.jsx)(a.Ugi,{alignItems:"center",spacing:4,children:(0,i.jsx)(()=>(0,i.jsx)(p.ZP,{scopes:[f.Sh.CUSTOM_FIELD_DEFINITION_CREATE],children:(0,i.jsx)(a.wpx,{type:"primary","data-testid":"add-custom-field-btn",onClick:y,children:W})}),{})})]}),s?(0,i.jsx)(a.xuv,{p:2,borderWidth:1,children:(0,i.jsx)(x.I4,{rowHeight:26,numRows:10})}):(0,i.jsx)(x.ZK,{tableInstance:O,onRowClick:I?A:void 0,emptyTableNotice:(0,i.jsx)(G,{}),enableSorting:!0}),v&&(0,i.jsx)(q,{customField:T,isOpen:v,onClose:()=>{E(void 0),C()},isLoading:!1})]})]})};var X=()=>(0,i.jsx)(s.Z,{title:"Custom fields",children:(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-management",children:[(0,i.jsx)(o.Z,{heading:"Custom fields"}),(0,i.jsx)(B,{})]})})}},function(e){e.O(0,[431,768,2888,9774,179],function(){return e(e.s=70378)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4065],{70378:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/custom-fields",function(){return t(78422)}])},56358:function(e,l,t){"use strict";t.d(l,{q:function(){return s}});var i=t(24246);let s=(0,t(96306).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,i.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},95492:function(e,l,t){"use strict";t.d(l,{l:function(){return s}});var i=t(24246);let s=(0,t(96306).IUT)({displayName:"TrashCanSolidIcon",viewBox:"0 0 12 15",path:(0,i.jsx)("path",{d:"M8.37857 1.18083C8.23393 0.892838 7.93661 0.710938 7.6125 0.710938H4.3875C4.06339 0.710938 3.76607 0.892838 3.62143 1.18083L3.42857 1.56094H0.857143C0.383036 1.56094 -1.19209e-07 1.94158 -1.19209e-07 2.41094C-1.19209e-07 2.8803 0.383036 3.26094 0.857143 3.26094H11.1429C11.6162 3.26094 12 2.8803 12 2.41094C12 1.94158 11.6162 1.56094 11.1429 1.56094H8.57143L8.37857 1.18083ZM11.167 4.11094H0.857143V12.6109C0.857143 13.5486 1.62589 14.3109 2.57143 14.3109H9.45268C10.3754 14.3109 11.167 13.5486 11.167 12.6109V4.11094ZM9.02411 6.23594V12.1859C9.02411 12.4197 8.80714 12.6109 8.59554 12.6109C8.33571 12.6109 8.16696 12.4197 8.16696 12.1859V6.23594C8.16696 6.00219 8.33571 5.81094 8.59554 5.81094C8.80714 5.81094 9.02411 6.00219 9.02411 6.23594ZM6.45268 6.23594V12.1859C6.45268 12.4197 6.23571 12.6109 6.02411 12.6109C5.76429 12.6109 5.57143 12.4197 5.57143 12.1859V6.23594C5.57143 6.00219 5.76429 5.81094 6.02411 5.81094C6.23571 5.81094 6.45268 6.00219 6.45268 6.23594ZM3.85714 6.23594V12.1859C3.85714 12.4197 3.66429 12.6109 3.42857 12.6109C3.19286 12.6109 3 12.4197 3 12.1859V6.23594C3 6.00219 3.19286 5.81094 3.42857 5.81094C3.66429 5.81094 3.85714 6.00219 3.85714 6.23594Z",fill:"currentColor"})})},77213:function(e,l,t){"use strict";t.d(l,{Z:function(){return p}});var i=t(24246),s=t(96306),a=t(88038),n=t.n(a),o=t(86677);t(27378);var r=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,o.useRouter)();return(0,i.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(s.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:l,title:t,padded:a=!0,mainProps:c}=e,p=(0,r.hz)(),x=(0,o.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,h=!(p.flags.privacyRequestsConfiguration&&m),{data:f}=(0,d.JE)(void 0,{skip:h}),{data:v}=(0,d.PW)(void 0,{skip:h}),C=p.flags.privacyRequestsConfiguration&&(!f||!v)&&m;return(0,i.jsxs)(s.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,i.jsxs)(n(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(s.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[C?(0,i.jsx)(u,{}):null,l]})]})}},19904:function(e,l,t){"use strict";t.d(l,{Tg:function(){return n}});var i=t(24246),s=t(16134),a=t(31793);let n=e=>(0,s.C)(a.uu).filter(l=>e.includes(l)).length>0;l.ZP=e=>{let{scopes:l,children:t}=e;return n(l)?(0,i.jsx)(i.Fragment,{children:t}):null}},94799:function(e,l,t){"use strict";t.d(l,{k:function(){return a}});var i=t(76649);let s=e=>(0,i.Ln)({id:"string"},e),a=e=>(null!=e?e:[]).filter(s)},30320:function(e,l,t){"use strict";t.d(l,{m:function(){return r}});var i=t(27378),s=t(25980),a=t(41841),n=t(32885),o=t(94799);let r=e=>{let{resourceFidesKey:l,resourceType:t}=e,{errorAlert:r}=(0,a.VY)(),{plus:d}=(0,s.hz)(),c=(0,i.useMemo)(()=>null!=l?l:"",[]),u=(0,n.YU)(!0,{skip:!d}),p=(0,n.VN)(t,{skip:!d}),{data:x,isLoading:m,error:h,isError:f}=(0,n.PV)(null!=l?l:"",{skip:""!==c&&!(d&&c)}),[v]=(0,n._D)(),C=u.isLoading||p.isLoading||m,_=(0,i.useMemo)(()=>new Map((0,o.k)(u.data).map(e=>{var l;return[e.id,{...e,options:(null!==(l=e.allowed_values)&&void 0!==l?l:[]).map(e=>({value:e,label:e}))}]})),[u.data]),g=(0,i.useMemo)(()=>{var e;return null===(e=p.data)||void 0===e?void 0:e.filter(e=>e.active)},[p.data]),j=(0,i.useMemo)(()=>new Map((0,o.k)(g).map(e=>[e.id,e])),[g]),b=(0,i.useMemo)(()=>f&&(null==h?void 0:h.status)===404?new Map:new Map((0,o.k)(x).map(e=>[e.custom_field_definition_id,e])),[x,f,h]),y=(0,i.useMemo)(()=>{let e=[...j.keys()];return e.sort(),e},[j]),T=(0,i.useMemo)(()=>{let e={};return g&&b&&g.forEach(l=>{let t=b.get(l.id||"");t&&(l.allow_list_id&&"string[]"===l.field_type?e[t.custom_field_definition_id]=t.value:e[t.custom_field_definition_id]=t.value.toString())}),e},[g,b]),w=(0,i.useCallback)(async e=>{if(!d)return;let i="fides_key"in e&&""!==e.fides_key?e.fides_key:l;if(!i)return;let{customFieldValues:s}=e;if(!s||0===Object.keys(s).length)return;let a=[],n=[];y.forEach(e=>{let l=b.get(e),t=s[e];void 0===t||""===t||Array.isArray(t)&&0===t.length?(null==l?void 0:l.id)&&n.push(l.id):a.push({custom_field_definition_id:e,resource_id:i,id:null==l?void 0:l.id,value:t})});try{await v({resource_type:t,resource_id:i,upsert:a,delete:n})}catch(e){r("One or more custom fields have failed to save, please try again."),console.error(e)}},[d,b,r,l,y,v,t]);return{customFieldValues:T,definitionIdToCustomField:b,idToAllowListWithOptions:_,idToCustomFieldDefinition:j,isEnabled:d,isLoading:C,sortedCustomFieldDefinitionIds:y,upsertCustomFields:w}}},95346:function(e,l,t){"use strict";t.d(l,{uc:function(){return v},Hn:function(){return r},Uv:function(){return n},C7:function(){return d},mZ:function(){return f.m}});var i,s,a,n,o=t(54682);(i=a||(a={}))[i.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",i[i.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",i[i.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",o.AL.STRING,o.AL.STRING,o.AL.STRING_,(s=n||(n={})).SINGLE_SELECT="singleSelect",s.MULTIPLE_SELECT="multipleSelect",s.LOCATION_SELECT="locationSelect",s.OPEN_TEXT="openText";let r=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Location select",value:"locationSelect"},{label:"Open Text",value:"openText"}],d=[{label:"taxonomy:".concat(o.P6.DATA_CATEGORY),value:o.P6.DATA_CATEGORY},{label:"taxonomy:".concat(o.P6.DATA_SUBJECT),value:o.P6.DATA_SUBJECT},{label:"taxonomy:".concat(o.P6.DATA_USE),value:o.P6.DATA_USE},{label:"".concat(o.P6.SYSTEM,":information"),value:o.P6.SYSTEM},{label:"system:data use",value:o.P6.PRIVACY_DECLARATION}];var c=t(24246),u=t(96306),p=t(34090),x=t(30234),m=t(97181),h=t(40324),f=t(30320);let v=e=>{let{resourceFidesKey:l,resourceType:t}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:s,isEnabled:a,isLoading:n,sortedCustomFieldDefinitionIds:r}=(0,f.m)({resourceFidesKey:l,resourceType:t});return a&&0!==r.length?(0,c.jsx)(x.Z,{heading:"Custom fields",children:(0,c.jsx)(u.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(u.kCb,{flexDir:"column",gap:"24px",children:n?(0,c.jsx)(u.M5Y,{children:(0,c.jsx)(u.$jN,{})}):r.length>0&&(0,c.jsx)(u.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:r.map(e=>{let l=s.get(e);if(!l)return null;let t="customFieldValues.".concat(l.id);if(!l.allow_list_id&&l.field_type===o.AL.STRING)return(0,c.jsx)(p.gN,{name:t,children:e=>{let{field:t}=e;return(0,c.jsx)(h.j0,{...t,label:l.name,tooltip:l.description,variant:"stacked"})}},e);let a=i.get(l.allow_list_id);if(!a)return null;let{options:n}=a;return(0,c.jsx)(m.d,{name:t,allowClear:!0,mode:l.field_type!==o.AL.STRING?"multiple":void 0,label:l.name,options:n,tooltip:l.description,layout:"stacked",className:"w-full"},e)})})})})}):null};t(94799)},97181:function(e,l,t){"use strict";t.d(l,{d:function(){return d}});var i=t(24246),s=t(96306),a=t(34090),n=t(27378),o=t(46238),r=t(40324);let d=e=>{let{name:l,label:t,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:x,...m}=e,[h,f,{setValue:v}]=(0,a.U$)(l),C=!!(f.touched&&f.error),[_,g]=(0,n.useState)("");h.value||"tags"!==m.mode&&"multiple"!==m.mode||(h.value=[]),"tags"===m.mode&&"string"==typeof h.value&&(h.value=[h.value]);let j="tags"===m.mode?(e,l)=>e?e.value!==_||h.value.includes(_)?m.optionRender?m.optionRender(e,l):e.label:'Create "'.concat(_,'"'):void 0:m.optionRender||void 0,b=e=>{g(e),m.onSearch&&m.onSearch(e)},y=(e,l)=>{v(e),m.onChange&&m.onChange(e,l)};return"inline"===p?(0,i.jsx)(s.NIc,{isInvalid:C,isRequired:u,children:(0,i.jsxs)(s.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,i.jsx)(r.__,{htmlFor:m.id||l,...d,children:t}):null,(0,i.jsxs)(s.jqI,{align:"center",children:[(0,i.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(s.WPr,{...h,id:m.id||l,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:j,onSearch:"tags"===m.mode?b:void 0,onChange:y,value:h.value||void 0,status:C?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{children:x}),(0,i.jsx)(r.Bc,{isInvalid:C,message:f.error,fieldName:h.name})]}),(0,i.jsx)(o.b,{label:c,className:C?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(s.NIc,{isInvalid:C,isRequired:u,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[t?(0,i.jsx)(r.__,{htmlFor:m.id||l,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,i.jsx)(o.b,{label:c})]}),(0,i.jsx)(s.WPr,{...h,id:m.id||l,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:j,onSearch:"tags"===m.mode?b:void 0,onChange:y,value:h.value||void 0,status:C?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{style:{marginTop:0},children:x}),(0,i.jsx)(r.Bc,{isInvalid:C,message:f.error,fieldName:h.name})]})})}},10342:function(e,l,t){"use strict";var i=t(24246),s=t(96306),a=t(46238);l.Z=e=>{let{title:l,tooltip:t,children:n,...o}=e;return(0,i.jsxs)(s.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...o,children:[(0,i.jsxs)(s.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[l,t?(0,i.jsx)(s.xvT,{as:"span",mx:1,children:(0,i.jsx)(a.b,{label:t})}):void 0]}),(0,i.jsx)(s.Kqy,{p:6,spacing:6,children:n})]})}},30234:function(e,l,t){"use strict";var i=t(24246),s=t(96306);l.Z=e=>{let{heading:l,HeadingButton:t,children:a}=e;return(0,i.jsx)(s.Kqy,{spacing:4,children:(0,i.jsxs)(s.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,i.jsxs)(s.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,i.jsx)(s.X6q,{as:"h3",size:"xs",children:l}),t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.LZC,{}),(0,i.jsx)(t,{})]}):null]}),(0,i.jsx)(s.Kqy,{spacing:4,px:6,py:6,children:a})]})})}},78422:function(e,l,t){"use strict";t.r(l),t.d(l,{default:function(){return X}});var i=t(24246),s=t(77213),a=t(96306),n=t(27378),o=t(58754),r=t(92222),d=t(59003),c=t(16134),u=t(812),p=t(19904),x=t(47935),m=t(46628),h=t(72625),f=t(54682);let v=new Map([["string","Single Select"],["string[]","Multi Select"],["open-text","Open Text"]]),C=new Map([[f.P6.SYSTEM,"system:information"],[f.P6.DATA_USE,"taxonomy:data use"],[f.P6.DATA_CATEGORY,"taxonomy:data category"],[f.P6.DATA_SUBJECT,"taxonomy:data subject"],[f.P6.PRIVACY_DECLARATION,"system:data use"]]);var _=t(32885);let g=e=>{var l;let t=null!==(l=C.get(e.getValue()))&&void 0!==l?l:e.getValue();return(0,i.jsx)(h.G3,{...e,value:t})},j=e=>{let{row:l,getValue:t}=e,s=l.original.allow_list_id?t():"open-text",a=v.get(s)||s;return(0,i.jsx)(h.A4,{value:a})},b=e=>{let{row:l,getValue:t,isDisabled:s}=e,a=!!t(),[n]=(0,_.yM)(),o=async e=>n({...l.original,active:e});return(0,i.jsx)(h.S1,{enabled:a,onToggle:o,title:"Disable custom field",message:"Are you sure you want to disable this custom field?",isDisabled:s,"aria-label":a?"Disable custom field":"Enable custom field"})};var y=t(56358),T=t(58452);let w=e=>{let{customField:l,onEdit:t,onDelete:s,...n}=e,o=(0,a.qY0)();return(0,i.jsxs)(a.xuv,{...n,children:[(0,i.jsx)(a.wpx,{"aria-label":"Edit property","data-testid":"edit-property-button",size:"small",className:"mr-[10px]",icon:(0,i.jsx)(a.dY8,{}),onClick:e=>{e.stopPropagation(),t(l,e)}}),(0,i.jsx)(a.wpx,{"aria-label":"Delete property","data-testid":"delete-property-button",size:"small",className:"mr-[10px]",icon:(0,i.jsx)(y.q,{}),onClick:e=>{e.stopPropagation(),o.onOpen()}}),(0,i.jsx)(T.Z,{isOpen:o.isOpen,onClose:o.onClose,onConfirm:()=>{s(l),o.onClose()},title:"Delete custom field",message:(0,i.jsx)(a.xvT,{color:"gray.500",children:"Are you sure you want to delete this custom field? This will remove the custom field and all stored values and this action can't be undone."}),continueButtonText:"Confirm",isCentered:!0,icon:(0,i.jsx)(a.aNP,{})})]})};var E=t(34090),S=t(55484),L=t(95346),I=t(41841);let R={color:"gray.600",fontSize:"14px",fontWeight:"semibold",minWidth:"150px"};var A=e=>{let{customLabelProps:l,disabled:t=!1,isRequired:s=!1,label:n,type:o="text",placeholder:r,...d}=e,[c,u]=(0,E.U$)(d),{id:p,name:x,autoFocus:m}=d,h="custom-input-".concat(c.name);return(0,i.jsxs)(a.NIc,{display:"flex",isRequired:s,isInvalid:!!(u.error&&u.touched),children:[n&&(0,i.jsx)(a.lXp,{htmlFor:p||x,...l||R,children:n}),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,i.jsxs)(a.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,i.jsx)(a.zuI,{...c,autoComplete:"off",autoFocus:m,"data-testid":h}),(0,i.jsxs)(a.FiK,{children:[(0,i.jsx)(a.WQu,{}),(0,i.jsx)(a.Y_d,{})]})]}),"text"===o&&(0,i.jsx)(a.IIB,{...c,autoComplete:"off",autoFocus:m,color:"gray.700",isDisabled:t,placeholder:r,size:"sm","data-testid":h}),"textarea"===o&&(0,i.jsx)(a.gxH,{...c,autoComplete:"off",autoFocus:m,color:"gray.700",placeholder:r,resize:"none",size:"sm",value:c.value||"","data-testid":h}),(0,i.jsx)(a.J1D,{children:u.error})]})]})};let N=(0,a.IUT)({displayName:"AddIcon",viewBox:"0 0 10 10",path:(0,i.jsx)("path",{d:"M4.33331 4.33398V0.333984H5.66665V4.33398H9.66665V5.66732H5.66665V9.66732H4.33331V5.66732H0.333313V4.33398H4.33331Z",fill:"currentColor"})});var M=t(10342),O=t(95492),P=t(97181);let k={...R,minWidth:"unset"},U=e=>{let{values:l,validationSchema:t,errors:s,dirty:o,isValid:r,isSubmitting:d,isLoading:c,onClose:u,handleDropdownChange:p,isEditing:x}=e,{validateForm:m}=(0,E.u6)();return(0,n.useEffect)(()=>{m()},[t,m]),(0,i.jsxs)(E.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(M.Z,{title:"Field Information",children:[(0,i.jsx)(A,{isRequired:!0,label:"Name",name:"name",customLabelProps:k}),(0,i.jsx)(A,{label:"Description",name:"description",customLabelProps:k}),(0,i.jsx)(P.d,{label:"Location",name:"resource_type",options:L.C7,labelProps:k,disabled:x})]})}),(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(M.Z,{title:"Configuration",children:[(0,i.jsx)(P.d,{label:"Field Type",name:"field_type",labelProps:k,options:L.Hn,onChange:p}),l.field_type!==L.Uv.OPEN_TEXT&&l.field_type!==L.Uv.LOCATION_SELECT?(0,i.jsx)(a.kCb,{flexDirection:"column",gap:"12px",paddingTop:"6px",paddingBottom:"24px",children:(0,i.jsx)(E.F2,{name:"allow_list.allowed_values",render:e=>{let{allowed_values:t}=l.allow_list;return(0,i.jsxs)(a.kCb,{flexDirection:"column",gap:"6",pl:"6",children:[(0,i.jsx)(a.kCb,{flexDirection:"column",children:t.map((l,s)=>(0,i.jsxs)(a.kCb,{flexGrow:1,gap:"3",mt:s>0?3:void 0,children:[(0,i.jsx)(A,{customLabelProps:{color:"gray.600",fontSize:"sm",fontWeight:"500",lineHeight:"20px",minW:"126px",pr:"8px"},isRequired:!0,label:"List item ".concat(s+1),name:"allow_list.allowed_values[".concat(s,"]")}),(0,i.jsx)(a.wpx,{"aria-label":"Remove this list value","data-testid":"remove-list-value-btn-".concat(s),icon:(0,i.jsx)(O.l,{}),disabled:t.length<=1,onClick:()=>e.remove(s),type:"text"})]},s))}),(0,i.jsxs)(a.kCb,{alignItems:"center",children:[(0,i.jsx)(a.xvT,{color:"gray.600",fontSize:"xs",fontWeight:"500",lineHeight:"16px",pr:"8px",children:"Add a list value"}),(0,i.jsx)(a.wpx,{"aria-label":"Add a list value","data-testid":"add-list-value-btn",icon:(0,i.jsx)(N,{h:"7px",w:"7px"}),onClick:()=>{e.push("")},size:"small"}),0===t.length&&(null==s?void 0:s.allow_list)?(0,i.jsx)(a.xvT,{color:"red.500",pl:"18px",size:"sm",children:s.allow_list.allowed_values}):null]})]})}})}):null]})}),(0,i.jsxs)(a.kCb,{justifyContent:"space-between",width:"100%",children:[(0,i.jsx)(a.wpx,{onClick:u,disabled:c||d,className:"mr-3","data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",loading:c,disabled:!o||!r||d,children:"Save"})]})]})},D={description:"",field_type:L.Uv.OPEN_TEXT,name:"",resource_type:f.P6.SYSTEM,allow_list:{name:"",description:"",allowed_values:[]}},H=S.IX(S.Z_().optional().label("allowed_values")),V=S.IX(S.Z_().required("List item is required")).min(1,"Must add at least one list value").label("allowed_values"),F=S.Ry().shape({name:S.Z_().required("Name is required").trim(),allow_list:S.Ry().shape({allowed_values:H})}),Z=S.Ry().shape({name:S.Z_().required("Name is required").trim(),allow_list:S.Ry().shape({allowed_values:V})}),z=(e,l)=>{var t,i,s;let a;if(!e)return;e.field_type!==f.AL.STRING||e.allow_list_id||(a=L.Uv.OPEN_TEXT),e.field_type===f.AL.STRING&&e.allow_list_id&&(a=L.Uv.SINGLE_SELECT),e.field_type===f.AL.STRING_&&e.allow_list_id&&(a=L.Uv.MULTIPLE_SELECT);let n=l?{name:null!==(t=l.name)&&void 0!==t?t:"",description:null!==(i=l.description)&&void 0!==i?i:"",allowed_values:null!==(s=l.allowed_values)&&void 0!==s?s:[]}:D.allow_list;return{...e,field_type:a||L.Uv.OPEN_TEXT,allow_list:n}},q=e=>{let{isOpen:l,onClose:t,isLoading:s,customField:o}=e,{errorAlert:r,successAlert:d}=(0,I.VY)(),[c]=(0,_.Ld)(),[p]=(0,_.yM)(),[x]=(0,_.Nt)(),{data:m,isLoading:h}=(0,_.vA)(null==o?void 0:o.allow_list_id,{skip:!(null==o?void 0:o.allow_list_id)}),[v,C]=(0,n.useState)(F);if(h||!l)return null;let g=z(o,m),j=!!g,b=e=>{e===L.Uv.OPEN_TEXT||e===L.Uv.LOCATION_SELECT?C(F):C(Z)},y=async e=>{if([L.Uv.SINGLE_SELECT,L.Uv.MULTIPLE_SELECT].includes(e.field_type)){var l,i;if(new Set(null===(l=e.allow_list)||void 0===l?void 0:l.allowed_values.map(e=>e.toLowerCase().trim()).map(e=>e)).size<e.allow_list.allowed_values.length){r("List item value must be unique");return}let{allow_list:t}=e;e.allow_list_id&&(t.id=e.allow_list_id),t.name||(t.name=Date.now().toString()+Math.random().toString());let s=await x(t);(0,u.D4)(s)||e.allow_list_id||(e.allow_list_id=null===(i=s.data)||void 0===i?void 0:i.id)}(e.field_type===L.Uv.OPEN_TEXT||e.field_type===L.Uv.LOCATION_SELECT)&&(e.allow_list_id=void 0),[L.Uv.SINGLE_SELECT,L.Uv.OPEN_TEXT,L.Uv.LOCATION_SELECT].includes(e.field_type)&&(e.field_type=f.AL.STRING),e.field_type===L.Uv.MULTIPLE_SELECT&&(e.field_type=f.AL.STRING_);let s={...e};delete s.allow_list;let a=o?await p(s):await c(s);(0,u.D4)(a)?r((0,u.e$)(a.error),"Custom field has failed to save due to the following:"):(t(),d("Custom field successfully saved"))};return(0,i.jsxs)(a.u_l,{id:"custom-field-modal-hello-world",isOpen:l,onClose:t,size:"lg",returnFocusOnClose:!1,isCentered:!0,children:[(0,i.jsx)(a.ZAr,{}),(0,i.jsxs)(a.hzk,{id:"modal-content","data-testid":"custom-field-modal",maxHeight:"80%",overflowY:"auto",children:[(0,i.jsx)(a.xBx,{id:"modal-header",fontWeight:"semibold",lineHeight:5,fontSize:"sm",py:"18px",px:6,height:"56px",backgroundColor:"gray.50",borderColor:"gray.200",borderWidth:"0px 0px 1px 1p",borderTopRightRadius:"8px",borderTopLeftRadius:"8px",boxSizing:"border-box",children:o?"Manage Custom Field":"Add a custom field"}),(0,i.jsx)(a.fef,{px:6,py:0,children:(0,i.jsx)(E.J9,{initialValues:g||D,validationSchema:v,onSubmit:y,enableReinitialize:!0,validateOnChange:!0,children:e=>(0,i.jsx)(U,{isEditing:j,validationSchema:v,isLoading:s,onClose:t,handleDropdownChange:b,...e})})})]})]})},W="Add a custom field",G=()=>(0,i.jsx)(a.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,i.jsxs)(a.gCW,{children:[(0,i.jsx)(a.xvT,{fontSize:"md",fontWeight:"600",children:"It looks like it’s your first time here!"}),(0,i.jsxs)(a.xvT,{fontSize:"sm",children:["You haven’t created any custom fields yet.",(0,i.jsx)("br",{}),"To create a custom field, click on the"," ",(0,i.jsxs)("strong",{children:['"',W,'"']})," button"]})]})}),Y=(0,r.Cl)(),B=e=>{let{...l}=e,t=(0,a.pmc)(),{isLoading:s}=(0,_.GH)(),o=(0,c.C)(_.fN),[h]=(0,_.UF)(),{isOpen:v,onClose:C,onOpen:y}=(0,a.qY0)(),[T,E]=(0,n.useState)(),[S,L]=(0,n.useState)(),I=(0,p.Tg)([f.Sh.CUSTOM_FIELD_UPDATE]),R=(0,p.Tg)([f.Sh.CUSTOM_FIELD_DELETE]),A=e=>{I&&(E(e),y())},N=async e=>{if(R&&e.id){let l=await h({id:e.id});if((0,u.D4)(l)){t((0,m.Vo)((0,u.e$)(l.error)));return}t((0,m.t5)("Custom field deleted"))}},M=(0,n.useMemo)(()=>[Y.accessor(e=>e.name,{id:"name",cell:e=>(0,i.jsx)(x.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,i.jsx)(x.Rr,{value:"Label",...e})}),Y.accessor(e=>e.description,{id:"description",cell:e=>(0,i.jsx)(x.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,i.jsx)(x.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),Y.accessor(e=>e.field_type,{id:"field_type",cell:j,header:e=>(0,i.jsx)(x.Rr,{value:"Field Type",...e})}),Y.accessor(e=>e.resource_type,{id:"resource_type",cell:g,header:e=>(0,i.jsx)(x.Rr,{value:"Locations",...e})}),I&&Y.accessor(e=>e.active,{id:"enable",cell:b,header:e=>(0,i.jsx)(x.Rr,{value:"Enable",...e}),meta:{disableRowClick:!0}}),(I||R)&&Y.display({id:"actions",header:"Actions",cell:e=>{let{row:l}=e;return(0,i.jsx)(w,{customField:l.original,onEdit:A,onDelete:N})},meta:{disableRowClick:!0}})].filter(Boolean),[R,I]),O=(0,d.b7)({getCoreRowModel:(0,r.sC)(),getFilteredRowModel:(0,r.vL)(),getSortedRowModel:(0,r.tj)(),onGlobalFilterChange:L,globalFilterFn:"includesString",columns:M,data:o,state:{globalFilter:S},columnResizeMode:"onChange"});return(0,i.jsxs)(a.xuv,{...l,children:[(0,i.jsx)(a.xuv,{maxWidth:600,children:(0,i.jsx)(a.xvT,{mb:10,fontSize:"sm",children:o.length>0?"Custom fields enable you to capture metrics specific to your organization and have those metrics appear in the data map and in reports.":"Custom fields provide organizations with the capability to capture metrics that are unique to their specific needs, allowing them to create customized reports. These fields can be added to either systems or elements within a taxonomy, and once added, they become reportable fields that are visible on the data map."})}),(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-page",children:[(0,i.jsxs)(x.Q$,{children:[(0,i.jsx)(x.HO,{globalFilter:S,setGlobalFilter:L,placeholder:"Search for a custom field"}),(0,i.jsx)(a.Ugi,{alignItems:"center",spacing:4,children:(0,i.jsx)(()=>(0,i.jsx)(p.ZP,{scopes:[f.Sh.CUSTOM_FIELD_DEFINITION_CREATE],children:(0,i.jsx)(a.wpx,{type:"primary","data-testid":"add-custom-field-btn",onClick:y,children:W})}),{})})]}),s?(0,i.jsx)(a.xuv,{p:2,borderWidth:1,children:(0,i.jsx)(x.I4,{rowHeight:26,numRows:10})}):(0,i.jsx)(x.ZK,{tableInstance:O,onRowClick:I?A:void 0,emptyTableNotice:(0,i.jsx)(G,{}),enableSorting:!0}),v&&(0,i.jsx)(q,{customField:T,isOpen:v,onClose:()=>{E(void 0),C()},isLoading:!1})]})]})};var X=()=>(0,i.jsx)(s.Z,{title:"Custom fields",children:(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-management",children:[(0,i.jsx)(o.Z,{heading:"Custom fields"}),(0,i.jsx)(B,{})]})})}},function(e){e.O(0,[431,4164,2888,9774,179],function(){return e(e.s=70378)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3691],{8828:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]",function(){return s(82657)}])},18225:function(e,t,s){"use strict";var n=s(24246),i=s(96306);t.Z=e=>{let{alignment:t="center",...s}=e;return(0,n.jsx)(i.kCb,{boxSize:"full",align:"center",justify:t,children:(0,n.jsx)(i.$jN,{color:"primary",...s})})}},82657:function(e,t,s){"use strict";s.r(t);var n=s(24246),i=s(96306),r=s(86677),a=s(27378),l=s(16134),d=s(25980),u=s(18225),c=s(812),o=s(14048),f=s(77213),x=s(77830),h=s(58754),m=s(32885),y=s(1315),j=s(57865),g=s(72774),_=s(72250);t.default=()=>{let e=(0,r.useRouter)(),t=(0,l.T)(),s="";e.query.id&&(s=Array.isArray(e.query.id)?e.query.id[0]:e.query.id);let{data:p,isLoading:b}=(0,y.rn)(s,{skip:!s}),{error:v,isLoading:w}=(0,m.Rd)(),{tcf:C,plus:N}=(0,d.hz)(),Z=(0,l.C)(j.gU);(0,a.useEffect)(()=>{if(t((0,y.db)(p)),p){let e=C&&!!p.vendor_id&&(0,c.cj)(p.vendor_id)===c.c6.GVL;t((0,j.gQ)(e))}else(0,j.gQ)(!1)},[p,t,C]);let{tabData:k,activeKey:E,onTabChange:S}=(0,_.Z)({isCreate:!1});return(b||w)&&!v?(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsx)(u.Z,{})}):p?(0,n.jsxs)(f.Z,{title:"System inventory",mainProps:{w:"calc(100vw - 240px)"},children:[(0,n.jsx)(h.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems",href:x.So},{title:(null==p?void 0:p.name)||""}]}),(0,n.jsx)(i.A5g,{activeKey:E,onChange:S,items:k,className:"w-full",tabBarExtraContent:N&&(0,n.jsxs)(i.wpx,{size:"small",className:"absolute right-2 top-2","data-testid":"integration-page-btn",onClick:()=>e.push(x.KH),children:[(0,n.jsx)(i.xvT,{children:"Integrations"}),(0,n.jsx)(o.A5,{marginLeft:2})]}),renderTabBar:(e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t,{...e}),Z&&(0,n.jsx)(g.Z,{})]})})]}):(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsxs)(i.xvT,{"data-testid":"system-not-found",children:["Could not find a system with id ",s]})})}}},function(e){e.O(0,[8765,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3691],{8828:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]",function(){return s(82657)}])},18225:function(e,t,s){"use strict";var n=s(24246),i=s(96306);t.Z=e=>{let{alignment:t="center",...s}=e;return(0,n.jsx)(i.kCb,{boxSize:"full",align:"center",justify:t,children:(0,n.jsx)(i.$jN,{color:"primary",...s})})}},82657:function(e,t,s){"use strict";s.r(t);var n=s(24246),i=s(96306),r=s(86677),a=s(27378),l=s(16134),d=s(25980),u=s(18225),c=s(812),o=s(14048),f=s(77213),x=s(77830),h=s(58754),m=s(32885),y=s(1315),j=s(57865),g=s(72774),_=s(72250);t.default=()=>{let e=(0,r.useRouter)(),t=(0,l.T)(),s="";e.query.id&&(s=Array.isArray(e.query.id)?e.query.id[0]:e.query.id);let{data:p,isLoading:b}=(0,y.rn)(s,{skip:!s}),{error:v,isLoading:w}=(0,m.Rd)(),{tcf:C,plus:N}=(0,d.hz)(),Z=(0,l.C)(j.gU);(0,a.useEffect)(()=>{if(t((0,y.db)(p)),p){let e=C&&!!p.vendor_id&&(0,c.cj)(p.vendor_id)===c.c6.GVL;t((0,j.gQ)(e))}else(0,j.gQ)(!1)},[p,t,C]);let{tabData:k,activeKey:E,onTabChange:S}=(0,_.Z)({isCreate:!1});return(b||w)&&!v?(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsx)(u.Z,{})}):p?(0,n.jsxs)(f.Z,{title:"System inventory",mainProps:{w:"calc(100vw - 240px)"},children:[(0,n.jsx)(h.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems",href:x.So},{title:(null==p?void 0:p.name)||""}]}),(0,n.jsx)(i.A5g,{activeKey:E,onChange:S,items:k,className:"w-full",tabBarExtraContent:N&&(0,n.jsxs)(i.wpx,{size:"small",className:"absolute right-2 top-2","data-testid":"integration-page-btn",onClick:()=>e.push(x.KH),children:[(0,n.jsx)(i.xvT,{children:"Integrations"}),(0,n.jsx)(o.A5,{marginLeft:2})]}),renderTabBar:(e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t,{...e}),Z&&(0,n.jsx)(g.Z,{})]})})]}):(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsxs)(i.xvT,{"data-testid":"system-not-found",children:["Could not find a system with id ",s]})})}}},function(e){e.O(0,[431,8765,9278,5163,699,5277,4164,401,9951,4808,4844,4786,2888,9774,179],function(){return e(e.s=8828)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4202],{96586:function(e,t,n){var r=n(57753),i=n(82452),o=n(22115),a=n(38256),l=n(67426);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},36301:function(e,t,n){var r=n(69417),i=n(72470),o=n(66165),a=n(71873),l=n(52556);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},44538:function(e,t,n){var r=n(81822)(n(77400),"Map");e.exports=r},74554:function(e,t,n){var r=n(39448),i=n(7738),o=n(66575),a=n(7238),l=n(38738);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},46151:function(e,t,n){var r=n(81822)(n(77400),"Set");e.exports=r},52485:function(e,t,n){var r=n(74554),i=n(38639),o=n(88379);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},93382:function(e,t,n){var r=n(85638);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return -1}},46729:function(e,t,n){var r=n(28338),i=n(99678),o=n(11611),a=n(76532),l=/^\[object .+?Constructor\]$/,s=Object.prototype,u=Function.prototype.toString,c=s.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:l).test(a(e))}},75733:function(e){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},70830:function(e,t,n){var r=n(76747),i=n(31159),o=n(64373),a=n(37948);e.exports=function(e,t){return t=r(t,e),null==(e=o(e,t))||delete e[a(i(t))]}},65581:function(e){e.exports=function(e,t){return e.has(t)}},64937:function(e,t,n){var r=n(77400)["__core-js_shared__"];e.exports=r},95899:function(e,t,n){var r=n(54479);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},81822:function(e,t,n){var r=n(46729),i=n(15371);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},15371:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},57753:function(e,t,n){var r=n(35718);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},82452:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},22115:function(e,t,n){var r=n(35718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},38256:function(e,t,n){var r=n(35718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},67426:function(e,t,n){var r=n(35718);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},54479:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},99678:function(e,t,n){var r,i=n(64937),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},69417:function(e){e.exports=function(){this.__data__=[],this.size=0}},72470:function(e,t,n){var r=n(93382),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},66165:function(e,t,n){var r=n(93382);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},71873:function(e,t,n){var r=n(93382);e.exports=function(e){return r(this.__data__,e)>-1}},52556:function(e,t,n){var r=n(93382);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},39448:function(e,t,n){var r=n(96586),i=n(36301),o=n(44538);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},7738:function(e,t,n){var r=n(95899);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},66575:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).get(e)}},7238:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).has(e)}},38738:function(e,t,n){var r=n(95899);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},35718:function(e,t,n){var r=n(81822)(Object,"create");e.exports=r},64373:function(e,t,n){var r=n(79867),i=n(75733);e.exports=function(e,t){return t.length<2?e:r(e,i(t,0,-1))}},38639:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},88379:function(e){e.exports=function(e){return this.__data__.has(e)}},43735:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},76532:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},85638:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},28338:function(e,t,n){var r=n(99736),i=n(11611);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},43551:function(e,t,n){var r=n(70830);e.exports=function(e,t){return null==e||r(e,t)}},71180:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/taxonomy",function(){return n(62e3)}])},79806:function(e,t,n){"use strict";n.d(t,{Gn:function(){return l},zR:function(){return a}});var r=n(24246),i=n(96306),o=n(56358);let a=e=>{let{title:t}=e;return(0,r.jsx)(i.OXI,{py:0,display:"flex",alignItems:"flex-start",children:(0,r.jsx)(i.xvT,{mr:"2",color:"gray.700",fontSize:"lg",lineHeight:1.8,children:t})})},l=e=>{let{onDelete:t,onEditYaml:n,formId:a,isSaving:l}=e;return(0,r.jsxs)(i.zeN,{justifyContent:"space-between",children:[t?(0,r.jsx)(i.wpx,{"aria-label":"delete",icon:(0,r.jsx)(o.q,{fontSize:"small"}),onClick:t,"data-testid":"delete-btn"}):null,(0,r.jsxs)("div",{className:"flex gap-2",children:[n&&(0,r.jsx)(i.wpx,{onClick:n,"data-testid":"edit-yaml-btn",children:"Edit YAML"}),(0,r.jsx)(i.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:a,loading:l,children:"Save"})]})]})};t.ZP=e=>{let{header:t,description:n,isOpen:o,onClose:a,children:l,footer:s}=e;return(0,r.jsxs)(i.dys,{placement:"right",isOpen:o,onClose:a,size:"md",children:[(0,r.jsx)(i.P1B,{}),(0,r.jsxs)(i.scA,{"data-testid":"edit-drawer-content",py:2,children:[(0,r.jsxs)(i.xuv,{display:"flex",justifyContent:"space-between",alignItems:"top",mr:2,py:2,gap:2,children:[(0,r.jsx)(i.xuv,{flex:1,minH:8,children:t}),(0,r.jsx)(i.xuv,{display:"flex",justifyContent:"flex-end",mr:2,children:(0,r.jsx)(i.wpx,{"aria-label":"Close editor",onClick:a,"data-testid":"close-drawer-btn",icon:(0,r.jsx)(i.Two,{fontSize:"smaller"})})})]}),(0,r.jsxs)(i.Ng0,{pt:1,children:[n?(0,r.jsx)(i.xvT,{fontSize:"sm",mb:4,color:"gray.600",children:n}):null,l]}),s]})]})}},18225:function(e,t,n){"use strict";var r=n(24246),i=n(96306);t.Z=e=>{let{alignment:t="center",...n}=e;return(0,r.jsx)(i.kCb,{boxSize:"full",align:"center",justify:t,children:(0,r.jsx)(i.$jN,{color:"primary",...n})})}},56358:function(e,t,n){"use strict";n.d(t,{q:function(){return i}});var r=n(24246);let i=(0,n(96306).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,r.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(24246),i=n(96306),o=n(88038),a=n.n(o),l=n(86677);n(27378);var s=n(25980),u=n(90867),c=n(77830),d=()=>{let e=(0,l.useRouter)();return(0,r.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(i.xuv,{children:[(0,r.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(i.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,r.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:t,title:n,padded:o=!0,mainProps:c}=e,h=(0,s.hz)(),f=(0,l.useRouter)(),p="/privacy-requests"===f.pathname||"/datastore-connection"===f.pathname,x=!(h.flags.privacyRequestsConfiguration&&p),{data:m}=(0,u.JE)(void 0,{skip:x}),{data:_}=(0,u.PW)(void 0,{skip:x}),v=h.flags.privacyRequestsConfiguration&&(!m||!_)&&p;return(0,r.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,r.jsxs)(a(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(i.kCb,{as:"main",direction:"column",py:o?6:0,px:o?10:0,h:o?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,r.jsx)(d,{}):null,t]})]})}},19904:function(e,t,n){"use strict";n.d(t,{Tg:function(){return a}});var r=n(24246),i=n(16134),o=n(31793);let a=e=>(0,i.C)(o.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,r.jsx)(r.Fragment,{children:n}):null}},94799:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(76649);let i=e=>(0,r.Ln)({id:"string"},e),o=e=>(null!=e?e:[]).filter(i)},30320:function(e,t,n){"use strict";n.d(t,{m:function(){return s}});var r=n(27378),i=n(25980),o=n(75573),a=n(32885),l=n(94799);let s=e=>{let{resourceFidesKey:t,resourceType:n}=e,{errorAlert:s}=(0,o.VY)(),{plus:u}=(0,i.hz)(),c=(0,r.useMemo)(()=>null!=t?t:"",[]),d=(0,a.YU)(!0,{skip:!u}),h=(0,a.VN)(n,{skip:!u}),{data:f,isLoading:p,error:x,isError:m}=(0,a.PV)(null!=t?t:"",{skip:""!==c&&!(u&&c)}),[_]=(0,a._D)(),v=d.isLoading||h.isLoading||p,y=(0,r.useMemo)(()=>new Map((0,l.k)(d.data).map(e=>{var t;return[e.id,{...e,options:(null!==(t=e.allowed_values)&&void 0!==t?t:[]).map(e=>({value:e,label:e}))}]})),[d.data]),g=(0,r.useMemo)(()=>{var e;return null===(e=h.data)||void 0===e?void 0:e.filter(e=>e.active)},[h.data]),T=(0,r.useMemo)(()=>new Map((0,l.k)(g).map(e=>[e.id,e])),[g]),E=(0,r.useMemo)(()=>m&&(null==x?void 0:x.status)===404?new Map:new Map((0,l.k)(f).map(e=>[e.custom_field_definition_id,e])),[f,m,x]),j=(0,r.useMemo)(()=>{let e=[...T.keys()];return e.sort(),e},[T]),C=(0,r.useMemo)(()=>{let e={};return g&&E&&g.forEach(t=>{let n=E.get(t.id||"");n&&(t.allow_list_id&&"string[]"===t.field_type?e[n.custom_field_definition_id]=n.value:e[n.custom_field_definition_id]=n.value.toString())}),e},[g,E]),A=(0,r.useCallback)(async e=>{if(!u)return;let r="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!r)return;let{customFieldValues:i}=e;if(!i||0===Object.keys(i).length)return;let o=[],a=[];j.forEach(e=>{let t=E.get(e),n=i[e];void 0===n||""===n||Array.isArray(n)&&0===n.length?(null==t?void 0:t.id)&&a.push(t.id):o.push({custom_field_definition_id:e,resource_id:r,id:null==t?void 0:t.id,value:n})});try{await _({resource_type:n,resource_id:r,upsert:o,delete:a})}catch(e){s("One or more custom fields have failed to save, please try again."),console.error(e)}},[u,E,s,t,j,_,n]);return{customFieldValues:C,definitionIdToCustomField:E,idToAllowListWithOptions:y,idToCustomFieldDefinition:T,isEnabled:u,isLoading:v,sortedCustomFieldDefinitionIds:j,upsertCustomFields:A}}},95346:function(e,t,n){"use strict";n.d(t,{uc:function(){return _},Hn:function(){return s},Uv:function(){return a},C7:function(){return u},mZ:function(){return m.m}});var r,i,o,a,l=n(54682);(r=o||(o={}))[r.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",r[r.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",r[r.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",l.AL.STRING,l.AL.STRING,l.AL.STRING_,(i=a||(a={})).SINGLE_SELECT="singleSelect",i.MULTIPLE_SELECT="multipleSelect",i.LOCATION_SELECT="locationSelect",i.OPEN_TEXT="openText";let s=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Location select",value:"locationSelect"},{label:"Open Text",value:"openText"}],u=[{label:"taxonomy:".concat(l.P6.DATA_CATEGORY),value:l.P6.DATA_CATEGORY},{label:"taxonomy:".concat(l.P6.DATA_SUBJECT),value:l.P6.DATA_SUBJECT},{label:"taxonomy:".concat(l.P6.DATA_USE),value:l.P6.DATA_USE},{label:"".concat(l.P6.SYSTEM,":information"),value:l.P6.SYSTEM},{label:"system:data use",value:l.P6.PRIVACY_DECLARATION}];var c=n(24246),d=n(96306),h=n(34090),f=n(30234),p=n(97181),x=n(40324),m=n(30320);let _=e=>{let{resourceFidesKey:t,resourceType:n}=e,{idToAllowListWithOptions:r,idToCustomFieldDefinition:i,isEnabled:o,isLoading:a,sortedCustomFieldDefinitionIds:s}=(0,m.m)({resourceFidesKey:t,resourceType:n});return o&&0!==s.length?(0,c.jsx)(f.Z,{heading:"Custom fields",children:(0,c.jsx)(d.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(d.kCb,{flexDir:"column",gap:"24px",children:a?(0,c.jsx)(d.M5Y,{children:(0,c.jsx)(d.$jN,{})}):s.length>0&&(0,c.jsx)(d.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:s.map(e=>{let t=i.get(e);if(!t)return null;let n="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===l.AL.STRING)return(0,c.jsx)(h.gN,{name:n,children:e=>{let{field:n}=e;return(0,c.jsx)(x.j0,{...n,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let o=r.get(t.allow_list_id);if(!o)return null;let{options:a}=o;return(0,c.jsx)(p.d,{name:n,allowClear:!0,mode:t.field_type!==l.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};n(94799)},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var r=n(24246),i=n(96306),o=n(34090),a=n(27378),l=n(46238),s=n(40324);let u=e=>{let{name:t,label:n,labelProps:u,tooltip:c,isRequired:d,layout:h="inline",helperText:f,...p}=e,[x,m,{setValue:_}]=(0,o.U$)(t),v=!!(m.touched&&m.error),[y,g]=(0,a.useState)("");x.value||"tags"!==p.mode&&"multiple"!==p.mode||(x.value=[]),"tags"===p.mode&&"string"==typeof x.value&&(x.value=[x.value]);let T="tags"===p.mode?(e,t)=>e?e.value!==y||x.value.includes(y)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:p.optionRender||void 0,E=e=>{g(e),p.onSearch&&p.onSearch(e)},j=(e,t)=>{_(e),p.onChange&&p.onChange(e,t)};return"inline"===h?(0,r.jsx)(i.NIc,{isInvalid:v,isRequired:d,children:(0,r.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,r.jsx)(s.__,{htmlFor:p.id||t,...u,children:n}):null,(0,r.jsxs)(i.jqI,{align:"center",children:[(0,r.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(i.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:T,onSearch:"tags"===p.mode?E:void 0,onChange:j,value:x.value||void 0,status:v?"error":void 0}),f&&(0,r.jsx)(i.Q6r,{children:f}),(0,r.jsx)(s.Bc,{isInvalid:v,message:m.error,fieldName:x.name})]}),(0,r.jsx)(l.b,{label:c,className:v?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(i.NIc,{isInvalid:v,isRequired:d,children:(0,r.jsxs)(i.gCW,{alignItems:"start",children:[(0,r.jsxs)(i.jqI,{align:"center",children:[n?(0,r.jsx)(s.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...u,children:n}):null,(0,r.jsx)(l.b,{label:c})]}),(0,r.jsx)(i.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:T,onSearch:"tags"===p.mode?E:void 0,onChange:j,value:x.value||void 0,status:v?"error":void 0}),f&&(0,r.jsx)(i.Q6r,{style:{marginTop:0},children:f}),(0,r.jsx)(s.Bc,{isInvalid:v,message:m.error,fieldName:x.name})]})})}},30234:function(e,t,n){"use strict";var r=n(24246),i=n(96306);t.Z=e=>{let{heading:t,HeadingButton:n,children:o}=e;return(0,r.jsx)(i.Kqy,{spacing:4,children:(0,r.jsxs)(i.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,r.jsxs)(i.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,r.jsx)(i.X6q,{as:"h3",size:"xs",children:t}),n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.LZC,{}),(0,r.jsx)(n,{})]}):null]}),(0,r.jsx)(i.Kqy,{spacing:4,px:6,py:6,children:o})]})})}},59001:function(e,t,n){"use strict";n.d(t,{Ch:function(){return a},Hy:function(){return l},Lo:function(){return i}});var r,i,o=n(54682);let a="root";(r=i||(i={})).DATA_CATEGORIES="Data categories",r.DATA_USES="Data uses",r.DATA_SUBJECTS="Data subjects";let l=e=>{switch(e){case"Data categories":return{UPDATE:o.Sh.DATA_CATEGORY_UPDATE,CREATE:o.Sh.DATA_CATEGORY_CREATE,DELETE:o.Sh.DATA_CATEGORY_DELETE,READ:o.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:o.Sh.DATA_USE_UPDATE,CREATE:o.Sh.DATA_USE_CREATE,DELETE:o.Sh.DATA_USE_DELETE,READ:o.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:o.Sh.DATA_SUBJECT_UPDATE,CREATE:o.Sh.DATA_SUBJECT_CREATE,DELETE:o.Sh.DATA_SUBJECT_DELETE,READ:o.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,n){"use strict";n.d(t,{Cd:function(){return o},Xl:function(){return a}});var r=n(54682),i=n(59001);let o=(e,t)=>{let n;if(null==t&&e.every(e=>void 0===e.parent_key))n=e;else{let r=null!=t?t:null;n=e.filter(e=>e.parent_key===r)}return n.map(t=>{var n,r;let i=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:o(e,i),is_default:null!==(n=t.is_default)&&void 0!==n&&n,active:null!==(r=t.active)&&void 0!==r&&r}})},a=e=>{switch(e){case i.Lo.DATA_CATEGORIES:return r.P6.DATA_CATEGORY;case i.Lo.DATA_SUBJECTS:return r.P6.DATA_SUBJECT;case i.Lo.DATA_USES:return r.P6.DATA_USE;default:return}}},62e3:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eg}});var r,i,o=n(24246),a=n(96306),l=n(69238),s=n.n(l),u=n(63662),c=n(27378),d=n(812),h=n(77213),f=n(58754),p=n(19904),x=n(46628),m=n(95346),_=n(56358),v=n(31883),y=n(79806),g=n(59001),T=n(90673),E=n(30002),j=n(28079),C=n(39864),A=e=>{let{taxonomyType:t}=e,[n,r]=(0,C.Vj)(),[i,o]=(0,E.nC)(),[a,l]=(0,j.dk)(),[s]=(0,C.Ti)(),[u]=(0,j.Ql)(),[c]=(0,E.wG)(),[d]=(0,C.jU)(),[h]=(0,j.LG)(),[f]=(0,E.h8)(),[p]=(0,C.K9)(),[x]=(0,j.gu)(),[m]=(0,E.Kv)();return t===g.Lo.DATA_SUBJECTS?{getAllTrigger:i,taxonomyItems:o.data||[],updateTrigger:f,deleteTrigger:m,createTrigger:c}:t===g.Lo.DATA_USES?{getAllTrigger:a,taxonomyItems:l.data||[],updateTrigger:h,deleteTrigger:x,createTrigger:u}:{getAllTrigger:n,taxonomyItems:r.data||[],updateTrigger:d,deleteTrigger:p,createTrigger:s}},b=n(90104),S=n.n(b),I=n(18225),w=n(54682),N=e=>{let{customFields:t,formId:n,form:r}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:l,isEnabled:s,isLoading:u,sortedCustomFieldDefinitionIds:c}=t;return s&&0!==c.length?(0,o.jsxs)(a.PPS,{form:r,name:n,initialValues:t.customFieldValues,layout:"vertical","data-testid":"custom-fields-form",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(a.AntTypography.Title,{level:3,children:"Custom fields"})}),u?(0,o.jsx)(I.Z,{}):(0,o.jsx)("div",{children:!S()(c)&&(0,o.jsx)("div",{children:c.map(e=>{let t=l.get(e);if(!t)return null;let{id:n,name:r,description:s,allow_list_id:u,field_type:c}=t;if(!u&&c===w.AL.STRING)return(0,o.jsx)(a.PPS.Item,{name:n,label:r,tooltip:s,children:(0,o.jsx)(a.uFc,{})},e);let d=i.get(t.allow_list_id);if(!d)return null;let{options:h}=d;return(0,o.jsx)(a.PPS.Item,{name:n,label:r,tooltip:s,children:(0,o.jsx)(a.WPr,{mode:"string"!==c?"multiple":void 0,allowClear:!0,options:h})},e)})})})]}):null},R=n(43551),k=n.n(R),D=()=>{let e=a.PPS.useFormInstance(),t=a.PPS.useWatch(["rights","values"],e);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.PPS.Item,{label:"Automated Decisions or Profiling",name:"automated_decisions_or_profiling",layout:"horizontal",valuePropName:"checked",children:(0,o.jsx)(a.E_O,{"data-testid":"edit-taxonomy-form_automated-decisions"})}),(0,o.jsx)(a.PPS.Item,{name:["rights","values"],label:"Rights",children:(0,o.jsx)(a.WPr,{mode:"multiple",options:(0,d.MM)(w.ts),"data-testid":"edit-taxonomy-form_rights"})}),t&&!S()(t)&&(0,o.jsx)(a.PPS.Item,{name:["rights","strategy"],label:"Strategy",required:!0,rules:[{required:!0,message:"Please select a strategy"}],children:(0,o.jsx)(a.WPr,{options:(0,d.MM)(w.jX),"data-testid":"edit-taxonomy-form_strategy"})})]})},O=e=>{let{initialValues:t,onSubmit:n,form:r,formId:i,taxonomyType:l,isDisabled:s}=e,u=l===g.Lo.DATA_SUBJECTS;return(0,o.jsxs)(a.PPS,{name:i,initialValues:t,onFinish:e=>{var r,i;let o={...t,...e};(!(null==o?void 0:null===(r=o.rights)||void 0===r?void 0:r.values)||S()(null==o?void 0:null===(i=o.rights)||void 0===i?void 0:i.values))&&k()(o,"rights"),n(o)},layout:"vertical",form:r,children:[(0,o.jsx)(a.PPS.Item,{label:"Name",name:"name",children:(0,o.jsx)(a.uFc,{"data-testid":"edit-taxonomy-form_name",disabled:s})}),(0,o.jsx)(a.PPS.Item,{label:"Description",name:"description",children:(0,o.jsx)(a.uFc.TextArea,{rows:4,"data-testid":"edit-taxonomy-form_description",disabled:s})}),u&&(0,o.jsx)(D,{})]})},P=e=>{let{taxonomyItem:t,taxonomyType:n,onClose:r}=e,i="edit-taxonomy-form",[l]=a.PPS.useForm(),[s]=a.PPS.useForm(),u=(0,a.pmc)(),{isOpen:c,onOpen:h,onClose:f}=(0,a.qY0)(),{updateTrigger:E}=A({taxonomyType:n}),j=(0,m.mZ)({resourceFidesKey:null==t?void 0:t.fides_key,resourceType:(0,T.Xl)(n)}),C=(0,p.Tg)([(0,g.Hy)(n).UPDATE]),b=(0,p.Tg)([(0,g.Hy)(n).DELETE]),S=async e=>{let n=await E(e);if((0,v.D4)(n)){u((0,x.Vo)((0,d.e$)(n.error)));return}if(j.isEnabled){let e=s.getFieldsValue();await j.upsertCustomFields({fides_key:null==t?void 0:t.fides_key,customFieldValues:e})}u((0,x.t5)("Taxonomy successfully updated")),r()},I=async()=>{await E({...t,active:!1}),f(),r()},w=async()=>{await E({...t,active:!0}),f(),r()};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(y.ZP,{isOpen:!!t,onClose:r,header:(0,o.jsx)(y.zR,{title:(null==t?void 0:t.name)||""}),footer:(0,o.jsxs)(a.zeN,{justifyContent:"space-between",children:[(null==t?void 0:t.active)&&b&&(0,o.jsx)(a.esZ,{title:"Delete label",children:(0,o.jsx)(a.wpx,{"aria-label":"delete",icon:(0,o.jsx)(_.q,{fontSize:"small"}),onClick:h,"data-testid":"delete-btn"})}),!(null==t?void 0:t.active)&&C&&(0,o.jsx)(a.esZ,{title:"Enable label",children:(0,o.jsx)(a.wpx,{"aria-label":"enable",onClick:w,"data-testid":"enable-btn",icon:(0,o.jsx)(a.tEF,{fontSize:"small"})})}),(0,o.jsx)("div",{className:"flex gap-2",children:C&&(0,o.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:i,children:"Save"})})]}),children:[(0,o.jsxs)("div",{className:"mb-4",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(a.AntTypography.Title,{level:3,children:"Details"})}),(0,o.jsxs)("div",{className:"flex",children:[(0,o.jsx)("span",{className:"w-1/3 shrink-0 text-sm text-gray-500",children:"Fides key:"}),(0,o.jsx)(a.esZ,{title:null==t?void 0:t.fides_key,trigger:"click",children:(0,o.jsx)("span",{className:"flex-1 truncate","data-testid":"edit-drawer-fides-key",children:null==t?void 0:t.fides_key})})]})]}),!!t&&(0,o.jsx)(O,{initialValues:t,onSubmit:S,form:l,formId:i,taxonomyType:n,isDisabled:!C}),j.isEnabled&&!j.isLoading&&(0,o.jsx)(N,{form:s,formId:"custom-fields-form",customFields:j})]}),(0,o.jsx)(a.cVQ,{isOpen:c,onClose:f,onConfirm:I,title:"Delete ".concat(n),message:(0,o.jsx)(a.Kqy,{children:(0,o.jsxs)(a.xvT,{children:["You are about to permanently delete the ",n," ",(0,o.jsx)(a.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name})," ","from your taxonomy. Are you sure you would like to continue?"]})})})]})};n(51901);var L=n(86298),F=n(3124),V=n.n(F);(r=i||(i={})).DEFAULT="DEFAULT",r.ACTIVE_HOVER="ACTIVE_HOVER",r.PARENT_OF_HOVER="PARENT_OF_HOVER",r.CHILD_OF_HOVER="CHILD_OF_HOVER",r.SIBLING_OF_HOVER="SIBLING_OF_HOVER",r.INACTIVE="INACTIVE";let z=(0,c.createContext)({activeNodeKey:null,setActiveNodeKey:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},getNodeHoverStatus:()=>"DEFAULT"}),U=e=>{let{children:t}=e,[n,r]=(0,c.useState)(null),i=(0,c.useCallback)(e=>{e!==n&&r(e)},[n]),a=(0,c.useCallback)(()=>{r(null)},[]),l=(0,c.useCallback)(e=>n?e===n?"ACTIVE_HOVER":n.startsWith("".concat(e,"."))||e===g.Ch?"PARENT_OF_HOVER":e.startsWith("".concat(n,"."))||n===g.Ch?"CHILD_OF_HOVER":n.split(".").slice(0,-1).join(".")===e.split(".").slice(0,-1).join(".")?"SIBLING_OF_HOVER":"INACTIVE":"DEFAULT",[n]),s=(0,c.useMemo)(()=>({activeNodeKey:n,setActiveNodeKey:r,onMouseEnter:i,onMouseLeave:a,getNodeHoverStatus:l}),[n,r,i,a,l]);return(0,o.jsx)(z.Provider,{value:s,children:t})};function H(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function M(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=G)):void 0===t&&(t=B);for(var n,r,i,o,a,l=new Y(e),s=[l];n=s.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)s.push(r=i[o]=new Y(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(q)}function B(e){return e.children}function G(e){return Array.isArray(e)?e[1]:null}function Z(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function q(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Y(e){this.data=e,this.depth=this.height=0,this.parent=null}function W(e,t){return e.parent===t.parent?1:2}function K(e){var t=e.children;return t?t[0]:e.t}function J(e){var t=e.children;return t?t[t.length-1]:e.t}function $(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function X(e){return null==e?null:function(e){if("function"!=typeof e)throw Error();return e}(e)}Y.prototype=M.prototype={constructor:Y,count:function(){return this.eachAfter(H)},each:function(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],l=[],s=-1;o=a.pop();)if(l.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=l.pop();)e.call(t,o,++s,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)r.push(t=t.parent);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return M(this).eachBefore(Z)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);while(o.length)}},$.prototype=Object.create(Y.prototype);var Q={depth:-1},ee={},et={};function en(e){return e.id}function er(e){return e.parentId}function ei(e){let t=e.length;if(t<2)return"";for(;--t>1&&!eo(e,t););return e.slice(0,t)}function eo(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if((1&n)==0)return!0}return!1}let ea=function(){var e=W,t=1,n=1,r=null;function i(i){var s=function(e){for(var t,n,r,i,o,a=new $(e,0),l=[a];t=l.pop();)if(r=t._.children)for(t.children=Array(o=r.length),i=o-1;i>=0;--i)l.push(n=t.children[i]=new $(r[i],i)),n.parent=t;return(a.parent=new $(null,0)).children=[a],a}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(l);else{var u=i,c=i,d=i;i.eachBefore(function(e){e.x<u.x&&(u=e),e.x>c.x&&(c=e),e.depth>d.depth&&(d=e)});var h=u===c?1:e(u,c)/2,f=h-u.x,p=t/(c.x+h+f),x=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+f)*p,e.y=e.depth*x})}return i}function o(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)t=i[o],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o,a,l=t,s=t,u=n,c=l.parent.children[0],d=l.m,h=s.m,f=u.m,p=c.m;u=J(u),l=K(l),u&&l;)c=K(c),(s=J(s)).a=t,(a=u.z+f-l.z-d+e(u._,l._))>0&&(function(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}((i=u,o=r,i.a.parent===t.parent?i.a:o),t,a),d+=a,h+=a),f+=u.m,d+=l.m,p+=c.m,h+=s.m;u&&!J(s)&&(s.t=u,s.m+=f-h),l&&!K(c)&&(c.t=l,c.m+=d-p,r=t)}return r}(t,i,t.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}();var el=e=>{let{nodes:t,edges:n,options:r}=e;return(0,c.useMemo)(()=>{if(0===t.length)return{nodes:t,edges:n};let e=(function(){var e,t=en,n=er;function r(r){var i,o,a,l,s,u,c,d,h=Array.from(r),f=t,p=n,x=new Map;if(null!=e){let t=h.map((t,n)=>{var i;let o;return i=e(t,n,r),o=(i=`${i}`).length,eo(i,o-1)&&!eo(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}),n=t.map(ei),i=new Set(t).add("");for(let e of n)i.has(e)||(i.add(e),t.push(e),n.push(ei(e)),h.push(et));f=(e,n)=>t[n],p=(e,t)=>n[t]}for(a=0,i=h.length;a<i;++a)o=h[a],u=h[a]=new Y(o),null!=(c=f(o,a,r))&&(c+="")&&(d=u.id=c,x.set(d,x.has(d)?ee:u)),null!=(c=p(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=h[a]).parent){if(!(s=x.get(c)))throw Error("missing: "+c);if(s===ee)throw Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw Error("multiple roots");l=u}if(!l)throw Error("no root");if(null!=e){for(;l.data===et&&1===l.children.length;)l=l.children[0],--i;for(let e=h.length-1;e>=0&&(u=h[e]).data===et;--e)u.data=null}if(l.parent=Q,l.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(q),l.parent=null,i>0)throw Error("cycle");return l}return r.id=function(e){return arguments.length?(t=X(e),r):t},r.parentId=function(e){return arguments.length?(n=X(e),r):n},r.path=function(t){return arguments.length?(e=X(t),r):e},r})().id(e=>e.id).parentId(e=>{var t;return null===(t=n.find(t=>t.target===e.id))||void 0===t?void 0:t.source})(t),i="LR"===r.direction?[35,320]:[320,35];return{nodes:ea.nodeSize(i).separation((e,t)=>e.parent===t.parent?1:1.5)(e).descendants().map(e=>{let t;return t="LR"===r.direction?{x:e.y,y:e.x}:{x:e.x,y:e.y},{...e.data,position:t}}),edges:n}},[t,n,r])},es=e=>{let{positionAbsoluteX:t,positionAbsoluteY:n,nodeWidth:r}=e,{setCenter:i,getZoom:o}=(0,L._K)();return{centerScreenOnNode:(0,c.useCallback)(()=>i(t+r/2,n,{duration:500,zoom:o()}),[o,t,n,r,i])}},eu=n(1945),ec=n.n(eu),ed=n(8335),eh=e=>{let{type:t,inactive:n=!1}=e;return(0,o.jsx)(L.HH,{type:t,position:"source"===t?ed.Ly.Right:ed.Ly.Left,style:{width:8,height:8,backgroundColor:n?V().FIDESUI_NEUTRAL_400:V().FIDESUI_MINOS},className:"transition-colors duration-300 ease-in"})},ef=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:r}=e,{onCancel:i,onSubmit:l,parentKey:s}=t,u=(0,c.useRef)(null),[d,h]=(0,c.useState)(""),{centerScreenOnNode:f}=es({positionAbsoluteX:n,positionAbsoluteY:r,nodeWidth:200});return(0,c.useEffect)(()=>{h("");let e=()=>{var e;return null===(e=u.current)||void 0===e?void 0:e.focus({cursor:"start",preventScroll:!0})};(async()=>{await f(),e()})()},[s,f,n,r]),(0,o.jsxs)("div",{style:{width:200},"data-testid":"taxonomy-text-input-node",children:[(0,o.jsx)(a.uFc,{placeholder:"Type label name...",ref:u,onBlur:i,onSubmit:()=>l(d),value:d,onChange:e=>h(e.target.value),onKeyUp:e=>{"Escape"===e.key&&i()},onPressEnter:()=>l(d),className:ec().input}),(0,o.jsx)(eh,{type:"target"})]})},ep=e=>{let{getNodeHoverStatus:t}=(0,c.useContext)(z),{target:n}=e,r=t(n),a=(0,c.useCallback)(()=>{switch(r){case i.ACTIVE_HOVER:case i.PARENT_OF_HOVER:return V().FIDESUI_MINOS;case i.INACTIVE:return V().NEUTRAL_400;default:return V().FIDESUI_SANDSTONE}},[r]),l=(0,c.useCallback)(()=>{switch(r){case i.ACTIVE_HOVER:case i.PARENT_OF_HOVER:return 2;default:return 1}},[r]);return(0,o.jsx)(L.Jd,{...e,style:{stroke:a(),strokeWidth:l(),transition:"stroke 0.3s ease 0s"}})},ex=n(34770),em=n.n(ex),e_=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:r}=e,{onMouseEnter:l,onMouseLeave:s,getNodeHoverStatus:u}=(0,c.useContext)(z),{taxonomyType:d,taxonomyItem:h,onAddButtonClick:f,onTaxonomyItemClick:p,label:x,hasChildren:m,isLastCreatedItem:_,resetLastCreatedItemKey:v,userCanAddLabels:y}=t,{centerScreenOnNode:T}=es({positionAbsoluteX:n,positionAbsoluteY:r,nodeWidth:200});(0,c.useEffect)(()=>{let e=async()=>{await T(),l(null==h?void 0:h.fides_key)};_&&(e(),v())},[_,l,null==h?void 0:h.fides_key,v,T]);let E=u(null==h?void 0:h.fides_key),j=(0,c.useCallback)(()=>{switch(E){case i.ACTIVE_HOVER:return em()["button--hover"];case i.PARENT_OF_HOVER:return em()["button--parent-hover"];case i.INACTIVE:return em()["button--inactive"];case i.DEFAULT:case i.CHILD_OF_HOVER:case i.SIBLING_OF_HOVER:default:return""}},[E]),C=(null==h?void 0:h.fides_key)===g.Ch,A=d===g.Lo.DATA_SUBJECTS;return(0,o.jsxs)("div",{className:em().container,onMouseEnter:()=>l(null==h?void 0:h.fides_key),onMouseLeave:()=>s(null==h?void 0:h.fides_key),"data-testid":"taxonomy-node-".concat(null==h?void 0:h.fides_key),children:[(0,o.jsx)(a.wpx,{className:"".concat(em().button," ").concat(j()),onClick:()=>null==p?void 0:p(h),disabled:!p,type:"text",children:(0,o.jsxs)(a.AntTypography.Text,{ellipsis:!0,style:{color:"inherit"},children:[(null==h?void 0:h.active)===!1?"(disabled) ":"",x]})}),!C&&(0,o.jsx)(eh,{type:"target",inactive:E===i.INACTIVE}),m&&(0,o.jsx)(eh,{type:"source",inactive:E===i.INACTIVE}),y&&(!A||C)&&(0,o.jsx)("div",{className:em()["add-button-container"],children:(0,o.jsx)(a.wpx,{type:"default",className:"".concat(em()["add-button"]," ").concat(E===i.ACTIVE_HOVER?em()["add-button--visible"]:""),icon:(0,o.jsx)(a.PJP.mm_,{size:20}),onClick:()=>null==f?void 0:f(h),size:"middle","data-testid":"taxonomy-add-child-label-button","aria-label":"Add child label to ".concat(x)})})]})};let ev=e=>{let{taxonomyType:t,taxonomyItems:n,draftNewItem:r,lastCreatedItemKey:i,resetLastCreatedItemKey:a,onTaxonomyItemClick:l,onAddButtonClick:s,onCancelDraftItem:u,onSubmitDraftItem:d,userCanAddLabels:h}=e,{fitView:f}=(0,L._K)();(0,c.useEffect)(()=>{setTimeout(()=>f(),150)},[f,t]);let p=[(0,c.useMemo)(()=>({id:g.Ch,position:{x:0,y:0},data:{label:t,taxonomyItem:{fides_key:g.Ch},taxonomyType:t,onTaxonomyItemClick:null,onAddButtonClick:s,hasChildren:0!==n.length,userCanAddLabels:h},type:"taxonomyTreeNode"}),[t,n.length,s,h])],x=[];if(n.forEach(e=>{let n=e.name||e.fides_key.split(".").pop()||"",r={id:e.fides_key,position:{x:0,y:0},data:{label:n,taxonomyType:t,taxonomyItem:e,onTaxonomyItemClick:l,onAddButtonClick:s,hasChildren:!1,isLastCreatedItem:i===e.fides_key,resetLastCreatedItemKey:a,userCanAddLabels:h},type:"taxonomyTreeNode"};p.push(r);let o=e.parent_key?p.find(t=>t.id===e.parent_key):null,u=o?o.id:g.Ch,c=e.fides_key,d={id:"".concat(u,"-").concat(c),source:u,target:c,type:"taxonomyTreeEdge"};x.push(d),o&&(o.data.hasChildren=!0)}),r){let e=r.parent_key||g.Ch;p.push({id:"draft-node",position:{x:0,y:0},type:"textInputNode",data:{parentKey:e,onCancel:u,onSubmit:d},hidden:!r}),x.push({id:"draft-line",source:e,target:"draft-node",animated:!0});let t=p.find(t=>t.id===e);t&&(t.data.hasChildren=!0)}let{nodes:m,edges:_}=el({nodes:p,edges:x,options:{direction:"LR"}}),v=(0,c.useMemo)(()=>({taxonomyTreeNode:e_,textInputNode:ef}),[]),y=(0,c.useMemo)(()=>({taxonomyTreeEdge:ep}),[]);return(0,o.jsx)("div",{className:"size-full",style:{backgroundColor:V().FIDESUI_BG_CORINTH},"data-testid":"taxonomy-interactive-tree",children:(0,o.jsx)(U,{children:(0,o.jsxs)(L.x$,{nodes:m,edges:_,nodeTypes:v,edgeTypes:y,maxZoom:2,minZoom:.3,nodesConnectable:!1,edgesFocusable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},children:[(0,o.jsx)(L.Aq,{color:V().FIDESUI_NEUTRAL_100,variant:L.T7.Dots,size:3}),(0,o.jsx)(L.a9,{nodeStrokeWidth:3,pannable:!0}),(0,o.jsx)(L.ZX,{showInteractive:!1})]})})})};var ey=e=>(0,o.jsx)(L.tV,{children:(0,o.jsx)(ev,{...e})}),eg=()=>{let[e,t]=(0,c.useState)(g.Lo.DATA_CATEGORIES),{createTrigger:n,getAllTrigger:r,taxonomyItems:i=[]}=A({taxonomyType:e}),l=(0,u.useSearchParams)(),m=(null==l?void 0:l.get("showDisabledItems"))==="true";(0,c.useEffect)(()=>{r()},[r,e]);let[_,v]=(0,c.useState)(null),[y,T]=(0,c.useState)(null),[E,j]=(0,c.useState)(null);(0,c.useEffect)(()=>{T(null),j(null),v(null)},[e]);let C=(0,a.pmc)(),b=(0,c.useCallback)(async e=>{if(!y)return;let t=(null==y?void 0:y.parent_key)===g.Ch,r={...y,name:e,parent_key:t?null:y.parent_key},i=await n(r);if((0,d.D4)(i)){C((0,x.Vo)((0,d.e$)(i.error)));return}j(i.data.fides_key),C((0,x.t5)("New label successfully created")),T(null)},[n,y,C]),S=s()(i,"active"),I=(0,p.Tg)([(0,g.Hy)(e).CREATE]);return(0,o.jsxs)(h.Z,{title:"Taxonomy",children:[(0,o.jsxs)(a.jqI,{vertical:!0,className:"h-full",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(f.Z,{heading:"Taxonomy"}),(0,o.jsx)("div",{className:"hidden",children:(0,o.jsx)("div",{className:"mb-5 flex justify-between",children:(0,o.jsxs)(a.vyj.Compact,{children:[(0,o.jsx)(a.uFc,{className:"min-w-[350px]",placeholder:"Search",allowClear:!0}),(0,o.jsx)(a.wpx,{type:"default",children:"Clear"})]})})})]}),(0,o.jsxs)("div",{className:"relative grow",children:[(0,o.jsx)("div",{className:"absolute left-2 top-2 z-[1]",children:(0,o.jsx)(a.AHg,{selectedKeys:[e],onSelect:e=>{let{key:n}=e;return t(n)},items:(0,d.MM)(g.Lo).map(e=>({label:e.label,key:e.value})),"data-testid":"taxonomy-type-selector"})}),!!i.length&&(0,o.jsx)(ey,{userCanAddLabels:I,taxonomyItems:m?i:S,draftNewItem:y,lastCreatedItemKey:E,resetLastCreatedItemKey:()=>j(null),onTaxonomyItemClick:e=>{v(e)},onAddButtonClick:e=>{var t;T({parent_key:null!==(t=null==e?void 0:e.fides_key)&&void 0!==t?t:null,is_default:!1,description:""})},taxonomyType:e,onCancelDraftItem:()=>T(null),onSubmitDraftItem:b})]})]}),_&&(0,o.jsx)(P,{taxonomyItem:_,taxonomyType:e,onClose:()=>v(null)})]})}},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=n(19043)},1945:function(e){e.exports={input:"TaxonomyTextInputNode_input__P9czz"}},34770:function(e){e.exports={container:"TaxonomyTreeNode_container__T4KpF",button:"TaxonomyTreeNode_button__mcbOd","button--hover":"TaxonomyTreeNode_button--hover__oycXY","button--parent-hover":"TaxonomyTreeNode_button--parent-hover__pwAPl","button--inactive":"TaxonomyTreeNode_button--inactive__Fjdpe","add-button-container":"TaxonomyTreeNode_add-button-container__eEoRN","add-button":"TaxonomyTreeNode_add-button__oM2vI","add-button--visible":"TaxonomyTreeNode_add-button--visible__Ojqqf"}}},function(e){e.O(0,[1096,8765,431,9278,3662,6148,768,2888,9774,179],function(){return e(e.s=71180)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4202],{96586:function(e,t,n){var r=n(57753),i=n(82452),o=n(22115),a=n(38256),l=n(67426);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},36301:function(e,t,n){var r=n(69417),i=n(72470),o=n(66165),a=n(71873),l=n(52556);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},44538:function(e,t,n){var r=n(81822)(n(77400),"Map");e.exports=r},74554:function(e,t,n){var r=n(39448),i=n(7738),o=n(66575),a=n(7238),l=n(38738);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},46151:function(e,t,n){var r=n(81822)(n(77400),"Set");e.exports=r},52485:function(e,t,n){var r=n(74554),i=n(38639),o=n(88379);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},93382:function(e,t,n){var r=n(85638);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return -1}},46729:function(e,t,n){var r=n(28338),i=n(99678),o=n(11611),a=n(76532),l=/^\[object .+?Constructor\]$/,s=Object.prototype,u=Function.prototype.toString,c=s.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:l).test(a(e))}},75733:function(e){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},70830:function(e,t,n){var r=n(76747),i=n(31159),o=n(64373),a=n(37948);e.exports=function(e,t){return t=r(t,e),null==(e=o(e,t))||delete e[a(i(t))]}},65581:function(e){e.exports=function(e,t){return e.has(t)}},64937:function(e,t,n){var r=n(77400)["__core-js_shared__"];e.exports=r},95899:function(e,t,n){var r=n(54479);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},81822:function(e,t,n){var r=n(46729),i=n(15371);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},15371:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},57753:function(e,t,n){var r=n(35718);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},82452:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},22115:function(e,t,n){var r=n(35718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},38256:function(e,t,n){var r=n(35718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},67426:function(e,t,n){var r=n(35718);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},54479:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},99678:function(e,t,n){var r,i=n(64937),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},69417:function(e){e.exports=function(){this.__data__=[],this.size=0}},72470:function(e,t,n){var r=n(93382),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},66165:function(e,t,n){var r=n(93382);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},71873:function(e,t,n){var r=n(93382);e.exports=function(e){return r(this.__data__,e)>-1}},52556:function(e,t,n){var r=n(93382);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},39448:function(e,t,n){var r=n(96586),i=n(36301),o=n(44538);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},7738:function(e,t,n){var r=n(95899);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},66575:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).get(e)}},7238:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).has(e)}},38738:function(e,t,n){var r=n(95899);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},35718:function(e,t,n){var r=n(81822)(Object,"create");e.exports=r},64373:function(e,t,n){var r=n(79867),i=n(75733);e.exports=function(e,t){return t.length<2?e:r(e,i(t,0,-1))}},38639:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},88379:function(e){e.exports=function(e){return this.__data__.has(e)}},43735:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},76532:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},85638:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},28338:function(e,t,n){var r=n(99736),i=n(11611);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},43551:function(e,t,n){var r=n(70830);e.exports=function(e,t){return null==e||r(e,t)}},71180:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/taxonomy",function(){return n(62e3)}])},79806:function(e,t,n){"use strict";n.d(t,{Gn:function(){return l},zR:function(){return a}});var r=n(24246),i=n(96306),o=n(56358);let a=e=>{let{title:t}=e;return(0,r.jsx)(i.OXI,{py:0,display:"flex",alignItems:"flex-start",children:(0,r.jsx)(i.xvT,{mr:"2",color:"gray.700",fontSize:"lg",lineHeight:1.8,children:t})})},l=e=>{let{onDelete:t,onEditYaml:n,formId:a,isSaving:l}=e;return(0,r.jsxs)(i.zeN,{justifyContent:"space-between",children:[t?(0,r.jsx)(i.wpx,{"aria-label":"delete",icon:(0,r.jsx)(o.q,{fontSize:"small"}),onClick:t,"data-testid":"delete-btn"}):null,(0,r.jsxs)("div",{className:"flex gap-2",children:[n&&(0,r.jsx)(i.wpx,{onClick:n,"data-testid":"edit-yaml-btn",children:"Edit YAML"}),(0,r.jsx)(i.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:a,loading:l,children:"Save"})]})]})};t.ZP=e=>{let{header:t,description:n,isOpen:o,onClose:a,children:l,footer:s}=e;return(0,r.jsxs)(i.dys,{placement:"right",isOpen:o,onClose:a,size:"md",children:[(0,r.jsx)(i.P1B,{}),(0,r.jsxs)(i.scA,{"data-testid":"edit-drawer-content",py:2,children:[(0,r.jsxs)(i.xuv,{display:"flex",justifyContent:"space-between",alignItems:"top",mr:2,py:2,gap:2,children:[(0,r.jsx)(i.xuv,{flex:1,minH:8,children:t}),(0,r.jsx)(i.xuv,{display:"flex",justifyContent:"flex-end",mr:2,children:(0,r.jsx)(i.wpx,{"aria-label":"Close editor",onClick:a,"data-testid":"close-drawer-btn",icon:(0,r.jsx)(i.Two,{fontSize:"smaller"})})})]}),(0,r.jsxs)(i.Ng0,{pt:1,children:[n?(0,r.jsx)(i.xvT,{fontSize:"sm",mb:4,color:"gray.600",children:n}):null,l]}),s]})]})}},18225:function(e,t,n){"use strict";var r=n(24246),i=n(96306);t.Z=e=>{let{alignment:t="center",...n}=e;return(0,r.jsx)(i.kCb,{boxSize:"full",align:"center",justify:t,children:(0,r.jsx)(i.$jN,{color:"primary",...n})})}},56358:function(e,t,n){"use strict";n.d(t,{q:function(){return i}});var r=n(24246);let i=(0,n(96306).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,r.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(24246),i=n(96306),o=n(88038),a=n.n(o),l=n(86677);n(27378);var s=n(25980),u=n(90867),c=n(77830),d=()=>{let e=(0,l.useRouter)();return(0,r.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(i.xuv,{children:[(0,r.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(i.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,r.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:t,title:n,padded:o=!0,mainProps:c}=e,h=(0,s.hz)(),f=(0,l.useRouter)(),p="/privacy-requests"===f.pathname||"/datastore-connection"===f.pathname,x=!(h.flags.privacyRequestsConfiguration&&p),{data:m}=(0,u.JE)(void 0,{skip:x}),{data:_}=(0,u.PW)(void 0,{skip:x}),v=h.flags.privacyRequestsConfiguration&&(!m||!_)&&p;return(0,r.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,r.jsxs)(a(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(i.kCb,{as:"main",direction:"column",py:o?6:0,px:o?10:0,h:o?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,r.jsx)(d,{}):null,t]})]})}},19904:function(e,t,n){"use strict";n.d(t,{Tg:function(){return a}});var r=n(24246),i=n(16134),o=n(31793);let a=e=>(0,i.C)(o.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,r.jsx)(r.Fragment,{children:n}):null}},94799:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(76649);let i=e=>(0,r.Ln)({id:"string"},e),o=e=>(null!=e?e:[]).filter(i)},30320:function(e,t,n){"use strict";n.d(t,{m:function(){return s}});var r=n(27378),i=n(25980),o=n(41841),a=n(32885),l=n(94799);let s=e=>{let{resourceFidesKey:t,resourceType:n}=e,{errorAlert:s}=(0,o.VY)(),{plus:u}=(0,i.hz)(),c=(0,r.useMemo)(()=>null!=t?t:"",[]),d=(0,a.YU)(!0,{skip:!u}),h=(0,a.VN)(n,{skip:!u}),{data:f,isLoading:p,error:x,isError:m}=(0,a.PV)(null!=t?t:"",{skip:""!==c&&!(u&&c)}),[_]=(0,a._D)(),v=d.isLoading||h.isLoading||p,y=(0,r.useMemo)(()=>new Map((0,l.k)(d.data).map(e=>{var t;return[e.id,{...e,options:(null!==(t=e.allowed_values)&&void 0!==t?t:[]).map(e=>({value:e,label:e}))}]})),[d.data]),g=(0,r.useMemo)(()=>{var e;return null===(e=h.data)||void 0===e?void 0:e.filter(e=>e.active)},[h.data]),T=(0,r.useMemo)(()=>new Map((0,l.k)(g).map(e=>[e.id,e])),[g]),E=(0,r.useMemo)(()=>m&&(null==x?void 0:x.status)===404?new Map:new Map((0,l.k)(f).map(e=>[e.custom_field_definition_id,e])),[f,m,x]),j=(0,r.useMemo)(()=>{let e=[...T.keys()];return e.sort(),e},[T]),C=(0,r.useMemo)(()=>{let e={};return g&&E&&g.forEach(t=>{let n=E.get(t.id||"");n&&(t.allow_list_id&&"string[]"===t.field_type?e[n.custom_field_definition_id]=n.value:e[n.custom_field_definition_id]=n.value.toString())}),e},[g,E]),A=(0,r.useCallback)(async e=>{if(!u)return;let r="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!r)return;let{customFieldValues:i}=e;if(!i||0===Object.keys(i).length)return;let o=[],a=[];j.forEach(e=>{let t=E.get(e),n=i[e];void 0===n||""===n||Array.isArray(n)&&0===n.length?(null==t?void 0:t.id)&&a.push(t.id):o.push({custom_field_definition_id:e,resource_id:r,id:null==t?void 0:t.id,value:n})});try{await _({resource_type:n,resource_id:r,upsert:o,delete:a})}catch(e){s("One or more custom fields have failed to save, please try again."),console.error(e)}},[u,E,s,t,j,_,n]);return{customFieldValues:C,definitionIdToCustomField:E,idToAllowListWithOptions:y,idToCustomFieldDefinition:T,isEnabled:u,isLoading:v,sortedCustomFieldDefinitionIds:j,upsertCustomFields:A}}},95346:function(e,t,n){"use strict";n.d(t,{uc:function(){return _},Hn:function(){return s},Uv:function(){return a},C7:function(){return u},mZ:function(){return m.m}});var r,i,o,a,l=n(54682);(r=o||(o={}))[r.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",r[r.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",r[r.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",l.AL.STRING,l.AL.STRING,l.AL.STRING_,(i=a||(a={})).SINGLE_SELECT="singleSelect",i.MULTIPLE_SELECT="multipleSelect",i.LOCATION_SELECT="locationSelect",i.OPEN_TEXT="openText";let s=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Location select",value:"locationSelect"},{label:"Open Text",value:"openText"}],u=[{label:"taxonomy:".concat(l.P6.DATA_CATEGORY),value:l.P6.DATA_CATEGORY},{label:"taxonomy:".concat(l.P6.DATA_SUBJECT),value:l.P6.DATA_SUBJECT},{label:"taxonomy:".concat(l.P6.DATA_USE),value:l.P6.DATA_USE},{label:"".concat(l.P6.SYSTEM,":information"),value:l.P6.SYSTEM},{label:"system:data use",value:l.P6.PRIVACY_DECLARATION}];var c=n(24246),d=n(96306),h=n(34090),f=n(30234),p=n(97181),x=n(40324),m=n(30320);let _=e=>{let{resourceFidesKey:t,resourceType:n}=e,{idToAllowListWithOptions:r,idToCustomFieldDefinition:i,isEnabled:o,isLoading:a,sortedCustomFieldDefinitionIds:s}=(0,m.m)({resourceFidesKey:t,resourceType:n});return o&&0!==s.length?(0,c.jsx)(f.Z,{heading:"Custom fields",children:(0,c.jsx)(d.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(d.kCb,{flexDir:"column",gap:"24px",children:a?(0,c.jsx)(d.M5Y,{children:(0,c.jsx)(d.$jN,{})}):s.length>0&&(0,c.jsx)(d.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:s.map(e=>{let t=i.get(e);if(!t)return null;let n="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===l.AL.STRING)return(0,c.jsx)(h.gN,{name:n,children:e=>{let{field:n}=e;return(0,c.jsx)(x.j0,{...n,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let o=r.get(t.allow_list_id);if(!o)return null;let{options:a}=o;return(0,c.jsx)(p.d,{name:n,allowClear:!0,mode:t.field_type!==l.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};n(94799)},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var r=n(24246),i=n(96306),o=n(34090),a=n(27378),l=n(46238),s=n(40324);let u=e=>{let{name:t,label:n,labelProps:u,tooltip:c,isRequired:d,layout:h="inline",helperText:f,...p}=e,[x,m,{setValue:_}]=(0,o.U$)(t),v=!!(m.touched&&m.error),[y,g]=(0,a.useState)("");x.value||"tags"!==p.mode&&"multiple"!==p.mode||(x.value=[]),"tags"===p.mode&&"string"==typeof x.value&&(x.value=[x.value]);let T="tags"===p.mode?(e,t)=>e?e.value!==y||x.value.includes(y)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:p.optionRender||void 0,E=e=>{g(e),p.onSearch&&p.onSearch(e)},j=(e,t)=>{_(e),p.onChange&&p.onChange(e,t)};return"inline"===h?(0,r.jsx)(i.NIc,{isInvalid:v,isRequired:d,children:(0,r.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,r.jsx)(s.__,{htmlFor:p.id||t,...u,children:n}):null,(0,r.jsxs)(i.jqI,{align:"center",children:[(0,r.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(i.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:T,onSearch:"tags"===p.mode?E:void 0,onChange:j,value:x.value||void 0,status:v?"error":void 0}),f&&(0,r.jsx)(i.Q6r,{children:f}),(0,r.jsx)(s.Bc,{isInvalid:v,message:m.error,fieldName:x.name})]}),(0,r.jsx)(l.b,{label:c,className:v?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(i.NIc,{isInvalid:v,isRequired:d,children:(0,r.jsxs)(i.gCW,{alignItems:"start",children:[(0,r.jsxs)(i.jqI,{align:"center",children:[n?(0,r.jsx)(s.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...u,children:n}):null,(0,r.jsx)(l.b,{label:c})]}),(0,r.jsx)(i.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:T,onSearch:"tags"===p.mode?E:void 0,onChange:j,value:x.value||void 0,status:v?"error":void 0}),f&&(0,r.jsx)(i.Q6r,{style:{marginTop:0},children:f}),(0,r.jsx)(s.Bc,{isInvalid:v,message:m.error,fieldName:x.name})]})})}},30234:function(e,t,n){"use strict";var r=n(24246),i=n(96306);t.Z=e=>{let{heading:t,HeadingButton:n,children:o}=e;return(0,r.jsx)(i.Kqy,{spacing:4,children:(0,r.jsxs)(i.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,r.jsxs)(i.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,r.jsx)(i.X6q,{as:"h3",size:"xs",children:t}),n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.LZC,{}),(0,r.jsx)(n,{})]}):null]}),(0,r.jsx)(i.Kqy,{spacing:4,px:6,py:6,children:o})]})})}},59001:function(e,t,n){"use strict";n.d(t,{Ch:function(){return a},Hy:function(){return l},Lo:function(){return i}});var r,i,o=n(54682);let a="root";(r=i||(i={})).DATA_CATEGORIES="Data categories",r.DATA_USES="Data uses",r.DATA_SUBJECTS="Data subjects";let l=e=>{switch(e){case"Data categories":return{UPDATE:o.Sh.DATA_CATEGORY_UPDATE,CREATE:o.Sh.DATA_CATEGORY_CREATE,DELETE:o.Sh.DATA_CATEGORY_DELETE,READ:o.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:o.Sh.DATA_USE_UPDATE,CREATE:o.Sh.DATA_USE_CREATE,DELETE:o.Sh.DATA_USE_DELETE,READ:o.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:o.Sh.DATA_SUBJECT_UPDATE,CREATE:o.Sh.DATA_SUBJECT_CREATE,DELETE:o.Sh.DATA_SUBJECT_DELETE,READ:o.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,n){"use strict";n.d(t,{Cd:function(){return o},Xl:function(){return a}});var r=n(54682),i=n(59001);let o=(e,t)=>{let n;if(null==t&&e.every(e=>void 0===e.parent_key))n=e;else{let r=null!=t?t:null;n=e.filter(e=>e.parent_key===r)}return n.map(t=>{var n,r;let i=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:o(e,i),is_default:null!==(n=t.is_default)&&void 0!==n&&n,active:null!==(r=t.active)&&void 0!==r&&r}})},a=e=>{switch(e){case i.Lo.DATA_CATEGORIES:return r.P6.DATA_CATEGORY;case i.Lo.DATA_SUBJECTS:return r.P6.DATA_SUBJECT;case i.Lo.DATA_USES:return r.P6.DATA_USE;default:return}}},62e3:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eg}});var r,i,o=n(24246),a=n(96306),l=n(69238),s=n.n(l),u=n(63662),c=n(27378),d=n(812),h=n(77213),f=n(58754),p=n(19904),x=n(46628),m=n(95346),_=n(56358),v=n(31883),y=n(79806),g=n(59001),T=n(90673),E=n(30002),j=n(28079),C=n(39864),A=e=>{let{taxonomyType:t}=e,[n,r]=(0,C.Vj)(),[i,o]=(0,E.nC)(),[a,l]=(0,j.dk)(),[s]=(0,C.Ti)(),[u]=(0,j.Ql)(),[c]=(0,E.wG)(),[d]=(0,C.jU)(),[h]=(0,j.LG)(),[f]=(0,E.h8)(),[p]=(0,C.K9)(),[x]=(0,j.gu)(),[m]=(0,E.Kv)();return t===g.Lo.DATA_SUBJECTS?{getAllTrigger:i,taxonomyItems:o.data||[],updateTrigger:f,deleteTrigger:m,createTrigger:c}:t===g.Lo.DATA_USES?{getAllTrigger:a,taxonomyItems:l.data||[],updateTrigger:h,deleteTrigger:x,createTrigger:u}:{getAllTrigger:n,taxonomyItems:r.data||[],updateTrigger:d,deleteTrigger:p,createTrigger:s}},b=n(90104),S=n.n(b),I=n(18225),w=n(54682),N=e=>{let{customFields:t,formId:n,form:r}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:l,isEnabled:s,isLoading:u,sortedCustomFieldDefinitionIds:c}=t;return s&&0!==c.length?(0,o.jsxs)(a.PPS,{form:r,name:n,initialValues:t.customFieldValues,layout:"vertical","data-testid":"custom-fields-form",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(a.AntTypography.Title,{level:3,children:"Custom fields"})}),u?(0,o.jsx)(I.Z,{}):(0,o.jsx)("div",{children:!S()(c)&&(0,o.jsx)("div",{children:c.map(e=>{let t=l.get(e);if(!t)return null;let{id:n,name:r,description:s,allow_list_id:u,field_type:c}=t;if(!u&&c===w.AL.STRING)return(0,o.jsx)(a.PPS.Item,{name:n,label:r,tooltip:s,children:(0,o.jsx)(a.uFc,{})},e);let d=i.get(t.allow_list_id);if(!d)return null;let{options:h}=d;return(0,o.jsx)(a.PPS.Item,{name:n,label:r,tooltip:s,children:(0,o.jsx)(a.WPr,{mode:"string"!==c?"multiple":void 0,allowClear:!0,options:h})},e)})})})]}):null},R=n(43551),k=n.n(R),D=()=>{let e=a.PPS.useFormInstance(),t=a.PPS.useWatch(["rights","values"],e);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.PPS.Item,{label:"Automated Decisions or Profiling",name:"automated_decisions_or_profiling",layout:"horizontal",valuePropName:"checked",children:(0,o.jsx)(a.E_O,{"data-testid":"edit-taxonomy-form_automated-decisions"})}),(0,o.jsx)(a.PPS.Item,{name:["rights","values"],label:"Rights",children:(0,o.jsx)(a.WPr,{mode:"multiple",options:(0,d.MM)(w.ts),"data-testid":"edit-taxonomy-form_rights"})}),t&&!S()(t)&&(0,o.jsx)(a.PPS.Item,{name:["rights","strategy"],label:"Strategy",required:!0,rules:[{required:!0,message:"Please select a strategy"}],children:(0,o.jsx)(a.WPr,{options:(0,d.MM)(w.jX),"data-testid":"edit-taxonomy-form_strategy"})})]})},O=e=>{let{initialValues:t,onSubmit:n,form:r,formId:i,taxonomyType:l,isDisabled:s}=e,u=l===g.Lo.DATA_SUBJECTS;return(0,o.jsxs)(a.PPS,{name:i,initialValues:t,onFinish:e=>{var r,i;let o={...t,...e};(!(null==o?void 0:null===(r=o.rights)||void 0===r?void 0:r.values)||S()(null==o?void 0:null===(i=o.rights)||void 0===i?void 0:i.values))&&k()(o,"rights"),n(o)},layout:"vertical",form:r,children:[(0,o.jsx)(a.PPS.Item,{label:"Name",name:"name",children:(0,o.jsx)(a.uFc,{"data-testid":"edit-taxonomy-form_name",disabled:s})}),(0,o.jsx)(a.PPS.Item,{label:"Description",name:"description",children:(0,o.jsx)(a.uFc.TextArea,{rows:4,"data-testid":"edit-taxonomy-form_description",disabled:s})}),u&&(0,o.jsx)(D,{})]})},P=e=>{let{taxonomyItem:t,taxonomyType:n,onClose:r}=e,i="edit-taxonomy-form",[l]=a.PPS.useForm(),[s]=a.PPS.useForm(),u=(0,a.pmc)(),{isOpen:c,onOpen:h,onClose:f}=(0,a.qY0)(),{updateTrigger:E}=A({taxonomyType:n}),j=(0,m.mZ)({resourceFidesKey:null==t?void 0:t.fides_key,resourceType:(0,T.Xl)(n)}),C=(0,p.Tg)([(0,g.Hy)(n).UPDATE]),b=(0,p.Tg)([(0,g.Hy)(n).DELETE]),S=async e=>{let n=await E(e);if((0,v.D4)(n)){u((0,x.Vo)((0,d.e$)(n.error)));return}if(j.isEnabled){let e=s.getFieldsValue();await j.upsertCustomFields({fides_key:null==t?void 0:t.fides_key,customFieldValues:e})}u((0,x.t5)("Taxonomy successfully updated")),r()},I=async()=>{await E({...t,active:!1}),f(),r()},w=async()=>{await E({...t,active:!0}),f(),r()};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(y.ZP,{isOpen:!!t,onClose:r,header:(0,o.jsx)(y.zR,{title:(null==t?void 0:t.name)||""}),footer:(0,o.jsxs)(a.zeN,{justifyContent:"space-between",children:[(null==t?void 0:t.active)&&b&&(0,o.jsx)(a.esZ,{title:"Delete label",children:(0,o.jsx)(a.wpx,{"aria-label":"delete",icon:(0,o.jsx)(_.q,{fontSize:"small"}),onClick:h,"data-testid":"delete-btn"})}),!(null==t?void 0:t.active)&&C&&(0,o.jsx)(a.esZ,{title:"Enable label",children:(0,o.jsx)(a.wpx,{"aria-label":"enable",onClick:w,"data-testid":"enable-btn",icon:(0,o.jsx)(a.tEF,{fontSize:"small"})})}),(0,o.jsx)("div",{className:"flex gap-2",children:C&&(0,o.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:i,children:"Save"})})]}),children:[(0,o.jsxs)("div",{className:"mb-4",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(a.AntTypography.Title,{level:3,children:"Details"})}),(0,o.jsxs)("div",{className:"flex",children:[(0,o.jsx)("span",{className:"w-1/3 shrink-0 text-sm text-gray-500",children:"Fides key:"}),(0,o.jsx)(a.esZ,{title:null==t?void 0:t.fides_key,trigger:"click",children:(0,o.jsx)("span",{className:"flex-1 truncate","data-testid":"edit-drawer-fides-key",children:null==t?void 0:t.fides_key})})]})]}),!!t&&(0,o.jsx)(O,{initialValues:t,onSubmit:S,form:l,formId:i,taxonomyType:n,isDisabled:!C}),j.isEnabled&&!j.isLoading&&(0,o.jsx)(N,{form:s,formId:"custom-fields-form",customFields:j})]}),(0,o.jsx)(a.cVQ,{isOpen:c,onClose:f,onConfirm:I,title:"Delete ".concat(n),message:(0,o.jsx)(a.Kqy,{children:(0,o.jsxs)(a.xvT,{children:["You are about to permanently delete the ",n," ",(0,o.jsx)(a.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name})," ","from your taxonomy. Are you sure you would like to continue?"]})})})]})};n(51901);var L=n(86298),F=n(3124),V=n.n(F);(r=i||(i={})).DEFAULT="DEFAULT",r.ACTIVE_HOVER="ACTIVE_HOVER",r.PARENT_OF_HOVER="PARENT_OF_HOVER",r.CHILD_OF_HOVER="CHILD_OF_HOVER",r.SIBLING_OF_HOVER="SIBLING_OF_HOVER",r.INACTIVE="INACTIVE";let z=(0,c.createContext)({activeNodeKey:null,setActiveNodeKey:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},getNodeHoverStatus:()=>"DEFAULT"}),U=e=>{let{children:t}=e,[n,r]=(0,c.useState)(null),i=(0,c.useCallback)(e=>{e!==n&&r(e)},[n]),a=(0,c.useCallback)(()=>{r(null)},[]),l=(0,c.useCallback)(e=>n?e===n?"ACTIVE_HOVER":n.startsWith("".concat(e,"."))||e===g.Ch?"PARENT_OF_HOVER":e.startsWith("".concat(n,"."))||n===g.Ch?"CHILD_OF_HOVER":n.split(".").slice(0,-1).join(".")===e.split(".").slice(0,-1).join(".")?"SIBLING_OF_HOVER":"INACTIVE":"DEFAULT",[n]),s=(0,c.useMemo)(()=>({activeNodeKey:n,setActiveNodeKey:r,onMouseEnter:i,onMouseLeave:a,getNodeHoverStatus:l}),[n,r,i,a,l]);return(0,o.jsx)(z.Provider,{value:s,children:t})};function H(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function M(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=G)):void 0===t&&(t=B);for(var n,r,i,o,a,l=new Y(e),s=[l];n=s.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)s.push(r=i[o]=new Y(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(q)}function B(e){return e.children}function G(e){return Array.isArray(e)?e[1]:null}function Z(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function q(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Y(e){this.data=e,this.depth=this.height=0,this.parent=null}function W(e,t){return e.parent===t.parent?1:2}function K(e){var t=e.children;return t?t[0]:e.t}function J(e){var t=e.children;return t?t[t.length-1]:e.t}function $(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function X(e){return null==e?null:function(e){if("function"!=typeof e)throw Error();return e}(e)}Y.prototype=M.prototype={constructor:Y,count:function(){return this.eachAfter(H)},each:function(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],l=[],s=-1;o=a.pop();)if(l.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=l.pop();)e.call(t,o,++s,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)r.push(t=t.parent);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return M(this).eachBefore(Z)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);while(o.length)}},$.prototype=Object.create(Y.prototype);var Q={depth:-1},ee={},et={};function en(e){return e.id}function er(e){return e.parentId}function ei(e){let t=e.length;if(t<2)return"";for(;--t>1&&!eo(e,t););return e.slice(0,t)}function eo(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if((1&n)==0)return!0}return!1}let ea=function(){var e=W,t=1,n=1,r=null;function i(i){var s=function(e){for(var t,n,r,i,o,a=new $(e,0),l=[a];t=l.pop();)if(r=t._.children)for(t.children=Array(o=r.length),i=o-1;i>=0;--i)l.push(n=t.children[i]=new $(r[i],i)),n.parent=t;return(a.parent=new $(null,0)).children=[a],a}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(l);else{var u=i,c=i,d=i;i.eachBefore(function(e){e.x<u.x&&(u=e),e.x>c.x&&(c=e),e.depth>d.depth&&(d=e)});var h=u===c?1:e(u,c)/2,f=h-u.x,p=t/(c.x+h+f),x=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+f)*p,e.y=e.depth*x})}return i}function o(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)t=i[o],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o,a,l=t,s=t,u=n,c=l.parent.children[0],d=l.m,h=s.m,f=u.m,p=c.m;u=J(u),l=K(l),u&&l;)c=K(c),(s=J(s)).a=t,(a=u.z+f-l.z-d+e(u._,l._))>0&&(function(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}((i=u,o=r,i.a.parent===t.parent?i.a:o),t,a),d+=a,h+=a),f+=u.m,d+=l.m,p+=c.m,h+=s.m;u&&!J(s)&&(s.t=u,s.m+=f-h),l&&!K(c)&&(c.t=l,c.m+=d-p,r=t)}return r}(t,i,t.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}();var el=e=>{let{nodes:t,edges:n,options:r}=e;return(0,c.useMemo)(()=>{if(0===t.length)return{nodes:t,edges:n};let e=(function(){var e,t=en,n=er;function r(r){var i,o,a,l,s,u,c,d,h=Array.from(r),f=t,p=n,x=new Map;if(null!=e){let t=h.map((t,n)=>{var i;let o;return i=e(t,n,r),o=(i=`${i}`).length,eo(i,o-1)&&!eo(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}),n=t.map(ei),i=new Set(t).add("");for(let e of n)i.has(e)||(i.add(e),t.push(e),n.push(ei(e)),h.push(et));f=(e,n)=>t[n],p=(e,t)=>n[t]}for(a=0,i=h.length;a<i;++a)o=h[a],u=h[a]=new Y(o),null!=(c=f(o,a,r))&&(c+="")&&(d=u.id=c,x.set(d,x.has(d)?ee:u)),null!=(c=p(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=h[a]).parent){if(!(s=x.get(c)))throw Error("missing: "+c);if(s===ee)throw Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw Error("multiple roots");l=u}if(!l)throw Error("no root");if(null!=e){for(;l.data===et&&1===l.children.length;)l=l.children[0],--i;for(let e=h.length-1;e>=0&&(u=h[e]).data===et;--e)u.data=null}if(l.parent=Q,l.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(q),l.parent=null,i>0)throw Error("cycle");return l}return r.id=function(e){return arguments.length?(t=X(e),r):t},r.parentId=function(e){return arguments.length?(n=X(e),r):n},r.path=function(t){return arguments.length?(e=X(t),r):e},r})().id(e=>e.id).parentId(e=>{var t;return null===(t=n.find(t=>t.target===e.id))||void 0===t?void 0:t.source})(t),i="LR"===r.direction?[35,320]:[320,35];return{nodes:ea.nodeSize(i).separation((e,t)=>e.parent===t.parent?1:1.5)(e).descendants().map(e=>{let t;return t="LR"===r.direction?{x:e.y,y:e.x}:{x:e.x,y:e.y},{...e.data,position:t}}),edges:n}},[t,n,r])},es=e=>{let{positionAbsoluteX:t,positionAbsoluteY:n,nodeWidth:r}=e,{setCenter:i,getZoom:o}=(0,L._K)();return{centerScreenOnNode:(0,c.useCallback)(()=>i(t+r/2,n,{duration:500,zoom:o()}),[o,t,n,r,i])}},eu=n(1945),ec=n.n(eu),ed=n(8335),eh=e=>{let{type:t,inactive:n=!1}=e;return(0,o.jsx)(L.HH,{type:t,position:"source"===t?ed.Ly.Right:ed.Ly.Left,style:{width:8,height:8,backgroundColor:n?V().FIDESUI_NEUTRAL_400:V().FIDESUI_MINOS},className:"transition-colors duration-300 ease-in"})},ef=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:r}=e,{onCancel:i,onSubmit:l,parentKey:s}=t,u=(0,c.useRef)(null),[d,h]=(0,c.useState)(""),{centerScreenOnNode:f}=es({positionAbsoluteX:n,positionAbsoluteY:r,nodeWidth:200});return(0,c.useEffect)(()=>{h("");let e=()=>{var e;return null===(e=u.current)||void 0===e?void 0:e.focus({cursor:"start",preventScroll:!0})};(async()=>{await f(),e()})()},[s,f,n,r]),(0,o.jsxs)("div",{style:{width:200},"data-testid":"taxonomy-text-input-node",children:[(0,o.jsx)(a.uFc,{placeholder:"Type label name...",ref:u,onBlur:i,onSubmit:()=>l(d),value:d,onChange:e=>h(e.target.value),onKeyUp:e=>{"Escape"===e.key&&i()},onPressEnter:()=>l(d),className:ec().input}),(0,o.jsx)(eh,{type:"target"})]})},ep=e=>{let{getNodeHoverStatus:t}=(0,c.useContext)(z),{target:n}=e,r=t(n),a=(0,c.useCallback)(()=>{switch(r){case i.ACTIVE_HOVER:case i.PARENT_OF_HOVER:return V().FIDESUI_MINOS;case i.INACTIVE:return V().NEUTRAL_400;default:return V().FIDESUI_SANDSTONE}},[r]),l=(0,c.useCallback)(()=>{switch(r){case i.ACTIVE_HOVER:case i.PARENT_OF_HOVER:return 2;default:return 1}},[r]);return(0,o.jsx)(L.Jd,{...e,style:{stroke:a(),strokeWidth:l(),transition:"stroke 0.3s ease 0s"}})},ex=n(34770),em=n.n(ex),e_=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:r}=e,{onMouseEnter:l,onMouseLeave:s,getNodeHoverStatus:u}=(0,c.useContext)(z),{taxonomyType:d,taxonomyItem:h,onAddButtonClick:f,onTaxonomyItemClick:p,label:x,hasChildren:m,isLastCreatedItem:_,resetLastCreatedItemKey:v,userCanAddLabels:y}=t,{centerScreenOnNode:T}=es({positionAbsoluteX:n,positionAbsoluteY:r,nodeWidth:200});(0,c.useEffect)(()=>{let e=async()=>{await T(),l(null==h?void 0:h.fides_key)};_&&(e(),v())},[_,l,null==h?void 0:h.fides_key,v,T]);let E=u(null==h?void 0:h.fides_key),j=(0,c.useCallback)(()=>{switch(E){case i.ACTIVE_HOVER:return em()["button--hover"];case i.PARENT_OF_HOVER:return em()["button--parent-hover"];case i.INACTIVE:return em()["button--inactive"];case i.DEFAULT:case i.CHILD_OF_HOVER:case i.SIBLING_OF_HOVER:default:return""}},[E]),C=(null==h?void 0:h.fides_key)===g.Ch,A=d===g.Lo.DATA_SUBJECTS;return(0,o.jsxs)("div",{className:em().container,onMouseEnter:()=>l(null==h?void 0:h.fides_key),onMouseLeave:()=>s(null==h?void 0:h.fides_key),"data-testid":"taxonomy-node-".concat(null==h?void 0:h.fides_key),children:[(0,o.jsx)(a.wpx,{className:"".concat(em().button," ").concat(j()),onClick:()=>null==p?void 0:p(h),disabled:!p,type:"text",children:(0,o.jsxs)(a.AntTypography.Text,{ellipsis:!0,style:{color:"inherit"},children:[(null==h?void 0:h.active)===!1?"(disabled) ":"",x]})}),!C&&(0,o.jsx)(eh,{type:"target",inactive:E===i.INACTIVE}),m&&(0,o.jsx)(eh,{type:"source",inactive:E===i.INACTIVE}),y&&(!A||C)&&(0,o.jsx)("div",{className:em()["add-button-container"],children:(0,o.jsx)(a.wpx,{type:"default",className:"".concat(em()["add-button"]," ").concat(E===i.ACTIVE_HOVER?em()["add-button--visible"]:""),icon:(0,o.jsx)(a.PJP.mm_,{size:20}),onClick:()=>null==f?void 0:f(h),size:"middle","data-testid":"taxonomy-add-child-label-button","aria-label":"Add child label to ".concat(x)})})]})};let ev=e=>{let{taxonomyType:t,taxonomyItems:n,draftNewItem:r,lastCreatedItemKey:i,resetLastCreatedItemKey:a,onTaxonomyItemClick:l,onAddButtonClick:s,onCancelDraftItem:u,onSubmitDraftItem:d,userCanAddLabels:h}=e,{fitView:f}=(0,L._K)();(0,c.useEffect)(()=>{setTimeout(()=>f(),150)},[f,t]);let p=[(0,c.useMemo)(()=>({id:g.Ch,position:{x:0,y:0},data:{label:t,taxonomyItem:{fides_key:g.Ch},taxonomyType:t,onTaxonomyItemClick:null,onAddButtonClick:s,hasChildren:0!==n.length,userCanAddLabels:h},type:"taxonomyTreeNode"}),[t,n.length,s,h])],x=[];if(n.forEach(e=>{let n=e.name||e.fides_key.split(".").pop()||"",r={id:e.fides_key,position:{x:0,y:0},data:{label:n,taxonomyType:t,taxonomyItem:e,onTaxonomyItemClick:l,onAddButtonClick:s,hasChildren:!1,isLastCreatedItem:i===e.fides_key,resetLastCreatedItemKey:a,userCanAddLabels:h},type:"taxonomyTreeNode"};p.push(r);let o=e.parent_key?p.find(t=>t.id===e.parent_key):null,u=o?o.id:g.Ch,c=e.fides_key,d={id:"".concat(u,"-").concat(c),source:u,target:c,type:"taxonomyTreeEdge"};x.push(d),o&&(o.data.hasChildren=!0)}),r){let e=r.parent_key||g.Ch;p.push({id:"draft-node",position:{x:0,y:0},type:"textInputNode",data:{parentKey:e,onCancel:u,onSubmit:d},hidden:!r}),x.push({id:"draft-line",source:e,target:"draft-node",animated:!0});let t=p.find(t=>t.id===e);t&&(t.data.hasChildren=!0)}let{nodes:m,edges:_}=el({nodes:p,edges:x,options:{direction:"LR"}}),v=(0,c.useMemo)(()=>({taxonomyTreeNode:e_,textInputNode:ef}),[]),y=(0,c.useMemo)(()=>({taxonomyTreeEdge:ep}),[]);return(0,o.jsx)("div",{className:"size-full",style:{backgroundColor:V().FIDESUI_BG_CORINTH},"data-testid":"taxonomy-interactive-tree",children:(0,o.jsx)(U,{children:(0,o.jsxs)(L.x$,{nodes:m,edges:_,nodeTypes:v,edgeTypes:y,maxZoom:2,minZoom:.3,nodesConnectable:!1,edgesFocusable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},children:[(0,o.jsx)(L.Aq,{color:V().FIDESUI_NEUTRAL_100,variant:L.T7.Dots,size:3}),(0,o.jsx)(L.a9,{nodeStrokeWidth:3,pannable:!0}),(0,o.jsx)(L.ZX,{showInteractive:!1})]})})})};var ey=e=>(0,o.jsx)(L.tV,{children:(0,o.jsx)(ev,{...e})}),eg=()=>{let[e,t]=(0,c.useState)(g.Lo.DATA_CATEGORIES),{createTrigger:n,getAllTrigger:r,taxonomyItems:i=[]}=A({taxonomyType:e}),l=(0,u.useSearchParams)(),m=(null==l?void 0:l.get("showDisabledItems"))==="true";(0,c.useEffect)(()=>{r()},[r,e]);let[_,v]=(0,c.useState)(null),[y,T]=(0,c.useState)(null),[E,j]=(0,c.useState)(null);(0,c.useEffect)(()=>{T(null),j(null),v(null)},[e]);let C=(0,a.pmc)(),b=(0,c.useCallback)(async e=>{if(!y)return;let t=(null==y?void 0:y.parent_key)===g.Ch,r={...y,name:e,parent_key:t?null:y.parent_key},i=await n(r);if((0,d.D4)(i)){C((0,x.Vo)((0,d.e$)(i.error)));return}j(i.data.fides_key),C((0,x.t5)("New label successfully created")),T(null)},[n,y,C]),S=s()(i,"active"),I=(0,p.Tg)([(0,g.Hy)(e).CREATE]);return(0,o.jsxs)(h.Z,{title:"Taxonomy",children:[(0,o.jsxs)(a.jqI,{vertical:!0,className:"h-full",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(f.Z,{heading:"Taxonomy"}),(0,o.jsx)("div",{className:"hidden",children:(0,o.jsx)("div",{className:"mb-5 flex justify-between",children:(0,o.jsxs)(a.vyj.Compact,{children:[(0,o.jsx)(a.uFc,{className:"min-w-[350px]",placeholder:"Search",allowClear:!0}),(0,o.jsx)(a.wpx,{type:"default",children:"Clear"})]})})})]}),(0,o.jsxs)("div",{className:"relative grow",children:[(0,o.jsx)("div",{className:"absolute left-2 top-2 z-[1]",children:(0,o.jsx)(a.AHg,{selectedKeys:[e],onSelect:e=>{let{key:n}=e;return t(n)},items:(0,d.MM)(g.Lo).map(e=>({label:e.label,key:e.value})),"data-testid":"taxonomy-type-selector"})}),!!i.length&&(0,o.jsx)(ey,{userCanAddLabels:I,taxonomyItems:m?i:S,draftNewItem:y,lastCreatedItemKey:E,resetLastCreatedItemKey:()=>j(null),onTaxonomyItemClick:e=>{v(e)},onAddButtonClick:e=>{var t;T({parent_key:null!==(t=null==e?void 0:e.fides_key)&&void 0!==t?t:null,is_default:!1,description:""})},taxonomyType:e,onCancelDraftItem:()=>T(null),onSubmitDraftItem:b})]})]}),_&&(0,o.jsx)(P,{taxonomyItem:_,taxonomyType:e,onClose:()=>v(null)})]})}},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=n(19043)},1945:function(e){e.exports={input:"TaxonomyTextInputNode_input__P9czz"}},34770:function(e){e.exports={container:"TaxonomyTreeNode_container__T4KpF",button:"TaxonomyTreeNode_button__mcbOd","button--hover":"TaxonomyTreeNode_button--hover__oycXY","button--parent-hover":"TaxonomyTreeNode_button--parent-hover__pwAPl","button--inactive":"TaxonomyTreeNode_button--inactive__Fjdpe","add-button-container":"TaxonomyTreeNode_add-button-container__eEoRN","add-button":"TaxonomyTreeNode_add-button__oM2vI","add-button--visible":"TaxonomyTreeNode_add-button--visible__Ojqqf"}}},function(e){e.O(0,[1096,431,8765,9278,3662,6148,4164,2888,9774,179],function(){return e(e.s=71180)}),_N_E=e.O()}]);
|