ethyca-fides 2.59.2b0__py2.py3-none-any.whl → 2.59.2b2__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.59.2b0.dist-info → ethyca_fides-2.59.2b2.dist-info}/METADATA +2 -2
- {ethyca_fides-2.59.2b0.dist-info → ethyca_fides-2.59.2b2.dist-info}/RECORD +195 -195
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/c9c72b3d550b_data_migration_cookie_asset.py +218 -0
- fides/api/db/system.py +1 -121
- fides/api/models/asset.py +1 -2
- fides/api/models/privacy_notice.py +14 -19
- fides/api/models/sql_models.py +0 -51
- fides/api/schemas/connection_configuration/connection_secrets_mysql.py +12 -0
- fides/api/schemas/system.py +1 -2
- fides/api/service/connectors/mysql_connector.py +13 -1
- fides/api/worker/__init__.py +1 -1
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1100-22c375e757f23150.js → 1100-93c5835d689e9dd5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1817-11bb237f57d9ad27.js → 1817-16d1dd3b13e590b3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1904-3c40738cb0fd2a7c.js → 1904-0f03e5a2c3de8487.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{2479-50f431c0e2c0de3c.js → 2479-18fbea714b5f1f7a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3503-569232568cee1a7e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3513-cf0c4d886ff26e00.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3702-31d37a0217f82615.js → 3702-c4465f7b3bbc3edc.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3855-5417dfc333c7b6b6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3872-68b4ceba8f632bc0.js → 3872-03319b7328ddc284.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/401-f0c485676a4fc5f9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4060-98d858ec609e4b76.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4121-044a191b265f4e51.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4481-85e3f5845b50f10d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5487-22de631f1d186527.js → 5487-7751e91b40dc6050.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5826-226c8843e715b6ad.js → 5826-8516f6c635510e95.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5835-b7b45dfb97180a88.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5973-4e65b191ed82f8bd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6277-076a319bcff4f1a2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{6372-0ca1b9521b5489fd.js → 6372-d3f778c62070545f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6853-7d7eb22f19d3806c.js → 6853-25ff9e572d633f33.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6954-981a8a444780bedb.js → 6954-169abc679def0fb6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7751-09c6424d673d8aa4.js → 7751-e0a78be0ca620df1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/79-2302442f8b53f944.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{8433-dd6d8dae02275d66.js → 8433-4481a5d085d3b008.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{8934-6881185f0c5c0f6d.js → 8934-e2a4fd9f8ab74142.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9282-356dc48612f4a21c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9327-fb7ef941b5176077.js → 9327-b019990849ff57f3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9392.da35a8e778812d91.js → 9392.5f3cfb8eafbeac59.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9572-ab070b1ae17dde8f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9676.f297a1347ac09c56.js → 9676.2e1267373b5a6076.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9719-caba0228fc973d3f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9767-b4f9c2cc14de6df6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9951-8ceba69296972ce9.js → 9951-e0d7db7ec538ebf1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9965-528ef17ac491d809.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{404-a3c57a06ff67cf1f.js → 404-1dfbf30fba0233a2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-fc9e922ec354be47.js → _app-9560c81c6cf5f050.js} +17 -17
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-bca30784c7356aa3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-93907c53f342831f.js → multiple-14c60fbc5907c621.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-0d7a9d9ad082c80c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/ant-poc-c2c4fd5faaf0f882.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-5e83ee7792c0f75f.js → add-vendors-79949b978a966399.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-ea7b2c628260c84c.js → configure-6af86d0717034a7f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-7122d8a8c20e7cd2.js → [id]-e876f21f7f2245aa.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-85ddbe3ae50c7527.js → privacy-experience-83dea888aad26af3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-5a9269aa00a16596.js → [id]-80dd6ab96599efb5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-78808c75ba86c0be.js → new-e48da14c5d5d0a66.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-047c409bc5e12d1a.js → privacy-notices-05e67aa6f029e6d4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-893753088b9729a3.js → properties-6c99121562583eb7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-01d1371e690ae190.js → reporting-ed1cdefeb38cf592.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{consent-7e5adfec9134a268.js → consent-253aa071516a6436.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-4b2c10ff79e46e50.js → [projectUrn]-366121dfd638f6b5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-05bbb01e37766b80.js → projects-974623a3afd4754b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-4b1d9e4cc7fa17a2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-936f72087aae94e1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-b6e0c8625c953a00.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-9ebb4dc8bc7dd058.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-f0fe5d6cfcce0e69.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-1bcaa606739ea1c5.js → [resourceUrn]-10f789d4ab2b8927.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-22f55dc12354b4c6.js → detection-f473b2ee1c67be3c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-86111c25dc30ef2b.js → [resourceUrn]-2569551ae75ea5a2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-853be75f08b9ab5c.js → discovery-ad077f30849fdc0a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-6c63a6295668ed4e.js → datamap-0cb4cd87c876acc3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-7a99a6c5c2fc2abe.js → [...subfieldNames]-fd1f9aba215e8fb2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-39aab1de4df0660d.js → [collectionName]-06793bb37fa509d8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-2cf04998a7521a7d.js → [datasetId]-662ce6650bd83f05.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-f3a6dd67f012b005.js → new-5b773da9c79af072.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-3b703775de1ca75e.js → dataset-a8582040705239d4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-b905c75f68786c2f.js → [id]-e650d48347fb457e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-abd92bec98bdbb66.js → new-4b96de4707916560.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-52c3f076edb49944.js → datastore-connection-7ce2cd66791e7f6f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-1bccf315f995267a.js → index-71e4264dcfba6181.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-b3ec5320782fbb49.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-2ce76b506ba8404a.js → integrations-4789200cdb1d7ec5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-8950b4aff799099c.js → [id]-3a52dfa45f398f31.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-4cad85d5b6d52734.js → add-template-8e20f0da3a0779cc.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-57c7aa44af163623.js → messaging-439832fde70c1157.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-2fc14bda8d314449.js → [id]-16b266c9ddf8d192.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-3219ddeb37d46398.js → messaging-9c1748191ca19867.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-9f1ea2b5896ff3fd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-d8d23d06ce1d9dae.js → configure-67b0a2a798d71e4d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-faa220f7200fb252.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-6cca2c8ebbff78aa.js → [id]-99860c05fb5d25bd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-f09f98007725fa51.js → add-property-4a7a21c25985fff0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{properties-9034bab3d7200d9b.js → properties-a78b5af5894ed324.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-a36cf070c98a6cbd.js → datamap-b5c8cdfd6c1e0544.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-92dada8329e89092.js → about-92fcfaa6111d7d24.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-224434177b2775dc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-f6d6e3d9d556387c.js → consent-5822e06b76f3ec84.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-ff123ece2e2e4009.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-368a4183139ea5e0.js → domain-records-4347b3fdd12fdcff.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-255655d6c367faad.js → domains-899401bf5c72b67f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-e4498b6310074705.js → email-templates-d8f6562694f9dd45.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-18f56b6b76abb71d.js → locations-f74503aa1626e302.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-610aa65b3dbcf467.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-0350314337abff11.js → regulations-081148db3f589271.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-6986ba3f6f33c110.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-022910a52efbad76.js → [id]-e0110a539d33069a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-e9a111ef0c32161e.js → systems-7aef28e963417fa3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-61345b0f7cbd939e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-082c3156175f9267.js → new-65ef1bdebb679666.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-32ec340d4b390d07.js → [id]-3430c5a08e86a85d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-216944eb66e430bb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/webpack-7104b266fb47d653.js +1 -0
- fides/ui-build/static/admin/_next/static/css/{72caf4a266697967.css → 091e5fc4883aeb42.css} +1 -1
- fides/ui-build/static/admin/_next/static/tLZG5DlQ8HHUd5zR6TZEN/_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/[configuration_id]/[purpose_id].html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/146-106021bf1ae6e912.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3086-ffd15c92ea81b3d6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3244-281e8f12e46ac168.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3855-da54ef27afd56c46.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/401-49cdd118a89cc343.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4060-bad5f07013c7bb49.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4121-4914fb77e60d31f4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4481-7a992683e9191bc9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5102-3acf312a8f0d7720.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5480-d177a83facd21738.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-d5469b7d75700b01.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6277-c46c9eb59177b850.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6395-04041b53946664b1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/79-7ca48fb1a0b52f96.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9282-23b38e03f897722f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9572-64df993c83a2994c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-162b0f8524990149.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-c4c0c42bbe0f5548.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a8c51c7bdbb405e2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/ant-poc-8fcf312148606e7e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-d08a38d4f198691a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-cc5431e4fbd6d39e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-f073ddcfb916988e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-cf48ed7dc04c3af2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-73025c2ac5a00347.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-afcf73fd0337dde0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-8e17802ab6b2d3fd.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-9d71495b42f34038.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-7986cf3b36456353.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-e6c477f2ac098e0b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-c01d24583e9485f0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-d5f777510ab8dfd2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-517419b35435604a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-c8ca51efbeccf39b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/webpack-01277b766c8eb076.js +0 -1
- fides/ui-build/static/admin/_next/static/tRpOUAZ0oZhnC241q-BOJ/_buildManifest.js +0 -1
- {ethyca_fides-2.59.2b0.dist-info → ethyca_fides-2.59.2b2.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.59.2b0.dist-info → ethyca_fides-2.59.2b2.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.59.2b0.dist-info → ethyca_fides-2.59.2b2.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.59.2b0.dist-info → ethyca_fides-2.59.2b2.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{tRpOUAZ0oZhnC241q-BOJ → tLZG5DlQ8HHUd5zR6TZEN}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3244],{77867:function(e,s,t){var a=t(24246),i=t(77181);s.Z=e=>{let{connected:s,...t}=e,n="red.500";return null==s?n="gray.300":s&&(n="green.500"),(0,a.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...t})}},59301:function(e,s,t){var a=t(24246);let{Link:i}=t(77181).AntTypography;s.Z=e=>(0,a.jsx)(i,{target:"_blank",rel:"noopener noreferrer",...e})},77213:function(e,s,t){t.d(s,{Z:function(){return p}});var a=t(24246),i=t(77181),n=t(88038),r=t.n(n),l=t(86677);t(27378);var o=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,l.useRouter)();return(0,a.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,a.jsxs)(i.xuv,{children:[(0,a.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,a.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,a.jsx)(i.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,a.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:s,title:t,padded:n=!0,mainProps:c}=e,p=(0,o.hz)(),h=(0,l.useRouter)(),m="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(p.flags.privacyRequestsConfiguration&&m),{data:g}=(0,d.JE)(void 0,{skip:x}),{data:y}=(0,d.PW)(void 0,{skip:x}),f=p.flags.privacyRequestsConfiguration&&(!g||!y)&&m;return(0,a.jsxs)(i.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,a.jsxs)(r(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.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:[f?(0,a.jsx)(u,{}):null,s]})]})}},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(77181);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(77181);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(77181),n=t(27378),r=t(45277),l=t(16125),o=t(812),d=t(46628),c=t(20682),u=t(54427),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(77181),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(77181);t(27378);var n=t(16643),r=t(16394),l=t(14746);let o=l.Ny+l.iW.get(n.Rj.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===n.Rj.WEBSITE;s.Z=e=>{let{data:s,...t}=e;return(0,a.jsx)(i.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(c(s)&&s.encoded_icon)return"data:image/svg+xml;base64,".concat(s.encoded_icon);if(u(s)){var t;let e=null===(t=s.secrets)||void 0===t?void 0:t.url;if(!e)return o;let a=(0,r.ge)(e);return(0,r.tl)(a,100)}if(d(s))e=[...l.iW].find(e=>{var t,a;let[i]=e;return s.connection_type.toString()!==n.Rj.SAAS&&s.connection_type.toString()===i||s.connection_type.toString()===n.Rj.SAAS&&(null===(a=s.saas_config)||void 0===a?void 0:null===(t=a.type)||void 0===t?void 0:t.toString())===i.toString()});else if(c(s)){let{identifier:t}=s;e=[...l.iW].find(e=>{let[s]=e;return s.toLowerCase()===t.toLowerCase()})}return e?l.Ny+e[1]:l.VD})(),fallbackSrc:u(s)?o:l.VD,alt:(()=>{if(d(s)){var e;return null!==(e=s.name)&&void 0!==e?e:s.key}return c(s)?s.human_readable:s})(),...t})}},73183:function(e,s,t){var a=t(24246),i=t(77181);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(77181),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(77181),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"}})})]})}},19812:function(e,s,t){t.d(s,{t:function(){return l}});var a=t(14047),i=t(14207),n=t(27378),r=t(41966);let l=e=>{var s,t,l;let{connectionConfig:o}=e,[d]=(0,i.S6)(),{data:c}=(0,i.Eg)(null!==(t=null==o?void 0:o.key)&&void 0!==t?t:""),u=null!==(l=null==c?void 0:null===(s=c.items)||void 0===s?void 0:s.map(e=>e.fides_key))&&void 0!==l?l:[],p=u.map(e=>({label:e,value:e})),{data:h}=(0,r.LH)({onlyUnlinkedDatasets:!0}),m=(0,n.useMemo)(()=>{var e;return null!==(e=null==h?void 0:h.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[h]),{errorAlert:x,successAlert:g}=(0,a.V)();return{dropdownOptions:[...p,...m],initialDatasets:u,patchConnectionDatasetConfig:async function(e,s){var t,a,i;let{showSuccessAlert:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=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:[],l=await d({connection_key:s,dataset_pairs:r}).unwrap();(null===(a=l.failed)||void 0===a?void 0:a.length)>0?x(l.failed[0].message):n&&g("Dataset successfully updated!")}}}},72774:function(e,s,t){t.d(s,{Z:function(){return r}});var a=t(24246),i=t(77181),n=e=>{let{title:s,description:t,button:n}=e;return(0,a.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,a.jsx)(i.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,a.jsxs)(i.xuv,{flexGrow:1,children:[(0,a.jsx)(i.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,a.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:t})]}),n]})},r=()=>(0,a.jsx)(i.xuv,{mb:"6",maxW:"720px","data-testid":"locked-for-GVL-notice",children:(0,a.jsx)(n,{title:"This system is part of the TCF Global Vendor List (GVL)",description:(0,a.jsxs)(a.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,a.jsx)(i.rUS,{href:"https://fid.es/tcf_gvl",isExternal:!0,color:"complimentary.500",children:"For more information on the Global Vendor List, click here."})]})})})},69525:function(e,s,t){t.d(s,{U:function(){return a}});let a=e=>{var s;let t=e.data_categories.flatMap(e=>e.split(","));return{data_use:e.data_use,data_categories:t,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===(s=e.cookies)||void 0===s?void 0:s.map(e=>({name:e.name,domain:e.domain,path:e.path}))}}},84450:function(e,s,t){t.d(s,{Z:function(){return sK}});var a,i,n=t(24246),r=t(84720),l=t(77181),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(16643),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"}),R=t(19812),z=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"})]})},F=t(8627),L=t(32885),O=t(65450),W=t(34090),Z=t(55484),P=t(97181),N=t(57072),U=t(39864),V=t(27259);let M=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,n.jsxs)(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 B=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:a,onCancel:i}=e,{isLoading:r}=(0,N.MO)(),o=(0,h.C)(U.qb),{errorAlert:d}=(0,S.V)();return r?null:(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:{fields:s.length>0?s:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,s)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}a(e,s)},validateOnBlur:!1,validateOnChange:!1,validationSchema:Z.Ry({fields:Z.IX().of(Z.Ry().shape({pii_field:Z.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:Z.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:Z.IX(Z.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(W.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(W.F2,{name:"fields",render:s=>{let{fields:a}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(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)(V.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)(V.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)(P.d,{name:"fields.".concat(t,".data_categories"),options:o.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(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)(M,{isSubmitting:t,onCancelClick:i})]})}})})})})},H=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)(B,{data:d,isSubmitting:r,onSaveClick:v,onCancel:m}):null]})})]})]})]})},K=t(98784),Y=t.n(K),G=t(73183),$=e=>{let{options:s}=e,[t,{error:a},i]=(0,W.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),Q=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"})]})]})]})]})},X=t(99792);let ee=(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},es=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===X.Z.SAAS&&(t+="_api"),t},et="#/definitions/FidesDatasetReference",ea=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===et&&(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)===et)return"Enter dataset.collection.field"},D=e=>{var t,a;return(null==s?void 0:null===(t=s.required)||void 0===t?void 0:t.includes(e))||(null==s?void 0:null===(a=s.properties)||void 0===a?void 0:a[e])!==void 0&&"default"in s.properties[e]},A=(e,s)=>(0,n.jsx)(W.gN,{id:"secrets.".concat(e),name:"secrets.".concat(e),validate:(!!D(e)||"integer"===s.type)&&(e=>{var t;return w(s.title,e,null===(t=s.allOf)||void 0===t?void 0:t[0].$ref)}),children:t=>{var a;let{field:i,form: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=Y().cloneDeep(e);return s&&Object.keys(s.properties).forEach(e=>{var a;if((null===(a=s.properties[e].allOf)||void 0===a?void 0:a[0].$ref)===et){let s=t.secrets[e].split(".");t.secrets[e]={dataset:s.shift(),field:s.join("."),direction:"from"}}}),t},q=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(E(e))},R=async e=>{Object.keys(await e.validateForm()).length>0||o(await b(h.key))},z=(null==h?void 0:h.disabled)||!1;return(0,n.jsx)(W.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?Y().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)===et){let s=e.secrets[a];s&&(e.secrets[a]="".concat(s.dataset,".").concat(s.field))}}),e}return Y().isEmpty(e.enabled_actions)&&(e.enabled_actions=p.supported_actions.map(e=>e.toString())),ee(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)(W.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)(G.Z,{connection_key:null==h?void 0:h.key,disabled:z,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)(Q,{onDelete:f,deleteResult:_}):null]}),!!(null==h?void 0:h.key)&&(0,n.jsx)(W.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)(W.gN,{id:"enabled_actions",name:"enabled_actions",validate:e=>{let s;return e&&0!==e.length||(s="At least one request type must be selected"),s},children:s=>{let{field:t,form:a}=s;return(0,n.jsxs)(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:Y().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)($,{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:()=>R(e),"data-testid":"test-connection-button",children:u}):null,k&&T.Zi.DATABASE===p.type&&!Y().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)(H,{connectionConfig:h}):null,(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit",children:"Save"})]})]})})}})},ei=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:es(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()},en=async(e,s,t,a,i)=>{var n;let r=a?a.key:es(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},er=async(e,s,t,a,i)=>{let n={systemFidesKey:t,secrets:{}};return(Object.entries(s.properties).forEach(s=>{s[0]in a&&e.secrets[s[0]]===a[s[0]]||(n.secrets[s[0]]=e.secrets[s[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},el=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}=(0,R.t)({connectionConfig:i}),[_]=(0,I.NG)(),[b]=(0,L.IB)(),[v]=(0,I.rO)(),[j]=(0,O.Zh)(),[k]=(0,O.qd)(),[w]=(0,L.kg)(),[C,D]=(0,O._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)(O.NC);return{isSubmitting:d,isAuthorizing:u,handleSubmit:async e=>{let n=!i;try{if(c(!0),a.type===T.Zi.SAAS&&n)i=(await ei(e,s,a,t,E?b:_)).connection;else{let n=await en(e,a,t,i,E?w:k);i||a.type!==T.Zi.DATABASE||(i=n.succeeded[0]),a.type!==T.Zi.MANUAL&&await er(e,s,t,q,j)}i&&e.dataset&&a.type===T.Zi.DATABASE&&await y(e,i.key,{showSuccessAlert:!1}),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 ei(e,s,a,t,_)).connection:await er(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,O.db)({...z,connection_configs:null})),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:D}},eo=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}=el({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)(ea,{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)(z,{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)(F.s,{succeeded:"succeeded"===r.data.test_status,timestamp:r.fulfilledTimeStamp}):(0,n.jsx)(F.s,{succeeded:null==a?void 0:a.last_test_succeeded,timestamp:(null==a?void 0:a.last_test_timestamp)||""}),(0,n.jsx)(l.LZC,{})]}):null]}):null};var ed=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 en(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"})]})]})]})]})},ec=t(44553),eu=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)(ed,{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)(ec.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)(eo,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:r,systemFidesKey:t}):null]})},ep=t(71922),eh=t(31883);let em=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,W.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"})]})},ex=e=>{let{connectionKey:s,...t}=e,a=(0,l.pmc)(),{data:i,isLoading:r}=(0,L.EQ)(s),[o,{isLoading:d}]=(0,L.Am)(),c=(0,h.C)(ep.Zp),u=(0,h.C)(ep.G1),{data:m,isLoading:x}=(0,ep.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,eh.D4)(e)?a((0,f.Vo)("Failed to save consent automation")):a({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,n.jsx)(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)(W.J9,{initialValues:v||{},onSubmit:k,children:(0,n.jsxs)(W.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)(em,{item:e,options:_,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,n.jsx)(em,{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 eg=t(57865),ey=t(3124),ef=t.n(ey),e_=(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"}),eb=(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 ev=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"})}},ej=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,ek=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=ej(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}!((Y().isNil(l)||Y().isEmpty(l))&&(Y().isNil(o)||Y().isEmpty(o)))&&(Y().isEqual(l,o)||(Y().isNil(l)||Y().isEmpty(l)?a.push(r):Y().isNil(o)||Y().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},ew=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}=ek(t.custom_fields,a.custom_fields):{addedFields:r,removedFields:l,changedFields:o}=ek(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}=ev(i);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:s})," ",u," on ",m," at ",h]})},eC=(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}},eS=(e,s)=>{if(Y().isEmpty(s))return e;let t=(e,s)=>{var t,a;return null!==(a=null===(t=s.find(s=>s.value===e))||void 0===t?void 0:t.label)&&void 0!==a?a:e};return{...e,before:{...e.before,vendor_id:t(e.before.vendor_id,s)},after:{...e.after,vendor_id:t(e.after.vendor_id,s)}}},eD=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}}},eT=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}}},eA=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}]}}},eI=(0,p.createContext)(null),eE=()=>(0,p.useContext)(eI);var eq=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,p.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,n.jsx)(eI.Provider,{value:i,children:s})},eR=t(62165),ez=t(30320),eF=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eE(),i=p.Children.toArray(t).filter(e=>{if(p.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=Y().get(null==a?void 0:a.before,s),i=Y().get(null==a?void 0:a.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&Y().isEmpty(t),r="boolean"!=typeof i&&"number"!=typeof i&&Y().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})]})})},eL=t(40324),eO=t(91613),eW=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eE(),[d]=(0,W.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=Y().get(null==r?void 0:r.before,i.name)||[],s=Y().get(null==r?void 0:r.after,i.name)||[];f(!Y().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)(eL.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),a?(0,n.jsx)(eO.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:"→"})]})})},eZ=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eE(),[d]=(0,W.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=Y().get(null==r?void 0:r.before,i.name)||"",s=Y().get(null==r?void 0:r.after,i.name)||"";g(!Y().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)(eL.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),a?(0,n.jsx)(eO.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:"→"})]})})},eP=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:a}=(0,ez.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)(eF,{heading:"Custom fields",children:l.map(e=>i(e)?(0,n.jsx)(eW,{label:e,name:"".concat(r,".").concat(e)},e):(0,n.jsx)(eZ,{label:e,name:"".concat(r,".").concat(e)},e))})},eN=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:r}=eE(),[o]=(0,W.U$)(a),d={...o,value:o.value},[c,u]=(0,p.useState)(!1);(0,p.useEffect)(()=>{u(Y().get(null==i?void 0:i.before,a.name)!==Y().get(null==i?void 0:i.after,a.name))},[i,a.name,d.value]);let 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)(eL.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),t?(0,n.jsx)(eO.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:"→"})]})})},eU=e=>{let{initialValues:s}=e,t=(0,eR.hz)();return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,n.jsx)(W.l0,{children:(0,n.jsxs)(l.Kqy,{children:[(0,n.jsxs)(eF,{heading:"System details",children:[t.dictionaryService?(0,n.jsx)(eZ,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,n.jsx)(eZ,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eZ,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,n.jsx)(eZ,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eW,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,n.jsx)(eF,{heading:"Dataset reference",children:(0,n.jsx)(eW,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,n.jsxs)(eF,{heading:"Data processing properties",children:[(0,n.jsx)(eN,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,n.jsx)(eN,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,n.jsx)(eZ,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,n.jsx)(eN,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,n.jsx)(eW,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,n.jsx)(eN,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,n.jsx)(eW,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,n.jsx)(eN,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,n.jsx)(eZ,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,n.jsxs)(eF,{heading:"Administrative properties",children:[(0,n.jsx)(eZ,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,n.jsx)(eZ,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,n.jsx)(eZ,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,n.jsx)(eZ,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,n.jsx)(eZ,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,n.jsx)(eW,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,n.jsx)(eZ,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,n.jsx)(eZ,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,n.jsx)(eZ,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,n.jsx)(eP,{customFields:s.custom_fields,resourceType:T.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,n.jsxs)(p.Fragment,{children:[(0,n.jsxs)(eF,{heading:"Data use",children:[(0,n.jsx)(eZ,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].legal_basis_for_processing"),label:"Legal basis for processing",tooltip:"What is the legal basis under which personal data is processed for this purpose?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,n.jsx)(eF,{heading:"Features",children:(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,n.jsx)(eF,{heading:"Dataset reference",children:(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,n.jsxs)(eF,{heading:"Special category data",children:[(0,n.jsx)(eN,{name:"privacy_declarations[".concat(t,"].processes_special_category_data"),label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,n.jsxs)(eF,{heading:"Third parties",children:[(0,n.jsx)(eN,{name:"privacy_declarations[".concat(t,"].data_shared_with_third_parties"),label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,n.jsx)(eP,{customFields:s.privacy_declarations[0].custom_fields,resourceType:T.P6.PRIVACY_DECLARATION})]},t)),(0,n.jsxs)(eF,{heading:"Data flow",children:[(0,n.jsx)(eW,{name:"ingress",label:"Sources"}),(0,n.jsx)(eW,{name:"egress",label:"Destinations"})]})]})})})};let eV=(e,s)=>{let t=[],a=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||s.egress||e.ingress||s.ingress)&&t.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||s.privacy_declarations&&s.privacy_declarations.length>0;i&&t.push("Data Uses");let n=[...Object.keys(e),...Object.keys(s)].some(e=>!a.has(e));return!i&&n&&t.unshift("System Information"),t};var eM=e=>{let{selectedHistory:s,isOpen:t,onClose:a}=e;return(0,n.jsxs)(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:ef().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:eV(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)(eq,{selectedHistory:s,formType:"before",children:(0,n.jsx)(eU,{initialValues:null==s?void 0:s.before})})}),(0,n.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,n.jsx)(eq,{selectedHistory:s,formType:"after",children:(0,n.jsx)(eU,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eB=e=>{let{system:s}=e,[t,a]=(0,p.useState)(1),{data:i}=(0,L.Xc)({system_key:s.fides_key,page:t,size:10}),[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)(null),u=(0,h.C)(L.o),{data:m=[]}=(0,O.K3)(),x=(null==i?void 0:i.items)||[],g=e=>{c(e=eA(e=eT(e=eC(e=eS(e=eD(e),u),m)))),o(!0)},{formattedTime:y,formattedDate:f}=ev(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:ef().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,n.jsx)(l.p3B,{children:x.map((e,s)=>{let t=ew(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)(eb,{})}),(0,n.jsx)(l.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,n.jsx)(e_,{})})]}),(0,n.jsx)(eM,{selectedHistory:d,isOpen:r,onClose:()=>{o(!1),c(null)}})]})},eH=t(52368),eK=t(3765),eY=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"})})]})]})})},eG=t(58452);let e$=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)(eG.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})]})})},eQ=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)(eg.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)(e$,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:r},e.id))})};var eX=t(95346),e0=t(54748),e1=t(28325),e4=t(30234);let e2=Z.Ry().shape({data_categories:Z.IX(Z.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:Z.Z_().required().label("Data use")}),e3={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},cookies:[],id:""},e5=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}},e7=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,e0.Z)(),{specialCategoryLegalBasisOptions:x}=(0,e1.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)(eL.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)(P.d,{id:"data_use",label:"Data use",name:"data_use",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:h||u}),(0,n.jsx)(P.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data are collected for this purpose?",mode:"multiple",isRequired:!0,disabled:u,layout:"stacked"}),(0,n.jsx)(P.d,{name:"data_subjects",label:"Data subjects",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",disabled:u,layout:"stacked"}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(P.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:m,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled: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)(eL.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)(eL.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)(eL.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)(P.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)(P.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)(eL.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)(P.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)(eL.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)(eL.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)(P.d,{name:"shared_categories",label:"Shared categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data does this system share with third parties?",layout:"stacked",mode:"multiple",disabled:u})]})})]})}),(0,n.jsx)(e4.Z,{heading:"Cookies",children:(0,n.jsx)(P.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)(eX.uc,{resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:c}):null]})},e8=(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},e6=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,eX.mZ)({resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e5(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)(()=>e8(t,i),[t,i])}},e9=e=>{let{onSubmit:s,onCancel:t,initialValues:a,...i}=e,r=null==a?void 0:a.id,{handleSubmit:o,initialValues:d}=e6({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:r}),c=(0,h.C)(eg.gU);return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:d,onSubmit:o,validationSchema:e2,children:e=>{let{dirty:s,values:a}=e;return(0,n.jsxs)(W.l0,{"data-testid":"declaration-form",children:[(0,n.jsx)(x.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,n.jsxs)(l.Kqy,{spacing:4,children:[(0,n.jsx)(e7,{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"})]})]})]})]})}})},se=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 ss=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,eK.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)(eY,{title:"You don't have a data use set up for this system yet.",description:'A Data Use is the purpose for which data is used in a system. In Fides, a system may have more than one Data Use. For example, a CRM system may be used both for "Customer Support" and also for "Email Marketing", each of these is a Data Use.',handleAdd:b}):(0,n.jsx)(eQ,{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)(se,{isOpen:o,onClose:_,heading:"Configure data use",children:(0,n.jsx)(e9,{initialValues:u,onSubmit:v,onCancel:_,includeCustomFields:a,...r})})]})},st=e=>{let{system:s}=e,{isLoading:t,...a}=(0,eH.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)(ss,{system:s,includeCustomFields:!0,includeCookies:!0,...c})]})},sa=t(812),si=t(93237),sn=t(69525),sr=t(33335);let sl={system_type:"",fides_key:"",tags:[],name:"",description:"",dataset_references:[],processes_personal_data:!0,exempt_from_privacy_regulations:!1,reason_for_exemption:"",uses_profiling:!1,does_international_transfers:!1,requires_data_protection_assessments:!1,privacy_policy:"",legal_name:"",legal_address:"",administrating_department:"",responsibility:[],joint_controller_info:"",data_security_practices:"",privacy_declarations:[],data_stewards:"",dpo:"",cookie_max_age_seconds:void 0,uses_cookies:!1,cookie_refresh:!1,uses_non_cookie_access:!1,legitimate_interest_disclosure_url:""},so=(e,s)=>{var t;let a=null==e?void 0:null===(t=e.data_stewards)||void 0===t?void 0:t.map(e=>e.username).join(", ");return{...e,customFieldValues:s,description:e.description?e.description:"",legal_address:e.legal_address?e.legal_address:"",dpo:e.dpo?e.dpo:"",cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:"",legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:"",vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,privacy_policy:e.privacy_policy?e.privacy_policy:"",data_security_practices:e.data_security_practices?e.data_security_practices:"",legal_basis_for_profiling:e.legal_basis_for_profiling?e.legal_basis_for_profiling:"",legal_basis_for_transfers:e.legal_basis_for_transfers?e.legal_basis_for_transfers:"",data_stewards:a}},sd=e=>{let s=e.fides_key?e.fides_key:(0,sr.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 sc=t(36345);let su=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sp=[{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"}],sh=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),sm=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 sx=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:r=[]}=(0,O.K3)(),o=(0,h.T)(),d=(0,eX.mZ)({resourceType:T.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...c}=(0,eH.f)({includeDatasets:!0,includeDisabled:!1}),u=(0,p.useMemo)(()=>t?so(t,d.customFieldValues):sl,[t,d.customFieldValues]),[m]=(0,O.in)(),g=(0,p.useMemo)(()=>Z.Ry().shape({name:Z.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await 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:Z.Z_().min(1).url().nullable()}),[m,u.name]),y=(0,eR.hz)(),[f,_]=(0,O.f7)(),[b,v]=(0,O.qQ)();(0,L.Rd)(void 0,{skip:!y.dictionaryService});let[j]=(0,L.qz)(),k=(0,h.C)(L.o),w=(0,h.C)(eg.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,sa.fn)(s.error)&&404===s.error.status||D({status:"error",description:(0,sa.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,sn.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let n=sd({...e,privacy_declarations:null!=a?a:e.privacy_declarations});i=C?await b(n):await f(n),await d.upsertCustomFields(e),(0,sa.D4)(i)?D({status:"error",description:(0,sa.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,eg.b3)("initial")))},I=e=>{if(y.dictionaryService){if(!e){o((0,eg.b3)("hiding")),o((0,eg.gQ)(!1));return}o((0,eg.b3)("showing")),y.tcf&&(0,sa.cj)(e)===sa.c6.GVL?o((0,eg.gQ)(!0)):o((0,eg.gQ)(!1))}},E=v.isLoading||_.isLoading||d.isLoading;return(0,n.jsx)(W.J9,{initialValues:u,enableReinitialize:!0,onSubmit:A,validationSchema:g,children:e=>{let{dirty:s,values:r,isValid:o}=e;return(0,n.jsxs)(W.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)(sm,{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)(sm,{system:t}):null,(0,n.jsxs)(e4.Z,{heading:"System details",children:[y.dictionaryService?(0,n.jsx)(sc.Z,{label:"System name",options:k,onVendorSelected:I,isCreate:!t,lockedForGVL:w}):(0,n.jsx)(eL.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)(eL.j0,{id:"fides_key",name:"fides_key",label:"Unique ID",disabled:!0,variant:"stacked",tooltip:"An auto-generated unique ID based on the system name"}),(0,n.jsx)(si.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:w}),(0,n.jsx)(P.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:u.tags?u.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:w})]}),(0,n.jsx)(e4.Z,{heading:"Dataset reference",children:(0,n.jsx)(P.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)(si.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)(si.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)(eL.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)(si.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)(P.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:su,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)(si.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)(P.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sp,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)(eL.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)(eL.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)(si.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:w}),(0,n.jsx)(si.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:w}),(0,n.jsx)(si.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:w}),(0,n.jsx)(si.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:w})]}),(0,n.jsxs)(e4.Z,{heading:"Administrative properties",children:[(0,n.jsx)(eL.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,n.jsx)(si.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:w}),(0,n.jsx)(si.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?",disabled:w}),(0,n.jsx)(si.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?",disabled:w}),(0,n.jsx)(eL.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)(P.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:sh,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)(si.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:w}),(0,n.jsx)(eL.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)(si.Yb,{label:"Data security practices",name:"data_security_practices",id:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?",disabled:w}),(0,n.jsx)(si.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:w}),(0,n.jsx)(si.Yb,{label:"Vendor deleted date",name:"vendor_deleted_date",id:"vendor_deleted_date",tooltip:"If this vendor is no longer active, it will be 'soft' deleted. When that occurs, it's deleted date will be recorded here for reporting.",disabled:!0})]}),r.fides_key?(0,n.jsx)(eX.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]})}})},sg=t(59003),sy=t(92222),sf=t(14481),s_=t(57454);let{useGetSystemAssetsQuery:sb,useAddSystemAssetMutation:sv,useUpdateSystemAssetsMutation:sj,useDeleteSystemAssetsMutation:sk}=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 sw=t(90111),sC=t(8133),sS=t(78238),sD=t(70682),sT=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[r,o,{setValue:d,setTouched:c}]=(0,W.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)(eL.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,n.jsx)(eO.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)(eL.Bc,{isInvalid:u,message:o.error,fieldName:s})]})})};(a=i||(i={})).COOKIE="Cookie",a.BROWSER_REQUEST="Browser Request",a.I_FRAME="iFrame",a.JAVASCRIPT_TAG="Javascript tag",a.IMAGE="Image";let sA=Z.Ry().shape({name:Z.Z_().required("Enter a name for this asset"),domain:Z.Z_().required("Enter a valid domain for this asset"),asset_type:Z.Z_().required("Select an asset type"),data_uses:Z.IX().min(1,"Select at least one category of consent"),base_url:Z.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sI={name:"",description:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sE=e=>{var s;let{isOpen:t,onClose:a,systemKey:r,asset:o,...d}=e,c=!o,[u,{isLoading:p}]=sv(),[h,{isLoading:m}]=sj(),x=(0,l.pmc)(),g=async e=>{let s=await u({systemKey:r,asset:e});if((0,sa.D4)(s)){let e=(0,sa.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");x((0,f.Vo)(e))}else x((0,f.t5)("Asset added successfully")),a()},y=async e=>{var s,t,i;let n=null!==(t=null==o?void 0:null===(s=o.data_uses)||void 0===s?void 0:s.filter(e=>!(0,sS.Z)(e)))&&void 0!==t?t:[],l={...e,data_uses:[...null!==(i=e.data_uses)&&void 0!==i?i:[],...n]},d=await h({systemKey:r,assets:[l]});if((0,sa.D4)(d)){let e=(0,sa.e$)(d.error,"An unexpected error occurred while saving this asset. Please try again.");x((0,f.Vo)(e))}else x((0,f.t5)("Asset updated successfully")),a()},_=o?{...o,data_uses:null==o?void 0:null===(s=o.data_uses)||void 0===s?void 0:s.filter(e=>(0,sS.Z)(e))}:sI;return(0,n.jsx)(sC.Z,{title:c?"Add asset":"Edit asset",onClose:a,isOpen:t,...d,children:(0,n.jsx)(W.J9,{initialValues:_,onSubmit:e=>{c?g(e):y(e)},validationSchema:sA,children:e=>{let{values:s,isValid:t,dirty:r}=e;return(0,n.jsxs)(W.l0,{children:[(0,n.jsxs)(l.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,n.jsx)(sw.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)(eL.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!c}),(0,n.jsx)(P.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,sa.MM)(i),layout:"stacked",disabled:!c}),(0,n.jsx)(sT,{name:"data_uses",label:"Categories of consent",layout:"stacked"}),(0,n.jsx)(eL.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!c}),(0,n.jsx)(eL.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)(eL.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:a,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",loading:p||m,disabled:!t||!r,"data-testid":"save-btn",children:"Save"})]})]})}})})},sq=t(8411),sR=t(72625),sz=t(29850),sF=t(77685),sL=e=>{let{systemKey:s,systemName:t,asset:a}=e,[i,r]=(0,p.useState)(!1),[o,d]=(0,p.useState)(),[c,u]=(0,p.useState)(!1),[h,{isLoading:m}]=sj(),{successAlert:x,errorAlert:g}=(0,S.V)(),y=(0,l.qY0)(),{asset_type:f,name:_}=a,b=(0,p.useCallback)(e=>{e.preventDefault(),u(!0)},[]),v=async e=>{if(!e)return;let{newSystemKey:t,newSystemName:i,isNewSystem:n}=e,l=await h({systemKey:s,assets:[{id:a.id,system_key:t}]});(0,eh.D4)(l)?g((0,sa.e$)(l.error)):x(n?"".concat(i," has been added to your system inventory and the ").concat(f,' "').concat(_,'" has been assigned to that system.'):"".concat(f," ").concat(_," has been assigned to ").concat(i)),r(!1),d(void 0)},j=e=>{d(e),y.onOpen()};return(0,n.jsxs)(n.Fragment,{children:[!i&&(0,n.jsxs)(l.j8w,{"data-testid":"system-badge",color:"white",onClick:()=>r(!0),children:[t," ",(0,n.jsx)(l.PJP.I8b,{})]}),!!i&&(0,n.jsx)(sz.R,{variant:"borderless",className:"w-full",autoFocus:!0,defaultOpen:!0,defaultValue:s,onBlur:e=>{var s;(null===(s=e.relatedTarget)||void 0===s?void 0:s.getAttribute("id"))!=="add-new-system"&&r(!1)},onAddSystem:b,onSelect:(e,s)=>j({newSystemKey:e,newSystemName:s.label}),loading:m}),c&&(0,n.jsx)(sF.i,{isOpen:!0,onClose:()=>u(!1),onSuccessfulSubmit:(e,s)=>j({newSystemKey:e,newSystemName:s,isNewSystem:!0})}),(0,n.jsx)(l.cVQ,{isOpen:y.isOpen,onClose:y.onClose,onConfirm:()=>{v(o)},title:"Reassign asset",message:"Are you sure you want to reassign this asset to ".concat(null==o?void 0:o.newSystemName,"?"),isCentered:!0})]})},sO=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:r}]=sk(),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,eh.D4)(e)?o((0,f.Vo)((0,sa.e$)(e.error,"A problem occurred removing this asset. Please try again"))):o((0,f.t5)("Asset removed successfully"))};return(0,n.jsxs)(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})]})},sW=t(34929),sZ=t(26183),sP=e=>{var s,t;let{asset:a,systemId:i}=e,{getDataUseDisplayName:r}=(0,sW.Z)(),[o]=sj(),{errorAlert:d,successAlert:c}=(0,A.V)(),[u,h]=(0,p.useState)(!1),m=async e=>{let s=[...a.data_uses||[],e],t=await o({systemKey:i,assets:[{id:a.id,data_uses:s}]});(0,eh.D4)(t)?d((0,sa.e$)(t.error)):c("Consent category added to ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},x=async e=>{var s;let t=null===(s=a.data_uses)||void 0===s?void 0:s.filter(s=>s!==e),n=await o({systemKey:i,assets:[{id:a.id,data_uses:t}]});(0,eh.D4)(n)?d((0,sa.e$)(n.error)):c("Consent category removed from ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},g=null!==(t=null===(s=a.data_uses)||void 0===s?void 0:s.filter(e=>(0,sS.Z)(e)).map(e=>({label:r(e),key:e})))&&void 0!==t?t:[];return(0,n.jsxs)(sZ.Z,{children:[!u&&(0,n.jsxs)(n.Fragment,{children:[g.map(e=>(0,n.jsx)(l.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",closable:!0,onClose:()=>x(e.key),closeButtonLabel:"Remove data use",children:e.label},e.key)),(0,n.jsx)(l.j8w,{onClick:()=>h(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),u&&(0,n.jsx)(l.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,n.jsx)(sD.Z,{selectedTaxonomies:a.data_uses||[],onSelect:m,onBlur:()=>h(!1),open:!0})})]})},sN=e=>{let{systemKey:s,systemName:t,onEditClick:a}=e,i=(0,sy.Cl)();return[i.display({id:"select",cell:e=>{let{row:s}=e;return(0,n.jsx)(sR.k,{isChecked:s.getIsSelected(),onChange:s.getToggleSelectedHandler(),dataTestId:"select-".concat(s.original.name||s.id)})},header:e=>{let{table:s}=e;return(0,n.jsx)(sR.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40,meta:{cellProps:{borderRight:"none",paddingRight:0}}}),i.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(sf.G3,{value:e.getValue()}),header:"Asset"}),i.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,n.jsx)(sf.G3,{value:e.getValue()}),header:"Type"}),i.display({id:"system",cell:e=>(0,n.jsx)(sL,{systemKey:s,systemName:t,asset:e.row.original}),header:"System"}),i.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,n.jsx)(sP,{asset:e.row.original,systemId:s}),header:"Categories of consent",size:200}),i.accessor(e=>e.locations,{id:"locations",cell:e=>(0,n.jsx)(sR.mb,{values:e.getValue().map(e=>({label:sq.Z8[e],key:e}))}),header:"Locations",size:300}),i.accessor(e=>e.domain,{id:"domain",cell:e=>(0,n.jsx)(sf.G3,{value:e.getValue()}),header:"Domain"}),i.accessor(e=>e.page,{id:"page",cell:e=>(0,n.jsx)(sR.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,n.jsx)(sR.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),i.display({id:"actions",cell:e=>{let{row:t}=e;return(0,n.jsx)(sO,{asset:t.original,systemKey:s,onEditClick:()=>a(t.original)})},header:"Actions"})]},sU=e=>{var s;let{system:t}=e,{PAGE_SIZES:a,pageSize:i,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:h,endRange:m,pageIndex:x,setTotalPages:g,resetPageIndexToDefault:y}=(0,sf.oi)(),[_,b]=(0,p.useState)(""),[v,j]=(0,p.useState)(void 0),[k,w]=(0,p.useState)({}),[C]=sk(),S=(0,l.pmc)(),{data:D,isLoading:T,isFetching:A}=sb({fides_key:t.fides_key,search:_,page:x,size:i}),{isOpen:I,onClose:E,onOpen:q}=(0,l.qY0)(),{isOpen:R,onClose:z,onOpen:F}=(0,l.qY0)();(0,p.useEffect)(()=>{y()},[_,y]),(0,p.useEffect)(()=>{g(null==D?void 0:D.pages)},[D,g]);let L=sN({systemName:null!==(s=t.name)&&void 0!==s?s:t.fides_key,systemKey:t.fides_key,onEditClick:e=>{j(e),q()}}),O=(0,sg.b7)({getCoreRowModel:(0,sy.sC)(),columns:L,manualPagination:!0,data:(null==D?void 0:D.items)||[],columnResizeMode:"onChange",onRowSelectionChange:w,state:{rowSelection:k}}),W=O.getSelectedRowModel().rows.map(e=>e.original.id),Z=async()=>{let e=await C({systemKey:t.fides_key,asset_ids:W});(0,eh.D4)(e)?S((0,f.Vo)((0,sa.e$)(e.error,"A problem occurred removing these assets. Please try again."))):(O.resetRowSelection(),S((0,f.t5)("Assets removed successfully"))),z()};return t?T?(0,n.jsx)(sf.I4,{rowHeight:36,numRows:36}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.xvT,{fontSize:"sm",mb:4,children:"This page displays all assets associated with this system. Use the table below to review and manage these technologies for compliance and detailed insights."}),(0,n.jsxs)(sf.Q$,{children:[(0,n.jsx)(s_.M,{value:_,onChange:b}),(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.mm_,{}),iconPosition:"end",onClick:q,"data-testid":"add-asset-btn",children:"Add asset"}),(0,n.jsx)(sE,{isOpen:I,onClose:()=>{j(void 0),E()},systemKey:t.fides_key,asset:v}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.ZNm,{}),iconPosition:"end",onClick:F,disabled:!W.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,n.jsx)(l.cVQ,{isOpen:R,onClose:z,onConfirm:Z,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)(sf.ZK,{tableInstance:O,emptyTableNotice:(0,n.jsx)(l.oj8,{image:l.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,n.jsx)(sf.s8,{totalRows:(null==D?void 0:D.total)||0,pageSizes:a,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:d||A,onNextPageClick:c,isNextPageDisabled:u||A,startRange:h,endRange:m})]}):null};let sV={INFORMATION:{index:0,hash:"#information"},DATA_USES:{index:1,hash:"#data-uses"},DATA_FLOW:{index:2,hash:"#data-flow"},INTEGRATIONS:{index:3,hash:"#integrations"},ASSETS:{index:4,hash:"#assets"},HISTORY:{index:5,hash:"#history"}},sM=e=>{let s=e.startsWith("#")?e:"#".concat(e);return Object.values(sV).find(e=>e.hash===s)},sB=e=>Object.values(sV).find(s=>s.index===e),sH=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 sK=e=>{var s,t;let{isCreate:a}=e,i=(0,c.useRouter)(),[o,u]=(0,p.useState)((()=>{var e,s;let t=i.asPath.split("#")[1];return t&&null!==(s=null===(e=sM(t))||void 0===e?void 0:e.index)&&void 0!==s?s:sV.INFORMATION.index})()),[_,b]=(0,p.useState)(!1),{systemOrDatamapRoute:v}=(0,g.V)(),j=(0,l.pmc)(),k=(0,h.T)(),w=(0,h.C)(O.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,O.rn)(null==w?void 0:w.fides_key,{skip:!w});(0,p.useEffect)(()=>{k((0,O.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,O.db)(e)),i.push({pathname:y.Dv,query:{id:e.fides_key}});let s={...f.MA,description:(0,n.jsx)(sH,{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,O.db)(void 0)),k((0,eg.b3)("initial")),k((0,eg.gQ)(!1))),()=>{k((0,O.db)(void 0))}),[k,a]);let{attemptAction:R}=(0,x.oI)(),z=(0,p.useCallback)(e=>{R().then(async s=>{if(s){let{status:s}=i.query;if(s&&("succeeded"===s?j((0,f.t5)("Integration successfully authorized.")):j((0,f.Vo)("Failed to authorize integration."))),u(e),i.isReady){let s=sB(e);if(s){let e={...i.query};delete e.status,await i.replace({pathname:i.pathname,query:e,hash:s.hash},void 0,{shallow:!0})}}}})},[R,i,j]);(0,p.useEffect)(()=>{let{status:e}=i.query;e&&z(sV.INTEGRATIONS.index)},[i.query,z]);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)(sx,{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)(st,{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)(eu,{connectionConfig:w.connection_configs,systemFidesKey:w.fides_key}),(null===(s=w.connection_configs)||void 0===s?void 0:s.key)&&(0,n.jsx)(ex,{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)(sU,{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)(eB,{system:w})]}):null,isDisabled:!w}),{tabData:F,tabIndex:o,onTabChange:z}}},54748:function(e,s,t){var a=t(27378),i=t(16643);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(16643);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3855],{66726:function(e,t,i){var r=i(11611),n=i(82846),a=i(91936),s=Math.max,l=Math.min;e.exports=function(e,t,i){var o,c,u,d,p,g,x=0,f=!1,h=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function j(t){var i=o,r=c;return o=c=void 0,x=t,d=e.apply(r,i)}function m(e){var i=e-g,r=e-x;return void 0===g||i>=t||i<0||h&&r>=u}function C(){var e,i,r,a=n();if(m(a))return y(a);p=setTimeout(C,(e=a-g,i=a-x,r=t-e,h?l(r,u-i):r))}function y(e){return(p=void 0,v&&o)?j(e):(o=c=void 0,d)}function I(){var e,i=n(),r=m(i);if(o=arguments,c=this,g=i,r){if(void 0===p)return x=e=g,p=setTimeout(C,t),f?j(e):d;if(h)return clearTimeout(p),p=setTimeout(C,t),j(g)}return void 0===p&&(p=setTimeout(C,t)),d}return t=a(t)||0,r(i)&&(f=!!i.leading,u=(h="maxWait"in i)?s(a(i.maxWait)||0,t):u,v="trailing"in i?!!i.trailing:v),I.cancel=function(){void 0!==p&&clearTimeout(p),x=0,o=g=c=p=void 0},I.flush=function(){return void 0===p?d:y(n())},I}},82846:function(e,t,i){var r=i(77400);e.exports=function(){return r.Date.now()}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return a},V:function(){return r.V}});var r=i(84306),n=i(812);let a=()=>{let{errorAlert:e}=(0,r.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,n.Ot)(t)?i=t.data.detail:(0,n.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return a}});var r=i(24246),n=i(77181);let a=()=>{let e=(0,n.pmc)();return{errorAlert:(t,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)},successAlert:(t,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)}}}},81406:function(e,t,i){"use strict";var r=i(24246),n=i(77181);t.Z=()=>(0,r.jsxs)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,r.jsx)(n.xvT,{fontSize:"sm",children:"You're up to date!"})]})},25077:function(e,t,i){"use strict";i.d(t,{Z:function(){return A}});var r=i(24246),n=i(59003),a=i(92222),s=i(77181),l=i(27378),o=i(14481),c=i(81406),u=i(99763),d=i(72625),p=i(14047),g=i(28976),x=i(8151),f=i(70675),h=e=>{let{resource:t,onDetailClick:i}=e,{successAlert:n}=(0,p.V)(),a=(0,x.u)(t),[l,{isLoading:o}]=(0,f.v8)(),[c,{isLoading:u}]=(0,f.cM)(),[d,{isLoading:h}]=(0,f.vi)(),v=async()=>{var e;await l({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0}),n("Started classification on ".concat(null!==(e=t.name)&&void 0!==e?e:"this resource"))},j=async()=>{var e;await c({staged_resource_urn:t.urn}),n("Approved ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},m=async()=>{var e;await d({staged_resource_urn:t.urn}),n("Hid ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},C=o||u||h;return(0,r.jsxs)(s.kCb,{gap:2,justify:"space-between",children:[a===x.e.ATTENTION_REQUIRED&&(0,r.jsx)(s.wpx,{size:"small",onClick:v,loading:o,disabled:C,"data-testid":"classify-btn",children:"Classify"}),a===x.e.IN_REVIEW&&(0,r.jsx)(s.wpx,{size:"small",onClick:j,loading:u,disabled:C,"data-testid":"approve-btn",children:"Approve"}),(0,r.jsx)(s.LZC,{}),(0,r.jsx)(g.Z,{onHideClick:m,onDetailClick:i})]})},v=i(89200),j=i(5945),m=i(61099),C=i(79947),y=i(16643);let I=(0,a.Cl)();var L=(e,t)=>{let i=[];return e?e===y.D$.TABLE?[I.display({id:"name",cell:e=>{let{row:t}=e;return(0,r.jsx)(v.Z,{resource:t.original})},header:"Table"}),I.display({id:"status",cell:e=>{let{row:t}=e;return(0,r.jsx)(j.Z,{status:(0,x.u)(t.original)})},header:"Status"}),I.display({id:"category",cell:e=>{let{row:t}=e;return(0,r.jsx)(m.Z,{resource:t.original})},header:"Data categories",minSize:280,meta:{disableRowClick:!0}}),I.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(o.G3,{value:e.getValue()}),header:"Description"}),I.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,r.jsx)(d.Cy,{time:e.getValue()}),header:"Updated"}),I.display({id:"actions",cell:e=>{let{row:i}=e;return(0,r.jsx)(h,{resource:i.original,onDetailClick:()=>t(i.original)})},header:"Actions",meta:{disableRowClick:!0}})]:e===y.D$.FIELD?[I.display({id:"name",cell:e=>{let{row:t}=e;return(0,r.jsx)(v.Z,{resource:t.original})},header:"Field"}),I.display({id:"status",cell:e=>{let{row:t}=e;return(0,r.jsx)(j.Z,{status:(0,x.u)(t.original)})},header:"Status"}),I.accessor(e=>e.data_type,{id:"dataType",cell:e=>(0,r.jsx)(C.Z,{type:e.getValue()}),header:"Data type"}),I.display({id:"category",cell:e=>{let{row:t}=e;return(0,r.jsx)(m.Z,{resource:t.original})},header:"Data categories",minSize:280,meta:{disableRowClick:!0}}),I.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(o.G3,{value:e.getValue()}),header:"Description"}),I.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,r.jsx)(d.Cy,{time:e.getValue()}),header:"Updated"}),I.display({id:"actions",cell:e=>{let{row:i}=e;return(0,r.jsx)(h,{resource:i.original,onDetailClick:()=>t(i.original)})},header:"Actions",meta:{disableRowClick:!0}})]:i:i},_=i(57454),b=i(7940),k=i(80356);let w=[y.LL.ADDITION,y.LL.CLASSIFYING,y.LL.CLASSIFICATION_ADDITION,y.LL.CLASSIFICATION_QUEUED,y.LL.CLASSIFICATION_UPDATE,y.LL.MONITORED,y.LL.PROMOTING,y.LL.REMOVAL,y.LL.REMOVING],T={items:[],total:0,page:1,size:50,pages:1};var A=e=>{let{resourceUrn:t,onRowClick:i}=e,{PAGE_SIZES:d,pageSize:p,setPageSize:g,onPreviousPageClick:x,isPreviousPageDisabled:h,onNextPageClick:v,isNextPageDisabled:j,startRange:m,endRange:C,pageIndex:y,setTotalPages:I,resetPageIndexToDefault:A}=(0,o.oi)(),[R,S]=(0,l.useState)("");(0,l.useEffect)(()=>{A()},[t,A]);let{isFetching:Z,isLoading:D,data:E}=(0,f.z8)({staged_resource_urn:t,page:y,size:p,diff_status:w,search:R}),{items:P,total:N,pages:z}=(0,l.useMemo)(()=>null!=E?E:T,[E]);(0,l.useEffect)(()=>{I(z)},[z,I]);let[M,V]=(0,l.useState)(void 0),O=L((0,b.G)(P[0]),V),U=(0,n.b7)({getCoreRowModel:(0,a.sC)(),getGroupedRowModel:(0,a.qe)(),getExpandedRowModel:(0,a.rV)(),columns:O,manualPagination:!0,data:P,columnResizeMode:"onChange",getRowId:e=>e.urn});return D||Z?(0,r.jsx)(o.I4,{rowHeight:36,numRows:36}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Q$,{children:(0,r.jsx)(s.kCb,{gap:6,align:"center",children:(0,r.jsx)(s.xuv,{flexShrink:0,children:(0,r.jsx)(_.M,{value:R,onChange:S})})})}),(0,r.jsx)(o.ZK,{tableInstance:U,emptyTableNotice:(0,r.jsx)(c.Z,{}),getRowIsClickable:e=>(0,k.Z)(e),onRowClick:i}),(0,r.jsx)(o.s8,{totalRows:N||0,pageSizes:d,setPageSize:g,onPreviousPageClick:x,isPreviousPageDisabled:h,onNextPageClick:v,isNextPageDisabled:j,startRange:m,endRange:C}),(0,r.jsx)(u.Z,{resource:M,onClose:()=>V(void 0)})]})}},94780:function(e,t,i){"use strict";i.d(t,{X5:function(){return l},pN:function(){return o},sv:function(){return a}});var r=i(24246),n=i(77181);let a=e=>e.split(".")[1],s=[(0,r.jsx)(n.PJP.S9g,{},"layers"),(0,r.jsx)(n.PJP.iA_,{},"table"),(0,r.jsx)(n.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")],l=(e,t)=>{if(!e)return[];let i=e.split(".");if(i.length<2)return[];let l=i.splice(0,2).join("."),o=[];return i.reduce((e,r,n)=>{let a=n===i.length-1,c="".concat(e).concat(".").concat(r);return o.push({title:r,href:a?void 0:"".concat(t,"/").concat(l,"/").concat(c),icon:s[n]}),c},l),[{title:a(l),href:"".concat(t,"/").concat(l),icon:(0,r.jsx)(n.PJP.ehp,{})},...o]},o=(e,t)=>{if(!e)return[];let i=e.split(".");if(i.length<2)return[];let r=i.shift(),n=[];return i.reduce((e,r,a)=>{let l=a===i.length-1,o="".concat(e).concat(".").concat(r);return n.push({title:r,href:l?void 0:"".concat(t,"/").concat(o),icon:s[a]}),o},r),n}},57454:function(e,t,i){"use strict";i.d(t,{M:function(){return o}});var r=i(24246),n=i(66726),a=i.n(n),s=i(27378),l=i(86780);let o=e=>{let{value:t,onChange:i}=e,[n,o]=(0,s.useState)(t),c=a()(i,500),u=(0,s.useCallback)(e=>{o(e),c(e)},[]);return(0,r.jsx)(l.Z,{search:n,onChange:u,onClear:()=>{o(""),i("")}})}},79947:function(e,t,i){"use strict";var r=i(24246),n=i(77181);t.Z=e=>{let{type:t}=e;return(0,r.jsx)(n.kCb,{align:"center",h:"full",children:!!t&&(0,r.jsx)(n.j8w,{children:t})})}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[401],{97181:function(e,a,n){n.d(a,{d:function(){return d}});var l=n(24246),t=n(77181),i=n(34090),s=n(27378),r=n(91613),o=n(40324);let d=e=>{let{name:a,label:n,labelProps:d,tooltip:c,isRequired:u,layout:v="inline",helperText:h,...m}=e,[x,g,{setValue:j}]=(0,i.U$)(a),p=!!(g.touched&&g.error),[f,b]=(0,s.useState)("");x.value||"tags"!==m.mode&&"multiple"!==m.mode||(x.value=[]),"tags"===m.mode&&"string"==typeof x.value&&(x.value=[x.value]);let C="tags"===m.mode?(e,a)=>e?e.value!==f||x.value.includes(f)?m.optionRender?m.optionRender(e,a):e.label:'Create "'.concat(f,'"'):void 0:m.optionRender||void 0,y=e=>{b(e),m.onSearch&&m.onSearch(e)},_=(e,a)=>{j(e),m.onChange&&m.onChange(e,a)};return"inline"===v?(0,l.jsx)(t.NIc,{isInvalid:p,isRequired:u,children:(0,l.jsxs)(t.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,l.jsx)(o.__,{htmlFor:m.id||a,...d,children:n}):null,(0,l.jsxs)(t.jqI,{align:"center",children:[(0,l.jsxs)(t.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(t.WPr,{...x,id:m.id||a,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:C,onSearch:"tags"===m.mode?y:void 0,onChange:_,value:x.value||void 0,status:p?"error":void 0}),h&&(0,l.jsx)(t.Q6r,{children:h}),(0,l.jsx)(o.Bc,{isInvalid:p,message:g.error,fieldName:x.name})]}),c?(0,l.jsx)(r.Z,{label:c}):null]})]})}):(0,l.jsx)(t.NIc,{isInvalid:p,isRequired:u,children:(0,l.jsxs)(t.gCW,{alignItems:"start",children:[(0,l.jsxs)(t.jqI,{align:"center",children:[n?(0,l.jsx)(o.__,{htmlFor:m.id||a,fontSize:"xs",my:0,mr:1,...d,children:n}):null,c?(0,l.jsx)(r.Z,{label:c}):null]}),(0,l.jsx)(t.WPr,{...x,id:m.id||a,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:C,onSearch:"tags"===m.mode?y:void 0,onChange:_,value:x.value||void 0,status:p?"error":void 0}),h&&(0,l.jsx)(t.Q6r,{style:{marginTop:0},children:h}),(0,l.jsx)(o.Bc,{isInvalid:p,message:g.error,fieldName:x.name})]})})}},8133:function(e,a,n){var l=n(24246),t=n(77181);a.Z=e=>{let{title:a,children:n,isOpen:i,onClose:s,...r}=e;return(0,l.jsxs)(t.u_l,{isOpen:i,onClose:s,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...r,children:[(0,l.jsx)(t.ZAr,{}),(0,l.jsxs)(t.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,l.jsx)(t.xBx,{p:0,children:(0,l.jsx)(t.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,l.jsx)(t.X6q,{as:"h3",size:"sm",children:a})})}),(0,l.jsx)(t.fef,{pb:4,overflow:"auto",children:n})]})]})}},33335:function(e,a,n){n.d(a,{E:function(){return l}});let l=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")},36345:function(e,a,n){n.d(a,{Z:function(){return g}});var l=n(24246),t=n(77181),i=n(34090),s=n(27378),r=n(16134),o=n(40324);let d=(0,t.IUT)({displayName:"CompassIcon",viewBox:"0 0 512 512",path:(0,l.jsx)("path",{fill:"currentColor",d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm306.7 69.1L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})});var c=n(91613),u=n(57865);let{Text:v}=t.AntTypography,h=e=>{let{searchText:a,suggestion:n,...t}=e;return a&&n?(0,l.jsxs)(v,{"aria-hidden":!0,style:{pointerEvents:"none",position:"absolute",zIndex:10,top:"var(--ant-line-width)",bottom:"var(--ant-line-width)",left:"var(--ant-padding-sm)",lineHeight:"calc(var(--ant-control-height) - var(--ant-line-width))"},...t,children:[(0,l.jsx)(v,{className:"text-transparent",children:a}),(0,l.jsx)(v,{type:"secondary",children:n.substring(a.length)})]}):null},m="Create new system",x=e=>{let{active:a,disabled:n,onRefreshSuggestions:i}=e,s={bg:a?"complimentary.500":"gray.100"};return(0,l.jsxs)(t.gCW,{children:[(0,l.jsx)(t.LZC,{minHeight:"18px"}),(0,l.jsxs)(t.v2r,{children:[(0,l.jsx)(t.j2t,{as:t.hU,size:"sm",isDisabled:n,icon:(0,l.jsx)(d,{color:a?"white":"gray.700",boxSize:4}),"aria-label":"Update information from Compass","data-testid":"refresh-suggestions-btn",_hover:{_disabled:s},...s}),(0,l.jsx)(t.qyq,{children:(0,l.jsx)(t.sNh,{onClick:i,children:(0,l.jsx)(t.xvT,{fontSize:"xs",lineHeight:4,children:"Reset to Compass defaults"})})})]})]})};var g=e=>{var a,n;let{label:d,isCreate:v,lockedForGVL:g,options:j,isLoading:p,onVendorSelected:f}=e,b=(0,r.C)(u.bN),[C,y,{setValue:_}]=(0,i.U$)("name"),w=!!(y.touched&&y.error),I={...C,value:null!==(a=C.value)&&void 0!==a?a:""},{touched:N,values:z,setTouched:S,setFieldValue:R,validateForm:k}=(0,i.u6)(),[q,E]=(0,s.useState)(!0),Z=null!==(n=j.find(e=>e.value===I.value))&&void 0!==n?n:{label:I.value,value:I.value,description:""},W=(e,a)=>!!(null==a?void 0:a.label.toLowerCase().startsWith(e.toLowerCase())),[B,T]=(0,s.useState)(""),U=(0,s.useMemo)(()=>j.filter(e=>W(B,e)),[j,B]),A=(0,s.useMemo)(()=>{let e=j;return v&&B&&(e=[...j,{label:"".concat(m,' "').concat(B,'"...'),value:B}]),e},[v,j,B]),F=!!B&&U.length>0,L=g&&!v;(0,s.useEffect)(()=>{E(!I.value&&!z.vendor_id)},[I.value,z.vendor_id,E]),(0,s.useEffect)(()=>{k()},[q,k]);let M=async()=>{T(""),R("vendor_id",void 0),await _(""),S({...N,vendor_id:!1,name:!1}),f(void 0)},P=async e=>{if(e){let a=j.some(a=>a.value===e.value)?e.value:void 0;R("vendor_id",a),await _(e.label.startsWith(m)?e.value:e.label),S({...N,vendor_id:!0,name:!0}),f(a)}},D=async e=>{I.onBlur(e),B&&await _(B),S({...N,name:!0})},H=async e=>{U.length>0&&B!==U[0].label?(e.preventDefault(),T(U[0].label),R("vendor_id",U[0].value),await _(U[0].label),f(U[0].value)):(R("vendor_id",void 0),await _(B)),S({...N,name:!0})},O=(0,l.jsx)(t.NIc,{isInvalid:w,isRequired:!0,width:"100%",children:(0,l.jsxs)(t.gCW,{alignItems:"start",position:"relative",width:"100%",children:[(0,l.jsxs)(t.Ugi,{spacing:1,children:[(0,l.jsx)(o.__,{htmlFor:"vendorName",fontSize:"xs",my:0,mr:1,children:d}),(0,l.jsx)(c.Z,{label:"Enter the system name"})]}),(0,l.jsxs)(t.xuv,{width:"100%",className:"relative",children:[(0,l.jsx)(t.WPr,{id:"vendorName",labelInValue:!0,autoFocus:!0,allowClear:!0,options:A,loading:p,filterOption:(e,a)=>W(e,a)||!!(null==a?void 0:a.label.startsWith(m)),optionFilterProp:"label",value:Z,placeholder:"Enter system name...",disabled:L,onChange:P,onSearch:T,onClear:M,onBlur:D,onInputKeyDown:e=>{B&&"Tab"===e.key&&H(e)},status:w?"error":void 0,"data-testid":"vendor-name-select"}),(0,l.jsx)(h,{searchText:B,suggestion:U.length?U[0].label:""})]}),(0,l.jsx)(o.Bc,{isInvalid:w,message:y.error,fieldName:"name"})]})});return(0,l.jsxs)(t.Ugi,{alignItems:"flex-start",width:"full",children:[q?O:(0,l.jsx)(o.j0,{autoFocus:!0,id:"name",name:"name",label:"System name",tooltip:"Enter the system name",variant:"stacked",disabled:L,isRequired:!0,inputRightElement:L?null:(0,l.jsx)(t.PZ7,{onClick:M,size:"sm","data-testid":"clear-btn"})}),(0,l.jsx)(x,{active:!!z.vendor_id||F,disabled:!z.vendor_id||"showing"===b,onRefreshSuggestions:()=>f(z.vendor_id)})]})}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4060],{58754:function(e,t,n){var r=n(24246),i=n(77181),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(77181),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",helperText:x,...h}=e,[m,f,{setValue:g}]=(0,l.U$)(t),y=!!(f.touched&&f.error),[j,v]=(0,o.useState)("");m.value||"tags"!==h.mode&&"multiple"!==h.mode||(m.value=[]),"tags"===h.mode&&"string"==typeof m.value&&(m.value=[m.value]);let b="tags"===h.mode?(e,t)=>e?e.value!==j||m.value.includes(j)?h.optionRender?h.optionRender(e,t):e.label:'Create "'.concat(j,'"'):void 0:h.optionRender||void 0,C=e=>{v(e),h.onSearch&&h.onSearch(e)},w=(e,t)=>{g(e),h.onChange&&h.onChange(e,t)};return"inline"===p?(0,r.jsx)(i.NIc,{isInvalid:y,isRequired:u,children:(0,r.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,r.jsx)(a.__,{htmlFor:h.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,{...m,id:h.id||t,"data-testid":"controlled-select-".concat(m.name),...h,optionRender:b,onSearch:"tags"===h.mode?C:void 0,onChange:w,value:m.value||void 0,status:y?"error":void 0}),x&&(0,r.jsx)(i.Q6r,{children:x}),(0,r.jsx)(a.Bc,{isInvalid:y,message:f.error,fieldName:m.name})]}),c?(0,r.jsx)(s.Z,{label:c}):null]})]})}):(0,r.jsx)(i.NIc,{isInvalid:y,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:h.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,{...m,id:h.id||t,"data-testid":"controlled-select-".concat(m.name),...h,optionRender:b,onSearch:"tags"===h.mode?C:void 0,onChange:w,value:m.value||void 0,status:y?"error":void 0}),x&&(0,r.jsx)(i.Q6r,{style:{marginTop:0},children:x}),(0,r.jsx)(a.Bc,{isInvalid:y,message:f.error,fieldName:m.name})]})})}},10342:function(e,t,n){var r=n(24246),i=n(77181),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(77181);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(77181),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(77181),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(16643);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(77181),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(16643),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)},11055:function(e,t,n){n.d(t,{M:function(){return u}});var r=n(24246),i=n(29427),l=n(27378),o=n(40976),s=n(18397),a=n(42308),d=n(25431),c=n(39556);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)(()=>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.Y.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}},7078:function(e,t,n){n.d(t,{e:function(){return b}});var r=n(24246),i=n(29427),l=n(27378),o=n(40976),s=n(18397),a=n(42308),d=n(69222),c=n(67412);function u(e){let t=(0,a.h)(()=>(0,d.BX)(e)),{isStatic:n}=(0,l.useContext)(c._);if(n){let[,n]=(0,l.useState)(e);(0,l.useEffect)(()=>t.on("change",n),[])}return t}var p=n(13998);let x=e=>e&&"object"==typeof e&&e.mix,h=e=>x(e)?e.mix:void 0;var m=n(64306),f=n(95984);function g(e,t){let n=u(t()),r=()=>n.set(t());return r(),(0,m.L)(()=>{let t=()=>f.Wi.preRender(r,!1,!0),n=e.map(e=>e.on("change",t));return()=>{n.forEach(e=>e()),(0,f.Pn)(r)}}),n}function y(e,t){let n=(0,a.h)(()=>[]);return g(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}var j=n(3522);function v(e,t=0){return(0,j.i)(e)?e:u(t)}let b=(0,l.forwardRef)(function({children:e,style:t={},value:n,as:c="li",onDrag:u,layout:x=!0,...m},f){let j=(0,a.h)(()=>s.E[c]),b=(0,l.useContext)(o.Y),C={x:v(t.x),y:v(t.y)},w=function(e,t,n,r){if("function"==typeof e)return function(e){d.S1.current=[],e();let t=g(d.S1.current,e);return d.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,p.s)(i,l,{mixer:h(l[0]),...o});return t?s(r):s}(t,void 0,void 0);return Array.isArray(e)?y(e,i):y([e],([e])=>i(e))}([C.x,C.y],([e,t])=>e||t?1:"unset");(0,i.k)(!!b,"Reorder.Item must be a child of Reorder.Group");let{axis:k,registerItem:R,updateOrder:S}=b;return(0,r.jsx)(j,{drag:k,...m,dragSnapToOrigin:!0,style:{...t,x:C.x,y:C.y,zIndex:w},layout:x,onDrag:(e,t)=>{let{velocity:r}=t;r[k]&&S(n,C[k].get(),r[k]),u&&u(e,t)},onLayoutMeasure:e=>R(n,e),ref:f,ignoreStrict:!0,children:e})})},40976:function(e,t,n){n.d(t,{Y:function(){return r}});let r=(0,n(27378).createContext)(null)},47397:function(e,t,n){n.d(t,{o:function(){return o}});var r=n(42308);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)}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4121],{7617:function(e,s,t){t.d(s,{q:function(){return a}});var n=t(24246),i=t(77181);let a=e=>{let{label:s,isDisabled:t,...a}=e;return(0,n.jsx)(i.OK9,{"data-testid":"tab-".concat(s),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:a.fontSize,fontWeight:"500",color:"gray.500",isDisabled:t||!1,children:s})};s.Z=e=>{let{data:s,border:t="partial",...l}=e;return(0,n.jsxs)(i.mQc,{colorScheme:"complimentary",...l,children:[(0,n.jsx)(i.tdY,{width:"partial"===t?"max-content":void 0,children:s.map(e=>(0,n.jsx)(a,{label:e.label,isDisabled:e.isDisabled,fontSize:l.fontSize},e.label))}),(0,n.jsx)(i.nPR,{children:s.map(e=>(0,n.jsx)(i.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},58452:function(e,s,t){var n=t(24246),i=t(77181);s.Z=e=>{let{isOpen:s,onClose:t,onConfirm:a,onCancel:l,title:r,message:d,cancelButtonText:o,continueButtonText:c,isLoading:u,returnFocusOnClose:p,isCentered:h,testId:m="confirmation-modal",icon:x}=e;return(0,n.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"lg",returnFocusOnClose:null==p||p,isCentered:h,children:[(0,n.jsx)(i.ZAr,{}),(0,n.jsxs)(i.hzk,{textAlign:"center",p:6,"data-testid":m,children:[x?(0,n.jsx)(i.M5Y,{mb:2,children:x}):null,r?(0,n.jsx)(i.xBx,{fontWeight:"medium",pb:0,children:r}):null,d?(0,n.jsx)(i.fef,{children:d}):null,(0,n.jsx)(i.mzw,{children:(0,n.jsxs)(i.MIq,{columns:2,width:"100%",children:[(0,n.jsx)(i.wpx,{onClick:()=>{l&&l(),t()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:u,children:o||"Cancel"}),(0,n.jsx)(i.wpx,{type:"primary",size:"large",onClick:a,"data-testid":"continue-btn",loading:u,children:c||"Continue"})]})})]})]})}},7426:function(e,s,t){t.d(s,{D2:function(){return p},L:function(){return r},U7:function(){return o},Yh:function(){return m},ak:function(){return d},iR:function(){return g},km:function(){return l},tB:function(){return a}});var n=t(3228);let i=t(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:s}=e;return{url:"/config",method:"GET",params:{api_set:s}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:a,usePutConfigurationSettingsMutation:l,usePatchConfigurationSettingsMutation:r}=i,d=(0,n.P1)([e=>e,i.endpoints.getConfigurationSettings.select({api_set:!0}),i.endpoints.getConfigurationSettings.select({api_set:!1})],(e,s,t)=>{var n,i,a;let{data:l}=s,{data:r}=t;return{configSet:{cors_origins:(null==r?void 0:null===(n=r.security)||void 0===n?void 0:n.cors_origins)||[],cors_origin_regex:null==r?void 0:null===(i=r.security)||void 0===i?void 0:i.cors_origin_regex},apiSet:{cors_origins:(null==l?void 0:null===(a=l.security)||void 0===a?void 0:a.cors_origins)||[]}}}),o=()=>(0,n.P1)([e=>e,i.endpoints.getConfigurationSettings.select({api_set:!0})],(e,s)=>{let{data:t}=s;return t}),c={enabled:!1,cmp_api_required:!1},u=(e,s,t,n)=>{let i=t&&t[e],a=n&&n[e];return i&&a?{...n[e],...t[e]}:a?n[e]:i?{...t[e]}:s},p=(0,n.P1)([e=>e,i.endpoints.getConfigurationSettings.select({api_set:!0}),i.endpoints.getConfigurationSettings.select({api_set:!1})],(e,s,t)=>{let{data:n}=s,{data:i}=t;return u("gpp",c,n,i)}),h={tcf_publisher_country_code:null},m=(0,n.P1)([e=>e,i.endpoints.getConfigurationSettings.select({api_set:!0}),i.endpoints.getConfigurationSettings.select({api_set:!1})],(e,s,t)=>{let{data:n}=s,{data:i}=t;return u("plus_consent_settings",h,n,i)}),x={allow_username_password_login:!1},g=(0,n.P1)([e=>e,i.endpoints.getConfigurationSettings.select({api_set:!0}),i.endpoints.getConfigurationSettings.select({api_set:!1})],(e,s,t)=>{let{data:n}=s,{data:i}=t;return u("plus_security_settings",x,n,i)})},44121:function(e,s,t){t.d(s,{Z:function(){return ee}});var n=t(24246),i=t(77181),a=t(91437),l=()=>(0,n.jsxs)(i.xuv,{children:[(0,n.jsx)(i.xuv,{pb:4,fontSize:"18px",fontWeight:"semibold",children:"Role Description"}),(0,n.jsx)(i.gCW,{spacing:4,children:a.K.map(e=>(0,n.jsxs)(i.xuv,{width:"100%",padding:4,borderRadius:"md",backgroundColor:"gray.75",fontSize:"14px",children:[(0,n.jsx)(i.xuv,{fontWeight:"semibold",children:e.label}),(0,n.jsx)(i.xuv,{color:"gray.700",children:e.description})]},e.roleKey))})]}),r=t(16134),d=t(7617),o=t(16643),c=t(19904),u=t(34090),p=t(86677),h=t(27378),m=t(812),x=t(58452),g=t(77830),j=t(91613),f=t(46628),w=t(86780),b=t(1315),y=t(95492),_=t(65497);let v=e=>{let{assignedSystems:s,onAssignedSystemChange:t}=e,a=(0,r.C)(_.Ux);if((0,_.d6)(a,{skip:!a}),0===s.length)return null;let l=e=>{t(s.filter(s=>s.fides_key!==e.fides_key))};return(0,n.jsxs)(i.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,n.jsx)(i.hrZ,{children:(0,n.jsxs)(i.Tr,{children:[(0,n.jsx)(i.Th,{children:"System"}),(0,n.jsx)(i.Th,{})]})}),(0,n.jsx)(i.p3B,{children:s.map(e=>(0,n.jsxs)(i.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,n.jsx)(i.Td,{children:e.name}),(0,n.jsx)(i.Td,{textAlign:"end",children:(0,n.jsx)(i.wpx,{"aria-label":"Unassign system from user",icon:(0,n.jsx)(y.l,{}),onClick:()=>l(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var C=e=>{let{allSystems:s,assignedSystems:t,onChange:a}=e,l=e=>{t.find(s=>s.fides_key===e.fides_key)?a(t.filter(s=>s.fides_key!==e.fides_key)):a([...t,e])};return(0,n.jsx)(i.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,n.jsxs)(i.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,n.jsx)(i.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,n.jsxs)(i.Tr,{children:[(0,n.jsx)(i.Th,{children:"System"}),(0,n.jsx)(i.Th,{children:"Assign"})]})}),(0,n.jsx)(i.p3B,{children:s.map(e=>{let s=!!t.find(s=>s.fides_key===e.fides_key);return(0,n.jsxs)(i.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,n.jsx)(i.Td,{children:e.name}),(0,n.jsx)(i.Td,{children:(0,n.jsx)(i.rAg,{checked:s,onChange:()=>l(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let S=(e,s)=>{var t,n;return(null===(t=e.name)||void 0===t?void 0:t.toLocaleLowerCase().includes(s.toLocaleLowerCase()))||(null===(n=e.description)||void 0===n?void 0:n.toLocaleLowerCase().includes(s.toLocaleLowerCase()))};var k=e=>{let{isOpen:s,onClose:t,assignedSystems:a,onAssignedSystemChange:l}=e,{data:r}=(0,b.K3)(),[d,o]=(0,h.useState)(""),[c,u]=(0,h.useState)(a),p=async()=>{l(c),t()},m=!r||0===r.length,x=(0,h.useMemo)(()=>r?r.filter(e=>S(e,d)):[],[r,d]),g=(0,h.useMemo)(()=>{let e=new Set(c.map(e=>e.fides_key));return x.every(s=>e.has(s.fides_key))},[x,c]);return(0,n.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"2xl",children:[(0,n.jsx)(i.ZAr,{}),(0,n.jsxs)(i.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,n.jsxs)(i.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,n.jsx)(i.xvT,{children:"Assign systems"}),(0,n.jsxs)(i.j8w,{color:"success",children:["Assigned to ",a.length," systems"]})]}),(0,n.jsx)(i.fef,{"data-testid":"assign-systems-modal-body",children:m?(0,n.jsx)(i.xvT,{children:"No systems found"}):(0,n.jsxs)(i.Kqy,{spacing:4,children:[(0,n.jsxs)(i.kCb,{justifyContent:"space-between",children:[(0,n.jsx)(i.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Assign systems in your organization to this user"}),(0,n.jsx)(i.xuv,{children:(0,n.jsxs)(i.NIc,{display:"flex",alignItems:"center",children:[(0,n.jsx)(i.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,n.jsx)(i.rAg,{size:"small",id:"assign-all-systems",checked:g,onChange:e=>{e&&r?u(x):u(r?r.filter(e=>!x.includes(e)):[])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,n.jsx)(w.Z,{search:d,onChange:o,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,n.jsx)(C,{allSystems:x,assignedSystems:c,onChange:u})]})}),(0,n.jsx)(i.mzw,{justifyContent:"flex-start",children:(0,n.jsxs)("div",{children:[(0,n.jsx)(i.wpx,{onClick:t,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),m?null:(0,n.jsx)(i.wpx,{type:"primary",onClick:p,"data-testid":"confirm-btn",children:"Confirm"})]})})]})]})},P=e=>{let{label:s,roleKey:t,isSelected:a,isDisabled:l,assignedSystems:r,onAssignedSystemChange:d}=e,{setFieldValue:c}=(0,u.u6)(),p=(0,i.qY0)(),h=l?"You do not have sufficient permissions to assign this role.":void 0;return a?(0,n.jsxs)(i.Kqy,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",p:4,backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:[(0,n.jsxs)(i.kCb,{alignItems:"center",justifyContent:"space-between",children:[(0,n.jsx)(i.xvT,{fontSize:"md",fontWeight:"semibold",children:s}),(0,n.jsx)(i.StI,{})]}),t!==o.A7.APPROVER?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.kCb,{alignItems:"center",children:[(0,n.jsx)(i.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"Assigned systems"}),(0,n.jsx)(j.Z,{label:"Assigned systems refer to those systems that have been specifically allocated to a user for management purposes. Users assigned to a system possess full edit permissions and are listed as the Data Steward for the respective system."})]}),(0,n.jsx)(i.wpx,{disabled:l,title:h,type:"primary",size:"small",onClick:p.onOpen,"data-testid":"assign-systems-btn",children:"Assign systems +"}),(0,n.jsx)(v,{assignedSystems:r,onAssignedSystemChange:d}),p.isOpen?(0,n.jsx)(k,{isOpen:p.isOpen,onClose:p.onClose,assignedSystems:r,onAssignedSystemChange:d}):null]}):null]}):(0,n.jsx)(i.wpx,{onClick:()=>{c("roles",[t])},"data-testid":"role-option-".concat(s),title:h,disabled:l,children:s})};let T={roles:[]};var A=()=>{var e;let s=(0,i.pmc)(),t=(0,p.useRouter)(),l=(0,r.C)(_.Ux);(0,_.d6)(l,{skip:!l});let{isOpen:d,onOpen:w,onClose:b}=(0,i.qY0)(),y=(0,r.C)(_.R$),[v,C]=(0,h.useState)(y),[S]=(0,_.G$)();(0,h.useEffect)(()=>{C(y)},[y]);let{data:k,isLoading:A}=(0,_.gU)(null!=l?l:"",{skip:!l}),[R]=(0,_.lD)(),z=async e=>{if(d&&b(),!l)return;let t=e.roles.includes(o.A7.APPROVER),n=await R({user_id:l,payload:{roles:e.roles}});if((0,m.D4)(n)){s((0,f.Vo)((0,m.e$)(n.error)));return}if(!t){let e=v.map(e=>e.fides_key),t=await S({userId:l,fidesKeys:e});if((0,m.D4)(t)){s((0,f.Vo)((0,m.e$)(t.error)));return}}s((0,f.t5)("Permissions updated"))},q=async e=>{l&&(v.length>0&&e.roles.includes(o.A7.APPROVER)?w():await z(e))},E=(0,c.Tg)([o.Sh.USER_PERMISSION_ASSIGN_OWNERS]);if(!l)return null;if(A)return(0,n.jsx)(i.$jN,{});if(!E&&(null==k?void 0:null===(e=k.roles)||void 0===e?void 0:e.includes(o.A7.OWNER)))return(0,n.jsx)(i.xvT,{"data-testid":"insufficient-access",children:"You do not have sufficient access to change this user's permissions."});let I=(null==k?void 0:k.roles)?{roles:k.roles}:T;return(0,n.jsx)(u.J9,{onSubmit:q,initialValues:I,enableReinitialize:!0,children:e=>{let{values:s,isSubmitting:l,dirty:r}=e;return(0,n.jsxs)(u.l0,{children:[(0,n.jsxs)(i.Kqy,{spacing:7,children:[(0,n.jsxs)(i.Kqy,{spacing:3,"data-testid":"role-options",children:[(0,n.jsxs)(i.kCb,{alignItems:"center",children:[(0,n.jsx)(i.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"User role"}),(0,n.jsx)(j.Z,{label:"A user's role in the organization determines what parts of the UI they can access and which functions are available to them."})]}),a.K.map(e=>{let t=s.roles.indexOf(e.roleKey)>=0;return(0,n.jsx)(P,{isSelected:t,isDisabled:e.roleKey===o.A7.OWNER&&!E,assignedSystems:v,onAssignedSystemChange:C,...e},e.roleKey)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(i.wpx,{onClick:()=>t.push(g.e3),children:"Cancel"}),(0,n.jsx)(i.wpx,{type:"primary",htmlType:"submit",loading:l,disabled:!r&&v===y,"data-testid":"save-btn",children:"Save"})]})]}),(0,n.jsx)(x.Z,{isOpen:d,onClose:b,onConfirm:()=>z(s),title:"Change role to Approver",testId:"downgrade-to-approver-confirmation-modal",continueButtonText:"Yes",message:(0,n.jsx)(i.xvT,{children:"Switching to an approver role will remove all assigned systems. Do you wish to proceed?"})})]})}})},R=t(61038),z=t(55484),q=t(25980),E=t(40324),I=t(96006),O=t(7426);let{useGetEmailInviteStatusQuery:N}=t(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]})})});var Z=t(76174),U=t(91317),W=t(31883);let D=z.Ry().shape({password:I.a.label("Password"),passwordConfirmation:z.Z_().required().oneOf([z.iH("password")],"Passwords must match").label("Password confirmation")}),K={password:"",passwordConfirmation:""},B=e=>{let s=(0,i.qY0)(),t=(0,i.pmc)(),[n]=(0,_.ls)(),a=async i=>{let a=await n({id:e,new_password:i.password});(0,W.D4)(a)?t((0,f.Vo)((0,m.e$)(a.error))):(t((0,f.t5)("Successfully reset user's password. Please inform the user of their new password.")),s.onClose())};return{...s,handleResetPassword:a}};var Y=e=>{let{id:s}=e,{handleResetPassword:t,isOpen:a,onClose:l,onOpen:r}=B(s);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.wpx,{onClick:r,"data-testid":"reset-password-btn",children:"Reset password"}),(0,n.jsxs)(i.u_l,{isCentered:!0,isOpen:a,onClose:l,children:[(0,n.jsx)(i.ZAr,{}),(0,n.jsx)(i.hzk,{children:(0,n.jsx)(u.J9,{initialValues:K,validationSchema:D,onSubmit:t,children:e=>{let{isSubmitting:s,dirty:t,isValid:a}=e;return(0,n.jsxs)(u.l0,{children:[(0,n.jsx)(i.xBx,{children:"Reset Password"}),(0,n.jsx)(i.olH,{}),(0,n.jsx)(i.fef,{children:(0,n.jsxs)(i.Kqy,{direction:"column",spacing:4,children:[(0,n.jsx)(i.xvT,{mb:2,children:"Choose a new password for this user."}),(0,n.jsx)(E.j0,{name:"password",label:"Password",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",autoComplete:"new-password"}),(0,n.jsx)(E.j0,{name:"passwordConfirmation",label:"Confirm Password",placeholder:"********",type:"password",tooltip:"Must match above password.",autoComplete:"confirm-password"})]})}),(0,n.jsx)(i.mzw,{children:(0,n.jsxs)("div",{className:"w-full gap-2",children:[(0,n.jsx)(i.wpx,{onClick:l,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(i.wpx,{type:"primary",disabled:!t||!a,loading:s,htmlType:"submit",className:"w-1/2","data-testid":"submit-btn",children:"Change Password"})]})})]})}})})]})]})};let L=e=>{let s=(0,i.qY0)(),t=(0,i.pmc)(),[n,a]=(0,h.useState)(""),[l,r]=(0,h.useState)(""),[d,{isLoading:o}]=(0,_.ev)(),c=!!(e&&l&&n),u=async()=>{c&&d({id:e,old_password:n,new_password:l}).unwrap().then(()=>{t((0,f.t5)("Password updated")),s.onClose()})};return{...s,changePasswordValidation:c,handleChange:e=>{"oldPassword"===e.target.name?a(e.target.value):r(e.target.value)},handleChangePassword:u,isLoading:o,newPasswordValue:l,oldPasswordValue:n}};var V=e=>{let{id:s}=e,{changePasswordValidation:t,handleChange:a,handleChangePassword:l,isLoading:r,isOpen:d,newPasswordValue:o,oldPasswordValue:c,onClose:u,onOpen:p}=L(s);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.wpx,{onClick:p,"data-testid":"update-password-btn",children:"Update password"}),(0,n.jsxs)(i.u_l,{isCentered:!0,isOpen:d,onClose:u,children:[(0,n.jsx)(i.ZAr,{}),(0,n.jsxs)(i.hzk,{children:[(0,n.jsx)(i.xBx,{children:"Update Password"}),(0,n.jsx)(i.olH,{}),(0,n.jsx)(i.fef,{pb:6,children:(0,n.jsxs)(i.Kqy,{direction:"column",spacing:"15px",children:[(0,n.jsx)(i.NIc,{children:(0,n.jsx)(i.IIB,{isRequired:!0,name:"oldPassword",onChange:a,placeholder:"Old Password",type:"password",value:c,"data-testid":"input-oldPassword"})}),(0,n.jsx)(i.NIc,{children:(0,n.jsx)(i.IIB,{isRequired:!0,name:"newPassword",onChange:a,placeholder:"New Password",type:"password",value:o,"data-testid":"input-newPassword"})})]})}),(0,n.jsxs)(i.mzw,{children:[(0,n.jsx)(i.wpx,{onClick:u,className:"mr-2 w-1/2",children:"Cancel"}),(0,n.jsx)(i.wpx,{type:"primary",disabled:!t,loading:r,onClick:l,htmlType:"submit",className:"mr-3 w-1/2","data-testid":"submit-btn",children:"Change Password"})]})]})]})]})},F=()=>{let e=(0,r.C)(_.Ux),s=(0,r.C)(U.dy),t=!!s&&s.id===e;return(0,n.jsx)(i.xuv,{children:e?(0,n.jsxs)(i.Ugi,{children:[t?(0,n.jsx)(V,{id:e}):null,(0,n.jsx)(c.ZP,{scopes:[o.Sh.USER_PASSWORD_RESET],children:(0,n.jsx)(Y,{id:e})})]}):null})};let M=(e,s,t,n)=>!e||e&&!s||e&&s&&!0===t&&!!n,$=(e,s,t)=>!!(e&&s&&t),H=(e,s,t,n,i,a)=>!!e&&!s&&M(t,n,i,a),G=(e,s,t,n)=>M(e,s,t,n),J={username:"",first_name:"",email_address:"",last_name:"",password:"",password_login_enabled:!1},Q=(e,s,t,n,i)=>z.Ry().shape({username:z.Z_().required().label("Username"),email_address:z.Z_().email().required().label("Email address"),first_name:z.Z_().label("First name"),last_name:z.Z_().label("Last name"),password:z.Z_().when(["password_login_enabled"],{is:a=>H(e,s,t,n,i,a),then:()=>I.a.label("Password"),otherwise:()=>z.Z_().optional().label("Password")}),password_login_enabled:z.O7().label("Allow password login")});var X=e=>{let{onSubmit:s,initialValues:t,canEditNames:a}=e,l=(0,p.useRouter)(),d=(0,i.pmc)(),o=(0,r.T)(),c=(0,i.qY0)(),{data:h}=N(),{data:x}=(0,Z.qv)();(0,O.tB)({api_set:!1});let j=(0,r.C)(_.ZC),w=(0,r.C)(O.iR),{plus:b}=(0,q.hz)(),v=(null==h?void 0:h.enabled)||!1,C=(null==w?void 0:w.allow_username_password_login)||!1,S=!j,k=!S&&!a,P=x&&x.length>0||!1,T=$(b,P,C),A=null!=t?t:J;j&&"password_login_enabled"in j&&(A={...A,password_login_enabled:!!j.password_login_enabled});let z=Q(S,v,b,P,C),I=async e=>{let t=H(S,v,b,P,C,e.password_login_enabled),n={username:e.username,email_address:e.email_address,first_name:e.first_name,last_name:e.last_name};T&&(n.password_login_enabled=e.password_login_enabled),t&&e.password&&(n.password=e.password);let i=await s(n);if((0,m.D4)(i)){d((0,f.Vo)((0,m.e$)(i.error)));return}d((0,f.t5)("".concat(S?"User created. By default, new users are set to the Viewer role. To change the role, please go to the Permissions tab.":"User updated."))),(null==i?void 0:i.data)&&o((0,_.Vv)(i.data.id))};return(0,n.jsx)(u.J9,{onSubmit:I,initialValues:A,validationSchema:z,"data-testid":"user-form",children:e=>{let{dirty:s,isSubmitting:t,isValid:a,values:r}=e;return(0,n.jsx)(u.l0,{children:(0,n.jsxs)(i.Kqy,{maxW:["xs","xs","100%"],width:"100%",spacing:7,children:[(0,n.jsxs)(i.Kqy,{spacing:6,maxWidth:"55%",children:[(0,n.jsxs)(i.kCb,{children:[(0,n.jsxs)(i.xvT,{display:"flex",alignItems:"center",fontSize:"sm",fontWeight:"semibold",children:["Profile"," ",(null==j?void 0:j.disabled)&&(0,n.jsx)(i.j8w,{color:"success",className:"ml-2","data-testid":"invite-sent-badge",children:"Invite sent"})]}),(0,n.jsx)(i.xuv,{marginLeft:"auto",children:(0,n.jsxs)(i.Ugi,{children:[G(b,P,C||!1,r.password_login_enabled)&&(0,n.jsx)(F,{"data-testid":"password-management"}),S?null:(0,n.jsxs)(i.xuv,{children:[(0,n.jsx)(i.wpx,{"aria-label":"delete",icon:(0,n.jsx)(y.l,{}),onClick:c.onOpen,"data-testid":"delete-user-btn"}),(0,n.jsx)(R.Z,{user:j,...c})]})]})})]}),(0,n.jsx)(E.j0,{name:"username",label:"Username",variant:"block",placeholder:"Enter new username",disabled:!S,isRequired:!0,"data-testid":"input-username"}),(0,n.jsx)(E.j0,{name:"email_address",label:"Email address",variant:"block",placeholder:"Enter email of user",isRequired:!0,"data-testid":"input-email-address"}),(0,n.jsx)(E.j0,{name:"first_name",label:"First name",variant:"block",placeholder:"Enter first name of user",disabled:k,"data-testid":"input-first-name"}),(0,n.jsx)(E.j0,{name:"last_name",label:"Last name",variant:"block",placeholder:"Enter last name of user",disabled:k,"data-testid":"input-last-name"}),T&&(0,n.jsx)(E.w8,{name:"password_login_enabled",label:"Allow password login",tooltip:"When enabled, user can log in with username and password. When disabled, user must use SSO.",variant:"stacked",isDisabled:!S,"data-testid":"toggle-allow-password-login",size:"default"}),H(S,v,b,P,C,r.password_login_enabled)&&(0,n.jsx)(E.j0,{name:"password",label:"Password",variant:"block",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",isRequired:!0,"data-testid":"input-password"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(i.wpx,{onClick:()=>l.push(g.e3),className:"mr-3","data-testid":"cancel-btn",children:"Cancel"}),(0,n.jsx)(i.wpx,{htmlType:"submit",type:"primary",disabled:!s||!a,loading:t,"data-testid":"save-user-btn",children:"Save"})]})]})})}})},ee=e=>{let{onSubmit:s,initialValues:t,...a}=e,u=(0,r.C)(_.Ux);(0,_.Fk)(u,{skip:!u});let p=(0,c.Tg)([o.Sh.USER_PERMISSION_UPDATE]),h=[{label:"Profile",content:(0,n.jsx)(X,{onSubmit:s,initialValues:t,...a})},{label:"Permissions",content:(0,n.jsxs)(i.kCb,{gap:"97px",children:[(0,n.jsx)(i.xuv,{w:{base:"100%",md:"50%",xl:"50%"},children:(0,n.jsx)(A,{})}),(0,n.jsx)(i.xuv,{position:"absolute",top:"96px",right:6,height:"calc(100% + 100px)",overflowY:"scroll",padding:6,w:"35%",borderLeftWidth:"1px",children:(0,n.jsx)(l,{})})]}),isDisabled:!u||!p}];return(0,n.jsx)(d.Z,{data:h})}},31883:function(e,s,t){t.d(s,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=t(19043)}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4481],{86780:function(e,t,n){var l=n(24246),o=n(77181);t.Z=e=>{let{search:t,onChange:n,withIcon:i,onClear:r,placeholder:s,...a}=e;return(0,l.jsxs)(o.vyj.Compact,{className:"w-96","data-testid":"search-bar",children:[(0,l.jsx)(o.uFc,{autoComplete:"off",value:t,onChange:e=>n(e.target.value),placeholder:s||"Search...",prefix:i?(0,l.jsx)(o.PTu,{boxSize:4}):void 0,...a}),r?(0,l.jsx)(o.wpx,{onClick:r,children:"Clear"}):null]})}},812:function(e,t,n){n.d(t,{D4:function(){return i.D4},MM:function(){return g},Ot:function(){return c},c6:function(){return o},cj:function(){return x},e$:function(){return s},fn:function(){return a},iC:function(){return h},nU:function(){return u},tB:function(){return d}});var l,o,i=n(19043);let r="An unexpected error occurred. Please try again.",s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;if((0,i.Bw)(e)){if((0,i.hE)(e.data))return e.data.detail;if((0,i.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,i.Dy)(e.data)||404===e.status&&(0,i.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function a(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:r};if((0,i.oK)(e))return{status:e.originalStatus,message:e.data};if((0,i.Bw)(e)){let{status:n}=e;return{status:n,message:s(e,t.message)}}return t},g=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(l=o||(o={})).GVL="gvl",l.AC="gacp",l.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},x=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},71795:function(e,t,n){n.d(t,{_:function(){return o}});var l=n(27378);function o(e,t){let[n,o]=(0,l.useState)(()=>{if(!e)return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return console.error(e),t}});return[n,t=>{try{let l=t instanceof Function?t(n):t;o(l),e&&window.localStorage.setItem(e,JSON.stringify(l))}catch(e){console.error(e)}}]}},58452:function(e,t,n){var l=n(24246),o=n(77181);t.Z=e=>{let{isOpen:t,onClose:n,onConfirm:i,onCancel:r,title:s,message:a,cancelButtonText:c,continueButtonText:d,isLoading:u,returnFocusOnClose:g,isCentered:h,testId:x="confirmation-modal",icon:m}=e;return(0,l.jsxs)(o.u_l,{isOpen:t,onClose:n,size:"lg",returnFocusOnClose:null==g||g,isCentered:h,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{textAlign:"center",p:6,"data-testid":x,children:[m?(0,l.jsx)(o.M5Y,{mb:2,children:m}):null,s?(0,l.jsx)(o.xBx,{fontWeight:"medium",pb:0,children:s}):null,a?(0,l.jsx)(o.fef,{children:a}):null,(0,l.jsx)(o.mzw,{children:(0,l.jsxs)(o.MIq,{columns:2,width:"100%",children:[(0,l.jsx)(o.wpx,{onClick:()=>{r&&r(),n()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:u,children:c||"Cancel"}),(0,l.jsx)(o.wpx,{type:"primary",size:"large",onClick:i,"data-testid":"continue-btn",loading:u,children:d||"Continue"})]})})]})]})}},42904:function(e,t,n){n.d(t,{W3:function(){return r},bX:function(){return s},oi:function(){return a},s8:function(){return c}});var l=n(24246),o=n(77181),i=n(27378);let r=[25,50,100],s=e=>{let t=e.getFilteredRowModel().rows.length,{pageIndex:n}=e.getState().pagination,{pageSize:l}=e.getState().pagination,o=e.previousPage,i=!e.getCanPreviousPage(),r=e.nextPage,s=!e.getCanNextPage(),{setPageSize:a}=e;return{totalRows:t,onPreviousPageClick:o,isPreviousPageDisabled:i,onNextPageClick:r,isNextPageDisabled:s,setPageSize:a,startRange:n*l==0?1:n*l,endRange:n*l+l}},a=()=>{let e,t;let[n,l]=(0,i.useState)(r[0]),[o,s]=(0,i.useState)(1),[a,c]=(0,i.useState)(1),d=(0,i.useCallback)(()=>{s(e=>e-1)},[s]),u=(0,i.useMemo)(()=>1===o,[o]),g=(0,i.useCallback)(()=>{s(e=>e+1)},[s]),h=(0,i.useMemo)(()=>{let e=!a,t=!!a&&o===a;return e||t},[o,a]);if(a){let l=(o-1)*n;e=l+1,t=l+n}else e=0,t=0;let x=(0,i.useCallback)(()=>{s(1)},[]);return{onPreviousPageClick:d,isPreviousPageDisabled:u,onNextPageClick:g,isNextPageDisabled:h,pageSize:n,setPageSize:e=>{l(e),x()},PAGE_SIZES:r,startRange:e,endRange:t,pageIndex:o,resetPageIndexToDefault:x,setTotalPages:c}},c=e=>{let{pageSizes:t,totalRows:n,onPreviousPageClick:i,isPreviousPageDisabled:r,onNextPageClick:s,isNextPageDisabled:a,setPageSize:c,startRange:d,endRange:u}=e;return(0,l.jsxs)(o.Ugi,{ml:1,mt:3,mb:1,children:[(0,l.jsxs)(o.v2r,{children:[(0,l.jsx)(o.j2t,{as:o.wpx,size:"small","data-testid":"pagination-btn",children:(0,l.jsxs)(o.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"semibold",userSelect:"none",style:{fontVariantNumeric:"tabular-nums"},children:[d.toLocaleString("en"),"-",u<=n?u.toLocaleString("en"):n.toLocaleString("en")," ","of ",n.toLocaleString("en")]})}),(0,l.jsx)(o.qyq,{minWidth:"0",children:t.map(e=>(0,l.jsxs)(o.sNh,{onClick:()=>{c(e)},"data-testid":"pageSize-".concat(e),fontSize:"xs",children:[e," per view"]},e))})]}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.wyc,{}),size:"small","aria-label":"previous page",onClick:i,disabled:r}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.XCv,{}),size:"small","aria-label":"next page",onClick:s,disabled:a})]})}},72625:function(e,t,n){n.d(t,{A4:function(){return f},CI:function(){return v},Cy:function(){return m},G3:function(){return x},Hm:function(){return y},Rr:function(){return S},S1:function(){return k},WP:function(){return w},k:function(){return C},mb:function(){return j},tc:function(){return b}});var l=n(24246),o=n(7195),i=n(77181),r=n(34090),s=n(3819),a=n.n(s),c=n(27378),d=n(812),u=n(58452),g=n(46628),h=n(16394);let x=e=>{var t,n;let{value:o,cellProps:r,...s}=e,c=!!(null==r?void 0:null===(t=r.cell.column.columnDef.meta)||void 0===t?void 0:t.showHeaderMenu)&&!!(null==r?void 0:null===(n=r.cellState)||void 0===n?void 0:n.isExpanded);return(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,py:1.5,fontWeight:"normal",textOverflow:"ellipsis",overflow:c?void 0:"hidden",whiteSpace:c?"normal":void 0,title:c&&o?void 0:null==o?void 0:o.toString(),...s,children:a()(o)?o.toString():o})},m=e=>{let{time:t}=e;if(!t)return(0,l.jsx)(x,{value:"N/A"});let n=(0,o.B)(new Date(t),new Date,{addSuffix:!0}),r=(0,h.p6)(new Date(t));return(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",children:(0,l.jsx)(i.esZ,{title:r,children:(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,h.G8)(n)})})})},p=e=>{let{children:t,...n}=e;return(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",mr:2,overflow:"auto",...n,children:t})},f=e=>{let{value:t,suffix:n,...o}=e;return(0,l.jsx)(p,{children:(0,l.jsxs)(i.j8w,{...o,children:[t,n]})})},v=e=>{let{count:t,singSuffix:n,plSuffix:o,...r}=e,s=null;return s=1===t?(0,l.jsxs)(i.j8w,{...r,children:[t,n?" ".concat(n):null]}):(0,l.jsxs)(i.j8w,{...r,children:[t,o?" ".concat(o):null]}),(0,l.jsx)(p,{children:s})},j=e=>{let{values:t,cellProps:n,...o}=e,{isExpanded:r,isWrapped:s,version:a}=(null==n?void 0:n.cellState)||{},[d,u]=(0,c.useState)(!r),[g,h]=(0,c.useState)(!!s),[x,m]=(0,c.useState)(r?t:null==t?void 0:t.slice(0,2));return(0,c.useEffect)(()=>{u(!r)},[r,a]),(0,c.useEffect)(()=>{h(!!s)},[s]),(0,c.useEffect)(()=>{(null==t?void 0:t.length)&&m(d?t.slice(0,2):t)},[d,t]),(0,c.useMemo)(()=>(null==x?void 0:x.length)?(0,l.jsxs)(i.kCb,{alignItems:d?"center":"flex-start",flexDirection:d||g?"row":"column",flexWrap:g?"wrap":"nowrap",gap:1.5,pt:2,pb:2,overflowX:"auto",onClick:e=>{d||(e.stopPropagation(),u(!0))},cursor:d?void 0:"pointer",children:[x.map(e=>(0,l.jsx)(i.j8w,{color:"white","data-testid":e.key,...o,children:e.label},e.key)),d&&t&&t.length>2&&(0,l.jsxs)(i.wpx,{type:"link",size:"small",onClick:()=>u(!1),className:"text-xs font-normal",children:["+",t.length-2," more"]})]}):null,[x,d,g,t,o])},b=e=>{let{values:t,valueSuffix:n,cellProps:o}=e,{isExpanded:r,version:s}=(null==o?void 0:o.cellState)||{},[a,d]=(0,c.useState)(!r);return(0,c.useEffect)(()=>{d(!r)},[r,s]),(0,c.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"normal",textOverflow:"ellipsis",overflow:"hidden",children:t[0]}):(0,l.jsxs)(i.kCb,{flexDirection:"row",alignItems:"center",gap:1,pt:2,pb:2,onClick:e=>{a||(e.stopPropagation(),d(!0))},cursor:a?void 0:"pointer",children:[a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(i.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"normal",children:[t.length," ",n]}),(0,l.jsx)(i.wpx,{type:"link",size:"small",onClick:()=>d(!1),className:"text-xs font-normal",children:"View"})]}),!a&&(0,l.jsx)(i.aVo,{overflow:"hidden",children:t.map(e=>(0,l.jsx)(i.HCh,{fontSize:"xs",lineHeight:4,listStyleType:"none",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:e},e))})]}):null,[a,t,n])},w=e=>{let{value:t,suffix:n,cellState:o,ignoreZero:r,tagProps:s}=e,a=null;return t?(a=Array.isArray(t)?1===t.length?(0,l.jsx)(i.j8w,{...s,children:t}):(null==o?void 0:o.isExpanded)&&t.length>0?t.map((e,t)=>(0,l.jsx)(i.j8w,{...s,children:e},(null==e?void 0:e.toString())||t)):(0,l.jsxs)(i.j8w,{...s,children:[t.length,n?" ".concat(n):null]}):(0,l.jsx)(i.j8w,{...s,children:t}),(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",gap:2,overflowX:"hidden",children:a})):r?null:(0,l.jsxs)(i.j8w,{...s,children:["0",n?" ".concat(n):""]})},C=e=>{let{dataTestId:t,...n}=e;return(0,l.jsx)(i.kCb,{alignItems:"center",justifyContent:"center",onClick:e=>e.stopPropagation(),children:(0,l.jsx)(i.XZJ,{"data-testid":t||void 0,...n})})},S=e=>{let{value:t,...n}=e;return(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:9,fontWeight:"medium",flex:1,...n,children:t})},y=e=>{let{value:t,defaultValue:n,isEditing:o,...s}=e,a=s.column.columnDef.id||"",{submitForm:c}=(0,r.u6)();return o?(0,l.jsx)(r.Rt,{name:a,as:i.uFc,maxLength:80,placeholder:n,"aria-label":"Edit column name",size:"small","data-testid":"column-".concat(a,"-input"),onPressEnter:c}):(0,l.jsx)(S,{value:t,...s})},k=e=>{let{enabled:t,onToggle:n,title:o,message:r,isDisabled:s,...a}=e,c=(0,i.qY0)(),h=(0,i.pmc)(),x=async e=>{let{enable:t}=e,l=await n(t);(0,d.D4)(l)&&h((0,g.Vo)((0,d.e$)(l.error)))},m=async e=>{e?await x({enable:!0}):c.onOpen()};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.rAg,{checked:t,onChange:m,disabled:s,"data-testid":"toggle-switch",...a}),(0,l.jsx)(u.Z,{isOpen:c.isOpen,onClose:c.onClose,onConfirm:()=>{x({enable:!1}),c.onClose()},title:o,message:(0,l.jsx)(i.xvT,{color:"gray.500",children:r}),continueButtonText:"Confirm",isCentered:!0,icon:(0,l.jsx)(i.aNP,{color:"orange.100"})})]})}},14481:function(e,t,n){n.d(t,{A4:function(){return l.A4},CI:function(){return l.CI},F1:function(){return p},G3:function(){return l.G3},Rr:function(){return l.Rr},vr:function(){return W},ZK:function(){return R},HO:function(){return D},WP:function(){return l.WP},k:function(){return l.k},W3:function(){return A.W3},s8:function(){return A.s8},AA:function(){return _},Q$:function(){return H},I4:function(){return P},bX:function(){return A.bX},oi:function(){return A.oi}});var l=n(72625),o=n(24246),i=n(77181),r=n(27378),s=n(43862),a=n(65201),c=n(75383),d=n(52202);let u="DraggableColumnListItem",g=e=>{let{id:t,index:n,moveColumn:l,setColumnVisible:o}=e,i=(0,r.useRef)(null),[{handlerId:s},a]=(0,c.L)({accept:u,collect:e=>({handlerId:e.getHandlerId()}),hover(e,t){var o;if(!i.current)return;let r=e.index;if(r===n)return;let s=null===(o=i.current)||void 0===o?void 0:o.getBoundingClientRect(),a=(s.bottom-s.top)/2,c=t.getClientOffset().y-s.top;r<n&&c<a||r>n&&c>a||(l(r,n),Object.assign(e,{index:n}))}}),[{isDragging:g},h,x]=(0,d.c)({type:u,item:()=>({id:t,index:n}),collect:e=>({isDragging:!!e.isDragging()})});return h(a(i)),{isDragging:g,ref:i,handlerId:s,preview:x,handleColumnVisibleToggle:e=>{o(n,e)}}},h=e=>{let{id:t,index:n,isVisible:l,moveColumn:r,setColumnVisible:s,text:a}=e,{ref:c,isDragging:d,handlerId:u,preview:h,handleColumnVisibleToggle:x}=g({index:n,id:t,moveColumn:r,setColumnVisible:s});return(0,o.jsxs)(i.HCh,{alignItems:"center",display:"flex",minWidth:0,ref:e=>{h(e)},"data-handler-id":u,opacity:d?.2:1,"data-testid":"column-list-item-".concat(t),children:[(0,o.jsx)(i.xuv,{ref:c,cursor:d?"grabbing":"grab","data-testid":"column-dragger-".concat(t),children:(0,o.jsx)(i.DE2,{as:i.zGR,color:"gray.300",flexShrink:0,height:"20px",width:"20px",_hover:{color:"gray.700"}})}),(0,o.jsxs)(i.NIc,{alignItems:"center",display:"flex",minWidth:0,title:a,children:[(0,o.jsx)(i.lXp,{color:"gray.700",fontSize:"normal",fontWeight:400,htmlFor:"".concat(t),mb:"0",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flexGrow:1,children:a}),(0,o.jsx)(i.rAg,{id:"".concat(t),checked:l,onChange:x})]})]})},x=e=>{let{columns:t}=e,[n,l]=(0,r.useState)(null!=t?t:[]);return(0,r.useEffect)(()=>{l((null==t?void 0:t.map(e=>({...e})))||[])},[t]),{columns:n,moveColumn:(0,r.useCallback)((e,t)=>{l(n=>(0,a.ZP)(n,n=>{let l=n[e];n.splice(e,1),n.splice(t,0,l)}))},[]),setColumnVisible:(0,r.useCallback)((e,t)=>{l(n=>(0,a.ZP)(n,n=>{n[e]&&(n[e].isVisible=t)}))},[])}},m=e=>{let{columns:t,columnEditor:n}=e;return(0,o.jsx)(i.aVo,{spacing:4,children:t.map((e,t)=>(0,o.jsx)(h,{id:e.id,index:t,isVisible:e.isVisible,moveColumn:n.moveColumn,setColumnVisible:n.setColumnVisible,text:e.displayText},e.id))})},p=e=>{let{isOpen:t,onClose:n,headerText:l,tableInstance:a,columnNameMap:c,prefixColumns:d,savedCustomReportId:u,onColumnOrderChange:g,onColumnVisibilityChange:h}=e,p=x({columns:(0,r.useMemo)(()=>a.getAllColumns().filter(e=>!d.includes(e.id)).map(e=>{var t;return{id:e.id,displayText:(0,s.AH)({columnNameMap:c,columnId:e.id}),isVisible:null!==(t=a.getState().columnVisibility[e.id])&&void 0!==t?t:e.getIsVisible()}}).sort((e,t)=>{let{columnOrder:n}=a.getState(),l=n.indexOf(e.id),o=n.indexOf(t.id);return -1===l&&-1===o?0:-1===l?1:-1===o?-1:l-o}),[u,c])}),f=(0,r.useCallback)(()=>{let e=[...d,...p.columns.map(e=>e.id)],t=p.columns.reduce((e,t)=>(e[t.id]=t.isVisible,e),{});g(e),h(t),n()},[n,d,p.columns,g,h]);return(0,o.jsxs)(i.u_l,{isOpen:t,onClose:n,isCentered:!0,size:"2xl",children:[(0,o.jsx)(i.ZAr,{}),(0,o.jsxs)(i.hzk,{children:[(0,o.jsx)(i.xBx,{pb:0,children:l}),(0,o.jsx)(i.olH,{"data-testid":"column-settings-close-button"}),(0,o.jsxs)(i.fef,{children:[(0,o.jsx)(i.xvT,{fontSize:"sm",color:"gray.500",mb:2,children:"You can toggle columns on and off to hide or show them in the table. Additionally, you can drag columns up or down to change the order"}),(0,o.jsxs)(i.mQc,{colorScheme:"complimentary",children:[(0,o.jsx)(i.tdY,{children:(0,o.jsx)(i.OK9,{color:"complimentary.500",children:"Columns"})}),(0,o.jsx)(i.nPR,{children:(0,o.jsx)(i.x45,{p:0,pt:4,maxHeight:"270px",overflowY:"scroll",children:(0,o.jsx)(m,{columns:p.columns,columnEditor:p})})})]})]}),(0,o.jsx)(i.mzw,{children:(0,o.jsxs)(i.xuv,{display:"flex",justifyContent:"space-between",width:"100%",children:[(0,o.jsx)(i.wpx,{onClick:n,className:"mr-3 grow",children:"Cancel"}),(0,o.jsx)(i.wpx,{onClick:f,type:"primary",className:"grow","data-testid":"save-button",children:"Save"})]})})]})]})};var f=n(59003),v=n(71795),j=n(14048);let b=e=>{var t,n,l,r,a,c,d,u;let g,{cell:h,onRowClick:x,cellState:m}=e,p=h.getContext().table.getState().grouping.length>0,v=p?h.getContext().table.getState().grouping[0]:void 0,j=h.column.id===v,b=!1,w=!1,C=!1,S=h.getContext().table.getRowModel().rows.filter(e=>!e.id.includes(":")),y=S[0].id===h.row.id,k=S[S.length-1].id===h.row.id;if(h.getValue()&&j){let e=h.getContext().table.getRow("".concat(h.column.id,":").concat(h.getValue()));C=1===e.subRows.length,b=e.subRows[0].id===h.row.id,w=e.subRows[e.subRows.length-1].id===h.row.id}let z=(!j||b)&&!!(null===(t=h.column.columnDef.meta)||void 0===t?void 0:t.onCellClick);return(null===(n=h.column.columnDef.meta)||void 0===n?void 0:n.disableRowClick)||!x?z&&(g=()=>{var e,t;null===(t=h.column.columnDef.meta)||void 0===t||null===(e=t.onCellClick)||void 0===e||e.call(t,h.row.original)}):g=e=>{x(h.row.original,e)},(0,o.jsx)(i.Td,{width:(null===(l=h.column.columnDef.meta)||void 0===l?void 0:l.width)?h.column.columnDef.meta.width:"unset",overflow:(null===(r=h.column.columnDef.meta)||void 0===r?void 0:r.overflow)?null===(a=h.column.columnDef.meta)||void 0===a?void 0:a.overflow:"auto",borderBottomWidth:k||j?"0px":"1px",borderBottomColor:"gray.200",borderRightWidth:"1px",borderRightColor:"gray.200",sx:{article:{borderTopWidth:"2x",borderTopColor:"red"},...(0,s.J9)("select"===h.column.id||(null===(c=h.column.columnDef.meta)||void 0===c?void 0:c.noPadding)),maxWidth:"calc(var(--col-".concat(h.column.id,"-size) * 1px)"),minWidth:"calc(var(--col-".concat(h.column.id,"-size) * 1px)"),"&:hover":{backgroundColor:z?"gray.50":void 0,cursor:z?"pointer":void 0}},_hover:!x||(null===(d=h.column.columnDef.meta)||void 0===d?void 0:d.disableRowClick)?void 0:{cursor:"pointer"},_first:{borderBottomWidth:(p||k)&&(!w||y||k)&&(!b||!C||k)?"0px":"1px"},_last:{borderRightWidth:0},height:"inherit",onClick:g,"data-testid":"row-".concat(h.row.id,"-col-").concat(h.column.id),...null===(u=h.column.columnDef.meta)||void 0===u?void 0:u.cellProps,children:!h.getIsPlaceholder()||b?(0,f.ie)(h.column.columnDef.cell,{...h.getContext(),cellState:m}):null})},w=e=>{let{row:t,renderRowTooltipLabel:n,onRowClick:l,expandedColumns:r,wrappedColumns:a}=e;if(t.getIsGrouped())return null;let c=(0,o.jsx)(i.Tr,{height:"36px",_hover:l?{backgroundColor:"gray.50"}:void 0,"data-testid":"row-".concat(t.id),backgroundColor:t.getCanSelect()?void 0:"gray.50",children:t.getVisibleCells().map(e=>{let t=(0,s.tt)(e.column.id,r),n={isExpanded:!!t&&t>0,isWrapped:!!a.find(t=>t===e.column.id),version:t};return(0,o.jsx)(b,{cell:e,onRowClick:l,cellState:n},e.id)})},t.id);return n?(0,o.jsx)(i.ua7,{label:n?n(t):void 0,hasArrow:!0,placement:"top",children:c}):c},C={asc:{icon:(0,o.jsx)(i.Hf3,{}),title:"Sort ascending"},desc:{icon:(0,o.jsx)(i.veu,{}),title:"Sort descending"}},S={height:i.rSc.space[9],width:"100%",textAlign:"start","&:focus-visible":{backgroundColor:"gray.100"},"&:focus":{outline:"none"}},y=e=>{var t,n,l,r,a,c,d,u,g;let{header:h,onGroupAll:x,onExpandAll:m,onWrapToggle:p,isExpandAll:v,isWrapped:b,enableSorting:w}=e,{meta:y}=h.column.columnDef;return(null==y?void 0:y.showHeaderMenu)?(0,o.jsxs)(i.v2r,{placement:"bottom-end",closeOnSelect:!y.showHeaderMenuWrapOption,children:[(0,o.jsx)(i.j2t,{as:i.zxk,rightIcon:(0,o.jsxs)(i.Ugi,{children:[null===(t=C[h.column.getIsSorted()])||void 0===t?void 0:t.icon,(0,o.jsx)(i.nXP,{transform:"rotate(90deg)"})]}),title:"Column options",variant:"ghost",size:"sm",sx:{...(0,s.J9)("select"===h.column.id),...S},"data-testid":"".concat(h.id,"-header-menu"),children:(0,f.ie)(h.column.columnDef.header,h.getContext())}),(0,o.jsx)(i.h_i,{children:(0,o.jsxs)(i.qyq,{fontSize:"xs",minW:"0",w:"158px","data-testid":"".concat(h.id,"-header-menu-list"),children:[(0,o.jsxs)(i.sNh,{gap:2,color:v?"complimentary.500":void 0,onClick:()=>m(h.id),children:[(0,o.jsx)(j.oq,{})," Expand all"]}),(0,o.jsxs)(i.sNh,{gap:2,color:v?void 0:"complimentary.500",onClick:()=>x(h.id),children:[(0,o.jsx)(j.Kc,{})," Collapse all"]}),w&&h.column.getCanSort()&&(0,o.jsxs)(i.sNh,{gap:2,onClick:h.column.getToggleSortingHandler(),children:[null!==(u=null===(n=C[h.column.getNextSortingOrder()])||void 0===n?void 0:n.icon)&&void 0!==u?u:(0,o.jsx)(i.Dbz,{}),null!==(g=null===(l=C[h.column.getNextSortingOrder()])||void 0===l?void 0:l.title)&&void 0!==g?g:"Clear sort"]}),y.showHeaderMenuWrapOption&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.RaW,{}),(0,o.jsx)(i.xuv,{px:3,children:(0,o.jsx)(i.XZJ,{size:"sm",isChecked:b,onChange:()=>p(h.id,!b),colorScheme:"complimentary",children:(0,o.jsx)(i.xvT,{fontSize:"xs",children:"Wrap results"})})})]})]})})]}):w&&h.column.getCanSort()?(0,o.jsx)(i.zxk,{"data-testid":"".concat(h.id,"-header-sort"),onClick:h.column.getToggleSortingHandler(),rightIcon:null===(a=C[h.column.getIsSorted()])||void 0===a?void 0:a.icon,title:null!==(d=null===(c=C[h.column.getNextSortingOrder()])||void 0===c?void 0:c.title)&&void 0!==d?d:"Clear sort",variant:"ghost",size:"sm",sx:{...(0,s.J9)("select"===h.column.id),...S},children:(0,f.ie)(h.column.columnDef.header,h.getContext())}):(0,o.jsx)(i.xuv,{"data-testid":"".concat(h.id,"-header"),sx:{...(0,s.J9)("select"===h.column.id)},fontSize:"xs",lineHeight:9,fontWeight:"medium",style:null===(r=h.column.columnDef.meta)||void 0===r?void 0:r.headerProps,children:(0,f.ie)(h.column.columnDef.header,h.getContext())})},k=e=>{var t;let{tableInstance:n,rowActionBar:l,onRowClick:r,getRowIsClickable:s,renderRowTooltipLabel:a,expandedColumns:c,wrappedColumns:d,emptyTableNotice:u}=e,g=e=>s?s(e)?r:void 0:r;return(0,o.jsxs)(i.p3B,{"data-testid":"fidesTable-body",children:[l,n.getRowModel().rows.map(e=>(0,o.jsx)(w,{row:e,onRowClick:g(e.original),renderRowTooltipLabel:a,expandedColumns:c,wrappedColumns:d},e.id)),0===n.getRowModel().rows.length&&!(null===(t=n.getState())||void 0===t?void 0:t.globalFilter)&&u&&(0,o.jsx)(i.Tr,{children:(0,o.jsx)(i.Td,{colSpan:100,children:u})})]})},z=r.memo(k,(e,t)=>e.tableInstance.options.data===t.tableInstance.options.data),R=e=>{let{tableInstance:t,rowActionBar:n,footer:l,onRowClick:a,getRowIsClickable:c,renderRowTooltipLabel:d,emptyTableNotice:u,overflow:g="auto",onSort:h,enableSorting:x=!!h,columnExpandStorageKey:m,columnWrapStorageKey:p}=e,[f,j]=(0,r.useState)(1),[b,w]=(0,v._)(m,[]),[C,S]=(0,v._)(p,[]),R=e=>{w([...b.filter(t=>t.split(s.mb)[0]!==e),"".concat(e).concat(s.mb).concat(f)]),j(f+1)},W=e=>{w([...b.filter(t=>t.split(s.mb)[0]!==e),"".concat(e).concat(s.mb).concat(-1*f)]),j(f+1)},I=(e,t)=>{S(t?[...C,e]:C.filter(t=>t!==e))},T=(0,r.useMemo)(()=>{let e=t.getFlatHeaders(),n={};for(let i=0;i<e.length;i+=1){var l,o;let r=e[i],s=!!(null===(l=t.getState().columnSizing)||void 0===l?void 0:l[r.id]),a="auto"===(null===(o=r.column.columnDef.meta)||void 0===o?void 0:o.width);!s&&a?setTimeout(()=>{var e;let l=null===(e=document.getElementById("column-".concat(r.id)))||void 0===e?void 0:e.offsetWidth;l&&(t.setColumnSizing(e=>({...e,[r.id]:l})),n["--header-".concat(r.id,"-size")]=l,n["--col-".concat(r.column.id,"-size")]=l)}):(n["--header-".concat(r.id,"-size")]=r.getSize(),n["--col-".concat(r.column.id,"-size")]=r.column.getSize())}return n},[t.getState().columnSizingInfo]);return(0,r.useEffect)(()=>{h&&h(t.getState().sorting[0])},[t.getState().sorting]),(0,o.jsx)(i.xJi,{"data-testid":"fidesTable",overflowY:g,overflowX:g,borderColor:"gray.200",borderBottomWidth:"1px",borderRightWidth:"1px",borderLeftWidth:"1px",children:(0,o.jsxs)(i.iA_,{variant:"unstyled",style:{borderCollapse:"separate",borderSpacing:0,...T,minWidth:"100%"},children:[(0,o.jsx)(i.hrZ,{position:"sticky",top:"0",height:"36px",zIndex:10,backgroundColor:"gray.50",children:t.getHeaderGroups().map(e=>(0,o.jsx)(i.Tr,{height:"inherit",children:e.headers.map(e=>{var t;let n=(0,s.tt)(e.id,b);return(0,o.jsxs)(i.Th,{borderColor:"gray.200",borderTopWidth:"1px",borderBottomWidth:"1px",borderRightWidth:"1px",_last:{borderRightWidth:0},colSpan:e.colSpan,"data-testid":"column-".concat(e.id),id:"column-".concat(e.id),sx:{padding:0,width:"calc(var(--header-".concat(e.id,"-size) * 1px)"),overflowX:"auto"},textTransform:"unset",position:"relative",_hover:{"& .resizer":{opacity:1}},...null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.cellProps,children:[(0,o.jsx)(y,{header:e,onGroupAll:W,onExpandAll:R,onWrapToggle:I,isExpandAll:!!n&&n>0,isWrapped:!!C.find(t=>e.id===t),enableSorting:x}),e.column.getCanResize()?(0,o.jsx)(i.xuv,{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),position:"absolute",height:"100%",top:"0",right:"0",width:"5px",cursor:"col-resize",userSelect:"none",className:"resizer",opacity:0,backgroundColor:e.column.getIsResizing()?"complimentary.500":"gray.200"}):null]},e.id)})},e.id))}),t.getState().columnSizingInfo.isResizingColumn?(0,o.jsx)(z,{tableInstance:t,rowActionBar:n,onRowClick:a,getRowIsClickable:c,renderRowTooltipLabel:d,expandedColumns:b,wrappedColumns:C,emptyTableNotice:u}):(0,o.jsx)(k,{tableInstance:t,rowActionBar:n,onRowClick:a,getRowIsClickable:c,renderRowTooltipLabel:d,expandedColumns:b,wrappedColumns:C,emptyTableNotice:u}),l]})})},W=e=>{let{totalColumns:t,children:n}=e;return(0,o.jsx)(i.$RU,{backgroundColor:"gray.50",children:(0,o.jsx)(i.Tr,{children:(0,o.jsx)(i.Td,{colSpan:t,px:4,py:2,borderTop:"1px solid",borderColor:"gray.200",children:n})})})};var I=n(86780),T=n(16394);let D=e=>{let{globalFilter:t,setGlobalFilter:n,placeholder:l,testid:s="global-text-filter"}=e,[a,c]=(0,r.useState)(t),d=(0,r.useMemo)(()=>(0,T.Ds)(n,200),[n]),u=(0,r.useCallback)(()=>{c(void 0),n(void 0)},[c,n]);return(0,r.useEffect)(()=>{a||u()},[a,u]),(0,o.jsx)(i.xuv,{maxWidth:"424px",width:"100%",children:(0,o.jsx)(I.Z,{onChange:e=>{c(e),d(e)},onClear:u,search:a||"",placeholder:l,"data-testid":s})})};var A=n(42904),N=n(3124),O=n.n(N);let _=e=>{let{tableInstance:t,selectedRows:n,isOpen:l}=e;return l?(0,o.jsx)(i.Tr,{position:"sticky",zIndex:"10",top:"36px",backgroundColor:"neutral.100",height:"36px",p:0,boxShadow:"0px 4px 6px -1px rgba(0, 0, 0, 0.05)",children:(0,o.jsx)(i.Td,{borderWidth:"1px",borderColor:"gray.200",height:"inherit",pl:4,pr:2,py:0,colSpan:t.getAllColumns().length,bgColor:O().FIDESUI_FULL_WHITE,children:(0,o.jsxs)(i.Ugi,{children:[(0,o.jsxs)(i.xvT,{"data-testid":"selected-row-count",fontSize:"xs",children:[n.toLocaleString("en")," row(s) selected."]}),t.getIsAllRowsSelected()?null:(0,o.jsxs)(i.wpx,{"data-testid":"select-all-rows-btn",onClick:()=>{t.toggleAllRowsSelected()},type:"link",size:"small",className:"text-xs font-normal text-black underline",children:["Select all ",t.getFilteredRowModel().rows.length," rows."]})]})})}):null},H=e=>{let{children:t,...n}=e;return(0,o.jsx)(i.Ugi,{justifyContent:"space-between",alignItems:"center",p:2,borderWidth:"1px",borderBottomWidth:"0px",borderColor:"gray.200",zIndex:11,...n,children:t})},P=e=>{let{rowHeight:t,numRows:n}=e,l=[];for(let e=0;e<n;e+=1)l.push((0,o.jsx)(i.OdW,{height:"".concat(t,"px")},e));return(0,o.jsx)(i.Kqy,{children:l})}},43862:function(e,t,n){n.d(t,{AH:function(){return c},J9:function(){return s},mb:function(){return r},tt:function(){return a}});var l=n(77181),o=n(98784),i=n.n(o);let r="::",s=e=>e?{padding:"0px"}:{paddingLeft:l.rSc.space[3],paddingRight:"calc(".concat(l.rSc.space[3]," - 5px)"),paddingTop:"0px",paddingBottom:"0px",borderRadius:"0px"},a=(e,t)=>{let n=t.find(t=>t.startsWith(e));return n?parseInt(n.split(r)[1],10):void 0},c=e=>{let{columnId:t,columnNameMap:n}=e;if(!t)return"";let l=t.replace(/^(system_|privacy_declaration_)/,""),o=i().upperFirst(l.replaceAll("_"," "));return(null==n?void 0:n[t])||o}},46628:function(e,t,n){n.d(t,{MA:function(){return s},Vo:function(){return c},t5:function(){return a}});var l=n(24246),o=n(77181);let i=e=>{let{children:t,title:n="Success"}=e;return(0,l.jsxs)(o.xvT,{"data-testid":"toast-success-msg",children:[(0,l.jsxs)("strong",{children:[n,":"]})," ",t]})},r=e=>{let{children:t}=e;return(0,l.jsxs)(o.xvT,{"data-testid":"toast-error-msg",children:[(0,l.jsx)("strong",{children:"Error:"})," ",t]})},s={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},a=(e,t)=>{let n=(0,l.jsx)(i,{title:t,children:e});return{...s,description:n}},c=e=>{let t=(0,l.jsx)(r,{children:e});return{...s,description:t,status:"error"}}},19043:function(e,t,n){n.d(t,{Bw:function(){return r},D4:function(){return o},Dy:function(){return a},XD:function(){return c},cz:function(){return d},hE:function(){return s},oK:function(){return i}});var l=n(76649);let o=e=>"error"in e,i=e=>(0,l.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,r=e=>(0,l.Ln)({status:"number",data:{}},e),s=e=>(0,l.Ln)({detail:"string"},e),a=e=>(0,l.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,l.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,l.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5102],{29850:function(e,s,t){"use strict";t.d(s,{R:function(){return c}});var i=t(24246),n=t(77181),a=t(27378),l=t(65450);let r=e=>{let{children:s,className:t,style:a,...l}=e;return(0,i.jsx)(n.wpx,{...l,type:"text",className:"w-full justify-start ".concat(t),style:{fontWeight:600,padding:"var(--ant-select-option-padding)",backgroundColor:"var(--ant-select-option-selected-bg)",...a},children:s})};var o=t(16394);let d=(e,s)=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r,{onClick:s,"data-testid":"add-new-system",id:"add-new-system",children:"Add new system +"}),e]}),c=e=>{var s;let{onAddSystem:t,...r}=e,[c,m]=(0,a.useState)(),{data:u,isFetching:h}=(0,l.xF)({page:1,size:25,search:c||void 0}),p=null==u?void 0:null===(s=u.items)||void 0===s?void 0:s.map(e=>({value:e.fides_key,label:e.name})),y=(0,a.useCallback)(e=>{(null==e?void 0:e.length)>1&&m(e),(null==e?void 0:e.length)===0&&m(void 0)},[m]),x=(0,a.useMemo)(()=>(0,o.Ds)(y,300),[y]);return(0,i.jsx)(n.WPr,{placeholder:"Search...","aria-label":"Search for a system to select",dropdownStyle:{minWidth:"500px"},dropdownRender:t?e=>d(e,t):void 0,"data-testid":"system-select",...r,filterOption:!1,options:p,onSearch:x,loading:r.loading||h})}},79283:function(e,s,t){"use strict";t.d(s,{l:function(){return o}});var i=t(24246),n=t(77181),a=t(72707),l=t.n(a);let r=e=>{let{data:s}=e;return(0,i.jsxs)(n.jqI,{gap:12,title:"".concat(s.primaryName||"").concat(s.primaryName?": ":"").concat(s.name," - ").concat(s.description),children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("strong",{children:s.primaryName||s.name}),s.primaryName&&": ".concat(s.name)]}),(0,i.jsx)("em",{children:s.description})]})},o=e=>{let{options:s,...t}=e,a=null==s?void 0:s.map(e=>({...e,className:l().option}));return(0,i.jsx)(n.WPr,{options:a,autoFocus:!0,variant:"borderless",optionRender:r,dropdownStyle:{minWidth:"500px"},className:"w-full p-0","data-testid":"taxonomy-select",...t})}},70682:function(e,s,t){"use strict";var i=t(24246),n=t(79283),a=t(34929),l=t(78238);s.Z=e=>{let{selectedTaxonomies:s,...t}=e,{getDataUseDisplayNameProps:r,getDataUses:o}=(0,a.Z)(),d=o().filter(e=>e.active&&l.g.includes(e.fides_key)).map(e=>{let{name:s,primaryName:t}=r(e.fides_key);return{value:e.fides_key,name:s,primaryName:t,description:e.description||""}});return(0,i.jsx)(n.l,{options:d,...t})}},26183:function(e,s,t){"use strict";var i=t(24246);t(27378),s.Z=e=>{let{children:s,className:t,...n}=e;return(0,i.jsx)("div",{className:"relative flex w-full flex-wrap items-center gap-2 overflow-x-auto py-2 ".concat(t||""),...n,children:s})}},77685:function(e,s,t){"use strict";t.d(s,{i:function(){return S}});var i=t(24246),n=t(77181),a=t(34090),l=t(27378),r=t(55484),o=t(16134),d=t(25980),c=t(97181),m=t(40324),u=t(812),h=t(14047),p=t(45938),y=t(8133),x=t(33335),f=t(32885),v=t(57865),g=t(93237),j=t(65450),b=t(36345);let{Text:w}=n.AntTypography,_={name:"",vendor_id:void 0,description:"",tags:[]},S=e=>{let{onSuccessfulSubmit:s,toastOnSuccess:t,...S}=e,[k,C]=(0,l.useState)(!1),N=(0,o.T)(),{tcf:I,dictionaryService:R}=(0,d.hz)(),{isLoading:q}=(0,f.Rd)(void 0,{skip:!R}),z=(0,o.C)(f.o),F=(0,o.C)(v.gU),[W]=(0,j.in)(),[Z]=(0,f.Qk)(),[B]=(0,j.f7)(),{successAlert:D,errorAlert:E}=(0,h.V)(),{setSuggestions:T,setLockedForGVL:U}=v.dictSuggestionsSlice.actions,A=(0,l.useRef)(null),V=(0,l.useMemo)(()=>r.Ry().shape({name:r.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await W({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(s=>s.name===e).some(s=>s.name===e)||s.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})})}),[W]),Y=e=>{if(R){if(!e){N(T("hiding")),N(U(!1));return}N(T("showing")),I&&(0,u.cj)(e)===u.c6.GVL?N(U(!0)):N(U(!1))}},G=()=>{S.onClose(),N(T("initial")),N(U(!1))},P=async e=>{if(C(!0),e.vendor_id){let i=await Z([e.vendor_id]);if((0,u.D4)(i))E((0,u.e$)(i.error));else{let{data:e}=i,n=e.systems[0];null==s||s(n.fides_key,n.name),t&&D("".concat(e.name," has been added to your system inventory."))}}else{let i={...e,fides_key:(0,x.E)(e.name),system_type:"",body:"",privacy_declarations:[]},n=await B(i);if((0,u.D4)(n))E((0,u.e$)(n.error));else{let{fides_key:i,name:a}=n.data;null==s||s(i,a),t&&D("".concat(e.name," has been added to your system inventory."))}G()}C(!1)};return(0,i.jsx)(y.Z,{title:"Add New System",...S,onClose:G,children:(0,i.jsx)(a.J9,{initialValues:_,onSubmit:P,validationSchema:V,innerRef:A,children:e=>{let{dirty:s,isValid:t}=e;return(0,i.jsxs)(a.l0,{children:[(0,i.jsx)(p.Gt,{id:"new-system-modal",name:"Add New System"}),(0,i.jsxs)(n.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,i.jsx)(w,{children:"Fides will add this system to your inventory and configure it for consent using the categories of consent listed below. Optionally, you can check if this system is listed within the Fides compass library by selecting the compass icon below."}),R?(0,i.jsx)(b.Z,{label:"System name",options:z,onVendorSelected:Y,isCreate:!0,lockedForGVL:F,isLoading:q}):(0,i.jsx)(m.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}),(0,i.jsx)(g.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:F}),(0,i.jsx)(c.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:F})]}),(0,i.jsxs)(n.jqI,{justify:"space-between",children:[(0,i.jsx)(n.wpx,{htmlType:"reset",onClick:G,disabled:q||!s||!t,"data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:q||!s||!t,loading:k,"data-testid":"save-btn",children:"Save"})]})]})}})})}},93237:function(e,s,t){"use strict";t.d(s,{Sv:function(){return p},Yb:function(){return h},dQ:function(){return y},lm:function(){return x}});var i=t(24246),n=t(77181),a=t(34090),l=t(27378),r=t(16134),o=t(40324),d=t(91613),c=t(32885),m=t(57865);let u=(e,s,t)=>{var i,n;let[o,d,{setValue:u,setTouched:h}]=(0,a.U$)({name:e,type:t||void 0}),p=!!(d.touched&&d.error),{error:y}=d,x={...o,value:null!==(i=o.value)&&void 0!==i?i:""},[f,v]=(0,l.useState)(null!==(n=x.value)&&void 0!==n?n:""),{values:g}=(0,a.u6)(),{vendor_id:j}=g,b=(0,r.C)((0,c.$e)(j||"")),w=(0,r.C)(m.bN),_=(0,l.useRef)();return(0,l.useEffect)(()=>{"showing"===w&&v(x.value)},[w,v]),(0,l.useEffect)(()=>{if("showing"===w&&b){let t=s?s(b):b[e];x.value!==t&&(u(t),setTimeout(()=>{var e;h(!0),null===(e=_.current)||void 0===e||e.blur()},300))}},[w,u,b,_.current]),(0,l.useEffect)(()=>{"hiding"===w&&u(f)},[w,u,f]),{field:x,isInvalid:p,isShowingSuggestions:w,error:y,inputRef:_}},h=e=>{let{label:s,tooltip:t,disabled:a,isRequired:l=!1,dictField:r,name:c,placeholder:m,id:h}=e,{field:p,isInvalid:y,isShowingSuggestions:x,error:f,inputRef:v}=u(c,r);return(0,i.jsx)(n.NIc,{isInvalid:y,isRequired:l,children:(0,i.jsxs)(n.gCW,{alignItems:"start",children:[(0,i.jsxs)(n.kCb,{alignItems:"center",children:[(0,i.jsx)(o.__,{htmlFor:h||c,fontSize:"xs",my:0,mr:1,children:s}),t?(0,i.jsx)(d.Z,{label:t}):null]}),(0,i.jsx)(o.oi,{...p,ref:v,isRequired:l,isDisabled:a,"data-testid":"input-".concat(p.name),placeholder:m,isPassword:!1,color:"showing"===x?"complimentary.500":"gray.800"}),(0,i.jsx)(o.Bc,{isInvalid:y,message:f,fieldName:p.name})]})})},p=e=>{let{label:s,tooltip:t,disabled:a,isRequired:l=!1,dictField:r,name:c,id:m}=e,{field:h,isInvalid:p,isShowingSuggestions:y,error:x}=u(c,r);return(0,i.jsx)(n.NIc,{isInvalid:p,isRequired:l,children:(0,i.jsxs)(n.gCW,{alignItems:"start",children:[(0,i.jsxs)(n.kCb,{alignItems:"center",children:[(0,i.jsx)(o.__,{htmlFor:m||c,fontSize:"xs",my:0,mr:1,children:s}),t?(0,i.jsx)(d.Z,{label:t}):null]}),(0,i.jsx)(n.gxH,{...h,size:"sm","data-testid":"input-".concat(h.name),focusBorderColor:"primary.600",color:"showing"===y?"complimentary.500":"gray.800",isDisabled:a}),(0,i.jsx)(o.Bc,{isInvalid:p,message:x,fieldName:h.name})]})})},y=e=>{let{label:s,tooltip:t,dictField:l,name:r,id:c,disabled:m}=e,{field:h,isInvalid:p,error:y}=u(r,l,"checkbox");return(0,i.jsxs)(n.NIc,{isInvalid:p,width:"full",children:[(0,i.jsxs)(n.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(n.Ugi,{spacing:1,children:[(0,i.jsx)(o.__,{htmlFor:c||r,fontSize:"xs",my:0,mr:0,children:s}),t?(0,i.jsx)(d.Z,{label:t}):null]}),(0,i.jsx)(n.Ugi,{children:(0,i.jsx)(a.gN,{name:h.name,children:e=>{let{form:{setFieldValue:s}}=e;return(0,i.jsx)(n.rAg,{checked:h.checked,onChange:e=>{s(h.name,e)},disabled:m,className:"mr-2","data-testid":"input-".concat(h.name),size:"small"})}})})]}),(0,i.jsx)(o.Bc,{isInvalid:p,message:y,fieldName:h.name})]})},x=e=>{let{label:s,tooltip:t,dictField:l,name:r,id:c,disabled:m}=e,{field:h,isInvalid:p,error:y,isShowingSuggestions:x}=u(r,l,"numeric"),{setFieldValue:f}=(0,a.u6)();return(0,i.jsxs)(n.NIc,{isInvalid:p,width:"full",children:[(0,i.jsxs)(n.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(n.Ugi,{spacing:1,children:[(0,i.jsx)(o.__,{htmlFor:c||r,fontSize:"xs",my:0,mr:0,children:s}),t?(0,i.jsx)(d.Z,{label:t}):null]}),(0,i.jsx)(n.Ugi,{children:(0,i.jsxs)(n.Y2U,{value:h.value,name:h.name,size:"xs",onBlur:h.onBlur,onChange:e=>{f(h.name,e)},w:"100%",colorScheme:"terracotta",inputMode:"numeric","data-testid":"input-".concat(h.name),color:"showing"===x?"complimentary.500":"gray.800",focusBorderColor:"primary.600",isDisabled:m,children:[(0,i.jsx)(n.zuI,{}),(0,i.jsxs)(n.FiK,{children:[(0,i.jsx)(n.WQu,{}),(0,i.jsx)(n.Y_d,{})]})]})})]}),(0,i.jsx)(o.Bc,{isInvalid:p,message:y,fieldName:h.name})]})}},72707:function(e){e.exports={option:"TaxonomySelect_option__vY6v2"}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5480],{95492:function(e,t,n){n.d(t,{l:function(){return i}});var r=n(24246);let i=(0,n(77181).IUT)({displayName:"TrashCanSolidIcon",viewBox:"0 0 12 15",path:(0,r.jsx)("path",{d:"M8.37857 1.18083C8.23393 0.892838 7.93661 0.710938 7.6125 0.710938H4.3875C4.06339 0.710938 3.76607 0.892838 3.62143 1.18083L3.42857 1.56094H0.857143C0.383036 1.56094 -1.19209e-07 1.94158 -1.19209e-07 2.41094C-1.19209e-07 2.8803 0.383036 3.26094 0.857143 3.26094H11.1429C11.6162 3.26094 12 2.8803 12 2.41094C12 1.94158 11.6162 1.56094 11.1429 1.56094H8.57143L8.37857 1.18083ZM11.167 4.11094H0.857143V12.6109C0.857143 13.5486 1.62589 14.3109 2.57143 14.3109H9.45268C10.3754 14.3109 11.167 13.5486 11.167 12.6109V4.11094ZM9.02411 6.23594V12.1859C9.02411 12.4197 8.80714 12.6109 8.59554 12.6109C8.33571 12.6109 8.16696 12.4197 8.16696 12.1859V6.23594C8.16696 6.00219 8.33571 5.81094 8.59554 5.81094C8.80714 5.81094 9.02411 6.00219 9.02411 6.23594ZM6.45268 6.23594V12.1859C6.45268 12.4197 6.23571 12.6109 6.02411 12.6109C5.76429 12.6109 5.57143 12.4197 5.57143 12.1859V6.23594C5.57143 6.00219 5.76429 5.81094 6.02411 5.81094C6.23571 5.81094 6.45268 6.00219 6.45268 6.23594ZM3.85714 6.23594V12.1859C3.85714 12.4197 3.66429 12.6109 3.42857 12.6109C3.19286 12.6109 3 12.4197 3 12.1859V6.23594C3 6.00219 3.19286 5.81094 3.42857 5.81094C3.66429 5.81094 3.85714 6.00219 3.85714 6.23594Z",fill:"currentColor"})})},77213:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(24246),i=n(77181),s=n(88038),a=n.n(s),o=n(86677);n(27378);var l=n(25980),c=n(90867),u=n(77830),d=()=>{let e=(0,o.useRouter)();return(0,r.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(i.xuv,{children:[(0,r.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(i.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,r.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:n,padded:s=!0,mainProps:u}=e,p=(0,l.hz)(),f=(0,o.useRouter)(),m="/privacy-requests"===f.pathname||"/datastore-connection"===f.pathname,h=!(p.flags.privacyRequestsConfiguration&&m),{data:x}=(0,c.JE)(void 0,{skip:h}),{data:g}=(0,c.PW)(void 0,{skip:h}),v=p.flags.privacyRequestsConfiguration&&(!x||!g)&&m;return(0,r.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,r.jsxs)(a(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(i.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[v?(0,r.jsx)(d,{}):null,t]})]})}},58754:function(e,t,n){var r=n(24246),i=n(77181),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:c,...u}=e;return(0,r.jsxs)("div",{...u,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,r.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(i.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,r.jsx)(s.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,t,n){n.d(t,{Tg:function(){return a}});var r=n(24246),i=n(16134),s=n(31793);let a=e=>(0,i.C)(s.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,r.jsx)(r.Fragment,{children:n}):null}},86780:function(e,t,n){var r=n(24246),i=n(77181);t.Z=e=>{let{search:t,onChange:n,withIcon:s,onClear:a,placeholder:o,...l}=e;return(0,r.jsxs)(i.vyj.Compact,{className:"w-96","data-testid":"search-bar",children:[(0,r.jsx)(i.uFc,{autoComplete:"off",value:t,onChange:e=>n(e.target.value),placeholder:o||"Search...",prefix:s?(0,r.jsx)(i.PTu,{boxSize:4}):void 0,...l}),a?(0,r.jsx)(i.wpx,{onClick:a,children:"Clear"}):null]})}},812:function(e,t,n){n.d(t,{D4:function(){return s.D4},MM:function(){return p},Ot:function(){return c},c6:function(){return i},cj:function(){return m},e$:function(){return o},fn:function(){return l},iC:function(){return f},nU:function(){return d},tB:function(){return u}});var r,i,s=n(19043);let a="An unexpected error occurred. Please try again.",o=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 n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,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 l(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=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:n}=e;return{status:n,message:o(e,t.message)}}return t},p=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(r=i||(i={})).GVL="gvl",r.AC="gacp",r.COMPASS="compass";let f={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},m=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},70788:function(e,t,n){n.d(t,{m:function(){return c}});var r=n(24246),i=n(77181),s=n(79894),a=n.n(s),o=n(27378);let{Text:l}=i.AntTypography,c=e=>{let{items:t,...n}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,o={...e},c=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:o.title})),c)?o.title=(0,r.jsx)(i.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,r.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,r.jsx)(i.zrq,{items:s,...n})}},46628:function(e,t,n){n.d(t,{MA:function(){return o},Vo:function(){return c},t5:function(){return l}});var r=n(24246),i=n(77181);let s=e=>{let{children:t,title:n="Success"}=e;return(0,r.jsxs)(i.xvT,{"data-testid":"toast-success-msg",children:[(0,r.jsxs)("strong",{children:[n,":"]})," ",t]})},a=e=>{let{children:t}=e;return(0,r.jsxs)(i.xvT,{"data-testid":"toast-error-msg",children:[(0,r.jsx)("strong",{children:"Error:"})," ",t]})},o={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},l=(e,t)=>{let n=(0,r.jsx)(s,{title:t,children:e});return{...o,description:n}},c=e=>{let t=(0,r.jsx)(a,{children:e});return{...o,description:t,status:"error"}}},61038:function(e,t,n){var r=n(24246),i=n(77181),s=n(34090),a=n(86677);n(27378);var o=n(55484),l=n(16134),c=n(40324),u=n(812),d=n(77830),p=n(46628),f=n(65497);let m={username:"",usernameConfirmation:""},h=e=>{let{id:t,username:n,onClose:r}=e,s=(0,i.pmc)(),c=(0,a.useRouter)(),m=(0,l.T)(),[h]=(0,f.I1)();return{handleDeleteUser:async()=>{let e=await h(t);(0,u.D4)(e)?s((0,p.Vo)((0,u.e$)(e.error))):(s((0,p.t5)("Successfully deleted user")),r()),m((0,f.Vv)(void 0)),c.push(d.e3)},validationSchema:o.Ry().shape({usernameConfirmation:o.Z_().required().oneOf([n],"Confirmation input must match the username").label("Username confirmation")})}};t.Z=e=>{let{user:t,...n}=e,{isOpen:a,onClose:o}=n,{handleDeleteUser:l,validationSchema:u}=h({id:t.id,username:t.username,onClose:o});return(0,r.jsxs)(i.u_l,{isCentered:!0,isOpen:a,onClose:o,children:[(0,r.jsx)(i.ZAr,{}),(0,r.jsx)(i.hzk,{"data-testid":"delete-user-modal",children:(0,r.jsx)(s.J9,{initialValues:m,validationSchema:u,onSubmit:l,children:e=>{let{isSubmitting:n,dirty:a,isValid:l}=e;return(0,r.jsxs)(s.l0,{children:[(0,r.jsx)(i.xBx,{children:"Delete User"}),(0,r.jsx)(i.olH,{}),(0,r.jsxs)(i.fef,{children:[(0,r.jsxs)(i.bZj,{status:"warning",overflow:"visible",colorScheme:"warn",marginBottom:4,children:[(0,r.jsx)(i.zMQ,{}),(0,r.jsxs)(i.XaZ,{children:[(0,r.jsx)(i.xvT,{as:"span",mb:2,children:"You are about to delete the user\xa0"}),(0,r.jsxs)(i.xvT,{as:"span",mb:2,fontStyle:"italic",fontWeight:"semibold",children:[t.username,"."]}),(0,r.jsx)(i.xvT,{mb:2,children:"This action cannot be undone. To confirm, please enter the user’s username below."})]})]}),(0,r.jsx)(i.Kqy,{direction:"column",spacing:4,children:(0,r.jsx)(c.j0,{name:"usernameConfirmation",label:"Confirm username",placeholder:"Type the username to delete"})})]}),(0,r.jsx)(i.mzw,{children:(0,r.jsxs)("div",{className:"flex w-full gap-2",children:[(0,r.jsx)(i.wpx,{onClick:o,className:"w-1/2",children:"Cancel"}),(0,r.jsx)(i.wpx,{type:"primary",disabled:!a||!l,loading:n,htmlType:"submit",className:"w-1/2","data-testid":"submit-btn",children:"Delete User"})]})})]})}})})]})}},91437:function(e,t,n){n.d(t,{K:function(){return i}});var r=n(16643);let i=[{label:"Owner",permissions_label:"Owner",roleKey:r.A7.OWNER,description:"Owners have view and edit access to the whole organization and can create new users"},{label:"Contributor",permissions_label:"Contributor",roleKey:r.A7.CONTRIBUTOR,description:"Contributors can create new users and have view and edit access to the whole organization. Contributors cannot configure storage and messaging services"},{label:"Viewer",permissions_label:"Viewer",roleKey:r.A7.VIEWER,description:"Viewers have view access to the Data Map and all systems"},{label:"Viewer & Approver",permissions_label:"Viewer & Approver",roleKey:r.A7.VIEWER_AND_APPROVER,description:"Viewer & Approvers have view access to the Data Map but can also manage Privacy Requests"},{label:"Approver",permissions_label:"Approver",roleKey:r.A7.APPROVER,description:"Approvers can only access the Privacy Requests portal to manage requests"}]},19043:function(e,t,n){n.d(t,{Bw:function(){return a},D4:function(){return i},Dy:function(){return l},XD:function(){return c},cz:function(){return u},hE:function(){return o},oK:function(){return s}});var r=n(76649);let i=e=>"error"in e,s=e=>(0,r.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,r.Ln)({status:"number",data:{}},e),o=e=>(0,r.Ln)({detail:"string"},e),l=e=>(0,r.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,r.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,r.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){n.d(t,{Ln:function(){return r}});let r=(e,t)=>s(e,t),i=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?i 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,n])=>s(n,t[e]));class a{static narrow(e){return new a(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 a?e.NF:e instanceof Function?e:t=>r(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}}]);
|