ethyca-fides 2.57.1b5__py2.py3-none-any.whl → 2.57.1b7__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.57.1b5.dist-info → ethyca_fides-2.57.1b7.dist-info}/METADATA +1 -1
- {ethyca_fides-2.57.1b5.dist-info → ethyca_fides-2.57.1b7.dist-info}/RECORD +190 -189
- fides/_version.py +3 -3
- fides/api/api/v1/endpoints/config_endpoints.py +4 -2
- fides/api/models/attachment.py +6 -8
- fides/api/models/comment.py +17 -17
- fides/api/models/privacy_request/privacy_request.py +61 -0
- fides/api/service/storage/s3.py +133 -0
- fides/api/service/storage/util.py +10 -0
- fides/api/tasks/storage.py +12 -111
- fides/config/__init__.py +1 -1
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1376-c177d8d0c60b1166.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2201-0452b4135058f0fc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/302-fb0e3cd140c4364d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3320-317483e6c10bae51.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/355-6a87b50acf54e985.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3662-6a0cafa3023aa7a2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4723-1a785d558dfb6441.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6362-0ca70f8cfd020723.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6954-f7daf613febc36ef.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7434-3d4a0beb84ec57f7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7495-b7fa6fdbd910bd72.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7980-91800d54c5964ba3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-b8d38dabe3db0ee0.js → _app-e53d13729068a001.js} +8 -8
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-05ab19822a7e9f80.js → manual-f8c0b05aae0bbcd1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-18b0b521255289a3.js → multiple-6a7208eee5e588fb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a33f82e79cb09478.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-64f83e9a2b777bf3.js → add-vendors-ba0c5fa9764cbd89.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-e11ace4f273ebb47.js → configure-1af99ffa7a507e86.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-443e6dd191ce5588.js → [id]-c02510104f9e503a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-36162d5bea29dcc2.js → new-e96415629f3b4223.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-2d651499c07d12d9.js → [id]-66827da90b8a2d1e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-36e57d2f2446be82.js → new-13d48f980bf707e5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-1a3bb713fc7bc298.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-5892ca5d93ea6165.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-5c37c3ad1c3cfba5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-4fac7e0a54eebc32.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-45016545c099e183.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-5ddd3cd7d29e89c0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-0616437e1a82d3ed.js → [id]-f68c3ee92505994f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-f8218440494e8532.js → new-89bc670d278e3749.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-3742c349e9a0020d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-577b95cb0006f387.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-5a161e167c251519.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-c3e234ad95e6e213.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-347e203faa31716f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-729fa8ed0f10bc8e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-ff6edba56dfec090.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-ad368857e86fe01b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-f45920358a405167.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-ca753b60ca1745c5.js → [id]-c234398ee8265485.js} +1 -1
- fides/ui-build/static/admin/_next/static/css/dd9922a434d21e22.css +1 -0
- fides/ui-build/static/admin/_next/static/dctUooMB4AAq5YqgLKNt9/_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/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/ui-build/static/admin/_next/static/chunks/3215-c8c683b93919e0a5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3320-87c75df57a47487e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3662-420d9807c30008ab.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3949-9888699e2ac564c4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4723-81d28e5be5c7b6d7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5574-a4047e826a8cd4c3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5834-bd9ed01c4ab2ef5c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-3226fe183b48668b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6277-cad7c7c8cf48dbec.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6954-6eb480eb132239c3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7044-88111db2aca2cf65.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7980-2597c279c30fbcda.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-9af77524ed1648c1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-136bcbd20ac59bf5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-942d68a88b321067.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-b9fe0f7ef05fd12c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-deec7b789ef30dc4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-2220c30c3863b5a5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-740824dfa6823e26.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-5541ecd2f62711a5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-a8e08ecb0c6c3a7c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-1a6965d78bfb26b0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-f263e6bacf0f2d19.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-b96ee3fea3920fcf.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-1b0f9469cb65abfc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-eebd2f4ead19cfd6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-4769f55b138073f7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-775f55b3f80cd452.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-14def4ca3cc9cda5.js +0 -1
- fides/ui-build/static/admin/_next/static/css/957d0e4fea846ff0.css +0 -1
- fides/ui-build/static/admin/_next/static/nO-B4awcqTzE1AwRkxKgF/_buildManifest.js +0 -1
- {ethyca_fides-2.57.1b5.dist-info → ethyca_fides-2.57.1b7.dist-info}/LICENSE +0 -0
- {ethyca_fides-2.57.1b5.dist-info → ethyca_fides-2.57.1b7.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.57.1b5.dist-info → ethyca_fides-2.57.1b7.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.57.1b5.dist-info → ethyca_fides-2.57.1b7.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1150-73440d7b319558e8.js → 1150-d4a5eef84e70de22.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2397-d8161100e3634f2c.js → 2397-c6d0dcb3b921555f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3086-be6b52546c3efc90.js → 3086-d099019708303444.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3855-386aec4f0e0e89f1.js → 3855-4d5d936a58a0dd5f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3872-0da2c6a790542bd6.js → 3872-2b2bf5ebd4b0a70f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4481-0500c40ed13000c0.js → 4481-f2f57e7a75a90e79.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5246-9fc6af1a6499e0a4.js → 5246-ac8b0fcb44b00af7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5258-3a650be9142cf914.js → 5258-a05dcab2f9315dab.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5480-f5bec5e881f72f8d.js → 5480-c6c1fb87006e471a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5487-d96e1abc93f92631.js → 5487-509639439bf9fb46.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5826-16e497af363a0cbc.js → 5826-e3970cd9440be33b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6315-dee79f6861c94d2d.js → 6315-daf94fa7520fb253.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6372-f1b54f3cb4888660.js → 6372-41afe1e6a9181cc7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6853-2777b5ab5717fada.js → 6853-7f95c36e396d3fb8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{7751-25e0c1307988ffd7.js → 7751-130668529ab1d0b6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{79-ba88d0cf4c65aaa2.js → 79-1c326c00cf111c00.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8433-969280d321d1c3a2.js → 8433-b2a96b825124b596.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8499-07507004e8275df2.js → 8499-34620330ecf2ac53.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9046-b18572b89f0aaa92.js → 9046-e7b9a3fd010b01ad.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9282-1a5a2f6f4d9ed586.js → 9282-6ee061da1eb51d65.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9999-f2e40d5b13343220.js → 9999-8600f6f495a80b38.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{404-1087258931760074.js → 404-8e0baa6e128803ab.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{ant-poc-b3b4d0a98450ffd1.js → ant-poc-39267961e03be6c5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-8b9f75fc0f131240.js → privacy-experience-ed38f18c095141fe.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-da37afbe5ec81339.js → privacy-notices-7339b3cdf5d4da32.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-c57b209feef7c2da.js → properties-b5b3196eba90246a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-81ca1ac6f52ec342.js → reporting-38b8ec1a221610ff.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-24bef021ee71e36c.js → consent-df2388d953c85c2a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-6cbd79481199812d.js → [resourceUrn]-5e851b9f27bda8a4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-46b9790da2fec05a.js → [projectUrn]-9f9112b22fdfb32a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-742849f39b646a2f.js → projects-ddca867936c89a72.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-e7833c1c606081a9.js → [resourceUrn]-85e3d6f1b2afd3e7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-bed368d048ea6883.js → resources-9831226436d884b5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-0cfa8a9caf7c75c3.js → activity-a0749240265da17d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-9cd0c40bef77b120.js → datamap-819ac99e7a56465a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-ab9bc1a3640547db.js → [...subfieldNames]-259d4a94861afe2b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-17ec8385bb1fa6d4.js → [collectionName]-25283f5bcac8fa73.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-e14c1c07658f8a10.js → [datasetId]-aaedf8f2a849c97f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-b8eaa9b9d3832b30.js → datastore-connection-61adfcd5f7f69101.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{index-94e6d589c4edf360.js → index-1072281d6cfe8295.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-6b032de0a6c2c400.js → [id]-268918d8c1dfe82a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-c0d6ae68ff7979c6.js → add-template-cd75949bee7497b6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-bbe5854b7d19b7e9.js → [id]-d1f4178b8a7e2145.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-4bad69cd42c9722c.js → configure-37e800a20e654064.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-b4c808a8a0287d11.js → [id]-92145503c4d2d75e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-5a701477b006a63b.js → add-property-ab94805694ebd35c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-9a1899dfe052023e.js → properties-5e623dcd92418638.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-449ad3b08750bfc2.js → datamap-710839776b9995ce.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-d073be113e9ca7b0.js → about-175d39bdd74f148c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-ce9305fa04fecbb8.js → custom-fields-1262d596c0cdcd81.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-c5cd5fb578de9515.js → domain-records-f0c6e6034d37dbcf.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-39c7ae3602ac69b2.js → email-templates-6ee49492a7769f89.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-f35bd2d0c10aa58c.js → locations-deb754d42982562b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-ba8c25b63bbf7dc2.js → regulations-f9e97decfe56b018.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-73ef0438c85014bb.js → test-datasets-ae133b6e8e1107f2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{systems-c320df35d51dc537.js → systems-4d6a17a7a24aca97.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-181ea5b0ac975239.js → taxonomy-46f47c04a01319cf.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-622e16a17a11c096.js → [id]-5b752ba934baee94.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-aa872b21bb835d34.js → user-management-4fbb29cf0a611aae.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{webpack-4df2ba5ee2d40f0a.js → webpack-815e3c35038201da.js} +0 -0
- /fides/ui-build/static/admin/_next/static/{nO-B4awcqTzE1AwRkxKgF → dctUooMB4AAq5YqgLKNt9}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[302],{77867:function(e,s,t){var a=t(24246),i=t(56351);s.Z=e=>{let{connected:s,...t}=e,n="red.500";return null==s?n="gray.300":s&&(n="green.500"),(0,a.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...t})}},7617:function(e,s,t){t.d(s,{q:function(){return n}});var a=t(24246),i=t(56351);let n=e=>{let{label:s,isDisabled:t,...n}=e;return(0,a.jsx)(i.OK9,{"data-testid":"tab-".concat(s),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:n.fontSize,fontWeight:"500",color:"gray.500",isDisabled:t||!1,children:s})};s.Z=e=>{let{data:s,border:t="partial",...r}=e;return(0,a.jsxs)(i.mQc,{colorScheme:"complimentary",...r,children:[(0,a.jsx)(i.tdY,{width:"partial"===t?"max-content":void 0,children:s.map(e=>(0,a.jsx)(n,{label:e.label,isDisabled:e.isDisabled,fontSize:r.fontSize},e.label))}),(0,a.jsx)(i.nPR,{children:s.map(e=>(0,a.jsx)(i.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},59301:function(e,s,t){var a=t(24246),i=t(56351);s.Z=e=>(0,a.jsx)(i.rUS,{isExternal:!0,color:"complimentary.500",...e})},19904:function(e,s,t){t.d(s,{Tg:function(){return r}});var a=t(24246),i=t(16134),n=t(31793);let r=e=>(0,i.C)(n.uu).filter(s=>e.includes(s)).length>0;s.ZP=e=>{let{scopes:s,children:t}=e;return r(s)?(0,a.jsx)(a.Fragment,{children:t}):null}},26089:function(e,s,t){var a=t(24246),i=t(56351);s.Z=e=>{let{onClick:s,children:t}=e;return(0,a.jsx)(i.wpx,{onClick:s,type:"link",role:"link",size:"large",className:"m-0 p-0 font-medium text-gray-700 underline",children:t})}},16220:function(e,s,t){t.d(s,{V:function(){return n}});var a=t(25980),i=t(77830);let n=()=>({systemOrDatamapRoute:(0,a.hz)().plus?i.oG:i.So})},90111:function(e,s,t){var a=t(24246),i=t(56351);s.Z=e=>{let{children:s,...t}=e;return(0,a.jsx)(i.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...t,children:s})}},44553:function(e,s,t){t.d(s,{Z:function(){return g}});var a=t(24246),i=t(56351),n=t(27378),r=t(44833),l=t(45007),o=t(812),d=t(46628),c=t(20682),u=t(89319),p=t(52253),h=t(78780);let{reducer:m}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:x}=h.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let s=new FormData;return s.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:s}},invalidatesTags:()=>["Connection Type"]})})});var g=e=>{let{isOpen:s,onClose:t,testId:u="connector-template-modal"}=e,p=(0,l.I0)(),[h,m]=(0,n.useState)(null),g=(0,i.pmc)(),{getRootProps:y,getInputProps:f,isDragActive:_}=(0,r.uI)({onDrop:e=>{var s;if("zip"!==(null===(s=e[0].name.split(".").pop())||void 0===s?void 0:s.toLowerCase())){g((0,d.Vo)("Only zip files are allowed."));return}m(e[0])}}),[b,{isLoading:v}]=x(),{refetch:j}=(0,c.$I)({search:""},{skip:!1}),k=async()=>{if(h)try{var e;await b(h).unwrap(),g((0,d.t5)("Integration template uploaded successfully."));let{data:s}=await j();p((0,c.fP)(null!==(e=null==s?void 0:s.items)&&void 0!==e?e:[])),t()}catch(e){g((0,d.Vo)((0,o.e$)(e)))}finally{m(null)}};return(0,a.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"2xl",children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,a.jsx)(i.xBx,{children:"Upload integration template"}),(0,a.jsxs)(i.fef,{children:[(0,a.jsx)(i.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,a.jsxs)(i.xuv,{...y(),bg:_?"gray.100":"gray.50",border:"2px dashed",borderColor:_?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,a.jsx)("input",{...f()}),h?(0,a.jsx)(i.xvT,{children:h.name}):_?(0,a.jsx)(i.xvT,{children:"Drop the file here..."}):(0,a.jsx)(i.xvT,{children:"Click or drag and drop your file here."})]}),(0,a.jsx)(i.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,a.jsxs)(i.mzw,{className:"flex w-full justify-end gap-2",children:[(0,a.jsx)(i.wpx,{onClick:t,"data-testid":"cancel-btn",disabled:v,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!h||v,onClick:k,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},3765:function(e,s,t){var a=t(56351),i=t(812),n=t(46628),r=t(1315),l=t(31883);s.Z=e=>{let s=(0,a.pmc)(),[t]=(0,r.qQ)(),o=t=>!!e.privacy_declarations.find(e=>e.data_use===t.data_use&&e.name===t.name)&&(s((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),d=(e,t)=>{if((0,l.D4)(e)){let t=(0,i.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");s((0,n.Vo)(t));return}return s.closeAll(),s((0,n.t5)(t?"Data use deleted":"Data use saved")),e.data.privacy_declarations},c=async(s,a)=>{let i=s.map(e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:""}}),n={...e,privacy_declarations:i};return d(await t(n),a)};return{createDataUse:async t=>{if(!o(t))return s.closeAll(),c([...e.privacy_declarations,t])},updateDataUse:async(s,t)=>{if(!(t.id!==s.id&&o(t)))return c(e.privacy_declarations.map(e=>e.id===s.id?t:e))},deleteDataUse:async s=>c(e.privacy_declarations.filter(e=>e.id!==s.id),!0),deleteDeclarationByDataUse:async s=>c(e.privacy_declarations.filter(e=>e.data_use!==s),!0)}}},41337:function(e,s,t){var a=t(24246),i=t(56351);t(27378);var n=t(21702),r=t(14746);let l=e=>void 0!==e.connection_type,o=e=>void 0!==e.encoded_icon;s.Z=e=>{let{data:s,...t}=e;return(0,a.jsx)(i.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(o(s)&&s.encoded_icon)return"data:image/svg+xml;base64,".concat(s.encoded_icon);if(l(s))e=[...r.iW].find(e=>{var t,a;let[i]=e;return s.connection_type.toString()!==n.Rj.SAAS&&s.connection_type.toString()===i||s.connection_type.toString()===n.Rj.SAAS&&(null===(a=s.saas_config)||void 0===a?void 0:null===(t=a.type)||void 0===t?void 0:t.toString())===i.toString()});else if(o(s)){let{identifier:t}=s;e=[...r.iW].find(e=>{let[s]=e;return s.toLowerCase()===t.toLowerCase()})}return e?r.Ny+e[1]:r.VD})(),fallbackSrc:r.VD,alt:(()=>{if(l(s)){var e;return null!==(e=s.name)&&void 0!==e?e:s.key}return o(s)?s.human_readable:s})(),...t})}},73183:function(e,s,t){var a=t(24246),i=t(56351);t(27378);var n=t(14207);s.Z=e=>{let{connection_key:s,disabled:t,name:r,access_type:l,connection_type:o,isSwitch:d}=e,{isOpen:c,onOpen:u,onClose:p}=(0,i.qY0)(),[h,m]=(0,n.XX)(),x=async()=>{await h({key:s,name:r,disabled:!t,access:l,connection_type:o}),p()},g=()=>{m.isLoading||p()};return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsxs)(i.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,a.jsx)(i.xvT,{fontSize:"sm",children:"Enable integration"}),(0,a.jsx)(i.rAg,{className:"ml-2",checked:!t,onChange:()=>u()})]}):(0,a.jsx)(i.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:u,children:(0,a.jsx)(i.xvT,{fontSize:"sm",children:t?"Enable":"Disable"})}),(0,a.jsxs)(i.u_l,{isCentered:!0,isOpen:c,onClose:g,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{children:[(0,a.jsxs)(i.xBx,{children:[t?"Enable":"Disable"," Connection"]}),(0,a.jsx)(i.olH,{}),(0,a.jsx)(i.fef,{pb:6,children:(0,a.jsx)(i.Kqy,{direction:"column",spacing:"15px",children:(0,a.jsxs)(i.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[t?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,a.jsxs)(i.mzw,{className:"flex gap-4",children:[(0,a.jsx)(i.wpx,{onClick:g,className:"w-1/2",children:"Cancel"}),(0,a.jsxs)(i.wpx,{onClick:x,loading:m.isLoading,className:"w-1/2",children:[t?"Enable":"Disable"," Connection"]})]})]})]})]})}},8627:function(e,s,t){t.d(s,{s:function(){return l}});var a=t(24246),i=t(56351),n=t(77867),r=t(16394);let l=e=>{let{succeeded:s,timestamp:t}=e,l=t?(0,r.p6)(t):"";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{connected:s}),(0,a.jsx)(i.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:t?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},27259:function(e,s,t){var a=t(24246),i=t(56351),n=t(34090);s.Z=e=>{let{disabled:s=!1,displayHelpIcon:t=!0,helpIconVisibility:r=!1,isRequired:l=!1,label:o,placeholder:d,type:c="text",...u}=e,{id:p,autoFocus:h}=u,[m,x]=(0,n.U$)(u);return(0,a.jsxs)(i.NIc,{display:"flex",isRequired:l,isInvalid:!!(x.error&&x.touched),children:[o&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:p,minWidth:"150px",children:o}),(0,a.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===c&&(0,a.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,a.jsx)(i.zuI,{...m,autoComplete:"off",autoFocus:h}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]}),"text"===c&&(0,a.jsx)(i.IIB,{...m,autoComplete:"off",autoFocus:h,color:"gray.700",isDisabled:s,placeholder:d,size:"sm"}),"textarea"===c&&(0,a.jsx)(i.gxH,{...m,autoComplete:"off",autoFocus:h,color:"gray.700",placeholder:d,resize:"none",size:"sm",value:m.value||""}),(0,a.jsx)(i.J1D,{children:x.error})]}),t&&(0,a.jsx)(i.kCb,{alignContent:"center",h:"32px",visibility:r?"visible":"hidden",children:(0,a.jsx)(i.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})]})}},34669:function(e,s,t){t.d(s,{Z:function(){return sV}});var a,i,n=t(24246),r=t(84720),l=t(56351),o=t(79894),d=t.n(o),c=t(86677),u=t.n(c),p=t(27378),h=t(16134),m=t(25980),x=t(45938),g=t(16220),y=t(77830),f=t(46628),_=t(26089),b=t(19904),v=t(16394),j=t(20682),k=t(41337);let w=e=>{let{connectionConfig:s}=e,t=(0,h.C)(j.pw),{data:a}=(0,j.$I)(t),i=(0,p.useMemo)(()=>(null==a?void 0:a.items)||[],[a]),[n,r]=(0,p.useState)(),l=(0,p.useMemo)(()=>[...i].sort((e,s)=>e.human_readable>s.human_readable?1:-1),[i]),o=(0,p.useMemo)(()=>{let e=new Map;return null==l||l.map(s=>e.set(s.human_readable,{value:s})),e},[l]),d=(0,p.useMemo)(()=>{var e;return(null===(e=i.find(e=>e.identifier===(null==s?void 0:s.connection_type)||(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)))||void 0===e?void 0:e.type)||"ethyca"},[s,i]);return(0,p.useMemo)(()=>{let e=i.find(e=>(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)||e.identifier===(null==s?void 0:s.connection_type));e&&r(e)},[s,i]),{dropDownOptions:o,selectedValue:n,setSelectedValue:r,systemType:d}};var C=e=>{var s;let{disabled:t,hasClear:a=!0,label:i,list:r,onChange:o,selectedValue:d}=e,c=(0,p.useRef)(null),[u,h]=(0,p.useState)(!1),[m,x]=(0,p.useState)(""),g=()=>{h(!1)},y=null===(s=[...r].find(e=>{let[,s]=e;return s.value.identifier===(null==d?void 0:d.identifier)}))||void 0===s?void 0:s[0],f=(0,p.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(x(e.target.value),setTimeout(()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},0))},[]),_=(0,p.useMemo)(()=>(0,v.Ds)(f,100),[f]),b=(0,p.useMemo)(()=>[...r].filter(e=>e[0].toLowerCase().includes(m.toLowerCase())),[r,m]);return(0,n.jsxs)(l.v2r,{isLazy:!0,onClose:g,onOpen:()=>{h(!0)},strategy:"fixed",matchWidth:!0,children:[(0,n.jsx)(l.j2t,{"aria-label":null!=y?y:i,as:l.wpx,color:y?"complimentary.500":void 0,disabled:t,icon:(0,n.jsx)(l.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,n.jsx)(l.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=y?y:i})}),u?(0,n.jsxs)(l.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,n.jsx)(l.xuv,{px:"8px",mt:2,children:(0,n.jsxs)(l.BZy,{size:"sm",children:[(0,n.jsx)(l.Z8_,{pointerEvents:"none",children:(0,n.jsx)(l.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,n.jsx)(l.IIB,{"data-testid":"input-search-integrations",ref:c,autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:_,placeholder:"Search integrations",size:"sm",type:"search"})]})}),a&&(0,n.jsx)(l.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,n.jsx)(l.wpx,{onClick:()=>{o(void 0),x(""),g()},size:"small",children:"Clear"})}),(0,n.jsx)(l.xuv,{overflowY:"auto",maxHeight:"272px",children:b.map(e=>{let[s,t]=e;return(0,n.jsx)(l.ua7,{"aria-label":t.toolTip,hasArrow:!0,label:t.toolTip,placement:"auto-start",openDelay:500,shouldWrapChildren:!0,children:(0,n.jsxs)(l.sNh,{color:d===t.value?"complimentary.500":void 0,isDisabled:t.isDisabled,onClick:()=>o(t.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,n.jsx)(k.Z,{data:t.value}),(0,n.jsx)(l.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},S=t(14047),D=t(1315),T=t(21702),A=t(84306),I=t(14207),E=t(59301),q=(0,l.IUT)({displayName:"RightArrow",viewBox:"0 0 16 16",d:"M10.7814 7.33312L7.20541 3.75712L8.14808 2.81445L13.3334 7.99979L8.14808 13.1851L7.20541 12.2425L10.7814 8.66645H2.66675V7.33312H10.7814Z"}),z=t(41966);let R=e=>{var s,t,a;let{connectionConfig:i}=e,[n]=(0,I.S6)(),{data:r}=(0,I.Eg)(null!==(t=null==i?void 0:i.key)&&void 0!==t?t:""),l=null!==(a=null==r?void 0:null===(s=r.items)||void 0===s?void 0:s.map(e=>e.fides_key))&&void 0!==a?a:[],o=l.map(e=>({label:e,value:e})),{data:d}=(0,z.LH)({onlyUnlinkedDatasets:!0}),c=(0,p.useMemo)(()=>{var e;return null!==(e=null==d?void 0:d.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[d]),{errorAlert:u,successAlert:h}=(0,S.V)();return{dropdownOptions:[...o,...c],initialDatasets:l,patchConnectionDatasetConfig:async function(e,s){var t,a,i;let{showSuccessAlert:r=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=null!==(i=null===(t=e.dataset)||void 0===t?void 0:t.map(e=>({fides_key:e,ctl_dataset_fides_key:e})))&&void 0!==i?i:[],o=await n({connection_key:s,dataset_pairs:l}).unwrap();(null===(a=o.failed)||void 0===a?void 0:a.length)>0?u(o.failed[0].message):r&&h("Dataset successfully updated!")}}};var F=e=>{let{status:s}=e;return(0,n.jsxs)(n.Fragment,{children:["success"===s&&(0,n.jsx)(l.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"}),"error"===s&&(0,n.jsx)(l.xvT,{"data-testid":"toast-error-msg",children:"Test failed: please check your connection info"})]})},L=t(8627),O=t(32885),W=t(65450),Z=t(34090),P=t(59389),N=t(97181),U=t(57072),V=t(39864),M=t(27259);let B=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,n.jsxs)(l.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(l.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,n.jsx)(l.zxk,{bg:"primary.800",color:"white",isDisabled:s,isLoading:s,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})};var H=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:a,onCancel:i}=e,{isLoading:r}=(0,U.MO)(),o=(0,h.C)(V.qb),{errorAlert:d}=(0,S.V)();return r?null:(0,n.jsx)(Z.J9,{enableReinitialize:!0,initialValues:{fields:s.length>0?s:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,s)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}a(e,s)},validateOnBlur:!1,validateOnChange:!1,validationSchema:P.Ry({fields:P.IX().of(P.Ry().shape({pii_field:P.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:P.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:P.IX(P.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(Z.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(Z.F2,{name:"fields",render:s=>{let{fields:a}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(l.xuv,{visibility:"hidden",children:(0,n.jsx)(l.lr0,{})})]}),(0,n.jsx)(l.xuv,{children:a&&a.length>0?a.map((e,t)=>(0,n.jsxs)(l.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(M.Z,{autoFocus:0===t,displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(M.Z,{displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(N.d,{name:"fields.".concat(t,".data_categories"),options:o.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{s.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(B,{isSubmitting:t,onCancelClick:i})]})}})})})})},K=e=>{let{connectionConfig:s}=e,t=(0,p.useRef)(!1),{successAlert:a}=(0,S.V)(),{handleError:i}=(0,S.H)(),[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)([]),{isOpen:u,onOpen:h,onClose:m}=(0,l.qY0)(),{data:x,isFetching:g,isLoading:y,isSuccess:f}=(0,I.QV)(s?s.key:"",{skip:!s}),[_]=(0,I.jF)(),[b]=(0,I._d)(),v=async(e,t)=>{try{o(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await b(t).unwrap():await _(t).unwrap(),a("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){i(e)}finally{o(!1)}};(0,p.useEffect)(()=>(t.current=!0,f&&x&&c(x.fields),()=>{t.current=!1}),[x,f]);let j=(0,n.jsx)(l.wpx,{disabled:!s||r,loading:r,onClick:h,children:"Customize DSR"});return(0,n.jsxs)(n.Fragment,{children:[s?j:(0,n.jsx)(l.ua7,{label:"Save an Integration first to customize the DSR",placement:"top",shouldWrapChildren:!0,children:j}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:m,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{minWidth:"775px",children:[(0,n.jsx)(l.xBx,{children:"Customize DSR"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",children:"Customize your PII fields to create a friendly label name for your privacy request packages. This “Package Label” is the label your user will see in their downloaded package."}),(g||y)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),t.current&&!y?(0,n.jsx)(H,{data:d,isSubmitting:r,onSaveClick:v,onCancel:m}):null]})})]})]})]})},Y=t(98784),G=t.n(Y),$=t(73183),Q=e=>{let{options:s}=e,[t,{error:a},i]=(0,Z.U$)("dataset"),{setValue:r}=i;return(0,n.jsxs)(l.NIc,{display:"flex",children:[(0,n.jsx)(l.lXp,{color:"gray.900",fontWeight:"semibold",fontSize:"sm",htmlFor:"dataset",minWidth:"150px",children:"Datasets"}),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"100%",children:[(0,n.jsx)(l.xuv,{w:"full",children:(0,n.jsx)(l.WPr,{...t,id:"dataset",placeholder:"Select datasets...",options:s,onChange:e=>r(e),mode:"multiple",className:"w-full"})}),(0,n.jsx)(l.J1D,{children:a})]}),(0,n.jsx)(l.ua7,{"aria-label":"Select datasets to associate with this integration",hasArrow:!0,label:"Select datasets to associate with this integration",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})},J=t(95492),X=e=>{let{onDelete:s,deleteResult:t}=e,{isOpen:a,onOpen:i,onClose:r}=(0,l.qY0)(),o=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&r()};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(l.xvT,{fontSize:"sm",children:"Delete integration"}),(0,n.jsx)(l.wpx,{"aria-label":"Delete integration",icon:(0,n.jsx)(J.l,{}),disabled:t.isLoading,onClick:i,className:"ml-2"})]})]}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:a,onClose:o,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsx)(l.xBx,{children:"Delete integration"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsx)(l.Kqy,{direction:"column",spacing:"15px",children:(0,n.jsx)(l.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"Deleting an integration may impact any privacy request that is currently in progress. Do you wish to proceed?"})})}),(0,n.jsxs)(l.mzw,{children:[(0,n.jsx)(l.wpx,{onClick:o,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(l.wpx,{onClick:()=>{s()},loading:t.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},ee=t(99792);let es=(e,s)=>{let t={...e};return s&&Object.entries(s.properties).forEach(e=>{let[s,a]=e;if("secrets"in t||(t.secrets={}),"integer"===a.type)t.secrets[s]=a.default?Number(a.default):0;else{var i;t.secrets[s]=null!==(i=a.default)&&void 0!==i?i:""}}),t},et=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===ee.Z.SAAS&&(t+="_api"),t},ea="#/definitions/FidesDatasetReference",ei=e=>{let{secretsSchema:s,defaultValues:t,isSubmitting:a=!1,isAuthorizing:i=!1,onSaveClick:r,onTestConnectionClick:o,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:p,connectionConfig:h,initialDatasets:x,datasetDropdownOptions:g,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[b,{isLoading:v,isFetching:j}]=(0,I.h2)(),{plus:k}=(0,m.hz)(),w=(e,s,t)=>{let a;return(void 0===s||""===s||void 0===s)&&(a="".concat(e," is required")),t===ea&&(s.includes(".")?s.split(".").length<3&&(a="Dataset reference must include at least three parts"):a="Dataset reference must be dot delimited"),a},C=(e,s)=>(0,n.jsx)(l.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:s}),S=e=>{var s;if((null===(s=e.allOf)||void 0===s?void 0:s[0].$ref)===ea)return"Enter dataset.collection.field"},D=e=>{var t,a;return(null==s?void 0:null===(t=s.required)||void 0===t?void 0:t.includes(e))||(null==s?void 0:null===(a=s.properties)||void 0===a?void 0:a[e])!==void 0&&"default"in s.properties[e]},A=(e,s)=>(0,n.jsx)(Z.gN,{id:"secrets.".concat(e),name:"secrets.".concat(e),validate:(!!D(e)||"integer"===s.type)&&(e=>{var t;return w(s.title,e,null===(t=s.allOf)||void 0===t?void 0:t[0].$ref)}),children:t=>{var a;let{field:i,form:r}=t,o=r.errors.secrets&&r.errors.secrets[e],d=!!r.touched.secrets&&r.touched.secrets[e],c="boolean"===s.type,u="integer"===s.type;return(0,n.jsxs)(l.NIc,{display:"flex",isRequired:D(e)&&!c,isInvalid:o&&d,children:[C(e,s.title),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[!u&&!c&&(0,n.jsx)(l.IIB,{...i,type:s.sensitive?"password":"text",placeholder:S(s),autoComplete:"off",color:"gray.700",size:"sm"}),c&&(0,n.jsx)(l.WPr,{value:!!i.value,onChange:e=>r.setFieldValue(i.name,e),options:[{label:"False",value:!1},{label:"True",value:!0}]}),u&&(0,n.jsxs)(l.Y2U,{allowMouseWheel:!0,color:"gray.700",onChange:e=>{r.setFieldValue(i.name,e)},value:null!==(a=i.value)&&void 0!==a?a:0,min:0,size:"sm",children:[(0,n.jsx)(l.zuI,{...i,autoComplete:"off"}),(0,n.jsxs)(l.FiK,{children:[(0,n.jsx)(l.WQu,{}),(0,n.jsx)(l.Y_d,{})]})]}),(0,n.jsx)(l.J1D,{children:o})]}),(0,n.jsx)(l.ua7,{"aria-label":s.description,hasArrow:!0,label:s.description,placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",visibility:s.description?"visible":"hidden",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}},"secrets.".concat(e)),E=e=>{let t=G().cloneDeep(e);return s&&Object.keys(s.properties).forEach(e=>{var a;if((null===(a=s.properties[e].allOf)||void 0===a?void 0:a[0].$ref)===ea){let s=t.secrets[e].split(".");t.secrets[e]={dataset:s.shift(),field:s.join("."),direction:"from"}}}),t},q=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(E(e))},z=async e=>{Object.keys(await e.validateForm()).length>0||o(await b(h.key))},R=(null==h?void 0:h.disabled)||!1;return(0,n.jsx)(Z.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==h?void 0:h.key){var a,i;return e.name=null!==(i=h.name)&&void 0!==i?i:"",e.description=h.description,e.instance_key=h.connection_type===T.Rj.SAAS?null===(a=h.saas_config)||void 0===a?void 0:a.fides_key:h.key,e.enabled_actions=(h.enabled_actions||[]).map(e=>e.toString()),e.secrets=h.secrets?G().cloneDeep(h.secrets):{},e.dataset=x,(null==s?void 0:s.properties)&&Object.entries(s.properties).forEach(s=>{var t;let[a,i]=s;if((null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)===ea){let s=e.secrets[a];s&&(e.secrets[a]="".concat(s.dataset,".").concat(s.field))}}),e}return G().isEmpty(e.enabled_actions)&&(e.enabled_actions=p.supported_actions.map(e=>e.toString())),es(e,s)})(),onSubmit:(e,s)=>{r(E(e),s)},validateOnBlur:!1,validateOnChange:!1,children:e=>{var t;let r=!e.dirty&&(null==h?void 0:h.authorized);return(0,n.jsx)(Z.l0,{noValidate:!0,children:(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)("div",{className:"flex flex-row",children:[h?(0,n.jsx)($.Z,{connection_key:null==h?void 0:h.key,disabled:R,connection_type:null==h?void 0:h.connection_type,access_type:null==h?void 0:h.access,name:null!==(t=null==h?void 0:h.name)&&void 0!==t?t:h.key,isSwitch:!0}):null,h?(0,n.jsx)(X,{onDelete:f,deleteResult:_}):null]}),!!(null==h?void 0:h.key)&&(0,n.jsx)(Z.gN,{id:"instance_key",name:"instance_key",children:s=>{let{field:t}=s;return(0,n.jsxs)(l.NIc,{display:"flex",children:[C("instance_key","Integration identifier"),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(l.IIB,{...t,autoComplete:"off",color:"gray.700",isDisabled:!!(null==h?void 0:h.key),placeholder:"A unique identifier for your new ".concat(p.human_readable," integration"),size:"sm"}),(0,n.jsx)(l.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(l.ua7,{"aria-label":"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this integration.",hasArrow:!0,label:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this integration.",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),p.type!==T.Zi.MANUAL&&s?Object.entries(s.properties).map(e=>{let[s,t]=e;return"advanced_settings"===s?null:A(s,t)}):null,k&&(0,n.jsx)(Z.gN,{id:"enabled_actions",name:"enabled_actions",validate:e=>{let s;return e&&0!==e.length||(s="At least one request type must be selected"),s},children:s=>{let{field:t,form:a}=s;return(0,n.jsxs)(l.NIc,{"data-testid":"enabled-actions",display:"flex",isInvalid:a.touched.enabled_actions&&a.errors.enabled_actions,isRequired:!0,children:[C("enabled_actions","Request types"),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(l.WPr,{...t,placeholder:"Select...",mode:"multiple",options:p.supported_actions.map(e=>({label:G().upperFirst(e),value:e})),onChange:e=>{a.setFieldValue(t.name,e)},disabled:1===p.supported_actions.length,className:"w-full"}),(0,n.jsx)(l.J1D,{children:e.errors.enabled_actions})]}),(0,n.jsx)(l.ua7,{"aria-label":"The request types that are supported for this integration.",hasArrow:!0,label:"The request types that are supported for this integration.",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),T.Zi.DATABASE===p.type&&!y&&(0,n.jsx)(Q,{options:g}),(0,n.jsxs)("div",{className:"flex gap-4",children:[!p.authorization_required||r?(0,n.jsx)(l.wpx,{disabled:!(null==h?void 0:h.key)||a||_.isLoading,loading:v||j,onClick:()=>z(e),"data-testid":"test-connection-button",children:u}):null,k&&T.Zi.DATABASE===p.type&&!G().isEmpty(x)&&(0,n.jsx)(l.wpx,{onClick:()=>d(),children:"Test datasets"}),p.authorization_required&&!r?(0,n.jsx)(l.wpx,{loading:i,onClick:()=>q(e.values,e),children:"Authorize integration"}):null,p.type===T.Zi.MANUAL?(0,n.jsx)(K,{connectionConfig:h}):null,(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit",children:"Save"})]})]})})}})},en=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:et(a,t),saas_connector_type:t.identifier,secrets:{},...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},r={systemFidesKey:a,connectionConfig:n};return Object.entries(s.properties).forEach(s=>{r.connectionConfig.secrets[s[0]]=e.secrets[s[0]]}),await i(r).unwrap()},er=async(e,s,t,a,i)=>{var n;let r=a?a.key:et(t,s),l={access:T.uv.WRITE,connection_type:s.type===T.Zi.SAAS?s.type:s.identifier,description:e.description,key:r,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:t,connectionConfigs:[l]}).unwrap();if((null===(n=o.failed)||void 0===n?void 0:n.length)>0){let e=o.failed[0].message;throw Object.assign(Error(e),{data:{detail:e}})}return o},el=async(e,s,t,a,i)=>{let n={systemFidesKey:t,secrets:{}};return(Object.entries(s.properties).forEach(s=>{s[0]in a&&e.secrets[s[0]]===a[s[0]]||(n.secrets[s[0]]=e.secrets[s[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},eo=e=>{let{secretsSchema:s,systemFidesKey:t,connectionOption:a,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,A.V)(),{handleError:l}=(0,S.H)(),o=(0,h.T)(),[d,c]=(0,p.useState)(!1),[u,x]=(0,p.useState)(!1),{dropdownOptions:g,patchConnectionDatasetConfig:y,initialDatasets:f}=R({connectionConfig:i}),[_]=(0,I.NG)(),[b]=(0,O.IB)(),[v]=(0,I.rO)(),[j]=(0,W.Zh)(),[k]=(0,W.qd)(),[w]=(0,O.kg)(),[C,D]=(0,W._w)(),{plus:E}=(0,m.hz)(),q=(0,p.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]),z=(0,h.C)(W.NC);return{isSubmitting:d,isAuthorizing:u,handleSubmit:async e=>{let n=!i;try{if(c(!0),a.type===T.Zi.SAAS&&n)i=(await en(e,s,a,t,E?b:_)).connection;else{let n=await er(e,a,t,i,E?w:k);i||a.type!==T.Zi.DATABASE||(i=n.succeeded[0]),a.type!==T.Zi.MANUAL&&await el(e,s,t,q,j)}i&&e.dataset&&a.type===T.Zi.DATABASE&&await y(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{c(!1)}},handleAuthorization:async e=>{let n=!i;try{x(!0),n?i=(await en(e,s,a,t,_)).connection:await el(e,s,t,q,j);let r=await v(i.key).unwrap();x(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{x(!1)}},datasetDropdownOptions:g,initialDatasets:f,handleDelete:async()=>{try{await C(t),o((0,W.db)({...z,connection_configs:null})),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:D}},ed=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i}=e,[r,o]=(0,p.useState)(),d=(0,l.pmc)(),c=t.type===T.Zi.MANUAL,{data:h}=(0,j.n3)(t.identifier,{skip:c}),{isSubmitting:m,isAuthorizing:x,handleSubmit:g,handleAuthorization:y,datasetDropdownOptions:_,initialDatasets:b,handleDelete:v,deleteDatastoreConnectionResult:k}=eo({secretsSchema:h,systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i});return h||t.type===T.Zi.MANUAL?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,n.jsxs)("div",{children:["Connect to your ",t.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),t.user_guide&&(0,n.jsx)("div",{style:{marginTop:"12px"},children:(0,n.jsxs)(E.Z,{href:t.user_guide,children:["View docs for help with this integration ",(0,n.jsx)(q,{})]})})]}),(0,n.jsx)(ei,{secretsSchema:h,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:m,isAuthorizing:x,onSaveClick:g,onTestConnectionClick:e=>{var s;o(e);let t=(null===(s=e.data)||void 0===s?void 0:s.test_status)==="succeeded"?"success":"error";d({...f.MA,status:t,description:(0,n.jsx)(F,{status:t})})},onTestDatasetsClick:()=>{u().push("/systems/configure/".concat(s,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:t,connectionConfig:a,datasetDropdownOptions:_,initialDatasets:b,isCreatingConnectionConfig:!a,onDelete:v,deleteResult:k}),a?(0,n.jsxs)(l.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[r&&r.data&&void 0!==r.fulfilledTimeStamp?(0,n.jsx)(L.s,{succeeded:"succeeded"===r.data.test_status,timestamp:r.fulfilledTimeStamp}):(0,n.jsx)(L.s,{succeeded:null==a?void 0:a.last_test_succeeded,timestamp:(null==a?void 0:a.last_test_timestamp)||""}),(0,n.jsx)(l.LZC,{})]}):null]}):null};var ec=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:a,onOpen:i,onClose:r}=(0,l.qY0)(),[o,d]=(0,p.useState)(null),{successAlert:c}=(0,S.V)(),[u,{isLoading:m}]=(0,D.qd)(),x=(0,h.C)(j.pw),{data:g}=(0,j.$I)(x),y=(0,p.useMemo)(()=>(null==g?void 0:g.items)||[],[g]),{handleError:f}=(0,S.H)(),_=()=>{m||(o&&d(null),r())},b=async()=>{try{if(o){var e;let s={...o,instance_key:o.connection_type===T.Rj.SAAS?null===(e=o.saas_config)||void 0===e?void 0:e.fides_key:o.key},a=y.find(e=>(null==o?void 0:o.saas_config)&&e.identifier===(null==o?void 0:o.saas_config.type)||e.identifier===(null==o?void 0:o.connection_type));(await er(s,a,t,o,u)).succeeded[0]&&c("Integration successfully linked!"),d(null),r()}}catch(e){f(e)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.wpx,{onClick:i,children:"Link integration"}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:a,size:"lg",onClose:_,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsx)(l.xBx,{children:"Unlinked Integrations"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsxs)(l.Kqy,{direction:"column",spacing:"15px",children:[(0,n.jsx)(l.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"These are all the integrations that are not linked to a system. Please select an integration to link to a system."}),(0,n.jsx)(l.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,n.jsxs)(l.kCb,{flexDirection:"row",alignItems:"center",_hover:{bg:"gray.100",color:"gray.600"},bg:(null==o?void 0:o.key)===e.key?"gray.100":"unset",color:(null==o?void 0:o.key)===e.key?"gray.600":"unset",cursor:"pointer",onClick:()=>{d(e)},children:[(0,n.jsx)(k.Z,{data:e}),(0,n.jsx)(l.xvT,{children:e.name})]},e.key))})]})}),(0,n.jsxs)(l.mzw,{className:"flex gap-4",children:[(0,n.jsx)(l.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(l.wpx,{onClick:b,loading:m,disabled:!o||m,className:"w-1/2",children:"Link integration"})]})]})]})]})},eu=t(44553),ep=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:a,selectedValue:i,setSelectedValue:r}=w({connectionConfig:s}),o=(0,h.C)(I.dR),{data:d}=(0,I.AZ)({...o,orphaned_from_system:!0}),[c,u]=(0,p.useState)([]);(0,p.useEffect)(()=>{d&&u(d.items)},[d]);let m=(0,l.qY0)();return(0,n.jsxs)(l.xuv,{id:"con-wrapper",px:6,children:[(0,n.jsxs)(l.kCb,{py:5,children:[(0,n.jsxs)(l.Kqy,{direction:{base:"column",lg:"row"},children:[(0,n.jsx)(C,{list:a,label:"Integration type",selectedValue:i,onChange:r,disabled:!!(s&&null!==s)}),!s&&c.length>0?(0,n.jsx)(ec,{connectionConfigs:c,systemFidesKey:t}):null,(0,n.jsx)(b.ZP,{scopes:[T.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,n.jsx)(l.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:m.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,n.jsx)(eu.Z,{isOpen:m.isOpen,onClose:m.onClose})]}),(null==i?void 0:i.type)&&[T.Zi.DATABASE,T.Zi.DATA_CATALOG,T.Zi.SAAS,T.Zi.MANUAL,T.Zi.EMAIL].includes(i.type)?(0,n.jsx)(ed,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:r,systemFidesKey:t}):null]})},eh=t(71922),em=t(31883);let ex=e=>{let{item:s,options:t=[],onNoticeChange:a,isChild:i}=e,{external_id:r,name:o}=s,d="".concat(r,"-notice_id"),[c,,u]=(0,Z.U$)(d),{setValue:p}=u;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{flexGrow:1,children:[i&&(0,n.jsx)(l.LqM,{}),(0,n.jsx)(l.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(i?"-child":""),m:0,fontSize:"14px",fontWeight:i?"normal":"semibold",children:o})]}),(0,n.jsx)(l.WPr,{...c,id:d,allowClear:!0,placeholder:"None",options:t,onChange:e=>{p(e),a(s={...s,notice_id:e})},className:"w-full","data-testid":"consentable-item-select"})]})},eg=e=>{let{connectionKey:s,...t}=e,a=(0,l.pmc)(),{data:i,isLoading:r}=(0,O.EQ)(s),[o,{isLoading:d}]=(0,O.Am)(),c=(0,h.C)(eh.Zp),u=(0,h.C)(eh.G1),{data:m,isLoading:x}=(0,eh.J6)({page:c,size:u}),[g,y]=(0,p.useState)(),[_,b]=(0,p.useState)([]),v=(0,p.useMemo)(()=>null==g?void 0:g.reduce((e,s)=>{var t;return s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id),(null===(t=s.children)||void 0===t?void 0:t.length)&&s.children.forEach(s=>{s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id)}),e},{}),[g]),j=e=>{let s=e.notice_id;if(s){let e=null==m?void 0:m.items.filter(e=>e.id===s);if(null==e?void 0:e.length){var t;let s=(null===(t=e[0].children)||void 0===t?void 0:t.map(e=>e.id))||[];return _.filter(e=>s.includes(e.value))}}return _},k=async()=>{let e=await o({connectionKey:s,consentableItems:g});(0,em.D4)(e)?a((0,f.Vo)("Failed to save consent automation")):a({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,n.jsx)(l.xvT,{"data-testid":"toast-success-msg",children:"Your consent automation settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,p.useEffect)(()=>{i&&y(i)},[i]),(0,p.useEffect)(()=>{m&&b(m.items.map(e=>({label:e.name,value:e.id})))},[m]),r||x)return(0,n.jsx)(l.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(l.OdW,{height:"35px"})});if(!g||!g.length||!m)return null;let w=(e,s)=>{y(g.map(t=>{if(s?t.external_id===s.external_id:t.external_id===e.external_id){if(s){var a;return{...t,children:null===(a=t.children)||void 0===a?void 0:a.map(s=>s.external_id===e.external_id?e:s)}}return e}return t}))};return(0,n.jsx)(l.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(l.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,n.jsxs)(l.Qdk,{border:"none",children:[(0,n.jsxs)(l.KFZ,{children:[(0,n.jsx)(l.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,n.jsx)(l.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Consent automation"})}),(0,n.jsx)(l.XEm,{})]}),(0,n.jsxs)(l.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,n.jsx)(l.xvT,{mb:7,children:"Map consentable items, such as channels and subscriptions, from your integration to Fides privacy notices. This ensures that updates to consent preferences in either location remain accurate and up-to-date."}),(0,n.jsx)(Z.J9,{initialValues:v||{},onSubmit:k,children:(0,n.jsxs)(Z.l0,{children:[(0,n.jsx)(l.MIq,{columns:2,spacing:3,children:g.map(e=>{var s;return(0,n.jsxs)(p.Fragment,{children:[(0,n.jsx)(ex,{item:e,options:_,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,n.jsx)(ex,{item:s,options:j(e),isChild:!0,onNoticeChange:s=>w(s,e)},s.external_id))]},e.external_id)})}),(0,n.jsx)(l.Ugi,{justifyContent:"flex-end",mt:3,children:(0,n.jsx)(l.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var ey=t(57865),ef=t(3124),e_=t.n(ef),eb=(0,l.IUT)({displayName:"NextArrow",viewBox:"0 0 12 12",d:"M6.58584 5.99999L4.11084 3.52499L4.81784 2.81799L7.99984 5.99999L4.81784 9.18199L4.11084 8.47499L6.58584 5.99999Z"}),ev=(0,l.IUT)({displayName:"PrevArrow",viewBox:"0 0 12 12",d:"M5.414 5.99999L7.889 8.47499L7.182 9.18199L4 5.99999L7.182 2.81799L7.889 3.52499L5.414 5.99999Z"});let ej=e=>{let s=new Date(e),t=navigator.language;return{formattedTime:s.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"}),formattedDate:s.toLocaleDateString(t,{year:"numeric",month:"long",day:"numeric"})}},ek=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,ew=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=ek(t),l=e[t],o=s[t];if("boolean"==typeof l||"boolean"==typeof o||"number"==typeof l||"number"==typeof o){l!==o&&n.push(r);return}!((G().isNil(l)||G().isEmpty(l))&&(G().isNil(o)||G().isEmpty(o)))&&(G().isEqual(l,o)||(G().isNil(l)||G().isEmpty(l)?a.push(r):G().isNil(o)||G().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},eC=e=>{let{edited_by:s,before:t,after:a,created_at:i}=e,r=[],l=[],o=[];t.custom_fields||a.custom_fields?{addedFields:r,removedFields:l,changedFields:o}=ew(t.custom_fields,a.custom_fields):{addedFields:r,removedFields:l,changedFields:o}=ew(t,a);let d=[];if(r.length>0&&d.push(["added ",(0,n.jsx)("b",{children:r.join(", ")})]),l.length>0&&d.push(["removed ",(0,n.jsx)("b",{children:l.join(", ")})]),o.length>0&&d.push(["changed ",(0,n.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let c=d.pop(),u=d.length>0?(0,n.jsxs)(n.Fragment,{children:[d.map((e,s)=>(0,n.jsxs)(p.Fragment,{children:[e,s<d.length-1?", ":""]},s)),d.length>=2?", and ":" and ",c]}):c,{formattedTime:h,formattedDate:m}=ej(i);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:s})," ",u," on ",m," at ",h]})},eS=(e,s)=>{let t=e=>e.map(e=>{let t=s.find(s=>s.fides_key===e.fides_key);return t&&t.name?t.name:e.fides_key}),a={...e.before},i={...e.after};return a.ingress&&(a.ingress=t(a.ingress)),a.egress&&(a.egress=t(a.egress)),i.ingress&&(i.ingress=t(i.ingress)),i&&i.egress&&(i.egress=t(i.egress)),{...e,before:a,after:i}},eD=(e,s)=>{if(G().isEmpty(s))return e;let t=(e,s)=>{var t,a;return null!==(a=null===(t=s.find(s=>s.value===e))||void 0===t?void 0:t.label)&&void 0!==a?a:e};return{...e,before:{...e.before,vendor_id:t(e.before.vendor_id,s)},after:{...e.after,vendor_id:t(e.after.vendor_id,s)}}},eT=e=>{let s=e.before.privacy_declarations||[],t=e.after.privacy_declarations||[],a=new Set([...s,...t].map(e=>e.data_use)),i=[],n=[];return a.forEach(e=>{let a=s.find(s=>s.data_use===e)||{data_use:"",data_categories:[]},r=t.find(s=>s.data_use===e)||{data_use:"",data_categories:[]};i.push(a),n.push(r)}),{...e,before:{...e.before,privacy_declarations:i},after:{...e.after,privacy_declarations:n}}},eA=e=>{let s={...e.before.custom_fields},t={...e.after.custom_fields};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,custom_fields:s},after:{...e.after,custom_fields:t}}},eI=e=>{if(!e.before.privacy_declarations||!e.before.privacy_declarations[0]||!e.before.privacy_declarations[0].custom_fields)return e;let s={...e.before.privacy_declarations[0].custom_fields},t=e.after.privacy_declarations&&e.after.privacy_declarations[0]?{...e.after.privacy_declarations[0].custom_fields}:{};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,privacy_declarations:[{...e.before.privacy_declarations[0],custom_fields:s}]},after:{...e.after,privacy_declarations:[{...e.after.privacy_declarations[0],custom_fields:t}]}}},eE=(0,p.createContext)(null),eq=()=>(0,p.useContext)(eE);var ez=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,p.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,n.jsx)(eE.Provider,{value:i,children:s})},eR=t(62165),eF=t(30320),eL=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eq(),i=p.Children.toArray(t).filter(e=>{if(p.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=G().get(null==a?void 0:a.before,s),i=G().get(null==a?void 0:a.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&G().isEmpty(t),r="boolean"!=typeof i&&"number"!=typeof i&&G().isEmpty(i);return!n||!r}return!1});return 0===i.length?null:(0,n.jsx)(l.Kqy,{marginTop:"0px !important",children:(0,n.jsxs)(l.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,n.jsx)(l.X6q,{as:"h3",size:"xs",children:s})}),(0,n.jsx)(l.Kqy,{children:i})]})})},eO=t(40324),eW=t(91613),eZ=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eq(),[d]=(0,Z.U$)(i.name),c={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,p.useRef)(null),[h,m]=(0,p.useState)(null),[x,g]=(0,p.useState)([]),[y,f]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=G().get(null==r?void 0:r.before,i.name)||[],s=G().get(null==r?void 0:r.after,i.name)||[];f(!G().isEqual(e,s)),g(e.length>s.length?e:s)},[r,i.name]),(0,p.useEffect)(()=>{u.current&&m(u.current.offsetHeight)},[x]);let _={};return y&&(_="before"===o?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,n.jsx)(l.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),a?(0,n.jsx)(eW.Z,{label:a}):null]}),(0,n.jsx)(l.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(h,"px")},children:(h?c.value:x).map((e,s)=>(0,n.jsx)(l.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},s))}),"before"===o&&y&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eP=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eq(),[d]=(0,Z.U$)(i),c={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,p.useRef)(null),[h,m]=(0,p.useState)(null),[x,g]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=G().get(null==r?void 0:r.before,i.name)||"",s=G().get(null==r?void 0:r.after,i.name)||"";g(!G().isEqual(e,s));let t=e.length>s.length?e:s;u.current&&(u.current.textContent=t,m(u.current.offsetHeight),u.current.textContent=c.value)},[r,i.name,c.value]);let y={};return x&&(y="before"===o?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,n.jsx)(l.NIc,{style:y,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),a?(0,n.jsx)(eW.Z,{label:a}):null]}),(0,n.jsx)(l.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(h,"px")},children:c.value}),"before"===o&&x&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eN=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:a}=(0,eF.m)({resourceType:t}),i=e=>Array.from(a.values()).some(s=>s.name===e&&!!s.allow_list_id),r=t===T.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",l=Object.keys(s).sort();return(0,n.jsx)(eL,{heading:"Custom fields",children:l.map(e=>i(e)?(0,n.jsx)(eZ,{label:e,name:"".concat(r,".").concat(e)},e):(0,n.jsx)(eP,{label:e,name:"".concat(r,".").concat(e)},e))})},eU=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:r}=eq(),[o]=(0,Z.U$)(a),d={...o,value:o.value},[c,u]=(0,p.useState)(!1);(0,p.useEffect)(()=>{u(G().get(null==i?void 0:i.before,a.name)!==G().get(null==i?void 0:i.after,a.name))},[i,a.name,d.value]);let h={};return c&&(h="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,n.jsx)(l.NIc,{style:h,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",minHeight:"46px",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),t?(0,n.jsx)(eW.Z,{label:t}):null]}),void 0!==d.value&&(0,n.jsx)(l.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===r&&c&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eV=e=>{let{initialValues:s}=e,t=(0,eR.hz)();return(0,n.jsx)(Z.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,n.jsx)(Z.l0,{children:(0,n.jsxs)(l.Kqy,{children:[(0,n.jsxs)(eL,{heading:"System details",children:[t.dictionaryService?(0,n.jsx)(eP,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,n.jsx)(eP,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eP,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,n.jsx)(eP,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eZ,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,n.jsx)(eL,{heading:"Dataset reference",children:(0,n.jsx)(eZ,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,n.jsxs)(eL,{heading:"Data processing properties",children:[(0,n.jsx)(eU,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,n.jsx)(eU,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,n.jsx)(eP,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,n.jsx)(eU,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,n.jsx)(eZ,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,n.jsx)(eU,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,n.jsx)(eZ,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,n.jsx)(eU,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,n.jsx)(eP,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,n.jsxs)(eL,{heading:"Administrative properties",children:[(0,n.jsx)(eP,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,n.jsx)(eP,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,n.jsx)(eP,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,n.jsx)(eP,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,n.jsx)(eP,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,n.jsx)(eZ,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,n.jsx)(eP,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,n.jsx)(eP,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,n.jsx)(eP,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,n.jsx)(eN,{customFields:s.custom_fields,resourceType:T.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,n.jsxs)(p.Fragment,{children:[(0,n.jsxs)(eL,{heading:"Data use",children:[(0,n.jsx)(eP,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].legal_basis_for_processing"),label:"Legal basis for processing",tooltip:"What is the legal basis under which personal data is processed for this purpose?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,n.jsx)(eL,{heading:"Features",children:(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,n.jsx)(eL,{heading:"Dataset reference",children:(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,n.jsxs)(eL,{heading:"Special category data",children:[(0,n.jsx)(eU,{name:"privacy_declarations[".concat(t,"].processes_special_category_data"),label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,n.jsxs)(eL,{heading:"Third parties",children:[(0,n.jsx)(eU,{name:"privacy_declarations[".concat(t,"].data_shared_with_third_parties"),label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,n.jsx)(eN,{customFields:s.privacy_declarations[0].custom_fields,resourceType:T.P6.PRIVACY_DECLARATION})]},t)),(0,n.jsxs)(eL,{heading:"Data flow",children:[(0,n.jsx)(eZ,{name:"ingress",label:"Sources"}),(0,n.jsx)(eZ,{name:"egress",label:"Destinations"})]})]})})})};let eM=(e,s)=>{let t=[],a=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||s.egress||e.ingress||s.ingress)&&t.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||s.privacy_declarations&&s.privacy_declarations.length>0;i&&t.push("Data Uses");let n=[...Object.keys(e),...Object.keys(s)].some(e=>!a.has(e));return!i&&n&&t.unshift("System Information"),t};var eB=e=>{let{selectedHistory:s,isOpen:t,onClose:a}=e;return(0,n.jsxs)(l.u_l,{isOpen:t,onClose:a,size:"4xl",children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsxs)(l.xBx,{backgroundColor:e_().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,n.jsxs)(l.X6q,{size:"xs",children:[(0,n.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),s&&(0,n.jsx)(n.Fragment,{children:eM(s.before,s.after).map((e,s)=>(0,n.jsx)(l.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.olH,{})]})]}),(0,n.jsx)(l.fef,{paddingTop:0,paddingBottom:6,children:(0,n.jsxs)(l.kCb,{justifyContent:"space-between",children:[(0,n.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,n.jsx)(ez,{selectedHistory:s,formType:"before",children:(0,n.jsx)(eV,{initialValues:null==s?void 0:s.before})})}),(0,n.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,n.jsx)(ez,{selectedHistory:s,formType:"after",children:(0,n.jsx)(eV,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eH=e=>{let{system:s}=e,[t,a]=(0,p.useState)(1),{data:i}=(0,O.Xc)({system_key:s.fides_key,page:t,size:10}),[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)(null),u=(0,h.C)(O.o),{data:m=[]}=(0,W.K3)(),x=(null==i?void 0:i.items)||[],g=e=>{c(e=eI(e=eA(e=eS(e=eD(e=eT(e),u),m)))),o(!0)},{formattedTime:y,formattedDate:f}=ej(s.created_at),_=i&&i.total?Math.ceil(i.total/10):0;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.iA_,{ml:"24px",children:[(0,n.jsx)(l.hrZ,{children:(0,n.jsx)(l.Tr,{children:(0,n.jsxs)(l.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:e_().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,n.jsx)(l.p3B,{children:x.map((e,s)=>{let t=eC(e);return t?(0,n.jsx)(l.Tr,{onClick:()=>g(e),style:{cursor:"pointer"},children:(0,n.jsx)(l.Td,{pt:"10px",pb:"10px",pl:"16px",fontSize:"12px",border:"1px solid #E2E8F0",children:t})},s):null})})]}),((null==i?void 0:i.total)||0)>10&&(0,n.jsxs)(l.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,n.jsxs)(l.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"600",paddingX:2,children:[(t-1)*10+1," -"," ",Math.min(10*t,(null==i?void 0:i.total)||0)," of"," ",(null==i?void 0:i.total)||0]}),(0,n.jsx)(l.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&a(t-1)},disabled:1===t,icon:(0,n.jsx)(ev,{})}),(0,n.jsx)(l.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,n.jsx)(eb,{})})]}),(0,n.jsx)(eB,{selectedHistory:d,isOpen:r,onClose:()=>{o(!1),c(null)}})]})},eK=t(52368),eY=t(3765),eG=e=>{let{title:s,description:t,handleAdd:a}=e;return(0,n.jsx)(l.Kqy,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.500",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,n.jsxs)(l.xuv,{children:[(0,n.jsx)(l.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,n.jsx)(l.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,n.jsx)(l.Ugi,{mt:4,children:(0,n.jsx)(l.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:a,icon:(0,n.jsx)(l.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},e$=t(58452);let eQ=e=>{let{declaration:s,title:t,handleDelete:a,handleEdit:i}=e,{isOpen:r,onOpen:o,onClose:d}=(0,l.qY0)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,n.jsx)(l.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.AB5,{onClick:()=>i(s),role:"button",tabIndex:0,children:(0,n.jsx)(l.xvT,{children:t||s.data_use})}),(0,n.jsx)(l.LZC,{}),a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:o,"data-testid":"delete-btn",children:(0,n.jsx)(l.pJl,{})}),(0,n.jsx)(e$.Z,{isOpen:r,onClose:d,onConfirm:()=>a(s),title:"Delete data use declaration",message:(0,n.jsxs)(l.xvT,{children:["You are about to delete the data use declaration"," ",(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:t||s.data_use}),", including all its cookies. Are you sure you want to continue?"]}),isCentered:!0})]}):null]})})}),(0,n.jsx)(l.izJ,{})]})},eJ=e=>{let{heading:s,children:t,headerButton:a,footerButton:i}=e;return(0,n.jsx)(l.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,n.jsxs)(l.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,n.jsxs)(l.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,n.jsx)(l.X6q,{as:"h3",size:"xs",children:s}),(0,n.jsx)(l.LZC,{}),a||null]}),(0,n.jsx)(l.Kqy,{spacing:0,children:t}),(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:i||null})]})})},eX=e=>{let{heading:s,declarations:t,handleAdd:a,handleDelete:i,handleEdit:r,allDataUses:o}=e,d=e=>{let s=o.filter(s=>s.fides_key===e.data_use)[0];return s?e.name?"".concat(s.name," - ").concat(e.name):s.name:""},c=(0,h.C)(ey.gU);return(0,n.jsx)(eJ,{heading:s,footerButton:c?null:(0,n.jsx)(l.wpx,{onClick:a,size:"small",icon:(0,n.jsx)(l.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,n.jsx)(eQ,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:r},e.id))})};var e0=t(95346),e1=t(54748),e2=t(28325),e4=t(30234);let e5=P.Ry().shape({data_categories:P.IX(P.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:P.Z_().required().label("Data use")}),e3={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},cookies:[],id:""},e6=e=>{var s;let t=e.cookies?e.cookies.map(e=>({name:e,path:"/"})):void 0;return{...e,name:null!==(s=e.name)&&void 0!==s?s:"",special_category_legal_basis:e.processes_special_category_data?e.special_category_legal_basis:void 0,third_parties:e.data_shared_with_third_parties?e.third_parties:void 0,shared_categories:e.data_shared_with_third_parties?e.shared_categories:void 0,cookies:t}},e8=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,cookies:r,values:o,includeCustomFields:d,privacyDeclarationId:c,lockedForGVL:u}=e,h=!!c,{legalBasisOptions:m}=(0,e1.Z)(),{specialCategoryLegalBasisOptions:x}=(0,e2.Z)(),g=(0,p.useMemo)(()=>i?i.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[i]);return(0,n.jsxs)(l.Kqy,{spacing:4,children:[(0,n.jsxs)(e4.Z,{heading:"Data use declaration",children:[(0,n.jsx)(eO.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:h||u,variant:"stacked"}),(0,n.jsx)(N.d,{id:"data_use",label:"Data use",name:"data_use",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:h||u}),(0,n.jsx)(N.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data are collected for this purpose?",mode:"multiple",isRequired:!0,disabled:u,layout:"stacked"}),(0,n.jsx)(N.d,{name:"data_subjects",label:"Data subjects",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",disabled:u,layout:"stacked"}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(N.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:m,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled:u}),(0,n.jsx)(l.UO1,{in:"Legitimate interests"===o.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked",disabled:u})})})]}),(0,n.jsx)(l.xuv,{mt:5,pl:4,children:(0,n.jsx)(eO.w8,{name:"flexible_legal_basis_for_processing",label:"This legal basis is flexible",tooltip:"Has the vendor declared that the legal basis may be overridden?",variant:"stacked",isDisabled:u})}),(0,n.jsx)(eO.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:u})]}),(0,n.jsx)(e4.Z,{heading:"Features",children:(0,n.jsx)(N.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:u,mode:"tags"})}),(0,n.jsx)(e4.Z,{heading:"Dataset reference",children:(0,n.jsx)(N.d,{name:"dataset_references",label:"Dataset references",options:g,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:u})}),(0,n.jsx)(e4.Z,{heading:"Special category data",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.w8,{name:"processes_special_category_data",label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?",variant:"stacked",isDisabled:u}),(0,n.jsx)(l.UO1,{in:o.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(N.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:x,isRequired:o.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked",disabled:u})})})]})}),(0,n.jsx)(e4.Z,{heading:"Third parties",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.w8,{name:"data_shared_with_third_parties",label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?",variant:"stacked",isDisabled:u}),(0,n.jsx)(l.UO1,{in:o.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsxs)(l.Kqy,{mt:4,spacing:4,children:[(0,n.jsx)(eO.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked",disabled:u}),(0,n.jsx)(N.d,{name:"shared_categories",label:"Shared categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data does this system share with third parties?",layout:"stacked",mode:"multiple",disabled:u})]})})]})}),(0,n.jsx)(e4.Z,{heading:"Cookies",children:(0,n.jsx)(N.d,{name:"cookies",label:"Cookies",options:r&&r.length?r.map(e=>({label:e.name,value:e.name})):[],mode:"tags",tooltip:"Which cookies are placed on consumer domains for this purpose?",layout:"stacked",disabled:u})}),d?(0,n.jsx)(e0.uc,{resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:c}):null]})},e9=(e,s)=>{if(e){let t=e.cookies&&e.cookies.length>0?e.cookies.map(e=>e.name):void 0;return{...e,customFieldValues:s||{},cookies:t}}return e3},e7=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,e0.mZ)({resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e6(e),r=await s(i,t);if(r){let s=r.filter(s=>s.data_use===e.data_use&&(!s.name||s.name===e.name));s.length>0&&await n({customFieldValues:a,fides_key:s[0].id})}},initialValues:(0,p.useMemo)(()=>e9(t,i),[t,i])}},se=e=>{let{onSubmit:s,onCancel:t,initialValues:a,...i}=e,r=null==a?void 0:a.id,{handleSubmit:o,initialValues:d}=e7({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:r}),c=(0,h.C)(ey.gU);return(0,n.jsx)(Z.J9,{enableReinitialize:!0,initialValues:d,onSubmit:o,validationSchema:e5,children:e=>{let{dirty:s,values:a}=e;return(0,n.jsxs)(Z.l0,{"data-testid":"declaration-form",children:[(0,n.jsx)(x.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,n.jsxs)(l.Kqy,{spacing:4,children:[(0,n.jsx)(e8,{values:a,lockedForGVL:c,privacyDeclarationId:r,...i}),(0,n.jsxs)(l.kCb,{w:"100%",children:[(0,n.jsx)(l.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),c?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",disabled:!s,"data-testid":"save-btn",children:"Save"})]})]})]})]})}})},ss=e=>{let{isOpen:s,onClose:t,heading:a,isCentered:i=!1,testId:r="privacy-declaration-modal",children:o}=e;return(0,n.jsxs)(l.u_l,{isOpen:s,onClose:t,isCentered:i,scrollBehavior:"inside",size:"3xl",children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{textAlign:"left",p:0,"data-testid":r,children:[(0,n.jsx)(l.xBx,{p:0,children:(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,n.jsx)(l.X6q,{as:"h3",size:"sm",children:a})})}),(0,n.jsx)(l.fef,{pb:4,children:o})]})]})};var st=e=>{let{system:s,addButtonProps:t,includeCustomFields:a,includeCookies:i,...r}=e,{isOpen:o,onClose:d,onOpen:c}=(0,l.qY0)(),[u,h]=(0,p.useState)(void 0),{createDataUse:m,updateDataUse:x,deleteDataUse:g}=(0,eY.Z)(s),y=[...s.privacy_declarations.filter(e=>void 0!==e.cookies).flatMap(e=>e.cookies)],f=s.cookies?s.cookies.filter(e=>0===y.filter(s=>s&&s.name===e.name).length):void 0,_=()=>{d(),h(void 0)},b=()=>{c(),h(void 0)},v=async e=>(_(),u)?x(u,e):m(e);return(0,p.useEffect)(()=>{d()},[d,s.fides_key]),(0,n.jsxs)(l.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===s.privacy_declarations.length?(0,n.jsx)(eG,{title:"You don't have a data use set up for this system yet.",description:'A Data Use is the purpose for which data is used in a system. In Fides, a system may have more than one Data Use. For example, a CRM system may be used both for "Customer Support" and also for "Email Marketing", each of these is a Data Use.',handleAdd:b}):(0,n.jsx)(eX,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:b,handleEdit:e=>{c(),h(e)},handleDelete:g,allDataUses:r.allDataUses}),f&&f.length>0?(0,n.jsx)(eJ,{heading:"Unassigned cookies",children:f.map(e=>(0,n.jsxs)(p.Fragment,{children:[(0,n.jsx)(l.xuv,{px:6,py:4,children:(0,n.jsx)(l.xvT,{children:e.name})}),(0,n.jsx)(l.izJ,{})]},e.name))}):null,(0,n.jsx)(ss,{isOpen:o,onClose:_,heading:"Configure data use",children:(0,n.jsx)(se,{initialValues:u,onSubmit:v,onCancel:_,includeCustomFields:a,...r})})]})},sa=e=>{let{system:s}=e,{isLoading:t,...a}=(0,eK.f)({includeDatasets:!0,includeDisabled:!1}),i=a.allDataCategories.filter(e=>e.active),r=a.allDataUses.filter(e=>e.active),o=a.allDataSubjects.filter(e=>e.active),c={...a,allDataCategories:i,allDataUses:r,allDataSubject:o,cookies:s.cookies};return(0,n.jsxs)(l.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,n.jsx)(l.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,n.jsxs)(l.xvT,{fontSize:"sm",fontWeight:"medium",children:["Data Uses describe the business purpose for which the personal data is processed or collected. Within a Data Use, you assign which categories of personal information are collected for this purpose and for which categories of data subjects. To update the available categories and uses, please visit"," ",(0,n.jsx)(l.rUS,{as:d(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,n.jsx)(l.$jN,{}):(0,n.jsx)(st,{system:s,includeCustomFields:!0,includeCookies:!0,...c})]})},si=t(812),sn=t(93237),sr=t(69525),sl=t(33335);let so={system_type:"",fides_key:"",tags:[],name:"",description:"",dataset_references:[],processes_personal_data:!0,exempt_from_privacy_regulations:!1,reason_for_exemption:"",uses_profiling:!1,does_international_transfers:!1,requires_data_protection_assessments:!1,privacy_policy:"",legal_name:"",legal_address:"",administrating_department:"",responsibility:[],joint_controller_info:"",data_security_practices:"",privacy_declarations:[],data_stewards:"",dpo:"",cookie_max_age_seconds:void 0,uses_cookies:!1,cookie_refresh:!1,uses_non_cookie_access:!1,legitimate_interest_disclosure_url:""},sd=(e,s)=>{var t;let a=null==e?void 0:null===(t=e.data_stewards)||void 0===t?void 0:t.map(e=>e.username).join(", ");return{...e,customFieldValues:s,description:e.description?e.description:"",legal_address:e.legal_address?e.legal_address:"",dpo:e.dpo?e.dpo:"",cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:"",legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:"",vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,privacy_policy:e.privacy_policy?e.privacy_policy:"",data_security_practices:e.data_security_practices?e.data_security_practices:"",legal_basis_for_profiling:e.legal_basis_for_profiling?e.legal_basis_for_profiling:"",legal_basis_for_transfers:e.legal_basis_for_transfers?e.legal_basis_for_transfers:"",data_stewards:a}},sc=e=>{let s=e.fides_key?e.fides_key:(0,sl.E)(e.name),t=""===e.privacy_policy?void 0:e.privacy_policy,a={system_type:e.system_type,fides_key:s,name:e.name,description:e.description?e.description:"",dataset_references:e.dataset_references,tags:e.tags,processes_personal_data:e.processes_personal_data,exempt_from_privacy_regulations:e.exempt_from_privacy_regulations,reason_for_exemption:e.exempt_from_privacy_regulations?e.reason_for_exemption:void 0,privacy_declarations:e.processes_personal_data?e.privacy_declarations:[],vendor_id:e.vendor_id,ingress:e.ingress,egress:e.egress,meta:e.meta,fidesctl_meta:e.fidesctl_meta,organization_fides_key:e.organization_fides_key,dpa_progress:e.dpa_progress,previous_vendor_id:e.previous_vendor_id,cookies:e.cookies,cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:void 0,uses_cookies:e.uses_cookies,cookie_refresh:e.cookie_refresh,uses_non_cookie_access:e.uses_non_cookie_access,legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:void 0,vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0};return e.processes_personal_data&&(a={...a,dataset_references:e.dataset_references,uses_profiling:e.uses_profiling,legal_basis_for_profiling:e.uses_profiling?e.legal_basis_for_profiling:void 0,does_international_transfers:e.does_international_transfers,legal_basis_for_transfers:e.does_international_transfers?e.legal_basis_for_transfers:void 0,requires_data_protection_assessments:e.requires_data_protection_assessments,dpa_location:e.requires_data_protection_assessments?e.dpa_location:void 0,privacy_policy:t,legal_name:e.legal_name,legal_address:e.legal_address,responsibility:e.responsibility,dpo:e.dpo,data_security_practices:e.data_security_practices},e.administrating_department&&(a.administrating_department=e.administrating_department),e.joint_controller_info&&(a.joint_controller_info=e.joint_controller_info)),a};var su=t(36345);let sp=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sh=[{value:"Adequacy Decision",label:"Adequacy decision"},{value:"Supplementary measures",label:"Supplementary measures"},{value:"SCCs",label:"Standard contractual clauses"},{value:"BCRs",label:"Binding corporate rules"},{value:"Other",label:"Other"}],sm=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),sx=e=>{var s;let{system:t}=e,a=t?null!==(s=t.name)&&void 0!==s?s:"this system":"your new system";return(0,n.jsxs)(l.X6q,{as:"h3",size:"lg",children:["Describe ",a]})};var sg=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:r=[]}=(0,W.K3)(),o=(0,h.T)(),d=(0,e0.mZ)({resourceType:T.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...c}=(0,eK.f)({includeDatasets:!0,includeDisabled:!1}),u=(0,p.useMemo)(()=>t?sd(t,d.customFieldValues):so,[t,d.customFieldValues]),[m]=(0,W.in)(),g=(0,p.useMemo)(()=>P.Ry().shape({name:P.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await m({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(e=>e.name!==u.name).some(s=>s.name===e)||s.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})}),privacy_policy:P.Z_().min(1).url().nullable()}),[m,u.name]),y=(0,eR.hz)(),[f,_]=(0,W.f7)(),[b,v]=(0,W.qQ)();(0,O.Rd)(void 0,{skip:!y.dictionaryService});let[j]=(0,O.qz)(),k=(0,h.C)(O.o),w=(0,h.C)(ey.gU),C=(0,p.useMemo)(()=>!!(t&&(null==r?void 0:r.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,r]),S=(0,p.useMemo)(()=>c.allDatasets?c.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[c.allDatasets]),D=(0,l.pmc)(),A=async(e,t)=>{let a,i;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await j({vendor_id:e.vendor_id});s.isError?(0,si.fn)(s.error)&&404===s.error.status||D({status:"error",description:(0,si.e$)(s.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.")}):s.data&&s.data.items.length>0&&(a=s.data.items.map(e=>{var s;return{...(0,sr.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let n=sc({...e,privacy_declarations:null!=a?a:e.privacy_declarations});i=C?await b(n):await f(n),await d.upsertCustomFields(e),(0,si.D4)(i)?D({status:"error",description:(0,si.e$)(i.error,"An unexpected error occurred while ".concat(C?"editing":"creating"," the system. Please try again."))}):(D.closeAll(),t.resetForm({values:e}),s(i.data),o((0,ey.b3)("initial")))},I=e=>{if(y.dictionaryService){if(!e){o((0,ey.b3)("hiding")),o((0,ey.gQ)(!1));return}o((0,ey.b3)("showing")),y.tcf&&(0,si.cj)(e)===si.c6.GVL?o((0,ey.gQ)(!0)):o((0,ey.gQ)(!1))}},E=v.isLoading||_.isLoading||d.isLoading;return(0,n.jsx)(Z.J9,{initialValues:u,enableReinitialize:!0,onSubmit:A,validationSchema:g,children:e=>{let{dirty:s,values:r,isValid:o}=e;return(0,n.jsxs)(Z.l0,{children:[(0,n.jsx)(x.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,n.jsxs)(l.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[a?(0,n.jsx)(sx,{system:t}):null,(0,n.jsx)(l.xvT,{fontSize:"sm",fontWeight:"medium",children:"By providing a small amount of additional context for each system we can make reporting and understanding our tech stack much easier for everyone from engineering to legal teams. So let’s do this now."}),a?(0,n.jsx)(sx,{system:t}):null,(0,n.jsxs)(e4.Z,{heading:"System details",children:[y.dictionaryService?(0,n.jsx)(su.Z,{label:"System name",options:k,onVendorSelected:I,isCreate:!t,lockedForGVL:w}):(0,n.jsx)(eO.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(null==t?void 0:t.fides_key)&&(0,n.jsx)(eO.j0,{id:"fides_key",name:"fides_key",label:"Unique ID",disabled:!0,variant:"stacked",tooltip:"An auto-generated unique ID based on the system name"}),(0,n.jsx)(sn.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:w}),(0,n.jsx)(N.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:u.tags?u.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:w})]}),(0,n.jsx)(e4.Z,{heading:"Dataset reference",children:(0,n.jsx)(N.d,{name:"dataset_references",label:"Dataset references",options:S,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:w})}),(0,n.jsx)(e4.Z,{heading:"Data processing properties",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(l.xuv,{mb:4,children:(0,n.jsx)(sn.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:w})}),(0,n.jsx)(l.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(sn.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!r.processes_personal_data||w}),(0,n.jsx)(l.UO1,{in:r.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:r.exempt_from_privacy_regulations,disabled:w})})})]})}),(0,n.jsx)(l.UO1,{in:r.processes_personal_data&&!r.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,n.jsxs)(l.Kqy,{spacing:4,mt:4,children:[(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(sn.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:w}),(0,n.jsx)(l.UO1,{in:r.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(N.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:sp,tooltip:"What is the legal basis under which profiling is performed?",disabled:w,isRequired:r.uses_profiling})})})]}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(sn.dQ,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?",disabled:w}),(0,n.jsx)(l.UO1,{in:r.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(N.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sh,tooltip:"What is the legal basis under which the data is transferred?",isRequired:r.does_international_transfers,disabled:w})})})]}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.w8,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?",variant:"stacked",isDisabled:w}),(0,n.jsx)(l.UO1,{in:r.requires_data_protection_assessments,animateOpacity:!0,children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:w,isRequired:r.requires_data_protection_assessments})})})]})]})})]})}),(0,n.jsxs)(l.UO1,{in:r.processes_personal_data&&!r.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,n.jsxs)(e4.Z,{heading:"Cookie properties",children:[(0,n.jsx)(sn.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:w}),(0,n.jsx)(sn.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:w}),(0,n.jsx)(sn.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:w}),(0,n.jsx)(sn.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:w})]}),(0,n.jsxs)(e4.Z,{heading:"Administrative properties",children:[(0,n.jsx)(eO.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,n.jsx)(sn.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:w}),(0,n.jsx)(sn.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?",disabled:w}),(0,n.jsx)(sn.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?",disabled:w}),(0,n.jsx)(eO.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||w}),(0,n.jsx)(N.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:sm,tooltip:"What is the role of the business with regard to data processing?",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||w}),(0,n.jsx)(sn.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:w}),(0,n.jsx)(eO.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||w}),(0,n.jsx)(sn.Yb,{label:"Data security practices",name:"data_security_practices",id:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?",disabled:w}),(0,n.jsx)(sn.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:w}),(0,n.jsx)(sn.Yb,{label:"Vendor deleted date",name:"vendor_deleted_date",id:"vendor_deleted_date",tooltip:"If this vendor is no longer active, it will be 'soft' deleted. When that occurs, it's deleted date will be recorded here for reporting.",disabled:!0})]}),r.fides_key?(0,n.jsx)(e0.uc,{resourceType:T.P6.SYSTEM,resourceFidesKey:r.fides_key}):null]})]}),(0,n.jsx)(l.xuv,{mt:6,children:(0,n.jsx)(l.wpx,{htmlType:"submit",type:"primary",disabled:E||!s||!o,loading:E,"data-testid":"save-btn",children:"Save"})}),i]})}})},sy=t(59003),sf=t(92222),s_=t(14481),sb=t(57454);let{useGetSystemAssetsQuery:sv,useAddSystemAssetMutation:sj,useUpdateSystemAssetsMutation:sk,useDeleteSystemAssetsMutation:sw}=t(78780).u.injectEndpoints({endpoints:e=>({getSystemAssets:e.query({query:e=>{let{fides_key:s,...t}=e;return{method:"GET",url:"/plus/system-assets/".concat(s),params:t}},providesTags:["System Assets"]}),addSystemAsset:e.mutation({query:e=>{let{systemKey:s,asset:t}=e;return{method:"POST",url:"/plus/system-assets/".concat(s,"/assets"),body:t}},invalidatesTags:["System Assets"]}),updateSystemAssets:e.mutation({query:e=>{let{systemKey:s,assets:t}=e;return{method:"PUT",url:"/plus/system-assets/".concat(s,"/assets/"),body:t}},invalidatesTags:["System Assets"]}),deleteSystemAssets:e.mutation({query:e=>{let{systemKey:s,asset_ids:t}=e;return{method:"DELETE",url:"/plus/system-assets/".concat(s,"/assets?").concat((0,v.du)(t,"asset_ids"))}},invalidatesTags:["System Assets"]})})});var sC=t(90111),sS=t(8133),sD=t(70682),sT=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[r,o,{setValue:d,setTouched:c}]=(0,Z.U$)(s),u=!!(o.touched&&o.error);return(0,n.jsx)(l.NIc,{isInvalid:u,isRequired:!0,children:(0,n.jsxs)(l.jqI,{vertical:!0,children:[(0,n.jsxs)(l.jqI,{align:"center",children:[t&&(0,n.jsx)(eO.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,n.jsx)(eW.Z,{label:i})]}),(0,n.jsx)(sD.Z,{...r,mode:"multiple",selectedTaxonomies:[],onChange:e=>{d(e)},onBlur:()=>c(!0),variant:"outlined",autoFocus:!1,status:u?"error":void 0,"data-testid":"controlled-select-".concat(s)}),(0,n.jsx)(eO.Bc,{isInvalid:u,message:o.error,fieldName:s})]})})};(a=i||(i={})).COOKIE="Cookie",a.BROWSER_REQUEST="Browser Request",a.I_FRAME="iFrame",a.JAVASCRIPT_TAG="Javascript tag",a.IMAGE="Image";let sA=P.Ry().shape({name:P.Z_().required("Enter a name for this asset"),domain:P.Z_().required("Enter a valid domain for this asset"),asset_type:P.Z_().required("Select an asset type"),data_uses:P.IX().min(1,"Select at least one category of consent"),base_url:P.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sI={name:"",description:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sE=e=>{let{isOpen:s,onClose:t,systemKey:a,asset:r,...o}=e,d=!r,[c,{isLoading:u}]=sj(),[p,{isLoading:h}]=sk(),m=(0,l.pmc)(),x=async e=>{let s=await c({systemKey:a,asset:e});if((0,si.D4)(s)){let e=(0,si.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");m((0,f.Vo)(e))}else m((0,f.t5)("Asset added successfully")),t()},g=async e=>{let s=await p({systemKey:a,assets:[e]});if((0,si.D4)(s)){let e=(0,si.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");m((0,f.Vo)(e))}else m((0,f.t5)("Asset updated successfully")),t()};return(0,n.jsx)(sS.Z,{title:d?"Add asset":"Edit asset",onClose:t,isOpen:s,...o,children:(0,n.jsx)(Z.J9,{initialValues:null!=r?r:sI,onSubmit:e=>{d?x(e):g(e)},validationSchema:sA,children:e=>{let{values:s,isValid:a,dirty:r}=e;return(0,n.jsxs)(Z.l0,{children:[(0,n.jsxs)(l.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,n.jsx)(sC.Z,{children:(0,n.jsx)(l.xvT,{fontSize:"sm",children:"Create and configure assets (e.g. cookies, pixels, tags) for this system to ensure proper consent enforcement. Adding assets manually allows you to define key attributes, assign categories, and align them with compliance requirements."})}),(0,n.jsxs)(l.jqI,{vertical:!0,gap:20,children:[(0,n.jsx)(eO.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!d}),(0,n.jsx)(N.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,si.MM)(i),layout:"stacked",disabled:!d}),(0,n.jsx)(sT,{name:"data_uses",label:"Categories of consent",layout:"stacked"}),(0,n.jsx)(eO.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!d}),(0,n.jsx)(eO.Ks,{id:"description",name:"description",label:"Description",variant:"stacked"}),(0,n.jsx)(l.UO1,{in:!!s.asset_type&&"Cookie"!==s.asset_type,children:(0,n.jsx)(eO.j0,{id:"base_url",name:"base_url",label:"Base URL",variant:"stacked",isRequired:!!s.asset_type&&"Cookie"!==s.asset_type})})]})]}),(0,n.jsxs)(l.jqI,{justify:"space-between",children:[(0,n.jsx)(l.wpx,{onClick:t,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",loading:u||h,disabled:!a||!r,"data-testid":"save-btn",children:"Save"})]})]})}})})},sq=t(8411),sz=t(72625),sR=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:r}]=sw(),o=(0,l.pmc)(),{isOpen:d,onClose:c,onOpen:u}=(0,l.qY0)(),p=async()=>{let e=await i({systemKey:t,asset_ids:[s.id]});(0,em.D4)(e)?o((0,f.Vo)((0,si.e$)(e.error,"A problem occurred removing this asset. Please try again"))):o((0,f.t5)("Asset removed successfully"))};return(0,n.jsxs)(l.jqI,{className:"gap-1",children:[(0,n.jsx)(l.wpx,{size:"small",onClick:a,"data-testid":"edit-btn",children:"Edit"}),(0,n.jsx)(l.wpx,{size:"small",onClick:u,loading:r,"data-testid":"remove-btn",children:"Remove"}),(0,n.jsx)(l.cVQ,{isOpen:d,onClose:c,onConfirm:p,title:"Remove asset",message:"Are you sure you want to ignore the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]})},sF=t(34929),sL=e=>{var s;let{values:t}=e,{getDataUseDisplayName:a}=(0,sF.Z)(),i=null!==(s=null==t?void 0:t.map(e=>({label:a(e),key:e})))&&void 0!==s?s:[];return(0,n.jsx)(sz.mb,{values:i})},sO=e=>{let{systemKey:s,onEditClick:t}=e,a=(0,sf.Cl)();return[a.display({id:"select",cell:e=>{let{row:s}=e;return(0,n.jsx)(sz.k,{isChecked:s.getIsSelected(),onChange:s.getToggleSelectedHandler(),dataTestId:"select-".concat(s.original.name||s.id)})},header:e=>{let{table:s}=e;return(0,n.jsx)(sz.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40,meta:{cellProps:{borderRight:"none",paddingRight:0}}}),a.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(s_.G3,{value:e.getValue()}),header:"Asset"}),a.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,n.jsx)(s_.G3,{value:e.getValue()}),header:"Type"}),a.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,n.jsx)(sL,{values:e.getValue()}),header:"Categories of consent"}),a.accessor(e=>e.locations,{id:"locations",cell:e=>(0,n.jsx)(sz.mb,{values:e.getValue().map(e=>({label:sq.Z8[e],key:e}))}),header:"Locations",meta:{width:"auto"}}),a.accessor(e=>e.domain,{id:"domain",cell:e=>(0,n.jsx)(s_.G3,{value:e.getValue()}),header:"Domain"}),a.accessor(e=>e.page,{id:"page",cell:e=>(0,n.jsx)(sz.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,n.jsx)(sz.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),a.display({id:"actions",cell:e=>{let{row:a}=e;return(0,n.jsx)(sR,{asset:a.original,systemKey:s,onEditClick:()=>t(a.original)})},header:"Actions"})]},sW=e=>{let{system:s}=e,{PAGE_SIZES:t,pageSize:a,setPageSize:i,onPreviousPageClick:r,isPreviousPageDisabled:o,onNextPageClick:d,isNextPageDisabled:c,startRange:u,endRange:h,pageIndex:m,setTotalPages:x,resetPageIndexToDefault:g}=(0,s_.oi)(),[y,_]=(0,p.useState)(""),[b,v]=(0,p.useState)(void 0),[j,k]=(0,p.useState)({}),[w]=sw(),C=(0,l.pmc)(),{data:S,isLoading:D,isFetching:T}=sv({fides_key:s.fides_key,search:y,page:m,size:a}),{isOpen:A,onClose:I,onOpen:E}=(0,l.qY0)(),{isOpen:q,onClose:z,onOpen:R}=(0,l.qY0)();(0,p.useEffect)(()=>{g()},[y,g]),(0,p.useEffect)(()=>{x(null==S?void 0:S.pages)},[S,x]);let F=sO({systemKey:s.fides_key,onEditClick:e=>{v(e),E()}}),L=(0,sy.b7)({getCoreRowModel:(0,sf.sC)(),columns:F,manualPagination:!0,data:(null==S?void 0:S.items)||[],columnResizeMode:"onChange",onRowSelectionChange:k,state:{rowSelection:j}}),O=L.getSelectedRowModel().rows.map(e=>e.original.id),W=async()=>{let e=await w({systemKey:s.fides_key,asset_ids:O});(0,em.D4)(e)?C((0,f.Vo)((0,si.e$)(e.error,"A problem occurred removing these assets. Please try again."))):(L.resetRowSelection(),C((0,f.t5)("Assets removed successfully"))),z()};return s?D?(0,n.jsx)(s_.I4,{rowHeight:36,numRows:36}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s_.Q$,{children:[(0,n.jsx)(sb.M,{value:y,onChange:_}),(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.mm_,{}),iconPosition:"end",onClick:E,"data-testid":"add-asset-btn",children:"Add asset"}),(0,n.jsx)(sE,{isOpen:A,onClose:()=>{v(void 0),I()},systemKey:s.fides_key,asset:b}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.ZNm,{}),iconPosition:"end",onClick:R,disabled:!O.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,n.jsx)(l.cVQ,{isOpen:q,onClose:z,onConfirm:W,title:"Remove assets",message:"Are you sure you want to remove the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]}),(0,n.jsx)(s_.ZK,{tableInstance:L,emptyTableNotice:(0,n.jsx)(l.oj8,{image:l.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,n.jsx)(s_.s8,{totalRows:(null==S?void 0:S.total)||0,pageSizes:t,setPageSize:i,onPreviousPageClick:r,isPreviousPageDisabled:o||T,onNextPageClick:d,isNextPageDisabled:c||T,startRange:u,endRange:h})]}):null};let sZ={INFORMATION:{index:0,hash:"#information"},DATA_USES:{index:1,hash:"#data-uses"},DATA_FLOW:{index:2,hash:"#data-flow"},INTEGRATIONS:{index:3,hash:"#integrations"},ASSETS:{index:4,hash:"#assets"},HISTORY:{index:5,hash:"#history"}},sP=e=>{let s=e.startsWith("#")?e:"#".concat(e);return Object.values(sZ).find(e=>e.hash===s)},sN=e=>Object.values(sZ).find(s=>s.index===e),sU=e=>{let{onViewDatamap:s,onAddPrivacyDeclaration:t}=e;return(0,n.jsxs)(l.xuv,{children:[(0,n.jsx)(l.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,n.jsxs)(l.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,n.jsx)(_.Z,{onClick:s,children:"view it now"})," and come back to finish this setup when you’re ready. Or you can progress to"," ",(0,n.jsx)(_.Z,{onClick:t,children:"adding your privacy declarations in the next tab"}),"."]})]})};var sV=e=>{var s,t;let{isCreate:a}=e,i=(0,c.useRouter)(),[o,u]=(0,p.useState)((()=>{var e,s;let t=i.asPath.split("#")[1];return t&&null!==(s=null===(e=sP(t))||void 0===e?void 0:e.index)&&void 0!==s?s:sZ.INFORMATION.index})()),[_,b]=(0,p.useState)(!1),{systemOrDatamapRoute:v}=(0,g.V)(),j=(0,l.pmc)(),k=(0,h.T)(),w=(0,h.C)(W.NC),[C,S]=(0,p.useState)(void 0),{plus:D}=(0,m.hz)(),{flags:{dataDiscoveryAndDetection:T,webMonitor:A}}=(0,m.Vb)(),{plus:I}=(0,m.hz)(),{data:E}=(0,W.rn)(null==w?void 0:w.fides_key,{skip:!w});(0,p.useEffect)(()=>{k((0,W.db)(E))},[E,k]),(0,p.useEffect)(()=>{w&&S(w.processes_personal_data)},[w]);let q=(0,p.useCallback)(e=>{void 0===w&&b(!0),k((0,W.db)(e)),i.push({pathname:y.Dv,query:{id:e.fides_key}});let s={...f.MA,description:(0,n.jsx)(sU,{onViewDatamap:()=>{i.push(v).then(()=>{j.closeAll()})},onAddPrivacyDeclaration:()=>{u(1),j.closeAll()}})};j({...s})},[w,k,i,v,j]);(0,p.useEffect)(()=>(a&&(k((0,W.db)(void 0)),k((0,ey.b3)("initial")),k((0,ey.gQ)(!1))),()=>{k((0,W.db)(void 0))}),[k,a]);let{attemptAction:z}=(0,x.oI)(),R=(0,p.useCallback)(e=>{z().then(async s=>{if(s){let{status:s}=i.query;if(s&&("succeeded"===s?j((0,f.t5)("Integration successfully authorized.")):j((0,f.Vo)("Failed to authorize integration."))),u(e),i.isReady){let s=sN(e);if(s){let e={...i.query};delete e.status,await i.replace({pathname:i.pathname,query:e,hash:s.hash},void 0,{shallow:!0})}}}})},[z,i,j]);(0,p.useEffect)(()=>{let{status:e}=i.query;e&&R(sZ.INTEGRATIONS.index)},[i.query,R]);let F=[{label:"Information",content:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xuv,{px:6,mb:9,children:[(0,n.jsx)(x.eB,{}),(0,n.jsx)(sg,{onSuccess:q,system:w})]}),_?(0,n.jsx)(l.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,n.jsxs)(l.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,n.jsx)(l.rUS,{as:d(),href:v,textDecor:"underline",children:"ready to view in your data map"}),". You can return to this setup at any time to add privacy declarations to this system."]})}):null]})},{label:"Data uses",content:w?(0,n.jsx)(l.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,n.jsx)(sa,{system:w})}):null,isDisabled:!w||!C},{label:"Data flow",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsxs)(l.xuv,{px:6,paddingBottom:2,children:[(0,n.jsx)(l.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,n.jsx)(l.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"Data flow describes the flow of data between systems in your Data Map. Below, you can configure Source and Destination systems and the corresponding links will be drawn in the Data Map graph. Source systems are systems that send data to this system while Destination systems receive data from this system."})]}),(0,n.jsx)(r.q,{system:w,isSystemTab:!0})]}):null,isDisabled:!w},{label:"Integrations",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(l.xuv,{px:6,paddingBottom:2,children:(0,n.jsx)(l.xvT,{fontSize:"sm",lineHeight:5,children:I&&T?(0,n.jsxs)(n.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,n.jsx)(l.rUS,{href:y.KH,color:"link.900",children:"Integration Management"})," ","to set up monitoring on databases."]}):"Integrations are used to process privacy requests for access erasure, portability, rectification, and consent."})}),(0,n.jsx)(ep,{connectionConfig:w.connection_configs,systemFidesKey:w.fides_key}),(null===(s=w.connection_configs)||void 0===s?void 0:s.key)&&(0,n.jsx)(eg,{m:6,connectionKey:null===(t=w.connection_configs)||void 0===t?void 0:t.key})]}):null,isDisabled:!w}];return D&&A&&F.push({label:"Assets",content:w?(0,n.jsx)(sW,{system:w}):null,isDisabled:!w}),D&&F.push({label:"History",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(l.xuv,{px:6,paddingBottom:6,children:(0,n.jsx)(l.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"All changes to this system are tracked here in this audit table by date and by user. You can inspect the changes by selecting any of the events listed."})}),(0,n.jsx)(eH,{system:w})]}):null,isDisabled:!w}),{tabData:F,tabIndex:o,onTabChange:R}}},54748:function(e,s,t){var a=t(27378),i=t(21702);s.Z=()=>({legalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},28325:function(e,s,t){var a=t(27378),i=t(21702);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3320],{3320:function(e,n,i){i.d(n,{Z:function(){return S}});var t=i(24246),a=i(56351),o=i(34090),l=i(86677),r=i(27378),s=i(59389),d=i(16134),c=i(812);let p=(0,a.IUT)({displayName:"DesktopIcon",viewBox:"0 0 24 24",path:(0,t.jsx)("path",{fill:"currentColor",d:"M20.5556 4.05556H3.44444C3.10833 4.05556 2.83333 4.33056 2.83333 4.66667V12H21.1667V4.66667C21.1667 4.33056 20.8917 4.05556 20.5556 4.05556ZM23 12V13.8333V15.6667C23 17.0149 21.9038 18.1111 20.5556 18.1111H14.9142L15.2198 19.9445H17.1944C17.7024 19.9445 18.1111 20.3531 18.1111 20.8611C18.1111 21.3691 17.7024 21.7778 17.1944 21.7778H14.4444H9.55556H6.80556C6.29757 21.7778 5.88889 21.3691 5.88889 20.8611C5.88889 20.3531 6.29757 19.9445 6.80556 19.9445H8.78021L9.08576 18.1111H3.44444C2.09618 18.1111 1 17.0149 1 15.6667V13.8333V12V4.66667C1 3.31841 2.09618 2.22223 3.44444 2.22223H20.5556C21.9038 2.22223 23 3.31841 23 4.66667V12ZM2.83333 13.8333V15.6667C2.83333 16.0028 3.10833 16.2778 3.44444 16.2778H10.1476C10.159 16.2778 10.1705 16.2778 10.1781 16.2778H13.8142C13.8257 16.2778 13.8372 16.2778 13.8448 16.2778H20.5556C20.8917 16.2778 21.1667 16.0028 21.1667 15.6667V13.8333H2.83333ZM10.6365 19.9445H13.3597L13.0542 18.1111H10.942L10.6365 19.9445Z"})}),u=(0,a.IUT)({displayName:"MobileIcon",viewBox:"0 0 24 24",path:(0,t.jsx)("path",{fill:"currentColor",d:"M6.5 20.25C6.5 20.6281 6.80938 20.9375 7.1875 20.9375H16.8125C17.1906 20.9375 17.5 20.6281 17.5 20.25V16.8125H6.5V20.25ZM6.5 14.75H17.5V3.75C17.5 3.37188 17.1906 3.0625 16.8125 3.0625H7.1875C6.80938 3.0625 6.5 3.37188 6.5 3.75V14.75ZM4.4375 3.75C4.4375 2.2332 5.6707 1 7.1875 1H16.8125C18.3293 1 19.5625 2.2332 19.5625 3.75V20.25C19.5625 21.7668 18.3293 23 16.8125 23H7.1875C5.6707 23 4.4375 21.7668 4.4375 20.25V3.75ZM12 17.8438C12.2735 17.8438 12.5358 17.9524 12.7292 18.1458C12.9226 18.3392 13.0312 18.6015 13.0312 18.875C13.0312 19.1485 12.9226 19.4108 12.7292 19.6042C12.5358 19.7976 12.2735 19.9062 12 19.9062C11.7265 19.9062 11.4642 19.7976 11.2708 19.6042C11.0774 19.4108 10.9688 19.1485 10.9688 18.875C10.9688 18.6015 11.0774 18.3392 11.2708 18.1458C11.4642 17.9524 11.7265 17.8438 12 17.8438Z"})});var v=i(77830),_=i(46628),m=i(7426),b=i(60325),f=i(34334),g=i(13083),y=i.n(g),h=i(43218),x=i.n(h),w=i(52253),C=i(48515),k=i(21702);let j={language:k.eU.EN,accept_button_label:"Accept",acknowledge_button_label:"OK",banner_description:"",banner_title:"",purpose_header:"",description:"Description",privacy_policy_link_label:"",privacy_policy_url:"",modal_link_label:"",privacy_preferences_link_label:"Privacy preferences",reject_button_label:"Reject All",save_button_label:"Save",title:"Manage your consent preferences",is_default:!0},V=e=>({...j,...e.translations?e.translations[0]:{}}),A=(e,n)=>{var i,t,a,o;return{options:{debug:!1,geolocationApiUrl:"",isGeolocationEnabled:!1,isOverlayEnabled:!0,isPrefetchEnabled:!1,overlayParentId:w.Vk,modalLinkId:null,privacyCenterUrl:"http://localhost:3000",fidesApiUrl:"http://localhost:8080/api/v1",preventDismissal:null!==(o=e.dismissable)&&void 0!==o&&o,allowHTMLDescription:!0,fidesString:null,fidesJsBaseUrl:"",base64Cookie:!1,fidesLocale:null===(t=e.translations)||void 0===t?void 0:null===(i=t[0])||void 0===i?void 0:i.language,fidesClearCookie:!0},experience:{id:"pri_111",region:"us_ca",component:"banner_and_modal",available_locales:null===(a=e.translations)||void 0===a?void 0:a.map(e=>e.language),experience_config:{id:"pri_222",regions:["us_ca"],component:"banner_and_modal",disabled:!1,is_default:!0,dismissable:e.dismissable,show_layer1_notices:!1,layer1_button_options:C.O.OPT_IN_OPT_OUT,allow_language_selection:!0,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0,language:"en",translations:[V(e)]},privacy_notices:n},geolocation:{country:"US",location:"US-CA",region:"CA"}}},N=e=>{let{language:n,is_default:i,...t}=j,a=Object.keys(t).map(n=>{let i=e[n];return{[n]:void 0!==i?i:j[n]}}).reduce((e,n)=>({...e,...n}),{});return{language:e.language,is_default:e.is_default,...a}};var E=i(71922),D=i(32222);let H=e=>{let{title:n,description:i}=e;return(0,t.jsx)(a.kCb,{h:"full",justify:"center",align:"center",children:(0,t.jsxs)(a.kCb,{bgColor:"white",borderRadius:"md",p:6,boxShadow:"md",direction:"column",align:"center",gap:"2",maxW:"512px","data-testid":"no-preview-notice",children:[(0,t.jsx)(a.xvT,{fontSize:"lg",fontWeight:"500",align:"center",children:n}),(0,t.jsx)(a.xvT,{color:"gray.500",align:"center",children:i})]})})};var O=e=>{var n;let{allPrivacyNotices:i,initialValues:l,translation:s,isMobilePreview:d}=e,{values:p}=(0,o.u6)(),[u,v]=(0,r.useState)([]),_=[k.re.BANNER_AND_MODAL,k.re.MODAL].includes(p.component),m=(0,a.pmc)(),[b]=(0,E.Je)(),f=async e=>{let n=await b(e);n.isError&&m({status:"error",description:(0,c.e$)(n.error,"A problem occurred while fetching privacy notice data. Some notices may not display correctly on the preview.")});let{data:i}=await b(e);return i};(0,r.useEffect)(()=>{p.privacy_notice_ids&&p.component!==k.re.TCF_OVERLAY?Promise.all(p.privacy_notice_ids.map(e=>f(e))).then(e=>v(e.filter(e=>void 0!==e))):v([])},[p.privacy_notice_ids]);let g=(0,r.useMemo)(()=>A(l,u),[l,u]);(0,r.useEffect)(()=>{var e,n,i,t;p.component===k.re.MODAL&&(g.experience.experience_config.component=k.re.MODAL);let a=null===(e=p.translations)||void 0===e?void 0:e.find(e=>e.language===(null==s?void 0:s.language));(null===(n=p.translations)||void 0===n?void 0:n.length)&&(a?(g.experience.available_locales=[...g.experience.available_locales||[],a.language],g.experience.experience_config.translations[0]=N(a),g.options.fidesLocale=a.language):p.translations&&(g.experience.experience_config.translations[0]=N(p.translations[0]),g.options.fidesLocale=p.translations[0].language)),g.experience.experience_config.show_layer1_notices=!!(null===(i=p.privacy_notice_ids)||void 0===i?void 0:i.length)&&!!p.show_layer1_notices,g.experience.experience_config.layer1_button_options=p.component===k.re.BANNER_AND_MODAL&&p.layer1_button_options||C.O.OPT_IN_OPT_OUT,g.options.preventDismissal=!p.dismissable,window.Fides&&(null===(t=p.privacy_notice_ids)||void 0===t?void 0:t.length)&&_&&window.Fides.init(g)},[p,s,g,i,_]);let h=document.getElementById("fides-modal");return(h&&h.removeAttribute("tabindex"),_)?(null===(n=p.privacy_notice_ids)||void 0===n?void 0:n.length)?(0,t.jsxs)(a.kCb,{h:"full",justify:"center",align:"center",overflow:"scroll",children:[(0,t.jsx)(y(),{id:"905800c62191633b",dynamic:[w.Vk],children:"div#fides-overlay{z-index:5000!important}div#".concat(w.Vk,"{padding-top:45px;margin:auto!important;pointer-events:none}div#fides-banner-container{position:static!important;-webkit-transform:none!important;-moz-transform:none!important;-ms-transform:none!important;-o-transform:none!important;transform:none!important;-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}div#fides-banner-container.fides-banner-hidden{display:none}.fides-modal-container{background-color:unset!important;position:static!important;display:none!important}.fides-modal-overlay{background-color:inherit!important;position:static!important;display:none!important}div.fides-modal-content{position:relative!important;-webkit-transform:none!important;-moz-transform:none!important;-ms-transform:none!important;-o-transform:none!important;transform:none!important;left:initial!important;top:initial!important}div.fides-modal-footer{width:unset}")}),_?(0,t.jsx)("style",{children:"div#fides-modal {\n display: flex !important;\n justify-content: center;\n background-color: unset;\n ".concat(p.component===k.re.BANNER_AND_MODAL?"padding-top: 3rem; padding-bottom: 3rem;":"","\n }")}):null,d?(0,t.jsx)("style",{children:"\n div#".concat(w.Vk," {\n width: 70% !important;\n }\n div.fides-modal-button-group {\n flex-direction: column !important;\n }\n div#fides-modal {\n width: 70% !important;\n margin: auto;\n }\n div#fides-banner {\n padding: 24px;\n width: 100%;\n }\n\n div#fides-banner-description {\n margin-bottom: 0px;\n }\n\n div#fides-banner-inner div#fides-button-group {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n padding-top: 24px;\n }\n\n .fides-banner-button-group {\n flex-direction: column;\n width: 100%;\n }\n\n button.fides-banner-button {\n margin: 0px;\n width: 100%;\n }\n\n div#fides-banner-inner-container {\n display: flex;\n flex-direction: column;\n max-height: 50vh;\n overflow-y: auto;\n scrollbar-gutter: stable;\n }\n\n div#fides-privacy-policy-link {\n order: 1;\n width: 100%;\n }\n .fides-modal-footer {\n max-width: 100%;\n }\n .fides-banner-secondary-actions {\n flex-direction: column-reverse;\n gap: 12px;\n }\n ")}):(0,t.jsx)("style",{children:"\n div#fides-banner {\n width: 90% !important;\n }\n "}),(0,t.jsx)(x(),{id:"fides-js-base",src:"/lib/fides.js",onReady:()=>{if(_){var e;null===(e=window.Fides)||void 0===e||e.init(g)}}}),(0,t.jsx)("div",{id:w.Vk,className:y().dynamic([["905800c62191633b",[w.Vk]]])})]}):(0,t.jsx)(H,{title:"No privacy notices added",description:'To view a preview of this experience, add a privacy notice under "Privacy Notices" to the left.'}):(0,t.jsx)(H,{title:"".concat(D.J.get(p.component)," preview not available"),description:"There is no preview available for ".concat(D.J.get(p.component),". You can edit the available settings\n and languages to the left.")})},M=i(94315),Z=i(16194),T=i(16277),L=i(31883);let P=e=>s.Ry().shape({title:s.Z_().required().label("Title"),description:s.Z_().required().label("Description"),accept_button_label:s.Z_().required().label("Accept button label"),reject_button_label:s.Z_().required().label("Reject button label"),save_button_label:s.Z_().required().label("Save button label"),acknowledge_button_label:s.Z_().required().label("Acknowledge button label"),privacy_policy_url:s.Z_().url().nullable().label("Privacy policy URL"),is_default:s.O7(),privacy_preferences_link_label:e?s.Z_().required().label("Privacy preferences link label"):s.Z_().nullable().label("Privacy preferences link label")}),R=s.Ry().shape({name:s.Z_().required().label("Experience name"),component:s.Z_().required().label("Experience type"),translations:s.IX().when("component",{is:e=>e===k.re.BANNER_AND_MODAL||e===k.re.TCF_OVERLAY,then:e=>e.of(P(!0)),otherwise:e=>e.of(P(!1))})});var S=e=>{var n;let{passedInExperience:i,passedInTranslations:s}=e,[g]=(0,M.mJ)(),[y]=(0,M.$d)(),h=(0,a.pmc)(),[x,w]=(0,r.useState)(!1),C=(0,l.useRouter)(),{data:k}=(0,m.tB)({api_set:!1}),j=null==k?void 0:null===(n=k.plus_consent_settings)||void 0===n?void 0:n.enable_translations,V=(0,d.C)(f.Zp),A=(0,d.C)(f.G1);(0,f.Ah)({page:V,size:A});let N=(0,d.C)(f.fJ),D=(0,d.C)(E.sX),H=i?{...b.DD,...(0,b.Uv)(i)}:b.DD,P=async e=>{var n,t;let a;e.privacy_notice_ids=null===(n=e.privacy_notice_ids)||void 0===n?void 0:n.filter(e=>"tcf_purposes_placeholder"!==e);let o={...e,disabled:null===(t=null==i?void 0:i.disabled)||void 0===t||t,allow_language_selection:e.translations&&e.translations.length>1};if(i){let{component:e,...n}=o;a=await y({...n,id:i.id})}else a=await g(o);(0,L.D4)(a)?h((0,_.Vo)((0,c.e$)(a.error))):(h((0,_.t5)("Privacy experience successfully ".concat(i?"updated":"created"))),C.push(v.w0))},[S,B]=(0,r.useState)(void 0),[U,I]=(0,r.useState)(!1);return(0,t.jsx)(o.J9,{initialValues:H,enableReinitialize:!0,onSubmit:P,validationSchema:R,children:(0,t.jsx)(o.l0,{style:{height:"100vh"},children:(0,t.jsxs)(a.kCb,{w:"full",h:"full",direction:"row","data-testid":"privacy-experience-detail-page",children:[S?(0,t.jsx)(T.Z,{translation:S,translationsEnabled:j,isOOB:U,onReturnToMainForm:()=>{B(void 0),I(!1)}}):(0,t.jsx)(Z.d0,{allPrivacyNotices:D,translationsEnabled:j,onSelectTranslation:e=>{B({...e,name:(0,b.Go)(e,N)})},onCreateTranslation:e=>{let n=null==s?void 0:s.find(n=>n.language===e);return n&&I(!0),null!=n?n:{language:e,is_default:!1}}}),(0,t.jsxs)(a.kCb,{direction:"column",w:"75%",bgColor:"gray.50",overflowY:"hidden",children:[(0,t.jsxs)(a.kCb,{direction:"row",p:4,align:"center",bgColor:"white",borderBottom:"1px solid #DEE5EE",children:[(0,t.jsx)(a.xvT,{fontSize:"md",fontWeight:"semibold",children:"PREVIEW"}),(0,t.jsx)(a.LZC,{}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(a.wpx,{icon:(0,t.jsx)(u,{}),"aria-label":"View mobile preview",onClick:()=>w(!0),className:x?"bg-gray-200":void 0}),(0,t.jsx)(a.wpx,{icon:(0,t.jsx)(p,{}),"aria-label":"View desktop preview",onClick:()=>w(!1),className:x?void 0:"bg-gray-200"})]})]}),(0,t.jsx)(O,{allPrivacyNotices:D,initialValues:H,translation:S,isMobilePreview:x})]})]})})})}},32222:function(e,n,i){i.d(n,{J:function(){return t}});let t=new Map([["overlay","Overlay"],["privacy_center","Privacy center"],["tcf_overlay","TCF overlay"],["modal","Modal"],["banner_and_modal","Banner and modal"],["headless","Headless"]])},31883:function(e,n,i){i.d(n,{Bw:function(){return t.Bw},D4:function(){return t.D4}});var t=i(19043)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[355],{77213:function(e,t,a){a.d(t,{Z:function(){return h}});var s=a(24246),i=a(56351),n=a(88038),r=a.n(n),l=a(86677);a(27378);var o=a(25980),d=a(90867),c=a(77830),u=()=>{let e=(0,l.useRouter)();return(0,s.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(i.xuv,{children:[(0,s.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(i.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,s.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:t,title:a,padded:n=!0,mainProps:c}=e,h=(0,o.hz)(),m=(0,l.useRouter)(),x="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,v=!(h.flags.privacyRequestsConfiguration&&x),{data:p}=(0,d.JE)(void 0,{skip:v}),{data:f}=(0,d.PW)(void 0,{skip:v}),g=h.flags.privacyRequestsConfiguration&&(!p||!f)&&x;return(0,s.jsxs)(i.kCb,{"data-testid":a,direction:"column",h:"100vh",children:[(0,s.jsxs)(r(),{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.jsxs)(i.kCb,{as:"main",direction:"column",py:n?6:0,px:n?10:0,h:n?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[g?(0,s.jsx)(u,{}):null,t]})]})}},8133:function(e,t,a){var s=a(24246),i=a(56351);t.Z=e=>{let{title:t,children:a,isOpen:n,onClose:r,...l}=e;return(0,s.jsxs)(i.u_l,{isOpen:n,onClose:r,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...l,children:[(0,s.jsx)(i.ZAr,{}),(0,s.jsxs)(i.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,s.jsx)(i.xBx,{p:0,children:(0,s.jsx)(i.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,s.jsx)(i.X6q,{as:"h3",size:"sm",children:t})})}),(0,s.jsx)(i.fef,{pb:4,overflow:"auto",children:a})]})]})}},33335:function(e,t,a){a.d(t,{E:function(){return s}});let s=e=>e.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9._<>-]/g,"")},72774:function(e,t,a){a.d(t,{Z:function(){return r}});var s=a(24246),i=a(56351),n=e=>{let{title:t,description:a,button:n}=e;return(0,s.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:[(0,s.jsx)(i.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,s.jsxs)(i.xuv,{flexGrow:1,children:[(0,s.jsx)(i.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:t}),(0,s.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:a})]}),n]})},r=()=>(0,s.jsx)(i.xuv,{mb:"6",maxW:"720px","data-testid":"locked-for-GVL-notice",children:(0,s.jsx)(n,{title:"This system is part of the TCF Global Vendor List (GVL)",description:(0,s.jsxs)(s.Fragment,{children:["As a result, the system fields are not editable as they come directly from Fides Compass and the Global Vendor List (GVL). In some cases where the legal basis has been declared to be flexible, you may update the legal basis for particular data uses."," ",(0,s.jsx)(i.rUS,{href:"https://fid.es/tcf_gvl",isExternal:!0,color:"complimentary.500",children:"For more information on the Global Vendor List, click here."})]})})})},36345:function(e,t,a){a.d(t,{Z:function(){return p}});var s=a(24246),i=a(56351),n=a(34090),r=a(27378),l=a(16134),o=a(40324);let d=(0,i.IUT)({displayName:"CompassIcon",viewBox:"0 0 512 512",path:(0,s.jsx)("path",{fill:"currentColor",d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm306.7 69.1L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})});var c=a(91613),u=a(57865);let{Text:h}=i.AntTypography,m=e=>{let{searchText:t,suggestion:a,...i}=e;return t&&a?(0,s.jsxs)(h,{"aria-hidden":!0,style:{pointerEvents:"none",position:"absolute",zIndex:10,top:"var(--ant-line-width)",bottom:"var(--ant-line-width)",left:"var(--ant-padding-sm)",lineHeight:"calc(var(--ant-control-height) - var(--ant-line-width))"},...i,children:[(0,s.jsx)(h,{className:"text-transparent",children:t}),(0,s.jsx)(h,{type:"secondary",children:a.substring(t.length)})]}):null},x="Create new system",v=e=>{let{active:t,disabled:a,onRefreshSuggestions:n}=e,r={bg:t?"complimentary.500":"gray.100"};return(0,s.jsxs)(i.gCW,{children:[(0,s.jsx)(i.LZC,{minHeight:"18px"}),(0,s.jsxs)(i.v2r,{children:[(0,s.jsx)(i.j2t,{as:i.hU,size:"sm",isDisabled:a,icon:(0,s.jsx)(d,{color:t?"white":"gray.700",boxSize:4}),"aria-label":"Update information from Compass","data-testid":"refresh-suggestions-btn",_hover:{_disabled:r},...r}),(0,s.jsx)(i.qyq,{children:(0,s.jsx)(i.sNh,{onClick:n,children:(0,s.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,children:"Reset to Compass defaults"})})})]})]})};var p=e=>{var t,a;let{label:d,isCreate:h,lockedForGVL:p,options:f,isLoading:g,onVendorSelected:b}=e,j=(0,l.C)(u.bN),[y,_,{setValue:C}]=(0,n.U$)("name"),w=!!(_.touched&&_.error),k={...y,value:null!==(t=y.value)&&void 0!==t?t:""},{touched:z,values:E,setTouched:I,setFieldValue:L,validateForm:R}=(0,n.u6)(),[S,T]=(0,r.useState)(!0),N=null!==(a=f.find(e=>e.value===k.value))&&void 0!==a?a:{label:k.value,value:k.value,description:""},W=(e,t)=>!!(null==t?void 0:t.label.toLowerCase().startsWith(e.toLowerCase())),[q,F]=(0,r.useState)(""),U=(0,r.useMemo)(()=>f.filter(e=>W(q,e)),[f,q]),Z=(0,r.useMemo)(()=>{let e=f;return h&&q&&(e=[...f,{label:"".concat(x,' "').concat(q,'"...'),value:q}]),e},[h,f,q]),A=!!q&&U.length>0,B=p&&!h;(0,r.useEffect)(()=>{T(!k.value&&!E.vendor_id)},[k.value,E.vendor_id,T]),(0,r.useEffect)(()=>{R()},[S,R]);let G=async()=>{F(""),L("vendor_id",void 0),await C(""),I({...z,vendor_id:!1,name:!1}),b(void 0)},V=async e=>{if(e){let t=f.some(t=>t.value===e.value)?e.value:void 0;L("vendor_id",t),await C(e.label.startsWith(x)?e.value:e.label),I({...z,vendor_id:!0,name:!0}),b(t)}},M=async e=>{k.onBlur(e),q&&await C(q),I({...z,name:!0})},P=async e=>{U.length>0&&q!==U[0].label?(e.preventDefault(),F(U[0].label),L("vendor_id",U[0].value),await C(U[0].label),b(U[0].value)):(L("vendor_id",void 0),await C(q)),I({...z,name:!0})},H=(0,s.jsx)(i.NIc,{isInvalid:w,isRequired:!0,width:"100%",children:(0,s.jsxs)(i.gCW,{alignItems:"start",position:"relative",width:"100%",children:[(0,s.jsxs)(i.Ugi,{spacing:1,children:[(0,s.jsx)(o.__,{htmlFor:"vendorName",fontSize:"xs",my:0,mr:1,children:d}),(0,s.jsx)(c.Z,{label:"Enter the system name"})]}),(0,s.jsxs)(i.xuv,{width:"100%",className:"relative",children:[(0,s.jsx)(i.WPr,{id:"vendorName",labelInValue:!0,autoFocus:!0,allowClear:!0,options:Z,loading:g,filterOption:(e,t)=>W(e,t)||!!(null==t?void 0:t.label.startsWith(x)),optionFilterProp:"label",value:N,placeholder:"Enter system name...",disabled:B,onChange:V,onSearch:F,onClear:G,onBlur:M,onInputKeyDown:e=>{q&&"Tab"===e.key&&P(e)},status:w?"error":void 0,"data-testid":"vendor-name-select"}),(0,s.jsx)(m,{searchText:q,suggestion:U.length?U[0].label:""})]}),(0,s.jsx)(o.Bc,{isInvalid:w,message:_.error,fieldName:"name"})]})});return(0,s.jsxs)(i.Ugi,{alignItems:"flex-start",width:"full",children:[S?H:(0,s.jsx)(o.j0,{autoFocus:!0,id:"name",name:"name",label:"System name",tooltip:"Enter the system name",variant:"stacked",disabled:B,isRequired:!0,inputRightElement:B?null:(0,s.jsx)(i.PZ7,{onClick:G,size:"sm","data-testid":"clear-btn"})}),(0,s.jsx)(v,{active:!!E.vendor_id||A,disabled:!E.vendor_id||"showing"===j,onRefreshSuggestions:()=>b(E.vendor_id)})]})}},69525:function(e,t,a){a.d(t,{U:function(){return s}});let s=e=>{var t;let a=e.data_categories.flatMap(e=>e.split(","));return{data_use:e.data_use,data_categories:a,features:e.features,legal_basis_for_processing:e.legal_basis_for_processing,flexible_legal_basis_for_processing:e.flexible_legal_basis_for_processing,retention_period:e.retention_period?e.retention_period:"",cookies:null===(t=e.cookies)||void 0===t?void 0:t.map(e=>({name:e.name,domain:e.domain,path:e.path}))}}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3662],{58754:function(e,t,n){var r=n(24246),i=n(56351),l=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:o=!0,children:s,rightContent:a,style:d,...c}=e;return(0,r.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,r.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(i.X6q,{className:n||s?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,a&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!n&&(0,r.jsx)(l.m,{className:s?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),s]})}},19904:function(e,t,n){n.d(t,{Tg:function(){return o}});var r=n(24246),i=n(16134),l=n(31793);let o=e=>(0,i.C)(l.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return o(t)?(0,r.jsx)(r.Fragment,{children:n}):null}},97181:function(e,t,n){n.d(t,{d:function(){return d}});var r=n(24246),i=n(56351),l=n(34090),o=n(27378),s=n(91613),a=n(40324);let d=e=>{let{name:t,label:n,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",...x}=e,[h,m,{setValue:f}]=(0,l.U$)(t),g=!!(m.touched&&m.error),[y,j]=(0,o.useState)("");h.value||"tags"!==x.mode&&"multiple"!==x.mode||(h.value=[]),"tags"===x.mode&&"string"==typeof h.value&&(h.value=[h.value]);let v="tags"===x.mode?(e,t)=>e?e.value!==y||h.value.includes(y)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:x.optionRender||void 0,b=e=>{j(e),x.onSearch&&x.onSearch(e)},C=(e,t)=>{f(e),x.onChange&&x.onChange(e,t)};return"inline"===p?(0,r.jsx)(i.NIc,{isInvalid:g,isRequired:u,children:(0,r.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,r.jsx)(a.__,{htmlFor:x.id||t,...d,children:n}):null,(0,r.jsxs)(i.jqI,{align:"center",children:[(0,r.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(i.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:v,onSearch:"tags"===x.mode?b:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),(0,r.jsx)(a.Bc,{isInvalid:g,message:m.error,fieldName:h.name})]}),c?(0,r.jsx)(s.Z,{label:c}):null]})]})}):(0,r.jsx)(i.NIc,{isInvalid:g,isRequired:u,children:(0,r.jsxs)(i.gCW,{alignItems:"start",children:[(0,r.jsxs)(i.jqI,{align:"center",children:[n?(0,r.jsx)(a.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...d,children:n}):null,c?(0,r.jsx)(s.Z,{label:c}):null]}),(0,r.jsx)(i.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:v,onSearch:"tags"===x.mode?b:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),(0,r.jsx)(a.Bc,{isInvalid:g,message:m.error,fieldName:h.name})]})})}},10342:function(e,t,n){var r=n(24246),i=n(56351),l=n(91613);t.Z=e=>{let{title:t,tooltip:n,children:o,...s}=e;return(0,r.jsxs)(i.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...s,children:[(0,r.jsxs)(i.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[t,n?(0,r.jsx)(i.xvT,{as:"span",mx:1,children:(0,r.jsx)(l.Z,{label:n})}):void 0]}),(0,r.jsx)(i.Kqy,{p:6,spacing:6,children:o})]})}},58452:function(e,t,n){var r=n(24246),i=n(56351);t.Z=e=>{let{isOpen:t,onClose:n,onConfirm:l,onCancel:o,title:s,message:a,cancelButtonText:d,continueButtonText:c,isLoading:u,returnFocusOnClose:p,isCentered:x,testId:h="confirmation-modal",icon:m}=e;return(0,r.jsxs)(i.u_l,{isOpen:t,onClose:n,size:"lg",returnFocusOnClose:null==p||p,isCentered:x,children:[(0,r.jsx)(i.ZAr,{}),(0,r.jsxs)(i.hzk,{textAlign:"center",p:6,"data-testid":h,children:[m?(0,r.jsx)(i.M5Y,{mb:2,children:m}):null,s?(0,r.jsx)(i.xBx,{fontWeight:"medium",pb:0,children:s}):null,a?(0,r.jsx)(i.fef,{children:a}):null,(0,r.jsx)(i.mzw,{children:(0,r.jsxs)(i.MIq,{columns:2,width:"100%",children:[(0,r.jsx)(i.wpx,{onClick:()=>{o&&o(),n()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:u,children:d||"Cancel"}),(0,r.jsx)(i.wpx,{type:"primary",size:"large",onClick:l,"data-testid":"continue-btn",loading:u,children:c||"Continue"})]})})]})]})}},70788:function(e,t,n){n.d(t,{m:function(){return d}});var r=n(24246),i=n(56351),l=n(79894),o=n.n(l),s=n(27378);let{Text:a}=i.AntTypography,d=e=>{let{items:t,...n}=e,l=(0,s.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let l=n===t.length-1,s={...e},d=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,r.jsx)(a,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:s.title})),d)?s.title=(0,r.jsx)(i.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,r.jsx)(o(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[t]);return(0,r.jsx)(i.zrq,{items:l,...n})}},3642:function(e,t,n){var r=n(24246),i=n(56351),l=n(86677),o=n.n(l),s=n(27378),a=n(812),d=n(58452),c=n(77830),u=n(19904),p=n(46628),x=n(98795),h=n(21702);t.Z=e=>{let{property:t,triggerComponent:n}=e,l=(0,i.pmc)(),m=(0,i.qY0)(),[f]=(0,x.YW)(),g=t.experiences.length>0,y=async()=>{m.onClose();let e=await f(t.id);if((0,a.D4)(e)){l((0,p.Vo)((0,a.e$)(e.error)));return}o().push("".concat(c.ru)),l((0,p.t5)("Property ".concat(t.name," deleted successfully")))};return(0,r.jsxs)(u.ZP,{scopes:[h.Sh.PROPERTY_DELETE],children:[(0,r.jsx)(i.ua7,{label:"All of the experiences on this property must be unlinked before the property can be deleted.",placement:"right",isDisabled:!g,children:(0,r.jsx)("span",{children:s.cloneElement(n,{onClick:e=>{e.stopPropagation(),g||m.onOpen()},disabled:g})})}),(0,r.jsx)(d.Z,{isOpen:m.isOpen,onClose:m.onClose,onConfirm:y,title:"Delete ".concat(t.name),message:(0,r.jsxs)(i.xvT,{color:"gray.500",children:["You are about to delete property ",t.name,". This action is not reversible and will result in ",t.name," no longer being available for your data governance. Are you sure you want to proceed?"]}),continueButtonText:"Ok",isCentered:!0,icon:(0,r.jsx)(i.aNP,{})})]})}},18880:function(e,t,n){var r=n(24246),i=n(56351),l=n(34090),o=n(86677),s=n(27378),a=n(16134),d=n(10342),c=n(40324),u=n(812),p=n(77830),x=n(51472),h=n(94315),m=n(21702),f=n(97181),g=n(3642);let y=()=>{var e;let t=(0,a.C)(h.Zp),n=(0,a.C)(h.G1);(0,h.cq)({page:t,size:n});let i=(0,a.C)(h.w4),{values:o,setFieldValue:s}=(0,l.u6)();return(0,r.jsx)(d.Z,{title:"Experiences",children:(0,r.jsx)(x.Z,{addButtonLabel:"Add experience",idField:"id",nameField:"name",allItems:i.map(e=>({id:e.id,name:e.name})),values:null!==(e=o.experiences)&&void 0!==e?e:[],setValues:e=>s("experiences",e),draggable:!0,baseTestId:"experience"})})};t.Z=e=>{let{property:t,handleSubmit:n}=e,a=(0,o.useRouter)(),x=()=>{a.push(p.ru)},h=(0,s.useMemo)(()=>t||{name:"",type:m.uS.WEBSITE,experiences:[],messaging_templates:[],paths:[]},[t]);return(0,r.jsx)(l.J9,{enableReinitialize:!0,initialValues:h,onSubmit:n,children:e=>{let{dirty:n,isValid:o,isSubmitting:s}=e;return(0,r.jsxs)(l.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,r.jsx)(i.xuv,{py:3,children:(0,r.jsxs)(d.Z,{title:"Property details",children:[(0,r.jsx)(c.j0,{isRequired:!0,label:"Property name",name:"name",tooltip:"Unique name to identify this property",variant:"stacked"}),(0,r.jsx)(f.d,{isRequired:!0,label:"Type",name:"type",options:(0,u.MM)(m.uS),layout:"stacked"})]})}),(0,r.jsx)(i.xuv,{py:3,children:(0,r.jsx)(y,{})}),t&&(0,r.jsx)(i.xuv,{py:3,children:(0,r.jsx)(d.Z,{title:"Advanced settings",children:(0,r.jsx)(c.Io,{label:"Property ID",name:"id",tooltip:"Automatically generated unique ID for this property, used for developer configurations",variant:"stacked",readOnly:!0})})}),(0,r.jsxs)(i.kCb,{justifyContent:"space-between",width:"100%",paddingTop:2,children:[t&&(0,r.jsx)(g.Z,{property:t,triggerComponent:(0,r.jsx)(i.wpx,{"data-testid":"delete-property-button",loading:!1,className:"mr-3",children:"Delete"})}),(0,r.jsxs)(i.kCb,{justifyContent:"right",width:"100%",paddingTop:2,children:[(0,r.jsx)(i.wpx,{onClick:x,loading:!1,className:"mr-3",children:"Cancel"}),(0,r.jsx)(i.wpx,{htmlType:"submit",type:"primary",disabled:s||!n||!o,loading:s,children:"Save"})]})]})]})}})}},31883:function(e,t,n){n.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=n(19043)},51959:function(e,t,n){n.d(t,{t:function(){return R}});var r=n(24246),i=n(45487),l=n(27378);let o=(0,l.createContext)(null);var s=n(38565),a=n(96681),d=n(10010),c=n(40179);let u=(0,l.forwardRef)(function({children:e,as:t="ul",axis:n="y",onReorder:u,values:h,...m},f){let g=(0,a.h)(()=>(0,s.E)(t)),y=[],j=(0,l.useRef)(!1);return(0,i.k)(!!h,"Reorder.Group must be provided a values prop"),(0,l.useEffect)(()=>{j.current=!1}),(0,r.jsx)(g,{...m,ref:f,ignoreStrict:!0,children:(0,r.jsx)(o.Provider,{value:{axis:n,registerItem:(e,t)=>{let r=y.findIndex(t=>e===t.value);-1!==r?y[r].layout=t[n]:y.push({value:e,layout:t[n]}),y.sort(x)},updateOrder:(e,t,n)=>{if(j.current)return;let r=function(e,t,n,r){if(!r)return e;let i=e.findIndex(e=>e.value===t);if(-1===i)return e;let l=r>0?1:-1,o=e[i+l];if(!o)return e;let s=e[i],a=o.layout,u=(0,c.t)(a.min,a.max,.5);return 1===l&&s.layout.max+n>u||-1===l&&s.layout.min+n<u?(0,d.uo)(e,i,i+l):e}(y,e,t,n);y!==r&&(j.current=!0,u(r.map(p).filter(e=>-1!==h.indexOf(e))))}},children:e})})});function p(e){return e.value}function x(e,t){return e.layout.min-t.layout.min}var h=n(33234),m=n(16014);function f(e){let t=(0,a.h)(()=>(0,h.BX)(e)),{isStatic:n}=(0,l.useContext)(m._);if(n){let[,n]=(0,l.useState)(e);(0,l.useEffect)(()=>t.on("change",n),[])}return t}var g=n(71884);let y=e=>e&&"object"==typeof e&&e.mix,j=e=>y(e)?e.mix:void 0;var v=n(58868),b=n(26166);function C(e,t){let n=f(t()),r=()=>n.set(t());return r(),(0,v.L)(()=>{let t=()=>b.Wi.preRender(r,!1,!0),n=e.map(e=>e.on("change",t));return()=>{n.forEach(e=>e()),(0,b.Pn)(r)}}),n}function w(e,t){let n=(0,a.h)(()=>[]);return C(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}var k=n(40406);function I(e,t=0){return(0,k.i)(e)?e:f(t)}let R={Group:u,Item:(0,l.forwardRef)(function({children:e,style:t={},value:n,as:d="li",onDrag:c,layout:u=!0,...p},x){let m=(0,a.h)(()=>(0,s.E)(d)),f=(0,l.useContext)(o),y={x:I(t.x),y:I(t.y)},v=function(e,t,n,r){if("function"==typeof e)return function(e){h.S1.current=[],e();let t=C(h.S1.current,e);return h.S1.current=void 0,t}(e);let i="function"==typeof t?t:function(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],l=e[2+n],o=e[3+n],s=(0,g.s)(i,l,{mixer:j(l[0]),...o});return t?s(r):s}(t,void 0,void 0);return Array.isArray(e)?w(e,i):w([e],([e])=>i(e))}([y.x,y.y],([e,t])=>e||t?1:"unset");(0,i.k)(!!f,"Reorder.Item must be a child of Reorder.Group");let{axis:b,registerItem:k,updateOrder:R}=f;return(0,r.jsx)(m,{drag:b,...p,dragSnapToOrigin:!0,style:{...t,x:y.x,y:y.y,zIndex:v},layout:u,onDrag:(e,t)=>{let{velocity:r}=t;r[b]&&R(n,y[b].get(),r[b]),c&&c(e,t)},onLayoutMeasure:e=>k(n,e),ref:x,ignoreStrict:!0,children:e})})}},60153:function(e,t,n){n.d(t,{o:function(){return o}});var r=n(96681);class i{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(n=>{n.start(e.nativeEvent||e,t)})}}let l=()=>new i;function o(){return(0,r.h)(l)}},76649:function(e,t,n){n.d(t,{Ln:function(){return r}});let r=(e,t)=>l(e,t),i=Symbol("SOME"),l=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?i 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 o{static narrow(e){return new o(t=>r(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 o?e.NF:e instanceof Function?e:t=>r(e,t);return new o(e=>t(e)&&n(e))}}new o(e=>!0)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4723],{58754:function(e,a,t){var i=t(24246),n=t(56351),s=t(70788);a.Z=e=>{let{heading:a,breadcrumbItems:t,isSticky:r=!0,children:l,rightContent:o,style:d,...c}=e;return(0,i.jsxs)("div",{...c,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,i.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof a?(0,i.jsx)(n.X6q,{className:t||l?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:a}):a,o&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!t&&(0,i.jsx)(s.m,{className:l?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,a,t){t.d(a,{d:function(){return d}});var i=t(24246),n=t(56351),s=t(34090),r=t(27378),l=t(91613),o=t(40324);let d=e=>{let{name:a,label:t,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",...m}=e,[v,g,{setValue:h}]=(0,s.U$)(a),x=!!(g.touched&&g.error),[f,y]=(0,r.useState)("");v.value||"tags"!==m.mode&&"multiple"!==m.mode||(v.value=[]),"tags"===m.mode&&"string"==typeof v.value&&(v.value=[v.value]);let _="tags"===m.mode?(e,a)=>e?e.value!==f||v.value.includes(f)?m.optionRender?m.optionRender(e,a):e.label:'Create "'.concat(f,'"'):void 0:m.optionRender||void 0,j=e=>{y(e),m.onSearch&&m.onSearch(e)},b=(e,a)=>{h(e),m.onChange&&m.onChange(e,a)};return"inline"===p?(0,i.jsx)(n.NIc,{isInvalid:x,isRequired:u,children:(0,i.jsxs)(n.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,i.jsx)(o.__,{htmlFor:m.id||a,...d,children:t}):null,(0,i.jsxs)(n.jqI,{align:"center",children:[(0,i.jsxs)(n.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(n.WPr,{...v,id:m.id||a,"data-testid":"controlled-select-".concat(v.name),...m,optionRender:_,onSearch:"tags"===m.mode?j:void 0,onChange:b,value:v.value||void 0,status:x?"error":void 0}),(0,i.jsx)(o.Bc,{isInvalid:x,message:g.error,fieldName:v.name})]}),c?(0,i.jsx)(l.Z,{label:c}):null]})]})}):(0,i.jsx)(n.NIc,{isInvalid:x,isRequired:u,children:(0,i.jsxs)(n.gCW,{alignItems:"start",children:[(0,i.jsxs)(n.jqI,{align:"center",children:[t?(0,i.jsx)(o.__,{htmlFor:m.id||a,fontSize:"xs",my:0,mr:1,...d,children:t}):null,c?(0,i.jsx)(l.Z,{label:c}):null]}),(0,i.jsx)(n.WPr,{...v,id:m.id||a,"data-testid":"controlled-select-".concat(v.name),...m,optionRender:_,onSearch:"tags"===m.mode?j:void 0,onChange:b,value:v.value||void 0,status:x?"error":void 0}),(0,i.jsx)(o.Bc,{isInvalid:x,message:g.error,fieldName:v.name})]})})}},70788:function(e,a,t){t.d(a,{m:function(){return d}});var i=t(24246),n=t(56351),s=t(79894),r=t.n(s),l=t(27378);let{Text:o}=n.AntTypography,d=e=>{let{items:a,...t}=e,s=(0,l.useMemo)(()=>null==a?void 0:a.map((e,t)=>{let s=t===a.length-1,l={...e},d=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,i.jsx)(o,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:l.title})),d)?l.title=(0,i.jsx)(n.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,i.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[a]);return(0,i.jsx)(n.zrq,{items:s,...t})}},31435:function(e,a,t){t.d(a,{Z:function(){return S}});var i=t(24246),n=t(56351),s=t(34090),r=t(27378),l=t(59389),o=t(16134),d=t(25980),c=t(40324),u=t(33335),p=t(32885),m=t(1315),v=t(57865),g=t(72774),h=t(36345),x=t(812),f=t(8133),y=t(46628);let _={name:"",consent_use:"",data_use:"",data_categories:["user"],cookieNames:[],cookies:[]},j=[{label:"Analytics",value:"analytics",description:"Provides analytics for activities such as system and advertising performance reporting, insights and fraud detection."},{label:"Essential",value:"essential",description:"Operates the service or product, including legal obligations, support and basic system operations."},{label:"Functional",value:"functional",description:"Used for specific, necessary, and legitimate purposes."},{label:"Marketing",value:"marketing",description:"Enables marketing, promotion, advertising and sales activities for the product, service, application or system."}],b=e=>j.some(a=>a.value===e.split(".")[0]);var k=t(28079),C=t(69525),N=t(97181);let w=e=>{let{index:a,disabled:t}=e;(0,k.fd)();let r=(0,o.C)(k.oW),{values:l}=(0,s.u6)(),d=r.filter(e=>e.value.split(".")[0]===l.privacy_declarations[a].consent_use);return(0,i.jsxs)(n.gCW,{width:"100%",borderRadius:"4px",border:"1px solid",borderColor:"gray.200",spacing:4,p:4,children:[(0,i.jsx)(N.d,{label:"Consent category",tooltip:"What is the system using the data for. For example, is it for third party advertising or perhaps simply providing system operations.",name:"privacy_declarations.".concat(a,".consent_use"),options:j,layout:"stacked",isRequired:!0,disabled:t}),(0,i.jsx)(N.d,{allowClear:!0,label:"Detailed consent category (optional)",tooltip:"Select a more specific consent category",name:"privacy_declarations.".concat(a,".data_use"),options:d,layout:"stacked",disabled:!l.privacy_declarations[a].consent_use||t}),(0,i.jsx)(N.d,{mode:"tags",label:"Cookie names",name:"privacy_declarations.".concat(a,".cookieNames"),options:[],layout:"stacked",disabled:t,className:"w-full"})]})};var R=e=>{var a,t;let{showSuggestions:l,isCreate:d,disabled:c}=e,{values:u,setFieldValue:m}=(0,s.u6)(),{vendor_id:v}=u,{isLoading:g}=(0,p.Wp)({vendor_id:v},{skip:!l||null==v}),h=(0,o.C)((0,p.cL)(v||""));(0,r.useEffect)(()=>{l&&u.vendor_id&&(null==h?void 0:h.length)?m("privacy_declarations",h.filter(e=>b(e.data_use)).map(e=>(0,C.U)(e)).map(e=>{var a,t,i;return{name:null!==(t=e.name)&&void 0!==t?t:"",consent_use:e.data_use.split(".")[0],data_use:e.data_use,data_categories:e.data_categories,cookieNames:(null===(a=e.cookies)||void 0===a?void 0:a.map(e=>e.name))||[],cookies:null!==(i=e.cookies)&&void 0!==i?i:[]}})):d&&m("privacy_declarations",[_])},[l,d,u.vendor_id,h,m]);let x=(null===(a=u.privacy_declarations[u.privacy_declarations.length-1])||void 0===a?void 0:a.data_use)===_.data_use&&(null===(t=u.privacy_declarations[u.privacy_declarations.length-1])||void 0===t?void 0:t.consent_use)===_.consent_use;return g?(0,i.jsx)(n.$jN,{size:"sm",alignSelf:"center"}):(0,i.jsx)(s.F2,{name:"privacy_declarations",render:e=>(0,i.jsxs)(i.Fragment,{children:[u.privacy_declarations.map((e,a)=>(0,i.jsx)(w,{index:a,disabled:c},e.data_use||a)),(0,i.jsx)(n.wpx,{onClick:()=>e.push(_),size:"small",type:"text",disabled:c||x,"data-testid":"add-data-use-btn",children:"Add data use +"})]})})};let q={name:"",vendor_id:void 0,privacy_declarations:[_]};var S=e=>{let{buttonLabel:a,onButtonClick:t,buttonProps:j}=e,b=(0,n.pmc)(),{isOpen:k,onOpen:C,onClose:N}=(0,n.qY0)(),w=(0,o.T)(),[S]=(0,m.in)(),I=(0,r.useMemo)(()=>l.Ry().shape({name:l.Z_().required().label("Vendor name").test("is-unique","",async(e,a)=>{let{data:t}=await S({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).some(a=>a.name===e)||a.createError({message:'You already have a vendor called "'.concat(e,'". Please specify a unique name for this vendor.')})})}),[S]),{tcf:z,dictionaryService:F}=(0,d.hz)(),{isLoading:W}=(0,p.Rd)(void 0,{skip:!F}),V=(0,o.C)(p.o),Z=(0,o.C)(v.gU),[E]=(0,m.f7)(),L=(0,o.C)(v.bN),T=()=>{N(),w((0,v.b3)("initial")),w((0,v.gQ)(!1))},A=(0,r.useRef)(null),B=A.current?A.current.values.vendor_id:void 0,M=(0,o.C)((0,p.$e)(B||"")),P=async(e,a)=>{let t=e.privacy_declarations.filter(e=>e.consent_use!==_.consent_use).flatMap(e=>{let a=e.cookieNames.map(a=>{let t=e.cookies.find(e=>e.name===a);return null!=t?t:{name:a,path:"/"}}),{cookieNames:t,consent_use:i,...n}=e;return"marketing"!==e.consent_use||e.data_use?{...n,data_use:e.data_use?e.data_use:e.consent_use,cookies:a}:["marketing.advertising.first_party.targeted","marketing.advertising.third_party.targeted"].map(e=>({...n,data_use:e,cookies:a}))}),i={...M,...e,fides_key:(0,u.E)(e.name),system_type:"",privacy_declarations:t},n=await E(i);if((0,x.D4)(n)){b((0,y.Vo)((0,x.e$)(n.error)));return}b((0,y.t5)("Vendor successfully created!")),a.resetForm(),T()},Q=e=>{if(F){if(!e){w((0,v.b3)("hiding")),w((0,v.gQ)(!1));return}w((0,v.b3)("showing")),z&&(0,x.cj)(e)===x.c6.GVL?w((0,v.gQ)(!0)):w((0,v.gQ)(!1))}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.wpx,{onClick:()=>{t?t():C()},"data-testid":"add-vendor-btn",...j,children:a}),(0,i.jsx)(s.J9,{initialValues:q,enableReinitialize:!0,onSubmit:P,validationSchema:I,innerRef:A,children:e=>{let{dirty:a,isValid:t,resetForm:r}=e;return(0,i.jsx)(f.Z,{isOpen:k,onClose:T,title:"Add a vendor",children:(0,i.jsxs)(n.xuv,{"data-testid":"add-vendor-modal-content",my:4,children:[Z?(0,i.jsx)(g.Z,{}):null,(0,i.jsx)(s.l0,{children:(0,i.jsxs)(n.gCW,{alignItems:"start",spacing:6,children:[F?(0,i.jsx)(h.Z,{label:"Vendor name",options:V,isLoading:W,onVendorSelected:Q,isCreate:!0,lockedForGVL:Z}):(0,i.jsx)(c.j0,{id:"name",name:"name",isRequired:!0,label:"Vendor name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked"}),(0,i.jsx)(R,{showSuggestions:"showing"===L,isCreate:!0,disabled:Z}),(0,i.jsxs)("div",{className:"flex w-full justify-between",children:[(0,i.jsx)(n.wpx,{onClick:()=>{T(),r()},children:"Cancel"}),(0,i.jsx)(n.wpx,{type:"primary",htmlType:"submit",disabled:W||!a||!t,loading:W,"data-testid":"save-btn",children:"Save vendor"})]})]})})]})})}})]})}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6362],{812:function(e,t,i){i.d(t,{D4:function(){return s.D4},MM:function(){return h},Ot:function(){return d},c6:function(){return r},cj:function(){return p},e$:function(){return l},fn:function(){return o},iC:function(){return x},nU:function(){return u},tB:function(){return c}});var n,r,s=i(19043);let a="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.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,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:i}=e;return{status:i,message:l(e,t.message)}}return t},h=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:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,i){i.d(t,{H:function(){return s},V:function(){return n.V}});var n=i(84306),r=i(812);let s=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,r.Ot)(t)?i=t.data.detail:(0,r.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){i.d(t,{V:function(){return s}});var n=i(24246),r=i(56351);let s=()=>{let e=(0,r.pmc)();return{errorAlert:(t,i,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,n.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:t})]}),(0,n.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)},successAlert:(t,i,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,n.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:t})]}),(0,n.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)}}}},39715:function(e,t,i){var n=i(24246),r=i(56351);i(27378),t.Z=e=>{let{isEmptyState:t,yamlError:i}=e;return(0,n.jsx)(r.Rg9,{in:!0,children:(0,n.jsxs)(r.xuv,{w:"fit-content",bg:"white",p:3,borderRadius:3,children:[(0,n.jsxs)(r.Ugi,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:"YAML"}),(0,n.jsx)(r.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(r.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(r.f9v,{}),t&&(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:"Yaml system is required"})]}),i&&(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:i.message}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:i.reason}),(0,n.jsxs)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:["Ln ",(0,n.jsx)("b",{children:i.mark.line}),", Col"," ",(0,n.jsx)("b",{children:i.mark.column}),", Pos"," ",(0,n.jsx)("b",{children:i.mark.position})]})]})]})})]})})}},41207:function(e,t,i){i.d(t,{F:function(){return a},M:function(){return s}});var n=i(76649),r=i(65218);let s=i.n(r)()(()=>i.e(7088).then(i.bind(i,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),a=e=>(0,n.Ln)({name:"string"},e)&&"YAMLException"===e.name},1226:function(e,t,i){var n=i(24246);i(27378);var r=i(77213);t.Z=e=>{let{children:t}=e;return(0,n.jsx)(r.Z,{title:"Connections",children:t})}},11274:function(e,t,i){i.d(t,{s:function(){return W}});var n=i(24246),r=i(96356),s=i(56351),a=i(86677),l=i(27378),o=i(16134),d=i(77830),c=i(21702),u=i(14047),h=i(84306),x=i(14207),p=i(45007),m=i(34090);let f=(e,t)=>{let i={...e};return Object.entries(t.properties).forEach(t=>{let[n,r]=t;if("integer"===r.type){let t=r.default?Number(r.default):e[n];i[n]=t||0}else{var s;let t=null!==(s=r.default)&&void 0!==s?s:e[n];i[n]=null!=t?t:null}}),i},g="#/definitions/FidesDatasetReference";var y=e=>{let{data:t,defaultValues:i,isSubmitting:a=!1,onSaveClick:d,onTestConnectionClick:h,testButtonLabel:p="Test integration"}=e,y=(0,l.useRef)(!1),{handleError:j}=(0,u.H)(),{connection:v,connectionOption:b}=(0,o.C)(r.ZZ),[k,C]=(0,x.h2)(),_=e=>{let t;return(void 0===e||""===e)&&(t="Connection Identifier is required"),e&&(0,s.kEn)(e)&&(t="Connection Identifier must be an alphanumeric value"),t},S=(e,t,i)=>{let n;return(void 0===t||""===t)&&(n="".concat(e," is required")),i===g&&(t.includes(".")?t.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},w=(e,t)=>(0,n.jsx)(s.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:t}),I=e=>{var t;if((null===(t=e.allOf)||void 0===t?void 0:t[0].$ref)===g)return"Enter dataset.collection.field"},z=(e,i)=>{var r;return(0,n.jsx)(m.gN,{id:e,name:e,validate:(null!==(r=t.required)&&void 0!==r&&!!r.includes(e)||"integer"===i.type)&&(e=>{var t;return S(i.title,e,null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)}),children:r=>{var a;let{field:l,form:o}=r;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:null===(a=t.required)||void 0===a?void 0:a.includes(e),isInvalid:o.errors[e]&&o.touched[e],children:[w(e,i.title),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:["integer"!==i.type&&(0,n.jsx)(s.IIB,{...l,value:l.value||"",placeholder:I(i),autoComplete:"off",color:"gray.700",size:"sm"}),"integer"===i.type&&(0,n.jsxs)(s.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(s.zuI,{...l,autoComplete:"off"}),(0,n.jsxs)(s.FiK,{children:[(0,n.jsx)(s.WQu,{}),(0,n.jsx)(s.Y_d,{})]})]}),(0,n.jsx)(s.J1D,{children:o.errors[e]})]}),(0,n.jsx)(s.ua7,{"aria-label":i.description,hasArrow:!0,label:i.description,placement:"right-start",openDelay:500,children:(0,n.jsx)(s.kCb,{alignItems:"center",h:"32px",visibility:i.description?"visible":"hidden",children:(0,n.jsx)(s.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}},e)},R=async()=>{try{await k(v.key).unwrap()}catch(e){j(e)}};return(0,l.useEffect)(()=>(y.current=!0,C.isSuccess&&h(C),()=>{y.current=!1}),[h,C]),(0,n.jsx)(m.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...i};if(null==v?void 0:v.key){var n,r;e.name=null!==(r=v.name)&&void 0!==r?r:"",e.description=v.description,e.instance_key=v.connection_type===c.Rj.SAAS?null===(n=v.saas_config)||void 0===n?void 0:n.fides_key:v.key}return f(e,t)})(),onSubmit:(e,i)=>{let n={...e};Object.keys(t.properties).forEach(i=>{var r;if((null===(r=t.properties[i].allOf)||void 0===r?void 0:r[0].$ref)===g){let t=e[i].split(".");n[i]={dataset:t.shift(),field:t.join("."),direction:"from"}}}),d(n,i)},validateOnBlur:!1,validateOnChange:!1,children:e=>(0,n.jsx)(m.l0,{noValidate:!0,children:(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(m.gN,{id:"name",name:"name",validate:e=>S("Name",e),children:t=>{let{field:i}=t;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.name&&e.touched.name,children:[w("name","Name"),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(s.IIB,{...i,autoComplete:"off",autoFocus:!0,color:"gray.700",placeholder:"Enter a friendly name for your new ".concat(b.human_readable," connection"),size:"sm","data-testid":"input-name"}),(0,n.jsx)(s.J1D,{children:e.errors.name})]}),(0,n.jsx)(s.kCb,{alignItems:"center",h:"32px",visibility:"hidden",children:(0,n.jsx)(s.ITP,{marginLeft:"8px"})})]})}}),(0,n.jsx)(m.gN,{id:"description",name:"description",children:e=>{let{field:t}=e;return(0,n.jsxs)(s.NIc,{display:"flex",children:[w("description","Description"),(0,n.jsx)(s.gxH,{...t,color:"gray.700",placeholder:"Enter a description for your new ".concat(b.human_readable," connection"),resize:"none",size:"sm",value:t.value||""}),(0,n.jsx)(s.kCb,{alignItems:"center",h:"32px",visibility:"hidden",children:(0,n.jsx)(s.ITP,{marginLeft:"8px"})})]})}}),(0,n.jsx)(m.gN,{id:"instance_key",name:"instance_key",validate:_,children:t=>{let{field:i}=t;return(0,n.jsxs)(s.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.instance_key&&e.touched.instance_key,children:[w("instance_key","Connection Identifier"),(0,n.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(s.IIB,{...i,autoComplete:"off",color:"gray.700",isDisabled:!!(null==v?void 0:v.key),placeholder:"A unique identifier for your new ".concat(b.human_readable," connection"),size:"sm"}),(0,n.jsx)(s.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(s.ua7,{"aria-label":"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this connection.",hasArrow:!0,label:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this connection.",placement:"right-start",openDelay:500,children:(0,n.jsx)(s.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(s.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),Object.entries(t.properties).map(e=>{let[t,i]=e;return"advanced_settings"===t?null:z(t,i)}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(s.wpx,{disabled:!(null==v?void 0:v.key),loading:C.isLoading||C.isFetching,onClick:R,"data-testid":"test-connection-button",children:p}),(0,n.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:a,loading:a,children:"Save"})]})]})})})},j=i(3968);let v=e=>{let{onConnectionCreated:t,data:i}=e,s=(0,p.I0)(),{errorAlert:a,successAlert:d}=(0,h.V)(),{handleError:m}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:y,connectionOption:v}=(0,o.C)(r.ZZ),[b]=(0,x.pH)(),[k]=(0,x.Du)();return{isSubmitting:f,handleSubmit:async e=>{try{var l;g(!0);let o={access:c.uv.WRITE,connection_type:null==v?void 0:v.identifier,description:e.description,disabled:!1,key:(0,j.E)(e.instance_key),name:e.name},u=await b(o).unwrap();if((null===(l=u.failed)||void 0===l?void 0:l.length)>0)a(u.failed[0].message);else{let l={connection_key:u.succeeded[0].key,secrets:{}};Object.entries(i.properties).forEach(t=>{l.secrets[t[0]]=e[t[0]]});let o=await k(l).unwrap();"failed"===o.test_status?a((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",o.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",o.failure_reason]})):(s((0,r.lm)(u.succeeded[0])),d("Connector successfully ".concat((null==y?void 0:y.key)?"updated":"added","!")),(null==y?void 0:y.key)||!t||t())}}catch(e){m(e)}finally{g(!1)}},connectionOption:v}},b=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:r}=e,{isSubmitting:a,handleSubmit:l,connectionOption:o}=v({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",o.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(y,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:a,onSaveClick:l,onTestConnectionClick:r})]})},k={description:"",instance_key:"",name:""},C=e=>{let{data:t,onConnectionCreated:i,onTestEmail:r}=e,{connectionOption:a,isSubmitting:l,handleSubmit:o}=v({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Configure your ",a.human_readable," connector by providing the connector name, description and a test email address. Once you have saved the details, you can click test email to check the format of the email."]}),(0,n.jsx)(y,{data:t,defaultValues:k,isSubmitting:l,onSaveClick:e=>{o(e)},onTestConnectionClick:r,testButtonLabel:"Test email"})]})};var _=i(59389),S=i(27259),w=i(67762),I=e=>{let{defaultValues:t,isSubmitting:i=!1,onSaveClick:l}=e,c=(0,a.useRouter)(),{connection:u,connectionOption:h}=(0,o.C)(r.ZZ);return(0,n.jsx)(m.J9,{initialValues:(()=>{if(null==u?void 0:u.key){var e;t.name=null!==(e=u.name)&&void 0!==e?e:"",t.description=u.description}return t})(),onSubmit:(e,t)=>{l(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:_.Ry().shape({name:_.Z_().required("Name is required")}),children:(0,n.jsx)(m.l0,{noValidate:!0,children:(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(S.Z,{autoFocus:!0,disabled:!!(null==u?void 0:u.key),isRequired:!0,label:"Name",name:"name",placeholder:"Enter a friendly name for your new ".concat(h.human_readable," connection")}),(0,n.jsx)(S.Z,{label:"Description",name:"description",placeholder:"Enter a description for your new ".concat(h.human_readable," connection"),type:"textarea"}),(0,n.jsx)(w.h,{isSubmitting:i,onCancelClick:()=>{c.push(d.JR)}})]})})})};let z=e=>{let{onConnectionCreated:t}=e,i=(0,p.I0)(),{errorAlert:a,successAlert:d}=(0,h.V)(),{handleError:m}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:y,connectionOption:j}=(0,o.C)(r.ZZ),[v]=(0,x.pH)(),b=async(e,n)=>{try{var s;g(!0);let n={access:c.uv.WRITE,connection_type:null==j?void 0:j.identifier,description:e.description,disabled:!1,name:e.name,key:null==y?void 0:y.key},l=await v(n).unwrap();(null===(s=l.failed)||void 0===s?void 0:s.length)>0?a(l.failed[0].message):(i((0,r.lm)(l.succeeded[0])),d("Connector successfully ".concat((null==y?void 0:y.key)?"updated":"added","!")),(null==y?void 0:y.key)||!t||t())}catch(e){m(e)}finally{g(!1)}};return(0,n.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",children:["To begin setting up your new ",j.human_readable," ","connector you must first assign a name to the connector and a description.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Once you have completed this section you can then progress onto"," ",(0,n.jsx)(s.xvT,{display:"inline-block",fontWeight:"700",children:"DSR customization"})," ","using the menu on the left hand side."]}),(0,n.jsx)(I,{defaultValues:{description:"",name:""},isSubmitting:f,onSaveClick:b})]})},R=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:a}=e,d=(0,p.I0)(),{errorAlert:m,successAlert:f}=(0,h.V)(),{handleError:g}=(0,u.H)(),[v,b]=(0,l.useState)(!1),{connection:k,connectionOption:C}=(0,o.C)(r.ZZ),[_]=(0,x.pL)(),[S]=(0,x.pH)(),[w]=(0,x.Du)(),I=async(e,s)=>{try{if(b(!0),k){var a;let i={access:c.uv.WRITE,connection_type:k.connection_type,description:e.description,disabled:!1,key:k.key,name:e.name},s=await S(i).unwrap();if((null===(a=s.failed)||void 0===a?void 0:a.length)>0)m(s.failed[0].message);else{d((0,r.lm)(s.succeeded[0]));let i={connection_key:k.key,secrets:{}};Object.entries(t.properties).forEach(t=>{i.secrets[t[0]]=e[t[0]]});let a=await w(i).unwrap();"failed"===a.test_status?m((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",a.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",a.failure_reason]})):f("Connector successfully updated!")}}else{let n={description:e.description,name:e.name,instance_key:(0,j.E)(e.instance_key),saas_connector_type:C.identifier,secrets:{}};Object.entries(t.properties).forEach(t=>{n.secrets[t[0]]=e[t[0]]});let s=await _(n).unwrap();d((0,r.lm)(s.connection)),f("Connector successfully added!"),null==i||i()}}catch(e){g(e)}finally{b(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",C.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(y,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:v,onSaveClick:I,onTestConnectionClick:a})]})};var Z=i(16394);let T=e=>{var t,i;let{response:a}=e,{connectionOption:l}=(0,o.C)(r.ZZ);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{color:"gray.100"}),(0,n.jsxs)(s.gCW,{align:"flex-start",mt:"16px",children:[(null===(t=a.data)||void 0===t?void 0:t.test_status)==="succeeded"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsxs)(s.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Successfully connected to ",l.human_readable]}),(0,n.jsx)(s.Vp9,{colorScheme:"green",size:"sm",variant:"solid",children:"Success"})]}),(0,n.jsx)(s.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(a.fulfilledTimeStamp)}),(0,n.jsx)(s.xuv,{bg:"green.100",border:"1px solid",borderColor:"green.300",color:"green.700",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(s.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(s.StI,{}),(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"green.500",fontWeight:"semibold",size:"xs",children:"Success message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.msg})]})]})})]}),(null===(i=a.data)||void 0===i?void 0:i.test_status)==="failed"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsxs)(s.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Output error to ",l.human_readable]}),(0,n.jsx)(s.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(s.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(a.fulfilledTimeStamp)}),(0,n.jsx)(s.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(s.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(s.f9v,{}),(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.failure_reason}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.msg})]})]})})]})]})]})},W=e=>{let{onConnectionCreated:t}=e,i=(0,a.useRouter)(),{connectionOption:u}=(0,o.C)(r.ZZ),h=u&&u.type===c.Zi.MANUAL,{data:x,isFetching:p,isLoading:m,isSuccess:f}=(0,r.n3)(u.identifier,{skip:h}),[g,y]=(0,l.useState)(),j=e=>{y(e)},v=(0,l.useCallback)(()=>{i.push(d.JR)},[i]),k=(0,l.useCallback)(()=>{switch(null==u?void 0:u.type){case c.Zi.DATABASE:if(f&&x)return(0,n.jsx)(b,{data:x,onConnectionCreated:t,onTestConnectionClick:j});break;case c.Zi.MANUAL:return(0,n.jsx)(z,{onConnectionCreated:t});case c.Zi.SAAS:if(f&&x)return(0,n.jsx)(R,{data:x,onConnectionCreated:t,onTestConnectionClick:j});break;case c.Zi.EMAIL:if(f&&x)return(0,n.jsx)(C,{data:x,onConnectionCreated:v,onTestEmail:j})}},[null==u?void 0:u.type,x,f,t,v]);return(0,n.jsxs)(s.kCb,{gap:"97px",children:[(0,n.jsxs)(s.gCW,{w:"579px",gap:"16px",align:"stretch",children:[(p||m)&&(0,n.jsx)(s.M5Y,{children:(0,n.jsx)(s.$jN,{})}),k()]}),g&&(0,n.jsxs)(s.Rg9,{in:!0,children:[" ",(0,n.jsx)(s.xuv,{mt:"16px",maxW:"528px",w:"fit-content",children:(0,n.jsx)(T,{response:g})})]})]})}},38212:function(e,t,i){i.d(t,{Z:function(){return v}});var n=i(24246),r=i(14047),s=i(96356),a=i(14207),l=i(56351),o=i(86677),d=i(27378),c=i(16134),u=i(812),h=i(77830),x=i(41966),p=i(84306),m=i(66527),f=i(41207),g=i(39715),y=e=>{let{data:t=[],isSubmitting:i=!1,onSubmit:r,onCancel:s,disabled:a}=e,o=(0,d.useRef)(null),{errorAlert:c}=(0,p.V)(),u=t.length>0?m.ZP.dump(t):void 0,[h,y]=(0,d.useState)(void 0),[j,v]=(0,d.useState)(!1),[b,k]=(0,d.useState)(!u),C=(0,l.qY0)(),{data:_}=(0,x.NR)(),[S,w]=(0,d.useState)([]),I=e=>{m.ZP.load(e,{json:!0}),y(void 0)},z=()=>{let e=o.current.getValue();r(m.ZP.load(e,{json:!0})),w([])};return(0,n.jsxs)(l.kCb,{gap:"97px",children:[(0,n.jsxs)(l.gCW,{align:"stretch",w:"800px",children:[(0,n.jsx)(f.M,{defaultLanguage:"yaml",defaultValue:u,height:"calc(100vh - 526px)",onChange:e=>{try{v(!0),I(e),k(!!(!e||""===e.trim()))}catch(e){(0,f.F)(e)?y(e):c("Could not parse the supplied YAML")}},onMount:(e,t)=>{o.current=e,o.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0},readOnly:a},theme:"light"}),(0,n.jsxs)(l.Ugi,{justifyContent:"flex-end",pr:6,children:[s&&(0,n.jsx)(l.wpx,{onClick:s,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",disabled:a||b||!!h||i,loading:i,onClick:()=>{if(_&&_.length){let e=o.current.getValue(),t=_.filter(t=>e.includes("fides_key: ".concat(t.fides_key,"\n"))).map(e=>e.fides_key);if(w(t),t.length){C.onOpen();return}}z()},htmlType:"submit","data-testid":"save-yaml-btn",children:"Save"})]})]}),j&&(b||h)&&(0,n.jsx)(g.Z,{isEmptyState:b,yamlError:h}),(0,n.jsx)(l.cVQ,{isOpen:C.isOpen,onClose:C.onClose,onConfirm:()=>{z(),C.onClose()},title:"Overwrite dataset",message:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xvT,{children:["You are about to overwrite the dataset",S.length>1?"s":""," ",S.map((e,t)=>{let i=t===S.length-1;return(0,n.jsxs)(d.Fragment,{children:[(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),i?".":", "]},e)})]}),(0,n.jsx)(l.xvT,{children:"Are you sure you would like to continue?"})]})})]})};let j=e=>{let{children:t,...i}=e;return(0,n.jsx)(l.xvT,{color:"gray.700",fontSize:"14px",...i,children:t})};var v=()=>{let e=(0,o.useRouter)(),{errorAlert:t,successAlert:i}=(0,r.V)(),{handleError:p}=(0,r.H)(),[m,f]=(0,d.useState)(!1),{connection:g}=(0,c.C)(s.ZZ),{data:v,isFetching:b,isLoading:k,isSuccess:C}=(0,a.Eg)(g.key),[_]=(0,a.Lz)(),[S]=(0,x.EG)(),{data:w,isLoading:I,error:z}=(0,x.NR)(),[R,Z]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{v&&v.items.length&&Z(v.items[0].ctl_dataset.fides_key)},[v]);let T=async n=>{var r;let s={connection_key:null==g?void 0:g.key,dataset_pairs:n},a=await _(s).unwrap();(null===(r=a.failed)||void 0===r?void 0:r.length)>0?t(a.failed[0].message):i("Dataset successfully updated!"),e.push(h.JR)},W=async()=>{if(R)try{let e=R;v&&v.items.length&&(e=v.items[0].fides_key);let t=[{fides_key:e,ctl_dataset_fides_key:R}];T(t)}catch(e){p(e)}},F=async e=>{try{f(!0);let i=Array.isArray(e)?e:[e],n=await S(i);if("error"in n){let e=(0,u.e$)(n.error);t(e);return}let r=i.map(e=>({fides_key:e.fides_key,ctl_dataset_fides_key:e.fides_key}));if(v&&v.items.length){let{items:e}=v;r=e.map((e,t)=>({fides_key:e.fides_key,ctl_dataset_fides_key:i[t].fides_key}))}T(r)}catch(e){p(e)}finally{f(!1)}},A=""!==R&&void 0!==R;if(b||k||I&&!z)return(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})});let E=w&&w.length;return(0,n.jsxs)(l.gCW,{alignItems:"left",gap:4,children:[z&&(0,n.jsx)(j,{color:"red",children:"There was a problem loading existing datasets, please try again."}),(0,n.jsxs)(l.gCW,{alignItems:"flex-start",children:[E&&(0,n.jsx)("div",{children:(0,n.jsx)(l.gCW,{alignSelf:"start",gap:4,children:(0,n.jsxs)(l.xuv,{"data-testid":"dataset-selector-section",children:[(0,n.jsx)(j,{mb:4,children:"Choose a dataset to associate with this connector."}),(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.WPr,{allowClear:!0,options:w.map(e=>({label:e.fides_key,value:e.fides_key})),className:"w-full",placeholder:"Select",onChange:e=>Z(e),value:R,"data-testid":"dataset-selector"}),(0,n.jsx)(l.wpx,{onClick:W,type:"primary",className:"self-start",disabled:!A,"data-testid":"save-dataset-link-btn",children:"Save"})]})]})})}),E&&C&&(null==v?void 0:v.items)&&(0,n.jsx)(l.htM,{plain:!0,children:"or"}),C&&(null==v?void 0:v.items)&&(0,n.jsxs)(l.xuv,{"data-testid":"yaml-editor-section",children:[(0,n.jsx)(j,{mb:4,children:"View your dataset YAML below!"}),(0,n.jsx)(y,{data:v.items.map(e=>e.ctl_dataset),isSubmitting:m,onSubmit:F,disabled:A})]})]})]})}},27259:function(e,t,i){var n=i(24246),r=i(56351),s=i(34090);t.Z=e=>{let{disabled:t=!1,displayHelpIcon:i=!0,helpIconVisibility:a=!1,isRequired:l=!1,label:o,placeholder:d,type:c="text",...u}=e,{id:h,autoFocus:x}=u,[p,m]=(0,s.U$)(u);return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:l,isInvalid:!!(m.error&&m.touched),children:[o&&(0,n.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:h,minWidth:"150px",children:o}),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:["number"===c&&(0,n.jsxs)(r.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(r.zuI,{...p,autoComplete:"off",autoFocus:x}),(0,n.jsxs)(r.FiK,{children:[(0,n.jsx)(r.WQu,{}),(0,n.jsx)(r.Y_d,{})]})]}),"text"===c&&(0,n.jsx)(r.IIB,{...p,autoComplete:"off",autoFocus:x,color:"gray.700",isDisabled:t,placeholder:d,size:"sm"}),"textarea"===c&&(0,n.jsx)(r.gxH,{...p,autoComplete:"off",autoFocus:x,color:"gray.700",placeholder:d,resize:"none",size:"sm",value:p.value||""}),(0,n.jsx)(r.J1D,{children:m.error})]}),i&&(0,n.jsx)(r.kCb,{alignContent:"center",h:"32px",visibility:a?"visible":"hidden",children:(0,n.jsx)(r.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})]})}},67762:function(e,t,i){i.d(t,{h:function(){return s}});var n=i(24246),r=i(56351);i(27378);let s=e=>{let{isSubmitting:t=!1,onCancelClick:i}=e;return(0,n.jsxs)(r.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(r.zxk,{onClick:i,variant:"outline",children:"Cancel"}),(0,n.jsx)(r.zxk,{bg:"primary.800",color:"white",isDisabled:t,isLoading:t,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})}},50881:function(e,t,i){i.d(t,{Z:function(){return v}});var n=i(24246),r=i(14047),s=i(96356),a=i(14207),l=i(56351),o=i(86677),d=i(27378),c=i(16134),u=i(77830),h=i(34090),x=i(59389),p=i(97181),m=i(57072),f=i(39864),g=i(27259),y=i(67762),j=e=>{let{data:t=[],isSubmitting:i=!1,onSaveClick:s}=e,{isLoading:a}=(0,m.MO)(),d=(0,c.C)(f.qb),j=(0,o.useRouter)(),{errorAlert:v}=(0,r.V)(),b=()=>{j.push(u.JR)};return a?null:(0,n.jsx)(h.J9,{enableReinitialize:!0,initialValues:{fields:t.length>0?t:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,t)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){v("PII Field must be unique");return}s(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:x.Ry({fields:x.IX().of(x.Ry().shape({pii_field:x.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:x.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:x.IX(x.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(h.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(h.F2,{name:"fields",render:t=>{let{fields:r}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(l.xuv,{visibility:"hidden",children:(0,n.jsx)(l.lr0,{})})]}),(0,n.jsx)(l.xuv,{children:r&&r.length>0?r.map((e,i)=>(0,n.jsxs)(l.Ugi,{mt:i>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{autoFocus:0===i,displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(i,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(i,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(p.d,{name:"fields.".concat(i,".data_categories"),options:d.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:i>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>t.remove(i),_hover:{cursor:"pointer"}})})]},i)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{t.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(y.h,{isSubmitting:i,onCancelClick:b})]})}})})})})},v=()=>{let e=(0,d.useRef)(!1),t=(0,o.useRouter)(),{successAlert:i}=(0,r.V)(),{handleError:h}=(0,r.H)(),[x,p]=(0,d.useState)(!1),[m,f]=(0,d.useState)([]),{connection:g}=(0,c.C)(s.ZZ),{data:y,isFetching:v,isLoading:b,isSuccess:k}=(0,a.QV)(g.key),[C]=(0,a.jF)(),[_]=(0,a._d)(),S=async(e,n)=>{try{p(!0);let n={connection_key:null==g?void 0:g.key,body:{...e}};m.length>0?await _(n).unwrap():await C(n).unwrap(),i("DSR customization ".concat(m.length>0?"updated":"added","!")),t.push(u.JR)}catch(e){h(e)}finally{p(!1)}};return(0,d.useEffect)(()=>(e.current=!0,k&&y&&f(y.fields),()=>{e.current=!1}),[y,k]),(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",w:"572px",children:"Customize your PII fields to create a friendly label name for your privacy request packages. This “Package Label” is the label your user will see in their downloaded package."}),(v||b)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),e.current&&!b?(0,n.jsx)(j,{data:m,isSubmitting:x,onSaveClick:S}):null]})}},19043:function(e,t,i){i.d(t,{Bw:function(){return a},D4:function(){return r},Dy:function(){return o},XD:function(){return d},cz:function(){return c},hE:function(){return l},oK:function(){return s}});var n=i(76649);let r=e=>"error"in e,s=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,n.Ln)({status:"number",data:{}},e),l=e=>(0,n.Ln)({detail:"string"},e),o=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){i.d(t,{Ln:function(){return n}});let n=(e,t)=>s(e,t),r=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>s(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>s(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>s(i,t[e]));class a{static narrow(e){return new a(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 a?e.NF:e instanceof Function?e:t=>n(e,t);return new a(e=>t(e)&&i(e))}}new a(e=>!0)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6954],{58754:function(e,n,t){var a=t(24246),i=t(56351),l=t(70788);n.Z=e=>{let{heading:n,breadcrumbItems:t,isSticky:s=!0,children:r,rightContent:o,style:d,...c}=e;return(0,a.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,a.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof n?(0,a.jsx)(i.X6q,{className:t||r?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:n}):n,o&&(0,a.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!t&&(0,a.jsx)(l.m,{className:r?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),r]})}},10342:function(e,n,t){var a=t(24246),i=t(56351),l=t(91613);n.Z=e=>{let{title:n,tooltip:t,children:s,...r}=e;return(0,a.jsxs)(i.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...r,children:[(0,a.jsxs)(i.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[n,t?(0,a.jsx)(i.xvT,{as:"span",mx:1,children:(0,a.jsx)(l.Z,{label:t})}):void 0]}),(0,a.jsx)(i.Kqy,{p:6,spacing:6,children:s})]})}},70788:function(e,n,t){t.d(n,{m:function(){return d}});var a=t(24246),i=t(56351),l=t(79894),s=t.n(l),r=t(27378);let{Text:o}=i.AntTypography,d=e=>{let{items:n,...t}=e,l=(0,r.useMemo)(()=>null==n?void 0:n.map((e,t)=>{let l=t===n.length-1,r={...e},d=r.onClick&&!r.href;return("string"==typeof r.title&&(r.title=(0,a.jsx)(o,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:r.title})),d)?r.title=(0,a.jsx)(i.wpx,{type:"text",size:"small",icon:r.icon,onClick:r.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:r.title}):(r.icon&&(r.title=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"anticon align-text-bottom",children:r.icon}),r.title]})),r.href&&r.title&&(r.title=(0,a.jsx)(s(),{href:r.href,className:"ant-breadcrumb-link",children:r.title}),delete r.href)),r}),[n]);return(0,a.jsx)(i.zrq,{items:l,...t})}},34391:function(e,n,t){t.d(n,{Z:function(){return K}});var a=t(24246),i=t(51472),l=t(56351),s=t(34090),r=t(79894),o=t.n(r),d=t(86677),c=t(27378),u=t(16134),p=t(10342),m=t(40324),g=t(812),h=t(77830),x=t(8411),v=t(91613),j=t(46628),f=t(28079),b=t(7426),y=t(34334),_=t(16277);let w=e=>{let{index:n}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.j0,{autoFocus:0!==n,name:"translations.".concat(n,".title"),label:"Title of privacy notice as displayed to user",variant:"stacked"}),(0,a.jsx)(m.Ks,{name:"translations.".concat(n,".description"),label:"Privacy notice displayed to the user",variant:"stacked"})]})},C=e=>{let{index:n,name:t,isOOB:i}=e;return(0,a.jsxs)(l.kCb,{direction:"column",gap:6,children:[(0,a.jsxs)(l.X6q,{size:"sm",children:["Edit ",t," translation"]}),i?(0,a.jsx)(_.f,{languageName:t}):null,(0,a.jsx)(w,{index:n})]})},k=e=>{let{translation:n,name:t,onLanguageDeleted:i}=e;return(0,a.jsxs)(l.kCb,{gap:2,direction:"row",w:"100%",children:[(0,a.jsx)(l.OK9,{as:l.wpx,fontWeight:"normal",className:"grow overflow-x-hidden border-gray-300",textOverflow:"ellipsis",_selected:{color:"white",bg:"gray.500"},children:t},n.language),i&&(0,a.jsx)(l.wpx,{"aria-label":"Delete translation",onClick:()=>i(n.language),icon:(0,a.jsx)(l.pJl,{boxSize:3}),className:"min-w-4"})]})};var N=e=>{var n;let{availableTranslations:t}=e,{values:i,setFieldValue:r}=(0,s.u6)(),[o,d]=(0,c.useState)(!1),[m,g]=(0,c.useState)(!1),[h,x]=(0,c.useState)(0),{data:v}=(0,b.tB)({api_set:!1}),j=null==v?void 0:null===(n=v.plus_consent_settings)||void 0===n?void 0:n.enable_translations,f=(0,u.C)(y.Zp),_=(0,u.C)(y.G1);(0,y.Ah)({page:f,size:_});let N=(0,u.C)(y.fJ).slice().sort((e,n)=>e.name.localeCompare(n.name)),T=N.filter(e=>{var n;return null===(n=i.translations)||void 0===n?void 0:n.every(n=>n.language!==e.id)}).map(e=>({label:e.name,value:e.id})),S=e=>{let n=i.translations?i.translations.slice().filter(n=>n.language!==e):[],t=h===n.length?n.length-1:h;r("translations",n),x(t)},O=e=>{var n,t;return null!==(t=null===(n=N.find(n=>n.id===e))||void 0===n?void 0:n.name)&&void 0!==t?t:e};return j?(0,a.jsx)(p.Z,{title:"Localizations",children:(0,a.jsxs)(l.mQc,{index:h,onChange:e=>{x(e),g(!1)},as:l.Ugi,spacing:8,align:"start",w:"100%",orientation:"vertical",variant:"unstyled",children:[(0,a.jsxs)(l.gCW,{spacing:4,minW:"30%",p:2,children:[(0,a.jsx)(l.tdY,{w:"100%",children:(0,a.jsx)(l.gCW,{spacing:2,w:"100%",p:4,maxH:60,overflow:"scroll",outline:"1px solid",outlineColor:"gray.200",borderRadius:"md",children:i.translations.map(e=>(0,a.jsx)(k,{translation:e,name:O(e.language),onLanguageDeleted:S},e.language))})}),o&&(0,a.jsx)(l.WPr,{autoFocus:!0,defaultOpen:!0,allowClear:!0,placeholder:"Select a language...",options:T,onChange:e=>{let n=null==t?void 0:t.find(n=>n.language===e);g(!!n),x(i.translations.length),r("translations",[...i.translations,null!=n?n:{language:e,title:"",description:""}]),d(!1)},"data-testid":"select-language",className:"w-full"}),!o&&!!T.length&&(0,a.jsx)(l.wpx,{icon:(0,a.jsx)(l.jBn,{boxSize:6}),onClick:()=>d(!0),"data-testid":"add-language-btn",className:"w-full",children:"Add a language"})]}),(0,a.jsx)(l.xuv,{w:"100%",children:(0,a.jsx)(s.F2,{name:"translations",render:()=>(0,a.jsx)(l.nPR,{w:"100%",children:i.translations.map((e,n)=>(0,a.jsx)(l.x45,{children:(0,a.jsx)(C,{index:n,name:O(e.language),isOOB:m})},e.language))})})})]})}):(0,a.jsx)(p.Z,{title:"Notice text",children:(0,a.jsx)(w,{index:0})})},T=t(97181),S=t(59389),O=t(16394),z=t(65063),P=t(21702);let q=(0,O.Jt)(z.ye),E=(0,O.Jt)(z.B8),R=[{language:P.eU.EN,title:"",description:""}],Z={name:"",consent_mechanism:P.J7.OPT_IN,data_uses:[],enforcement_level:P.QT.FRONTEND,disabled:!0,translations:R,children:[]},F=e=>{var n,t,a,i;return{name:null!==(n=e.name)&&void 0!==n?n:Z.name,consent_mechanism:null!==(t=e.consent_mechanism)&&void 0!==t?t:Z.consent_mechanism,data_uses:null!==(a=e.data_uses)&&void 0!==a?a:Z.data_uses,enforcement_level:null!==(i=e.enforcement_level)&&void 0!==i?i:Z.enforcement_level,notice_key:e.notice_key,disabled:e.disabled,has_gpc_flag:e.has_gpc_flag,id:e.id,internal_description:e.internal_description,translations:e.translations?e.translations.map(e=>{var n;let{privacy_notice_history_id:t,...a}=e;return{...a,title:null!==(n=e.title)&&void 0!==n?n:""}}):R,children:e.children}},I=S.Ry().shape({name:S.Z_().required().label("Title"),consent_mechanism:S.Z_().required().label("Consent mechanism")});var J=t(14441),L=t.n(J),B=e=>{let{isEditing:n}=e,{values:t,setFieldValue:i}=(0,s.u6)();return(0,c.useEffect)(()=>{n||i("notice_key",L()(t.name))},[t.name,n,i]),(0,a.jsx)(m.j0,{name:"notice_key",label:"Key used in Fides cookie",variant:"stacked"})},W=t(71922);let{Text:A}=l.AntTypography,D=e=>{let{regions:n,label:t,tooltip:i}=e;return(0,a.jsxs)(l.gCW,{align:"start",children:[(0,a.jsxs)(l.kCb,{align:"start",children:[t?(0,a.jsx)(l.lXp,{htmlFor:"regions",fontSize:"xs",my:0,mr:1,children:t}):null,i?(0,a.jsx)(v.Z,{label:i}):null]}),(0,a.jsx)(l.xuv,{w:"100%","data-testid":"notice-locations",children:(0,a.jsxs)(l.vyj,{size:[0,2],wrap:!0,children:[null==n?void 0:n.map(e=>(0,a.jsx)(l.j8w,{children:x.Z8[e]},e)),!(null==n?void 0:n.length)&&(0,a.jsxs)(A,{italic:!0,children:["No locations assigned. Navigate to the"," ",(0,a.jsx)(o(),{href:h.w0,children:"experiences view"})," ","configure."]})]})})]})};var K=e=>{let{privacyNotice:n,availableTranslations:t}=e,r=(0,d.useRouter)(),o=(0,l.pmc)(),x=n?F(n):Z;(0,f.fd)();let v=(0,u.C)(f.qv),b=(0,u.C)(W.sX),y=(0,u.C)(W.Zp),_=(0,u.C)(W.G1);(0,W.J6)({page:y,size:_});let w=e=>{var n;let{id:t}=e,a=b.find(e=>e.id===t);return null!==(n=null==a?void 0:a.name)&&void 0!==n?n:t},C=b.some(e=>{var t;return null===(t=e.children)||void 0===t?void 0:t.some(e=>e.id===(null==n?void 0:n.id))}),[k]=(0,W.vL)(),[S]=(0,W.p4)(),O=(0,c.useMemo)(()=>!!n,[n]),z=async e=>{let t;if(O){var a,i;let l={...e,id:n.id,translations:null!==(a=e.translations)&&void 0!==a?a:[],children:null!==(i=e.children)&&void 0!==i?i:[]};t=await k(l)}else t=await S(e);(0,g.D4)(t)?o((0,j.Vo)((0,g.e$)(t.error))):(o((0,j.t5)("Privacy notice ".concat(O?"updated":"created"))),O||r.push(h.IT))};return(0,a.jsx)(s.J9,{initialValues:x,enableReinitialize:!0,onSubmit:z,validationSchema:I,children:e=>{var o,d;let{values:c,setFieldValue:u,dirty:g,isValid:h,isSubmitting:x}=e;return(0,a.jsx)(s.l0,{children:(0,a.jsxs)(l.Kqy,{spacing:10,children:[(0,a.jsxs)(l.Kqy,{spacing:6,children:[(0,a.jsxs)(p.Z,{title:"Privacy notice details",children:[(0,a.jsx)(m.j0,{label:"Notice title",name:"name",isRequired:!0,variant:"stacked"}),(0,a.jsx)(T.d,{name:"consent_mechanism",label:"Consent mechanism",options:q,isRequired:!0,layout:"stacked"}),(0,a.jsx)(B,{isEditing:O}),(0,a.jsx)(m.w8,{name:"has_gpc_flag",label:"Configure whether this notice conforms to the Global Privacy Control",variant:"stacked"}),(0,a.jsx)(D,{regions:null==n?void 0:n.configured_regions,label:"Locations where privacy notice is shown to visitors",tooltip:"To configure locations, change the privacy experiences where this notice is shown"}),(0,a.jsx)(l.izJ,{}),!C&&(0,a.jsx)(i.Z,{label:"Child notices",addButtonLabel:"Add notice children",allItems:b.map(e=>({id:e.id,name:e.name})),values:null!==(d=null===(o=c.children)||void 0===o?void 0:o.map(e=>({id:e.id,name:e.name})))&&void 0!==d?d:[],setValues:e=>u("children",e),idField:"id",getItemLabel:w,draggable:!0,maxHeight:100,baseTestId:"children"}),(0,a.jsx)(T.d,{name:"data_uses",label:"Data use",options:v,mode:"multiple",layout:"stacked"}),(0,a.jsx)(T.d,{name:"enforcement_level",label:"Enforcement level",options:E,isRequired:!0,layout:"stacked"})]}),(0,a.jsx)(N,{availableTranslations:t})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(l.wpx,{onClick:()=>{r.back()},children:"Cancel"}),(0,a.jsx)(l.wpx,{htmlType:"submit",type:"primary",disabled:x||!g||!h,loading:x,"data-testid":"save-btn",children:"Save"})]})]})})}})}},65063:function(e,n,t){t.d(n,{B8:function(){return l},Ep:function(){return s},ye:function(){return i}});var a=t(21702);let i=new Map([[a.J7.OPT_IN,"Opt in"],[a.J7.NOTICE_ONLY,"Notice only"],[a.J7.OPT_OUT,"Opt out"]]),l=new Map([[a.QT.SYSTEM_WIDE,"System wide"],[a.QT.FRONTEND,"Front end"],[a.QT.NOT_APPLICABLE,"Not applicable"]]),s=new Map([["gpp_us_national","GPP US National"],["gpp_us_state","GPP US State"]])}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7434],{95372:function(a){a.exports=function(a,e,n,i){for(var r=a.length,t=n+(i?1:-1);i?t--:++t<r;)if(e(a[t],t,a))return t;return -1}},74833:function(a,e,n){var i=n(56127),r=/^\s+/;a.exports=function(a){return a?a.slice(0,i(a)+1).replace(r,""):a}},56632:function(a,e,n){var i=n(89278),r=n(80068),t=n(50098);a.exports=function(a){return function(e,n,_){var s=Object(e);if(!r(e)){var o=i(n,3);e=t(e),n=function(a){return o(s[a],a,s)}}var F=a(e,n,_);return F>-1?s[o?e[F]:F]:void 0}}},56127:function(a){var e=/\s/;a.exports=function(a){for(var n=a.length;n--&&e.test(a.charAt(n)););return n}},66726:function(a,e,n){var i=n(11611),r=n(82846),t=n(91936),_=Math.max,s=Math.min;a.exports=function(a,e,n){var o,F,l,u,c,d,m=0,S=!1,f=!1,h=!0;if("function"!=typeof a)throw TypeError("Expected a function");function g(e){var n=o,i=F;return o=F=void 0,m=e,u=a.apply(i,n)}function C(a){var n=a-d,i=a-m;return void 0===d||n>=e||n<0||f&&i>=l}function v(){var a,n,i,t=r();if(C(t))return N(t);c=setTimeout(v,(a=t-d,n=t-m,i=e-a,f?s(i,l-n):i))}function N(a){return(c=void 0,h&&o)?g(a):(o=F=void 0,u)}function p(){var a,n=r(),i=C(n);if(o=arguments,F=this,d=n,i){if(void 0===c)return m=a=d,c=setTimeout(v,e),S?g(a):u;if(f)return clearTimeout(c),c=setTimeout(v,e),g(d)}return void 0===c&&(c=setTimeout(v,e)),u}return e=t(e)||0,i(n)&&(S=!!n.leading,l=(f="maxWait"in n)?_(t(n.maxWait)||0,e):l,h="trailing"in n?!!n.trailing:h),p.cancel=function(){void 0!==c&&clearTimeout(c),m=0,o=d=F=c=void 0},p.flush=function(){return void 0===c?u:N(r())},p}},64925:function(a,e,n){var i=n(56632)(n(66259));a.exports=i},66259:function(a,e,n){var i=n(95372),r=n(89278),t=n(47991),_=Math.max;a.exports=function(a,e,n){var s=null==a?0:a.length;if(!s)return -1;var o=null==n?0:t(n);return o<0&&(o=_(s+o,0)),i(a,r(e,3),o)}},82846:function(a,e,n){var i=n(77400);a.exports=function(){return i.Date.now()}},94919:function(a,e,n){var i=n(91936),r=1/0;a.exports=function(a){return a?(a=i(a))===r||a===-r?(a<0?-1:1)*17976931348623157e292:a==a?a:0:0===a?a:0}},47991:function(a,e,n){var i=n(94919);a.exports=function(a){var e=i(a),n=e%1;return e==e?n?e-n:e:0}},91936:function(a,e,n){var i=n(74833),r=n(11611),t=n(55193),_=0/0,s=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,F=/^0o[0-7]+$/i,l=parseInt;a.exports=function(a){if("number"==typeof a)return a;if(t(a))return _;if(r(a)){var e="function"==typeof a.valueOf?a.valueOf():a;a=r(e)?e+"":e}if("string"!=typeof a)return 0===a?a:+a;a=i(a);var n=o.test(a);return n||F.test(a)?l(a.slice(2),n?2:8):s.test(a)?_:+a}},79283:function(a,e,n){"use strict";n.d(e,{l:function(){return o}});var i=n(24246),r=n(56351),t=n(72707),_=n.n(t);let s=a=>{let{data:e}=a;return(0,i.jsxs)(r.jqI,{gap:12,title:"".concat(e.primaryName||"").concat(e.primaryName?": ":"").concat(e.name," - ").concat(e.description),children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("strong",{children:e.primaryName||e.name}),e.primaryName&&": ".concat(e.name)]}),(0,i.jsx)("em",{children:e.description})]})},o=a=>{let{options:e,...n}=a,t=null==e?void 0:e.map(a=>({...a,className:_().option}));return(0,i.jsx)(r.WPr,{options:t,autoFocus:!0,variant:"borderless",optionRender:s,dropdownStyle:{minWidth:"500px"},className:"w-full p-0","data-testid":"taxonomy-select",...n})}},34929:function(a,e,n){"use strict";var i=n(24246),r=n(64925),t=n.n(r),_=n(27378),s=n(16134),o=n(30002),F=n(28079),l=n(57072);let u=()=>{let{isLoading:a}=(0,F.fd)(),e=(0,s.C)(F.U3),{isLoading:n}=(0,l.MO)(),i=(0,s.C)(l.qb),{isLoading:r}=(0,o.te)();return{dataUses:e,dataSubjects:(0,s.C)(o.ZL),dataCategories:i,isLoading:a||n||r}};e.Z=()=>{let{dataUses:a,dataCategories:e,dataSubjects:n,isLoading:r}=u(),s=function(a){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return a.split(".").slice(0,e).join(".")},o=function(a,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=e(a);if(!i)return{};let r=e(s(a,n)),t=!!i.parent_key;return{name:i.name||void 0,primaryName:t&&(null==r?void 0:r.name)!==i.name&&(null==r?void 0:r.name)||void 0}},F=function(a,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:t}=o(a,e,n);return r?t?(0,i.jsxs)(_.Fragment,{children:[(0,i.jsxs)("strong",{children:[t,":"]})," ",r]},a):(0,i.jsx)("strong",{children:r},a):a},l=e=>t()(a,{fides_key:e}),c=a=>t()(e,{fides_key:a}),d=a=>t()(n,{fides_key:a});return{getDataUses:()=>a,getDataUseByKey:l,getDataUseDisplayName:a=>F(a,l,1),getDataUseDisplayNameProps:a=>o(a,l,1),getDataCategories:()=>e,getDataCategoryByKey:c,getDataCategoryDisplayName:a=>F(a,c,2),getDataCategoryDisplayNameProps:a=>o(a,c,2),getDataSubjects:()=>n,getDataSubjectByKey:d,getDataSubjectDisplayName:a=>{let e=d(a);return e?e.name:a},getPrimaryKey:s,isLoading:r}}},8411:function(a,e,n){"use strict";n.d(e,{NA:function(){return t},Z8:function(){return r}});var i=n(21702);let r={[i._F.ER]:"Eritrea",[i._F.DJ]:"Djibouti",[i._F.MR]:"Mauritania",[i._F.NA]:"Namibia",[i._F.GH]:"Ghana",[i._F.SS]:"South Sudan",[i._F.SC]:"Seychelles",[i._F.IO]:"British Indian Ocean Territory",[i._F.GQ]:"Equatorial Guinea",[i._F.AO]:"Angola",[i._F.CG]:"Republic of the Congo",[i._F.BW]:"Botswana",[i._F.BI]:"Burundi",[i._F.DZ]:"Algeria",[i._F.TD]:"Chad",[i._F.NG]:"Nigeria",[i._F.TZ]:"Tanzania",[i._F.EH]:"Western Sahara",[i._F.SN]:"Senegal",[i._F.LR]:"Liberia",[i._F.ZA]:"South Africa",[i._F.CV]:"Cape Verde",[i._F.GM]:"Gambia",[i._F.SD]:"Sudan",[i._F.KM]:"Comoros",[i._F.SZ]:"Eswatini",[i._F.UG]:"Uganda",[i._F.MG]:"Madagascar",[i._F.RW]:"Rwanda",[i._F.CD]:"DR Congo",[i._F.CM]:"Cameroon",[i._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[i._F.TG]:"Togo",[i._F.MU]:"Mauritius",[i._F.NE]:"Niger",[i._F.BJ]:"Benin",[i._F.EG]:"Egypt",[i._F.LS]:"Lesotho",[i._F.ET]:"Ethiopia",[i._F.MA]:"Morocco",[i._F.YT]:"Mayotte",[i._F.BF]:"Burkina Faso",[i._F.RE]:"R\xe9union",[i._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[i._F.CF]:"Central African Republic",[i._F.MZ]:"Mozambique",[i._F.MW]:"Malawi",[i._F.ML]:"Mali",[i._F.ZM]:"Zambia",[i._F.LY]:"Libya",[i._F.GW]:"Guinea-Bissau",[i._F.SO]:"Somalia",[i._F.KE]:"Kenya",[i._F.GN]:"Guinea",[i._F.ZW]:"Zimbabwe",[i._F.TN]:"Tunisia",[i._F.SL]:"Sierra Leone",[i._F.GA]:"Gabon",[i._F.CI]:"Ivory Coast",[i._F.JO]:"Jordan",[i._F.PK]:"Pakistan",[i._F.KP]:"North Korea",[i._F.MO]:"Macau",[i._F.AM]:"Armenia",[i._F.SY]:"Syria",[i._F.TJ]:"Tajikistan",[i._F.SA]:"Saudi Arabia",[i._F.KR]:"South Korea",[i._F.NP]:"Nepal",[i._F.PH]:"Philippines",[i._F.IQ]:"Iraq",[i._F.LB]:"Lebanon",[i._F.MN]:"Mongolia",[i._F.PS]:"Palestine",[i._F.YE]:"Yemen",[i._F.JP]:"Japan",[i._F.KZ]:"Kazakhstan",[i._F.LK]:"Sri Lanka",[i._F.MM]:"Myanmar",[i._F.KG]:"Kyrgyzstan",[i._F.CN]:"China",[i._F.AF]:"Afghanistan",[i._F.OM]:"Oman",[i._F.IN]:"India",[i._F.LA]:"Laos",[i._F.UZ]:"Uzbekistan",[i._F.MV]:"Maldives",[i._F.ID]:"Indonesia",[i._F.VN]:"Vietnam",[i._F.MY]:"Malaysia",[i._F.TW]:"Taiwan",[i._F.KH]:"Cambodia",[i._F.AE]:"United Arab Emirates",[i._F.HK]:"Hong Kong",[i._F.GE]:"Georgia",[i._F.BD]:"Bangladesh",[i._F.KW]:"Kuwait",[i._F.TM]:"Turkmenistan",[i._F.QA]:"Qatar",[i._F.BH]:"Bahrain",[i._F.BN]:"Brunei",[i._F.TH]:"Thailand",[i._F.BT]:"Bhutan",[i._F.SG]:"Singapore",[i._F.IL]:"Israel",[i._F.AZ]:"Azerbaijan",[i._F.TL]:"Timor-Leste",[i._F.IR]:"Iran",[i._F.TR]:"Turkey",[i._F.MK]:"North Macedonia",[i._F.IE]:"Ireland",[i._F.DK]:"Denmark",[i._F.SK]:"Slovakia",[i._F.MD]:"Moldova",[i._F.AX]:"\xc5land Islands",[i._F.PL]:"Poland",[i._F.BA]:"Bosnia and Herzegovina",[i._F.SM]:"San Marino",[i._F.CZ]:"Czechia",[i._F.EE]:"Estonia",[i._F.XK]:"Kosovo",[i._F.FO]:"Faroe Islands",[i._F.SJ]:"Svalbard and Jan Mayen",[i._F.GG]:"Guernsey",[i._F.FR]:"France",[i._F.NL]:"Netherlands",[i._F.FI]:"Finland",[i._F.PT]:"Portugal",[i._F.DE]:"Germany",[i._F.MT]:"Malta",[i._F.JE]:"Jersey",[i._F.IS]:"Iceland",[i._F.ES]:"Spain",[i._F.GI]:"Gibraltar",[i._F.NO]:"Norway",[i._F.CY]:"Cyprus",[i._F.RS]:"Serbia",[i._F.LT]:"Lithuania",[i._F.MC]:"Monaco",[i._F.LU]:"Luxembourg",[i._F.UA]:"Ukraine",[i._F.IM]:"Isle of Man",[i._F.RO]:"Romania",[i._F.BE]:"Belgium",[i._F.SE]:"Sweden",[i._F.ME]:"Montenegro",[i._F.LV]:"Latvia",[i._F.VA]:"Vatican City",[i._F.AT]:"Austria",[i._F.AL]:"Albania",[i._F.LI]:"Liechtenstein",[i._F.GR]:"Greece",[i._F.IT]:"Italy",[i._F.AD]:"Andorra",[i._F.GB]:"United Kingdom",[i._F.RU]:"Russia",[i._F.SI]:"Slovenia",[i._F.BY]:"Belarus",[i._F.CH]:"Switzerland",[i._F.HU]:"Hungary",[i._F.BG]:"Bulgaria",[i._F.HR]:"Croatia",[i._F.TC]:"Turks and Caicos Islands",[i._F.CW]:"Cura\xe7ao",[i._F.GP]:"Guadeloupe",[i._F.UM]:"United States Minor Outlying Islands",[i._F.GT]:"Guatemala",[i._F.PM]:"Saint Pierre and Miquelon",[i._F.BQ]:"Caribbean Netherlands",[i._F.GL]:"Greenland",[i._F.SX]:"Sint Maarten",[i._F.PA]:"Panama",[i._F.AW]:"Aruba",[i._F.MQ]:"Martinique",[i._F.AG]:"Antigua and Barbuda",[i._F.BM]:"Bermuda",[i._F.CU]:"Cuba",[i._F.GD]:"Grenada",[i._F.NI]:"Nicaragua",[i._F.LC]:"Saint Lucia",[i._F.KN]:"Saint Kitts and Nevis",[i._F.DO]:"Dominican Republic",[i._F.VC]:"Saint Vincent and the Grenadines",[i._F.BZ]:"Belize",[i._F.HT]:"Haiti",[i._F.JM]:"Jamaica",[i._F.BS]:"Bahamas",[i._F.MX]:"Mexico",[i._F.MF]:"Saint Martin",[i._F.SV]:"El Salvador",[i._F.BL]:"Saint Barth\xe9lemy",[i._F.AI]:"Anguilla",[i._F.MS]:"Montserrat",[i._F.VG]:"British Virgin Islands",[i._F.BB]:"Barbados",[i._F.HN]:"Honduras",[i._F.KY]:"Cayman Islands",[i._F.DM]:"Dominica",[i._F.TT]:"Trinidad and Tobago",[i._F.CR]:"Costa Rica",[i._F.SR]:"Suriname",[i._F.CX]:"Christmas Island",[i._F.WS]:"Samoa",[i._F.PF]:"French Polynesia",[i._F.AS]:"American Samoa",[i._F.NC]:"New Caledonia",[i._F.TK]:"Tokelau",[i._F.PW]:"Palau",[i._F.KI]:"Kiribati",[i._F.VU]:"Vanuatu",[i._F.PN]:"Pitcairn Islands",[i._F.CK]:"Cook Islands",[i._F.FJ]:"Fiji",[i._F.PG]:"Papua New Guinea",[i._F.MP]:"Northern Mariana Islands",[i._F.NU]:"Niue",[i._F.TV]:"Tuvalu",[i._F.NF]:"Norfolk Island",[i._F.TO]:"Tonga",[i._F.FM]:"Micronesia",[i._F.SB]:"Solomon Islands",[i._F.NR]:"Nauru",[i._F.WF]:"Wallis and Futuna",[i._F.GU]:"Guam",[i._F.AU]:"Australia",[i._F.NZ]:"New Zealand",[i._F.MH]:"Marshall Islands",[i._F.CC]:"Cocos (Keeling) Islands",[i._F.VE]:"Venezuela",[i._F.PY]:"Paraguay",[i._F.BR]:"Brazil",[i._F.CO]:"Colombia",[i._F.PE]:"Peru",[i._F.CL]:"Chile",[i._F.UY]:"Uruguay",[i._F.AR]:"Argentina",[i._F.GY]:"Guyana",[i._F.BO]:"Bolivia",[i._F.GF]:"French Guiana",[i._F.EC]:"Ecuador",[i._F.FK]:"Falkland Islands",[i._F.US_AL]:"Alabama",[i._F.US_AK]:"Alaska",[i._F.US_AZ]:"Arizona",[i._F.US_AR]:"Arkansas",[i._F.US_CA]:"California",[i._F.US_CO]:"Colorado",[i._F.US_CT]:"Connecticut",[i._F.US_DE]:"Delaware",[i._F.US_DC]:"District of Columbia (DC)",[i._F.US_FL]:"Florida",[i._F.US_GA]:"Georgia",[i._F.US_HI]:"Hawaii",[i._F.US_ID]:"Idaho",[i._F.US_IL]:"Illinois",[i._F.US_IN]:"Indiana",[i._F.US_IA]:"Iowa",[i._F.US_KS]:"Kansas",[i._F.US_KY]:"Kentucky",[i._F.US_LA]:"Louisiana",[i._F.US_ME]:"Maine",[i._F.US_MD]:"Maryland",[i._F.US_MA]:"Massachusetts",[i._F.US_MI]:"Michigan",[i._F.US_MN]:"Minnesota",[i._F.US_MS]:"Mississippi",[i._F.US_MO]:"Missouri",[i._F.US_MT]:"Montana",[i._F.US_NE]:"Nebraska",[i._F.US_NV]:"Nevada",[i._F.US_NH]:"New Hampshire",[i._F.US_NJ]:"New Jersey",[i._F.US_NM]:"New Mexico",[i._F.US_NY]:"New York",[i._F.US_NC]:"North Carolina",[i._F.US_ND]:"North Dakota",[i._F.US_OH]:"Ohio",[i._F.US_OK]:"Oklahoma",[i._F.US_OR]:"Oregon",[i._F.US_PA]:"Pennsylvania",[i._F.US_PR]:"Puerto Rico",[i._F.US_RI]:"Rhode Island",[i._F.US_SC]:"South Carolina",[i._F.US_SD]:"San Diego",[i._F.US_TN]:"Tennessee",[i._F.US_TX]:"Texas",[i._F.US_UT]:"Utah",[i._F.US_VA]:"Virginia",[i._F.US_VI]:"United States Virgin Islands",[i._F.US_VT]:"Vermon",[i._F.US_WA]:"Washington",[i._F.US_WV]:"West Virginia",[i._F.US_WI]:"Wisconsin",[i._F.US_WY]:"Wyoming",[i._F.CA_AB]:"Alberta",[i._F.CA_BC]:"British Columbia",[i._F.CA_MB]:"Manitoba",[i._F.CA_NB]:"New Brunswick",[i._F.CA_NL]:"Newfoundland and Labrador",[i._F.CA_NS]:"Nova Scotia",[i._F.CA_ON]:"Ontario",[i._F.CA_PE]:"Prince Edward Island",[i._F.CA_QC]:"Quebec",[i._F.CA_SK]:"Saskatchewan",[i._F.CA_NT]:"Northwest Territories",[i._F.CA_NU]:"Nunavut",[i._F.CA_YT]:"Yukon",[i._F.CA]:"Canada",[i._F.US]:"United States",[i._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[i._F.CARIBBEAN]:"Caribbean",[i._F.EEA]:"European Economic Area (EEA)",[i._F.NON_EEA]:"Non European Economic Area"},t=new Map(Object.entries(r));Object.entries(r).map(a=>({value:a[0],label:a[1]}))},57454:function(a,e,n){"use strict";n.d(e,{M:function(){return o}});var i=n(24246),r=n(66726),t=n.n(r),_=n(27378),s=n(86780);let o=a=>{let{value:e,onChange:n}=a,[r,o]=(0,_.useState)(e),F=t()(n,500),l=(0,_.useCallback)(a=>{o(a),F(a)},[]);return(0,i.jsx)(s.Z,{search:r,onChange:l,onClear:()=>{o(""),n("")}})}},70682:function(a,e,n){"use strict";var i=n(24246),r=n(79283),t=n(34929),_=n(78238);e.Z=a=>{let{selectedTaxonomies:e,...n}=a,{getDataUseDisplayNameProps:s,getDataUses:o}=(0,t.Z)(),F=o().filter(a=>a.active&&_.g.includes(a.fides_key)).filter(a=>!e.includes(a.fides_key)).map(a=>{let{name:e,primaryName:n}=s(a.fides_key);return{value:a.fides_key,name:e,primaryName:n,description:a.description||""}});return(0,i.jsx)(r.l,{options:F,...n})}},78238:function(a,e,n){"use strict";n.d(e,{g:function(){return i}});let i=["essential","functional.service.improve","personalize","analytics","marketing.advertising.first_party.targeted","marketing.advertising.third_party.targeted"];e.Z=a=>i.includes(a)},93237:function(a,e,n){"use strict";n.d(e,{Sv:function(){return m},Yb:function(){return d},dQ:function(){return S},lm:function(){return f}});var i=n(24246),r=n(56351),t=n(34090),_=n(27378),s=n(16134),o=n(40324),F=n(91613),l=n(32885),u=n(57865);let c=(a,e,n)=>{var i,r;let[o,F,{setValue:c,setTouched:d}]=(0,t.U$)({name:a,type:n||void 0}),m=!!(F.touched&&F.error),{error:S}=F,f={...o,value:null!==(i=o.value)&&void 0!==i?i:""},[h,g]=(0,_.useState)(null!==(r=f.value)&&void 0!==r?r:""),{values:C}=(0,t.u6)(),{vendor_id:v}=C,N=(0,s.C)((0,l.$e)(v||"")),p=(0,s.C)(u.bN),M=(0,_.useRef)();return(0,_.useEffect)(()=>{"showing"===p&&g(f.value)},[p,g]),(0,_.useEffect)(()=>{if("showing"===p&&N){let n=e?e(N):N[a];f.value!==n&&(c(n),setTimeout(()=>{var a;d(!0),null===(a=M.current)||void 0===a||a.blur()},300))}},[p,c,N,M.current]),(0,_.useEffect)(()=>{"hiding"===p&&c(h)},[p,c,h]),{field:f,isInvalid:m,isShowingSuggestions:p,error:S,inputRef:M}},d=a=>{let{label:e,tooltip:n,disabled:t,isRequired:_=!1,dictField:s,name:l,placeholder:u,id:d}=a,{field:m,isInvalid:S,isShowingSuggestions:f,error:h,inputRef:g}=c(l,s);return(0,i.jsx)(r.NIc,{isInvalid:S,isRequired:_,children:(0,i.jsxs)(r.gCW,{alignItems:"start",children:[(0,i.jsxs)(r.kCb,{alignItems:"center",children:[(0,i.jsx)(o.__,{htmlFor:d||l,fontSize:"xs",my:0,mr:1,children:e}),n?(0,i.jsx)(F.Z,{label:n}):null]}),(0,i.jsx)(o.oi,{...m,ref:g,isRequired:_,isDisabled:t,"data-testid":"input-".concat(m.name),placeholder:u,isPassword:!1,color:"showing"===f?"complimentary.500":"gray.800"}),(0,i.jsx)(o.Bc,{isInvalid:S,message:h,fieldName:m.name})]})})},m=a=>{let{label:e,tooltip:n,disabled:t,isRequired:_=!1,dictField:s,name:l,id:u}=a,{field:d,isInvalid:m,isShowingSuggestions:S,error:f}=c(l,s);return(0,i.jsx)(r.NIc,{isInvalid:m,isRequired:_,children:(0,i.jsxs)(r.gCW,{alignItems:"start",children:[(0,i.jsxs)(r.kCb,{alignItems:"center",children:[(0,i.jsx)(o.__,{htmlFor:u||l,fontSize:"xs",my:0,mr:1,children:e}),n?(0,i.jsx)(F.Z,{label:n}):null]}),(0,i.jsx)(r.gxH,{...d,size:"sm","data-testid":"input-".concat(d.name),focusBorderColor:"primary.600",color:"showing"===S?"complimentary.500":"gray.800",isDisabled:t}),(0,i.jsx)(o.Bc,{isInvalid:m,message:f,fieldName:d.name})]})})},S=a=>{let{label:e,tooltip:n,dictField:_,name:s,id:l,disabled:u}=a,{field:d,isInvalid:m,error:S}=c(s,_,"checkbox");return(0,i.jsxs)(r.NIc,{isInvalid:m,width:"full",children:[(0,i.jsxs)(r.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(r.Ugi,{spacing:1,children:[(0,i.jsx)(o.__,{htmlFor:l||s,fontSize:"xs",my:0,mr:0,children:e}),n?(0,i.jsx)(F.Z,{label:n}):null]}),(0,i.jsx)(r.Ugi,{children:(0,i.jsx)(t.gN,{name:d.name,children:a=>{let{form:{setFieldValue:e}}=a;return(0,i.jsx)(r.rAg,{checked:d.checked,onChange:a=>{e(d.name,a)},disabled:u,className:"mr-2","data-testid":"input-".concat(d.name),size:"small"})}})})]}),(0,i.jsx)(o.Bc,{isInvalid:m,message:S,fieldName:d.name})]})},f=a=>{let{label:e,tooltip:n,dictField:_,name:s,id:l,disabled:u}=a,{field:d,isInvalid:m,error:S,isShowingSuggestions:f}=c(s,_,"numeric"),{setFieldValue:h}=(0,t.u6)();return(0,i.jsxs)(r.NIc,{isInvalid:m,width:"full",children:[(0,i.jsxs)(r.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(r.Ugi,{spacing:1,children:[(0,i.jsx)(o.__,{htmlFor:l||s,fontSize:"xs",my:0,mr:0,children:e}),n?(0,i.jsx)(F.Z,{label:n}):null]}),(0,i.jsx)(r.Ugi,{children:(0,i.jsxs)(r.Y2U,{value:d.value,name:d.name,size:"xs",onBlur:d.onBlur,onChange:a=>{h(d.name,a)},w:"100%",colorScheme:"terracotta",inputMode:"numeric","data-testid":"input-".concat(d.name),color:"showing"===f?"complimentary.500":"gray.800",focusBorderColor:"primary.600",isDisabled:u,children:[(0,i.jsx)(r.zuI,{}),(0,i.jsxs)(r.FiK,{children:[(0,i.jsx)(r.WQu,{}),(0,i.jsx)(r.Y_d,{})]})]})})]}),(0,i.jsx)(o.Bc,{isInvalid:m,message:S,fieldName:d.name})]})}},72707:function(a){a.exports={option:"TaxonomySelect_option__vY6v2"}}}]);
|