ethyca-fides 2.58.2b5__py2.py3-none-any.whl → 2.58.2rc0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/METADATA +11 -20
- {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/RECORD +178 -188
- {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/WHEEL +1 -1
- {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/entry_points.txt +1 -0
- fides/_version.py +3 -3
- fides/api/api/deps.py +2 -8
- fides/api/api/v1/endpoints/user_endpoints.py +12 -8
- fides/api/cryptography/identity_salt.py +13 -12
- fides/api/custom_types.py +1 -6
- fides/api/db/base.py +0 -5
- fides/api/db/system.py +3 -1
- fides/api/migrations/hash_migration_job.py +2 -2
- fides/api/models/attachment.py +11 -80
- fides/api/models/comment.py +15 -45
- fides/api/models/detection_discovery.py +0 -31
- fides/api/models/fides_user.py +9 -26
- fides/api/models/fides_user_invite.py +0 -2
- fides/api/models/privacy_experience.py +0 -68
- fides/api/models/privacy_request/privacy_request.py +6 -23
- fides/api/schemas/connection_configuration/connection_config.py +16 -30
- fides/api/schemas/user.py +1 -5
- fides/api/service/deps.py +0 -9
- fides/api/service/storage/s3.py +1 -14
- fides/api/service/user/fides_user_service.py +128 -0
- fides/api/task/graph_task.py +1 -1
- fides/api/util/collection_util.py +9 -48
- fides/cli/commands/pull.py +13 -77
- fides/core/api.py +1 -2
- fides/core/pull.py +7 -38
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1150-035a721a04f4451e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1376-5cea5ef9362215e8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{2397-0d1c289b788fcc11.js → 2397-ee53235fb21b5e97.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3412-7ec8751b8182e1bf.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3855-63495367531cb776.js → 3855-b6b7865dedd7bc2a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3872-472bb47eb34d8fdb.js → 3872-4e053c20d546f027.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4060-53a5c6347690a8fa.js → 4060-8d165e1236ea521a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/4450-36234280bee624ff.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4481-aab99ff80f707473.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5258-cf7b27ef51f38392.js → 5258-0658dc2274df6832.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5480-52dc446be40725f5.js → 5480-f49696df5e8ae500.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5487-8678d75ee1d1ef09.js → 5487-3ad50d21cdbc9209.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-52aee296edc44f7e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6315-fa1519cdf080f42d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{6372-e0bb9f8d07cc3b04.js → 6372-ca9c12ac8902365b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6853-09e831e9dff7fd3b.js → 6853-8941824350c3c1a8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6954-ec5276bb464d42b2.js → 6954-3b887fb444f9228c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7453-39761c38da31257e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{7751-a70fe0e5f67f5538.js → 7751-a8f31c062d4cb09d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{79-8e060d36d36c752c.js → 79-f9b948ebb186900f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7980-72f745bff9fabcc9.js → 7980-4bd08957448dea32.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9046-a69fa8f99c414570.js → 9046-04bd7becea207cb1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-1a23925d2cb27b51.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{main-090643377c8254e6.js → main-24f422f93845a596.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{main-app-59156a9331ac7bce.js → main-app-94a0711202e08b15.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-0c1548ca3b158123.js → _app-fc89ce7bed454c84.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-9f9500c639362aa6.js → manual-9acaab973dfe86e2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-fac606150b65d494.js → add-systems-d258f0c25fa020bf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-fb75fa0aea77678d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-c02b14c50b19bd91.js → new-a9d9402c219d13e5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-c946b33b0322b8ad.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-ea57f9d6ad17e957.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-100234c23a85d235.js → reporting-788cf0e34829af46.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-49bffaf07973fead.js → data-catalog-900004e402c31797.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-727f1f5d06be674b.js → [systemId]-b66831fdafcdf67c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-5f9ef1f99818117c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-d001337d1bb73bd1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-11b3ce9f61d9bfe9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-4d4a31d0186a4a5b.js → new-803c1b577ab17ae3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-29317d18ce34adfe.js → dataset-fa743ddc7f89d76b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-14c57e5069e9cccd.js → [id]-bbe1ca2793798e6b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-f0a4e385c1ad8fee.js → new-abc17fef69cd951b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-a78a73b65929853a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-b70def65e264270e.js → index-bfaacdb55a5a6c9f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-d4329043219fed9b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-1e60754abec1ee6b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-72d64a02b7ef175e.js → [id]-fe765154315782cf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-f5f7a8069909ef24.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-9f7eaad05e5b9292.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-fd81714d811db7b3.js → privacy-requests-d85c0d16ba09ba35.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-f035cddf17f4d898.js → datamap-afedc48ef4e7f858.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-89524101b7279f6e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-dfcd7a4b6aa773bd.js → custom-fields-52d030b1db2ca1b9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-24cba38685dc872c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-0e0aa552f520f913.js → organization-a08693d0d1e10bc8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-1d83d5178b3eb216.js → test-datasets-151571cff4e85894.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-a158fa77df288523.js → [id]-4f5a28226575c976.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-8490aaaee9d76a4a.js → systems-abd68fc5ddde5482.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-be1ffe267b1602e1.js → taxonomy-16b4d75c49276add.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-082c3156175f9267.js → new-be690621a944bfe2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-78eaf933f755bfe8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-a1db56f1cbfba373.js → user-management-6c9ad62479a7d03e.js} +1 -1
- fides/ui-build/static/admin/_next/static/css/{cf2744a40308fc4a.css → 113d823fe71f6af0.css} +1 -1
- fides/ui-build/static/admin/_next/static/o0mKeH0cB6eAYV6qOlVD0/_buildManifest.js +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/ant-poc.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +4 -4
- fides/ui-build/static/admin/lib/fides.js +3 -3
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/api/alembic/migrations/versions/67d01c4e124e_add_reject_all_mechanism_to_privacy_.py +0 -56
- fides/api/alembic/migrations/versions/6e565c16dae1_add_tcf_publisher_restrictions.py +0 -107
- fides/api/alembic/migrations/versions/9288f729cac4_add_tcf_configuration_fk_to_experience_.py +0 -62
- fides/api/alembic/migrations/versions/99c603c1b8f9_add_password_login_enabled_and_totp_secret_to_fidesuser.py +0 -45
- fides/api/models/tcf_publisher_restrictions.py +0 -465
- fides/service/error_handling/__init__.py +0 -0
- fides/service/error_handling/error_handler.py +0 -202
- fides/service/user/__init__.py +0 -0
- fides/service/user/user_service.py +0 -140
- fides/ui-build/static/admin/_next/static/_o6WH0hDzNEhnUJyvLex7/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1376-87058e04584cff20.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/146-0ae2d30ec71fce09.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1817-48e1c9d3504e18f0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3938-6a1c07d06a80cf4c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4121-4d5273d7a354994d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4450-9c3086ccb55c66aa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4481-275aa9f4c10bce53.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-d3d3872692c1d0fa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6315-24a0483ee1cab6cc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-8179ce7336727141.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-ab3ef485f6101697.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-ba5325035c71a97e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-ef31c181cac86c64.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-53efbed54d230f07.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-17d1525551d8904f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-7d2cb947eee11262.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-d2f88a8fc68944db.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-b75ab4ee677f118d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-26407674949bcbc4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-28d4bdf060ec8cb2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-208e49ef43361d6f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-ff1985f72d50ef47.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-5a0b10ec955097d4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-af83245e9373a064.js +0 -1
- fides/ui-build/static/admin/images/connector-logos/website.svg +0 -10
- {ethyca_fides-2.58.2b5.dist-info/licenses → ethyca_fides-2.58.2rc0.dist-info}/LICENSE +0 -0
- {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4723-1dd1d16f404d56a2.js → 4723-0a3c5e2ce143a7d0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5826-ef0aa43ffad83acc.js → 5826-e5dcb4e68cfe6289.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-a4e636eecaba5324.js → configure-723cc3d4f5740ea6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-606457ef5bd1eb04.js → [id]-72251b48e2e03a1e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-2ae030f3a28f057a.js → about-a49d0f84cf0cf05e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-72ec54ee8755a503.js → domain-records-fa42d8f18df44927.js} +0 -0
- /fides/ui-build/static/admin/_next/static/{_o6WH0hDzNEhnUJyvLex7 → o0mKeH0cB6eAYV6qOlVD0}/_ssgManifest.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9196],{95372:function(e){e.exports=function(e,t,a,s){for(var r=e.length,i=a+(s?1:-1);s?i--:++i<r;)if(t(e[i],i,e))return i;return -1}},67375:function(e,t,a){var s=a(52033),r=a(80068);e.exports=function(e,t){var a=-1,i=r(e)?Array(e.length):[];return s(e,function(e,s,r){i[++a]=t(e,s,r)}),i}},74833:function(e,t,a){var s=a(56127),r=/^\s+/;e.exports=function(e){return e?e.slice(0,s(e)+1).replace(r,""):e}},56632:function(e,t,a){var s=a(89278),r=a(80068),i=a(50098);e.exports=function(e){return function(t,a,n){var o=Object(t);if(!r(t)){var l=s(a,3);t=i(t),a=function(e){return l(o[e],e,o)}}var c=e(t,a,n);return c>-1?o[l?t[c]:c]:void 0}}},56127:function(e){var t=/\s/;e.exports=function(e){for(var a=e.length;a--&&t.test(e.charAt(a)););return a}},64925:function(e,t,a){var s=a(56632)(a(66259));e.exports=s},66259:function(e,t,a){var s=a(95372),r=a(89278),i=a(47991),n=Math.max;e.exports=function(e,t,a){var o=null==e?0:e.length;if(!o)return -1;var l=null==a?0:i(a);return l<0&&(l=n(o+l,0)),s(e,r(t,3),l)}},55807:function(e,t,a){var s=a(66070),r=a(89278),i=a(67375),n=a(19785);e.exports=function(e,t){return(n(e)?s:i)(e,r(t,3))}},32526:function(e,t,a){var s=a(68267)(function(e,t,a){return e+(a?"_":"")+t.toLowerCase()});e.exports=s},94919:function(e,t,a){var s=a(91936),r=1/0;e.exports=function(e){return e?(e=s(e))===r||e===-r?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,a){var s=a(94919);e.exports=function(e){var t=s(e),a=t%1;return t==t?a?t-a:t:0}},91936:function(e,t,a){var s=a(74833),r=a(11611),i=a(55193),n=0/0,o=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return n;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var a=l.test(e);return a||c.test(e)?d(e.slice(2),a?2:8):o.test(e)?n:+e}},86548:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reporting/datamap",function(){return a(11803)}])},624:function(e,t,a){"use strict";var s=a(24246),r=a(77181),i=a(27378);let n=e=>{let t=e.split("."),a=[];return t.forEach(e=>{let t=a.length>0?a[a.length-1]:null;t?a.push("".concat(t,".").concat(e)):a.push(e)}),a},o=(e,t)=>{let a=n(t).filter(e=>e!==t);return e.filter(e=>a.includes(e)).length>0},l=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,a)=>{let s=null!=a?a:[];return e.forEach(e=>{e.children&&c(e.children,t,s),l(e.value,t)&&s.push(e)}),s},d=e=>{let{node:t,isChecked:a,onChecked:i,isExpanded:n,onExpanded:o,isIndeterminate:l,isDisabled:c,children:d}=e,{value:u,label:_}=t,p=!!t.children&&t.children.length>0;return(0,s.jsxs)(r.xuv,{children:[(0,s.jsxs)(r.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>o(t),minHeight:8,children:[(0,s.jsx)(r.XZJ,{colorScheme:"complimentary",value:u,isChecked:!l&&a,isIndeterminate:l,isDisabled:c,onChange:()=>i(t),mx:2,"data-testid":"checkbox-".concat(_),children:_}),p?(0,s.jsx)(r.wpx,{"data-testid":"expand-".concat(_),"aria-label":n?"collapse":"expand",icon:(0,s.jsx)(r.v4q,{boxSize:5}),type:"text",onClick:()=>o(t),className:n?"rotate-180":void 0}):null]}),d&&(0,s.jsx)(r.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:a,onSelected:u,..._}=e,[p,m]=(0,i.useState)([]),[E,S]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=Array.from(new Set([...a.map(e=>n(e)).reduce((e,t)=>e.concat(t),[]),...a.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));S(e),m(e)},[a,t]);let h=e=>{let s=[],r=[];p.indexOf(e.value)>=0?(s=p.filter(t=>!l(t,e.value)),r=a.filter(t=>!l(t,e.value))):(s=[...p,...c(t,e.value).map(e=>e.value)],r=[...a,e.value]),m(s),u(r)},f=e=>{E.indexOf(e.value)>=0?S(E.filter(t=>!l(t,e.value))):S([...E,e.value])},g=e=>{if(e.children){let r=p.indexOf(e.value)>=0,n=E.indexOf(e.value)>=0,l=c(t,e.value),u=r&&e.children.length>0&&p.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==l.length,_=o(a,e.value);return(0,s.jsx)(d,{node:e,isChecked:r,onChecked:h,isExpanded:n,onExpanded:f,isDisabled:_,isIndeterminate:u,children:n?e.children.map(e=>(0,s.jsx)(i.Fragment,{children:g(e)},e.value)):void 0})}return null};return(0,s.jsx)(r.xuv,{..._,children:t.map(e=>(0,s.jsx)(r.xuv,{children:g(e)},e.value))})}},35287:function(e,t,a){"use strict";var s=a(24246),r=a(77181),i=a(88038),n=a.n(i);a(27378),t.Z=e=>{let{children:t,title:a,mainProps:i}=e;return(0,s.jsxs)(r.kCb,{"data-testid":a,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,s.jsxs)(n(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",a]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...i,children:t})]})}},56358:function(e,t,a){"use strict";a.d(t,{q:function(){return r}});var s=a(24246);let r=(0,a(77181).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,s.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},19904:function(e,t,a){"use strict";a.d(t,{Tg:function(){return n}});var s=a(24246),r=a(16134),i=a(31793);let n=e=>(0,r.C)(i.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:a}=e;return n(t)?(0,s.jsx)(s.Fragment,{children:a}):null}},70416:function(e,t,a){"use strict";a.d(t,{d:function(){return r}});var s=a(24246);let r=(0,a(77181).IUT)({displayName:"AddIcon",viewBox:"0 0 10 10",path:(0,s.jsx)("path",{d:"M4.33331 4.33398V0.333984H5.66665V4.33398H9.66665V5.66732H5.66665V9.66732H4.33331V5.66732H0.333313V4.33398H4.33331Z",fill:"currentColor"})})},34929:function(e,t,a){"use strict";var s=a(24246),r=a(64925),i=a.n(r),n=a(27378),o=a(16134),l=a(30002),c=a(28079),d=a(57072);let u=()=>{let{isLoading:e}=(0,c.fd)(),t=(0,o.C)(c.U3),{isLoading:a}=(0,d.MO)(),s=(0,o.C)(d.qb),{isLoading:r}=(0,l.te)();return{dataUses:t,dataSubjects:(0,o.C)(l.ZL),dataCategories:s,isLoading:e||a||r}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:a,isLoading:r}=u(),o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},l=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=t(e);if(!s)return{};let r=t(o(e,a)),i=!!s.parent_key;return{name:s.name||void 0,primaryName:i&&(null==r?void 0:r.name)!==s.name&&(null==r?void 0:r.name)||void 0}},c=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:i}=l(e,t,a);return r?i?(0,s.jsxs)(n.Fragment,{children:[(0,s.jsxs)("strong",{children:[i,":"]})," ",r]},e):(0,s.jsx)("strong",{children:r},e):e},d=t=>i()(e,{fides_key:t}),_=e=>i()(t,{fides_key:e}),p=e=>i()(a,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:d,getDataUseDisplayName:e=>c(e,d,1),getDataUseDisplayNameProps:e=>l(e,d,1),getDataCategories:()=>t,getDataCategoryByKey:_,getDataCategoryDisplayName:e=>c(e,_,2),getDataCategoryDisplayNameProps:e=>l(e,_,2),getDataSubjects:()=>a,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:o,isLoading:r}}},59001:function(e,t,a){"use strict";a.d(t,{Ch:function(){return n},Hy:function(){return o},Lo:function(){return r}});var s,r,i=a(28120);let n="root";(s=r||(r={})).DATA_CATEGORIES="Data categories",s.DATA_USES="Data uses",s.DATA_SUBJECTS="Data subjects";let o=e=>{switch(e){case"Data categories":return{UPDATE:i.Sh.DATA_CATEGORY_UPDATE,CREATE:i.Sh.DATA_CATEGORY_CREATE,DELETE:i.Sh.DATA_CATEGORY_DELETE,READ:i.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:i.Sh.DATA_USE_UPDATE,CREATE:i.Sh.DATA_USE_CREATE,DELETE:i.Sh.DATA_USE_DELETE,READ:i.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:i.Sh.DATA_SUBJECT_UPDATE,CREATE:i.Sh.DATA_SUBJECT_CREATE,DELETE:i.Sh.DATA_SUBJECT_DELETE,READ:i.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,a){"use strict";a.d(t,{Cd:function(){return i},Xl:function(){return n}});var s=a(28120),r=a(59001);let i=(e,t)=>{let a;if(null==t&&e.every(e=>void 0===e.parent_key))a=e;else{let s=null!=t?t:null;a=e.filter(e=>e.parent_key===s)}return a.map(t=>{var a,s;let r=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:i(e,r),is_default:null!==(a=t.is_default)&&void 0!==a&&a,active:null!==(s=t.active)&&void 0!==s&&s}})},n=e=>{switch(e){case r.Lo.DATA_CATEGORIES:return s.P6.DATA_CATEGORY;case r.Lo.DATA_SUBJECTS:return s.P6.DATA_SUBJECT;case r.Lo.DATA_USES:return s.P6.DATA_USE;default:return}}},11803:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return ex}});var s,r,i,n,o=a(24246),l=a(27378),c=a(35287),d=a(58754),u=a(71795),_=a(28120);(s=i||(i={})).COLUMN_EXPANSION_STATE="datamap-column-expansion-state",s.COLUMN_NAMES="datamap-column-names",s.COLUMN_ORDER="datamap-column-order",s.COLUMN_SIZING="datamap-column-sizing",s.COLUMN_VISIBILITY="datamap-column-visibility",s.CUSTOM_REPORT_ID="datamap-custom-report-id",s.FILTERS="datamap-filters",s.GROUP_BY="datamap-group-by",s.SORTING_STATE="datamap-sorting-state",s.WRAPPING_COLUMNS="datamap-wrapping-columns",(r=n||(n={})).SYSTEM_NAME="system_name",r.DATA_USE="data_uses",r.DATA_CATEGORY="data_categories",r.DATA_SUBJECT="data_subjects",r.LEGAL_NAME="legal_name",r.DPO="dpo",r.LEGAL_BASIS_FOR_PROCESSING="legal_basis_for_processing",r.ADMINISTRATING_DEPARTMENT="administrating_department",r.COOKIE_MAX_AGE_SECONDS="cookie_max_age_seconds",r.PRIVACY_POLICY="privacy_policy",r.LEGAL_ADDRESS="legal_address",r.COOKIE_REFRESH="cookie_refresh",r.DATA_SECURITY_PRACTICES="data_security_practices",r.DATA_SHARED_WITH_THIRD_PARTIES="data_shared_with_third_parties",r.DATA_STEWARDS="data_stewards",r.DECLARATION_NAME="declaration_name",r.DOES_INTERNATIONAL_TRANSFERS="does_international_transfers",r.DPA_LOCATION="dpa_location",r.DESTINATIONS="egress",r.EXEMPT_FROM_PRIVACY_REGULATIONS="exempt_from_privacy_regulations",r.FEATURES="features",r.FIDES_KEY="fides_key",r.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING="flexible_legal_basis_for_processing",r.IMPACT_ASSESSMENT_LOCATION="impact_assessment_location",r.SOURCES="ingress",r.JOINT_CONTROLLER_INFO="joint_controller_info",r.LEGAL_BASIS_FOR_PROFILING="legal_basis_for_profiling",r.LEGAL_BASIS_FOR_TRANSFERS="legal_basis_for_transfers",r.LEGITIMATE_INTEREST_DISCLOSURE_URL="legitimate_interest_disclosure_url",r.PROCESSES_PERSONAL_DATA="processes_personal_data",r.REASON_FOR_EXEMPTION="reason_for_exemption",r.REQUIRES_DATA_PROTECTION_ASSESSMENTS="requires_data_protection_assessments",r.RESPONSIBILITY="responsibility",r.RETENTION_PERIOD="retention_period",r.SHARED_CATEGORIES="shared_categories",r.SPECIAL_CATEGORY_LEGAL_BASIS="special_category_legal_basis",r.THIRD_PARTIES="third_parties",r.COOKIES="cookies",r.USES_COOKIES="uses_cookies",r.USES_NON_COOKIE_ACCESS="uses_non_cookie_access",r.USES_PROFILING="uses_profiling",r.SYSTEM_UNDECLARED_DATA_CATEGORIES="system_undeclared_data_categories",r.DATA_USE_UNDECLARED_DATA_CATEGORIES="data_use_undeclared_data_categories",r.PROCESSES_SPECIAL_CATEGORY_DATA="processes_special_category_data";let p={system_name:"System",data_uses:"Data use",data_categories:"Data categories",data_subjects:"Data subject",legal_name:"Legal name",dpo:"Data privacy officer",legal_basis_for_processing:"Legal basis for processing",administrating_department:"Administrating department",cookie_max_age_seconds:"Cookie max age seconds",privacy_policy:"Privacy policy",legal_address:"Legal address",cookie_refresh:"Cookie refresh",data_security_practices:"Data security practices",data_shared_with_third_parties:"Data shared with third parties",data_stewards:"Data stewards",declaration_name:"Declaration name",does_international_transfers:"Does international transfers",dpa_location:"DPA location",egress:"Destination",exempt_from_privacy_regulations:"Exempt from privacy regulations",features:"Features",fides_key:"Fides key",flexible_legal_basis_for_processing:"Flexible legal basis for processing",impact_assessment_location:"Impact assessment location",ingress:"Source",joint_controller_info:"Joint controller info",legal_basis_for_profiling:"Legal basis for profiling",legal_basis_for_transfers:"Legal basis for transfers",legitimate_interest_disclosure_url:"Legitimate interest disclosure URL",processes_personal_data:"Processes personal data",reason_for_exemption:"Reason for exemption",requires_data_protection_assessments:"Requires data protection assessments",responsibility:"Responsibility",retention_period:"Retention period",shared_categories:"Shared categories",special_category_legal_basis:"Special category legal basis",third_parties:"Third parties",system_undeclared_data_categories:"System undeclared data categories",data_use_undeclared_data_categories:"Data use undeclared data categories",cookies:"Cookies",uses_cookies:"Uses cookies",uses_non_cookie_access:"Uses non-cookie access",uses_profiling:"Uses profiling",processes_special_category_data:"Processes special category data"},m={[n.SYSTEM_UNDECLARED_DATA_CATEGORIES]:!1,[n.DATA_USE_UNDECLARED_DATA_CATEGORIES]:!1},E={dataUses:[],dataSubjects:[],dataCategories:[]},S=(0,l.createContext)({}),h=e=>{let{children:t}=e,[a,s]=(0,u._)(i.CUSTOM_REPORT_ID,""),[r,n]=(0,u._)(i.GROUP_BY,_.fI.SYSTEM_DATA_USE),[c,d]=(0,u._)(i.FILTERS,E),[p,h]=(0,u._)(i.COLUMN_ORDER,[]),[f,g]=(0,u._)(i.COLUMN_VISIBILITY,m),[A,x]=(0,u._)(i.COLUMN_SIZING,{}),[T,C]=(0,u._)(i.COLUMN_NAMES,{}),v=(0,l.useMemo)(()=>({savedCustomReportId:a,setSavedCustomReportId:s,groupBy:r,setGroupBy:n,selectedFilters:c,setSelectedFilters:d,columnOrder:p,setColumnOrder:h,columnVisibility:f,setColumnVisibility:g,columnSizing:A,setColumnSizing:x,columnNameMapOverrides:T,setColumnNameMapOverrides:C}),[a,s,r,n,c,d,p,h,f,g,A,x,T,C]);return(0,o.jsx)(S.Provider,{value:v,children:t})},f=()=>{let e=(0,l.useContext)(S);if(!e||0===Object.keys(e).length)throw Error("useDatamapReport must be used within a DatamapReportProvider");return e};var g=a(59003),A=a(92222),x=a(14481),T=a(77181),C=a(34090),v=a(66726),R=a.n(v),O=a(16134),j=a(34929),b=a(14048),y=a(19904),D=a(16394),I=a(38943),N=a(35258),L=e=>{let{children:t,heading:a,onCancel:s,onConfirm:r,isLoading:i,cancelButtonText:n,continueButtonText:l,"data-testid":c="standard-dialog",...d}=e,{onClose:u}=d;return(0,o.jsxs)(T.u_l,{closeOnOverlayClick:i,...d,children:[(0,o.jsx)(T.ZAr,{}),(0,o.jsxs)(T.hzk,{"data-testid":c,children:[a&&(0,o.jsx)(T.xBx,{children:a}),(0,o.jsx)(T.olH,{isDisabled:i,"data-testid":"standard-dialog-close-btn"}),t&&(0,o.jsx)(T.fef,{children:t}),(0,o.jsxs)(T.mzw,{gap:3,width:"100%",sx:{"& button":{width:"100%"}},children:[(0,o.jsx)(T.wpx,{onClick:()=>{s&&s(),u()},"data-testid":"".concat(c?"".concat(c,"-"):"","cancel-btn"),disabled:i,children:n||"Cancel"}),(0,o.jsx)(T.wpx,{onClick:r,type:"primary","data-testid":"".concat(c?"".concat(c,"-"):"","continue-btn"),loading:i,children:l||"Continue"})]})]})]})},w=a(22968),P=e=>{let[t,a]=(0,l.useState)(w.T2.csv),{onConfirm:s}=e;return(0,o.jsx)(L,{heading:"Export report",continueButtonText:"Download",size:"xl",...e,onConfirm:()=>s(t),"data-testid":"export-modal",children:(0,o.jsxs)(T.kCb,{direction:"column",gap:3,pb:3,children:[(0,o.jsx)(T.xvT,{textAlign:"left",children:"Export your data map report using the options below. Depending on the number of rows, the file may take a few minutes to process."}),(0,o.jsxs)(T.NIc,{children:[(0,o.jsx)(T.lXp,{htmlFor:"format",children:"Choose Format"}),(0,o.jsx)(T.WPr,{id:"format",value:t,onChange:a,"data-testid":"export-format-select",options:[{value:w.T2.csv,label:"CSV"},{value:w.T2.xlsx,label:"XLSX"}],className:"w-full"})]})]})})},M=a(624),U=a(30002),k=a(28079),G=a(90673),H=a(39864);let Y=e=>{let{label:t,children:a,...s}=e;return(0,o.jsxs)(T.Qdk,{...s,children:[(0,o.jsx)(T.X6q,{children:(0,o.jsxs)(T.KFZ,{height:"100%","data-testid":"filter-modal-accordion-button",textAlign:"left",fontWeight:600,children:[(0,o.jsx)(T.xuv,{flex:1,children:t}),(0,o.jsx)(T.XEm,{boxSize:7})]})}),(0,o.jsx)(T.Hk3,{children:a})]})},F=e=>{let{columnNameMap:t,selectedFilters:a,onFilterChange:s,onClose:r,...i}=e;(0,k.fd)(),(0,U.te)(),(0,H.MO)();let{dataUses:n,dataSubjects:c,dataCategories:d}=a,u=(0,O.C)(k.U3),_=(0,O.C)(U.ZL),p=(0,O.C)(H.qb),[m,E]=(0,l.useState)(n),[S,h]=(0,l.useState)(c),[f,g]=(0,l.useState)(d);(0,l.useEffect)(()=>{E(n)},[n]),(0,l.useEffect)(()=>{h(c)},[c]),(0,l.useEffect)(()=>{g(d)},[d]);let A=(0,l.useMemo)(()=>(0,G.Cd)(u),[u]),x=(0,l.useMemo)(()=>(0,G.Cd)(_),[_]),C=(0,l.useMemo)(()=>(0,G.Cd)(p),[p]);return(0,o.jsx)(L,{heading:"Filter Datamap Report",...i,onCancel:()=>{E([]),h([]),g([]),s({dataUses:[],dataSubjects:[],dataCategories:[]}),r()},onConfirm:()=>{s({dataUses:m,dataSubjects:S,dataCategories:f}),r()},onClose:r,cancelButtonText:"Reset filters",continueButtonText:"Done","data-testid":"datamap-report-filter-modal",children:(0,o.jsxs)(T.UQy,{allowToggle:!0,children:[(0,o.jsx)(Y,{label:t.data_uses,children:(0,o.jsx)(M.ZP,{nodes:A,selected:m,onSelected:E,"data-testid":"filter-modal-checkbox-tree-uses"})}),(0,o.jsx)(Y,{label:t.data_categories,children:(0,o.jsx)(M.ZP,{nodes:C,selected:f,onSelected:g,"data-testid":"filter-modal-checkbox-tree-categories"})}),(0,o.jsx)(Y,{label:t.data_subjects,children:(0,o.jsx)(M.ZP,{nodes:x,selected:S,onSelected:h,"data-testid":"filter-modal-checkbox-tree-subjects"})})]})})};var V=a(32885),Z=a(70416),B=a(812),z=a(56358);let{useGetMinimalCustomReportsQuery:W,useLazyGetCustomReportByIdQuery:q,usePostCustomReportMutation:X,useDeleteCustomReportMutation:J}=a(78780).u.injectEndpoints({endpoints:e=>({getMinimalCustomReports:e.query({query:e=>{let{pageIndex:t=1,pageSize:a=50,report_type:s=_.C2.DATAMAP}=e,r="page=".concat(t,"&size=").concat(a,"&report_type=").concat(s);return{url:"plus/custom-report/minimal?".concat(r)}},providesTags:["Custom Reports"]}),getCustomReportById:e.query({query:e=>({url:"plus/custom-report/".concat(e)}),providesTags:(e,t,a)=>[{type:"Custom Reports",id:a}]}),postCustomReport:e.mutation({query:e=>({method:"POST",url:"plus/custom-report",body:e}),invalidatesTags:["Custom Reports"]}),deleteCustomReport:e.mutation({query:e=>({method:"DELETE",url:"plus/custom-report/".concat(e)}),invalidatesTags:["Custom Reports"]})})});var K=a(55484),Q=a(40324);let $="Report name",ee=e=>{let{isOpen:t,handleClose:a,tableStateToSave:s,columnMapToSave:r={},unavailableNames:i,onCreateCustomReport:n}=e,c=(0,T.pmc)(),[d]=X(),u=(0,l.useMemo)(()=>K.Ry().shape({reportName:K.Z_().label($).required("Please provide a name for this report").test("is-unique","",async(e,t)=>null==i||!i.includes(e)||t.createError({message:"This name already exists"})).max(80,"Report name is too long (max 80 characters)")}),[i]),p=async e=>{var t;let i={};Object.entries(r).forEach(e=>{let[t,a]=e;i[t]={label:a,enabled:!0}}),Object.entries(null!==(t=null==s?void 0:s.columnVisibility)&&void 0!==t?t:{}).forEach(e=>{let[t,a]=e;i[t]||(i[t]={}),i[t].enabled=a});try{let t={name:e.trim(),type:_.C2.DATAMAP,config:{column_map:i,table_state:s}},r=await d(t);if((0,B.D4)(r))throw r.error;n(r.data),a()}catch(e){c({status:"error",description:(0,B.e$)(e,"A problem occurred while creating the report.")})}};return(0,o.jsxs)(T.u_l,{size:"lg",isOpen:t,onClose:a,motionPreset:"none",children:[(0,o.jsx)(T.ZAr,{}),(0,o.jsxs)(T.hzk,{children:[(0,o.jsx)(T.xBx,{pb:0,children:"Create a report"}),(0,o.jsx)(C.J9,{initialValues:{reportName:""},onSubmit:e=>p(e.reportName),onReset:a,validateOnBlur:!1,validationSchema:u,children:e=>{let{dirty:t,isValid:a}=e;return(0,o.jsxs)(C.l0,{"data-testid":"custom-report-form",children:[(0,o.jsxs)(T.fef,{children:[(0,o.jsx)(T.xvT,{fontSize:"sm",color:"gray.600",pb:6,children:"Customize and save your current filter settings for easy access in the future. This saved report will include the column layout and currently applied filter settings."}),(0,o.jsx)(Q.j0,{id:"reportName",name:"reportName",isRequired:!0,label:$,placeholder:"Enter a name for the report...",variant:"stacked",maxLength:80})]}),(0,o.jsxs)(T.mzw,{gap:2,children:[(0,o.jsx)(T.wpx,{size:"small",htmlType:"reset",children:"Cancel"}),(0,o.jsx)(T.wpx,{size:"small",disabled:!t||!a,type:"primary","data-testid":"custom-report-form-submit",htmlType:"submit",children:"Save"})]})]})}})]})]})},et="Report",ea="Reports",es=e=>{var t;let{reportType:a,savedReportId:s,tableStateToSave:r,currentColumnMap:i,onCustomReportSaved:n,onSavedReportDeleted:c}=e,d=(0,y.Tg)([_.Sh.CUSTOM_REPORT_CREATE]),u=(0,y.Tg)([_.Sh.CUSTOM_REPORT_DELETE]),p=(0,T.pmc)({id:"custom-report-toast"}),{data:m,isLoading:E}=W({report_type:a}),[S,h]=(0,l.useState)(),[f]=q(),[g]=J(),{isOpen:A,onToggle:x,onOpen:v,onClose:R}=(0,T.qY0)(),{isOpen:O,onOpen:j,onClose:b}=(0,T.qY0)(),{isOpen:D,onOpen:I,onClose:N}=(0,T.qY0)(),[L,w]=(0,l.useState)(),[P,M]=(0,l.useState)(),[U,k]=(0,l.useState)(),[G,H]=(0,l.useState)(!1),Y=(0,l.useMemo)(()=>{var e;let t=null==m?void 0:null===(e=m.items.find(e=>e.id===s))||void 0===e?void 0:e.name;return null!=t?t:ea},[null==m?void 0:m.items,s]),F=!E&&!(null==m?void 0:null===(t=m.items)||void 0===t?void 0:t.length),V=e=>{h(null==m?void 0:m.items.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())))},X=async e=>{w(e);let{data:t,isError:a,error:s}=await f(e);if(a){let e=(0,B.e$)(s,"A problem occurred while fetching the ".concat(et,"."));e.includes("not found")&&c(),p({status:"error",description:e})}else M(t)},K=()=>{w(""),M(void 0),H(!1)},Q=()=>{P?(H(!1),P.id!==s&&n(P),R()):L?H(!0):(n(null),R())},$=async e=>{e===(null==P?void 0:P.id)&&(K(),c()),g(e)};(0,l.useEffect)(()=>{m&&h(m.items)},[m]),(0,l.useEffect)(()=>{G&&(H(!1),Q())},[P]),(0,l.useEffect)(()=>{s?X(s):K()},[s]),(0,l.useEffect)(()=>{U&&I()},[I,U]);let es=!P&&!s||(null==P?void 0:P.id)===s;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(T.J2e,{placement:"bottom-end",isOpen:A,onClose:Q,id:"custom-reports-selection",children:[(0,o.jsx)(T.xol,{children:(0,o.jsx)(T.wpx,{className:"max-w-40",icon:(0,o.jsx)(T.v4q,{}),iconPosition:"end","data-testid":"custom-reports-trigger",onClick:x,children:(0,o.jsx)(T.xvT,{noOfLines:1,display:"inline-block",children:Y})})}),(0,o.jsx)(T.h_i,{children:(0,o.jsxs)(T.yky,{"data-testid":"custom-reports-popover",children:[(0,o.jsx)(T.QHN,{}),(0,o.jsx)(C.J9,{initialValues:{},onSubmit:Q,onReset:K,children:(0,o.jsxs)(C.l0,{children:[(0,o.jsx)(T.wpx,{size:"small",disabled:F,htmlType:"reset",className:"absolute left-2 top-2","data-testid":"custom-reports-reset-button",children:"Reset"}),(0,o.jsxs)(T.Ytg,{textAlign:"center",children:[(0,o.jsx)(T.xvT,{fontSize:"sm",children:ea}),(0,o.jsx)(T.BZy,{size:"sm",mt:3,children:(0,o.jsx)(T.IIB,{type:"text",borderRadius:"md",placeholder:"Search...",onChange:e=>V(e.target.value)})})]}),(0,o.jsx)(T.usR,{top:2,onClick:()=>{s?X(s):K(),R()},"data-testid":"custom-report-popover-cancel"}),(0,o.jsxs)(T.baG,{px:6,pt:5,pb:1,children:[F&&(0,o.jsxs)(T.gCW,{px:2,pt:6,pb:3,"data-testid":"custom-reports-empty-state",children:[(0,o.jsx)(T.hU,{variant:"primary",backgroundColor:"gray.500",isRound:!0,size:"xs","aria-label":"add ".concat(et),icon:(0,o.jsx)(Z.d,{}),onClick:j,"data-testid":"add-report-button"}),(0,o.jsxs)(T.xvT,{fontSize:"sm",textAlign:"center",color:"gray.500",children:["No ",ea.toLowerCase()," have been created. Start by applying your preferred filter and column settings, then create a"," ",et.toLowerCase()," for easy access later."]})]}),!F&&(E?(0,o.jsxs)(T.gCW,{pb:2,children:[(0,o.jsx)(T.OdW,{width:"100%",height:T.rSc.space[4]}),(0,o.jsx)(T.OdW,{width:"100%",height:T.rSc.space[4]}),(0,o.jsx)(T.OdW,{width:"100%",height:T.rSc.space[4]})]}):(0,o.jsx)(T.y02.Group,{onChange:e=>X(e.target.value),value:L,className:"flex flex-col gap-2",children:null==S?void 0:S.map(e=>(0,o.jsxs)(T.jqI,{className:u?"justify-between":"justify-start",children:[(0,o.jsx)(T.y02,{value:e.id,name:"custom-report-id","data-testid":"custom-report-item",children:(0,o.jsx)(T.xvT,{fontSize:"sm",children:e.name})}),u&&(0,o.jsx)(T.wpx,{type:"text",size:"small",icon:(0,o.jsx)(z.q,{fontSize:16}),onClick:()=>k(e),"data-testid":"delete-report-button"})]},e.id))}))]}),(0,o.jsx)(T.DT9,{border:"none",px:6,pb:4,pt:4,children:(0,o.jsxs)(T.Ugi,{children:[d&&r&&(0,o.jsxs)(T.wpx,{size:"small",onClick:j,className:"w-full","data-testid":"create-report-button",htmlType:"button",children:["+ Create ",et.toLowerCase()]}),(0,o.jsx)(T.wpx,{size:"small",type:"primary",loading:G,disabled:es,className:"w-full","data-testid":"apply-report-button",htmlType:"submit",children:"Apply"})]})})]})})]})})]}),(0,o.jsx)(ee,{isOpen:O,handleClose:()=>{b(),setTimeout(()=>{v()},100)},tableStateToSave:r,columnMapToSave:i,unavailableNames:null==m?void 0:m.items.map(e=>e.name),onCreateCustomReport:n}),(0,o.jsx)(T.cVQ,{isOpen:D,onClose:()=>{k(void 0),N()},onConfirm:()=>{U&&$(U.id),N()},title:"Delete ".concat(et),message:(0,o.jsxs)(T.xvT,{children:["You are about to permanently delete the"," ",et.toLowerCase()," named"," ",(0,o.jsx)("strong",{children:null==U?void 0:U.name}),". Are you sure you would like to continue?"]})})]})};var er=a(19785),ei=a.n(er),en=a(55807),eo=a.n(en),el=a(32526),ec=a.n(el),ed=a(72625),eu=a(43862);let e_=(0,A.Cl)(),ep=(e,t)=>({cell:e=>(0,o.jsx)(x.G3,{value:e.getValue()}),header:a=>{let s={};return Object.keys(e).forEach(t=>{"string"==typeof e[t]?s[t]=e[t]:e[t].label&&(s[t]=e[t].label||"")}),(0,o.jsx)(ed.Hm,{value:(0,eu.AH)({columnId:a.column.id,columnNameMap:s}),defaultValue:p[a.column.id]||(0,eu.AH)({columnId:a.column.id}),isEditing:t,...a})}}),em=(e,t)=>{var a;let s=(null==e?void 0:null===(a=e.items)||void 0===a?void 0:a.length)?Object.keys(e.items[0]):[],r=Object.values(n);return s.filter(e=>!r.includes(e)).filter(e=>e.startsWith("privacy_declaration_")||e.startsWith("system_")).map(e=>{let a=t.find(t=>e.includes(ec()(t.name)));return e_.accessor(t=>t[e],{id:e,cell:e=>Array.isArray(e.getValue())?(0,o.jsx)(x.WP,{value:e.getValue(),ignoreZero:!0,...e}):(0,o.jsx)(x.G3,{value:e.getValue()}),meta:{showHeaderMenu:(null==a?void 0:a.field_type)==="string[]"}})})},eE=e=>{let{onSelectRow:t,getDataUseDisplayName:a,getDataCategoryDisplayName:s,getDataSubjectDisplayName:r,datamapReport:i,customFields:l,isRenaming:c=!1}=e,d=em(i,l);return[e_.accessor(e=>e.system_name,{enableGrouping:!0,id:n.SYSTEM_NAME,meta:{onCellClick:t}}),e_.accessor(e=>e.data_uses,{id:n.DATA_USE,cell:e=>{let t=e.getValue();return(0,o.jsx)(x.WP,{suffix:"data uses",ignoreZero:!0,value:ei()(t)?eo()(t,a):a(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto"}}),e_.accessor(e=>e.data_categories,{id:n.DATA_CATEGORY,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=ei()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,o.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_subjects,{id:n.DATA_SUBJECT,cell:e=>{let t=e.getValue();return(0,o.jsx)(x.WP,{suffix:"data subjects",ignoreZero:!0,value:ei()(t)?eo()(t,r):r(t||""),tagProps:{color:"white"},...e})},meta:{showHeaderMenu:!c}}),e_.accessor(e=>e.legal_name,{id:n.LEGAL_NAME}),e_.accessor(e=>e.dpo,{id:n.DPO}),e_.accessor(e=>e.legal_basis_for_processing,{id:n.LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.administrating_department,{id:n.ADMINISTRATING_DEPARTMENT}),e_.accessor(e=>e.cookie_max_age_seconds,{id:n.COOKIE_MAX_AGE_SECONDS}),e_.accessor(e=>e.privacy_policy,{id:n.PRIVACY_POLICY}),e_.accessor(e=>e.legal_address,{id:n.LEGAL_ADDRESS}),e_.accessor(e=>e.cookie_refresh,{id:n.COOKIE_REFRESH}),e_.accessor(e=>e.data_security_practices,{id:n.DATA_SECURITY_PRACTICES}),e_.accessor(e=>e.data_shared_with_third_parties,{id:n.DATA_SHARED_WITH_THIRD_PARTIES}),e_.accessor(e=>e.processes_special_category_data,{id:n.PROCESSES_SPECIAL_CATEGORY_DATA}),e_.accessor(e=>e.data_stewards,{id:n.DATA_STEWARDS,cell:e=>(0,o.jsx)(x.WP,{suffix:"data stewards",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.declaration_name,{id:n.DECLARATION_NAME}),e_.accessor(e=>e.does_international_transfers,{id:n.DOES_INTERNATIONAL_TRANSFERS}),e_.accessor(e=>e.dpa_location,{id:n.DPA_LOCATION}),e_.accessor(e=>e.egress,{id:n.DESTINATIONS,cell:e=>(0,o.jsx)(x.WP,{suffix:"destinations",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.exempt_from_privacy_regulations,{id:n.EXEMPT_FROM_PRIVACY_REGULATIONS}),e_.accessor(e=>e.features,{id:n.FEATURES,cell:e=>(0,o.jsx)(x.WP,{suffix:"features",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.fides_key,{id:n.FIDES_KEY}),e_.accessor(e=>e.flexible_legal_basis_for_processing,{id:n.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.impact_assessment_location,{id:n.IMPACT_ASSESSMENT_LOCATION}),e_.accessor(e=>e.ingress,{id:n.SOURCES,cell:e=>(0,o.jsx)(x.WP,{suffix:"sources",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.joint_controller_info,{id:n.JOINT_CONTROLLER_INFO}),e_.accessor(e=>e.legal_basis_for_profiling,{id:n.LEGAL_BASIS_FOR_PROFILING,cell:e=>(0,o.jsx)(x.WP,{suffix:"profiles",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legal_basis_for_transfers,{id:n.LEGAL_BASIS_FOR_TRANSFERS,cell:e=>(0,o.jsx)(x.WP,{suffix:"transfers",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legitimate_interest_disclosure_url,{id:n.LEGITIMATE_INTEREST_DISCLOSURE_URL}),e_.accessor(e=>e.processes_personal_data,{id:n.PROCESSES_PERSONAL_DATA}),e_.accessor(e=>e.reason_for_exemption,{id:n.REASON_FOR_EXEMPTION}),e_.accessor(e=>e.requires_data_protection_assessments,{id:n.REQUIRES_DATA_PROTECTION_ASSESSMENTS}),e_.accessor(e=>e.responsibility,{id:n.RESPONSIBILITY,cell:e=>(0,o.jsx)(x.WP,{suffix:"responsibilities",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.retention_period,{id:n.RETENTION_PERIOD}),e_.accessor(e=>e.shared_categories,{id:n.SHARED_CATEGORIES,cell:e=>(0,o.jsx)(x.WP,{suffix:"shared categories",ignoreZero:!0,value:e.getValue(),tagProps:{color:"white"},...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.special_category_legal_basis,{id:n.SPECIAL_CATEGORY_LEGAL_BASIS}),e_.accessor(e=>e.third_parties,{id:n.THIRD_PARTIES}),e_.accessor(e=>e.system_undeclared_data_categories,{id:n.SYSTEM_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=ei()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,o.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_use_undeclared_data_categories,{id:n.DATA_USE_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=ei()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,o.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.cookies,{id:n.COOKIES,cell:e=>(0,o.jsx)(x.WP,{ignoreZero:!0,suffix:"cookies",value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.uses_cookies,{id:n.USES_COOKIES}),e_.accessor(e=>e.uses_non_cookie_access,{id:n.USES_NON_COOKIE_ACCESS}),e_.accessor(e=>e.uses_profiling,{id:n.USES_PROFILING}),...d]},eS=e=>e===_.fI.DATA_USE_SYSTEM?[n.DATA_USE]:[n.SYSTEM_NAME],eh=e=>{let t=[];return _.fI.SYSTEM_DATA_USE===e&&(t=[n.SYSTEM_NAME,n.DATA_USE]),_.fI.DATA_USE_SYSTEM===e&&(t=[n.DATA_USE,n.SYSTEM_NAME]),t},ef=(e,t)=>eh(e).concat(t.filter(e=>e!==n.SYSTEM_NAME&&e!==n.DATA_USE)),eg={items:[],total:0,page:1,size:25,pages:1},eA=()=>{let e=(0,y.Tg)([_.Sh.CUSTOM_REPORT_READ]),{isLoading:t}=(0,V.x8)(),{PAGE_SIZES:a,pageSize:s,setPageSize:r,onPreviousPageClick:n,isPreviousPageDisabled:c,onNextPageClick:d,isNextPageDisabled:u,startRange:S,endRange:h,pageIndex:v,setTotalPages:L,resetPageIndexToDefault:w}=(0,x.oi)(),M=(0,T.pmc)({id:"datamap-report-toast"}),{isOpen:U,onClose:k,onOpen:G}=(0,T.qY0)(),{getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,isLoading:B}=(0,j.Z)(),[z,W]=(0,l.useState)(),{savedCustomReportId:q,setSavedCustomReportId:X,groupBy:J,setGroupBy:K,selectedFilters:Q,setSelectedFilters:$,columnOrder:ee,setColumnOrder:et,columnVisibility:ea,setColumnVisibility:er,columnSizing:ei,setColumnSizing:en,columnNameMapOverrides:eo,setColumnNameMapOverrides:el}=f(),[ec,ed]=(0,l.useState)(!1),eu=e=>{X(""),K(e),ed(!0),w()},[e_,em]=(0,l.useState)(""),eA=(0,l.useCallback)(e=>{w(),em(e)},[w,em]),ex={pageIndex:v,pageSize:s,groupBy:J,search:e_,dataUses:(0,D.du)(Q.dataUses,"data_uses"),dataSubjects:(0,D.du)(Q.dataSubjects,"data_subjects"),dataCategories:(0,D.du)(Q.dataCategories,"data_categories")},{data:eT,isLoading:eC,isFetching:ev}=(0,I.tH)(ex),[eR,{isLoading:eO,isError:ej}]=(0,I.Eo)(),{data:eb,totalRows:ey}=(0,l.useMemo)(()=>{let e=eT||eg,t=e.items;return ec&&ed(!1),L(e.pages),{totalRows:e.total,data:t}},[eT]);(0,V.GH)();let eD=(0,O.C)(V.fN),[eI,eN]=(0,l.useState)(!1),eL=(0,l.useMemo)(()=>eT?eE({onSelectRow:e=>W(e.fides_key),getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,datamapReport:eT,customFields:eD,isRenaming:eI}):[],[H,Z,Y,eT,eD,eI]),{isOpen:ew,onOpen:eP,onClose:eM}=(0,T.qY0)(),{isOpen:eU,onOpen:ek,onClose:eG}=(0,T.qY0)(),eH=(0,g.b7)({getCoreRowModel:(0,A.sC)(),getGroupedRowModel:(0,A.qe)(),getExpandedRowModel:(0,A.rV)(),manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onChange",columns:eL,defaultColumn:ep({...p,...eo},eI),data:eb,initialState:{expanded:!0,columnSizing:ei,columnOrder:ee,columnVisibility:ea,grouping:eS(J)}});(0,l.useEffect)(()=>{J&&eH&&eT&&(0===eH.getState().columnOrder.length?et(ef(J,eH.getAllColumns().map(e=>e.id))):et(ef(J,eH.getState().columnOrder)))},[J,eH,eT]),(0,l.useEffect)(()=>{let e=eS(J);eT&&eH.setGrouping(e)},[eT]);let eY=(0,l.useMemo)(()=>R()(en,300),[en]);(0,l.useEffect)(()=>{let e=eH.getState().columnSizing;e&&eY(e)},[eH.getState().columnSizing]);let eF=()=>{switch(J){case _.fI.SYSTEM_DATA_USE:return"system";case _.fI.DATA_USE_SYSTEM:return"data use";default:return"system"}},eV=(e,t)=>{if(e||q){if(!e){try{X(""),er(m),eH.toggleAllColumnsVisible(!0),eH.setColumnVisibility(m),et([]),eH.setColumnOrder([]),K(_.fI.SYSTEM_DATA_USE),$(E),el({}),t({values:{}})}catch(e){M({status:"error",description:"There was a problem resetting the report."})}return}try{var a,s,r,i;if(null===(a=e.config)||void 0===a?void 0:a.table_state){let{groupBy:t,filters:a,columnOrder:s}=e.config.table_state,i={};Object.entries(null!==(r=e.config.column_map)&&void 0!==r?r:{}).forEach(e=>{let[t,a]=e;i[t]=a.enabled||!1}),t&&K(t),a&&$(a),s&&(et(s),eH.setColumnOrder(s)),i&&(er(i),eH.setColumnVisibility(i))}if(null===(s=e.config)||void 0===s?void 0:s.column_map){let a={};Object.entries(null!==(i=e.config.column_map)&&void 0!==i?i:{}).forEach(e=>{let[t,s]=e;s.label&&(a[t]=s.label)}),el(a),t({values:a})}X(e.id),M({status:"success",description:"Report applied successfully."})}catch(e){M({status:"error",description:"There was a problem applying report."})}}};return eC||t||B?(0,o.jsx)(x.I4,{rowHeight:36,numRows:15}):(0,o.jsxs)(T.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,o.jsx)(F,{columnNameMap:{...p,...eo},selectedFilters:Q,isOpen:U,onClose:k,onFilterChange:e=>{X(""),$(e)}}),(0,o.jsx)(x.F1,{isOpen:ew,onClose:eM,headerText:"Data map settings",columnNameMap:{...p,...eo},prefixColumns:eh(J),tableInstance:eH,savedCustomReportId:q,onColumnOrderChange:e=>{X(""),eH.setColumnOrder(e),et(e)},onColumnVisibilityChange:e=>{X(""),eH.setColumnVisibility(e),er(e)}}),(0,o.jsx)(P,{isOpen:eU,onClose:eG,onConfirm:e=>{let t={};Object.entries(ea).forEach(e=>{let[a,s]=e;t[a]={enabled:s}}),Object.entries(eo).forEach(e=>{let[a,s]=e;if(t[a])t[a].label=s;else{var r;t[a]={label:s,enabled:null===(r=ea[a])||void 0===r||r}}}),eR({...ex,format:e,report_id:q,report:{name:"",type:"datamap",config:{column_map:t,table_state:{groupBy:J,filters:Q,columnOrder:ee}}}}).then(()=>{ej||eG()})},isLoading:eO}),(0,o.jsx)(C.J9,{initialValues:eo,onSubmit:e=>{X(""),el(e),eN(!1)},children:t=>{let{submitForm:a,resetForm:s}=t;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(x.Q$,{children:[(0,o.jsx)(x.HO,{globalFilter:e_,setGlobalFilter:eA,placeholder:"System name, Fides key, or ID"}),(0,o.jsxs)(T.kCb,{alignItems:"center",gap:2,children:[e&&(0,o.jsx)(es,{reportType:_.C2.DATAMAP,savedReportId:q,tableStateToSave:{groupBy:J,filters:Q,columnOrder:ee,columnVisibility:ea},currentColumnMap:eo,onCustomReportSaved:e=>eV(e,s),onSavedReportDeleted:()=>{X("")}}),(0,o.jsxs)(T.v2r,{children:[(0,o.jsxs)(T.j2t,{as:T.wpx,icon:(0,o.jsx)(T.v4q,{}),iconPosition:"end",loading:ec,"data-testid":"group-by-menu",children:["Group by ",eF()]}),(0,o.jsxs)(T.qyq,{zIndex:11,"data-testid":"group-by-menu-list",children:[(0,o.jsx)(T.iiZ,{onClick:()=>{eu(_.fI.SYSTEM_DATA_USE)},isChecked:_.fI.SYSTEM_DATA_USE===J,value:_.fI.SYSTEM_DATA_USE,"data-testid":"group-by-system-data-use",children:"System"}),(0,o.jsx)(T.iiZ,{onClick:()=>{eu(_.fI.DATA_USE_SYSTEM)},isChecked:_.fI.DATA_USE_SYSTEM===J,value:_.fI.DATA_USE_SYSTEM,"data-testid":"group-by-data-use-system",children:"Data use"})]})]}),(0,o.jsx)(T.wpx,{"data-testid":"filter-multiple-systems-btn",onClick:G,children:"Filter"}),(0,o.jsx)(T.wpx,{"aria-label":"Export report","data-testid":"export-btn",onClick:ek,icon:(0,o.jsx)(b.nM,{ml:"1.5px"})}),(0,o.jsxs)(T.v2r,{placement:"bottom-end",children:[(0,o.jsx)(T.j2t,{as:T.wpx,icon:(0,o.jsx)(T.nXP,{className:"rotate-90"}),"data-testid":"more-menu","aria-label":"More options",className:"w-6 gap-0"}),(0,o.jsxs)(T.qyq,{"data-testid":"more-menu-list",children:[(0,o.jsx)(T.sNh,{onClick:eP,"data-testid":"edit-columns-btn",children:"Edit columns"}),(0,o.jsx)(T.sNh,{onClick:()=>eN(!0),"data-testid":"rename-columns-btn",children:"Rename columns"})]})]}),eI&&(0,o.jsxs)("div",{className:"flex gap-2",children:[(0,o.jsx)(T.wpx,{size:"small","data-testid":"rename-columns-reset-btn",onClick:()=>{el({}),X(""),s({values:{}}),eN(!1)},children:"Reset all"}),(0,o.jsx)(T.wpx,{size:"small","data-testid":"rename-columns-cancel-btn",onClick:()=>{s({values:eo}),eN(!1)},children:"Cancel"}),(0,o.jsx)(T.wpx,{size:"small",type:"primary",htmlType:"submit","data-testid":"rename-columns-apply-btn",onClick:a,children:"Apply"})]})]})]}),(0,o.jsx)(C.l0,{children:(0,o.jsx)(x.ZK,{tableInstance:eH,columnExpandStorageKey:i.COLUMN_EXPANSION_STATE,columnWrapStorageKey:i.WRAPPING_COLUMNS})})]})}}),(0,o.jsx)(x.s8,{totalRows:ey||0,pageSizes:a,setPageSize:r,onPreviousPageClick:n,isPreviousPageDisabled:c||ev,onNextPageClick:d,isNextPageDisabled:u||ev,startRange:S,endRange:h}),(0,o.jsx)(N.Z,{selectedSystemId:z,resetSelectedSystemId:()=>W(void 0)})]})};var ex=()=>(0,o.jsxs)(c.Z,{title:"Datamap Report",children:[(0,o.jsx)(d.Z,{"data-testid":"datamap-report-heading",heading:"Data map report"}),(0,o.jsx)(h,{children:(0,o.jsx)(eA,{})})]})}},function(e){e.O(0,[8033,6060,2858,2866,9278,9187,4481,7980,8499,5258,2888,9774,179],function(){return e(e.s=86548)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9196],{95372:function(e){e.exports=function(e,t,a,s){for(var r=e.length,i=a+(s?1:-1);s?i--:++i<r;)if(t(e[i],i,e))return i;return -1}},67375:function(e,t,a){var s=a(52033),r=a(80068);e.exports=function(e,t){var a=-1,i=r(e)?Array(e.length):[];return s(e,function(e,s,r){i[++a]=t(e,s,r)}),i}},74833:function(e,t,a){var s=a(56127),r=/^\s+/;e.exports=function(e){return e?e.slice(0,s(e)+1).replace(r,""):e}},56632:function(e,t,a){var s=a(89278),r=a(80068),i=a(50098);e.exports=function(e){return function(t,a,n){var o=Object(t);if(!r(t)){var l=s(a,3);t=i(t),a=function(e){return l(o[e],e,o)}}var c=e(t,a,n);return c>-1?o[l?t[c]:c]:void 0}}},56127:function(e){var t=/\s/;e.exports=function(e){for(var a=e.length;a--&&t.test(e.charAt(a)););return a}},64925:function(e,t,a){var s=a(56632)(a(66259));e.exports=s},66259:function(e,t,a){var s=a(95372),r=a(89278),i=a(47991),n=Math.max;e.exports=function(e,t,a){var o=null==e?0:e.length;if(!o)return -1;var l=null==a?0:i(a);return l<0&&(l=n(o+l,0)),s(e,r(t,3),l)}},55807:function(e,t,a){var s=a(66070),r=a(89278),i=a(67375),n=a(19785);e.exports=function(e,t){return(n(e)?s:i)(e,r(t,3))}},32526:function(e,t,a){var s=a(68267)(function(e,t,a){return e+(a?"_":"")+t.toLowerCase()});e.exports=s},94919:function(e,t,a){var s=a(91936),r=1/0;e.exports=function(e){return e?(e=s(e))===r||e===-r?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,a){var s=a(94919);e.exports=function(e){var t=s(e),a=t%1;return t==t?a?t-a:t:0}},91936:function(e,t,a){var s=a(74833),r=a(11611),i=a(55193),n=0/0,o=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return n;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var a=l.test(e);return a||c.test(e)?d(e.slice(2),a?2:8):o.test(e)?n:+e}},86548:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reporting/datamap",function(){return a(11803)}])},624:function(e,t,a){"use strict";var s=a(24246),r=a(77181),i=a(27378);let n=e=>{let t=e.split("."),a=[];return t.forEach(e=>{let t=a.length>0?a[a.length-1]:null;t?a.push("".concat(t,".").concat(e)):a.push(e)}),a},o=(e,t)=>{let a=n(t).filter(e=>e!==t);return e.filter(e=>a.includes(e)).length>0},l=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,a)=>{let s=null!=a?a:[];return e.forEach(e=>{e.children&&c(e.children,t,s),l(e.value,t)&&s.push(e)}),s},d=e=>{let{node:t,isChecked:a,onChecked:i,isExpanded:n,onExpanded:o,isIndeterminate:l,isDisabled:c,children:d}=e,{value:u,label:_}=t,p=!!t.children&&t.children.length>0;return(0,s.jsxs)(r.xuv,{children:[(0,s.jsxs)(r.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>o(t),minHeight:8,children:[(0,s.jsx)(r.XZJ,{colorScheme:"complimentary",value:u,isChecked:!l&&a,isIndeterminate:l,isDisabled:c,onChange:()=>i(t),mx:2,"data-testid":"checkbox-".concat(_),children:_}),p?(0,s.jsx)(r.wpx,{"data-testid":"expand-".concat(_),"aria-label":n?"collapse":"expand",icon:(0,s.jsx)(r.v4q,{boxSize:5}),type:"text",onClick:()=>o(t),className:n?"rotate-180":void 0}):null]}),d&&(0,s.jsx)(r.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:a,onSelected:u,..._}=e,[p,m]=(0,i.useState)([]),[E,S]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=Array.from(new Set([...a.map(e=>n(e)).reduce((e,t)=>e.concat(t),[]),...a.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));S(e),m(e)},[a,t]);let h=e=>{let s=[],r=[];p.indexOf(e.value)>=0?(s=p.filter(t=>!l(t,e.value)),r=a.filter(t=>!l(t,e.value))):(s=[...p,...c(t,e.value).map(e=>e.value)],r=[...a,e.value]),m(s),u(r)},f=e=>{E.indexOf(e.value)>=0?S(E.filter(t=>!l(t,e.value))):S([...E,e.value])},g=e=>{if(e.children){let r=p.indexOf(e.value)>=0,n=E.indexOf(e.value)>=0,l=c(t,e.value),u=r&&e.children.length>0&&p.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==l.length,_=o(a,e.value);return(0,s.jsx)(d,{node:e,isChecked:r,onChecked:h,isExpanded:n,onExpanded:f,isDisabled:_,isIndeterminate:u,children:n?e.children.map(e=>(0,s.jsx)(i.Fragment,{children:g(e)},e.value)):void 0})}return null};return(0,s.jsx)(r.xuv,{..._,children:t.map(e=>(0,s.jsx)(r.xuv,{children:g(e)},e.value))})}},35287:function(e,t,a){"use strict";var s=a(24246),r=a(77181),i=a(88038),n=a.n(i);a(27378),t.Z=e=>{let{children:t,title:a,mainProps:i}=e;return(0,s.jsxs)(r.kCb,{"data-testid":a,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,s.jsxs)(n(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",a]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...i,children:t})]})}},56358:function(e,t,a){"use strict";a.d(t,{q:function(){return r}});var s=a(24246);let r=(0,a(77181).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,s.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},19904:function(e,t,a){"use strict";a.d(t,{Tg:function(){return n}});var s=a(24246),r=a(16134),i=a(31793);let n=e=>(0,r.C)(i.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:a}=e;return n(t)?(0,s.jsx)(s.Fragment,{children:a}):null}},70416:function(e,t,a){"use strict";a.d(t,{d:function(){return r}});var s=a(24246);let r=(0,a(77181).IUT)({displayName:"AddIcon",viewBox:"0 0 10 10",path:(0,s.jsx)("path",{d:"M4.33331 4.33398V0.333984H5.66665V4.33398H9.66665V5.66732H5.66665V9.66732H4.33331V5.66732H0.333313V4.33398H4.33331Z",fill:"currentColor"})})},34929:function(e,t,a){"use strict";var s=a(24246),r=a(64925),i=a.n(r),n=a(27378),o=a(16134),l=a(30002),c=a(28079),d=a(57072);let u=()=>{let{isLoading:e}=(0,c.fd)(),t=(0,o.C)(c.U3),{isLoading:a}=(0,d.MO)(),s=(0,o.C)(d.qb),{isLoading:r}=(0,l.te)();return{dataUses:t,dataSubjects:(0,o.C)(l.ZL),dataCategories:s,isLoading:e||a||r}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:a,isLoading:r}=u(),o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},l=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=t(e);if(!s)return{};let r=t(o(e,a)),i=!!s.parent_key;return{name:s.name||void 0,primaryName:i&&(null==r?void 0:r.name)!==s.name&&(null==r?void 0:r.name)||void 0}},c=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:i}=l(e,t,a);return r?i?(0,s.jsxs)(n.Fragment,{children:[(0,s.jsxs)("strong",{children:[i,":"]})," ",r]},e):(0,s.jsx)("strong",{children:r},e):e},d=t=>i()(e,{fides_key:t}),_=e=>i()(t,{fides_key:e}),p=e=>i()(a,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:d,getDataUseDisplayName:e=>c(e,d,1),getDataUseDisplayNameProps:e=>l(e,d,1),getDataCategories:()=>t,getDataCategoryByKey:_,getDataCategoryDisplayName:e=>c(e,_,2),getDataCategoryDisplayNameProps:e=>l(e,_,2),getDataSubjects:()=>a,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:o,isLoading:r}}},59001:function(e,t,a){"use strict";a.d(t,{Ch:function(){return n},Hy:function(){return o},Lo:function(){return r}});var s,r,i=a(21702);let n="root";(s=r||(r={})).DATA_CATEGORIES="Data categories",s.DATA_USES="Data uses",s.DATA_SUBJECTS="Data subjects";let o=e=>{switch(e){case"Data categories":return{UPDATE:i.Sh.DATA_CATEGORY_UPDATE,CREATE:i.Sh.DATA_CATEGORY_CREATE,DELETE:i.Sh.DATA_CATEGORY_DELETE,READ:i.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:i.Sh.DATA_USE_UPDATE,CREATE:i.Sh.DATA_USE_CREATE,DELETE:i.Sh.DATA_USE_DELETE,READ:i.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:i.Sh.DATA_SUBJECT_UPDATE,CREATE:i.Sh.DATA_SUBJECT_CREATE,DELETE:i.Sh.DATA_SUBJECT_DELETE,READ:i.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,a){"use strict";a.d(t,{Cd:function(){return i},Xl:function(){return n}});var s=a(21702),r=a(59001);let i=(e,t)=>{let a;if(null==t&&e.every(e=>void 0===e.parent_key))a=e;else{let s=null!=t?t:null;a=e.filter(e=>e.parent_key===s)}return a.map(t=>{var a,s;let r=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:i(e,r),is_default:null!==(a=t.is_default)&&void 0!==a&&a,active:null!==(s=t.active)&&void 0!==s&&s}})},n=e=>{switch(e){case r.Lo.DATA_CATEGORIES:return s.P6.DATA_CATEGORY;case r.Lo.DATA_SUBJECTS:return s.P6.DATA_SUBJECT;case r.Lo.DATA_USES:return s.P6.DATA_USE;default:return}}},11803:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return ex}});var s,r,i,n,o=a(24246),l=a(27378),c=a(35287),d=a(58754),u=a(71795),_=a(21702);(s=i||(i={})).COLUMN_EXPANSION_STATE="datamap-column-expansion-state",s.COLUMN_NAMES="datamap-column-names",s.COLUMN_ORDER="datamap-column-order",s.COLUMN_SIZING="datamap-column-sizing",s.COLUMN_VISIBILITY="datamap-column-visibility",s.CUSTOM_REPORT_ID="datamap-custom-report-id",s.FILTERS="datamap-filters",s.GROUP_BY="datamap-group-by",s.SORTING_STATE="datamap-sorting-state",s.WRAPPING_COLUMNS="datamap-wrapping-columns",(r=n||(n={})).SYSTEM_NAME="system_name",r.DATA_USE="data_uses",r.DATA_CATEGORY="data_categories",r.DATA_SUBJECT="data_subjects",r.LEGAL_NAME="legal_name",r.DPO="dpo",r.LEGAL_BASIS_FOR_PROCESSING="legal_basis_for_processing",r.ADMINISTRATING_DEPARTMENT="administrating_department",r.COOKIE_MAX_AGE_SECONDS="cookie_max_age_seconds",r.PRIVACY_POLICY="privacy_policy",r.LEGAL_ADDRESS="legal_address",r.COOKIE_REFRESH="cookie_refresh",r.DATA_SECURITY_PRACTICES="data_security_practices",r.DATA_SHARED_WITH_THIRD_PARTIES="data_shared_with_third_parties",r.DATA_STEWARDS="data_stewards",r.DECLARATION_NAME="declaration_name",r.DOES_INTERNATIONAL_TRANSFERS="does_international_transfers",r.DPA_LOCATION="dpa_location",r.DESTINATIONS="egress",r.EXEMPT_FROM_PRIVACY_REGULATIONS="exempt_from_privacy_regulations",r.FEATURES="features",r.FIDES_KEY="fides_key",r.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING="flexible_legal_basis_for_processing",r.IMPACT_ASSESSMENT_LOCATION="impact_assessment_location",r.SOURCES="ingress",r.JOINT_CONTROLLER_INFO="joint_controller_info",r.LEGAL_BASIS_FOR_PROFILING="legal_basis_for_profiling",r.LEGAL_BASIS_FOR_TRANSFERS="legal_basis_for_transfers",r.LEGITIMATE_INTEREST_DISCLOSURE_URL="legitimate_interest_disclosure_url",r.PROCESSES_PERSONAL_DATA="processes_personal_data",r.REASON_FOR_EXEMPTION="reason_for_exemption",r.REQUIRES_DATA_PROTECTION_ASSESSMENTS="requires_data_protection_assessments",r.RESPONSIBILITY="responsibility",r.RETENTION_PERIOD="retention_period",r.SHARED_CATEGORIES="shared_categories",r.SPECIAL_CATEGORY_LEGAL_BASIS="special_category_legal_basis",r.THIRD_PARTIES="third_parties",r.COOKIES="cookies",r.USES_COOKIES="uses_cookies",r.USES_NON_COOKIE_ACCESS="uses_non_cookie_access",r.USES_PROFILING="uses_profiling",r.SYSTEM_UNDECLARED_DATA_CATEGORIES="system_undeclared_data_categories",r.DATA_USE_UNDECLARED_DATA_CATEGORIES="data_use_undeclared_data_categories",r.PROCESSES_SPECIAL_CATEGORY_DATA="processes_special_category_data";let p={system_name:"System",data_uses:"Data use",data_categories:"Data categories",data_subjects:"Data subject",legal_name:"Legal name",dpo:"Data privacy officer",legal_basis_for_processing:"Legal basis for processing",administrating_department:"Administrating department",cookie_max_age_seconds:"Cookie max age seconds",privacy_policy:"Privacy policy",legal_address:"Legal address",cookie_refresh:"Cookie refresh",data_security_practices:"Data security practices",data_shared_with_third_parties:"Data shared with third parties",data_stewards:"Data stewards",declaration_name:"Declaration name",does_international_transfers:"Does international transfers",dpa_location:"DPA location",egress:"Destination",exempt_from_privacy_regulations:"Exempt from privacy regulations",features:"Features",fides_key:"Fides key",flexible_legal_basis_for_processing:"Flexible legal basis for processing",impact_assessment_location:"Impact assessment location",ingress:"Source",joint_controller_info:"Joint controller info",legal_basis_for_profiling:"Legal basis for profiling",legal_basis_for_transfers:"Legal basis for transfers",legitimate_interest_disclosure_url:"Legitimate interest disclosure URL",processes_personal_data:"Processes personal data",reason_for_exemption:"Reason for exemption",requires_data_protection_assessments:"Requires data protection assessments",responsibility:"Responsibility",retention_period:"Retention period",shared_categories:"Shared categories",special_category_legal_basis:"Special category legal basis",third_parties:"Third parties",system_undeclared_data_categories:"System undeclared data categories",data_use_undeclared_data_categories:"Data use undeclared data categories",cookies:"Cookies",uses_cookies:"Uses cookies",uses_non_cookie_access:"Uses non-cookie access",uses_profiling:"Uses profiling",processes_special_category_data:"Processes special category data"},m={[n.SYSTEM_UNDECLARED_DATA_CATEGORIES]:!1,[n.DATA_USE_UNDECLARED_DATA_CATEGORIES]:!1},E={dataUses:[],dataSubjects:[],dataCategories:[]},S=(0,l.createContext)({}),h=e=>{let{children:t}=e,[a,s]=(0,u._)(i.CUSTOM_REPORT_ID,""),[r,n]=(0,u._)(i.GROUP_BY,_.fI.SYSTEM_DATA_USE),[c,d]=(0,u._)(i.FILTERS,E),[p,h]=(0,u._)(i.COLUMN_ORDER,[]),[f,g]=(0,u._)(i.COLUMN_VISIBILITY,m),[A,x]=(0,u._)(i.COLUMN_SIZING,{}),[T,C]=(0,u._)(i.COLUMN_NAMES,{}),v=(0,l.useMemo)(()=>({savedCustomReportId:a,setSavedCustomReportId:s,groupBy:r,setGroupBy:n,selectedFilters:c,setSelectedFilters:d,columnOrder:p,setColumnOrder:h,columnVisibility:f,setColumnVisibility:g,columnSizing:A,setColumnSizing:x,columnNameMapOverrides:T,setColumnNameMapOverrides:C}),[a,s,r,n,c,d,p,h,f,g,A,x,T,C]);return(0,o.jsx)(S.Provider,{value:v,children:t})},f=()=>{let e=(0,l.useContext)(S);if(!e||0===Object.keys(e).length)throw Error("useDatamapReport must be used within a DatamapReportProvider");return e};var g=a(59003),A=a(92222),x=a(14481),T=a(77181),C=a(34090),v=a(66726),R=a.n(v),O=a(16134),j=a(34929),b=a(14048),y=a(19904),D=a(16394),I=a(38943),N=a(35258),L=e=>{let{children:t,heading:a,onCancel:s,onConfirm:r,isLoading:i,cancelButtonText:n,continueButtonText:l,"data-testid":c="standard-dialog",...d}=e,{onClose:u}=d;return(0,o.jsxs)(T.u_l,{closeOnOverlayClick:i,...d,children:[(0,o.jsx)(T.ZAr,{}),(0,o.jsxs)(T.hzk,{"data-testid":c,children:[a&&(0,o.jsx)(T.xBx,{children:a}),(0,o.jsx)(T.olH,{isDisabled:i,"data-testid":"standard-dialog-close-btn"}),t&&(0,o.jsx)(T.fef,{children:t}),(0,o.jsxs)(T.mzw,{gap:3,width:"100%",sx:{"& button":{width:"100%"}},children:[(0,o.jsx)(T.wpx,{onClick:()=>{s&&s(),u()},"data-testid":"".concat(c?"".concat(c,"-"):"","cancel-btn"),disabled:i,children:n||"Cancel"}),(0,o.jsx)(T.wpx,{onClick:r,type:"primary","data-testid":"".concat(c?"".concat(c,"-"):"","continue-btn"),loading:i,children:l||"Continue"})]})]})]})},w=a(22968),P=e=>{let[t,a]=(0,l.useState)(w.T2.csv),{onConfirm:s}=e;return(0,o.jsx)(L,{heading:"Export report",continueButtonText:"Download",size:"xl",...e,onConfirm:()=>s(t),"data-testid":"export-modal",children:(0,o.jsxs)(T.kCb,{direction:"column",gap:3,pb:3,children:[(0,o.jsx)(T.xvT,{textAlign:"left",children:"Export your data map report using the options below. Depending on the number of rows, the file may take a few minutes to process."}),(0,o.jsxs)(T.NIc,{children:[(0,o.jsx)(T.lXp,{htmlFor:"format",children:"Choose Format"}),(0,o.jsx)(T.WPr,{id:"format",value:t,onChange:a,"data-testid":"export-format-select",options:[{value:w.T2.csv,label:"CSV"},{value:w.T2.xlsx,label:"XLSX"}],className:"w-full"})]})]})})},M=a(624),U=a(30002),k=a(28079),G=a(90673),H=a(39864);let Y=e=>{let{label:t,children:a,...s}=e;return(0,o.jsxs)(T.Qdk,{...s,children:[(0,o.jsx)(T.X6q,{children:(0,o.jsxs)(T.KFZ,{height:"100%","data-testid":"filter-modal-accordion-button",textAlign:"left",fontWeight:600,children:[(0,o.jsx)(T.xuv,{flex:1,children:t}),(0,o.jsx)(T.XEm,{boxSize:7})]})}),(0,o.jsx)(T.Hk3,{children:a})]})},F=e=>{let{columnNameMap:t,selectedFilters:a,onFilterChange:s,onClose:r,...i}=e;(0,k.fd)(),(0,U.te)(),(0,H.MO)();let{dataUses:n,dataSubjects:c,dataCategories:d}=a,u=(0,O.C)(k.U3),_=(0,O.C)(U.ZL),p=(0,O.C)(H.qb),[m,E]=(0,l.useState)(n),[S,h]=(0,l.useState)(c),[f,g]=(0,l.useState)(d);(0,l.useEffect)(()=>{E(n)},[n]),(0,l.useEffect)(()=>{h(c)},[c]),(0,l.useEffect)(()=>{g(d)},[d]);let A=(0,l.useMemo)(()=>(0,G.Cd)(u),[u]),x=(0,l.useMemo)(()=>(0,G.Cd)(_),[_]),C=(0,l.useMemo)(()=>(0,G.Cd)(p),[p]);return(0,o.jsx)(L,{heading:"Filter Datamap Report",...i,onCancel:()=>{E([]),h([]),g([]),s({dataUses:[],dataSubjects:[],dataCategories:[]}),r()},onConfirm:()=>{s({dataUses:m,dataSubjects:S,dataCategories:f}),r()},onClose:r,cancelButtonText:"Reset filters",continueButtonText:"Done","data-testid":"datamap-report-filter-modal",children:(0,o.jsxs)(T.UQy,{allowToggle:!0,children:[(0,o.jsx)(Y,{label:t.data_uses,children:(0,o.jsx)(M.ZP,{nodes:A,selected:m,onSelected:E,"data-testid":"filter-modal-checkbox-tree-uses"})}),(0,o.jsx)(Y,{label:t.data_categories,children:(0,o.jsx)(M.ZP,{nodes:C,selected:f,onSelected:g,"data-testid":"filter-modal-checkbox-tree-categories"})}),(0,o.jsx)(Y,{label:t.data_subjects,children:(0,o.jsx)(M.ZP,{nodes:x,selected:S,onSelected:h,"data-testid":"filter-modal-checkbox-tree-subjects"})})]})})};var V=a(32885),Z=a(70416),B=a(812),z=a(56358);let{useGetMinimalCustomReportsQuery:W,useLazyGetCustomReportByIdQuery:q,usePostCustomReportMutation:X,useDeleteCustomReportMutation:J}=a(78780).u.injectEndpoints({endpoints:e=>({getMinimalCustomReports:e.query({query:e=>{let{pageIndex:t=1,pageSize:a=50,report_type:s=_.C2.DATAMAP}=e,r="page=".concat(t,"&size=").concat(a,"&report_type=").concat(s);return{url:"plus/custom-report/minimal?".concat(r)}},providesTags:["Custom Reports"]}),getCustomReportById:e.query({query:e=>({url:"plus/custom-report/".concat(e)}),providesTags:(e,t,a)=>[{type:"Custom Reports",id:a}]}),postCustomReport:e.mutation({query:e=>({method:"POST",url:"plus/custom-report",body:e}),invalidatesTags:["Custom Reports"]}),deleteCustomReport:e.mutation({query:e=>({method:"DELETE",url:"plus/custom-report/".concat(e)}),invalidatesTags:["Custom Reports"]})})});var K=a(55484),Q=a(40324);let $="Report name",ee=e=>{let{isOpen:t,handleClose:a,tableStateToSave:s,columnMapToSave:r={},unavailableNames:i,onCreateCustomReport:n}=e,c=(0,T.pmc)(),[d]=X(),u=(0,l.useMemo)(()=>K.Ry().shape({reportName:K.Z_().label($).required("Please provide a name for this report").test("is-unique","",async(e,t)=>null==i||!i.includes(e)||t.createError({message:"This name already exists"})).max(80,"Report name is too long (max 80 characters)")}),[i]),p=async e=>{var t;let i={};Object.entries(r).forEach(e=>{let[t,a]=e;i[t]={label:a,enabled:!0}}),Object.entries(null!==(t=null==s?void 0:s.columnVisibility)&&void 0!==t?t:{}).forEach(e=>{let[t,a]=e;i[t]||(i[t]={}),i[t].enabled=a});try{let t={name:e.trim(),type:_.C2.DATAMAP,config:{column_map:i,table_state:s}},r=await d(t);if((0,B.D4)(r))throw r.error;n(r.data),a()}catch(e){c({status:"error",description:(0,B.e$)(e,"A problem occurred while creating the report.")})}};return(0,o.jsxs)(T.u_l,{size:"lg",isOpen:t,onClose:a,motionPreset:"none",children:[(0,o.jsx)(T.ZAr,{}),(0,o.jsxs)(T.hzk,{children:[(0,o.jsx)(T.xBx,{pb:0,children:"Create a report"}),(0,o.jsx)(C.J9,{initialValues:{reportName:""},onSubmit:e=>p(e.reportName),onReset:a,validateOnBlur:!1,validationSchema:u,children:e=>{let{dirty:t,isValid:a}=e;return(0,o.jsxs)(C.l0,{"data-testid":"custom-report-form",children:[(0,o.jsxs)(T.fef,{children:[(0,o.jsx)(T.xvT,{fontSize:"sm",color:"gray.600",pb:6,children:"Customize and save your current filter settings for easy access in the future. This saved report will include the column layout and currently applied filter settings."}),(0,o.jsx)(Q.j0,{id:"reportName",name:"reportName",isRequired:!0,label:$,placeholder:"Enter a name for the report...",variant:"stacked",maxLength:80})]}),(0,o.jsxs)(T.mzw,{gap:2,children:[(0,o.jsx)(T.wpx,{size:"small",htmlType:"reset",children:"Cancel"}),(0,o.jsx)(T.wpx,{size:"small",disabled:!t||!a,type:"primary","data-testid":"custom-report-form-submit",htmlType:"submit",children:"Save"})]})]})}})]})]})},et="Report",ea="Reports",es=e=>{var t;let{reportType:a,savedReportId:s,tableStateToSave:r,currentColumnMap:i,onCustomReportSaved:n,onSavedReportDeleted:c}=e,d=(0,y.Tg)([_.Sh.CUSTOM_REPORT_CREATE]),u=(0,y.Tg)([_.Sh.CUSTOM_REPORT_DELETE]),p=(0,T.pmc)({id:"custom-report-toast"}),{data:m,isLoading:E}=W({report_type:a}),[S,h]=(0,l.useState)(),[f]=q(),[g]=J(),{isOpen:A,onToggle:x,onOpen:v,onClose:R}=(0,T.qY0)(),{isOpen:O,onOpen:j,onClose:b}=(0,T.qY0)(),{isOpen:D,onOpen:I,onClose:N}=(0,T.qY0)(),[L,w]=(0,l.useState)(),[P,M]=(0,l.useState)(),[U,k]=(0,l.useState)(),[G,H]=(0,l.useState)(!1),Y=(0,l.useMemo)(()=>{var e;let t=null==m?void 0:null===(e=m.items.find(e=>e.id===s))||void 0===e?void 0:e.name;return null!=t?t:ea},[null==m?void 0:m.items,s]),F=!E&&!(null==m?void 0:null===(t=m.items)||void 0===t?void 0:t.length),V=e=>{h(null==m?void 0:m.items.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())))},X=async e=>{w(e);let{data:t,isError:a,error:s}=await f(e);if(a){let e=(0,B.e$)(s,"A problem occurred while fetching the ".concat(et,"."));e.includes("not found")&&c(),p({status:"error",description:e})}else M(t)},K=()=>{w(""),M(void 0),H(!1)},Q=()=>{P?(H(!1),P.id!==s&&n(P),R()):L?H(!0):(n(null),R())},$=async e=>{e===(null==P?void 0:P.id)&&(K(),c()),g(e)};(0,l.useEffect)(()=>{m&&h(m.items)},[m]),(0,l.useEffect)(()=>{G&&(H(!1),Q())},[P]),(0,l.useEffect)(()=>{s?X(s):K()},[s]),(0,l.useEffect)(()=>{U&&I()},[I,U]);let es=!P&&!s||(null==P?void 0:P.id)===s;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(T.J2e,{placement:"bottom-end",isOpen:A,onClose:Q,id:"custom-reports-selection",children:[(0,o.jsx)(T.xol,{children:(0,o.jsx)(T.wpx,{className:"max-w-40",icon:(0,o.jsx)(T.v4q,{}),iconPosition:"end","data-testid":"custom-reports-trigger",onClick:x,children:(0,o.jsx)(T.xvT,{noOfLines:1,display:"inline-block",children:Y})})}),(0,o.jsx)(T.h_i,{children:(0,o.jsxs)(T.yky,{"data-testid":"custom-reports-popover",children:[(0,o.jsx)(T.QHN,{}),(0,o.jsx)(C.J9,{initialValues:{},onSubmit:Q,onReset:K,children:(0,o.jsxs)(C.l0,{children:[(0,o.jsx)(T.wpx,{size:"small",disabled:F,htmlType:"reset",className:"absolute left-2 top-2","data-testid":"custom-reports-reset-button",children:"Reset"}),(0,o.jsxs)(T.Ytg,{textAlign:"center",children:[(0,o.jsx)(T.xvT,{fontSize:"sm",children:ea}),(0,o.jsx)(T.BZy,{size:"sm",mt:3,children:(0,o.jsx)(T.IIB,{type:"text",borderRadius:"md",placeholder:"Search...",onChange:e=>V(e.target.value)})})]}),(0,o.jsx)(T.usR,{top:2,onClick:()=>{s?X(s):K(),R()},"data-testid":"custom-report-popover-cancel"}),(0,o.jsxs)(T.baG,{px:6,pt:5,pb:1,children:[F&&(0,o.jsxs)(T.gCW,{px:2,pt:6,pb:3,"data-testid":"custom-reports-empty-state",children:[(0,o.jsx)(T.hU,{variant:"primary",backgroundColor:"gray.500",isRound:!0,size:"xs","aria-label":"add ".concat(et),icon:(0,o.jsx)(Z.d,{}),onClick:j,"data-testid":"add-report-button"}),(0,o.jsxs)(T.xvT,{fontSize:"sm",textAlign:"center",color:"gray.500",children:["No ",ea.toLowerCase()," have been created. Start by applying your preferred filter and column settings, then create a"," ",et.toLowerCase()," for easy access later."]})]}),!F&&(E?(0,o.jsxs)(T.gCW,{pb:2,children:[(0,o.jsx)(T.OdW,{width:"100%",height:T.rSc.space[4]}),(0,o.jsx)(T.OdW,{width:"100%",height:T.rSc.space[4]}),(0,o.jsx)(T.OdW,{width:"100%",height:T.rSc.space[4]})]}):(0,o.jsx)(T.y02.Group,{onChange:e=>X(e.target.value),value:L,className:"flex flex-col gap-2",children:null==S?void 0:S.map(e=>(0,o.jsxs)(T.jqI,{className:u?"justify-between":"justify-start",children:[(0,o.jsx)(T.y02,{value:e.id,name:"custom-report-id","data-testid":"custom-report-item",children:(0,o.jsx)(T.xvT,{fontSize:"sm",children:e.name})}),u&&(0,o.jsx)(T.wpx,{type:"text",size:"small",icon:(0,o.jsx)(z.q,{fontSize:16}),onClick:()=>k(e),"data-testid":"delete-report-button"})]},e.id))}))]}),(0,o.jsx)(T.DT9,{border:"none",px:6,pb:4,pt:4,children:(0,o.jsxs)(T.Ugi,{children:[d&&r&&(0,o.jsxs)(T.wpx,{size:"small",onClick:j,className:"w-full","data-testid":"create-report-button",htmlType:"button",children:["+ Create ",et.toLowerCase()]}),(0,o.jsx)(T.wpx,{size:"small",type:"primary",loading:G,disabled:es,className:"w-full","data-testid":"apply-report-button",htmlType:"submit",children:"Apply"})]})})]})})]})})]}),(0,o.jsx)(ee,{isOpen:O,handleClose:()=>{b(),setTimeout(()=>{v()},100)},tableStateToSave:r,columnMapToSave:i,unavailableNames:null==m?void 0:m.items.map(e=>e.name),onCreateCustomReport:n}),(0,o.jsx)(T.cVQ,{isOpen:D,onClose:()=>{k(void 0),N()},onConfirm:()=>{U&&$(U.id),N()},title:"Delete ".concat(et),message:(0,o.jsxs)(T.xvT,{children:["You are about to permanently delete the"," ",et.toLowerCase()," named"," ",(0,o.jsx)("strong",{children:null==U?void 0:U.name}),". Are you sure you would like to continue?"]})})]})};var er=a(19785),ei=a.n(er),en=a(55807),eo=a.n(en),el=a(32526),ec=a.n(el),ed=a(72625),eu=a(43862);let e_=(0,A.Cl)(),ep=(e,t)=>({cell:e=>(0,o.jsx)(x.G3,{value:e.getValue()}),header:a=>{let s={};return Object.keys(e).forEach(t=>{"string"==typeof e[t]?s[t]=e[t]:e[t].label&&(s[t]=e[t].label||"")}),(0,o.jsx)(ed.Hm,{value:(0,eu.AH)({columnId:a.column.id,columnNameMap:s}),defaultValue:p[a.column.id]||(0,eu.AH)({columnId:a.column.id}),isEditing:t,...a})}}),em=(e,t)=>{var a;let s=(null==e?void 0:null===(a=e.items)||void 0===a?void 0:a.length)?Object.keys(e.items[0]):[],r=Object.values(n);return s.filter(e=>!r.includes(e)).filter(e=>e.startsWith("privacy_declaration_")||e.startsWith("system_")).map(e=>{let a=t.find(t=>e.includes(ec()(t.name)));return e_.accessor(t=>t[e],{id:e,cell:e=>Array.isArray(e.getValue())?(0,o.jsx)(x.WP,{value:e.getValue(),ignoreZero:!0,...e}):(0,o.jsx)(x.G3,{value:e.getValue()}),meta:{showHeaderMenu:(null==a?void 0:a.field_type)==="string[]"}})})},eE=e=>{let{onSelectRow:t,getDataUseDisplayName:a,getDataCategoryDisplayName:s,getDataSubjectDisplayName:r,datamapReport:i,customFields:l,isRenaming:c=!1}=e,d=em(i,l);return[e_.accessor(e=>e.system_name,{enableGrouping:!0,id:n.SYSTEM_NAME,meta:{onCellClick:t}}),e_.accessor(e=>e.data_uses,{id:n.DATA_USE,cell:e=>{let t=e.getValue();return(0,o.jsx)(x.WP,{suffix:"data uses",ignoreZero:!0,value:ei()(t)?eo()(t,a):a(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto"}}),e_.accessor(e=>e.data_categories,{id:n.DATA_CATEGORY,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=ei()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,o.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_subjects,{id:n.DATA_SUBJECT,cell:e=>{let t=e.getValue();return(0,o.jsx)(x.WP,{suffix:"data subjects",ignoreZero:!0,value:ei()(t)?eo()(t,r):r(t||""),tagProps:{color:"white"},...e})},meta:{showHeaderMenu:!c}}),e_.accessor(e=>e.legal_name,{id:n.LEGAL_NAME}),e_.accessor(e=>e.dpo,{id:n.DPO}),e_.accessor(e=>e.legal_basis_for_processing,{id:n.LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.administrating_department,{id:n.ADMINISTRATING_DEPARTMENT}),e_.accessor(e=>e.cookie_max_age_seconds,{id:n.COOKIE_MAX_AGE_SECONDS}),e_.accessor(e=>e.privacy_policy,{id:n.PRIVACY_POLICY}),e_.accessor(e=>e.legal_address,{id:n.LEGAL_ADDRESS}),e_.accessor(e=>e.cookie_refresh,{id:n.COOKIE_REFRESH}),e_.accessor(e=>e.data_security_practices,{id:n.DATA_SECURITY_PRACTICES}),e_.accessor(e=>e.data_shared_with_third_parties,{id:n.DATA_SHARED_WITH_THIRD_PARTIES}),e_.accessor(e=>e.processes_special_category_data,{id:n.PROCESSES_SPECIAL_CATEGORY_DATA}),e_.accessor(e=>e.data_stewards,{id:n.DATA_STEWARDS,cell:e=>(0,o.jsx)(x.WP,{suffix:"data stewards",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.declaration_name,{id:n.DECLARATION_NAME}),e_.accessor(e=>e.does_international_transfers,{id:n.DOES_INTERNATIONAL_TRANSFERS}),e_.accessor(e=>e.dpa_location,{id:n.DPA_LOCATION}),e_.accessor(e=>e.egress,{id:n.DESTINATIONS,cell:e=>(0,o.jsx)(x.WP,{suffix:"destinations",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.exempt_from_privacy_regulations,{id:n.EXEMPT_FROM_PRIVACY_REGULATIONS}),e_.accessor(e=>e.features,{id:n.FEATURES,cell:e=>(0,o.jsx)(x.WP,{suffix:"features",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.fides_key,{id:n.FIDES_KEY}),e_.accessor(e=>e.flexible_legal_basis_for_processing,{id:n.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.impact_assessment_location,{id:n.IMPACT_ASSESSMENT_LOCATION}),e_.accessor(e=>e.ingress,{id:n.SOURCES,cell:e=>(0,o.jsx)(x.WP,{suffix:"sources",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.joint_controller_info,{id:n.JOINT_CONTROLLER_INFO}),e_.accessor(e=>e.legal_basis_for_profiling,{id:n.LEGAL_BASIS_FOR_PROFILING,cell:e=>(0,o.jsx)(x.WP,{suffix:"profiles",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legal_basis_for_transfers,{id:n.LEGAL_BASIS_FOR_TRANSFERS,cell:e=>(0,o.jsx)(x.WP,{suffix:"transfers",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legitimate_interest_disclosure_url,{id:n.LEGITIMATE_INTEREST_DISCLOSURE_URL}),e_.accessor(e=>e.processes_personal_data,{id:n.PROCESSES_PERSONAL_DATA}),e_.accessor(e=>e.reason_for_exemption,{id:n.REASON_FOR_EXEMPTION}),e_.accessor(e=>e.requires_data_protection_assessments,{id:n.REQUIRES_DATA_PROTECTION_ASSESSMENTS}),e_.accessor(e=>e.responsibility,{id:n.RESPONSIBILITY,cell:e=>(0,o.jsx)(x.WP,{suffix:"responsibilities",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.retention_period,{id:n.RETENTION_PERIOD}),e_.accessor(e=>e.shared_categories,{id:n.SHARED_CATEGORIES,cell:e=>(0,o.jsx)(x.WP,{suffix:"shared categories",ignoreZero:!0,value:e.getValue(),tagProps:{color:"white"},...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.special_category_legal_basis,{id:n.SPECIAL_CATEGORY_LEGAL_BASIS}),e_.accessor(e=>e.third_parties,{id:n.THIRD_PARTIES}),e_.accessor(e=>e.system_undeclared_data_categories,{id:n.SYSTEM_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=ei()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,o.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_use_undeclared_data_categories,{id:n.DATA_USE_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=ei()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,o.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.cookies,{id:n.COOKIES,cell:e=>(0,o.jsx)(x.WP,{ignoreZero:!0,suffix:"cookies",value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.uses_cookies,{id:n.USES_COOKIES}),e_.accessor(e=>e.uses_non_cookie_access,{id:n.USES_NON_COOKIE_ACCESS}),e_.accessor(e=>e.uses_profiling,{id:n.USES_PROFILING}),...d]},eS=e=>e===_.fI.DATA_USE_SYSTEM?[n.DATA_USE]:[n.SYSTEM_NAME],eh=e=>{let t=[];return _.fI.SYSTEM_DATA_USE===e&&(t=[n.SYSTEM_NAME,n.DATA_USE]),_.fI.DATA_USE_SYSTEM===e&&(t=[n.DATA_USE,n.SYSTEM_NAME]),t},ef=(e,t)=>eh(e).concat(t.filter(e=>e!==n.SYSTEM_NAME&&e!==n.DATA_USE)),eg={items:[],total:0,page:1,size:25,pages:1},eA=()=>{let e=(0,y.Tg)([_.Sh.CUSTOM_REPORT_READ]),{isLoading:t}=(0,V.x8)(),{PAGE_SIZES:a,pageSize:s,setPageSize:r,onPreviousPageClick:n,isPreviousPageDisabled:c,onNextPageClick:d,isNextPageDisabled:u,startRange:S,endRange:h,pageIndex:v,setTotalPages:L,resetPageIndexToDefault:w}=(0,x.oi)(),M=(0,T.pmc)({id:"datamap-report-toast"}),{isOpen:U,onClose:k,onOpen:G}=(0,T.qY0)(),{getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,isLoading:B}=(0,j.Z)(),[z,W]=(0,l.useState)(),{savedCustomReportId:q,setSavedCustomReportId:X,groupBy:J,setGroupBy:K,selectedFilters:Q,setSelectedFilters:$,columnOrder:ee,setColumnOrder:et,columnVisibility:ea,setColumnVisibility:er,columnSizing:ei,setColumnSizing:en,columnNameMapOverrides:eo,setColumnNameMapOverrides:el}=f(),[ec,ed]=(0,l.useState)(!1),eu=e=>{X(""),K(e),ed(!0),w()},[e_,em]=(0,l.useState)(""),eA=(0,l.useCallback)(e=>{w(),em(e)},[w,em]),ex={pageIndex:v,pageSize:s,groupBy:J,search:e_,dataUses:(0,D.du)(Q.dataUses,"data_uses"),dataSubjects:(0,D.du)(Q.dataSubjects,"data_subjects"),dataCategories:(0,D.du)(Q.dataCategories,"data_categories")},{data:eT,isLoading:eC,isFetching:ev}=(0,I.tH)(ex),[eR,{isLoading:eO,isError:ej}]=(0,I.Eo)(),{data:eb,totalRows:ey}=(0,l.useMemo)(()=>{let e=eT||eg,t=e.items;return ec&&ed(!1),L(e.pages),{totalRows:e.total,data:t}},[eT]);(0,V.GH)();let eD=(0,O.C)(V.fN),[eI,eN]=(0,l.useState)(!1),eL=(0,l.useMemo)(()=>eT?eE({onSelectRow:e=>W(e.fides_key),getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,datamapReport:eT,customFields:eD,isRenaming:eI}):[],[H,Z,Y,eT,eD,eI]),{isOpen:ew,onOpen:eP,onClose:eM}=(0,T.qY0)(),{isOpen:eU,onOpen:ek,onClose:eG}=(0,T.qY0)(),eH=(0,g.b7)({getCoreRowModel:(0,A.sC)(),getGroupedRowModel:(0,A.qe)(),getExpandedRowModel:(0,A.rV)(),manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onChange",columns:eL,defaultColumn:ep({...p,...eo},eI),data:eb,initialState:{expanded:!0,columnSizing:ei,columnOrder:ee,columnVisibility:ea,grouping:eS(J)}});(0,l.useEffect)(()=>{J&&eH&&eT&&(0===eH.getState().columnOrder.length?et(ef(J,eH.getAllColumns().map(e=>e.id))):et(ef(J,eH.getState().columnOrder)))},[J,eH,eT]),(0,l.useEffect)(()=>{let e=eS(J);eT&&eH.setGrouping(e)},[eT]);let eY=(0,l.useMemo)(()=>R()(en,300),[en]);(0,l.useEffect)(()=>{let e=eH.getState().columnSizing;e&&eY(e)},[eH.getState().columnSizing]);let eF=()=>{switch(J){case _.fI.SYSTEM_DATA_USE:return"system";case _.fI.DATA_USE_SYSTEM:return"data use";default:return"system"}},eV=(e,t)=>{if(e||q){if(!e){try{X(""),er(m),eH.toggleAllColumnsVisible(!0),eH.setColumnVisibility(m),et([]),eH.setColumnOrder([]),K(_.fI.SYSTEM_DATA_USE),$(E),el({}),t({values:{}})}catch(e){M({status:"error",description:"There was a problem resetting the report."})}return}try{var a,s,r,i;if(null===(a=e.config)||void 0===a?void 0:a.table_state){let{groupBy:t,filters:a,columnOrder:s}=e.config.table_state,i={};Object.entries(null!==(r=e.config.column_map)&&void 0!==r?r:{}).forEach(e=>{let[t,a]=e;i[t]=a.enabled||!1}),t&&K(t),a&&$(a),s&&(et(s),eH.setColumnOrder(s)),i&&(er(i),eH.setColumnVisibility(i))}if(null===(s=e.config)||void 0===s?void 0:s.column_map){let a={};Object.entries(null!==(i=e.config.column_map)&&void 0!==i?i:{}).forEach(e=>{let[t,s]=e;s.label&&(a[t]=s.label)}),el(a),t({values:a})}X(e.id),M({status:"success",description:"Report applied successfully."})}catch(e){M({status:"error",description:"There was a problem applying report."})}}};return eC||t||B?(0,o.jsx)(x.I4,{rowHeight:36,numRows:15}):(0,o.jsxs)(T.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,o.jsx)(F,{columnNameMap:{...p,...eo},selectedFilters:Q,isOpen:U,onClose:k,onFilterChange:e=>{X(""),$(e)}}),(0,o.jsx)(x.F1,{isOpen:ew,onClose:eM,headerText:"Data map settings",columnNameMap:{...p,...eo},prefixColumns:eh(J),tableInstance:eH,savedCustomReportId:q,onColumnOrderChange:e=>{X(""),eH.setColumnOrder(e),et(e)},onColumnVisibilityChange:e=>{X(""),eH.setColumnVisibility(e),er(e)}}),(0,o.jsx)(P,{isOpen:eU,onClose:eG,onConfirm:e=>{let t={};Object.entries(ea).forEach(e=>{let[a,s]=e;t[a]={enabled:s}}),Object.entries(eo).forEach(e=>{let[a,s]=e;if(t[a])t[a].label=s;else{var r;t[a]={label:s,enabled:null===(r=ea[a])||void 0===r||r}}}),eR({...ex,format:e,report_id:q,report:{name:"",type:"datamap",config:{column_map:t,table_state:{groupBy:J,filters:Q,columnOrder:ee}}}}).then(()=>{ej||eG()})},isLoading:eO}),(0,o.jsx)(C.J9,{initialValues:eo,onSubmit:e=>{X(""),el(e),eN(!1)},children:t=>{let{submitForm:a,resetForm:s}=t;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(x.Q$,{children:[(0,o.jsx)(x.HO,{globalFilter:e_,setGlobalFilter:eA,placeholder:"System name, Fides key, or ID"}),(0,o.jsxs)(T.kCb,{alignItems:"center",gap:2,children:[e&&(0,o.jsx)(es,{reportType:_.C2.DATAMAP,savedReportId:q,tableStateToSave:{groupBy:J,filters:Q,columnOrder:ee,columnVisibility:ea},currentColumnMap:eo,onCustomReportSaved:e=>eV(e,s),onSavedReportDeleted:()=>{X("")}}),(0,o.jsxs)(T.v2r,{children:[(0,o.jsxs)(T.j2t,{as:T.wpx,icon:(0,o.jsx)(T.v4q,{}),iconPosition:"end",loading:ec,"data-testid":"group-by-menu",children:["Group by ",eF()]}),(0,o.jsxs)(T.qyq,{zIndex:11,"data-testid":"group-by-menu-list",children:[(0,o.jsx)(T.iiZ,{onClick:()=>{eu(_.fI.SYSTEM_DATA_USE)},isChecked:_.fI.SYSTEM_DATA_USE===J,value:_.fI.SYSTEM_DATA_USE,"data-testid":"group-by-system-data-use",children:"System"}),(0,o.jsx)(T.iiZ,{onClick:()=>{eu(_.fI.DATA_USE_SYSTEM)},isChecked:_.fI.DATA_USE_SYSTEM===J,value:_.fI.DATA_USE_SYSTEM,"data-testid":"group-by-data-use-system",children:"Data use"})]})]}),(0,o.jsx)(T.wpx,{"data-testid":"filter-multiple-systems-btn",onClick:G,children:"Filter"}),(0,o.jsx)(T.wpx,{"aria-label":"Export report","data-testid":"export-btn",onClick:ek,icon:(0,o.jsx)(b.nM,{ml:"1.5px"})}),(0,o.jsxs)(T.v2r,{placement:"bottom-end",children:[(0,o.jsx)(T.j2t,{as:T.wpx,icon:(0,o.jsx)(T.nXP,{className:"rotate-90"}),"data-testid":"more-menu","aria-label":"More options",className:"w-6 gap-0"}),(0,o.jsxs)(T.qyq,{"data-testid":"more-menu-list",children:[(0,o.jsx)(T.sNh,{onClick:eP,"data-testid":"edit-columns-btn",children:"Edit columns"}),(0,o.jsx)(T.sNh,{onClick:()=>eN(!0),"data-testid":"rename-columns-btn",children:"Rename columns"})]})]}),eI&&(0,o.jsxs)("div",{className:"flex gap-2",children:[(0,o.jsx)(T.wpx,{size:"small","data-testid":"rename-columns-reset-btn",onClick:()=>{el({}),X(""),s({values:{}}),eN(!1)},children:"Reset all"}),(0,o.jsx)(T.wpx,{size:"small","data-testid":"rename-columns-cancel-btn",onClick:()=>{s({values:eo}),eN(!1)},children:"Cancel"}),(0,o.jsx)(T.wpx,{size:"small",type:"primary",htmlType:"submit","data-testid":"rename-columns-apply-btn",onClick:a,children:"Apply"})]})]})]}),(0,o.jsx)(C.l0,{children:(0,o.jsx)(x.ZK,{tableInstance:eH,columnExpandStorageKey:i.COLUMN_EXPANSION_STATE,columnWrapStorageKey:i.WRAPPING_COLUMNS})})]})}}),(0,o.jsx)(x.s8,{totalRows:ey||0,pageSizes:a,setPageSize:r,onPreviousPageClick:n,isPreviousPageDisabled:c||ev,onNextPageClick:d,isNextPageDisabled:u||ev,startRange:S,endRange:h}),(0,o.jsx)(N.Z,{selectedSystemId:z,resetSelectedSystemId:()=>W(void 0)})]})};var ex=()=>(0,o.jsxs)(c.Z,{title:"Datamap Report",children:[(0,o.jsx)(d.Z,{"data-testid":"datamap-report-heading",heading:"Data map report"}),(0,o.jsx)(h,{children:(0,o.jsx)(eA,{})})]})}},function(e){e.O(0,[8033,6060,2858,2866,9278,9187,4481,7980,8499,5258,2888,9774,179],function(){return e(e.s=86548)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53611:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return n(23922)}])},59301:function(e,t,n){"use strict";var i=n(24246),r=n(77181);t.Z=e=>(0,i.jsx)(r.rUS,{isExternal:!0,color:"complimentary.500",...e})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i=n(24246),r=n(77181),l=n(88038),s=n.n(l),o=n(86677);n(27378);var a=n(25980),d=n(90867),c=n(77830),u=()=>{let e=(0,o.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:n,padded:l=!0,mainProps:c}=e,p=(0,a.hz)(),g=(0,o.useRouter)(),_="/privacy-requests"===g.pathname||"/datastore-connection"===g.pathname,h=!(p.flags.privacyRequestsConfiguration&&_),{data:b}=(0,d.JE)(void 0,{skip:h}),{data:v}=(0,d.PW)(void 0,{skip:h}),f=p.flags.privacyRequestsConfiguration&&(!b||!v)&&_;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(s(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[f?(0,i.jsx)(u,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(77181),l=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:s=!0,children:o,rightContent:a,style:d,...c}=e;return(0,i.jsxs)("div",{...c,style:s?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,a&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!n&&(0,i.jsx)(l.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return l.D4},MM:function(){return p},Ot:function(){return d},c6:function(){return r},cj:function(){return _},e$:function(){return o},fn:function(){return a},iC:function(){return g},nU:function(){return u},tB:function(){return c}});var i,r,l=n(19043);let s="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if((0,l.Bw)(e)){if((0,l.hE)(e.data))return e.data.detail;if((0,l.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,l.Dy)(e.data)||404===e.status&&(0,l.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function a(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:s};if((0,l.oK)(e))return{status:e.originalStatus,message:e.data};if((0,l.Bw)(e)){let{status:n}=e;return{status:n,message:o(e,t.message)}}return t},p=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let g={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},_=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return d}});var i=n(24246),r=n(77181),l=n(79894),s=n.n(l),o=n(27378);let{Text:a}=r.AntTypography,d=e=>{let{items:t,...n}=e,l=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let l=n===t.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(a,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:o.title})),d)?o.title=(0,i.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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(s(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(r.zrq,{items:l,...n})}},6675:function(e,t,n){"use strict";n.d(t,{ZS:function(){return o},a4:function(){return l}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:l}=r,s={purposes:{},special_purposes:{}},o=(0,i.P1)(r.endpoints.getPurposes.select(),e=>{let{data:t}=e;return t||s})},46628:function(e,t,n){"use strict";n.d(t,{MA:function(){return o},Vo:function(){return d},t5:function(){return a}});var i=n(24246),r=n(77181);let l=e=>{let{children:t,title:n="Success"}=e;return(0,i.jsxs)(r.xvT,{"data-testid":"toast-success-msg",children:[(0,i.jsxs)("strong",{children:[n,":"]})," ",t]})},s=e=>{let{children:t}=e;return(0,i.jsxs)(r.xvT,{"data-testid":"toast-error-msg",children:[(0,i.jsx)("strong",{children:"Error:"})," ",t]})},o={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},a=(e,t)=>{let n=(0,i.jsx)(l,{title:t,children:e});return{...o,description:n}},d=e=>{let t=(0,i.jsx)(s,{children:e});return{...o,description:t,status:"error"}}},7426:function(e,t,n){"use strict";n.d(t,{D2:function(){return p},L:function(){return o},U7:function(){return d},Yh:function(){return _},ak:function(){return a},km:function(){return s},tB:function(){return l}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:l,usePutConfigurationSettingsMutation:s,usePatchConfigurationSettingsMutation:o}=r,a=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{var i,r,l;let{data:s}=t,{data:o}=n;return{configSet:{cors_origins:(null==o?void 0:null===(i=o.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==o?void 0:null===(r=o.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==s?void 0:null===(l=s.security)||void 0===l?void 0:l.cors_origins)||[]}}}),d=()=>(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:n}=t;return n}),c={enabled:!1,cmp_api_required:!1},u=(e,t,n,i)=>{let r=n&&n[e],l=i&&i[e];return r&&l?{...i[e],...n[e]}:l?i[e]:r?{...n[e]}:t},p=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return u("gpp",c,i,r)}),g={tcf_publisher_country_code:null},_=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return u("plus_consent_settings",g,i,r)})},48515:function(e,t,n){"use strict";var i,r;n.d(t,{O:function(){return i}}),(r=i||(i={})).ACKNOWLEDGE="acknowledge",r.OPT_IN_OPT_OUT="opt_in_opt_out"},60325:function(e,t,n){"use strict";n.d(t,{DD:function(){return a},Go:function(){return d},TK:function(){return l},Uv:function(){return u},k1:function(){return s},y3:function(){return p}});var i=n(21702),r=n(48515);let l=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==t?t:[]},s=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected))&&void 0!==t?t:[]},o=[{language:i.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"}],a={name:"",disabled:!1,dismissable:!0,allow_language_selection:!1,show_layer1_notices:!1,layer1_button_options:r.O.OPT_IN_OPT_OUT,regions:[],translations:o,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0},d=(e,t)=>{let n=t.find(t=>t.id===e.language);return n?n.name:e.language},c=e=>{var t,n,i,r,l,s,o,a,d;let{language:c,is_default:u,accept_button_label:p,reject_button_label:g}=e;return{language:c,is_default:u,accept_button_label:p,reject_button_label:g,title:e.title,description:e.description,acknowledge_button_label:null!==(t=e.acknowledge_button_label)&&void 0!==t?t:void 0,banner_title:null!==(n=e.banner_title)&&void 0!==n?n:void 0,banner_description:null!==(i=e.banner_description)&&void 0!==i?i:void 0,purpose_header:null!==(r=e.purpose_header)&&void 0!==r?r:void 0,privacy_policy_link_label:null!==(l=e.privacy_policy_link_label)&&void 0!==l?l:void 0,privacy_policy_url:null!==(s=e.privacy_policy_url)&&void 0!==s?s: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}},u=e=>{let{created_at:t,updated_at:n,privacy_notices:i,origin:r,id:l,...s}=e;return{...s,privacy_notice_ids:i?i.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>c(e)):[]}},p=e=>e===i.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===i.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===i.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===i.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}}},23922:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return N}});var i=n(24246),r=n(77181),l=n(34090),s=n(27378),o=n(16134),a=n(59301),d=n(25980),c=n(812),u=n(77213),p=n(58754),g=n(6675),_=n(91613),h=n(46628),b=n(7426),v=e=>{let{name:t,enabled:n}=e;return(0,i.jsxs)(r.Kqy,{spacing:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:[(0,i.jsxs)(r.xvT,{children:[t," status"," ",n?(0,i.jsx)(r.j8w,{color:"success",children:"Enabled"}):(0,i.jsx)(r.j8w,{color:"error",children:"Disabled"})]}),(0,i.jsxs)(r.xvT,{children:["To ",n?"disable":"enable"," ",t,", please contact your Fides administrator or"," ",(0,i.jsx)(a.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},f=n(40324),m=e=>{var t,n;let{label:s,options:o,layout:a,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,l.U$)(c),g={...u,value:null!==(t=u.value)&&void 0!==t?t:""},h=!!(p.touched&&p.error),b=d?o[0]:void 0,v=null!==(n=o.find(e=>e.value===g.value))&&void 0!==n?n:b,m=e=>{g.onChange(c.name)(e.target.value)};return"stacked"===a?(0,i.jsxs)(r.NIc,{isInvalid:h,children:[(0,i.jsxs)(r.jqI,{className:"w-fit",children:[s?(0,i.jsx)(f.__,{children:s}):null,(0,i.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.value,"data-testid":"input-".concat(g.name),children:(0,i.jsx)(r.jqI,{className:"flex-col gap-3",children:o.map(e=>{let{value:t,label:n,tooltip:l}=e;return(0,i.jsx)(r.y02,{value:t,"data-testid":"option-".concat(t),children:(0,i.jsxs)(r.jqI,{className:"items-center gap-2",children:[(0,i.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:n}),l?(0,i.jsx)(_.Z,{label:l}):null]})},t)})})})]}),(0,i.jsx)(f.Bc,{isInvalid:h,message:p.error,fieldName:g.name})]}):(0,i.jsxs)(r.NIc,{isInvalid:h,children:[(0,i.jsxs)(r.rjZ,{templateColumns:"1fr 3fr",children:[(0,i.jsx)(f.__,{children:s}),(0,i.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.value,"data-testid":"input-".concat(g.name),children:(0,i.jsx)(r.jqI,{children:o.map(e=>(0,i.jsx)(r.y02,{value:e.value,"data-testid":"option-".concat(e.value),children:e.label},e.value))})})]}),(0,i.jsx)(f.Bc,{isInvalid:h,message:p.error,fieldName:g.name})]})},x=n(21702),y=e=>{let{title:t,children:n,...l}=e;return(0,i.jsxs)(r.xuv,{backgroundColor:"gray.50",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(t),...l,children:[(0,i.jsx)(r.xvT,{fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:t}),n]})};let j=e=>{let{title:t,children:n}=e;return(0,i.jsxs)(r.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(t),children:[(0,i.jsx)(r.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:t}),n]})};var C=()=>{let{tcf:e}=(0,d.hz)(),t=!!(0,o.C)(b.D2).enabled,{values:n,setFieldValue:s}=(0,l.u6)(),a=!!n.gpp.us_approach;return(0,i.jsx)(y,{title:"Global Privacy Platform",children:(0,i.jsxs)(r.Kqy,{spacing:6,children:[(0,i.jsx)(v,{name:"GPP",enabled:t}),t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j,{title:"GPP U.S.",children:(0,i.jsx)(m,{name:"gpp.us_approach",layout:"stacked",defaultFirstSelected:!1,options:[{label:"Enable U.S. National",value:x.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:x.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:x.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."}]})}),a?(0,i.jsxs)(j,{title:"MSPA",children:[(0,i.jsx)(f.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||(s("gpp.mspa_service_provider_mode",!1),s("gpp.mspa_opt_out_option_mode",!1))}}),(0,i.jsx)(f.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:!!n.gpp.mspa_opt_out_option_mode||!n.gpp.mspa_covered_transactions}),(0,i.jsx)(f.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:!!n.gpp.mspa_service_provider_mode||!n.gpp.mspa_covered_transactions})]}):null]}):null,e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.izJ,{color:"gray.200"}),(0,i.jsxs)(j,{title:"GPP Europe",children:[(0,i.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:"Configure TCF string for Global Privacy Platform"}),(0,i.jsx)(f.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]})})},w=n(64781),S=n(60325),T=()=>{var e,t;let{tcf:n}=(0,d.hz)(),{values:s,setFieldValue:o}=(0,l.u6)(),{data:a,isLoading:c}=(0,w.gT)(),u=[...(0,S.k1)(null!==(e=null==a?void 0:a.locations)&&void 0!==e?e:[]),...(0,S.k1)(null!==(t=null==a?void 0:a.location_groups)&&void 0!==t?t:[])].sort((e,t)=>e.name<t.name?-1:1);return n?(0,i.jsxs)(y,{title:"Publisher Settings",children:[(0,i.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,i.jsx)("label",{htmlFor:"publisher_country_code",className:"mb-1 block",children:(0,i.jsx)(r.AntTypography.Text,{className:"font-semibold",children:"Publisher country"})}),(0,i.jsx)(r.WPr,{"data-testid":"input-publisher_settings.publisher_country_code",id:"publisher_country_code",loading:c,allowClear:!0,options:null==u?void 0:u.map(e=>({value:e.id,label:e.name})),showSearch:!0,optionFilterProp:"label",placeholder:"Select a country",value:s.tcfPublisherSettings.publisher_country_code,onChange:e=>o("tcfPublisherSettings.publisher_country_code",e),className:"w-80"})]}):null};let k=e=>{let{children:t,purpose:n,endCol:l}=e;return(0,i.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderRight:l?"solid 1px":"unset",borderColor:"gray.200",height:"100%",minWidth:"36px",children:[1,3,4,5,6].includes(n)?null:(0,i.jsx)(r.xuv,{children:t})})};var P=()=>{let{values:e,setFieldValue:t}=(0,l.u6)(),{purposes:n}=(0,o.C)(g.ZS);return(0,i.jsx)(l.F2,{name:"purposeOverrides",render:()=>(0,i.jsxs)(r.kCb,{flexDirection:"column",minWidth:"944px",children:[(0,i.jsxs)(r.kCb,{width:"100%",border:"solid 1px",borderColor:"gray.200",backgroundColor:"gray.50",height:"36px",children:[(0,i.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,i.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",minWidth:"36px",children:(0,i.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Allowed"})}),(0,i.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:(0,i.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Consent"})}),(0,i.jsx)(r.kCb,{flex:"1",alignItems:"center",children:(0,i.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Legitimate interest"})})]}),e.purposeOverrides.map((l,s)=>(0,i.jsxs)(r.kCb,{width:"100%",height:"36px",alignItems:"center",borderBottom:"solid 1px",borderColor:"gray.200",children:[(0,i.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 ",l.purpose,": ",n[l.purpose].name]}),(0,i.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderColor:"gray.200",height:"100%",children:(0,i.jsx)(r.xuv,{children:(0,i.jsx)(f.w8,{name:"purposeOverrides[".concat(s,"].is_included"),onChange:e=>{e||(t("purposeOverrides[".concat(s,"].is_consent"),!1),t("purposeOverrides[".concat(s,"].is_legitimate_interest"),!1))}})})}),(0,i.jsx)(k,{purpose:l.purpose,children:(0,i.jsx)(f.w8,{isDisabled:!e.purposeOverrides[s].is_included||e.purposeOverrides[s].is_legitimate_interest,name:"purposeOverrides[".concat(s,"].is_consent")})}),(0,i.jsx)(k,{purpose:l.purpose,endCol:!0,children:(0,i.jsx)(f.w8,{isDisabled:!e.purposeOverrides[s].is_included||e.purposeOverrides[s].is_consent,name:"purposeOverrides[".concat(s,"].is_legitimate_interest")})})]},l.purpose))]})})},q=n(32885),N=()=>{let{isLoading:e}=(0,q.x8)(),{tcf:t}=(0,d.hz)(),{data:n,isLoading:f}=(0,q.n3)(void 0,{skip:e||!t}),[m]=(0,q.M7)(),{data:j,isLoading:w}=(0,b.tB)({api_set:!0}),{data:S,isLoading:k}=(0,b.tB)({api_set:!1}),[N,{isLoading:E}]=(0,b.L)(),A=(0,o.C)(b.D2),I=(0,o.C)(b.Yh),O=(0,s.useMemo)(()=>j&&(null==j?void 0:j.consent)&&"override_vendor_purposes"in j.consent?j.consent.override_vendor_purposes:!!S&&null!=S&&!!S.consent&&"override_vendor_purposes"in S.consent&&S.consent.override_vendor_purposes,[j,S]),{isLoading:L}=(0,g.a4)(),F=(0,r.pmc)(),z=async e=>{var t;let n=e=>{if(F.closeAll(),(0,c.D4)(e)){let t=(0,c.e$)(e.error,"An unexpected error occurred while saving. Please try again.");F((0,h.Vo)(t))}else F((0,h.t5)("Settings saved successfully"))},i=[...e.purposeOverrides.map(e=>{let t;return e.is_consent&&(t=x.I$.CONSENT),e.is_legitimate_interest&&(t=x.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:t}})];if(O){let e=await m(i);if((0,c.D4)(e)){n(e);return}}let{enabled:r,...l}=e.gpp;n(await N({gpp:l,plus_consent_settings:{tcf_publisher_country_code:null!==(t=e.tcfPublisherSettings.publisher_country_code)&&void 0!==t?t:null}}))},W=async e=>{let t=await N({consent:{override_vendor_purposes:e}});e&&await m(n.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(e=>{if(F.closeAll(),(0,c.D4)(e)){let t=(0,c.e$)(e.error,"An unexpected error occurred while saving vendor override settings. Please try again.");F((0,h.Vo)(t))}})(t)},D=(0,s.useMemo)(()=>({purposeOverrides:n?n.map(e=>({purpose:e.purpose,is_included:e.is_included,is_consent:e.required_legal_basis===x.I$.CONSENT,is_legitimate_interest:e.required_legal_basis===x.I$.LEGITIMATE_INTERESTS})):[],gpp:A,tcfPublisherSettings:{publisher_country_code:I.tcf_publisher_country_code}}),[n,A,I]);return(0,i.jsx)(u.Z,{title:"Consent Configuration",children:e||L||f||w||k?(0,i.jsx)(r.kCb,{justifyContent:"center",alignItems:"center",height:"100%",children:(0,i.jsx)(r.$jN,{})}):(0,i.jsxs)(r.xuv,{"data-testid":"consent-configuration",children:[(0,i.jsx)(p.Z,{heading:"Consent settings"}),(0,i.jsxs)(r.Kqy,{spacing:3,mb:3,children:[(0,i.jsx)(y,{title:"Transparency & Consent Framework settings",children:(0,i.jsx)(v,{name:"TCF",enabled:t})}),(0,i.jsxs)(y,{title:"Vendor overrides",children:[t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.xvT,{mb:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:"Configure overrides for TCF related purposes."}),(0,i.jsxs)(r.kCb,{alignItems:"center",marginBottom:2,children:[(0,i.jsx)(r.rAg,{size:"small",checked:O,onChange:W,disabled:E}),(0,i.jsx)(r.xvT,{px:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:"Override vendor purposes"}),(0,i.jsx)(_.Z,{label:"Toggle on if you want to globally change any flexible legal bases or remove TCF purposes from your CMP"})]}),(0,i.jsx)(r.xvT,{mb:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:O?"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activites.":null})]}):null,O&&t?(0,i.jsxs)(r.xvT,{fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:["To configure this section, select the purposes you allow and where available, the appropriate legal bases (either Consent or Legitimate Interest)."," ",(0,i.jsxs)(a.Z,{href:"https://fid.es/tcf-overrides",children:["Read the guide on vendor overrides here."," "]})]}):null]})]}),(0,i.jsx)(l.J9,{initialValues:D,enableReinitialize:!0,onSubmit:z,children:e=>{let{dirty:t,isValid:n,isSubmitting:s}=e;return(0,i.jsx)(l.l0,{children:(0,i.jsxs)(r.Kqy,{spacing:6,children:[O?(0,i.jsx)(P,{}):null,(0,i.jsx)(T,{}),(0,i.jsx)(C,{}),(0,i.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:!t||!n,loading:s,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return s},D4:function(){return r},Dy:function(){return a},XD:function(){return d},cz:function(){return c},hE:function(){return o},oK:function(){return l}});var i=n(76649);let r=e=>"error"in e,l=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,s=e=>(0,i.Ln)({status:"number",data:{}},e),o=e=>(0,i.Ln)({detail:"string"},e),a=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>l(e,t),r=Symbol("SOME"),l=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>l(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>l(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>l(n,t[e]));class s{static narrow(e){return new s(t=>i(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof s?e.NF:e instanceof Function?e:t=>i(e,t);return new s(e=>t(e)&&n(e))}}new s(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=53611)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4065],{70378:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/custom-fields",function(){return l(76513)}])},56358:function(e,t,l){"use strict";l.d(t,{q:function(){return s}});var i=l(24246);let s=(0,l(77181).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,t,l){"use strict";l.d(t,{l:function(){return s}});var i=l(24246);let s=(0,l(77181).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,t,l){"use strict";l.d(t,{Z:function(){return p}});var i=l(24246),s=l(77181),a=l(88038),o=l.n(a),n=l(86677);l(27378);var r=l(25980),d=l(90867),c=l(77830),u=()=>{let e=(0,n.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:t,title:l,padded:a=!0,mainProps:c}=e,p=(0,r.hz)(),x=(0,n.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:C}=(0,d.PW)(void 0,{skip:h}),v=p.flags.privacyRequestsConfiguration&&(!f||!C)&&m;return(0,i.jsxs)(s.kCb,{"data-testid":l,direction:"column",h:"100vh",children:[(0,i.jsxs)(o(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",l]}),(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:[v?(0,i.jsx)(u,{}):null,t]})]})}},19904:function(e,t,l){"use strict";l.d(t,{Tg:function(){return o}});var i=l(24246),s=l(16134),a=l(31793);let o=e=>(0,s.C)(a.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:l}=e;return o(t)?(0,i.jsx)(i.Fragment,{children:l}):null}},70416:function(e,t,l){"use strict";l.d(t,{d:function(){return s}});var i=l(24246);let s=(0,l(77181).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"})})},10342:function(e,t,l){"use strict";var i=l(24246),s=l(77181),a=l(91613);t.Z=e=>{let{title:t,tooltip:l,children:o,...n}=e;return(0,i.jsxs)(s.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...n,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:[t,l?(0,i.jsx)(s.xvT,{as:"span",mx:1,children:(0,i.jsx)(a.Z,{label:l})}):void 0]}),(0,i.jsx)(s.Kqy,{p:6,spacing:6,children:o})]})}},76513:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return Y}});var i=l(24246),s=l(77213),a=l(77181),o=l(27378),n=l(58754),r=l(92222),d=l(59003),c=l(16134),u=l(812),p=l(19904),x=l(14481),m=l(46628),h=l(72625),f=l(28120);let C=new Map([["string","Single Select"],["string[]","Multi Select"],["open-text","Open Text"]]),v=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 g=l(32885);let j=e=>{var t;let l=null!==(t=v.get(e.getValue()))&&void 0!==t?t:e.getValue();return(0,i.jsx)(h.G3,{...e,value:l})},_=e=>{let{row:t,getValue:l}=e,s=t.original.allow_list_id?l():"open-text",a=C.get(s)||s;return(0,i.jsx)(h.A4,{value:a})},b=e=>{let{row:t,getValue:l,isDisabled:s}=e,a=!!l(),[o]=(0,g.yM)(),n=async e=>o({...t.original,active:e});return(0,i.jsx)(h.S1,{enabled:a,onToggle:n,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=l(56358),w=l(58452);let T=e=>{let{customField:t,onEdit:l,onDelete:s,...o}=e,n=(0,a.qY0)();return(0,i.jsxs)(a.xuv,{...o,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(),l(t,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(),n.onOpen()}}),(0,i.jsx)(w.Z,{isOpen:n.isOpen,onClose:n.onClose,onConfirm:()=>{s(t),n.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=l(95346),S=l(14047),L=l(34090),I=l(55484);let R={color:"gray.600",fontSize:"14px",fontWeight:"semibold",minWidth:"150px"};var H=e=>{let{customLabelProps:t,disabled:l=!1,displayHelpIcon:s=!0,helpIconVisibility:o=!1,isRequired:n=!1,label:r,type:d="text",placeholder:c,...u}=e,[p,x]=(0,L.U$)(u),{id:m,name:h,autoFocus:f}=u,C="custom-input-".concat(p.name);return(0,i.jsxs)(a.NIc,{display:"flex",isRequired:n,isInvalid:!!(x.error&&x.touched),children:[r&&(0,i.jsx)(a.lXp,{htmlFor:m||h,...t||R,children:r}),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["number"===d&&(0,i.jsxs)(a.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,i.jsx)(a.zuI,{...p,autoComplete:"off",autoFocus:f,"data-testid":C}),(0,i.jsxs)(a.FiK,{children:[(0,i.jsx)(a.WQu,{}),(0,i.jsx)(a.Y_d,{})]})]}),"text"===d&&(0,i.jsx)(a.IIB,{...p,autoComplete:"off",autoFocus:f,color:"gray.700",isDisabled:l,placeholder:c,size:"sm","data-testid":C}),"textarea"===d&&(0,i.jsx)(a.gxH,{...p,autoComplete:"off",autoFocus:f,color:"gray.700",placeholder:c,resize:"none",size:"sm",value:p.value||"","data-testid":C}),(0,i.jsx)(a.J1D,{children:x.error})]}),s&&(0,i.jsx)(a.kCb,{alignContent:"center",h:"32px",visibility:o?"visible":"hidden",children:(0,i.jsx)(a.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})]})},N=l(70416),P=l(10342),M=l(95492),V=l(97181);let k={...R,minWidth:"unset"},A=e=>{let{values:t,validationSchema:l,errors:s,dirty:n,isValid:r,isSubmitting:d,isLoading:c,onClose:u,handleDropdownChange:p,isEditing:x}=e,{validateForm:m}=(0,L.u6)();return(0,o.useEffect)(()=>{m()},[l,m]),(0,i.jsxs)(L.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(P.Z,{title:"Field Information",children:[(0,i.jsx)(H,{displayHelpIcon:!0,isRequired:!0,label:"Name",name:"name",customLabelProps:k}),(0,i.jsx)(H,{displayHelpIcon:!0,label:"Description",name:"description",customLabelProps:k}),(0,i.jsx)(V.d,{label:"Location",name:"resource_type",options:E.C7,labelProps:k,disabled:x})]})}),(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(P.Z,{title:"Configuration",children:[(0,i.jsx)(V.d,{label:"Field Type",name:"field_type",labelProps:k,options:E.Hn,onChange:p}),t.field_type!==E.Uv.OPEN_TEXT?(0,i.jsx)(a.kCb,{flexDirection:"column",gap:"12px",paddingTop:"6px",paddingBottom:"24px",children:(0,i.jsx)(L.F2,{name:"allow_list.allowed_values",render:e=>{let{allowed_values:l}=t.allow_list;return(0,i.jsxs)(a.kCb,{flexDirection:"column",gap:"6",pl:"6",children:[(0,i.jsx)(a.kCb,{flexDirection:"column",children:l.map((t,s)=>(0,i.jsxs)(a.kCb,{flexGrow:1,gap:"3",mt:s>0?3:void 0,children:[(0,i.jsx)(H,{customLabelProps:{color:"gray.600",fontSize:"sm",fontWeight:"500",lineHeight:"20px",minW:"126px",pr:"8px"},displayHelpIcon:!1,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)(M.l,{}),disabled:l.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.d,{h:"7px",w:"7px"}),onClick:()=>{e.push("")},size:"small"}),0===l.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:!n||!r||d,children:"Save"})]})]})},U={description:"",field_type:E.Uv.OPEN_TEXT,name:"",resource_type:f.P6.SYSTEM,allow_list:{name:"",description:"",allowed_values:[]}},z=I.IX(I.Z_().optional().label("allowed_values")),D=I.IX(I.Z_().required("List item is required")).min(1,"Must add at least one list value").label("allowed_values"),Z=I.Ry().shape({name:I.Z_().required("Name is required").trim(),allow_list:I.Ry().shape({allowed_values:z})}),F=I.Ry().shape({name:I.Z_().required("Name is required").trim(),allow_list:I.Ry().shape({allowed_values:D})}),O=(e,t)=>{var l,i,s;let a;if(!e)return;e.field_type!==f.AL.STRING||e.allow_list_id||(a=E.Uv.OPEN_TEXT),e.field_type===f.AL.STRING&&e.allow_list_id&&(a=E.Uv.SINGLE_SELECT),e.field_type===f.AL.STRING_&&e.allow_list_id&&(a=E.Uv.MULTIPLE_SELECT);let o=t?{name:null!==(l=t.name)&&void 0!==l?l:"",description:null!==(i=t.description)&&void 0!==i?i:"",allowed_values:null!==(s=t.allowed_values)&&void 0!==s?s:[]}:U.allow_list;return{...e,field_type:a||E.Uv.OPEN_TEXT,allow_list:o}},q=e=>{let{isOpen:t,onClose:l,isLoading:s,customField:n}=e,{errorAlert:r,successAlert:d}=(0,S.V)(),[c]=(0,g.Ld)(),[p]=(0,g.yM)(),[x]=(0,g.Nt)(),{data:m,isLoading:h}=(0,g.vA)(null==n?void 0:n.allow_list_id,{skip:!(null==n?void 0:n.allow_list_id)}),[C,v]=(0,o.useState)(Z);if(h||!t)return null;let j=O(n,m),_=!!j,b=e=>{e===E.Uv.OPEN_TEXT?v(Z):v(F)},y=async e=>{if([E.Uv.SINGLE_SELECT,E.Uv.MULTIPLE_SELECT].includes(e.field_type)){var t,i;if(new Set(null===(t=e.allow_list)||void 0===t?void 0:t.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:l}=e;e.allow_list_id&&(l.id=e.allow_list_id),l.name||(l.name=Date.now().toString()+Math.random().toString());let s=await x(l);(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===E.Uv.OPEN_TEXT&&(e.allow_list_id=void 0),[E.Uv.SINGLE_SELECT,E.Uv.OPEN_TEXT].includes(e.field_type)&&(e.field_type=f.AL.STRING),e.field_type===E.Uv.MULTIPLE_SELECT&&(e.field_type=f.AL.STRING_);let s={...e};delete s.allow_list;let a=n?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:"):(l(),d("Custom field successfully saved"))};return(0,i.jsxs)(a.u_l,{id:"custom-field-modal-hello-world",isOpen:t,onClose:l,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:n?"Manage Custom Field":"Add a custom field"}),(0,i.jsx)(a.fef,{px:6,py:0,children:(0,i.jsx)(L.J9,{initialValues:j||U,validationSchema:C,onSubmit:y,enableReinitialize:!0,validateOnChange:!0,children:e=>(0,i.jsx)(A,{isEditing:_,validationSchema:C,isLoading:s,onClose:l,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"]})]})}),X=(0,r.Cl)(),B=e=>{let{...t}=e,l=(0,a.pmc)(),{isLoading:s}=(0,g.GH)(),n=(0,c.C)(g.fN),[h]=(0,g.UF)(),{isOpen:C,onClose:v,onOpen:y}=(0,a.qY0)(),[w,E]=(0,o.useState)(),[S,L]=(0,o.useState)(),I=(0,p.Tg)([f.Sh.CUSTOM_FIELD_UPDATE]),R=(0,p.Tg)([f.Sh.CUSTOM_FIELD_DELETE]),H=e=>{I&&(E(e),y())},N=async e=>{if(R&&e.id){let t=await h({id:e.id});if((0,u.D4)(t)){l((0,m.Vo)((0,u.e$)(t.error)));return}l((0,m.t5)("Custom field deleted"))}},P=(0,o.useMemo)(()=>[X.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})}),X.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}}),X.accessor(e=>e.field_type,{id:"field_type",cell:_,header:e=>(0,i.jsx)(x.Rr,{value:"Field Type",...e})}),X.accessor(e=>e.resource_type,{id:"resource_type",cell:j,header:e=>(0,i.jsx)(x.Rr,{value:"Locations",...e})}),I&&X.accessor(e=>e.active,{id:"enable",cell:b,header:e=>(0,i.jsx)(x.Rr,{value:"Enable",...e}),meta:{disableRowClick:!0}}),(I||R)&&X.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e;return(0,i.jsx)(T,{customField:t.original,onEdit:H,onDelete:N})},meta:{disableRowClick:!0}})].filter(Boolean),[R,I]),M=(0,d.b7)({getCoreRowModel:(0,r.sC)(),getFilteredRowModel:(0,r.vL)(),getSortedRowModel:(0,r.tj)(),onGlobalFilterChange:L,globalFilterFn:"includesString",columns:P,data:n,state:{globalFilter:S},columnResizeMode:"onChange"});return(0,i.jsxs)(a.xuv,{...t,children:[(0,i.jsx)(a.xuv,{maxWidth:600,children:(0,i.jsx)(a.xvT,{mb:10,fontSize:"sm",children:n.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:M,onRowClick:I?H:void 0,emptyTableNotice:(0,i.jsx)(G,{}),enableSorting:!0}),C&&(0,i.jsx)(q,{customField:w,isOpen:C,onClose:()=>{E(void 0),v()},isLoading:!1})]})]})};var Y=()=>(0,i.jsx)(s.Z,{title:"Custom fields",children:(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-management",children:[(0,i.jsx)(n.Z,{heading:"Custom fields"}),(0,i.jsx)(B,{})]})})}},function(e){e.O(0,[8033,6060,4481,7980,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,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/custom-fields",function(){return l(76513)}])},56358:function(e,t,l){"use strict";l.d(t,{q:function(){return s}});var i=l(24246);let s=(0,l(77181).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,t,l){"use strict";l.d(t,{l:function(){return s}});var i=l(24246);let s=(0,l(77181).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,t,l){"use strict";l.d(t,{Z:function(){return p}});var i=l(24246),s=l(77181),a=l(88038),o=l.n(a),n=l(86677);l(27378);var r=l(25980),d=l(90867),c=l(77830),u=()=>{let e=(0,n.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:t,title:l,padded:a=!0,mainProps:c}=e,p=(0,r.hz)(),x=(0,n.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:C}=(0,d.PW)(void 0,{skip:h}),v=p.flags.privacyRequestsConfiguration&&(!f||!C)&&m;return(0,i.jsxs)(s.kCb,{"data-testid":l,direction:"column",h:"100vh",children:[(0,i.jsxs)(o(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",l]}),(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:[v?(0,i.jsx)(u,{}):null,t]})]})}},19904:function(e,t,l){"use strict";l.d(t,{Tg:function(){return o}});var i=l(24246),s=l(16134),a=l(31793);let o=e=>(0,s.C)(a.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:l}=e;return o(t)?(0,i.jsx)(i.Fragment,{children:l}):null}},70416:function(e,t,l){"use strict";l.d(t,{d:function(){return s}});var i=l(24246);let s=(0,l(77181).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"})})},10342:function(e,t,l){"use strict";var i=l(24246),s=l(77181),a=l(91613);t.Z=e=>{let{title:t,tooltip:l,children:o,...n}=e;return(0,i.jsxs)(s.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...n,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:[t,l?(0,i.jsx)(s.xvT,{as:"span",mx:1,children:(0,i.jsx)(a.Z,{label:l})}):void 0]}),(0,i.jsx)(s.Kqy,{p:6,spacing:6,children:o})]})}},76513:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return Y}});var i=l(24246),s=l(77213),a=l(77181),o=l(27378),n=l(58754),r=l(92222),d=l(59003),c=l(16134),u=l(812),p=l(19904),x=l(14481),m=l(46628),h=l(72625),f=l(21702);let C=new Map([["string","Single Select"],["string[]","Multi Select"],["open-text","Open Text"]]),v=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 g=l(32885);let j=e=>{var t;let l=null!==(t=v.get(e.getValue()))&&void 0!==t?t:e.getValue();return(0,i.jsx)(h.G3,{...e,value:l})},_=e=>{let{row:t,getValue:l}=e,s=t.original.allow_list_id?l():"open-text",a=C.get(s)||s;return(0,i.jsx)(h.A4,{value:a})},b=e=>{let{row:t,getValue:l,isDisabled:s}=e,a=!!l(),[o]=(0,g.yM)(),n=async e=>o({...t.original,active:e});return(0,i.jsx)(h.S1,{enabled:a,onToggle:n,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=l(56358),w=l(58452);let T=e=>{let{customField:t,onEdit:l,onDelete:s,...o}=e,n=(0,a.qY0)();return(0,i.jsxs)(a.xuv,{...o,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(),l(t,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(),n.onOpen()}}),(0,i.jsx)(w.Z,{isOpen:n.isOpen,onClose:n.onClose,onConfirm:()=>{s(t),n.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=l(95346),S=l(14047),L=l(34090),I=l(55484);let R={color:"gray.600",fontSize:"14px",fontWeight:"semibold",minWidth:"150px"};var H=e=>{let{customLabelProps:t,disabled:l=!1,displayHelpIcon:s=!0,helpIconVisibility:o=!1,isRequired:n=!1,label:r,type:d="text",placeholder:c,...u}=e,[p,x]=(0,L.U$)(u),{id:m,name:h,autoFocus:f}=u,C="custom-input-".concat(p.name);return(0,i.jsxs)(a.NIc,{display:"flex",isRequired:n,isInvalid:!!(x.error&&x.touched),children:[r&&(0,i.jsx)(a.lXp,{htmlFor:m||h,...t||R,children:r}),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["number"===d&&(0,i.jsxs)(a.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,i.jsx)(a.zuI,{...p,autoComplete:"off",autoFocus:f,"data-testid":C}),(0,i.jsxs)(a.FiK,{children:[(0,i.jsx)(a.WQu,{}),(0,i.jsx)(a.Y_d,{})]})]}),"text"===d&&(0,i.jsx)(a.IIB,{...p,autoComplete:"off",autoFocus:f,color:"gray.700",isDisabled:l,placeholder:c,size:"sm","data-testid":C}),"textarea"===d&&(0,i.jsx)(a.gxH,{...p,autoComplete:"off",autoFocus:f,color:"gray.700",placeholder:c,resize:"none",size:"sm",value:p.value||"","data-testid":C}),(0,i.jsx)(a.J1D,{children:x.error})]}),s&&(0,i.jsx)(a.kCb,{alignContent:"center",h:"32px",visibility:o?"visible":"hidden",children:(0,i.jsx)(a.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})]})},N=l(70416),P=l(10342),M=l(95492),V=l(97181);let k={...R,minWidth:"unset"},A=e=>{let{values:t,validationSchema:l,errors:s,dirty:n,isValid:r,isSubmitting:d,isLoading:c,onClose:u,handleDropdownChange:p,isEditing:x}=e,{validateForm:m}=(0,L.u6)();return(0,o.useEffect)(()=>{m()},[l,m]),(0,i.jsxs)(L.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(P.Z,{title:"Field Information",children:[(0,i.jsx)(H,{displayHelpIcon:!0,isRequired:!0,label:"Name",name:"name",customLabelProps:k}),(0,i.jsx)(H,{displayHelpIcon:!0,label:"Description",name:"description",customLabelProps:k}),(0,i.jsx)(V.d,{label:"Location",name:"resource_type",options:E.C7,labelProps:k,disabled:x})]})}),(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(P.Z,{title:"Configuration",children:[(0,i.jsx)(V.d,{label:"Field Type",name:"field_type",labelProps:k,options:E.Hn,onChange:p}),t.field_type!==E.Uv.OPEN_TEXT?(0,i.jsx)(a.kCb,{flexDirection:"column",gap:"12px",paddingTop:"6px",paddingBottom:"24px",children:(0,i.jsx)(L.F2,{name:"allow_list.allowed_values",render:e=>{let{allowed_values:l}=t.allow_list;return(0,i.jsxs)(a.kCb,{flexDirection:"column",gap:"6",pl:"6",children:[(0,i.jsx)(a.kCb,{flexDirection:"column",children:l.map((t,s)=>(0,i.jsxs)(a.kCb,{flexGrow:1,gap:"3",mt:s>0?3:void 0,children:[(0,i.jsx)(H,{customLabelProps:{color:"gray.600",fontSize:"sm",fontWeight:"500",lineHeight:"20px",minW:"126px",pr:"8px"},displayHelpIcon:!1,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)(M.l,{}),disabled:l.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.d,{h:"7px",w:"7px"}),onClick:()=>{e.push("")},size:"small"}),0===l.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:!n||!r||d,children:"Save"})]})]})},U={description:"",field_type:E.Uv.OPEN_TEXT,name:"",resource_type:f.P6.SYSTEM,allow_list:{name:"",description:"",allowed_values:[]}},z=I.IX(I.Z_().optional().label("allowed_values")),D=I.IX(I.Z_().required("List item is required")).min(1,"Must add at least one list value").label("allowed_values"),Z=I.Ry().shape({name:I.Z_().required("Name is required").trim(),allow_list:I.Ry().shape({allowed_values:z})}),F=I.Ry().shape({name:I.Z_().required("Name is required").trim(),allow_list:I.Ry().shape({allowed_values:D})}),O=(e,t)=>{var l,i,s;let a;if(!e)return;e.field_type!==f.AL.STRING||e.allow_list_id||(a=E.Uv.OPEN_TEXT),e.field_type===f.AL.STRING&&e.allow_list_id&&(a=E.Uv.SINGLE_SELECT),e.field_type===f.AL.STRING_&&e.allow_list_id&&(a=E.Uv.MULTIPLE_SELECT);let o=t?{name:null!==(l=t.name)&&void 0!==l?l:"",description:null!==(i=t.description)&&void 0!==i?i:"",allowed_values:null!==(s=t.allowed_values)&&void 0!==s?s:[]}:U.allow_list;return{...e,field_type:a||E.Uv.OPEN_TEXT,allow_list:o}},q=e=>{let{isOpen:t,onClose:l,isLoading:s,customField:n}=e,{errorAlert:r,successAlert:d}=(0,S.V)(),[c]=(0,g.Ld)(),[p]=(0,g.yM)(),[x]=(0,g.Nt)(),{data:m,isLoading:h}=(0,g.vA)(null==n?void 0:n.allow_list_id,{skip:!(null==n?void 0:n.allow_list_id)}),[C,v]=(0,o.useState)(Z);if(h||!t)return null;let j=O(n,m),_=!!j,b=e=>{e===E.Uv.OPEN_TEXT?v(Z):v(F)},y=async e=>{if([E.Uv.SINGLE_SELECT,E.Uv.MULTIPLE_SELECT].includes(e.field_type)){var t,i;if(new Set(null===(t=e.allow_list)||void 0===t?void 0:t.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:l}=e;e.allow_list_id&&(l.id=e.allow_list_id),l.name||(l.name=Date.now().toString()+Math.random().toString());let s=await x(l);(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===E.Uv.OPEN_TEXT&&(e.allow_list_id=void 0),[E.Uv.SINGLE_SELECT,E.Uv.OPEN_TEXT].includes(e.field_type)&&(e.field_type=f.AL.STRING),e.field_type===E.Uv.MULTIPLE_SELECT&&(e.field_type=f.AL.STRING_);let s={...e};delete s.allow_list;let a=n?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:"):(l(),d("Custom field successfully saved"))};return(0,i.jsxs)(a.u_l,{id:"custom-field-modal-hello-world",isOpen:t,onClose:l,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:n?"Manage Custom Field":"Add a custom field"}),(0,i.jsx)(a.fef,{px:6,py:0,children:(0,i.jsx)(L.J9,{initialValues:j||U,validationSchema:C,onSubmit:y,enableReinitialize:!0,validateOnChange:!0,children:e=>(0,i.jsx)(A,{isEditing:_,validationSchema:C,isLoading:s,onClose:l,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"]})]})}),X=(0,r.Cl)(),B=e=>{let{...t}=e,l=(0,a.pmc)(),{isLoading:s}=(0,g.GH)(),n=(0,c.C)(g.fN),[h]=(0,g.UF)(),{isOpen:C,onClose:v,onOpen:y}=(0,a.qY0)(),[w,E]=(0,o.useState)(),[S,L]=(0,o.useState)(),I=(0,p.Tg)([f.Sh.CUSTOM_FIELD_UPDATE]),R=(0,p.Tg)([f.Sh.CUSTOM_FIELD_DELETE]),H=e=>{I&&(E(e),y())},N=async e=>{if(R&&e.id){let t=await h({id:e.id});if((0,u.D4)(t)){l((0,m.Vo)((0,u.e$)(t.error)));return}l((0,m.t5)("Custom field deleted"))}},P=(0,o.useMemo)(()=>[X.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})}),X.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}}),X.accessor(e=>e.field_type,{id:"field_type",cell:_,header:e=>(0,i.jsx)(x.Rr,{value:"Field Type",...e})}),X.accessor(e=>e.resource_type,{id:"resource_type",cell:j,header:e=>(0,i.jsx)(x.Rr,{value:"Locations",...e})}),I&&X.accessor(e=>e.active,{id:"enable",cell:b,header:e=>(0,i.jsx)(x.Rr,{value:"Enable",...e}),meta:{disableRowClick:!0}}),(I||R)&&X.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e;return(0,i.jsx)(T,{customField:t.original,onEdit:H,onDelete:N})},meta:{disableRowClick:!0}})].filter(Boolean),[R,I]),M=(0,d.b7)({getCoreRowModel:(0,r.sC)(),getFilteredRowModel:(0,r.vL)(),getSortedRowModel:(0,r.tj)(),onGlobalFilterChange:L,globalFilterFn:"includesString",columns:P,data:n,state:{globalFilter:S},columnResizeMode:"onChange"});return(0,i.jsxs)(a.xuv,{...t,children:[(0,i.jsx)(a.xuv,{maxWidth:600,children:(0,i.jsx)(a.xvT,{mb:10,fontSize:"sm",children:n.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:M,onRowClick:I?H:void 0,emptyTableNotice:(0,i.jsx)(G,{}),enableSorting:!0}),C&&(0,i.jsx)(q,{customField:w,isOpen:C,onClose:()=>{E(void 0),v()},isLoading:!1})]})]})};var Y=()=>(0,i.jsx)(s.Z,{title:"Custom fields",children:(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-management",children:[(0,i.jsx)(n.Z,{heading:"Custom fields"}),(0,i.jsx)(B,{})]})})}},function(e){e.O(0,[8033,6060,4481,7980,2888,9774,179],function(){return e(e.s=70378)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9252],{98648:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/domains",function(){return n(76974)}])},59301:function(t,e,n){"use strict";var i=n(24246),r=n(77181);e.Z=t=>(0,i.jsx)(r.rUS,{isExternal:!0,color:"complimentary.500",...t})},77213:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});var i=n(24246),r=n(77181),s=n(88038),o=n.n(s),a=n(86677);n(27378);var c=n(25980),l=n(90867),d=n(77830),u=()=>{let t=(0,a.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{t.push(d.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},g=t=>{let{children:e,title:n,padded:s=!0,mainProps:d}=t,g=(0,c.hz)(),p=(0,a.useRouter)(),f="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,m=!(g.flags.privacyRequestsConfiguration&&f),{data:h}=(0,l.JE)(void 0,{skip:m}),{data:x}=(0,l.PW)(void 0,{skip:m}),v=g.flags.privacyRequestsConfiguration&&(!h||!x)&&f;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(o(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(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",...d,children:[v?(0,i.jsx)(u,{}):null,e]})]})}},58754:function(t,e,n){"use strict";var i=n(24246),r=n(77181),s=n(70788);e.Z=t=>{let{heading:e,breadcrumbItems:n,isSticky:o=!0,children:a,rightContent:c,style:l,...d}=t;return(0,i.jsxs)("div",{...d,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...l}:{paddingBottom:"24px",...l},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof e?(0,i.jsx)(r.X6q,{className:n||a?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:e}):e,c&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:c})]}),!!n&&(0,i.jsx)(s.m,{className:a?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),a]})}},10342:function(t,e,n){"use strict";var i=n(24246),r=n(77181),s=n(91613);e.Z=t=>{let{title:e,tooltip:n,children:o,...a}=t;return(0,i.jsxs)(r.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...a,children:[(0,i.jsxs)(r.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[e,n?(0,i.jsx)(r.xvT,{as:"span",mx:1,children:(0,i.jsx)(s.Z,{label:n})}):void 0]}),(0,i.jsx)(r.Kqy,{p:6,spacing:6,children:o})]})}},812:function(t,e,n){"use strict";n.d(e,{D4:function(){return s.D4},MM:function(){return g},Ot:function(){return l},c6:function(){return r},cj:function(){return f},e$:function(){return a},fn:function(){return c},iC:function(){return p},nU:function(){return u},tB:function(){return d}});var i,r,s=n(19043);let o="An unexpected error occurred. Please try again.",a=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if((0,s.Bw)(t)){if((0,s.hE)(t.data))return t.data.detail;if((0,s.cz)(t.data)){var n;let e=null===(n=t.data.detail)||void 0===n?void 0:n[0];return"".concat(null==e?void 0:e.msg,": ").concat(null==e?void 0:e.loc)}if(409===t.status&&(0,s.Dy)(t.data)||404===t.status&&(0,s.XD)(t.data))return"".concat(t.data.detail.error," (").concat(t.data.detail.fides_key,")")}return e};function c(t){return"object"==typeof t&&null!=t&&"status"in t}function l(t){return"object"==typeof t&&null!=t&&"data"in t&&"string"==typeof t.data.detail}function d(t){return"object"==typeof t&&null!=t&&"data"in t&&Array.isArray(t.data.detail)}let u=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:o};if((0,s.oK)(t))return{status:t.originalStatus,message:t.data};if((0,s.Bw)(t)){let{status:n}=t;return{status:n,message:a(t,e.message)}}return e},g=t=>Object.entries(t).map(t=>({value:t[1],label:t[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},f=t=>{let e=t.split(".")[0];return"gacp"===e?"gacp":"gvl"===e?"gvl":"compass"}},70788:function(t,e,n){"use strict";n.d(e,{m:function(){return l}});var i=n(24246),r=n(77181),s=n(79894),o=n.n(s),a=n(27378);let{Text:c}=r.AntTypography,l=t=>{let{items:e,...n}=t,s=(0,a.useMemo)(()=>null==e?void 0:e.map((t,n)=>{let s=n===e.length-1,a={...t},l=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,i.jsx)(c,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:a.title})),l)?a.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,i.jsx)(o(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[e]);return(0,i.jsx)(r.zrq,{items:s,...n})}},46628:function(t,e,n){"use strict";n.d(e,{MA:function(){return a},Vo:function(){return l},t5:function(){return c}});var i=n(24246),r=n(77181);let s=t=>{let{children:e,title:n="Success"}=t;return(0,i.jsxs)(r.xvT,{"data-testid":"toast-success-msg",children:[(0,i.jsxs)("strong",{children:[n,":"]})," ",e]})},o=t=>{let{children:e}=t;return(0,i.jsxs)(r.xvT,{"data-testid":"toast-error-msg",children:[(0,i.jsx)("strong",{children:"Error:"})," ",e]})},a={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},c=(t,e)=>{let n=(0,i.jsx)(s,{title:e,children:t});return{...a,description:n}},l=t=>{let e=(0,i.jsx)(o,{children:t});return{...a,description:e,status:"error"}}},7426:function(t,e,n){"use strict";n.d(e,{D2:function(){return g},L:function(){return a},U7:function(){return l},Yh:function(){return f},ak:function(){return c},km:function(){return o},tB:function(){return s}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:t=>({getConfigurationSettings:t.query({query:t=>{let{api_set:e}=t;return{url:"/config",method:"GET",params:{api_set:e}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:t.mutation({query:t=>({url:"/config",method:"PUT",body:t}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:t.mutation({query:t=>({url:"/config",method:"PATCH",body:t}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:s,usePutConfigurationSettingsMutation:o,usePatchConfigurationSettingsMutation:a}=r,c=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{var i,r,s;let{data:o}=e,{data:a}=n;return{configSet:{cors_origins:(null==a?void 0:null===(i=a.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==a?void 0:null===(r=a.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==o?void 0:null===(s=o.security)||void 0===s?void 0:s.cors_origins)||[]}}}),l=()=>(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0})],(t,e)=>{let{data:n}=e;return n}),d={enabled:!1,cmp_api_required:!1},u=(t,e,n,i)=>{let r=n&&n[t],s=i&&i[t];return r&&s?{...i[t],...n[t]}:s?i[t]:r?{...n[t]}:e},g=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{let{data:i}=e,{data:r}=n;return u("gpp",d,i,r)}),p={tcf_publisher_country_code:null},f=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{let{data:i}=e,{data:r}=n;return u("plus_consent_settings",p,i,r)})},76974:function(t,e,n){"use strict";n.r(e);var i=n(24246),r=n(77181),s=n(34090),o=n(55484),a=n(16134),c=n(59301),l=n(10342),d=n(40324),u=n(812),g=n(77213),p=n(58754),f=n(46628),m=n(7426);e.default=()=>{var t;let{isLoading:e}=(0,m.tB)({api_set:!0}),{isLoading:n}=(0,m.tB)({api_set:!1}),h=(0,a.C)(m.ak),x=h.apiSet,v=h.configSet,y=!!((null===(t=v.cors_origins)||void 0===t?void 0:t.length)||v.cors_origin_regex),j=(0,a.C)((0,m.U7)()),[b,{isLoading:_}]=(0,m.km)(),C=(0,r.pmc)(),w=t=>{if(!t||!(t.startsWith("https://")||t.startsWith("http://")))return!1;try{new URL(t)}catch(t){return!1}return!0},k=t=>!!t&&!t.includes("*"),S=t=>{if(!t)return!1;try{let e=new URL(t);return"/"===e.pathname&&!t.endsWith("/")}catch(t){return!1}},N=o.Ry().shape({cors_origins:o.IX().nullable().of(o.Z_().required().trim().test("is-valid-url",t=>{let{label:e}=t;return"".concat(e," must be a valid URL (e.g. https://example.com)")},t=>w(t)).test("has-no-wildcard",t=>{let{label:e}=t;return"".concat(e," cannot contain a wildcard (e.g. https://*.example.com)")},t=>k(t)).test("has-no-path",t=>{let{label:e}=t;return"".concat(e," cannot contain a path (e.g. https://example.com/path)")},t=>S(t)).label("Domain"))}),A=async(t,e)=>{let n=t.cors_origins&&t.cors_origins.length>0?t.cors_origins:void 0,i={...j,security:{cors_origins:n}};(n=>{if(C.closeAll(),(0,u.D4)(n)){let t=(0,u.e$)(n.error,"An unexpected error occurred while saving domains. Please try again.");C((0,f.Vo)(t))}else C((0,f.t5)("Domains saved successfully")),e.resetForm({values:t})})(await b(i))};return(0,i.jsx)(g.Z,{title:"Domains",children:(0,i.jsxs)(r.xuv,{"data-testid":"management-domains",children:[(0,i.jsx)(p.Z,{heading:"Domains"}),(0,i.jsxs)(r.xuv,{maxW:"600px",children:[(0,i.jsxs)(r.xvT,{fontSize:"sm",pb:6,children:["For Fides to work on your website(s), each of your domains must be listed below. You can add and remove domains at any time up to the quantity included in your license. For more information on managing domains"," ",(0,i.jsx)(c.Z,{href:"https://fid.es/domain-configuration",children:"read here"}),"."]}),(0,i.jsx)(l.Z,{"data-testid":"api-set-domains-form",title:"Organization domains",tooltip:"Fides uses these domains to enforce cross-origin resource sharing (CORS), a browser-based security standard. Each domain must be a valid URL (e.g. https://example.com) without any wildcards '*' or paths '/blog'",children:e||_?(0,i.jsx)(r.kCb,{justifyContent:"center",children:(0,i.jsx)(r.$jN,{})}):(0,i.jsx)(s.J9,{initialValues:x,enableReinitialize:!0,onSubmit:A,validationSchema:N,validateOnChange:!0,children:t=>{let{dirty:e,values:n,isValid:o}=t;return(0,i.jsxs)(s.l0,{children:[(0,i.jsx)(s.F2,{name:"cors_origins",render:t=>(0,i.jsxs)(r.kCb,{flexDir:"column",children:[n.cors_origins.map((e,n)=>(0,i.jsxs)(r.kCb,{flexDir:"row",my:3,children:[(0,i.jsx)(d.j0,{variant:"stacked",name:"cors_origins[".concat(n,"]"),placeholder:"https://subdomain.example.com:9090"}),(0,i.jsx)(r.wpx,{"aria-label":"delete-domain",className:"z-[2] ml-4",icon:(0,i.jsx)(r.pJl,{}),onClick:()=>{t.remove(n)}})]},n)),(0,i.jsx)(r.kCb,{justifyContent:"center",mt:3,children:(0,i.jsx)(r.wpx,{"aria-label":"add-domain",className:"w-full",onClick:()=>{t.push("")},children:"Add domain"})})]})}),(0,i.jsx)(r.xuv,{mt:6,children:(0,i.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:_||!e||!o,loading:_,"data-testid":"save-btn",children:"Save"})})]})}})})]}),(0,i.jsx)(r.xuv,{maxW:"600px",marginY:3,children:(0,i.jsx)(l.Z,{"data-testid":"config-set-domains-form",title:"Advanced settings",tooltip:"These domains are configured by an administrator with access to Fides security settings and can support more advanced options such as wildcards and regex.",children:n?(0,i.jsx)(r.kCb,{justifyContent:"center",children:(0,i.jsx)(r.$jN,{})}):(0,i.jsxs)(r.kCb,{flexDir:"column",children:[v.cors_origins.map((t,e)=>(0,i.jsx)(d.oi,{"data-testid":"input-config_cors_origins[".concat(e,"]"),marginY:3,value:t,isDisabled:!0,isPassword:!1},e)),v.cors_origin_regex?(0,i.jsx)(d.oi,{"data-testid":"input-config_cors_origin_regex",marginY:3,value:v.cors_origin_regex,isDisabled:!0,isPassword:!1},"cors_origin_regex"):void 0,y?void 0:(0,i.jsx)(r.xvT,{fontSize:"xs",color:"gray.500",children:"No advanced domain settings configured."})]})})})]})})}},19043:function(t,e,n){"use strict";n.d(e,{Bw:function(){return o},D4:function(){return r},Dy:function(){return c},XD:function(){return l},cz:function(){return d},hE:function(){return a},oK:function(){return s}});var i=n(76649);let r=t=>"error"in t,s=t=>(0,i.Ln)({status:"string"},t)&&"PARSING_ERROR"===t.status,o=t=>(0,i.Ln)({status:"number",data:{}},t),a=t=>(0,i.Ln)({detail:"string"},t),c=t=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},t),l=t=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},t),d=t=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},t)},76649:function(t,e,n){"use strict";n.d(e,{Ln:function(){return i}});let i=(t,e)=>s(t,e),r=Symbol("SOME"),s=(t,e)=>"string"==typeof t?t===typeof e:Array.isArray(t)?r in t?t.some(t=>s(t,e)):!!Array.isArray(e)&&(0===t.length||e.every(e=>t.some(t=>s(t,e)))):"object"==typeof e&&null!==e&&Object.entries(t).every(([t,n])=>s(n,e[t]));class o{static narrow(t){return new o(e=>i(t,e))}constructor(t){this.NF=void 0,this.NF=t}satisfied(t){return this.NF(t)}build(t){return t}and(t){let e=this.NF,n=t instanceof o?t.NF:t instanceof Function?t:e=>i(t,e);return new o(t=>e(t)&&n(t))}}new o(t=>!0)}},function(t){t.O(0,[2888,9774,179],function(){return t(t.s=98648)}),_N_E=t.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2828],{85082:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/organization",function(){return i(5417)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var n=i(24246),r=i(77181),a=i(88038),s=i.n(a),o=i(86677);i(27378);var l=i(25980),d=i(90867),c=i(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:t,title:i,padded:a=!0,mainProps:c}=e,p=(0,l.hz)(),x=(0,o.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,f=!(p.flags.privacyRequestsConfiguration&&m),{data:h}=(0,d.JE)(void 0,{skip:f}),{data:v}=(0,d.PW)(void 0,{skip:f}),g=p.flags.privacyRequestsConfiguration&&(!h||!v)&&m;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(s(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.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:[g?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),r=i(77181),a=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:s=!0,children:o,rightContent:l,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:s?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(r.X6q,{className:i||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!i&&(0,n.jsx)(a.m,{className:o?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,t,i){"use strict";i.d(t,{Tg:function(){return s}});var n=i(24246),r=i(16134),a=i(31793);let s=e=>(0,r.C)(a.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:i}=e;return s(t)?(0,n.jsx)(n.Fragment,{children:i}):null}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return d}});var n=i(24246),r=i(77181),a=i(34090),s=i(27378),o=i(91613),l=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",...x}=e,[m,f,{setValue:h}]=(0,a.U$)(t),v=!!(f.touched&&f.error),[g,j]=(0,s.useState)("");m.value||"tags"!==x.mode&&"multiple"!==x.mode||(m.value=[]),"tags"===x.mode&&"string"==typeof m.value&&(m.value=[m.value]);let y="tags"===x.mode?(e,t)=>e?e.value!==g||m.value.includes(g)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:x.optionRender||void 0,b=e=>{j(e),x.onSearch&&x.onSearch(e)},k=(e,t)=>{h(e),x.onChange&&x.onChange(e,t)};return"inline"===p?(0,n.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(r.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,n.jsx)(l.__,{htmlFor:x.id||t,...d,children:i}):null,(0,n.jsxs)(r.jqI,{align:"center",children:[(0,n.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(r.WPr,{...m,id:x.id||t,"data-testid":"controlled-select-".concat(m.name),...x,optionRender:y,onSearch:"tags"===x.mode?b:void 0,onChange:k,value:m.value||void 0,status:v?"error":void 0}),(0,n.jsx)(l.Bc,{isInvalid:v,message:f.error,fieldName:m.name})]}),c?(0,n.jsx)(o.Z,{label:c}):null]})]})}):(0,n.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(r.gCW,{alignItems:"start",children:[(0,n.jsxs)(r.jqI,{align:"center",children:[i?(0,n.jsx)(l.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,c?(0,n.jsx)(o.Z,{label:c}):null]}),(0,n.jsx)(r.WPr,{...m,id:x.id||t,"data-testid":"controlled-select-".concat(m.name),...x,optionRender:y,onSearch:"tags"===x.mode?b:void 0,onChange:k,value:m.value||void 0,status:v?"error":void 0}),(0,n.jsx)(l.Bc,{isInvalid:v,message:f.error,fieldName:m.name})]})})}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return a.D4},MM:function(){return p},Ot:function(){return d},c6:function(){return r},cj:function(){return m},e$:function(){return o},fn:function(){return l},iC:function(){return x},nU:function(){return u},tB:function(){return c}});var n,r,a=i(19043);let s="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if((0,a.Bw)(e)){if((0,a.hE)(e.data))return e.data.detail;if((0,a.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,a.Dy)(e.data)||404===e.status&&(0,a.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function l(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:s};if((0,a.oK)(e))return{status:e.originalStatus,message:e.data};if((0,a.Bw)(e)){let{status:i}=e;return{status:i,message:o(e,t.message)}}return t},p=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=r||(r={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let x={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},m=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},8133:function(e,t,i){"use strict";var n=i(24246),r=i(77181);t.Z=e=>{let{title:t,children:i,isOpen:a,onClose:s,...o}=e;return(0,n.jsxs)(r.u_l,{isOpen:a,onClose:s,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...o,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,n.jsx)(r.xBx,{p:0,children:(0,n.jsx)(r.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,n.jsx)(r.X6q,{as:"h3",size:"sm",children:t})})}),(0,n.jsx)(r.fef,{pb:4,overflow:"auto",children:i})]})]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var n=i(24246),r=i(77181),a=i(79894),s=i.n(a),o=i(27378);let{Text:l}=r.AntTypography,d=e=>{let{items:t,...i}=e,a=(0,o.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let a=i===t.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,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)(s(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,n.jsx)(r.zrq,{items:a,...i})}},46628:function(e,t,i){"use strict";i.d(t,{MA:function(){return o},Vo:function(){return d},t5:function(){return l}});var n=i(24246),r=i(77181);let a=e=>{let{children:t,title:i="Success"}=e;return(0,n.jsxs)(r.xvT,{"data-testid":"toast-success-msg",children:[(0,n.jsxs)("strong",{children:[i,":"]})," ",t]})},s=e=>{let{children:t}=e;return(0,n.jsxs)(r.xvT,{"data-testid":"toast-error-msg",children:[(0,n.jsx)("strong",{children:"Error:"})," ",t]})},o={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},l=(e,t)=>{let i=(0,n.jsx)(a,{title:t,children:e});return{...o,description:i}},d=e=>{let t=(0,n.jsx)(s,{children:e});return{...o,description:t,status:"error"}}},5417:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return I}});var n=i(24246),r=i(19904),a=i(77181),s=i(25980),o=i(77213),l=i(58754),d=i(8133),c=i(34090),u=i(27378),p=i(55484),x=i(40324),m=i(812),f=i(46628),h=i(76174),v=i(97181);let g={identifier:"",name:"",client_id:"",client_secret:""},j=e=>({...e}),y=p.Ry().shape({provider:p.Z_().required().label("Provider"),name:p.Z_().required().label("Name"),client_id:p.Z_().required().label("Client ID"),client_secret:p.Z_().required().label("Client Secret")});var b=e=>{let{openIDProvider:t,onSuccess:i,onClose:r}=e,[s]=(0,h.Qc)(),[o]=(0,h.oP)(),l=(0,u.useMemo)(()=>t?j(t):g,[t]),d=(0,a.pmc)(),p=async(e,t)=>{(e=>{if((0,m.D4)(e)){let t=(0,m.e$)(e.error,"An unexpected error occurred while editing the SSO provider. Please try again.");d((0,f.Vo)(t))}else d((0,f.t5)("SSO provider configuration saved.")),r(),t.resetForm({}),i&&i(e.data)})(l.id?await o(e):await s(e))},b=[{label:"Azure",value:"azure"},{label:"Google",value:"google"},{label:"Okta",value:"okta"},{label:"Custom",value:"custom"}],k=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0})]}),C=()=>(0,n.jsx)(x.j0,{id:"domain",name:"domain",label:"Domain",tooltip:"Domain for your Okta provider",variant:"stacked",isRequired:!0}),_=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"userinfo_url",name:"user_info_url",label:"User Info URL",tooltip:"User Info URL for your provider",variant:"stacked",isRequired:!0})]});return(0,n.jsx)(c.J9,{initialValues:l,enableReinitialize:!0,onSubmit:p,validationSchema:y,children:e=>{let{dirty:t,isValid:i,values:s}=e;return(0,n.jsx)(c.l0,{"data-testid":"openIDProvider-form",children:(0,n.jsxs)(a.Kqy,{spacing:4,children:[(0,n.jsx)(v.d,{name:"provider",label:"Provider",options:b,layout:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"identifier",name:"identifier",label:"Identifier",tooltip:"Unique identifier for your provider",variant:"stacked",isRequired:!0,disabled:!!l.id}),(0,n.jsx)(x.j0,{id:"name",name:"name",label:"Name",tooltip:"Display name for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"client_id",name:"client_id",label:"Client ID",type:"password",tooltip:"Client ID for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"client_secret",name:"client_secret",label:"Client secret",type:"password",tooltip:"Client secret for your provider",variant:"stacked",isRequired:!0}),"azure"===s.provider&&k(),"okta"===s.provider&&C(),"custom"===s.provider&&_(),(0,n.jsxs)(a.xuv,{textAlign:"right",children:[(0,n.jsx)(a.wpx,{htmlType:"button","data-testid":"cancel-btn",className:"mr-3",onClick:r,children:"Cancel"}),(0,n.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!t||!i,"data-testid":"save-btn",children:"Save"})]})]})})}})},k=e=>{let{isOpen:t,onClose:i}=e;return(0,n.jsx)(d.Z,{isOpen:t,onClose:i,title:"Add SSO Provider",children:(0,n.jsx)(b,{onClose:i})})},C=e=>{let{isOpen:t,onClose:i,openIDProvider:r}=e;return(0,n.jsx)(d.Z,{isOpen:t,onClose:i,title:"Edit SSO Provider",children:(0,n.jsx)(b,{openIDProvider:r,onClose:i})})},_=e=>{let{openIDProvider:t}=e,{onOpen:i,isOpen:r,onClose:s}=(0,a.qY0)(),{onOpen:o,isOpen:l,onClose:d}=(0,a.qY0)(),c=(0,a.pmc)(),[u]=(0,h.rB)(),p=async()=>{let e=await u(t.identifier);if((0,m.D4)(e)){c((0,f.Vo)((0,m.e$)(e.error))),d();return}c((0,f.t5)("SSO provider deleted successfully")),d()};return(0,n.jsxs)(a.xuv,{alignItems:"center",borderRadius:"lg",borderWidth:"1px",display:"flex",height:"74px",marginBottom:"24px",padding:2,children:[(0,n.jsxs)(a.xuv,{display:"flex",alignItems:"center",children:[(0,n.jsx)(a.Eep,{src:"/images/oauth-login/".concat(t.provider,".svg"),alt:"".concat(t.provider," icon"),width:"40px",height:"40px"}),(0,n.jsxs)(a.xuv,{display:"flex",flexDirection:"column",children:[(0,n.jsx)(a.xvT,{fontSize:"medium",fontWeight:"bold",marginLeft:"16px",children:t.name}),(0,n.jsx)(a.xvT,{fontSize:"medium",marginLeft:"16px",children:t.identifier})]})]}),(0,n.jsxs)(a.xuv,{flexGrow:1,display:"flex",justifyContent:"flex-end",children:[(0,n.jsx)(a.wpx,{className:"mr-3",onClick:o,"data-testid":"remove-sso-provider-btn",children:"Remove"}),(0,n.jsx)(a.wpx,{className:"mr-3",onClick:i,"data-testid":"edit-sso-provider-btn",children:"Edit"})]}),(0,n.jsx)(C,{isOpen:r,onClose:s,openIDProvider:t}),(0,n.jsx)(a.cVQ,{isOpen:l,onClose:d,onConfirm:p,title:"Remove SSO provider",message:(0,n.jsx)(a.xvT,{children:"You are about to permanently remove this SSO provider. Are you sure you would like to continue?"})})]})},R=()=>{let{onOpen:e,isOpen:t,onClose:i}=(0,a.qY0)(),{data:r}=(0,h.qv)();return(0,n.jsxs)(a.xuv,{maxWidth:"600px",marginTop:"40px",children:[(0,n.jsxs)(a.X6q,{marginBottom:4,fontSize:"lg",display:"flex",justifyContent:"space-between",children:["SSO Providers",r&&r.length<5&&(0,n.jsx)(a.wpx,{onClick:e,"data-testid":"add-sso-provider-btn",children:"Add SSO Provider"})]}),(0,n.jsx)(a.xvT,{marginBottom:"30px",fontSize:"sm",children:"Use this area to add and manage SSO providers for you organization. Select “Add SSO provider” to add a new provider."}),null==r?void 0:r.map(e=>(0,n.jsx)(_,{openIDProvider:e},e.identifier)),(0,n.jsx)(k,{isOpen:t,onClose:i})]})},S=i(83265);let w={description:"",fides_key:S.Av,name:""},z=e=>({...e}),q=e=>({description:e.description,fides_key:e.fides_key,name:e.name}),O=p.Ry().shape({description:p.Z_().required().label("Description"),fides_key:p.Z_().required().label("Organization Fides Key"),name:p.Z_().required().label("Name")}),A=e=>{let{organization:t,onSuccess:i}=e,[r,s]=(0,S.$f)(),o=(0,u.useMemo)(()=>t?z(t):w,[t]),l=(0,a.pmc)(),d=async(e,t)=>{let n=q(e);(r=>{if((0,m.D4)(r)){let e=(0,m.e$)(r.error,"An unexpected error occurred while editing the organization. Please try again.");l((0,f.Vo)(e))}else l((0,f.t5)("Organization configuration saved.")),t.resetForm({values:e}),i&&i(n)})(await r(n))},p=!t||s.isLoading;return(0,n.jsx)(c.J9,{initialValues:o,enableReinitialize:!0,onSubmit:d,validationSchema:O,children:e=>{let{dirty:t,isValid:i}=e;return(0,n.jsx)(c.l0,{"data-testid":"organization-form",children:(0,n.jsxs)(a.Kqy,{spacing:4,children:[(0,n.jsx)(x.j0,{id:"fides_key",name:"fides_key",label:"Fides Key",disabled:!0,tooltip:"A unique key that identifies your organization. Not editable via UI.",variant:"stacked"}),(0,n.jsx)(x.j0,{id:"name",name:"name",label:"Name",disabled:p,tooltip:"User-friendly name for your organization, used in messaging to end-users and other public locations.",variant:"stacked"}),(0,n.jsx)(x.j0,{id:"description",name:"description",label:"Description",disabled:p,tooltip:"Short description of your organization, your services, etc.",variant:"stacked"}),(0,n.jsx)(a.xuv,{textAlign:"right",children:(0,n.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:p||!t||!i,loading:p,"data-testid":"save-btn",children:"Save"})})]})})}})};var N=i(28120),I=()=>{let{data:e}=(0,S.GQ)(S.Av),{plus:t,flags:{ssoAuthentication:i}}=(0,s.hz)();return(0,n.jsx)(o.Z,{title:"Organization",children:(0,n.jsxs)(a.xuv,{"data-testid":"organization-management",children:[(0,n.jsx)(l.Z,{heading:"Organization Management"}),(0,n.jsxs)(a.xuv,{maxWidth:"600px",children:[(0,n.jsx)(a.xvT,{pb:6,fontSize:"sm",children:"Please use this section to manage your organization‘s details, including key information that will be recorded in the RoPA (Record of Processing Activities)."}),(0,n.jsx)(a.xuv,{background:"gray.50",padding:2,children:(0,n.jsx)(A,{organization:e})}),i&&t&&(0,n.jsx)(r.ZP,{scopes:[N.Sh.OPENID_PROVIDER_CREATE],children:(0,n.jsx)(R,{})})]})]})})}},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return s},D4:function(){return r},Dy:function(){return l},XD:function(){return d},cz:function(){return c},hE:function(){return o},oK:function(){return a}});var n=i(76649);let r=e=>"error"in e,a=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,s=e=>(0,n.Ln)({status:"number",data:{}},e),o=e=>(0,n.Ln)({detail:"string"},e),l=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>a(e,t),r=Symbol("SOME"),a=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>a(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>a(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>a(i,t[e]));class s{static narrow(e){return new s(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof s?e.NF:e instanceof Function?e:t=>n(e,t);return new s(e=>t(e)&&i(e))}}new s(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=85082)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2828],{85082:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/organization",function(){return i(5417)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var n=i(24246),r=i(77181),a=i(88038),s=i.n(a),o=i(86677);i(27378);var l=i(25980),d=i(90867),c=i(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:t,title:i,padded:a=!0,mainProps:c}=e,p=(0,l.hz)(),x=(0,o.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,f=!(p.flags.privacyRequestsConfiguration&&m),{data:h}=(0,d.JE)(void 0,{skip:f}),{data:v}=(0,d.PW)(void 0,{skip:f}),g=p.flags.privacyRequestsConfiguration&&(!h||!v)&&m;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(s(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.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:[g?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),r=i(77181),a=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:s=!0,children:o,rightContent:l,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:s?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(r.X6q,{className:i||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!i&&(0,n.jsx)(a.m,{className:o?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,t,i){"use strict";i.d(t,{Tg:function(){return s}});var n=i(24246),r=i(16134),a=i(31793);let s=e=>(0,r.C)(a.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:i}=e;return s(t)?(0,n.jsx)(n.Fragment,{children:i}):null}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return d}});var n=i(24246),r=i(77181),a=i(34090),s=i(27378),o=i(91613),l=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",...x}=e,[m,f,{setValue:h}]=(0,a.U$)(t),v=!!(f.touched&&f.error),[g,j]=(0,s.useState)("");m.value||"tags"!==x.mode&&"multiple"!==x.mode||(m.value=[]),"tags"===x.mode&&"string"==typeof m.value&&(m.value=[m.value]);let y="tags"===x.mode?(e,t)=>e?e.value!==g||m.value.includes(g)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:x.optionRender||void 0,b=e=>{j(e),x.onSearch&&x.onSearch(e)},k=(e,t)=>{h(e),x.onChange&&x.onChange(e,t)};return"inline"===p?(0,n.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(r.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,n.jsx)(l.__,{htmlFor:x.id||t,...d,children:i}):null,(0,n.jsxs)(r.jqI,{align:"center",children:[(0,n.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(r.WPr,{...m,id:x.id||t,"data-testid":"controlled-select-".concat(m.name),...x,optionRender:y,onSearch:"tags"===x.mode?b:void 0,onChange:k,value:m.value||void 0,status:v?"error":void 0}),(0,n.jsx)(l.Bc,{isInvalid:v,message:f.error,fieldName:m.name})]}),c?(0,n.jsx)(o.Z,{label:c}):null]})]})}):(0,n.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(r.gCW,{alignItems:"start",children:[(0,n.jsxs)(r.jqI,{align:"center",children:[i?(0,n.jsx)(l.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,c?(0,n.jsx)(o.Z,{label:c}):null]}),(0,n.jsx)(r.WPr,{...m,id:x.id||t,"data-testid":"controlled-select-".concat(m.name),...x,optionRender:y,onSearch:"tags"===x.mode?b:void 0,onChange:k,value:m.value||void 0,status:v?"error":void 0}),(0,n.jsx)(l.Bc,{isInvalid:v,message:f.error,fieldName:m.name})]})})}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return a.D4},MM:function(){return p},Ot:function(){return d},c6:function(){return r},cj:function(){return m},e$:function(){return o},fn:function(){return l},iC:function(){return x},nU:function(){return u},tB:function(){return c}});var n,r,a=i(19043);let s="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if((0,a.Bw)(e)){if((0,a.hE)(e.data))return e.data.detail;if((0,a.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,a.Dy)(e.data)||404===e.status&&(0,a.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function l(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:s};if((0,a.oK)(e))return{status:e.originalStatus,message:e.data};if((0,a.Bw)(e)){let{status:i}=e;return{status:i,message:o(e,t.message)}}return t},p=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=r||(r={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let x={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},m=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},8133:function(e,t,i){"use strict";var n=i(24246),r=i(77181);t.Z=e=>{let{title:t,children:i,isOpen:a,onClose:s,...o}=e;return(0,n.jsxs)(r.u_l,{isOpen:a,onClose:s,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...o,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,n.jsx)(r.xBx,{p:0,children:(0,n.jsx)(r.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,n.jsx)(r.X6q,{as:"h3",size:"sm",children:t})})}),(0,n.jsx)(r.fef,{pb:4,overflow:"auto",children:i})]})]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var n=i(24246),r=i(77181),a=i(79894),s=i.n(a),o=i(27378);let{Text:l}=r.AntTypography,d=e=>{let{items:t,...i}=e,a=(0,o.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let a=i===t.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,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)(s(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,n.jsx)(r.zrq,{items:a,...i})}},46628:function(e,t,i){"use strict";i.d(t,{MA:function(){return o},Vo:function(){return d},t5:function(){return l}});var n=i(24246),r=i(77181);let a=e=>{let{children:t,title:i="Success"}=e;return(0,n.jsxs)(r.xvT,{"data-testid":"toast-success-msg",children:[(0,n.jsxs)("strong",{children:[i,":"]})," ",t]})},s=e=>{let{children:t}=e;return(0,n.jsxs)(r.xvT,{"data-testid":"toast-error-msg",children:[(0,n.jsx)("strong",{children:"Error:"})," ",t]})},o={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},l=(e,t)=>{let i=(0,n.jsx)(a,{title:t,children:e});return{...o,description:i}},d=e=>{let t=(0,n.jsx)(s,{children:e});return{...o,description:t,status:"error"}}},5417:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return I}});var n=i(24246),r=i(19904),a=i(77181),s=i(25980),o=i(77213),l=i(58754),d=i(8133),c=i(34090),u=i(27378),p=i(55484),x=i(40324),m=i(812),f=i(46628),h=i(76174),v=i(97181);let g={identifier:"",name:"",client_id:"",client_secret:""},j=e=>({...e}),y=p.Ry().shape({provider:p.Z_().required().label("Provider"),name:p.Z_().required().label("Name"),client_id:p.Z_().required().label("Client ID"),client_secret:p.Z_().required().label("Client Secret")});var b=e=>{let{openIDProvider:t,onSuccess:i,onClose:r}=e,[s]=(0,h.Qc)(),[o]=(0,h.oP)(),l=(0,u.useMemo)(()=>t?j(t):g,[t]),d=(0,a.pmc)(),p=async(e,t)=>{(e=>{if((0,m.D4)(e)){let t=(0,m.e$)(e.error,"An unexpected error occurred while editing the SSO provider. Please try again.");d((0,f.Vo)(t))}else d((0,f.t5)("SSO provider configuration saved.")),r(),t.resetForm({}),i&&i(e.data)})(l.id?await o(e):await s(e))},b=[{label:"Azure",value:"azure"},{label:"Google",value:"google"},{label:"Okta",value:"okta"},{label:"Custom",value:"custom"}],k=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0})]}),C=()=>(0,n.jsx)(x.j0,{id:"domain",name:"domain",label:"Domain",tooltip:"Domain for your Okta provider",variant:"stacked",isRequired:!0}),_=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"userinfo_url",name:"user_info_url",label:"User Info URL",tooltip:"User Info URL for your provider",variant:"stacked",isRequired:!0})]});return(0,n.jsx)(c.J9,{initialValues:l,enableReinitialize:!0,onSubmit:p,validationSchema:y,children:e=>{let{dirty:t,isValid:i,values:s}=e;return(0,n.jsx)(c.l0,{"data-testid":"openIDProvider-form",children:(0,n.jsxs)(a.Kqy,{spacing:4,children:[(0,n.jsx)(v.d,{name:"provider",label:"Provider",options:b,layout:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"identifier",name:"identifier",label:"Identifier",tooltip:"Unique identifier for your provider",variant:"stacked",isRequired:!0,disabled:!!l.id}),(0,n.jsx)(x.j0,{id:"name",name:"name",label:"Name",tooltip:"Display name for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"client_id",name:"client_id",label:"Client ID",type:"password",tooltip:"Client ID for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(x.j0,{id:"client_secret",name:"client_secret",label:"Client secret",type:"password",tooltip:"Client secret for your provider",variant:"stacked",isRequired:!0}),"azure"===s.provider&&k(),"okta"===s.provider&&C(),"custom"===s.provider&&_(),(0,n.jsxs)(a.xuv,{textAlign:"right",children:[(0,n.jsx)(a.wpx,{htmlType:"button","data-testid":"cancel-btn",className:"mr-3",onClick:r,children:"Cancel"}),(0,n.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!t||!i,"data-testid":"save-btn",children:"Save"})]})]})})}})},k=e=>{let{isOpen:t,onClose:i}=e;return(0,n.jsx)(d.Z,{isOpen:t,onClose:i,title:"Add SSO Provider",children:(0,n.jsx)(b,{onClose:i})})},C=e=>{let{isOpen:t,onClose:i,openIDProvider:r}=e;return(0,n.jsx)(d.Z,{isOpen:t,onClose:i,title:"Edit SSO Provider",children:(0,n.jsx)(b,{openIDProvider:r,onClose:i})})},_=e=>{let{openIDProvider:t}=e,{onOpen:i,isOpen:r,onClose:s}=(0,a.qY0)(),{onOpen:o,isOpen:l,onClose:d}=(0,a.qY0)(),c=(0,a.pmc)(),[u]=(0,h.rB)(),p=async()=>{let e=await u(t.identifier);if((0,m.D4)(e)){c((0,f.Vo)((0,m.e$)(e.error))),d();return}c((0,f.t5)("SSO provider deleted successfully")),d()};return(0,n.jsxs)(a.xuv,{alignItems:"center",borderRadius:"lg",borderWidth:"1px",display:"flex",height:"74px",marginBottom:"24px",padding:2,children:[(0,n.jsxs)(a.xuv,{display:"flex",alignItems:"center",children:[(0,n.jsx)(a.Eep,{src:"/images/oauth-login/".concat(t.provider,".svg"),alt:"".concat(t.provider," icon"),width:"40px",height:"40px"}),(0,n.jsxs)(a.xuv,{display:"flex",flexDirection:"column",children:[(0,n.jsx)(a.xvT,{fontSize:"medium",fontWeight:"bold",marginLeft:"16px",children:t.name}),(0,n.jsx)(a.xvT,{fontSize:"medium",marginLeft:"16px",children:t.identifier})]})]}),(0,n.jsxs)(a.xuv,{flexGrow:1,display:"flex",justifyContent:"flex-end",children:[(0,n.jsx)(a.wpx,{className:"mr-3",onClick:o,"data-testid":"remove-sso-provider-btn",children:"Remove"}),(0,n.jsx)(a.wpx,{className:"mr-3",onClick:i,"data-testid":"edit-sso-provider-btn",children:"Edit"})]}),(0,n.jsx)(C,{isOpen:r,onClose:s,openIDProvider:t}),(0,n.jsx)(a.cVQ,{isOpen:l,onClose:d,onConfirm:p,title:"Remove SSO provider",message:(0,n.jsx)(a.xvT,{children:"You are about to permanently remove this SSO provider. Are you sure you would like to continue?"})})]})},R=()=>{let{onOpen:e,isOpen:t,onClose:i}=(0,a.qY0)(),{data:r}=(0,h.qv)();return(0,n.jsxs)(a.xuv,{maxWidth:"600px",marginTop:"40px",children:[(0,n.jsxs)(a.X6q,{marginBottom:4,fontSize:"lg",display:"flex",justifyContent:"space-between",children:["SSO Providers",r&&r.length<5&&(0,n.jsx)(a.wpx,{onClick:e,"data-testid":"add-sso-provider-btn",children:"Add SSO Provider"})]}),(0,n.jsx)(a.xvT,{marginBottom:"30px",fontSize:"sm",children:"Use this area to add and manage SSO providers for you organization. Select “Add SSO provider” to add a new provider."}),null==r?void 0:r.map(e=>(0,n.jsx)(_,{openIDProvider:e},e.identifier)),(0,n.jsx)(k,{isOpen:t,onClose:i})]})},S=i(83265);let w={description:"",fides_key:S.Av,name:""},z=e=>({...e}),q=e=>({description:e.description,fides_key:e.fides_key,name:e.name}),O=p.Ry().shape({description:p.Z_().required().label("Description"),fides_key:p.Z_().required().label("Organization Fides Key"),name:p.Z_().required().label("Name")}),A=e=>{let{organization:t,onSuccess:i}=e,[r,s]=(0,S.$f)(),o=(0,u.useMemo)(()=>t?z(t):w,[t]),l=(0,a.pmc)(),d=async(e,t)=>{let n=q(e);(r=>{if((0,m.D4)(r)){let e=(0,m.e$)(r.error,"An unexpected error occurred while editing the organization. Please try again.");l((0,f.Vo)(e))}else l((0,f.t5)("Organization configuration saved.")),t.resetForm({values:e}),i&&i(n)})(await r(n))},p=!t||s.isLoading;return(0,n.jsx)(c.J9,{initialValues:o,enableReinitialize:!0,onSubmit:d,validationSchema:O,children:e=>{let{dirty:t,isValid:i}=e;return(0,n.jsx)(c.l0,{"data-testid":"organization-form",children:(0,n.jsxs)(a.Kqy,{spacing:4,children:[(0,n.jsx)(x.j0,{id:"fides_key",name:"fides_key",label:"Fides Key",disabled:!0,tooltip:"A unique key that identifies your organization. Not editable via UI.",variant:"stacked"}),(0,n.jsx)(x.j0,{id:"name",name:"name",label:"Name",disabled:p,tooltip:"User-friendly name for your organization, used in messaging to end-users and other public locations.",variant:"stacked"}),(0,n.jsx)(x.j0,{id:"description",name:"description",label:"Description",disabled:p,tooltip:"Short description of your organization, your services, etc.",variant:"stacked"}),(0,n.jsx)(a.xuv,{textAlign:"right",children:(0,n.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:p||!t||!i,loading:p,"data-testid":"save-btn",children:"Save"})})]})})}})};var N=i(21702),I=()=>{let{data:e}=(0,S.GQ)(S.Av),{plus:t,flags:{ssoAuthentication:i}}=(0,s.hz)();return(0,n.jsx)(o.Z,{title:"Organization",children:(0,n.jsxs)(a.xuv,{"data-testid":"organization-management",children:[(0,n.jsx)(l.Z,{heading:"Organization Management"}),(0,n.jsxs)(a.xuv,{maxWidth:"600px",children:[(0,n.jsx)(a.xvT,{pb:6,fontSize:"sm",children:"Please use this section to manage your organization‘s details, including key information that will be recorded in the RoPA (Record of Processing Activities)."}),(0,n.jsx)(a.xuv,{background:"gray.50",padding:2,children:(0,n.jsx)(A,{organization:e})}),i&&t&&(0,n.jsx)(r.ZP,{scopes:[N.Sh.OPENID_PROVIDER_CREATE],children:(0,n.jsx)(R,{})})]})]})})}},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return s},D4:function(){return r},Dy:function(){return l},XD:function(){return d},cz:function(){return c},hE:function(){return o},oK:function(){return a}});var n=i(76649);let r=e=>"error"in e,a=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,s=e=>(0,n.Ln)({status:"number",data:{}},e),o=e=>(0,n.Ln)({detail:"string"},e),l=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>a(e,t),r=Symbol("SOME"),a=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>a(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>a(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>a(i,t[e]));class s{static narrow(e){return new s(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof s?e.NF:e instanceof Function?e:t=>n(e,t);return new s(e=>t(e)&&i(e))}}new s(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=85082)}),_N_E=e.O()}]);
|