ethyca-fides 2.59.1b0__py2.py3-none-any.whl → 2.59.2__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.1b0.dist-info → ethyca_fides-2.59.2.dist-info}/METADATA +1 -1
- {ethyca_fides-2.59.1b0.dist-info → ethyca_fides-2.59.2.dist-info}/RECORD +189 -191
- {ethyca_fides-2.59.1b0.dist-info → ethyca_fides-2.59.2.dist-info}/WHEEL +1 -1
- fides/_version.py +3 -3
- fides/api/models/fides_user.py +1 -0
- fides/api/schemas/connection_configuration/connection_secrets_mysql.py +12 -0
- fides/api/schemas/connection_configuration/connection_secrets_postgres.py +10 -6
- fides/api/schemas/consentable_item.py +5 -8
- fides/api/service/connectors/mysql_connector.py +13 -1
- fides/api/service/connectors/postgres_connector.py +5 -2
- fides/api/service/connectors/saas_connector.py +18 -13
- fides/api/service/saas_request/saas_request_override_factory.py +3 -3
- fides/api/task/graph_task.py +2 -3
- fides/api/util/consent_util.py +10 -4
- fides/api/worker/__init__.py +1 -1
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1376-92890c17ce39ca0d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{146-b573333dcf813bf7.js → 146-d1820217dc36d46d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1817-8d6e6ab36e828808.js → 1817-6abbe957a53026d7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1904-3c40738cb0fd2a7c.js → 1904-281183a117e26585.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{2479-50f431c0e2c0de3c.js → 2479-b4f7a1c7c711cb65.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3244-3d94bf3393366412.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3702-31d37a0217f82615.js → 3702-3d814671c31eaca3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3855-da54ef27afd56c46.js → 3855-237afbbea7f54707.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3872-68b4ceba8f632bc0.js → 3872-c53d74aebd12cfd3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/401-50974f107c2712fc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4060-52fd85fb1e15a2b8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{4121-2221693ced6f48d5.js → 4121-476f657b03a78965.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5480-87a3188b78b9a312.js → 5480-1623dbacdf4e6794.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5487-faec7b0a9c1a6bfa.js → 5487-9a2aecb0ec63d567.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-ae645d0f2db4d579.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{6372-0ca1b9521b5489fd.js → 6372-2aee10b79089521a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6853-2b98c77d4dba5f0c.js → 6853-ca5dacd25c9ccb7c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6954-5d0ba080c64b0613.js → 6954-127745bfdc5bc0b3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7751-09c6424d673d8aa4.js → 7751-3913b8c055f599e5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{79-7ca48fb1a0b52f96.js → 79-77cfed02164241ca.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9572-2b9b10e146130c85.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9767-bf415d0daea960cd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9951-b5574d8d55776674.js → 9951-66aad0602aadfbe2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-e8e6b47bb1ca612d.js → _app-13a604eb8d39dffc.js} +46 -46
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a6926f7ec7ad10cf.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-7eeeee3769e73f78.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-047c409bc5e12d1a.js → privacy-notices-65091908d6296afc.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-7a1976c0d1aca8b6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-75989f9732d90793.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-2364fb0b7afc2fea.js → [systemId]-6b3d1fe762c747d8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-f073ddcfb916988e.js → [monitorId]-61eafb8444bffb76.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-73025c2ac5a00347.js → activity-e7869f658e3017b9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-1681dac780b5e2b5.js → new-5aff1d01c6c30ad6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-48765f9931659a91.js → dataset-f4d57b3432c57112.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-b905c75f68786c2f.js → [id]-b2b1168d0361baa8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-abd92bec98bdbb66.js → new-c804349a417a888b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-52c3f076edb49944.js → datastore-connection-0faa9b3c4555e585.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-1bccf315f995267a.js → index-e72904e316ede1b0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-1da74037257ebf99.js → [id]-17191a759e167ca8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-88e51c81a380ebad.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-694fbad1d2d4a377.js → [id]-54ea39f203182c53.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-354e4a987a9a33f8.js → messaging-d889076067104e56.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-3355b4803b2916f3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-3ac47981f1e2b0aa.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-e997b08e5443b54f.js → datamap-fe743440d7eb007b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-cdc866af93898716.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-a7dc8113067dff42.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-2f03e981234c40ad.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-5bcc7a6976e01a56.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-d5f777510ab8dfd2.js → test-datasets-0b47ff26897c1d9a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-e9a111ef0c32161e.js → systems-820893393f1516ee.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-8fccd670220dbf60.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-32ec340d4b390d07.js → [id]-d527d1d1635541df.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-c8ca51efbeccf39b.js → user-management-facb8c0128a44cb1.js} +1 -1
- fides/ui-build/static/admin/_next/static/css/687135955af5b7e1.css +1 -0
- fides/ui-build/static/admin/_next/static/oBvsYd6XqWoJsAPp6Is3G/_buildManifest.js +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/ant-poc.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/ui-build/static/admin/_next/static/OGVKb3i1XPWBrvgQQ5qrv/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1376-91a284b43977123a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3244-cece6e38a8960e8a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/401-bfa83e49bc03c06d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4060-9e977071b6208def.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-e7a84a15c5be78e6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9572-b467ad2b2d89db86.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-90236662e2c6bc36.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-b228bb9cf7b3d424.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-85ddbe3ae50c7527.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-2590d217bc5c0b11.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-12d245fc44061f51.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-0fd07d6e10a76b5a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-974d8d78797f5c03.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-68987fccdca5dde9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-b6b0428b6dc7b861.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-d4fbf3c81d68fde7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-6c90d06e183f9cf3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-5d9b874473577d94.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-dd0816194c3cc728.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-ac544ba7bc70e458.js +0 -1
- fides/ui-build/static/admin/_next/static/css/72caf4a266697967.css +0 -1
- fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +0 -1
- {ethyca_fides-2.59.1b0.dist-info → ethyca_fides-2.59.2.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.59.1b0.dist-info → ethyca_fides-2.59.2.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.59.1b0.dist-info → ethyca_fides-2.59.2.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1100-cccb1a7af58869d9.js → 1100-45c0634b4f51d10c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3086-ffd15c92ea81b3d6.js → 3086-d1ba90bc6ac9174b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4481-63bd9142df585e72.js → 4481-288d74a33473cff7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5102-0d0ec49589c3ef12.js → 5102-626b9ff42e904276.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5826-226c8843e715b6ad.js → 5826-1f4f74bf3b5348e4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6395-04041b53946664b1.js → 6395-4224d6d26d1e8bb7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8433-71715dfe54561b3d.js → 8433-c4c765833ab9cc07.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8934-87a9e03df05e0c5e.js → 8934-ffa2b0509bc7a845.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9282-23b38e03f897722f.js → 9282-1a48b10b114d01f4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9327-fb7ef941b5176077.js → 9327-4970d356f7000c0b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{404-a3c57a06ff67cf1f.js → 404-29560aa2e6a60963.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-c4c0c42bbe0f5548.js → manual-58e9256e86916ecd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-93907c53f342831f.js → multiple-2392e3a101fae073.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{ant-poc-8fcf312148606e7e.js → ant-poc-404f3c9018952800.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-5e83ee7792c0f75f.js → add-vendors-7dfe37b9f0ff9a3c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-ea7b2c628260c84c.js → configure-dba7848b760ba227.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-9d094097410d60a2.js → [id]-78de4bde88e18b0f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-70243fc6a429e31c.js → [id]-75c2ed6ba3de48cd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-2471cc845f8ce356.js → new-487ae57dc7e2ded2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-893753088b9729a3.js → properties-f67fda6a71d0a46b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-7e5adfec9134a268.js → consent-75395dfc224cf44b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-4b2c10ff79e46e50.js → [projectUrn]-fa65c67ec8c4b5e6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-05bbb01e37766b80.js → projects-e76a07ee6ee8d55f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-cf48ed7dc04c3af2.js → action-center-38476c697da53480.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-6c63a6295668ed4e.js → datamap-423172d31de8e9c6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-7a99a6c5c2fc2abe.js → [...subfieldNames]-704553f5329fb9d4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-39aab1de4df0660d.js → [collectionName]-06c19dca941edb14.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-2cf04998a7521a7d.js → [datasetId]-eac517f43d5f53a8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-8950b4aff799099c.js → [id]-66f5fbadd8455805.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-4cad85d5b6d52734.js → add-template-d441abb1f045940f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-57c7aa44af163623.js → messaging-eef56c95b08aa24c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-d8d23d06ce1d9dae.js → configure-b8c94b10ab90b061.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-6cca2c8ebbff78aa.js → [id]-f4fb941df069b7bf.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-f09f98007725fa51.js → add-property-bccb6ffab25aa214.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-9034bab3d7200d9b.js → properties-9a7ac623370b7c00.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-92dada8329e89092.js → about-4412a7b468b6d4bf.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-368a4183139ea5e0.js → domain-records-d9088f5cd9fb2822.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-ea2503158203bb88.js → email-templates-cf09ad896c7396a6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-18f56b6b76abb71d.js → locations-759564ca0ae62840.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-0350314337abff11.js → regulations-2dce4501fca920b3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-022910a52efbad76.js → [id]-dd053a3bf2a9ca6c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{webpack-819f2a98dbba6502.js → webpack-03e375f6d6b2c71b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/{OGVKb3i1XPWBrvgQQ5qrv → oBvsYd6XqWoJsAPp6Is3G}/_ssgManifest.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1817],{11817:function(e,n,i){i.d(n,{Z:function(){return U}});var t=i(24246),a=i(77181),o=i(34090),l=i(86677),r=i(27378),s=i(55484),d=i(16134),c=i(812);let p=(0,a.IUT)({displayName:"DesktopIcon",viewBox:"0 0 24 24",path:(0,t.jsx)("path",{fill:"currentColor",d:"M20.5556 4.05556H3.44444C3.10833 4.05556 2.83333 4.33056 2.83333 4.66667V12H21.1667V4.66667C21.1667 4.33056 20.8917 4.05556 20.5556 4.05556ZM23 12V13.8333V15.6667C23 17.0149 21.9038 18.1111 20.5556 18.1111H14.9142L15.2198 19.9445H17.1944C17.7024 19.9445 18.1111 20.3531 18.1111 20.8611C18.1111 21.3691 17.7024 21.7778 17.1944 21.7778H14.4444H9.55556H6.80556C6.29757 21.7778 5.88889 21.3691 5.88889 20.8611C5.88889 20.3531 6.29757 19.9445 6.80556 19.9445H8.78021L9.08576 18.1111H3.44444C2.09618 18.1111 1 17.0149 1 15.6667V13.8333V12V4.66667C1 3.31841 2.09618 2.22223 3.44444 2.22223H20.5556C21.9038 2.22223 23 3.31841 23 4.66667V12ZM2.83333 13.8333V15.6667C2.83333 16.0028 3.10833 16.2778 3.44444 16.2778H10.1476C10.159 16.2778 10.1705 16.2778 10.1781 16.2778H13.8142C13.8257 16.2778 13.8372 16.2778 13.8448 16.2778H20.5556C20.8917 16.2778 21.1667 16.0028 21.1667 15.6667V13.8333H2.83333ZM10.6365 19.9445H13.3597L13.0542 18.1111H10.942L10.6365 19.9445Z"})}),u=(0,a.IUT)({displayName:"MobileIcon",viewBox:"0 0 24 24",path:(0,t.jsx)("path",{fill:"currentColor",d:"M6.5 20.25C6.5 20.6281 6.80938 20.9375 7.1875 20.9375H16.8125C17.1906 20.9375 17.5 20.6281 17.5 20.25V16.8125H6.5V20.25ZM6.5 14.75H17.5V3.75C17.5 3.37188 17.1906 3.0625 16.8125 3.0625H7.1875C6.80938 3.0625 6.5 3.37188 6.5 3.75V14.75ZM4.4375 3.75C4.4375 2.2332 5.6707 1 7.1875 1H16.8125C18.3293 1 19.5625 2.2332 19.5625 3.75V20.25C19.5625 21.7668 18.3293 23 16.8125 23H7.1875C5.6707 23 4.4375 21.7668 4.4375 20.25V3.75ZM12 17.8438C12.2735 17.8438 12.5358 17.9524 12.7292 18.1458C12.9226 18.3392 13.0312 18.6015 13.0312 18.875C13.0312 19.1485 12.9226 19.4108 12.7292 19.6042C12.5358 19.7976 12.2735 19.9062 12 19.9062C11.7265 19.9062 11.4642 19.7976 11.2708 19.6042C11.0774 19.4108 10.9688 19.1485 10.9688 18.875C10.9688 18.6015 11.0774 18.3392 11.2708 18.1458C11.4642 17.9524 11.7265 17.8438 12 17.8438Z"})});var v=i(77830),m=i(46628),_=i(7426),f=i(60325);let b={language:{label:"Language",validation:s.Z_()},title:{label:"Title",validation:s.Z_()},description:{label:"Description",validation:s.Z_()},accept_button_label:{label:"Accept button label",validation:s.Z_()},reject_button_label:{label:"Reject button label",validation:s.Z_()},save_button_label:{label:"Save button label",validation:s.Z_()},acknowledge_button_label:{label:"Acknowledge button label",validation:s.Z_()},privacy_policy_url:{label:"Privacy policy URL",validation:s.Z_().url()},privacy_preferences_link_label:{label:"Privacy preferences link label",validation:s.Z_()},banner_title:{label:"Banner title",validation:s.Z_()},banner_description:{label:"Banner description",validation:s.Z_()},purpose_header:{label:"Purpose header",validation:s.Z_()},privacy_policy_link_label:{label:"Privacy policy link label",validation:s.Z_()},modal_link_label:{label:"Modal link label",validation:s.Z_()},is_default:{label:"Default language",validation:s.O7()}};var g=i(34334),x=i(13083),y=i.n(x),h=i(43218),w=i.n(h),C=i(52253),j=i(16643);let k={language:j.eU.EN,accept_button_label:"Accept",acknowledge_button_label:"OK",banner_description:"",banner_title:"",purpose_header:"",description:"Description",privacy_policy_link_label:"",privacy_policy_url:"",modal_link_label:"",privacy_preferences_link_label:"Privacy preferences",reject_button_label:"Reject All",save_button_label:"Save",title:"Manage your consent preferences",is_default:!0},V=e=>({...k,...e.translations?e.translations[0]:{}}),A=(e,n)=>{var i,t,a,o;let l={options:{allowHTMLDescription:!0,base64Cookie:!1,debug:!1,fidesApiUrl:"http://localhost:8080/api/v1",fidesClearCookie:!0,fidesDisableSaveApi:!0,fidesDisableNoticesServedApi:!0,fidesJsBaseUrl:"",fidesLocale:null===(t=e.translations)||void 0===t?void 0:null===(i=t[0])||void 0===i?void 0:i.language,fidesString:null,geolocationApiUrl:"",isGeolocationEnabled:!1,isOverlayEnabled:!0,isPrefetchEnabled:!1,modalLinkId:null,overlayParentId:C.Vk,preventDismissal:null!==(o=e.dismissable)&&void 0!==o&&o,privacyCenterUrl:"http://localhost:3000",showFidesBrandLink:!0},experience:{available_locales:null===(a=e.translations)||void 0===a?void 0:a.map(e=>e.language),component:e.component,experience_config:{allow_language_selection:!0,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0,component:e.component,disabled:!1,dismissable:e.dismissable,id:"pri_222",is_default:!0,language:"en",layer1_button_options:j.Of.OPT_IN_OPT_OUT,properties:[],regions:["us_ca"],show_layer1_notices:!1,translations:[V(e)]},id:"pri_111",privacy_notices:n,region:"us_ca"},geolocation:{country:"US",location:"US-CA",region:"CA"}};return e.component===j.re.TCF_OVERLAY&&(l.options.fidesTcfGdprApplies=!0,l.options.tcf_enabled=!0,l.geolocation={location:"eea",country:"eea"},l.experience.experience_config.regions=["eea"],l.experience={...l.experience,region:"eea",minimal_tcf:!0,gvl:{vendors:{}},tcf_purpose_names:["Store and/or access information on a device","Use limited data to select advertising","Create profiles for personalised advertising","Use profiles to select personalised advertising","Create profiles to personalise content","Use profiles to select personalised content","Measure advertising performance","Measure content performance","Understand audiences through statistics or combinations of data from different sources","Develop and improve services","Use limited data to select content"]},l.options.apiOptions={getPrivacyExperienceFn:async()=>l.experience}),l},O=e=>{let{language:n,is_default:i,...t}=k,a=Object.keys(t).map(n=>{let i=e[n];return{[n]:void 0!==i?i:k[n]}}).reduce((e,n)=>({...e,...n}),{});return{language:e.language,is_default:e.is_default,...a}};var T=i(74022),E=i(25980),L=i(32222);let Z=e=>{let{title:n,description:i}=e;return(0,t.jsx)(a.jqI,{className:"h-full items-center justify-center",children:(0,t.jsxs)(a.jqI,{className:"items-center gap-2 rounded-md p-6",style:{backgroundColor:T.Z.colors.white,boxShadow:T.Z.shadows.md,maxWidth:512},vertical:!0,"data-testid":"no-preview-notice",children:[(0,t.jsx)(a.xvT,{fontSize:"lg",fontWeight:"500",align:"center",children:n}),(0,t.jsx)(a.xvT,{color:"gray.500",align:"center",children:i})]})})};var N=e=>{let{allPrivacyNotices:n,initialValues:i,translation:l,isMobilePreview:s}=e,{values:d}=(0,o.u6)(),[c,p]=(0,r.useState)([]),u=[j.re.BANNER_AND_MODAL,j.re.MODAL,j.re.TCF_OVERLAY].includes(d.component),{systemsCount:v}=(0,E.hz)();(0,r.useEffect)(()=>{d.privacy_notice_ids?p(d.privacy_notice_ids.map(e=>n.find(n=>(null==n?void 0:n.id)===e)).map(e=>d.component===j.re.TCF_OVERLAY&&void 0!==e?{...e,translations:[{language:"en",text:null==e?void 0:e.name}]}:e).filter(e=>void 0!==e)):p([])},[d.privacy_notice_ids,n,d.component]);let m=(0,r.useMemo)(()=>A(i,c),[i,c]),_=d.component===j.re.TCF_OVERLAY?"/lib/fides-tcf.js":"/lib/fides.js";(0,r.useEffect)(()=>{var e,n;d.component===j.re.MODAL&&(m.experience.experience_config.component=j.re.MODAL);let i=null===(e=d.translations)||void 0===e?void 0:e.find(e=>e.language===(null==l?void 0:l.language));(null===(n=d.translations)||void 0===n?void 0:n.length)&&(i?(m.experience.available_locales=[...m.experience.available_locales||[],i.language],m.experience.experience_config.translations[0]=O(i),m.options.fidesLocale=i.language):d.translations&&(m.experience.experience_config.translations[0]=O(d.translations[0]),m.options.fidesLocale=d.translations[0].language)),m.experience.experience_config.show_layer1_notices=!!(null==c?void 0:c.length)&&!!d.show_layer1_notices,m.experience.experience_config.layer1_button_options=(d.component===j.re.BANNER_AND_MODAL||d.component===j.re.TCF_OVERLAY)&&d.layer1_button_options?d.layer1_button_options:j.Of.OPT_IN_OPT_OUT,m.options.preventDismissal=!d.dismissable,m.experience.vendor_count=v,m.experience.experience_config.component=d.component,window.Fides&&((null==c?void 0:c.length)||d.component===j.re.TCF_OVERLAY)&&u&&window.Fides.init(m)},[d,c,l,m,n,u,v]);let f=document.getElementById("fides-modal");return(f&&f.removeAttribute("tabindex"),d.component)?u?(null==c?void 0:c.length)||d.component===j.re.TCF_OVERLAY?(0,t.jsxs)(a.jqI,{className:"size-full items-center justify-center overflow-scroll",children:[(0,t.jsx)(y(),{id:"4b2ec2183c5a567e",dynamic:[C.Vk,d.component!==j.re.TCF_OVERLAY?"padding-bottom: 45px;":""],children:"div#fides-overlay{z-index:5000!important}div#".concat(C.Vk,"{width:100%;padding-top:45px;").concat(d.component!==j.re.TCF_OVERLAY?"padding-bottom: 45px;":""," margin: auto;pointer-events:none}div#fides-banner-container{position:static!important;-webkit-transform:none!important;-moz-transform:none!important;-ms-transform:none!important;-o-transform:none!important;transform:none!important;-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}div#fides-banner-container.fides-banner-hidden{display:none}.fides-modal-container{background-color:unset!important;position:static!important;display:none!important}.fides-modal-overlay{background-color:inherit!important;position:static!important;display:none!important}div.fides-modal-content{position:relative!important;-webkit-transform:none!important;-moz-transform:none!important;-ms-transform:none!important;-o-transform:none!important;transform:none!important;left:initial!important;top:initial!important}div.fides-modal-footer{width:unset}")}),u?(0,t.jsx)("style",{children:"div#fides-modal {\n display: flex !important;\n justify-content: center;\n background-color: unset;\n ".concat(d.component===j.re.BANNER_AND_MODAL||d.component===j.re.TCF_OVERLAY?"padding-bottom: 3rem;":"","\n }")}):null,s?(0,t.jsx)("style",{children:"\n div#fides-overlay-wrapper {\n max-width: 400px;\n margin: auto;\n }\n div.fides-modal-button-group {\n flex-direction: column !important;\n }\n div#fides-banner {\n padding: 24px;\n width: 100%;\n }\n\n div#fides-banner-description {\n margin-bottom: 0px;\n }\n\n div#fides-banner-inner div#fides-button-group {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n padding-top: 24px;\n }\n\n .fides-banner-button-group {\n flex-direction: column;\n width: 100%;\n }\n\n button.fides-banner-button {\n margin: 0px;\n width: 100%;\n }\n\n div#fides-banner-inner-container {\n display: flex;\n flex-direction: column;\n max-height: 50vh;\n overflow-y: auto;\n scrollbar-gutter: stable;\n }\n\n div#fides-privacy-policy-link {\n order: 1;\n width: 100%;\n }\n .fides-modal-footer {\n max-width: 100%;\n }\n .fides-banner-secondary-actions {\n flex-direction: column-reverse;\n gap: 12px;\n }\n "}):(0,t.jsx)("style",{children:"\n div#fides-banner {\n width: 60%;\n }\n @media (min-width: 768px) {\n div#fides-banner {\n width: 100%;\n }\n }\n @media (min-width: 1155px) {\n div#fides-banner {\n width: 90%;\n }\n }\n @media (min-width: 1440px) {\n div#fides-banner {\n width: 60%;\n }\n }\n "}),(0,t.jsx)(w(),{id:"fides-js-script",src:_,onReady:()=>{if(!window.Fides.experience){var e;null===(e=window.Fides)||void 0===e||e.init(m)}}}),(0,t.jsx)("div",{id:C.Vk,className:y().dynamic([["4b2ec2183c5a567e",[C.Vk,d.component!==j.re.TCF_OVERLAY?"padding-bottom: 45px;":""]]])})]}):(0,t.jsx)(Z,{title:"No privacy notices added",description:'To view a preview of this experience, add a privacy notice under "Privacy Notices" to the left.'}):(0,t.jsx)(Z,{title:"".concat(L.J.get(d.component)," preview not available"),description:"There is no preview available for ".concat(L.J.get(d.component),". You can edit the available settings\n and languages to the left.")}):(0,t.jsx)(Z,{title:"No privacy experience type selected",description:"Please select a privacy experience type to preview."})},D=i(94315),M=i(16194),H=i(16277),R=i(71922),S=i(31883);let P=e=>{let n=(0,f.y3)(e),i={};return Object.entries(n).forEach(e=>{let[n,t]=e;if(t.included){let e=b[n];i[n]=t.required?e.validation.required().label(e.label):e.validation.nullable().label(e.label)}}),s.Ry().shape(i)},F=e=>{let{componentType:n}=e;return P(n)},B=s.Ry().shape({name:s.Z_().required().label("Experience name"),component:s.Z_().required().label("Experience type"),translations:s.IX().when("component",(e,n)=>{let[i]=e;return n.of(F({componentType:i}))})});var U=e=>{var n;let{passedInExperience:i,passedInTranslations:s}=e,[b]=(0,D.mJ)(),[x]=(0,D.$d)(),y=(0,a.pmc)(),[h,w]=(0,r.useState)(!1),C=(0,l.useRouter)(),{data:j}=(0,_.tB)({api_set:!1}),k=null==j?void 0:null===(n=j.plus_consent_settings)||void 0===n?void 0:n.enable_translations,V=(0,d.C)(g.Zp),A=(0,d.C)(g.G1);(0,g.Ah)({page:V,size:A});let O=(0,d.C)(g.fJ),T=(0,d.C)(R.sX),E=i?{...f.DD,...(0,f.Uv)(i)}:f.DD,L=async e=>{var n,t;let a;e.privacy_notice_ids=null===(n=e.privacy_notice_ids)||void 0===n?void 0:n.filter(e=>"tcf_purposes_placeholder"!==e);let o={...e,disabled:null===(t=null==i?void 0:i.disabled)||void 0===t||t,allow_language_selection:e.translations&&e.translations.length>1};if(i){let{component:e,...n}=o;a=await x({...n,id:i.id})}else a=await b(o);(0,S.D4)(a)?y((0,m.Vo)((0,c.e$)(a.error))):(y((0,m.t5)("Privacy experience successfully ".concat(i?"updated":"created"))),C.push(v.w0))},[Z,P]=(0,r.useState)(void 0),[F,U]=(0,r.useState)(!1);return(0,t.jsx)(o.J9,{initialValues:E,enableReinitialize:!0,onSubmit:L,validationSchema:B,children:(0,t.jsx)(o.l0,{style:{height:"100vh"},children:(0,t.jsxs)(a.jqI,{className:"size-full","data-testid":"privacy-experience-detail-page",children:[Z?(0,t.jsx)(H.Z,{translation:Z,translationsEnabled:k,isOOB:F,onReturnToMainForm:()=>{P(void 0),U(!1)}}):(0,t.jsx)(M.d0,{allPrivacyNotices:T,translationsEnabled:k,onSelectTranslation:e=>{P({...e,name:(0,f.Go)(e,O)})},onCreateTranslation:e=>{let n=null==s?void 0:s.find(n=>n.language===e);return n&&U(!0),null!=n?n:{language:e,is_default:!1}}}),(0,t.jsxs)(a.jqI,{vertical:!0,className:"w-full overflow-y-hidden",style:{backgroundColor:a.rSc.colors.gray[50]},children:[(0,t.jsxs)(a.jqI,{className:"flex-row items-center p-4",style:{backgroundColor:a.rSc.colors.white,borderBottom:"1px solid ".concat(a.rSc.colors.gray[100])},children:[(0,t.jsx)(a.xvT,{fontSize:"md",fontWeight:"semibold",children:"PREVIEW"}),(0,t.jsx)(a.LZC,{}),(0,t.jsxs)(a.y02.Group,{onChange:e=>w(e.target.value),defaultValue:!1,children:[(0,t.jsx)(a.y02.Button,{value:!0,title:"View mobile preview",children:(0,t.jsx)(u,{})}),(0,t.jsx)(a.y02.Button,{value:!1,title:"View desktop preview",children:(0,t.jsx)(p,{})})]})]}),(0,t.jsx)(N,{allPrivacyNotices:T,initialValues:E,translation:Z,isMobilePreview:h})]})]})})})}},32222:function(e,n,i){i.d(n,{J:function(){return t}});let t=new Map([["overlay","Overlay"],["privacy_center","Privacy center"],["tcf_overlay","TCF overlay"],["modal","Modal"],["banner_and_modal","Banner and modal"],["headless","Headless"]])},31883:function(e,n,i){i.d(n,{Bw:function(){return t.Bw},D4:function(){return t.D4}});var t=i(19043)}}]);
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1817],{11817:function(e,n,i){i.d(n,{Z:function(){return U}});var t=i(24246),a=i(77181),o=i(34090),l=i(86677),r=i(27378),s=i(55484),d=i(16134),c=i(812);let p=(0,a.IUT)({displayName:"DesktopIcon",viewBox:"0 0 24 24",path:(0,t.jsx)("path",{fill:"currentColor",d:"M20.5556 4.05556H3.44444C3.10833 4.05556 2.83333 4.33056 2.83333 4.66667V12H21.1667V4.66667C21.1667 4.33056 20.8917 4.05556 20.5556 4.05556ZM23 12V13.8333V15.6667C23 17.0149 21.9038 18.1111 20.5556 18.1111H14.9142L15.2198 19.9445H17.1944C17.7024 19.9445 18.1111 20.3531 18.1111 20.8611C18.1111 21.3691 17.7024 21.7778 17.1944 21.7778H14.4444H9.55556H6.80556C6.29757 21.7778 5.88889 21.3691 5.88889 20.8611C5.88889 20.3531 6.29757 19.9445 6.80556 19.9445H8.78021L9.08576 18.1111H3.44444C2.09618 18.1111 1 17.0149 1 15.6667V13.8333V12V4.66667C1 3.31841 2.09618 2.22223 3.44444 2.22223H20.5556C21.9038 2.22223 23 3.31841 23 4.66667V12ZM2.83333 13.8333V15.6667C2.83333 16.0028 3.10833 16.2778 3.44444 16.2778H10.1476C10.159 16.2778 10.1705 16.2778 10.1781 16.2778H13.8142C13.8257 16.2778 13.8372 16.2778 13.8448 16.2778H20.5556C20.8917 16.2778 21.1667 16.0028 21.1667 15.6667V13.8333H2.83333ZM10.6365 19.9445H13.3597L13.0542 18.1111H10.942L10.6365 19.9445Z"})}),u=(0,a.IUT)({displayName:"MobileIcon",viewBox:"0 0 24 24",path:(0,t.jsx)("path",{fill:"currentColor",d:"M6.5 20.25C6.5 20.6281 6.80938 20.9375 7.1875 20.9375H16.8125C17.1906 20.9375 17.5 20.6281 17.5 20.25V16.8125H6.5V20.25ZM6.5 14.75H17.5V3.75C17.5 3.37188 17.1906 3.0625 16.8125 3.0625H7.1875C6.80938 3.0625 6.5 3.37188 6.5 3.75V14.75ZM4.4375 3.75C4.4375 2.2332 5.6707 1 7.1875 1H16.8125C18.3293 1 19.5625 2.2332 19.5625 3.75V20.25C19.5625 21.7668 18.3293 23 16.8125 23H7.1875C5.6707 23 4.4375 21.7668 4.4375 20.25V3.75ZM12 17.8438C12.2735 17.8438 12.5358 17.9524 12.7292 18.1458C12.9226 18.3392 13.0312 18.6015 13.0312 18.875C13.0312 19.1485 12.9226 19.4108 12.7292 19.6042C12.5358 19.7976 12.2735 19.9062 12 19.9062C11.7265 19.9062 11.4642 19.7976 11.2708 19.6042C11.0774 19.4108 10.9688 19.1485 10.9688 18.875C10.9688 18.6015 11.0774 18.3392 11.2708 18.1458C11.4642 17.9524 11.7265 17.8438 12 17.8438Z"})});var v=i(77830),m=i(46628),_=i(7426),f=i(60325);let b={language:{label:"Language",validation:s.Z_()},title:{label:"Title",validation:s.Z_()},description:{label:"Description",validation:s.Z_()},accept_button_label:{label:"Accept button label",validation:s.Z_()},reject_button_label:{label:"Reject button label",validation:s.Z_()},save_button_label:{label:"Save button label",validation:s.Z_()},acknowledge_button_label:{label:"Acknowledge button label",validation:s.Z_()},privacy_policy_url:{label:"Privacy policy URL",validation:s.Z_().url()},privacy_preferences_link_label:{label:"Privacy preferences link label",validation:s.Z_()},banner_title:{label:"Banner title",validation:s.Z_()},banner_description:{label:"Banner description",validation:s.Z_()},purpose_header:{label:"Purpose header",validation:s.Z_()},privacy_policy_link_label:{label:"Privacy policy link label",validation:s.Z_()},modal_link_label:{label:"Modal link label",validation:s.Z_()},is_default:{label:"Default language",validation:s.O7()}};var g=i(34334),x=i(13083),y=i.n(x),h=i(43218),w=i.n(h),C=i(52253),j=i(62656);let k={language:j.eU.EN,accept_button_label:"Accept",acknowledge_button_label:"OK",banner_description:"",banner_title:"",purpose_header:"",description:"Description",privacy_policy_link_label:"",privacy_policy_url:"",modal_link_label:"",privacy_preferences_link_label:"Privacy preferences",reject_button_label:"Reject All",save_button_label:"Save",title:"Manage your consent preferences",is_default:!0},V=e=>({...k,...e.translations?e.translations[0]:{}}),A=(e,n)=>{var i,t,a,o;let l={options:{allowHTMLDescription:!0,base64Cookie:!1,debug:!1,fidesApiUrl:"http://localhost:8080/api/v1",fidesClearCookie:!0,fidesDisableSaveApi:!0,fidesDisableNoticesServedApi:!0,fidesJsBaseUrl:"",fidesLocale:null===(t=e.translations)||void 0===t?void 0:null===(i=t[0])||void 0===i?void 0:i.language,fidesString:null,geolocationApiUrl:"",isGeolocationEnabled:!1,isOverlayEnabled:!0,isPrefetchEnabled:!1,modalLinkId:null,overlayParentId:C.Vk,preventDismissal:null!==(o=e.dismissable)&&void 0!==o&&o,privacyCenterUrl:"http://localhost:3000",showFidesBrandLink:!0},experience:{available_locales:null===(a=e.translations)||void 0===a?void 0:a.map(e=>e.language),component:e.component,experience_config:{allow_language_selection:!0,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0,component:e.component,disabled:!1,dismissable:e.dismissable,id:"pri_222",is_default:!0,language:"en",layer1_button_options:j.Of.OPT_IN_OPT_OUT,properties:[],regions:["us_ca"],show_layer1_notices:!1,translations:[V(e)]},id:"pri_111",privacy_notices:n,region:"us_ca"},geolocation:{country:"US",location:"US-CA",region:"CA"}};return e.component===j.re.TCF_OVERLAY&&(l.options.fidesTcfGdprApplies=!0,l.options.tcf_enabled=!0,l.geolocation={location:"eea",country:"eea"},l.experience.experience_config.regions=["eea"],l.experience={...l.experience,region:"eea",minimal_tcf:!0,gvl:{vendors:{}},tcf_purpose_names:["Store and/or access information on a device","Use limited data to select advertising","Create profiles for personalised advertising","Use profiles to select personalised advertising","Create profiles to personalise content","Use profiles to select personalised content","Measure advertising performance","Measure content performance","Understand audiences through statistics or combinations of data from different sources","Develop and improve services","Use limited data to select content"]},l.options.apiOptions={getPrivacyExperienceFn:async()=>l.experience}),l},O=e=>{let{language:n,is_default:i,...t}=k,a=Object.keys(t).map(n=>{let i=e[n];return{[n]:void 0!==i?i:k[n]}}).reduce((e,n)=>({...e,...n}),{});return{language:e.language,is_default:e.is_default,...a}};var T=i(74022),E=i(25980),L=i(32222);let Z=e=>{let{title:n,description:i}=e;return(0,t.jsx)(a.jqI,{className:"h-full items-center justify-center",children:(0,t.jsxs)(a.jqI,{className:"items-center gap-2 rounded-md p-6",style:{backgroundColor:T.Z.colors.white,boxShadow:T.Z.shadows.md,maxWidth:512},vertical:!0,"data-testid":"no-preview-notice",children:[(0,t.jsx)(a.xvT,{fontSize:"lg",fontWeight:"500",align:"center",children:n}),(0,t.jsx)(a.xvT,{color:"gray.500",align:"center",children:i})]})})};var N=e=>{let{allPrivacyNotices:n,initialValues:i,translation:l,isMobilePreview:s}=e,{values:d}=(0,o.u6)(),[c,p]=(0,r.useState)([]),u=[j.re.BANNER_AND_MODAL,j.re.MODAL,j.re.TCF_OVERLAY].includes(d.component),{systemsCount:v}=(0,E.hz)();(0,r.useEffect)(()=>{d.privacy_notice_ids?p(d.privacy_notice_ids.map(e=>n.find(n=>(null==n?void 0:n.id)===e)).map(e=>d.component===j.re.TCF_OVERLAY&&void 0!==e?{...e,translations:[{language:"en",text:null==e?void 0:e.name}]}:e).filter(e=>void 0!==e)):p([])},[d.privacy_notice_ids,n,d.component]);let m=(0,r.useMemo)(()=>A(i,c),[i,c]),_=d.component===j.re.TCF_OVERLAY?"/lib/fides-tcf.js":"/lib/fides.js";(0,r.useEffect)(()=>{var e,n;d.component===j.re.MODAL&&(m.experience.experience_config.component=j.re.MODAL);let i=null===(e=d.translations)||void 0===e?void 0:e.find(e=>e.language===(null==l?void 0:l.language));(null===(n=d.translations)||void 0===n?void 0:n.length)&&(i?(m.experience.available_locales=[...m.experience.available_locales||[],i.language],m.experience.experience_config.translations[0]=O(i),m.options.fidesLocale=i.language):d.translations&&(m.experience.experience_config.translations[0]=O(d.translations[0]),m.options.fidesLocale=d.translations[0].language)),m.experience.experience_config.show_layer1_notices=!!(null==c?void 0:c.length)&&!!d.show_layer1_notices,m.experience.experience_config.layer1_button_options=(d.component===j.re.BANNER_AND_MODAL||d.component===j.re.TCF_OVERLAY)&&d.layer1_button_options?d.layer1_button_options:j.Of.OPT_IN_OPT_OUT,m.options.preventDismissal=!d.dismissable,m.experience.vendor_count=v,m.experience.experience_config.component=d.component,window.Fides&&((null==c?void 0:c.length)||d.component===j.re.TCF_OVERLAY)&&u&&window.Fides.init(m)},[d,c,l,m,n,u,v]);let f=document.getElementById("fides-modal");return(f&&f.removeAttribute("tabindex"),d.component)?u?(null==c?void 0:c.length)||d.component===j.re.TCF_OVERLAY?(0,t.jsxs)(a.jqI,{className:"size-full items-center justify-center overflow-scroll",children:[(0,t.jsx)(y(),{id:"4b2ec2183c5a567e",dynamic:[C.Vk,d.component!==j.re.TCF_OVERLAY?"padding-bottom: 45px;":""],children:"div#fides-overlay{z-index:5000!important}div#".concat(C.Vk,"{width:100%;padding-top:45px;").concat(d.component!==j.re.TCF_OVERLAY?"padding-bottom: 45px;":""," margin: auto;pointer-events:none}div#fides-banner-container{position:static!important;-webkit-transform:none!important;-moz-transform:none!important;-ms-transform:none!important;-o-transform:none!important;transform:none!important;-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}div#fides-banner-container.fides-banner-hidden{display:none}.fides-modal-container{background-color:unset!important;position:static!important;display:none!important}.fides-modal-overlay{background-color:inherit!important;position:static!important;display:none!important}div.fides-modal-content{position:relative!important;-webkit-transform:none!important;-moz-transform:none!important;-ms-transform:none!important;-o-transform:none!important;transform:none!important;left:initial!important;top:initial!important}div.fides-modal-footer{width:unset}")}),u?(0,t.jsx)("style",{children:"div#fides-modal {\n display: flex !important;\n justify-content: center;\n background-color: unset;\n ".concat(d.component===j.re.BANNER_AND_MODAL||d.component===j.re.TCF_OVERLAY?"padding-bottom: 3rem;":"","\n }")}):null,s?(0,t.jsx)("style",{children:"\n div#fides-overlay-wrapper {\n max-width: 400px;\n margin: auto;\n }\n div.fides-modal-button-group {\n flex-direction: column !important;\n }\n div#fides-banner {\n padding: 24px;\n width: 100%;\n }\n\n div#fides-banner-description {\n margin-bottom: 0px;\n }\n\n div#fides-banner-inner div#fides-button-group {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n padding-top: 24px;\n }\n\n .fides-banner-button-group {\n flex-direction: column;\n width: 100%;\n }\n\n button.fides-banner-button {\n margin: 0px;\n width: 100%;\n }\n\n div#fides-banner-inner-container {\n display: flex;\n flex-direction: column;\n max-height: 50vh;\n overflow-y: auto;\n scrollbar-gutter: stable;\n }\n\n div#fides-privacy-policy-link {\n order: 1;\n width: 100%;\n }\n .fides-modal-footer {\n max-width: 100%;\n }\n .fides-banner-secondary-actions {\n flex-direction: column-reverse;\n gap: 12px;\n }\n "}):(0,t.jsx)("style",{children:"\n div#fides-banner {\n width: 60%;\n }\n @media (min-width: 768px) {\n div#fides-banner {\n width: 100%;\n }\n }\n @media (min-width: 1155px) {\n div#fides-banner {\n width: 90%;\n }\n }\n @media (min-width: 1440px) {\n div#fides-banner {\n width: 60%;\n }\n }\n "}),(0,t.jsx)(w(),{id:"fides-js-script",src:_,onReady:()=>{if(!window.Fides.experience){var e;null===(e=window.Fides)||void 0===e||e.init(m)}}}),(0,t.jsx)("div",{id:C.Vk,className:y().dynamic([["4b2ec2183c5a567e",[C.Vk,d.component!==j.re.TCF_OVERLAY?"padding-bottom: 45px;":""]]])})]}):(0,t.jsx)(Z,{title:"No privacy notices added",description:'To view a preview of this experience, add a privacy notice under "Privacy Notices" to the left.'}):(0,t.jsx)(Z,{title:"".concat(L.J.get(d.component)," preview not available"),description:"There is no preview available for ".concat(L.J.get(d.component),". You can edit the available settings\n and languages to the left.")}):(0,t.jsx)(Z,{title:"No privacy experience type selected",description:"Please select a privacy experience type to preview."})},D=i(94315),M=i(16194),H=i(16277),R=i(71922),S=i(31883);let P=e=>{let n=(0,f.y3)(e),i={};return Object.entries(n).forEach(e=>{let[n,t]=e;if(t.included){let e=b[n];i[n]=t.required?e.validation.required().label(e.label):e.validation.nullable().label(e.label)}}),s.Ry().shape(i)},F=e=>{let{componentType:n}=e;return P(n)},B=s.Ry().shape({name:s.Z_().required().label("Experience name"),component:s.Z_().required().label("Experience type"),translations:s.IX().when("component",(e,n)=>{let[i]=e;return n.of(F({componentType:i}))})});var U=e=>{var n;let{passedInExperience:i,passedInTranslations:s}=e,[b]=(0,D.mJ)(),[x]=(0,D.$d)(),y=(0,a.pmc)(),[h,w]=(0,r.useState)(!1),C=(0,l.useRouter)(),{data:j}=(0,_.tB)({api_set:!1}),k=null==j?void 0:null===(n=j.plus_consent_settings)||void 0===n?void 0:n.enable_translations,V=(0,d.C)(g.Zp),A=(0,d.C)(g.G1);(0,g.Ah)({page:V,size:A});let O=(0,d.C)(g.fJ),T=(0,d.C)(R.sX),E=i?{...f.DD,...(0,f.Uv)(i)}:f.DD,L=async e=>{var n,t;let a;e.privacy_notice_ids=null===(n=e.privacy_notice_ids)||void 0===n?void 0:n.filter(e=>"tcf_purposes_placeholder"!==e);let o={...e,disabled:null===(t=null==i?void 0:i.disabled)||void 0===t||t,allow_language_selection:e.translations&&e.translations.length>1};if(i){let{component:e,...n}=o;a=await x({...n,id:i.id})}else a=await b(o);(0,S.D4)(a)?y((0,m.Vo)((0,c.e$)(a.error))):(y((0,m.t5)("Privacy experience successfully ".concat(i?"updated":"created"))),C.push(v.w0))},[Z,P]=(0,r.useState)(void 0),[F,U]=(0,r.useState)(!1);return(0,t.jsx)(o.J9,{initialValues:E,enableReinitialize:!0,onSubmit:L,validationSchema:B,children:(0,t.jsx)(o.l0,{style:{height:"100vh"},children:(0,t.jsxs)(a.jqI,{className:"size-full","data-testid":"privacy-experience-detail-page",children:[Z?(0,t.jsx)(H.Z,{translation:Z,translationsEnabled:k,isOOB:F,onReturnToMainForm:()=>{P(void 0),U(!1)}}):(0,t.jsx)(M.d0,{allPrivacyNotices:T,translationsEnabled:k,onSelectTranslation:e=>{P({...e,name:(0,f.Go)(e,O)})},onCreateTranslation:e=>{let n=null==s?void 0:s.find(n=>n.language===e);return n&&U(!0),null!=n?n:{language:e,is_default:!1}}}),(0,t.jsxs)(a.jqI,{vertical:!0,className:"w-full overflow-y-hidden",style:{backgroundColor:a.rSc.colors.gray[50]},children:[(0,t.jsxs)(a.jqI,{className:"flex-row items-center p-4",style:{backgroundColor:a.rSc.colors.white,borderBottom:"1px solid ".concat(a.rSc.colors.gray[100])},children:[(0,t.jsx)(a.xvT,{fontSize:"md",fontWeight:"semibold",children:"PREVIEW"}),(0,t.jsx)(a.LZC,{}),(0,t.jsxs)(a.y02.Group,{onChange:e=>w(e.target.value),defaultValue:!1,children:[(0,t.jsx)(a.y02.Button,{value:!0,title:"View mobile preview",children:(0,t.jsx)(u,{})}),(0,t.jsx)(a.y02.Button,{value:!1,title:"View desktop preview",children:(0,t.jsx)(p,{})})]})]}),(0,t.jsx)(N,{allPrivacyNotices:T,initialValues:E,translation:Z,isMobilePreview:h})]})]})})})}},32222:function(e,n,i){i.d(n,{J:function(){return t}});let t=new Map([["overlay","Overlay"],["privacy_center","Privacy center"],["tcf_overlay","TCF overlay"],["modal","Modal"],["banner_and_modal","Banner and modal"],["headless","Headless"]])},31883:function(e,n,i){i.d(n,{Bw:function(){return t.Bw},D4:function(){return t.D4}});var t=i(19043)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1904],{11904:function(e,s,a){a.d(s,{Z:function(){return Z}});var i,t,l=a(24246),r=a(59003),n=a(92222),o=a(77181),d=a(86677),c=a(27378),u=a(14481),g=a(45896),x=a(70675),j=a(72625),m=a(79947),h=a(50169),I=a(28278),C=a(74241),p=a(16643),f=a(91761),L=a(61099),v=a(87667),y=e=>{let{resourceType:s}=e,a=(0,n.Cl)();return s===p.D$.SCHEMA?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(v.Z,{result:e.row.original,changeTypeOverride:I.E.CLASSIFICATION}),header:e=>(0,l.jsx)(u.Rr,{value:"Name",...e}),size:300}),a.accessor(e=>e.urn,{id:"project",cell:e=>(0,l.jsx)(u.G3,{value:(0,C.Z)(e.getValue())}),header:e=>(0,l.jsx)(u.Rr,{value:"Project",...e})}),a.display({id:"status",cell:e=>(0,l.jsx)(h.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),a.accessor(e=>e.system,{id:"system",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"System",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(j.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),a.display({id:"action",cell:e=>e.row.original.diff_status!==p.LL.MUTED?(0,l.jsx)(f.Z,{resource:e.row.original}):(0,l.jsx)(u.G3,{value:"--"}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.TABLE?{columns:[a.display({id:"select",cell:e=>{var s;let{row:a}=e;return(0,l.jsx)(j.k,{isChecked:a.getIsSelected(),onChange:a.getToggleSelectedHandler(),dataTestId:"select-".concat(null!==(s=a.original.name)&&void 0!==s?s:a.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(j.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40}),a.accessor(e=>e.name,{id:"tables",cell:e=>(0,l.jsx)(v.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Table name",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(h.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Table"}),header:"Type"}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(j.Cy,{time:e.getValue()}),header:"Time"}),a.display({id:"actions",cell:e=>(0,l.jsx)(f.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.FIELD?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(v.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Field name",...e}),size:300}),a.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,l.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Data type",...e})}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(h.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Field"}),header:"Type"}),a.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(L.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(j.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,l.jsx)(f.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:{columns:[]}};(i=t||(t={}))[i.ACTION_REQUIRED=0]="ACTION_REQUIRED",i[i.UNMONITORED=1]="UNMONITORED";var _=e=>{let{initialFilterTabIndex:s=0}=e,[a,i]=(0,c.useState)(s),t=(0,c.useMemo)(()=>[{label:"Action Required",filters:[p.LL.CLASSIFICATION_ADDITION,p.LL.CLASSIFICATION_UPDATE],childFilters:[p.LL.CLASSIFICATION_ADDITION,p.LL.CLASSIFICATION_UPDATE]},{label:"In progress",filters:[p.LL.CLASSIFYING,p.LL.CLASSIFICATION_QUEUED],childFilters:[p.LL.CLASSIFYING,p.LL.CLASSIFICATION_QUEUED]},{label:"Unmonitored",filters:[p.LL.MUTED],childFilters:[]}],[]);return{filterTabs:t,filterTabIndex:a,setFilterTabIndex:i,activeDiffFilters:t[a].filters,activeChildDiffFilters:t[a].childFilters}},T=a(47182),S=a(38347),R=a(79494),b=e=>{let{resourceUrn:s}=e,[a,{isLoading:i}]=(0,x.Hf)(),[t,{isLoading:r}]=(0,x.zV)(),n=i||r,d=async e=>{await t({staged_resource_urns:e})},c=async e=>{await a({staged_resource_urns:e})};return(0,l.jsx)(o.jqI,{"data-testid":"bulk-actions-menu",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(R.Z,{title:"Confirm all",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>c([s]),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(R.Z,{title:"Ignore all",icon:(0,l.jsx)(o.tpL,{}),onClick:()=>d([s]),disabled:n,loading:r,size:"middle"})]})})},w=e=>{let{selectedUrns:s}=e,[a,{isLoading:i}]=(0,x.Hf)(),[t,{isLoading:r}]=(0,x.zV)(),n=i||r,d=async e=>{await a({staged_resource_urns:e})},c=async e=>{await t({staged_resource_urns:e})};return s.length?(0,l.jsxs)(o.jqI,{className:"items-center","data-testid":"bulk-actions-menu",children:[(0,l.jsx)(o.xvT,{fontSize:"xs",fontWeight:"semibold",minW:16,mr:4,children:"".concat(s.length," selected")}),(0,l.jsxs)(o.jqI,{className:"gap-2",children:[(0,l.jsx)(R.Z,{title:"Confirm",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>d(s),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(R.Z,{title:"Ignore",icon:(0,l.jsx)(o.tpL,{}),disabled:n,loading:r,onClick:()=>c(s),size:"middle"})]})]}):null},D=a(7940),A=a(80285),N=a(36168),F=a(57454);let k={items:[],total:0,page:1,size:50,pages:1},E=()=>(0,l.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,l.jsxs)(o.gCW,{children:[(0,l.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,l.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var Z=e=>{var s,a;let{resourceUrn:i}=e,j=(0,d.useRouter)(),[m,h]=(0,c.useState)(""),{filterTabs:I,setFilterTabIndex:C,filterTabIndex:f,activeDiffFilters:L,activeChildDiffFilters:v}=_({initialFilterTabIndex:(null===(s=j.query)||void 0===s?void 0:s.filterTabIndex)?Number(null===(a=j.query)||void 0===a?void 0:a.filterTabIndex):void 0}),[R,Z]=(0,c.useState)({}),{PAGE_SIZES:O,pageSize:z,setPageSize:U,onPreviousPageClick:M,isPreviousPageDisabled:P,onNextPageClick:G,isNextPageDisabled:V,startRange:$,endRange:q,pageIndex:H,setTotalPages:Q,resetPageIndexToDefault:W}=(0,u.oi)();(0,c.useEffect)(()=>{W()},[i,m,W,L,v]);let{isFetching:Y,isLoading:B,data:K}=(0,x.z8)({staged_resource_urn:i,page:H,size:z,child_diff_status:v,diff_status:L,search:m}),X=(0,D.G)(null==K?void 0:K.items[0]),{items:J,total:ee,pages:es}=(0,c.useMemo)(()=>null!=K?K:k,[K]);(0,c.useEffect)(()=>{Q(es)},[es,Q]);let{columns:ea}=y({resourceType:X}),ei=(0,c.useMemo)(()=>ea,[ea]),{navigateToDiscoveryResults:et}=(0,T.Z)(),el=(0,r.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),columns:ei,manualPagination:!0,onRowSelectionChange:Z,state:{rowSelection:R},getRowId:A.Z,data:J,columnResizeMode:"onChange"}),er=Object.keys(R).filter(e=>R[e]);return B?(0,l.jsx)(u.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(g.Z,{filterTabs:I,filterTabIndex:f,onChange:C}),(0,l.jsxs)(u.Q$,{children:[(0,l.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,l.jsx)(o.xuv,{flexShrink:0,children:(0,l.jsx)(F.M,{value:m,onChange:h})}),(0,l.jsx)(S.Z,{})]}),X===p.D$.TABLE&&!!er.length&&(0,l.jsx)(w,{selectedUrns:er}),X===p.D$.FIELD&&f!==t.UNMONITORED&&(0,l.jsx)(b,{resourceUrn:i})]}),(0,l.jsx)(u.ZK,{tableInstance:el,onRowClick:e=>et({resourceUrn:e.urn,filterTabIndex:f}),getRowIsClickable:e=>X!==p.D$.FIELD||(0,N.Z)(e),emptyTableNotice:(0,l.jsx)(E,{})}),(0,l.jsx)(u.s8,{totalRows:ee||0,pageSizes:O,setPageSize:U,onPreviousPageClick:M,isPreviousPageDisabled:P||Y,onNextPageClick:G,isNextPageDisabled:V||Y,startRange:$,endRange:q})]})}},91761:function(e,s,a){var i=a(24246),t=a(77181),l=a(812),r=a(14047),n=a(7940),o=a(98559),d=a(16643),c=a(79494),u=a(70675);s.Z=e=>{let{resource:s}=e,[a,{isLoading:g}]=(0,u.v8)(),[x,{isLoading:j}]=(0,u.cM)(),[m,{isLoading:h}]=(0,u.vi)(),I=j||h||g,{diff_status:C,child_diff_statuses:p,top_level_field_name:f}=s,{successAlert:L,errorAlert:v}=(0,r.V)(),y=C===d.LL.CLASSIFICATION_ADDITION||C===d.LL.CLASSIFICATION_UPDATE,_=p&&(p[d.LL.CLASSIFICATION_ADDITION]||p[d.LL.CLASSIFICATION_UPDATE]),T=(y||_)&&!f,S=y||_,R=(0,n.G)(s)!==d.D$.FIELD,b=T&&S&&R,w=async()=>{let e=await x({staged_resource_urn:s.urn});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to promote resource"):L('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},D=async()=>{let e=await m({staged_resource_urn:s.urn});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to mute resource"):L("Ignored changes will not be added to a Fides dataset.","".concat(s.name||"Changes"," ignored"))},A=async()=>{let e=await a({staged_resource_urn:s.urn,monitor_config_id:s.monitor_config_id,start_classification:!0,classify_monitored_resources:!0});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to reclassify resource"):L("Reclassification of ".concat((0,o.Z)(s)||"the resource"," has begun. The results may take some time to appear in the “Data discovery“ tab."),"Reclassification started")};return(0,i.jsxs)(t.Ugi,{gap:2,children:[T&&(0,i.jsx)(c.Z,{title:"Confirm",icon:(0,i.jsx)(t.nQG,{}),onClick:w,disabled:I,loading:j}),S&&(0,i.jsx)(c.Z,{title:"Ignore",icon:(0,i.jsx)(t.tpL,{}),onClick:D,disabled:I,loading:h}),R&&!b&&(0,i.jsx)(c.Z,{title:"Reclassify",icon:(0,i.jsx)(t.nyI,{}),onClick:A,disabled:I,loading:g}),b&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.LZC,{}),(0,i.jsxs)(t.v2r,{children:[(0,i.jsx)(t.j2t,{as:t.wpx,size:"small",type:"text",icon:(0,i.jsx)(t.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-overflow-btn"}),(0,i.jsx)(t.qyq,{children:(0,i.jsx)(t.sNh,{onClick:A,icon:(0,i.jsx)(t.nyI,{}),"data-testid":"action-reclassify",children:"Reclassify"})})]})]})]})}}}]);
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1904],{11904:function(e,s,a){a.d(s,{Z:function(){return Z}});var i,t,l=a(24246),r=a(59003),n=a(92222),o=a(77181),d=a(86677),c=a(27378),u=a(14481),g=a(45896),x=a(70675),j=a(72625),m=a(79947),h=a(50169),I=a(28278),C=a(74241),p=a(62656),f=a(91761),L=a(61099),v=a(87667),y=e=>{let{resourceType:s}=e,a=(0,n.Cl)();return s===p.D$.SCHEMA?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(v.Z,{result:e.row.original,changeTypeOverride:I.E.CLASSIFICATION}),header:e=>(0,l.jsx)(u.Rr,{value:"Name",...e}),size:300}),a.accessor(e=>e.urn,{id:"project",cell:e=>(0,l.jsx)(u.G3,{value:(0,C.Z)(e.getValue())}),header:e=>(0,l.jsx)(u.Rr,{value:"Project",...e})}),a.display({id:"status",cell:e=>(0,l.jsx)(h.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),a.accessor(e=>e.system,{id:"system",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"System",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(j.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),a.display({id:"action",cell:e=>e.row.original.diff_status!==p.LL.MUTED?(0,l.jsx)(f.Z,{resource:e.row.original}):(0,l.jsx)(u.G3,{value:"--"}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.TABLE?{columns:[a.display({id:"select",cell:e=>{var s;let{row:a}=e;return(0,l.jsx)(j.k,{isChecked:a.getIsSelected(),onChange:a.getToggleSelectedHandler(),dataTestId:"select-".concat(null!==(s=a.original.name)&&void 0!==s?s:a.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(j.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40}),a.accessor(e=>e.name,{id:"tables",cell:e=>(0,l.jsx)(v.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Table name",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(h.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Table"}),header:"Type"}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(j.Cy,{time:e.getValue()}),header:"Time"}),a.display({id:"actions",cell:e=>(0,l.jsx)(f.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.FIELD?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(v.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Field name",...e}),size:300}),a.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,l.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Data type",...e})}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(h.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Field"}),header:"Type"}),a.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(L.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(j.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,l.jsx)(f.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:{columns:[]}};(i=t||(t={}))[i.ACTION_REQUIRED=0]="ACTION_REQUIRED",i[i.UNMONITORED=1]="UNMONITORED";var _=e=>{let{initialFilterTabIndex:s=0}=e,[a,i]=(0,c.useState)(s),t=(0,c.useMemo)(()=>[{label:"Action Required",filters:[p.LL.CLASSIFICATION_ADDITION,p.LL.CLASSIFICATION_UPDATE],childFilters:[p.LL.CLASSIFICATION_ADDITION,p.LL.CLASSIFICATION_UPDATE]},{label:"In progress",filters:[p.LL.CLASSIFYING,p.LL.CLASSIFICATION_QUEUED],childFilters:[p.LL.CLASSIFYING,p.LL.CLASSIFICATION_QUEUED]},{label:"Unmonitored",filters:[p.LL.MUTED],childFilters:[]}],[]);return{filterTabs:t,filterTabIndex:a,setFilterTabIndex:i,activeDiffFilters:t[a].filters,activeChildDiffFilters:t[a].childFilters}},T=a(47182),S=a(38347),R=a(79494),b=e=>{let{resourceUrn:s}=e,[a,{isLoading:i}]=(0,x.Hf)(),[t,{isLoading:r}]=(0,x.zV)(),n=i||r,d=async e=>{await t({staged_resource_urns:e})},c=async e=>{await a({staged_resource_urns:e})};return(0,l.jsx)(o.jqI,{"data-testid":"bulk-actions-menu",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(R.Z,{title:"Confirm all",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>c([s]),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(R.Z,{title:"Ignore all",icon:(0,l.jsx)(o.tpL,{}),onClick:()=>d([s]),disabled:n,loading:r,size:"middle"})]})})},w=e=>{let{selectedUrns:s}=e,[a,{isLoading:i}]=(0,x.Hf)(),[t,{isLoading:r}]=(0,x.zV)(),n=i||r,d=async e=>{await a({staged_resource_urns:e})},c=async e=>{await t({staged_resource_urns:e})};return s.length?(0,l.jsxs)(o.jqI,{className:"items-center","data-testid":"bulk-actions-menu",children:[(0,l.jsx)(o.xvT,{fontSize:"xs",fontWeight:"semibold",minW:16,mr:4,children:"".concat(s.length," selected")}),(0,l.jsxs)(o.jqI,{className:"gap-2",children:[(0,l.jsx)(R.Z,{title:"Confirm",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>d(s),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(R.Z,{title:"Ignore",icon:(0,l.jsx)(o.tpL,{}),disabled:n,loading:r,onClick:()=>c(s),size:"middle"})]})]}):null},D=a(7940),A=a(80285),N=a(36168),F=a(57454);let k={items:[],total:0,page:1,size:50,pages:1},E=()=>(0,l.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,l.jsxs)(o.gCW,{children:[(0,l.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,l.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var Z=e=>{var s,a;let{resourceUrn:i}=e,j=(0,d.useRouter)(),[m,h]=(0,c.useState)(""),{filterTabs:I,setFilterTabIndex:C,filterTabIndex:f,activeDiffFilters:L,activeChildDiffFilters:v}=_({initialFilterTabIndex:(null===(s=j.query)||void 0===s?void 0:s.filterTabIndex)?Number(null===(a=j.query)||void 0===a?void 0:a.filterTabIndex):void 0}),[R,Z]=(0,c.useState)({}),{PAGE_SIZES:O,pageSize:z,setPageSize:U,onPreviousPageClick:M,isPreviousPageDisabled:P,onNextPageClick:G,isNextPageDisabled:V,startRange:$,endRange:q,pageIndex:H,setTotalPages:Q,resetPageIndexToDefault:W}=(0,u.oi)();(0,c.useEffect)(()=>{W()},[i,m,W,L,v]);let{isFetching:Y,isLoading:B,data:K}=(0,x.z8)({staged_resource_urn:i,page:H,size:z,child_diff_status:v,diff_status:L,search:m}),X=(0,D.G)(null==K?void 0:K.items[0]),{items:J,total:ee,pages:es}=(0,c.useMemo)(()=>null!=K?K:k,[K]);(0,c.useEffect)(()=>{Q(es)},[es,Q]);let{columns:ea}=y({resourceType:X}),ei=(0,c.useMemo)(()=>ea,[ea]),{navigateToDiscoveryResults:et}=(0,T.Z)(),el=(0,r.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),columns:ei,manualPagination:!0,onRowSelectionChange:Z,state:{rowSelection:R},getRowId:A.Z,data:J,columnResizeMode:"onChange"}),er=Object.keys(R).filter(e=>R[e]);return B?(0,l.jsx)(u.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(g.Z,{filterTabs:I,filterTabIndex:f,onChange:C}),(0,l.jsxs)(u.Q$,{children:[(0,l.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,l.jsx)(o.xuv,{flexShrink:0,children:(0,l.jsx)(F.M,{value:m,onChange:h})}),(0,l.jsx)(S.Z,{})]}),X===p.D$.TABLE&&!!er.length&&(0,l.jsx)(w,{selectedUrns:er}),X===p.D$.FIELD&&f!==t.UNMONITORED&&(0,l.jsx)(b,{resourceUrn:i})]}),(0,l.jsx)(u.ZK,{tableInstance:el,onRowClick:e=>et({resourceUrn:e.urn,filterTabIndex:f}),getRowIsClickable:e=>X!==p.D$.FIELD||(0,N.Z)(e),emptyTableNotice:(0,l.jsx)(E,{})}),(0,l.jsx)(u.s8,{totalRows:ee||0,pageSizes:O,setPageSize:U,onPreviousPageClick:M,isPreviousPageDisabled:P||Y,onNextPageClick:G,isNextPageDisabled:V||Y,startRange:$,endRange:q})]})}},91761:function(e,s,a){var i=a(24246),t=a(77181),l=a(812),r=a(14047),n=a(7940),o=a(98559),d=a(62656),c=a(79494),u=a(70675);s.Z=e=>{let{resource:s}=e,[a,{isLoading:g}]=(0,u.v8)(),[x,{isLoading:j}]=(0,u.cM)(),[m,{isLoading:h}]=(0,u.vi)(),I=j||h||g,{diff_status:C,child_diff_statuses:p,top_level_field_name:f}=s,{successAlert:L,errorAlert:v}=(0,r.V)(),y=C===d.LL.CLASSIFICATION_ADDITION||C===d.LL.CLASSIFICATION_UPDATE,_=p&&(p[d.LL.CLASSIFICATION_ADDITION]||p[d.LL.CLASSIFICATION_UPDATE]),T=(y||_)&&!f,S=y||_,R=(0,n.G)(s)!==d.D$.FIELD,b=T&&S&&R,w=async()=>{let e=await x({staged_resource_urn:s.urn});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to promote resource"):L('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},D=async()=>{let e=await m({staged_resource_urn:s.urn});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to mute resource"):L("Ignored changes will not be added to a Fides dataset.","".concat(s.name||"Changes"," ignored"))},A=async()=>{let e=await a({staged_resource_urn:s.urn,monitor_config_id:s.monitor_config_id,start_classification:!0,classify_monitored_resources:!0});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to reclassify resource"):L("Reclassification of ".concat((0,o.Z)(s)||"the resource"," has begun. The results may take some time to appear in the “Data discovery“ tab."),"Reclassification started")};return(0,i.jsxs)(t.Ugi,{gap:2,children:[T&&(0,i.jsx)(c.Z,{title:"Confirm",icon:(0,i.jsx)(t.nQG,{}),onClick:w,disabled:I,loading:j}),S&&(0,i.jsx)(c.Z,{title:"Ignore",icon:(0,i.jsx)(t.tpL,{}),onClick:D,disabled:I,loading:h}),R&&!b&&(0,i.jsx)(c.Z,{title:"Reclassify",icon:(0,i.jsx)(t.nyI,{}),onClick:A,disabled:I,loading:g}),b&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.LZC,{}),(0,i.jsxs)(t.v2r,{children:[(0,i.jsx)(t.j2t,{as:t.wpx,size:"small",type:"text",icon:(0,i.jsx)(t.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-overflow-btn"}),(0,i.jsx)(t.qyq,{children:(0,i.jsx)(t.sNh,{onClick:A,icon:(0,i.jsx)(t.nyI,{}),"data-testid":"action-reclassify",children:"Reclassify"})})]})]})]})}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2479],{11611:function(e){e.exports=function(e){var i=typeof e;return null!=e&&("object"==i||"function"==i)}},55193:function(e,i,t){var r=t(99736),a=t(92360);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},1039:function(e,i,t){"use strict";t.d(i,{Z:function(){return C}});var r=t(24246),a=t(59003),s=t(92222),n=t(77181),o=t(86677),l=t(27378),c=t(14481),d=t(45896),u=t(70675),g=t(72625),h=t(54409),m=t(79947),L=t(87667),x=t(50169),v=t(28278),f=t(16643),p=t(74241),j=e=>{let{resourceType:i,changeTypeOverride:t}=e,a=(0,s.Cl)(),n=[];return i?i===f.D$.SCHEMA?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Name",...e}),size:300}),a.accessor(e=>e.urn,{id:"project",cell:e=>(0,r.jsx)(c.G3,{value:(0,p.Z)(e.getValue())}),header:e=>(0,r.jsx)(c.Rr,{value:"Project",...e})}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.system,{id:"system",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"System",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{ignoreChildActions:t===v.E.MONITORED||t===v.E.MUTED,resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:i===f.D$.TABLE?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Table name",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,r.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:i===f.D$.FIELD?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Field name",...e}),size:300}),a.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,r.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Data type",...e})}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,r.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:{columns:n}:{columns:n}},_=e=>{let{initialFilterTabIndex:i=0}=e,[t,r]=(0,l.useState)(i),a=(0,l.useMemo)(()=>[{label:"Action Required",filters:[f.LL.ADDITION,f.LL.REMOVAL],childFilters:[f.LL.ADDITION,f.LL.REMOVAL]},{label:"Monitored",filters:[f.LL.MONITORED],childFilters:[],changeTypeOverride:v.E.MONITORED},{label:"Unmonitored",filters:[f.LL.MUTED],childFilters:[],changeTypeOverride:v.E.MUTED}],[]);return{filterTabs:a,filterTabIndex:t,setFilterTabIndex:r,activeDiffFilters:a[t].filters,activeChildDiffFilters:a[t].childFilters,activeChangeTypeOverride:a[t].changeTypeOverride}},y=t(47182),D=t(38347),b=t(7940),T=t(80285),w=t(36168),R=t(57454);let H={items:[],total:0,page:1,size:50,pages:1},M=()=>(0,r.jsx)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,r.jsxs)(n.gCW,{children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,r.jsx)(n.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var C=e=>{var i,t;let{resourceUrn:g}=e,h=(0,o.useRouter)(),[m,L]=(0,l.useState)(""),{filterTabs:x,setFilterTabIndex:v,filterTabIndex:p,activeDiffFilters:C,activeChildDiffFilters:Z,activeChangeTypeOverride:E}=_({initialFilterTabIndex:(null===(i=h.query)||void 0===i?void 0:i.filterTabIndex)?Number(null===(t=h.query)||void 0===t?void 0:t.filterTabIndex):void 0}),{PAGE_SIZES:I,pageSize:O,setPageSize:F,onPreviousPageClick:k,isPreviousPageDisabled:A,onNextPageClick:V,isNextPageDisabled:N,startRange:S,endRange:$,pageIndex:z,setTotalPages:G,resetPageIndexToDefault:P}=(0,c.oi)();(0,l.useEffect)(()=>{P()},[g,m,P,C,Z]);let{isFetching:U,isLoading:B,data:W}=(0,u.z8)({staged_resource_urn:g,page:z,size:O,child_diff_status:Z,diff_status:C,search:m}),q=(0,b.G)(null==W?void 0:W.items[0]),{columns:Q}=j({resourceType:q,changeTypeOverride:E}),{items:K,total:Y,pages:J}=(0,l.useMemo)(()=>null!=W?W:H,[W]);(0,l.useEffect)(()=>{G(J)},[J,G]);let X=(0,l.useMemo)(()=>Q,[Q]),{navigateToDetectionResults:ee}=(0,y.Z)(),ei=(0,a.b7)({getCoreRowModel:(0,s.sC)(),getGroupedRowModel:(0,s.qe)(),getExpandedRowModel:(0,s.rV)(),getRowId:T.Z,columns:X,manualPagination:!0,data:K,columnResizeMode:"onChange"});return B?(0,r.jsx)(c.I4,{rowHeight:36,numRows:36}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{filterTabs:x,filterTabIndex:p,onChange:v}),(0,r.jsx)(c.Q$,{children:(0,r.jsx)(n.kCb,{direction:"row",alignItems:"center",justifyContent:"space-between",width:"full",children:(0,r.jsxs)(n.kCb,{gap:6,align:"center",children:[(0,r.jsx)(n.xuv,{flexShrink:0,children:(0,r.jsx)(R.M,{value:m,onChange:L})}),(0,r.jsx)(D.Z,{})]})})}),(0,r.jsx)(c.ZK,{tableInstance:ei,onRowClick:e=>ee({resourceUrn:e.urn,filterTabIndex:p}),getRowIsClickable:e=>q!==f.D$.FIELD||(0,w.Z)(e),emptyTableNotice:(0,r.jsx)(M,{})}),(0,r.jsx)(c.s8,{totalRows:Y||0,pageSizes:I,setPageSize:F,onPreviousPageClick:k,isPreviousPageDisabled:A||U,onNextPageClick:V,isNextPageDisabled:N||U,startRange:S,endRange:$})]})}},54409:function(e,i,t){"use strict";t.d(i,{Z:function(){return m}});var r=t(24246),a=t(77181),s=t(812),n=t(14047),o=t(16643),l=t(31883);let c=(0,a.IUT)({displayName:"MonitorOffIcon",viewBox:"0 0 12 12",path:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.47125 1H5.85H6.15H6.51188L6.58875 1.36914L7.52062 5.83268L6.42408 4.98635L6.03375 3.11719L5.8038 4.50761L4.99323 3.882L5.40562 1.38867L5.47125 1ZM4.80795 5.0022L4.67675 5.79545L5.48735 6.42109L5.61854 5.62783L4.80795 5.0022ZM6.73856 6.49227L6.96125 7.55866L8.42407 8.6877L8.69498 8.00228L7.94864 7.42624L7.88625 7.58398L7.83501 7.33853L6.73856 6.49227ZM8.33138 6.45844L9.07755 7.03434L9.30188 6.4668H11.55H12V5.5293H11.55H9H8.69812L8.58375 5.82031L8.33138 6.45844ZM7.27551 9.06443L7.35399 9.125H7.28813L7.27551 9.06443ZM4.49147 6.91566L5.30209 7.54131L4.79437 10.6113L4.72875 11H4.35H4.05H3.69563L3.61313 10.6406L2.64563 6.46875H0.45H0V5.53125H0.45H2.69777L3.49646 6.1477L4.15125 8.97266L4.49147 6.91566Z",fill:"currentColor"}),(0,r.jsx)("g",{"clip-path":"url(#clip0_341_3102)",children:(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.6755 10.4168L0.164222 2.304L0.775218 1.51237L11.2865 9.62517L10.6755 10.4168Z",fill:"currentColor"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_341_3102",children:(0,r.jsx)("rect",{width:"11.5",height:"9",fill:"white",transform:"translate(0 1.5)"})})})]})}),d=(0,a.IUT)({displayName:"MonitorOnIcon",viewBox:"0 0 12 10",path:(0,r.jsx)("path",{d:"M5.47125 0H5.85H6.15H6.51188L6.58875 0.369141L7.88625 6.58398L8.58375 4.82031L8.69812 4.5293H9H11.55H12V5.4668H11.55H9.30188L8.36625 7.83398L8.25188 8.125H7.95H7.65H7.28813L7.21125 7.75586L6.03375 2.11719L4.79437 9.61133L4.72875 10H4.35H4.05H3.69563L3.61313 9.64062L2.64563 5.46875H0.45H0V4.53125H0.45H3H3.35438L3.43688 4.89062L4.15125 7.97266L5.40562 0.388672L5.47125 0Z",fill:"currentColor"})});var u=t(79494),g=t(70675),h=t(7940),m=e=>{let{resource:i,ignoreChildActions:t=!1}=e,m=(0,h.G)(i),[L,{isLoading:x}]=(0,g.v8)(),[v,{isLoading:f}]=(0,g.vi)(),[p,{isLoading:j}]=(0,g.Tl)(),{successAlert:_,errorAlert:y}=(0,n.V)(),D=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id});(0,l.D4)(e)?y((0,s.e$)(e.error,"Failed to confirm resource")):_("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(i.name||"The resource"," is now being monitored."))},b=async()=>{let e=await p({staged_resource_urn:i.urn});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to un-mute resource"):_("".concat(i.name||"The resource"," has been un-muted and is now being monitored."))},T=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to un-mute resource"):_("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(i.name||"The resource"," is now being monitored."))},w=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to confirm resource"):_('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},R=async()=>{let e=await v({staged_resource_urn:i.urn});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to mute resource"):_("Ignored data will not be monitored for changes or added to Fides datasets.","".concat(i.name||"Resource"," ignored"))},H=x||f||j,{diff_status:M,child_diff_statuses:C}=i,Z=m===o.D$.SCHEMA,E=m===o.D$.FIELD,I=Z&&void 0===M||!E&&M===o.LL.ADDITION,O=M!==o.LL.MUTED,F=M===o.LL.MUTED&&!E,k=M===o.LL.MUTED&&E,A=C&&(C[o.LL.ADDITION]||C[o.LL.REMOVAL]),V=M===o.LL.MONITORED&&!t&&A;return(0,r.jsxs)(a.Ugi,{children:[I&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:D,disabled:H,loading:x}),k&&(0,r.jsx)(u.Z,{title:"Un-Mute",icon:(0,r.jsx)(d,{}),onClick:b,disabled:H,loading:x}),F&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:T,disabled:H,loading:x}),V&&(0,r.jsx)(u.Z,{title:"Confirm",icon:(0,r.jsx)(a.nQG,{}),onClick:w,disabled:H,loading:x}),O&&(0,r.jsx)(u.Z,{title:"Ignore",icon:(0,r.jsx)(c,{}),onClick:R,disabled:H,loading:f})]})}},7940:function(e,i,t){"use strict";t.d(i,{G:function(){return a}});var r=t(16643);let a=e=>{var i,t,a;return e?e.resource_type?e.resource_type:(null===(i=e.schemas)||void 0===i?void 0:i.length)?r.D$.DATABASE:(null===(t=e.tables)||void 0===t?void 0:t.length)?r.D$.SCHEMA:(null===(a=e.fields)||void 0===a?void 0:a.length)?r.D$.TABLE:r.D$.FIELD:void 0}},98559:function(e,i){"use strict";i.Z=e=>{let{name:i,urn:t,monitor_config_id:r,database_name:a,schema_name:s,table_name:n,top_level_field_name:o,top_level_field_urn:l}=e;if(!o)return i;let c=t.split(".");return l?t.replace("".concat(l).concat("."),""):([r,a,s,n,o].forEach(e=>{if(e){let i=c.indexOf(e);i>-1&&c.splice(i,1)}}),c.join("."))}},36168:function(e,i){"use strict";i.Z=e=>{var i;return!!e.parent_table_urn&&null!==(i=e.sub_field_urns)&&void 0!==i&&!!i.length&&!e.top_level_field_name}},80356:function(e,i,t){"use strict";var r=t(7940),a=t(36168),s=t(16643);i.Z=e=>(0,r.G)(e)!==s.D$.FIELD||(0,a.Z)(e)},31883:function(e,i,t){"use strict";t.d(i,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=t(19043)}}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2479],{11611:function(e){e.exports=function(e){var i=typeof e;return null!=e&&("object"==i||"function"==i)}},55193:function(e,i,t){var r=t(99736),a=t(92360);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},1039:function(e,i,t){"use strict";t.d(i,{Z:function(){return C}});var r=t(24246),a=t(59003),s=t(92222),n=t(77181),o=t(86677),l=t(27378),c=t(14481),d=t(45896),u=t(70675),g=t(72625),h=t(54409),m=t(79947),L=t(87667),x=t(50169),v=t(28278),f=t(62656),p=t(74241),j=e=>{let{resourceType:i,changeTypeOverride:t}=e,a=(0,s.Cl)(),n=[];return i?i===f.D$.SCHEMA?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Name",...e}),size:300}),a.accessor(e=>e.urn,{id:"project",cell:e=>(0,r.jsx)(c.G3,{value:(0,p.Z)(e.getValue())}),header:e=>(0,r.jsx)(c.Rr,{value:"Project",...e})}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.system,{id:"system",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"System",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{ignoreChildActions:t===v.E.MONITORED||t===v.E.MUTED,resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:i===f.D$.TABLE?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Table name",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,r.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:i===f.D$.FIELD?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Field name",...e}),size:300}),a.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,r.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Data type",...e})}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,r.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:{columns:n}:{columns:n}},_=e=>{let{initialFilterTabIndex:i=0}=e,[t,r]=(0,l.useState)(i),a=(0,l.useMemo)(()=>[{label:"Action Required",filters:[f.LL.ADDITION,f.LL.REMOVAL],childFilters:[f.LL.ADDITION,f.LL.REMOVAL]},{label:"Monitored",filters:[f.LL.MONITORED],childFilters:[],changeTypeOverride:v.E.MONITORED},{label:"Unmonitored",filters:[f.LL.MUTED],childFilters:[],changeTypeOverride:v.E.MUTED}],[]);return{filterTabs:a,filterTabIndex:t,setFilterTabIndex:r,activeDiffFilters:a[t].filters,activeChildDiffFilters:a[t].childFilters,activeChangeTypeOverride:a[t].changeTypeOverride}},y=t(47182),D=t(38347),b=t(7940),T=t(80285),w=t(36168),R=t(57454);let H={items:[],total:0,page:1,size:50,pages:1},M=()=>(0,r.jsx)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,r.jsxs)(n.gCW,{children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,r.jsx)(n.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var C=e=>{var i,t;let{resourceUrn:g}=e,h=(0,o.useRouter)(),[m,L]=(0,l.useState)(""),{filterTabs:x,setFilterTabIndex:v,filterTabIndex:p,activeDiffFilters:C,activeChildDiffFilters:Z,activeChangeTypeOverride:E}=_({initialFilterTabIndex:(null===(i=h.query)||void 0===i?void 0:i.filterTabIndex)?Number(null===(t=h.query)||void 0===t?void 0:t.filterTabIndex):void 0}),{PAGE_SIZES:I,pageSize:O,setPageSize:F,onPreviousPageClick:k,isPreviousPageDisabled:A,onNextPageClick:V,isNextPageDisabled:N,startRange:S,endRange:$,pageIndex:z,setTotalPages:G,resetPageIndexToDefault:P}=(0,c.oi)();(0,l.useEffect)(()=>{P()},[g,m,P,C,Z]);let{isFetching:U,isLoading:B,data:W}=(0,u.z8)({staged_resource_urn:g,page:z,size:O,child_diff_status:Z,diff_status:C,search:m}),q=(0,b.G)(null==W?void 0:W.items[0]),{columns:Q}=j({resourceType:q,changeTypeOverride:E}),{items:K,total:Y,pages:J}=(0,l.useMemo)(()=>null!=W?W:H,[W]);(0,l.useEffect)(()=>{G(J)},[J,G]);let X=(0,l.useMemo)(()=>Q,[Q]),{navigateToDetectionResults:ee}=(0,y.Z)(),ei=(0,a.b7)({getCoreRowModel:(0,s.sC)(),getGroupedRowModel:(0,s.qe)(),getExpandedRowModel:(0,s.rV)(),getRowId:T.Z,columns:X,manualPagination:!0,data:K,columnResizeMode:"onChange"});return B?(0,r.jsx)(c.I4,{rowHeight:36,numRows:36}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{filterTabs:x,filterTabIndex:p,onChange:v}),(0,r.jsx)(c.Q$,{children:(0,r.jsx)(n.kCb,{direction:"row",alignItems:"center",justifyContent:"space-between",width:"full",children:(0,r.jsxs)(n.kCb,{gap:6,align:"center",children:[(0,r.jsx)(n.xuv,{flexShrink:0,children:(0,r.jsx)(R.M,{value:m,onChange:L})}),(0,r.jsx)(D.Z,{})]})})}),(0,r.jsx)(c.ZK,{tableInstance:ei,onRowClick:e=>ee({resourceUrn:e.urn,filterTabIndex:p}),getRowIsClickable:e=>q!==f.D$.FIELD||(0,w.Z)(e),emptyTableNotice:(0,r.jsx)(M,{})}),(0,r.jsx)(c.s8,{totalRows:Y||0,pageSizes:I,setPageSize:F,onPreviousPageClick:k,isPreviousPageDisabled:A||U,onNextPageClick:V,isNextPageDisabled:N||U,startRange:S,endRange:$})]})}},54409:function(e,i,t){"use strict";t.d(i,{Z:function(){return m}});var r=t(24246),a=t(77181),s=t(812),n=t(14047),o=t(62656),l=t(31883);let c=(0,a.IUT)({displayName:"MonitorOffIcon",viewBox:"0 0 12 12",path:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.47125 1H5.85H6.15H6.51188L6.58875 1.36914L7.52062 5.83268L6.42408 4.98635L6.03375 3.11719L5.8038 4.50761L4.99323 3.882L5.40562 1.38867L5.47125 1ZM4.80795 5.0022L4.67675 5.79545L5.48735 6.42109L5.61854 5.62783L4.80795 5.0022ZM6.73856 6.49227L6.96125 7.55866L8.42407 8.6877L8.69498 8.00228L7.94864 7.42624L7.88625 7.58398L7.83501 7.33853L6.73856 6.49227ZM8.33138 6.45844L9.07755 7.03434L9.30188 6.4668H11.55H12V5.5293H11.55H9H8.69812L8.58375 5.82031L8.33138 6.45844ZM7.27551 9.06443L7.35399 9.125H7.28813L7.27551 9.06443ZM4.49147 6.91566L5.30209 7.54131L4.79437 10.6113L4.72875 11H4.35H4.05H3.69563L3.61313 10.6406L2.64563 6.46875H0.45H0V5.53125H0.45H2.69777L3.49646 6.1477L4.15125 8.97266L4.49147 6.91566Z",fill:"currentColor"}),(0,r.jsx)("g",{"clip-path":"url(#clip0_341_3102)",children:(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.6755 10.4168L0.164222 2.304L0.775218 1.51237L11.2865 9.62517L10.6755 10.4168Z",fill:"currentColor"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_341_3102",children:(0,r.jsx)("rect",{width:"11.5",height:"9",fill:"white",transform:"translate(0 1.5)"})})})]})}),d=(0,a.IUT)({displayName:"MonitorOnIcon",viewBox:"0 0 12 10",path:(0,r.jsx)("path",{d:"M5.47125 0H5.85H6.15H6.51188L6.58875 0.369141L7.88625 6.58398L8.58375 4.82031L8.69812 4.5293H9H11.55H12V5.4668H11.55H9.30188L8.36625 7.83398L8.25188 8.125H7.95H7.65H7.28813L7.21125 7.75586L6.03375 2.11719L4.79437 9.61133L4.72875 10H4.35H4.05H3.69563L3.61313 9.64062L2.64563 5.46875H0.45H0V4.53125H0.45H3H3.35438L3.43688 4.89062L4.15125 7.97266L5.40562 0.388672L5.47125 0Z",fill:"currentColor"})});var u=t(79494),g=t(70675),h=t(7940),m=e=>{let{resource:i,ignoreChildActions:t=!1}=e,m=(0,h.G)(i),[L,{isLoading:x}]=(0,g.v8)(),[v,{isLoading:f}]=(0,g.vi)(),[p,{isLoading:j}]=(0,g.Tl)(),{successAlert:_,errorAlert:y}=(0,n.V)(),D=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id});(0,l.D4)(e)?y((0,s.e$)(e.error,"Failed to confirm resource")):_("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(i.name||"The resource"," is now being monitored."))},b=async()=>{let e=await p({staged_resource_urn:i.urn});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to un-mute resource"):_("".concat(i.name||"The resource"," has been un-muted and is now being monitored."))},T=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to un-mute resource"):_("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(i.name||"The resource"," is now being monitored."))},w=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to confirm resource"):_('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},R=async()=>{let e=await v({staged_resource_urn:i.urn});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to mute resource"):_("Ignored data will not be monitored for changes or added to Fides datasets.","".concat(i.name||"Resource"," ignored"))},H=x||f||j,{diff_status:M,child_diff_statuses:C}=i,Z=m===o.D$.SCHEMA,E=m===o.D$.FIELD,I=Z&&void 0===M||!E&&M===o.LL.ADDITION,O=M!==o.LL.MUTED,F=M===o.LL.MUTED&&!E,k=M===o.LL.MUTED&&E,A=C&&(C[o.LL.ADDITION]||C[o.LL.REMOVAL]),V=M===o.LL.MONITORED&&!t&&A;return(0,r.jsxs)(a.Ugi,{children:[I&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:D,disabled:H,loading:x}),k&&(0,r.jsx)(u.Z,{title:"Un-Mute",icon:(0,r.jsx)(d,{}),onClick:b,disabled:H,loading:x}),F&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:T,disabled:H,loading:x}),V&&(0,r.jsx)(u.Z,{title:"Confirm",icon:(0,r.jsx)(a.nQG,{}),onClick:w,disabled:H,loading:x}),O&&(0,r.jsx)(u.Z,{title:"Ignore",icon:(0,r.jsx)(c,{}),onClick:R,disabled:H,loading:f})]})}},7940:function(e,i,t){"use strict";t.d(i,{G:function(){return a}});var r=t(62656);let a=e=>{var i,t,a;return e?e.resource_type?e.resource_type:(null===(i=e.schemas)||void 0===i?void 0:i.length)?r.D$.DATABASE:(null===(t=e.tables)||void 0===t?void 0:t.length)?r.D$.SCHEMA:(null===(a=e.fields)||void 0===a?void 0:a.length)?r.D$.TABLE:r.D$.FIELD:void 0}},98559:function(e,i){"use strict";i.Z=e=>{let{name:i,urn:t,monitor_config_id:r,database_name:a,schema_name:s,table_name:n,top_level_field_name:o,top_level_field_urn:l}=e;if(!o)return i;let c=t.split(".");return l?t.replace("".concat(l).concat("."),""):([r,a,s,n,o].forEach(e=>{if(e){let i=c.indexOf(e);i>-1&&c.splice(i,1)}}),c.join("."))}},36168:function(e,i){"use strict";i.Z=e=>{var i;return!!e.parent_table_urn&&null!==(i=e.sub_field_urns)&&void 0!==i&&!!i.length&&!e.top_level_field_name}},80356:function(e,i,t){"use strict";var r=t(7940),a=t(36168),s=t(62656);i.Z=e=>(0,r.G)(e)!==s.D$.FIELD||(0,a.Z)(e)},31883:function(e,i,t){"use strict";t.d(i,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=t(19043)}}]);
|
@@ -0,0 +1 @@
|
|
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),i=t(77181);s.Z=e=>(0,a.jsx)(i.rUS,{isExternal:!0,color:"complimentary.500",...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(62656),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(62656),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),e2=t(30234);let e4=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")}),e5={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},cookies:[],id:""},e6=e=>{var s;let t=e.cookies?e.cookies.map(e=>({name:e,path:"/"})):void 0;return{...e,name:null!==(s=e.name)&&void 0!==s?s:"",special_category_legal_basis:e.processes_special_category_data?e.special_category_legal_basis:void 0,third_parties:e.data_shared_with_third_parties?e.third_parties:void 0,shared_categories:e.data_shared_with_third_parties?e.shared_categories:void 0,cookies:t}},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)(e2.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)(e2.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)(e2.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)(e2.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)(e2.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)(e2.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 e5},e3=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=e6(e),r=await s(i,t);if(r){let s=r.filter(s=>s.data_use===e.data_use&&(!s.name||s.name===e.name));s.length>0&&await n({customFieldValues:a,fides_key:s[0].id})}},initialValues:(0,p.useMemo)(()=>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}=e3({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:e4,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)(e2.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)(e2.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)(e2.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)(e2.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)(e2.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(62656);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(62656);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3702],{35287:function(e,t,i){var n=i(24246),r=i(77181),s=i(88038),o=i.n(s);i(27378),t.Z=e=>{let{children:t,title:i,mainProps:s}=e;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:t})]})}},79494:function(e,t,i){var n=i(24246),r=i(77181);t.Z=e=>{let{title:t,icon:i,type:s,...o}=e;return(0,n.jsx)(r.wpx,{size:"small",type:s,"data-testid":"action-".concat(t),icon:i,iconPosition:"start",...o,children:t})}},45896:function(e,t,i){var n=i(24246),r=i(66379);t.Z=e=>{let{filterTabs:t,onChange:i,filterTabIndex:s}=e;return(0,n.jsx)(r.Z,{border:"full-width",mb:5,size:"sm",data:t,borderWidth:1,index:s,onChange:i})}},69828:function(e,t,i){i.d(t,{Y:function(){return o}});var n=i(24246),r=i(77181),s=i(70788);let o=[(0,n.jsx)(r.PJP.S9g,{},"layers"),(0,n.jsx)(r.PJP.ehp,{},"dataset"),(0,n.jsx)(r.PJP.iA_,{},"table"),(0,n.jsx)(r.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];t.Z=e=>{let{resourceUrn:t,parentLink:i,onPathClick:r=()=>{}}=e,l=[];if(t||l.push({title:"All activity"}),t){l.push({title:"All activity",href:i});let e=t.split(".");e.forEach((t,i)=>{0!==i&&l.push({title:t,icon:o[i-1],onClick:t=>{t.preventDefault(),r(e.slice(0,i+1).join("."))}})})}return(0,n.jsx)(s.m,{"data-testid":"results-breadcrumb",items:l})}},38347:function(e,t,i){var n=i(24246),r=i(77181),s=i(56839);t.Z=()=>(0,n.jsxs)(r.J2e,{isLazy:!0,trigger:"hover",children:[(0,n.jsx)(r.xol,{children:(0,n.jsx)(r.UOT,{color:"gray.400"})}),(0,n.jsxs)(r.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,n.jsx)(r.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,n.jsx)(r.QHN,{bgColor:"gray.800"}),(0,n.jsx)(r.baG,{border:"none",children:(0,n.jsxs)(r.MIq,{columns:2,spacing:2,children:[(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Rv,{})," Change detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.$P,{})," Data labeled"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.zj,{})," Monitoring"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.dK,{})," Addition detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Kr,{})," Unmonitored"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.q1,{})," Removal detected"]})]})})]})]})},47182:function(e,t,i){var n=i(86677),r=i(77830);t.Z=()=>{let e=(0,n.useRouter)();return{monitorId:e.query.monitorId,resourceUrn:e.query.resourceUrn,navigateToDetectionResults:t=>{let{resourceUrn:i,filterTabIndex:n}=t;e.push({pathname:r.dS,query:{resourceUrn:i,filterTabIndex:n}})},navigateToDiscoveryResults:t=>{let{resourceUrn:i,filterTabIndex:n}=t;e.push({pathname:r.Sj,query:{resourceUrn:i,filterTabIndex:n}})}}}},56839:function(e,t,i){i.d(t,{dK:function(){return c},Rv:function(){return f},$P:function(){return x},zj:function(){return h},Kr:function(){return I},q1:function(){return u},QL:function(){return j}});var n=i(24246),r=i(77181);let s=(0,r.IUT)({displayName:"CircleIcon",viewBox:"0 0 200 200",path:(0,n.jsx)("path",{fill:"currentColor",d:"M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"})}),o=(0,r.IUT)({displayName:"RightDownArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 8H8V7.23192V1.85539V1.08731H6.46385V1.85539V5.37654L1.62976 0.544855L1.08731 0L0 1.08731L0.542454 1.62976L5.37654 6.46385H1.85539H1.08731V8H1.85539H7.23192Z"})}),l=(0,r.IUT)({displayName:"RightUpArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 0H8V0.768077V6.14461V6.91269H6.46385V6.14461V2.62346L1.62976 7.45515L1.08731 8L0 6.91269L0.542454 6.37024L5.37654 1.53615H1.85539H1.08731V0H1.85539H7.23192Z"})}),a=(0,r.IUT)({displayName:"TagIcon",viewBox:"0 0 9 10",path:(0,n.jsx)("path",{fill:"currentColor",d:"M0 0.5V5L4.5 9.5L9 5L4.5 0.5H0ZM2.25 2.10714C2.4205 2.10714 2.58401 2.17487 2.70457 2.29543C2.82513 2.41599 2.89286 2.5795 2.89286 2.75C2.89286 2.9205 2.82513 3.08401 2.70457 3.20457C2.58401 3.32513 2.4205 3.39286 2.25 3.39286C2.0795 3.39286 1.91599 3.32513 1.79543 3.20457C1.67487 3.08401 1.60714 2.9205 1.60714 2.75C1.60714 2.5795 1.67487 2.41599 1.79543 2.29543C1.91599 2.17487 2.0795 2.10714 2.25 2.10714Z"})});var d=i(28278);let c=()=>(0,n.jsx)(l,{color:"green.400",boxSize:2,mr:2,"data-testid":"add-icon"}),u=()=>(0,n.jsx)(o,{color:"red.400",boxSize:2,mr:2,"data-testid":"remove-icon"}),x=()=>(0,n.jsx)(a,{color:"orange.400",boxSize:3,mr:1,"data-testid":"classify-icon"}),f=()=>(0,n.jsx)(s,{color:"blue.400",boxSize:2.5,mb:"2px",mr:"6px","data-testid":"change-icon"}),h=()=>(0,n.jsx)(s,{color:"green.400",boxSize:2,mr:2,"data-testid":"monitored-icon"}),I=()=>(0,n.jsx)(s,{color:"red.400",boxSize:2,mr:2,"data-testid":"muted-icon"}),j={[d.E.ADDITION]:(0,n.jsx)(c,{}),[d.E.REMOVAL]:(0,n.jsx)(u,{}),[d.E.CLASSIFICATION]:(0,n.jsx)(x,{}),[d.E.CHANGE]:(0,n.jsx)(f,{}),[d.E.MONITORED]:(0,n.jsx)(h,{}),[d.E.MUTED]:(0,n.jsx)(I,{}),[d.E.IN_PROGRESS]:(0,n.jsx)(()=>(0,n.jsx)(s,{color:"orange.400",boxSize:2,mr:2,"data-testid":"in-progress-icon"}),{}),[d.E.NONE]:null}},79947:function(e,t,i){var n=i(24246),r=i(77181);t.Z=e=>{let{type:t}=e;return(0,n.jsx)(r.kCb,{align:"center",h:"full",children:!!t&&(0,n.jsx)(r.j8w,{children:t})})}},87667:function(e,t,i){var n=i(24246),r=i(77181),s=i(56839),o=i(20449),l=i(98559),a=i(80356);t.Z=e=>{let{result:t,changeTypeOverride:i}=e,d=null!=i?i:(0,o.Z)(t);return(0,n.jsxs)(r.kCb,{alignItems:"center",height:"100%",children:[(0,n.jsx)(r.ua7,{label:d,children:(0,n.jsx)("span",{children:s.QL[d]})}),(0,n.jsx)(r.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,a.Z)(t)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,l.Z)(t)})]})}},50169:function(e,t,i){var n=i(24246),r=i(14481),s=i(28278),o=i(20449);let l={[s.E.MUTED]:{color:"marble",label:"Unmonitored"},[s.E.MONITORED]:{color:"success",label:"Monitoring"},[s.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};t.Z=e=>{var t,i,s,a,d;let{result:c,changeTypeOverride:u}=e;if(null===(t=c.user_assigned_data_categories)||void 0===t?void 0:t.length)return(0,n.jsx)(r.A4,{color:"success",value:"Reviewed"});let x=null!=u?u:(0,o.Z)(c);return(0,n.jsx)(r.A4,{color:null!==(a=null===(i=l[x])||void 0===i?void 0:i.color)&&void 0!==a?a:"warning",value:null!==(d=null===(s=l[x])||void 0===s?void 0:s.label)&&void 0!==d?d:"Pending review"})}},28278:function(e,t,i){var n,r;i.d(t,{E:function(){return n}}),(r=n||(n={})).ADDITION="Addition",r.CHANGE="Change",r.REMOVAL="Removal",r.CLASSIFICATION="Classification",r.IN_PROGRESS="Classifying",r.MONITORED="Monitoring",r.MUTED="Unmonitored",r.NONE="--"},74241:function(e,t){t.Z=e=>{let t=e.split(".");return t.length>1?t[1]:""}},20449:function(e,t,i){var n=i(28278),r=i(
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3702],{35287:function(e,t,i){var n=i(24246),r=i(77181),s=i(88038),o=i.n(s);i(27378),t.Z=e=>{let{children:t,title:i,mainProps:s}=e;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:t})]})}},79494:function(e,t,i){var n=i(24246),r=i(77181);t.Z=e=>{let{title:t,icon:i,type:s,...o}=e;return(0,n.jsx)(r.wpx,{size:"small",type:s,"data-testid":"action-".concat(t),icon:i,iconPosition:"start",...o,children:t})}},45896:function(e,t,i){var n=i(24246),r=i(66379);t.Z=e=>{let{filterTabs:t,onChange:i,filterTabIndex:s}=e;return(0,n.jsx)(r.Z,{border:"full-width",mb:5,size:"sm",data:t,borderWidth:1,index:s,onChange:i})}},69828:function(e,t,i){i.d(t,{Y:function(){return o}});var n=i(24246),r=i(77181),s=i(70788);let o=[(0,n.jsx)(r.PJP.S9g,{},"layers"),(0,n.jsx)(r.PJP.ehp,{},"dataset"),(0,n.jsx)(r.PJP.iA_,{},"table"),(0,n.jsx)(r.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];t.Z=e=>{let{resourceUrn:t,parentLink:i,onPathClick:r=()=>{}}=e,l=[];if(t||l.push({title:"All activity"}),t){l.push({title:"All activity",href:i});let e=t.split(".");e.forEach((t,i)=>{0!==i&&l.push({title:t,icon:o[i-1],onClick:t=>{t.preventDefault(),r(e.slice(0,i+1).join("."))}})})}return(0,n.jsx)(s.m,{"data-testid":"results-breadcrumb",items:l})}},38347:function(e,t,i){var n=i(24246),r=i(77181),s=i(56839);t.Z=()=>(0,n.jsxs)(r.J2e,{isLazy:!0,trigger:"hover",children:[(0,n.jsx)(r.xol,{children:(0,n.jsx)(r.UOT,{color:"gray.400"})}),(0,n.jsxs)(r.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,n.jsx)(r.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,n.jsx)(r.QHN,{bgColor:"gray.800"}),(0,n.jsx)(r.baG,{border:"none",children:(0,n.jsxs)(r.MIq,{columns:2,spacing:2,children:[(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Rv,{})," Change detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.$P,{})," Data labeled"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.zj,{})," Monitoring"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.dK,{})," Addition detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Kr,{})," Unmonitored"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.q1,{})," Removal detected"]})]})})]})]})},47182:function(e,t,i){var n=i(86677),r=i(77830);t.Z=()=>{let e=(0,n.useRouter)();return{monitorId:e.query.monitorId,resourceUrn:e.query.resourceUrn,navigateToDetectionResults:t=>{let{resourceUrn:i,filterTabIndex:n}=t;e.push({pathname:r.dS,query:{resourceUrn:i,filterTabIndex:n}})},navigateToDiscoveryResults:t=>{let{resourceUrn:i,filterTabIndex:n}=t;e.push({pathname:r.Sj,query:{resourceUrn:i,filterTabIndex:n}})}}}},56839:function(e,t,i){i.d(t,{dK:function(){return c},Rv:function(){return f},$P:function(){return x},zj:function(){return h},Kr:function(){return I},q1:function(){return u},QL:function(){return j}});var n=i(24246),r=i(77181);let s=(0,r.IUT)({displayName:"CircleIcon",viewBox:"0 0 200 200",path:(0,n.jsx)("path",{fill:"currentColor",d:"M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"})}),o=(0,r.IUT)({displayName:"RightDownArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 8H8V7.23192V1.85539V1.08731H6.46385V1.85539V5.37654L1.62976 0.544855L1.08731 0L0 1.08731L0.542454 1.62976L5.37654 6.46385H1.85539H1.08731V8H1.85539H7.23192Z"})}),l=(0,r.IUT)({displayName:"RightUpArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 0H8V0.768077V6.14461V6.91269H6.46385V6.14461V2.62346L1.62976 7.45515L1.08731 8L0 6.91269L0.542454 6.37024L5.37654 1.53615H1.85539H1.08731V0H1.85539H7.23192Z"})}),a=(0,r.IUT)({displayName:"TagIcon",viewBox:"0 0 9 10",path:(0,n.jsx)("path",{fill:"currentColor",d:"M0 0.5V5L4.5 9.5L9 5L4.5 0.5H0ZM2.25 2.10714C2.4205 2.10714 2.58401 2.17487 2.70457 2.29543C2.82513 2.41599 2.89286 2.5795 2.89286 2.75C2.89286 2.9205 2.82513 3.08401 2.70457 3.20457C2.58401 3.32513 2.4205 3.39286 2.25 3.39286C2.0795 3.39286 1.91599 3.32513 1.79543 3.20457C1.67487 3.08401 1.60714 2.9205 1.60714 2.75C1.60714 2.5795 1.67487 2.41599 1.79543 2.29543C1.91599 2.17487 2.0795 2.10714 2.25 2.10714Z"})});var d=i(28278);let c=()=>(0,n.jsx)(l,{color:"green.400",boxSize:2,mr:2,"data-testid":"add-icon"}),u=()=>(0,n.jsx)(o,{color:"red.400",boxSize:2,mr:2,"data-testid":"remove-icon"}),x=()=>(0,n.jsx)(a,{color:"orange.400",boxSize:3,mr:1,"data-testid":"classify-icon"}),f=()=>(0,n.jsx)(s,{color:"blue.400",boxSize:2.5,mb:"2px",mr:"6px","data-testid":"change-icon"}),h=()=>(0,n.jsx)(s,{color:"green.400",boxSize:2,mr:2,"data-testid":"monitored-icon"}),I=()=>(0,n.jsx)(s,{color:"red.400",boxSize:2,mr:2,"data-testid":"muted-icon"}),j={[d.E.ADDITION]:(0,n.jsx)(c,{}),[d.E.REMOVAL]:(0,n.jsx)(u,{}),[d.E.CLASSIFICATION]:(0,n.jsx)(x,{}),[d.E.CHANGE]:(0,n.jsx)(f,{}),[d.E.MONITORED]:(0,n.jsx)(h,{}),[d.E.MUTED]:(0,n.jsx)(I,{}),[d.E.IN_PROGRESS]:(0,n.jsx)(()=>(0,n.jsx)(s,{color:"orange.400",boxSize:2,mr:2,"data-testid":"in-progress-icon"}),{}),[d.E.NONE]:null}},79947:function(e,t,i){var n=i(24246),r=i(77181);t.Z=e=>{let{type:t}=e;return(0,n.jsx)(r.kCb,{align:"center",h:"full",children:!!t&&(0,n.jsx)(r.j8w,{children:t})})}},87667:function(e,t,i){var n=i(24246),r=i(77181),s=i(56839),o=i(20449),l=i(98559),a=i(80356);t.Z=e=>{let{result:t,changeTypeOverride:i}=e,d=null!=i?i:(0,o.Z)(t);return(0,n.jsxs)(r.kCb,{alignItems:"center",height:"100%",children:[(0,n.jsx)(r.ua7,{label:d,children:(0,n.jsx)("span",{children:s.QL[d]})}),(0,n.jsx)(r.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,a.Z)(t)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,l.Z)(t)})]})}},50169:function(e,t,i){var n=i(24246),r=i(14481),s=i(28278),o=i(20449);let l={[s.E.MUTED]:{color:"marble",label:"Unmonitored"},[s.E.MONITORED]:{color:"success",label:"Monitoring"},[s.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};t.Z=e=>{var t,i,s,a,d;let{result:c,changeTypeOverride:u}=e;if(null===(t=c.user_assigned_data_categories)||void 0===t?void 0:t.length)return(0,n.jsx)(r.A4,{color:"success",value:"Reviewed"});let x=null!=u?u:(0,o.Z)(c);return(0,n.jsx)(r.A4,{color:null!==(a=null===(i=l[x])||void 0===i?void 0:i.color)&&void 0!==a?a:"warning",value:null!==(d=null===(s=l[x])||void 0===s?void 0:s.label)&&void 0!==d?d:"Pending review"})}},28278:function(e,t,i){var n,r;i.d(t,{E:function(){return n}}),(r=n||(n={})).ADDITION="Addition",r.CHANGE="Change",r.REMOVAL="Removal",r.CLASSIFICATION="Classification",r.IN_PROGRESS="Classifying",r.MONITORED="Monitoring",r.MUTED="Unmonitored",r.NONE="--"},74241:function(e,t){t.Z=e=>{let t=e.split(".");return t.length>1?t[1]:""}},20449:function(e,t,i){var n=i(28278),r=i(62656);t.Z=e=>e.diff_status===r.LL.ADDITION?n.E.ADDITION:e.diff_status===r.LL.REMOVAL?n.E.REMOVAL:e.diff_status===r.LL.CLASSIFYING||e.diff_status===r.LL.CLASSIFICATION_QUEUED?n.E.IN_PROGRESS:e.diff_status===r.LL.CLASSIFICATION_ADDITION||e.diff_status===r.LL.CLASSIFICATION_UPDATE?n.E.CLASSIFICATION:e.child_diff_statuses?e.child_diff_statuses[r.LL.CLASSIFYING]||e.child_diff_statuses[r.LL.CLASSIFICATION_QUEUED]?n.E.IN_PROGRESS:e.child_diff_statuses[r.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[r.LL.CLASSIFICATION_UPDATE]?n.E.CLASSIFICATION:e.child_diff_statuses[r.LL.ADDITION]||e.child_diff_statuses[r.LL.REMOVAL]?n.E.CHANGE:e.diff_status===r.LL.MONITORED?n.E.MONITORED:e.diff_status===r.LL.MUTED?n.E.MUTED:n.E.NONE:n.E.NONE},80285:function(e,t){t.Z=e=>e.urn}}]);
|