ethyca-fides 2.62.1b0__py2.py3-none-any.whl → 2.62.1b1__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.62.1b0.dist-info → ethyca_fides-2.62.1b1.dist-info}/METADATA +1 -1
- {ethyca_fides-2.62.1b0.dist-info → ethyca_fides-2.62.1b1.dist-info}/RECORD +211 -207
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/2263583b0e44_add_shared_monitor_config.py +82 -0
- fides/api/models/detection_discovery.py +66 -1
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/Sez6kqW5dI0lK60IMwICO/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1327-da0303f70d12fb20.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1817-d2543e460cec0dcb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1904-25e5d4f1b8146fb3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{2310-0d63c66c2685e83c.js → 2310-6a5fb2f76f7b6491.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3119-b5e40d8d24af1e79.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3426-77fccf2c9a5e10cd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3513-87b54d931698986f.js → 3513-293b1e54699cf3e7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3872-6b828cb00fb2ce93.js → 3872-99da5bb6140ff810.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3923-c6dcaeaa3267f254.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/401-a882199f6c94a4dc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4060-c657e58514e91e91.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4121-ec1d8faa3cf5783c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4481-9357e3930d35073b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5258-49e73e5998c01254.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5487-62955c11bab63734.js → 5487-218e4847b8250fbb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5683-3d5c4194b1b1493e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5973-d776c0029db45971.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6277-db781b6c1dde3c84.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6853-348fe2ba132b400c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{6954-d02d474ba30756b2.js → 6954-04030a21a0c8cf5a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7553-0f3e9e7eaf1a8b62.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/79-d877d3bde220da44.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/796-7424eb6391142ccd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7980-041df432c4d3a68b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9494-0df032fe6ee531a5.js → 9494-d1fd4fb83c3d4836.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-f8ea7d0127f81294.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9965-92f4a28823a5e623.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-371b155655c83a1e.js → _app-94950df9c97cd079.js} +69 -69
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-7d789458fb296270.js → manual-1292fd216f2839c7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-90320455052466cd.js → multiple-2ffc37614e9d1fa9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-0234733a90ed5127.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-bcc515a765c0119d.js → add-vendors-c8033d6560635046.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-2ba21b95aa3bb15e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-5ef03041a530b0e2.js → privacy-experience-fd71fb440dbe60e4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-5a63fc903408412e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-ffa15d7ff64a9f05.js → properties-5960170d492acb03.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-80bd51f8217edae4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-7ddf45ffd49533b0.js → [resourceUrn]-18e3faf7963962e4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-ecf23116a845188a.js → [projectUrn]-a10a0f3e6592f350.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-79f8e613827c55c1.js → projects-6971531bb09dff3a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-ed213bc1b7041aa2.js → [resourceUrn]-7320524a47104798.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-1f033ca5a0702018.js → resources-51d99174c8006eb5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-e950d41b75f86c85.js → data-catalog-4dbc71d8be9765f3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-67ddc090cf949af4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-07ff657ee49e5742.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-dbc8c95c22b9f2aa.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-beedbc38ee2b0094.js → activity-db3853a09933097a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-f38b3ef885a29ea6.js → [resourceUrn]-4c526db0c30c488a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-29fd0d5a73f13a00.js → detection-6f27dbb7c8edc69d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-9a80241f1028c470.js → [resourceUrn]-562d2b8ae90dd1f0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-c58333981b1522c9.js → discovery-fe7f51502eda57c9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-2d6f95b2769a0936.js → datamap-3aaa99709d83a1f6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-3536ae978741b659.js → [...subfieldNames]-c08363922838022a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-8b5afe14cf42a4ac.js → [collectionName]-f12df2140e309dfb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-b8dca4298b5bb085.js → [datasetId]-3f564c8d6cfb03d4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-157b00d23b651d12.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-9d29dd6cf109891d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-ebf54ea9874c59ae.js → [id]-b078218865a8fd28.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-b01f89d250ff52af.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-9fc15228581786e6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-868b60407eae35da.js → index-2e6ba5382358fcf8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-43abc599f0768331.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-d69c9f1007e76046.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-5f41afae411cd8a4.js → messaging-71166bf207804754.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-fec150afcfeb3fb5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-2862630f0e9e484b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-35e58b5ed6b12b2b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-bb02092af39446da.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-6baa485385ce0678.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{properties-f00530710b699afd.js → properties-4a5e8ec41574c6b5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-707551df97d5eebd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-e4df123bef1ff2b1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-2fd6b0ff9b6741fc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-3a829c53d5d723d2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-0daa256958675a23.js → domain-records-92e8246170b492b5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/locations-4194ce716b81480d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-9404a6b0b2951992.js → organization-b235f961f9ca39a6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-48be14ad09ed4133.js → test-datasets-99cd1a12ae0373b0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-b03403fed4dd8805.js → [id]-01006a55ac873135.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-ae591953b24e2fc9.js → systems-45990d85a4c5739b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-ec739e169cd5eafe.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-603c2bdbd8dc00ca.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-592e497369673e1a.js +1 -0
- fides/ui-build/static/admin/_next/static/css/{c0c2eb63ad3e7390.css → 1b227ba7eabbfe2f.css} +1 -1
- fides/ui-build/static/admin/_next/static/css/5ded47c57dae5baf.css +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-preview.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
- fides/ui-build/static/admin/lib/fides.js +2 -2
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/poc/ant-components.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
- fides/ui-build/static/admin/poc/forms.html +1 -1
- fides/ui-build/static/admin/poc/table-migration.html +1 -0
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1327-92a38135ee8d55ec.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1817-721fdeb29c07c6be.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1904-7e5354990377a849.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3119-e441b14cdab4320e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3426-e49cb4766324b2dd.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/355-e4340980d72b4faa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4060-9593a3f98e600487.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4121-5c3af879cdd8b3be.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4481-8398edf74aabb8ea.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4723-4c3c7a375e998c15.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5258-e000d07844eccf7e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5626-1b636798faad78e1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5683-44966a05fa5ad566.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5826-ce34f25ac2eeb807.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-56d90405c3616068.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6277-c35c8cc806f7571f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6853-0cee00c9da26a40e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/79-e5884e6878fc1bbb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7980-e17dda2f50ec76b8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-74320abc2e9a4550.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a69f8946466471aa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-49b9f1b56262dfdc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-12f3ba4609bc2ba5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-b959d61c2a3682b3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-84ead584a88ab662.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-90f1975f559fff3e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-4b820a3173f35504.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-1e26702b1a7e0e12.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-1f0c4e2e5d0b5bf6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-c39e8e2269883796.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-9db81467fa254996.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-ebc41649161f7fb9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-b89b9f68ccc69c1b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-928430cd40c35ef2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-07ef58b04404479d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-595ed9f6ca438020.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-b3384299166bcd1e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-6a6016708efb5f4f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-ba15c12c89ee10f8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-0f2daeec241bd1a2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-0401208a3128fa4d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/locations-4fbab6716326060d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-913efe5371344de6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-dc11ba29dbd4708b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-c0b2113b44f46112.js +0 -1
- fides/ui-build/static/admin/_next/static/css/b89fc4b36b501cf6.css +0 -1
- fides/ui-build/static/admin/_next/static/yjsK0CvslnuEmY5vNuxQ5/_buildManifest.js +0 -1
- {ethyca_fides-2.62.1b0.dist-info → ethyca_fides-2.62.1b1.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.62.1b0.dist-info → ethyca_fides-2.62.1b1.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.62.1b0.dist-info → ethyca_fides-2.62.1b1.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.62.1b0.dist-info → ethyca_fides-2.62.1b1.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{yjsK0CvslnuEmY5vNuxQ5 → Sez6kqW5dI0lK60IMwICO}/_ssgManifest.js +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1099-98458e8e9ff67508.js → 1099-b652e6f9a0cd778b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1100-4106d99f5e1ebd75.js → 1100-e19e94b0a6486255.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2921-ca04a0476e2e56c5.js → 2921-771dc5d9e95dc6b4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3505-e58b93f9c1cbdcad.js → 3505-313087fc1744a0ca.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{69-dc52e39d26a4ad14.js → 69-ef4c11c574b4e6dd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8433-a77c2cd1c1a6887e.js → 8433-755359b501d32eaa.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8499-34a34015c91fc38b.js → 8499-06ab15acbfec037c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9327-a25347d72bfbe680.js → 9327-b691be8352e31b58.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{404-c00773c4c6e930af.js → 404-e868487119cd14fc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-d4137bb7fdc1ac6e.js → [id]-94391554a7607c5b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-a5a95ac63b1ce206.js → [id]-596dd2a35b455f21.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-946ce1a2aa1500d4.js → new-fa7f0d2639e12a5a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-7797e367dd946a18.js → consent-dd2a0e3b536b8b42.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-22812f08e81bd4f3.js → [id]-111b07344f1ee9e4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-ca22869201847ccc.js → add-template-c41f368fb6b35de4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-173bd3ad45ea61c6.js → ant-components-3dabaf6828acb2cb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-4dfe984ad80927cd.js → AntForm-784081c774042249.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-f790e1ea5cbc26c0.js → FormikAntFormItem-63905f2382f158cd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-af9e682ec620e990.js → FormikControlled-43f6eab28eae7b56.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-6ce407101daa6000.js → FormikField-e4a07abc908fc9b5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-9ee8cf14a93eaa4a.js → forms-71a3bfb94280fc49.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-25a3add8e7982e43.js → configure-42213855a0a8c209.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-081f13526443e0a6.js → [id]-d547a1da0b74f00f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-17fb474e458b63e7.js → add-property-a7de6f8409a76358.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-177919b4ccf8f660.js → about-704fc28e61b17247.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-26810d1ffedcd156.js → domains-f0e9ee8756a65540.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-eb78b645d0c1d4ea.js → email-templates-a4771098466af1ed.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-0a3aa951ef4a44ba.js → regulations-8cff97fe57f42ed3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-69176abe09cf9b52.js → new-b124cc24b930c9e1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{webpack-abd3efcb23c0bb03.js → webpack-3a61b934ba2fb620.js} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{13687:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/messaging",function(){return i(61463)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var n=i(24246),s=i(91942),r=i(88038),l=i.n(r),a=i(86677);i(27378);var o=i(25980),c=i(90867),u=i(77830),d=()=>{let e=(0,a.useRouter)();return(0,n.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(s.xuv,{children:[(0,n.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(s.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,n.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:u}=e,m=(0,o.hz)(),p=(0,a.useRouter)(),h="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,x=!(m.flags.privacyRequestsConfiguration&&h),{data:g}=(0,c.JE)(void 0,{skip:x}),{data:f}=(0,c.PW)(void 0,{skip:x}),y=m.flags.privacyRequestsConfiguration&&(!g||!f)&&h;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,n.jsx)(d,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(91942),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:a,rightContent:o,style:c,...u}=e;return(0,n.jsxs)("div",{...u,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.lQT,{className:i||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return c},c6:function(){return s},cj:function(){return h},e$:function(){return a},fn:function(){return o},iC:function(){return p},nU:function(){return d},tB:function(){return u}});var n,s,r=i(19043);let l="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:l};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:i}=e;return{status:i,message:a(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=s||(s={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},h=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),s=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?i=t.data.detail:(0,s.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var n=i(24246),s=i(91942);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)},successAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return c}});var n=i(24246),s=i(91942),r=i(79894),l=i.n(r),a=i(27378);let{Text:o}=s.AntTypography,c=e=>{let{items:t,...i}=e,r=(0,a.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,a={...e},c=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:a.title})),c)?a.title=(0,n.jsx)(s.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,n.jsx)(l(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,n.jsx)(s.zrq,{items:r,...i})}},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return s},kN:function(){return l},qX:function(){return a},rE:function(){return r}});var n=i(61317);let s=[...new Map([[n.q2.APPROVED,"Approved"],[n.q2.CANCELED,"Canceled"],[n.q2.COMPLETE,"Completed"],[n.q2.DENIED,"Denied"],[n.q2.ERROR,"Error"],[n.q2.IN_PROCESSING,"In Progress"],[n.q2.PENDING,"New"],[n.q2.PAUSED,"Paused"],[n.q2.IDENTITY_UNVERIFIED,"Unverified"],[n.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[n.Us.ACCESS,"Access"],[n.Us.ERASURE,"Erasure"],[n.Us.CONSENT,"Consent"],[n.Us.UPDATE,"Update"]]),l=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),a={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3",gcs:"gcs"}},61463:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var n=i(24246),s=i(91942),r=i(27378),l=i(812),a=i(14047),o=i(77213),c=i(77830),u=i(58754),d=i(7426),m=i(71784),p=i(90867),h=i(34090),x=i(40324),g=e=>{let{messagingDetails:t}=e,{successAlert:i}=(0,a.V)(),{handleError:r}=(0,a.H)(),[o]=(0,p.SU)(),c=t.service_type===m.qX.twilio_email||t.service_type===m.qX.mailgun,u=t.service_type===m.qX.twilio_text,d=async e=>{if(c){let t=await o({email:e.email});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}if(u){let t=await o({phone_number:e.phone});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,mb:5,children:"Test connection"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:{email:"",phone:""},onSubmit:d,children:e=>{let{isSubmitting:t,resetForm:i}=e;return(0,n.jsxs)(h.l0,{children:[c?(0,n.jsx)(x.j0,{name:"email",label:"Email",placeholder:"youremail@domain.com",isRequired:!0}):null,u?(0,n.jsx)(x.j0,{name:"phone",label:"Phone",placeholder:"+10000000000",isRequired:!0}):null,(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]})},f=()=>{var e;let{successAlert:t}=(0,a.V)(),[i,o]=(0,r.useState)(""),{handleError:c}=(0,a.H)(),{data:u}=(0,p.S3)({type:m.qX.mailgun}),[d]=(0,p.h9)(),[f]=(0,p.iI)(),y=async e=>{let i=await d({service_type:m.qX.mailgun,details:{is_eu_domain:"false",domain:e.domain}});(0,l.D4)(i)?c(i.error):(t("Mailgun email successfully updated. You can now enter your security key."),o("apiKey"))},j=async e=>{let i=await f({details:{mailgun_api_key:e.api_key},service_type:m.qX.mailgun});(0,l.D4)(i)?c(i.error):(t("Mailgun security key successfully updated."),o("testConnection"))},v={domain:null!==(e=null==u?void 0:u.details.domain)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Mailgun messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:v,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(h.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(x.j0,{name:"domain",label:"Domain",placeholder:"Enter domain","data-testid":"option-twilio-domain",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{htmlType:"submit",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"apiKey"===i||"testConnection"===i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:{api_key:""},onSubmit:j,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(h.l0,{children:[(0,n.jsx)(x.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===i?(0,n.jsx)(g,{messagingDetails:u||{service_type:m.qX.mailgun}}):null]})},y=()=>{var e;let[t,i]=(0,r.useState)(""),{successAlert:o}=(0,a.V)(),{handleError:c}=(0,a.H)(),{data:u}=(0,p.S3)({type:m.qX.twilio_email}),[d]=(0,p.h9)(),[f]=(0,p.iI)(),y=async e=>{let t=await d({service_type:m.qX.twilio_email,details:{twilio_email_from:e.email}});(0,l.D4)(t)?c(t.error):(o("Twilio email successfully updated. You can now enter your security key."),i("configureTwilioEmailSecrets"))},j=async e=>{let t=await f({details:{twilio_api_key:e.api_key},service_type:m.qX.twilio_email});(0,l.D4)(t)?c(t.error):(o("Twilio email secrets successfully updated."),i("testConnection"))},v={email:null!==(e=null==u?void 0:u.details.twilio_email_from)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio Email messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:v,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(h.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(x.j0,{name:"email",label:"Email",placeholder:"Enter email",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"configureTwilioEmailSecrets"===t||"testConnection"===t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:{api_key:""},onSubmit:j,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(h.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(x.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===t?(0,n.jsx)(g,{messagingDetails:u||{service_type:m.qX.twilio_email}}):null]})},j=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,o]=(0,r.useState)(""),{data:c}=(0,p.S3)({type:"twilio_text"}),[u]=(0,p.iI)(),d=async i=>{let n=await u({details:{twilio_account_sid:i.account_sid,twilio_auth_token:i.auth_token,twilio_messaging_service_sid:i.messaging_service_sid,twilio_sender_phone_number:i.phone},service_type:m.qX.twilio_text});(0,l.D4)(n)?t(n.error):(e("Twilio text secrets successfully updated."),o("testConnection"))};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio SMS messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(h.J9,{initialValues:{account_sid:"",auth_token:"",messaging_service_sid:"",phone:""},onSubmit:d,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(h.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(x.j0,{name:"account_sid",label:"Account SID",placeholder:"Enter account SID",isRequired:!0}),(0,n.jsx)(x.j0,{name:"auth_token",label:"Auth token",placeholder:"Enter auth token",type:"password",isRequired:!0}),(0,n.jsx)(x.j0,{name:"messaging_service_sid",label:"Messaging Service SID",placeholder:"Enter messaging service SID"}),(0,n.jsx)(x.j0,{name:"phone",label:"Phone Number",placeholder:"Enter phone number"})]}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"testConnection"===i?(0,n.jsx)(g,{messagingDetails:c||{service_type:m.qX.twilio_text}}):null]})},v=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,h]=(0,r.useState)(""),[x]=(0,p.h9)(),[g]=(0,d.L)(),{data:v}=(0,p.JE)();(0,r.useEffect)(()=>{v&&h(null==v?void 0:v.service_type)},[v]);let _=async i=>{let{value:n}=i.target,s=await g({notifications:{notification_service_type:n,send_request_completion_notification:!0,send_request_receipt_notification:!0,send_request_review_notification:!0},execution:{subject_identity_verification_required:!0}});if((0,l.D4)(s))t(s.error);else if(n!==m.qX.twilio_text)h(n);else{let i=await x({service_type:m.qX.twilio_text});(0,l.D4)(i)?t(i.error):(e("Messaging provider saved successfully."),h(n))}};return(0,n.jsxs)(o.Z,{title:"Configure Privacy Requests - Messaging",children:[(0,n.jsx)(u.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Configure requests",href:c.fz},{title:"Messaging"}]}),(0,n.jsx)(s.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure your messaging provider"}),(0,n.jsxs)(s.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,n.jsxs)(s.xuv,{children:["Fides requires a messsaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,n.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"documentation"})," ","to setup a messaging service that Fides supports. Ensure you have completed the setup for the preferred messaging provider and have the details handy prior to the following steps."]}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose service type to configure"}),(0,n.jsx)(s.y02.Group,{onChange:_,value:i,"data-testid":"privacy-requests-messaging-provider-selection",className:"p-3",children:(0,n.jsxs)(s.jqI,{children:[(0,n.jsx)(s.y02,{value:m.qX.mailgun,"data-testid":"option-mailgun",children:"Mailgun Email"},m.qX.mailgun),(0,n.jsx)(s.y02,{value:m.qX.twilio_email,"data-testid":"option-twilio-email",children:"Twilio Email"},m.qX.twilio_email),(0,n.jsx)(s.y02,{value:m.qX.twilio_text,"data-testid":"option-twilio-sms",children:"Twilio SMS"},m.qX.twilio_text)]})}),i===m.qX.mailgun?(0,n.jsx)(f,{}):null,i===m.qX.twilio_email?(0,n.jsx)(y,{}):null,i===m.qX.twilio_text?(0,n.jsx)(j,{}):null]})]})},_=()=>(0,n.jsx)(v,{})},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return l},D4:function(){return s},Dy:function(){return o},XD:function(){return c},cz:function(){return u},hE:function(){return a},oK:function(){return r}});var n=i(76649);let s=e=>"error"in e,r=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,l=e=>(0,n.Ln)({status:"number",data:{}},e),a=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>r(e,t),s=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>r(i,t[e]));class l{static narrow(e){return new l(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof l?e.NF:e instanceof Function?e:t=>n(e,t);return new l(e=>t(e)&&i(e))}}new l(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=13687)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return i(64665)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var n=i(24246),s=i(91942),r=i(88038),a=i.n(r),l=i(86677);i(27378);var o=i(25980),d=i(90867),c=i(77830),u=()=>{let e=(0,l.useRouter)();return(0,n.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(s.xuv,{children:[(0,n.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(s.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:c}=e,m=(0,o.hz)(),h=(0,l.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(m.flags.privacyRequestsConfiguration&&p),{data:v}=(0,d.JE)(void 0,{skip:x}),{data:f}=(0,d.PW)(void 0,{skip:x}),j=m.flags.privacyRequestsConfiguration&&(!v||!f)&&p;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(a(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[j?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(91942),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:a=!0,children:l,rightContent:o,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.lQT,{className:i||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:l?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return d}});var n=i(24246),s=i(91942),r=i(34090),a=i(27378),l=i(46238),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:m="inline",helperText:h,...p}=e,[x,v,{setValue:f}]=(0,r.U$)(t),j=!!(v.touched&&v.error),[g,y]=(0,a.useState)("");x.value||"tags"!==p.mode&&"multiple"!==p.mode||(x.value=[]),"tags"===p.mode&&"string"==typeof x.value&&(x.value=[x.value]);let _="tags"===p.mode?(e,t)=>e?e.value!==g||x.value.includes(g)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:p.optionRender||void 0,b=e=>{y(e),p.onSearch&&p.onSearch(e)},C=(e,t)=>{f(e),p.onChange&&p.onChange(e,t)};return"inline"===m?(0,n.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,n.jsxs)(s.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,n.jsx)(o.__,{htmlFor:p.id||t,...d,children:i}):null,(0,n.jsxs)(s.jqI,{align:"center",children:[(0,n.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(s.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:_,onSearch:"tags"===p.mode?b:void 0,onChange:C,value:x.value||void 0,status:j?"error":void 0}),h&&(0,n.jsx)(s.Q6r,{children:h}),(0,n.jsx)(o.Bc,{isInvalid:j,message:v.error,fieldName:x.name})]}),(0,n.jsx)(l.b,{label:c})]})]})}):(0,n.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,n.jsxs)(s.gCW,{alignItems:"start",children:[(0,n.jsxs)(s.jqI,{align:"center",children:[i?(0,n.jsx)(o.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,(0,n.jsx)(l.b,{label:c})]}),(0,n.jsx)(s.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:_,onSearch:"tags"===p.mode?b:void 0,onChange:C,value:x.value||void 0,status:j?"error":void 0}),h&&(0,n.jsx)(s.Q6r,{style:{marginTop:0},children:h}),(0,n.jsx)(o.Bc,{isInvalid:j,message:v.error,fieldName:x.name})]})})}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return d},c6:function(){return s},cj:function(){return p},e$:function(){return l},fn:function(){return o},iC:function(){return h},nU:function(){return u},tB:function(){return c}});var n,s,r=i(19043);let a="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:i}=e;return{status:i,message:l(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=s||(s={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),s=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?i=t.data.detail:(0,s.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var n=i(24246),s=i(91942);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(t,i,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(t,i,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var n=i(24246),s=i(91942),r=i(79894),a=i.n(r),l=i(27378);let{Text:o}=s.AntTypography,d=e=>{let{items:t,...i}=e,r=(0,l.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,l={...e},d=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:l.title})),d)?l.title=(0,n.jsx)(s.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,n.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,n.jsx)(s.zrq,{items:r,...i})}},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return s},kN:function(){return a},qX:function(){return l},rE:function(){return r}});var n=i(61317);let s=[...new Map([[n.q2.APPROVED,"Approved"],[n.q2.CANCELED,"Canceled"],[n.q2.COMPLETE,"Completed"],[n.q2.DENIED,"Denied"],[n.q2.ERROR,"Error"],[n.q2.IN_PROCESSING,"In Progress"],[n.q2.PENDING,"New"],[n.q2.PAUSED,"Paused"],[n.q2.IDENTITY_UNVERIFIED,"Unverified"],[n.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[n.Us.ACCESS,"Access"],[n.Us.ERASURE,"Erasure"],[n.Us.CONSENT,"Consent"],[n.Us.UPDATE,"Update"]]),a=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),l={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3",gcs:"gcs"}},64665:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return y}});var n=i(24246),s=i(91942),r=i(27378),a=i(812),l=i(14047),o=i(77213),d=i(77830),c=i(58754),u=i(7426),m=i(71784),h=i(90867),p=i(34090),x=i(97181),v=i(40324),f=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[f,j]=(0,r.useState)(""),[g]=(0,h.gC)(),[y]=(0,h.cf)(),{handleError:_}=(0,l.H)(),{successAlert:b}=(0,l.V)(),C={type:m.DE.gcs,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},k=async e=>{let t=await g({type:m.DE.gcs,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,a.D4)(t)?_(t.error):(j(e.auth_method),b("Google Cloud Storage credentials successfully updated."))},w=async e=>{let t=e.private_key.trim();t.includes("\\n")&&(t=t.replace(/\\n/g,"\n"));let i=await y({details:{type:e.type,project_id:e.project_id,private_key_id:e.private_key_id,private_key:t,client_email:e.client_email,client_id:e.client_id,auth_uri:e.auth_uri,token_uri:e.token_uri,auth_provider_x509_cert_url:e.auth_provider_x509_cert_url,client_x509_cert_url:e.client_x509_cert_url,universe_domain:e.universe_domain},type:m.DE.gcs});(0,a.D4)(i)?_(i.error):b("Google Cloud Storage secrets successfully updated.")};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Google Cloud Storage configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:C,onSubmit:k,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(x.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,n.jsx)(x.d,{name:"auth_method",label:"Auth method",options:[{label:"Service Account Keys",value:"service_account_keys"},{label:"Application Default Credentials",value:"adc"}],"data-testid":"auth_method",isRequired:!0}),(0,n.jsx)(v.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,n.jsx)(s.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"service_account_keys"===f&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:5}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:{type:"",project_id:"",private_key_id:"",private_key:"",client_email:"",client_id:"",auth_uri:"",token_uri:"",auth_provider_x509_cert_url:"",client_x509_cert_url:"",universe_domain:""},onSubmit:w,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(v.j0,{name:"type",label:"Type"}),(0,n.jsx)(v.j0,{name:"project_id",label:"Project ID"}),(0,n.jsx)(v.j0,{name:"private_key_id",label:"Private key ID",type:"password"}),(0,n.jsx)(v.j0,{name:"private_key",label:"Private key",type:"password"}),(0,n.jsx)(v.j0,{name:"client_email",label:"Client email"}),(0,n.jsx)(v.j0,{name:"client_id",label:"Client ID"}),(0,n.jsx)(v.j0,{name:"auth_uri",label:"Auth URI"}),(0,n.jsx)(v.j0,{name:"token_uri",label:"Token URI"}),(0,n.jsx)(v.j0,{name:"auth_provider_x509_cert_url",label:"Auth provider x509 cert URL"}),(0,n.jsx)(v.j0,{name:"client_x509_cert_url",label:"Client x509 cert URL"}),(0,n.jsx)(v.j0,{name:"universe_domain",label:"Universe domain"})]}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]})]})},j=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[f,j]=(0,r.useState)(""),[g]=(0,h.gC)(),[y]=(0,h.cf)(),{handleError:_}=(0,l.H)(),{successAlert:b}=(0,l.V)(),C={type:m.DE.s3,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},k=async e=>{let t=await g({type:m.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,a.D4)(t)?_(t.error):(j(e.auth_method),b("S3 storage credentials successfully updated."))},w=async e=>{let t=await y({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:m.DE.s3});(0,a.D4)(t)?_(t.error):b("S3 storage secrets successfully updated.")};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"S3 storage configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:C,onSubmit:k,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(x.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,n.jsx)(x.d,{name:"auth_method",label:"Auth method",options:[{label:"secret_keys",value:"secret_keys"},{label:"automatic",value:"automatic"}],"data-testid":"auth_method",isRequired:!0}),(0,n.jsx)(v.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,n.jsx)(s.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"secret_keys"===f?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:5}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:w,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(v.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,n.jsx)(v.j0,{name:"aws_secret_access_key",label:"AWS secret access key",type:"password"})]}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null]})},g=()=>{let{successAlert:e}=(0,l.V)(),{handleError:t}=(0,l.H)(),[i,p]=(0,r.useState)(""),{data:x}=(0,h.PW)(),{data:v}=(0,h.Au)({type:i}),[g,{isLoading:y}]=(0,h.gC)(),[_]=(0,u.L)();(0,r.useEffect)(()=>{x&&p(x.type)},[x]);let b=async i=>{let{value:n}=i.target;if(n===m.DE.local){let i=await g({type:n,details:{},format:"json"});(0,a.D4)(i)?t(i.error):e("Configured storage details successfully.")}let s=await _({storage:{active_default_storage_type:n}});(0,a.D4)(s)?t(s.error):p(n)},C={s3:j,gcs:f}[i];return(0,n.jsxs)(o.Z,{title:"Configure Privacy Requests - Storage",children:[(0,n.jsx)(c.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:d.Jw},{title:"Configure requests",href:d.fz},{title:"Storage"}]}),(0,n.jsx)(s.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure storage"}),(0,n.jsxs)(s.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,n.jsx)(s.xuv,{mb:5,children:"Fides requires a storage destination to store and share the results of privacy requests. For a production setup, it is highly recommended to have S3 as a storage destination. Ensure you have completed the setup for the storage destination and have the details handy prior to the following steps."}),(0,n.jsxs)(s.xuv,{children:["To configure a Storage destination, first choose a method to store your results. Fides currently supports"," ",(0,n.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"Local"}),", ",(0,n.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"S3"})," ","and"," ",(0,n.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"GCS"})," ","storage methods."]}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose storage type to configure"}),(0,n.jsx)(s.y02.Group,{disabled:y,onChange:b,value:i,"data-testid":"privacy-requests-storage-selection",className:"p-3",children:(0,n.jsxs)(s.jqI,{children:[(0,n.jsx)(s.y02,{value:"local","data-testid":"option-local",children:"Local"},"local"),(0,n.jsx)(s.y02,{value:"s3","data-testid":"option-s3",children:"S3"},"s3"),(0,n.jsx)(s.y02,{value:"gcs","data-testid":"option-gcs",children:"GCS"},"gcs")]})}),C&&v&&(0,n.jsx)(C,{storageDetails:v})]})]})},y=()=>(0,n.jsx)(g,{})},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return a},D4:function(){return s},Dy:function(){return o},XD:function(){return d},cz:function(){return c},hE:function(){return l},oK:function(){return r}});var n=i(76649);let s=e=>"error"in e,r=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,n.Ln)({status:"number",data:{}},e),l=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>r(e,t),s=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>r(i,t[e]));class a{static narrow(e){return new a(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof a?e.NF:e instanceof Function?e:t=>n(e,t);return new a(e=>t(e)&&i(e))}}new a(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2369],{1565:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests",function(){return r(22017)}])},35287:function(e,t,r){"use strict";var l=r(24246),i=r(91942),a=r(88038),s=r.n(a);r(27378),t.Z=e=>{let{children:t,title:r,mainProps:a}=e;return(0,l.jsxs)(i.kCb,{"data-testid":r,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,l.jsxs)(s(),{children:[(0,l.jsxs)("title",{children:["Fides Admin UI - ",r]}),(0,l.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,l.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,l.jsx)(i.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...a,children:t})]})}},87361:function(e,t,r){"use strict";var l=r(24246),i=r(91942);t.Z=e=>{let{title:t,text:r,onClose:a}=e;return(0,l.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderRadius:"md",justifyContent:"space-between",py:4,pr:6,pl:3,"data-testid":"empty-state",gap:2,position:"relative",children:[a&&(0,l.jsx)(i.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:a}),(0,l.jsx)(i.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,l.jsxs)(i.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,l.jsx)(i.X6q,{fontSize:"md",children:t}),(0,l.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:r})]})]})}},96718:function(e,t,r){"use strict";r.d(t,{z:function(){return a}});var l=r(24246),i=r(91942);let a=e=>{let{...t}=e,r="multiple"===t.mode;return(0,l.jsx)(i.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,dropdownStyle:r?void 0:{width:"auto",minWidth:"200px"},className:"w-auto","data-testid":"filter-select",...t})}},97181:function(e,t,r){"use strict";r.d(t,{d:function(){return d}});var l=r(24246),i=r(91942),a=r(34090),s=r(27378),n=r(46238),o=r(40324);let d=e=>{let{name:t,label:r,labelProps:d,tooltip:u,isRequired:c,layout:p="inline",helperText:m,...h}=e,[x,v,{setValue:f}]=(0,a.U$)(t),y=!!(v.touched&&v.error),[b,_]=(0,s.useState)("");x.value||"tags"!==h.mode&&"multiple"!==h.mode||(x.value=[]),"tags"===h.mode&&"string"==typeof x.value&&(x.value=[x.value]);let j="tags"===h.mode?(e,t)=>e?e.value!==b||x.value.includes(b)?h.optionRender?h.optionRender(e,t):e.label:'Create "'.concat(b,'"'):void 0:h.optionRender||void 0,g=e=>{_(e),h.onSearch&&h.onSearch(e)},q=(e,t)=>{f(e),h.onChange&&h.onChange(e,t)};return"inline"===p?(0,l.jsx)(i.NIc,{isInvalid:y,isRequired:c,children:(0,l.jsxs)(i.rjZ,{templateColumns:r?"1fr 3fr":"1fr",children:[r?(0,l.jsx)(o.__,{htmlFor:h.id||t,...d,children:r}):null,(0,l.jsxs)(i.jqI,{align:"center",children:[(0,l.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(i.WPr,{...x,id:h.id||t,"data-testid":"controlled-select-".concat(x.name),...h,optionRender:j,onSearch:"tags"===h.mode?g:void 0,onChange:q,value:x.value||void 0,status:y?"error":void 0}),m&&(0,l.jsx)(i.Q6r,{children:m}),(0,l.jsx)(o.Bc,{isInvalid:y,message:v.error,fieldName:x.name})]}),(0,l.jsx)(n.b,{label:u})]})]})}):(0,l.jsx)(i.NIc,{isInvalid:y,isRequired:c,children:(0,l.jsxs)(i.gCW,{alignItems:"start",children:[(0,l.jsxs)(i.jqI,{align:"center",children:[r?(0,l.jsx)(o.__,{htmlFor:h.id||t,fontSize:"xs",my:0,mr:1,...d,children:r}):null,(0,l.jsx)(n.b,{label:u})]}),(0,l.jsx)(i.WPr,{...x,id:h.id||t,"data-testid":"controlled-select-".concat(x.name),...h,optionRender:j,onSearch:"tags"===h.mode?g:void 0,onChange:q,value:x.value||void 0,status:y?"error":void 0}),m&&(0,l.jsx)(i.Q6r,{style:{marginTop:0},children:m}),(0,l.jsx)(o.Bc,{isInvalid:y,message:v.error,fieldName:x.name})]})})}},71784:function(e,t,r){"use strict";r.d(t,{DE:function(){return o},I3:function(){return i},kN:function(){return s},qX:function(){return n},rE:function(){return a}});var l=r(61317);let i=[...new Map([[l.q2.APPROVED,"Approved"],[l.q2.CANCELED,"Canceled"],[l.q2.COMPLETE,"Completed"],[l.q2.DENIED,"Denied"],[l.q2.ERROR,"Error"],[l.q2.IN_PROCESSING,"In Progress"],[l.q2.PENDING,"New"],[l.q2.PAUSED,"Paused"],[l.q2.IDENTITY_UNVERIFIED,"Unverified"],[l.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,r]=e;return{label:r,value:t}}),a=new Map([[l.Us.ACCESS,"Access"],[l.Us.ERASURE,"Erasure"],[l.Us.CONSENT,"Consent"],[l.Us.UPDATE,"Update"]]),s=[...a].map(e=>{let[t,r]=e;return{label:r,value:t}}),n={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3",gcs:"gcs"}},22017:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return en}});var l,i,a=r(24246),s=r(35287),n=r(91942),o=r(65218),d=r.n(o),u=r(27378),c=r(25980),p=r(19904),m=r(59003),h=r(92222),x=r(86677),v=r(16125),f=r(91317),y=r(14048),b=r(14481),_=r(90867),j=r(16394),g=r(71784),q=r(61317);let C={approved:{colorScheme:"success",label:"Approved"},complete:{label:"Completed",colorScheme:"success"},awaiting_email_send:{label:"Awaiting Email Send",colorScheme:"marble"},denied:{label:"Denied",colorScheme:"warning"},canceled:{label:"Canceled",colorScheme:"marble"},error:{label:"Error",colorScheme:"error"},in_processing:{label:"In Progress",colorScheme:"caution"},paused:{label:"Paused",colorScheme:"marble"},pending:{label:"New",colorScheme:"info"},identity_unverified:{label:"Unverified",colorScheme:"marble"},requires_input:{colorScheme:"alert",label:"Requires Input"}},E=e=>{let{value:t}=e;return(0,a.jsx)(b.A4,{color:C[t].colorScheme,value:C[t].label,"data-testid":"request-status-badge"})},R=e=>{let t,{daysLeft:r,timeframe:l=45,status:i,includeText:s=!1}=e;if(null==r||i===q.q2.COMPLETE||i===q.q2.CANCELED||i===q.q2.DENIED||i===q.q2.IDENTITY_UNVERIFIED)return null;let n=100*r/l;return n<25?t="error":n>=75?t="success":n>=25&&(t="warning"),(0,a.jsx)(b.A4,{value:s?"".concat(r," days left"):r.toString(),color:t})},w=e=>Array.from(new Set(e.filter(e=>Object.values(q.Us).includes(e.action_type)).map(e=>e.action_type))),S=e=>{let{value:t}=e,r=w(t).map(e=>g.rE.get(e));return(0,a.jsx)(b.WP,{value:r,cellState:{isExpanded:!0}})};var P=r(58452),I=r(57526),k=r(66548),T=r(45489);let D=e=>{let{subjectRequest:t,...r}=e,l=(0,n.qY0)(),i=(0,n.qY0)(),s=(0,n.qY0)(),{handleApproveRequest:o,handleDenyRequest:d,handleDeleteRequest:u,isLoading:c}=(0,T.Z)({subjectRequest:t});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Ugi,{...r,children:["pending"!==t.status?null:(0,a.jsx)(n.wpx,{title:"Approve","aria-label":"Approve",icon:(0,a.jsx)(n.PJP.MCw,{}),onClick:l.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-approve-btn",size:"small"}),"pending"!==t.status?null:(0,a.jsx)(n.wpx,{title:"Deny","aria-label":"Deny",icon:(0,a.jsx)(n.PJP.x8P,{}),onClick:i.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-deny-btn",size:"small"}),(0,a.jsx)(p.ZP,{scopes:[q.Sh.PRIVACY_REQUEST_DELETE],children:(0,a.jsx)(n.wpx,{title:"Delete","aria-label":"Delete",icon:(0,a.jsx)(n.PJP.ZNm,{size:14}),onClick:s.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-delete-btn",size:"small"})})]}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(I.Z,{isOpen:l.isOpen,isLoading:c,onClose:l.onClose,onApproveRequest:o,subjectRequest:t})}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(k.Z,{isOpen:i.isOpen,onClose:i.onClose,onDenyRequest:d})}),(0,a.jsx)(P.Z,{isOpen:s.isOpen,onClose:s.onClose,onConfirm:u,message:(0,a.jsx)(n.xvT,{children:"You are about to permanently delete the privacy request. Are you sure you would like to continue?"})})]})};(l=i||(i={})).STATUS="status",l.DAYS_LEFT="due_date",l.SOURCE="source",l.REQUEST_TYPE="request_type",l.SUBJECT_IDENTITY="subject_identity",l.TIME_RECEIVED="created_at",l.CREATED_BY="created_by",l.REVIEWER="reviewer",l.ID="id",l.ACTIONS="actions";let A=(0,h.Cl)(),O=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return[A.accessor(e=>e.status,{id:"status",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(E,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Status",...e})}),A.accessor(e=>e.days_left,{id:"due_date",cell:e=>{let{row:t,getValue:r}=e;return(0,a.jsx)(R,{daysLeft:r(),timeframe:t.original.policy.execution_timeframe,status:t.original.status})},header:e=>(0,a.jsx)(b.Rr,{value:"Days left",...e})}),...e?[A.accessor(e=>e.source,{id:"source",cell:e=>e.getValue()?(0,a.jsx)(b.A4,{value:e.getValue()}):(0,a.jsx)(b.G3,{value:void 0}),header:e=>(0,a.jsx)(b.Rr,{value:"Source",...e}),enableSorting:!1})]:[],A.accessor(e=>e.policy.rules,{id:"request_type",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(S,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Request type",...e}),enableSorting:!1}),A.accessor(e=>{var t,r;return(null===(t=e.identity)||void 0===t?void 0:t.email.value)||(null===(r=e.identity)||void 0===r?void 0:r.phone_number.value)||""},{id:"subject_identity",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Subject identity",...e}),enableSorting:!1}),A.accessor(e=>e.created_at,{id:"created_at",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:(0,j.p6)(t())})},header:e=>(0,a.jsx)(b.Rr,{value:"Time received",...e})}),A.accessor(e=>{var t;return(null===(t=e.reviewer)||void 0===t?void 0:t.username)||""},{id:"reviewer",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Reviewed by",...e}),enableSorting:!1}),A.accessor(e=>e.id,{id:"id",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Request ID",...e}),enableSorting:!1}),A.display({id:"actions",cell:e=>{let{row:t}=e;return(0,a.jsx)(D,{subjectRequest:t.original})},header:e=>(0,a.jsx)(b.Rr,{value:"Actions",...e}),meta:{disableRowClick:!0}})]},N=e=>{let t=(0,v.v9)(_.dp),r=(0,v.I0)();return{handleStatusChange:t=>{r((0,_.CI)(t)),e()},handleActionTypeChange:t=>{r((0,_.aM)(t)),e()},handleFromChange:t=>{r((0,_.su)(null==t?void 0:t.target.value)),e()},handleToChange:t=>{r((0,_.Ue)(null==t?void 0:t.target.value)),e()},handleClearAllFilters:()=>{r((0,_.Mk)()),e()},...t}};var U=r(96718);let F=e=>{let{onClose:t,onFilterChange:r,...l}=e,{handleStatusChange:i,handleActionTypeChange:s,handleFromChange:o,handleToChange:d,handleClearAllFilters:u,from:c,to:p,status:m,action_type:h}=N(r);return(0,a.jsxs)(n.u_l,{onClose:t,size:"xl",...l,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsx)(n.xBx,{borderBottomWidth:1,borderBottomColor:"gray.200",children:"All Filters"}),(0,a.jsx)(n.olH,{}),(0,a.jsx)(n.fef,{py:4,sx:{"& label":{mb:0}},children:(0,a.jsxs)(n.Kqy,{gap:4,children:[(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",id:"request-date-range-label",children:"Date range"}),(0,a.jsxs)(n.Ugi,{gap:3,children:[(0,a.jsxs)(n.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(n.UiE,{as:"label",htmlFor:"from-date",borderRadius:"md",children:"From"}),(0,a.jsx)(n.IIB,{type:"date",name:"From",value:c,max:p||void 0,onChange:o,borderRadius:"md",id:"from-date","aria-describedby":"request-date-range-label"})]}),(0,a.jsxs)(n.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(n.UiE,{as:"label",htmlFor:"to-date",borderRadius:"md",children:"To"}),(0,a.jsx)(n.IIB,{type:"date",borderRadius:"md",name:"To",value:p,min:c||void 0,onChange:d,id:"to-date","aria-describedby":"request-date-range-label"})]})]})]}),(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",htmlFor:"request-status",children:"Status"}),(0,a.jsx)(U.z,{id:"request-status",mode:"multiple",options:g.I3,value:m,onChange:i,"data-testid":"request-status-filter"})]}),(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",htmlFor:"request-action-type",children:"Request Type"}),(0,a.jsx)(U.z,{id:"request-action-type",mode:"multiple",options:g.kN,value:h,onChange:s,"data-testid":"request-action-type-filter"})]})]})}),(0,a.jsxs)(n.mzw,{justifyContent:"space-between",children:[(0,a.jsx)(n.wpx,{type:"text",onClick:u,children:"Clear all"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:t,children:"Done"})]})]})]})},z=e=>{let{...t}=e,{plus:r}=(0,c.hz)(),[l,i]=(0,u.useState)(""),s=(0,v.v9)(_.dp),o=(0,v.v9)(f.rK),d=(0,n.pmc)(),p=(0,x.useRouter)(),j=(0,v.I0)(),{PAGE_SIZES:g,pageSize:q,setPageSize:C,onPreviousPageClick:E,isPreviousPageDisabled:R,onNextPageClick:w,isNextPageDisabled:S,startRange:P,endRange:I,pageIndex:k,setTotalPages:T,resetPageIndexToDefault:D}=(0,b.oi)(),{isOpen:A,onOpen:N,onClose:U}=(0,n.qY0)(),{data:z,isLoading:Z,isFetching:M}=(0,_.QA)({...s,page:k,size:q}),{items:V,total:Y}=(0,u.useMemo)(()=>{let e=z||{items:[],total:0,pages:0};return T(e.pages),e},[z,T]),B=(0,u.useCallback)(e=>{j((0,_.mU)(e)),i(e),D()},[j,D,i]),G=async()=>{let e;try{await (0,_.py)({...s,token:o})}catch(t){e=t instanceof Error?t.message:"Unknown error occurred"}e&&d({description:"".concat(e),duration:5e3,status:"error"})},L=e=>{p.push("/privacy-requests/".concat(e))},W=(0,m.b7)({getCoreRowModel:(0,h.sC)(),data:V,columns:(0,u.useMemo)(()=>O(r),[r]),getRowId:e=>"".concat(e.status,"-").concat(e.id),manualPagination:!0,columnResizeMode:"onChange"});return(0,a.jsxs)(n.xuv,{...t,children:[(0,a.jsxs)(b.Q$,{children:[(0,a.jsx)(b.HO,{globalFilter:l,setGlobalFilter:B,placeholder:"Search by request ID or identity value"}),(0,a.jsxs)(n.Ugi,{alignItems:"center",spacing:2,children:[(0,a.jsx)(n.wpx,{"data-testid":"filter-btn",onClick:N,children:"Filter"}),(0,a.jsx)(n.wpx,{"aria-label":"Export report","data-testid":"export-btn",icon:(0,a.jsx)(y.nM,{ml:"1.5px"}),onClick:G})]}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(F,{isOpen:A,onClose:U,onFilterChange:D})})]}),Z?(0,a.jsx)(n.xuv,{p:2,borderWidth:1,children:(0,a.jsx)(b.I4,{rowHeight:26,numRows:10})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.ZK,{tableInstance:W,onRowClick:e=>L(e.id),onSort:e=>{if(!e){j((0,_.p2)()),D();return}let{id:t,desc:r}=e;j((0,_.PU)(t)),j((0,_.iX)(r?"desc":"asc")),D()}}),(0,a.jsx)(b.s8,{totalRows:Y||0,pageSizes:g,setPageSize:C,onPreviousPageClick:E,isPreviousPageDisabled:R||M,onNextPageClick:w,isNextPageDisabled:S||M,startRange:P,endRange:I})]})]})};var Z=r(812),M=r(87361),V=r(46628),Y=r(34090),B=r(55484),G=r(40324);let L=(e,t)=>null==t?void 0:t.find(t=>t.policy_key===e),W=e=>{var t,r;if(!e)return B.Ry().shape({policy_key:B.Z_().required().label("Request type")});let l=e.custom_privacy_request_fields?Object.entries(e.custom_privacy_request_fields).map(e=>{let[t,r]=e;return{[t]:B.Ry().shape({value:r.required&&!r.hidden?B.Z_().required().label(r.label):B.Z_().nullable()})}}).reduce((e,t)=>({...e,...t}),{}):{};return B.Ry().shape({policy_key:B.Z_().required().label("Request type"),identity:B.Ry().shape({email:(null===(t=e.identity_inputs)||void 0===t?void 0:t.email)==="required"?B.Z_().email().required().label("Email address"):B.Z_().nullable(),phone_number:(null===(r=e.identity_inputs)||void 0===r?void 0:r.phone)==="required"?B.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").required().label("Phone number"):B.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").nullable()}),custom_privacy_request_fields:B.Ry().shape(l)})};var X=r(97181);let Q={is_verified:!1,policy_key:"",identity:{}},K=e=>{let{identityInputs:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[t.email?(0,a.jsx)(G.j0,{name:"identity.email",label:"User email address",isRequired:"required"===t.email,variant:"stacked"}):null,t.phone?(0,a.jsx)(G.j0,{name:"identity.phone_number",label:"User phone number",isRequired:"required"===t.phone,variant:"stacked"}):null]}):null},H=e=>{let{customFieldInputs:t}=e;if(!t)return null;let r=Object.entries(t);return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let[t,r]=e;return(0,a.jsx)(G.j0,{name:"custom_privacy_request_fields.".concat(t,".value"),label:r.label,isRequired:!!r.required,variant:"stacked"},t)})})};var J=e=>{let{onSubmit:t,onCancel:r}=e,{data:l}=(0,_.xv)();return(0,a.jsx)(Y.J9,{initialValues:Q,onSubmit:t,validationSchema:()=>(0,B.Vo)(e=>W(L(e.policy_key,null==l?void 0:l.actions))),children:e=>{var t;let{values:i,dirty:s,isValid:o,isSubmitting:d,setFieldValue:u}=e,c=L(i.policy_key,null==l?void 0:l.actions);return(0,a.jsx)(Y.l0,{children:(0,a.jsxs)(n.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(X.d,{name:"policy_key",label:"Request type",options:null!==(t=null==l?void 0:l.actions.map(e=>({label:e.title,value:e.policy_key})))&&void 0!==t?t:[],onChange:e=>{let t=L(e,null==l?void 0:l.actions);if(!(null==t?void 0:t.custom_privacy_request_fields)){u("custom_privacy_request_fields",void 0);return}u("custom_privacy_request_fields",Object.entries(t.custom_privacy_request_fields).map(e=>{let[t,r]=e;return{[t]:{label:r.label,value:r.default_value}}}).reduce((e,t)=>({...e,...t}),{}))},layout:"stacked",isRequired:!0}),(0,a.jsx)(K,{identityInputs:null==c?void 0:c.identity_inputs}),(0,a.jsx)(H,{customFieldInputs:null==c?void 0:c.custom_privacy_request_fields}),(0,a.jsx)(G.Xl,{name:"is_verified",label:"I confirm that I have verified this user information"}),(0,a.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,a.jsx)(n.wpx,{onClick:r,children:"Cancel"}),(0,a.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!i.is_verified||!s||!o,loading:d,"data-testid":"submit-btn",children:"Create"})]})]})})}})},$=r(31883);let ee=e=>{let{isOpen:t,onClose:r}=e,[l]=(0,_.M6)(),i=(0,n.pmc)(),s=async e=>{let{is_verified:t,...a}=e,s=a.custom_privacy_request_fields?Object.entries(a.custom_privacy_request_fields).map(e=>{let[t,r]=e;return r.value?{[t]:r}:{}}).reduce((e,t)=>({...e,...t}),{}):void 0,n={...a,custom_privacy_request_fields:s},o=await l([n]);(0,$.D4)(o)?i((0,V.Vo)((0,Z.e$)(o.error,"An error occurred while creating this privacy request. Please try again"))):i((0,V.t5)("Privacy request created")),r()};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:r,size:"2xl",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{"data-testid":"submit-request-modal",maxHeight:"80%",overflowY:"auto",children:[(0,a.jsx)(n.xBx,{children:"Create privacy request"}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)(n.Kqy,{spacing:4,children:[(0,a.jsx)(M.Z,{title:"Warning: You are bypassing identity verification",text:"You are bypassing Fides' built-in identity verification step. Please ensure that you are only entering information on behalf of a verified and approved user's privacy request."}),(0,a.jsx)(J,{onSubmit:s,onCancel:()=>r()})]})})]})]})};var et=()=>{let{onOpen:e,isOpen:t,onClose:r}=(0,n.qY0)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ee,{isOpen:t,onClose:r}),(0,a.jsx)(n.wpx,{type:"primary",onClick:e,"data-testid":"submit-request-btn",children:"Create request"})]})},er=r(58754),el=r(14047);let ei=()=>{let{errorAlert:e}=(0,el.V)(),[t,r]=(0,u.useState)(!1),[l,i]=(0,u.useState)({count:0,total:0}),[s,o]=(0,u.useState)(!0),d=q.q2.ERROR,{data:c}=(0,_.tE)(),{data:p}=(0,_.QA)({status:[d]},{pollingInterval:15e3,skip:s});return(0,u.useEffect)(()=>{o(!(c&&c.notify_after_failures>0))},[c]),(0,u.useEffect)(()=>{let e=(null==p?void 0:p.total)||0;e>=((null==c?void 0:c.notify_after_failures)||0)&&e>l.total?(i({count:e-l.total,total:e}),r(!0)):r(!1)},[null==p?void 0:p.total,null==c?void 0:c.notify_after_failures,l.total]),{processing:()=>{t&&e((0,a.jsxs)(n.xuv,{children:["DSR automation has failed for"," ",(0,a.jsx)(n.xvT,{as:"span",fontWeight:"semibold",children:l.count})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null,id:"dsrErrorAlert"})}}},ea=d()(()=>r.e(9676).then(r.bind(r,59676)),{loadableGenerated:{webpack:()=>[59676]},loading:()=>(0,a.jsx)("div",{children:"Loading..."})});var es=()=>{let{processing:e}=ei(),{plus:t}=(0,c.hz)();return(0,u.useEffect)(()=>{e()},[e]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(er.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests"}],rightContent:(0,a.jsxs)(n.vyj,{children:[t&&(0,a.jsx)(p.ZP,{scopes:[q.Sh.PRIVACY_REQUEST_CREATE],children:(0,a.jsx)(et,{})}),(0,a.jsx)(ea,{})]}),"data-testid":"privacy-requests"}),(0,a.jsx)(z,{})]})},en=()=>(0,a.jsx)(s.Z,{title:"Privacy Requests",children:(0,a.jsx)(es,{})})},31883:function(e,t,r){"use strict";r.d(t,{Bw:function(){return l.Bw},D4:function(){return l.D4}});var l=r(19043)},76737:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return n},noSSR:function(){return s}});let l=r(51538);r(24246),r(27378);let i=l._(r(21887));function a(e){return{default:(null==e?void 0:e.default)||e}}function s(e,t){return delete t.webpack,delete t.modules,e(t)}function n(e,t){let r=i.default,l={loading:e=>{let{error:t,isLoading:r,pastDelay:l}=e;return null}};e instanceof Promise?l.loader=()=>e:"function"==typeof e?l.loader=e:"object"==typeof e&&(l={...l,...e});let n=(l={...l,...t}).loader;return(l.loadableGenerated&&(l={...l,...l.loadableGenerated},delete l.loadableGenerated),"boolean"!=typeof l.ssr||l.ssr)?r({...l,loader:()=>null!=n?n().then(a):Promise.resolve(a(()=>null))}):(delete l.webpack,delete l.modules,s(r,l))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28438:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return l}});let l=r(51538)._(r(27378)).default.createContext(null)},21887:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});let l=r(51538)._(r(27378)),i=r(28438),a=[],s=[],n=!1;function o(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),a=null;function o(){if(!a){let t=new d(e,r);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!n){let e=r.webpack?r.webpack():r.modules;e&&s.push(t=>{for(let r of e)if(t.includes(r))return o()})}function u(e,t){!function(){o();let e=l.default.useContext(i.LoadableContext);e&&Array.isArray(r.modules)&&r.modules.forEach(t=>{e(t)})}();let s=l.default.useSyncExternalStore(a.subscribe,a.getCurrentValue,a.getCurrentValue);return l.default.useImperativeHandle(t,()=>({retry:a.retry}),[]),l.default.useMemo(()=>{var t;return s.loading||s.error?l.default.createElement(r.loading,{isLoading:s.loading,pastDelay:s.pastDelay,timedOut:s.timedOut,error:s.error,retry:a.retry}):s.loaded?l.default.createElement((t=s.loaded)&&t.default?t.default:t,e):null},[e,s])}return u.preload=()=>o(),u.displayName="LoadableComponent",l.default.forwardRef(u)}(o,e)}function c(e,t){let r=[];for(;e.length;){let l=e.pop();r.push(l(t))}return Promise.all(r).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(a).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let r=()=>(n=!0,t());c(s,e).then(r,r)})),window.__NEXT_PRELOADREADY=u.preloadReady;let p=u},65218:function(e,t,r){e.exports=r(76737)}},function(e){e.O(0,[8033,6060,7553,4481,8433,2888,9774,179],function(){return e(e.s=1565)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7322],{29303:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/properties",function(){return i(42652)}])},42652:function(e,n,i){"use strict";i.r(n);var r=i(24246),s=i(91942),t=i(77213),o=i(58754),a=i(25783);n.default=()=>(0,r.jsxs)(t.Z,{title:"Properties",children:[(0,r.jsx)(o.Z,{heading:"Properties",children:(0,r.jsx)(s.xvT,{fontSize:"sm",width:{base:"100%",lg:"60%"},children:"Review and manage your properties below. Properties are the locations you have configured for consent management such as a website or mobile app."})}),(0,r.jsx)(a.V,{})]})}},function(e){e.O(0,[8033,6060,4481,79,2888,9774,179],function(){return e(e.s=29303)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7322],{29303:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/properties",function(){return i(42652)}])},42652:function(e,n,i){"use strict";i.r(n);var r=i(24246),s=i(91942),t=i(77213),o=i(58754),a=i(25783);n.default=()=>(0,r.jsxs)(t.Z,{title:"Properties",children:[(0,r.jsx)(o.Z,{heading:"Properties",children:(0,r.jsx)(s.xvT,{fontSize:"sm",width:{base:"100%",lg:"60%"},children:"Review and manage your properties below. Properties are the locations you have configured for consent management such as a website or mobile app."})}),(0,r.jsx)(a.V,{})]})}},function(e){e.O(0,[8033,6060,7553,4481,79,2888,9774,179],function(){return e(e.s=29303)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9196],{95372:function(e){e.exports=function(e,t,s,a){for(var r=e.length,i=s+(a?1:-1);a?i--:++i<r;)if(t(e[i],i,e))return i;return -1}},67375:function(e,t,s){var a=s(52033),r=s(80068);e.exports=function(e,t){var s=-1,i=r(e)?Array(e.length):[];return a(e,function(e,a,r){i[++s]=t(e,a,r)}),i}},74833:function(e,t,s){var a=s(56127),r=/^\s+/;e.exports=function(e){return e?e.slice(0,a(e)+1).replace(r,""):e}},56632:function(e,t,s){var a=s(89278),r=s(80068),i=s(50098);e.exports=function(e){return function(t,s,n){var o=Object(t);if(!r(t)){var l=a(s,3);t=i(t),s=function(e){return l(o[e],e,o)}}var c=e(t,s,n);return c>-1?o[l?t[c]:c]:void 0}}},56127:function(e){var t=/\s/;e.exports=function(e){for(var s=e.length;s--&&t.test(e.charAt(s)););return s}},64925:function(e,t,s){var a=s(56632)(s(66259));e.exports=a},66259:function(e,t,s){var a=s(95372),r=s(89278),i=s(47991),n=Math.max;e.exports=function(e,t,s){var o=null==e?0:e.length;if(!o)return -1;var l=null==s?0:i(s);return l<0&&(l=n(o+l,0)),a(e,r(t,3),l)}},55807:function(e,t,s){var a=s(66070),r=s(89278),i=s(67375),n=s(19785);e.exports=function(e,t){return(n(e)?a:i)(e,r(t,3))}},32526:function(e,t,s){var a=s(68267)(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});e.exports=a},94919:function(e,t,s){var a=s(91936),r=1/0;e.exports=function(e){return e?(e=a(e))===r||e===-r?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,s){var a=s(94919);e.exports=function(e){var t=a(e),s=t%1;return t==t?s?t-s:t:0}},91936:function(e,t,s){var a=s(74833),r=s(11611),i=s(55193),n=0/0,o=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return n;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=a(e);var s=l.test(e);return s||c.test(e)?d(e.slice(2),s?2:8):o.test(e)?n:+e}},86548:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reporting/datamap",function(){return s(27901)}])},624:function(e,t,s){"use strict";var a=s(24246),r=s(91942),i=s(27378);let n=e=>{let t=e.split("."),s=[];return t.forEach(e=>{let t=s.length>0?s[s.length-1]:null;t?s.push("".concat(t,".").concat(e)):s.push(e)}),s},o=(e,t)=>{let s=n(t).filter(e=>e!==t);return e.filter(e=>s.includes(e)).length>0},l=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,s)=>{let a=null!=s?s:[];return e.forEach(e=>{e.children&&c(e.children,t,a),l(e.value,t)&&a.push(e)}),a},d=e=>{let{node:t,isChecked:s,onChecked:i,isExpanded:n,onExpanded:o,isIndeterminate:l,isDisabled:c,children:d}=e,{value:u,label:_}=t,p=!!t.children&&t.children.length>0;return(0,a.jsxs)(r.xuv,{children:[(0,a.jsxs)(r.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>o(t),minHeight:8,children:[(0,a.jsx)(r.XZJ,{colorScheme:"complimentary",value:u,isChecked:!l&&s,isIndeterminate:l,isDisabled:c,onChange:()=>i(t),mx:2,"data-testid":"checkbox-".concat(_),children:_}),p?(0,a.jsx)(r.wpx,{"data-testid":"expand-".concat(_),"aria-label":n?"collapse":"expand",icon:(0,a.jsx)(r.v4q,{boxSize:5}),type:"text",onClick:()=>o(t),className:n?"rotate-180":void 0}):null]}),d&&(0,a.jsx)(r.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:s,onSelected:u,..._}=e,[p,m]=(0,i.useState)([]),[E,S]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=Array.from(new Set([...s.map(e=>n(e)).reduce((e,t)=>e.concat(t),[]),...s.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));S(e),m(e)},[s,t]);let h=e=>{let a=[],r=[];p.indexOf(e.value)>=0?(a=p.filter(t=>!l(t,e.value)),r=s.filter(t=>!l(t,e.value))):(a=[...p,...c(t,e.value).map(e=>e.value)],r=[...s,e.value]),m(a),u(r)},f=e=>{E.indexOf(e.value)>=0?S(E.filter(t=>!l(t,e.value))):S([...E,e.value])},g=e=>{if(e.children){let r=p.indexOf(e.value)>=0,n=E.indexOf(e.value)>=0,l=c(t,e.value),u=r&&e.children.length>0&&p.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==l.length,_=o(s,e.value);return(0,a.jsx)(d,{node:e,isChecked:r,onChecked:h,isExpanded:n,onExpanded:f,isDisabled:_,isIndeterminate:u,children:n?e.children.map(e=>(0,a.jsx)(i.Fragment,{children:g(e)},e.value)):void 0})}return null};return(0,a.jsx)(r.xuv,{..._,children:t.map(e=>(0,a.jsx)(r.xuv,{children:g(e)},e.value))})}},35287:function(e,t,s){"use strict";var a=s(24246),r=s(91942),i=s(88038),n=s.n(i);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:i}=e;return(0,a.jsxs)(r.kCb,{"data-testid":s,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,a.jsxs)(n(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...i,children:t})]})}},56358:function(e,t,s){"use strict";s.d(t,{q:function(){return r}});var a=s(24246);let r=(0,s(91942).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,a.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},19904:function(e,t,s){"use strict";s.d(t,{Tg:function(){return n}});var a=s(24246),r=s(16134),i=s(31793);let n=e=>(0,r.C)(i.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:s}=e;return n(t)?(0,a.jsx)(a.Fragment,{children:s}):null}},70416:function(e,t,s){"use strict";s.d(t,{d:function(){return r}});var a=s(24246);let r=(0,s(91942).IUT)({displayName:"AddIcon",viewBox:"0 0 10 10",path:(0,a.jsx)("path",{d:"M4.33331 4.33398V0.333984H5.66665V4.33398H9.66665V5.66732H5.66665V9.66732H4.33331V5.66732H0.333313V4.33398H4.33331Z",fill:"currentColor"})})},34929:function(e,t,s){"use strict";var a=s(24246),r=s(64925),i=s.n(r),n=s(27378),o=s(16134),l=s(30002),c=s(28079),d=s(57072);let u=()=>{let{isLoading:e}=(0,c.fd)(),t=(0,o.C)(c.U3),{isLoading:s}=(0,d.MO)(),a=(0,o.C)(d.qb),{isLoading:r}=(0,l.te)();return{dataUses:t,dataSubjects:(0,o.C)(l.ZL),dataCategories:a,isLoading:e||s||r}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:s,isLoading:r}=u(),o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},l=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=t(e);if(!a)return{};let r=t(o(e,s)),i=!!a.parent_key;return{name:a.name||void 0,primaryName:i&&(null==r?void 0:r.name)!==a.name&&(null==r?void 0:r.name)||void 0}},c=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:i}=l(e,t,s);return r?i?(0,a.jsxs)(n.Fragment,{children:[(0,a.jsxs)("strong",{children:[i,":"]})," ",r]},e):(0,a.jsx)("strong",{children:r},e):e},d=t=>i()(e,{fides_key:t}),_=e=>i()(t,{fides_key:e}),p=e=>i()(s,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:d,getDataUseDisplayName:e=>c(e,d,1),getDataUseDisplayNameProps:e=>l(e,d,1),getDataCategories:()=>t,getDataCategoryByKey:_,getDataCategoryDisplayName:e=>c(e,_,2),getDataCategoryDisplayNameProps:e=>l(e,_,2),getDataSubjects:()=>s,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:o,isLoading:r}}},59001:function(e,t,s){"use strict";s.d(t,{Ch:function(){return n},Hy:function(){return o},Lo:function(){return r}});var a,r,i=s(61317);let n="root";(a=r||(r={})).DATA_CATEGORIES="Data categories",a.DATA_USES="Data uses",a.DATA_SUBJECTS="Data subjects";let o=e=>{switch(e){case"Data categories":return{UPDATE:i.Sh.DATA_CATEGORY_UPDATE,CREATE:i.Sh.DATA_CATEGORY_CREATE,DELETE:i.Sh.DATA_CATEGORY_DELETE,READ:i.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:i.Sh.DATA_USE_UPDATE,CREATE:i.Sh.DATA_USE_CREATE,DELETE:i.Sh.DATA_USE_DELETE,READ:i.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:i.Sh.DATA_SUBJECT_UPDATE,CREATE:i.Sh.DATA_SUBJECT_CREATE,DELETE:i.Sh.DATA_SUBJECT_DELETE,READ:i.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,s){"use strict";s.d(t,{Cd:function(){return i},Xl:function(){return n}});var a=s(61317),r=s(59001);let i=(e,t)=>{let s;if(null==t&&e.every(e=>void 0===e.parent_key))s=e;else{let a=null!=t?t:null;s=e.filter(e=>e.parent_key===a)}return s.map(t=>{var s,a;let r=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:i(e,r),is_default:null!==(s=t.is_default)&&void 0!==s&&s,active:null!==(a=t.active)&&void 0!==a&&a}})},n=e=>{switch(e){case r.Lo.DATA_CATEGORIES:return a.P6.DATA_CATEGORY;case r.Lo.DATA_SUBJECTS:return a.P6.DATA_SUBJECT;case r.Lo.DATA_USES:return a.P6.DATA_USE;default:return}}},27901:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eC}});var a,r,i,n,o=s(24246),l=s(27378),c=s(35287),d=s(58754),u=s(71795),_=s(61317);(a=i||(i={})).COLUMN_EXPANSION_STATE="datamap-column-expansion-state",a.COLUMN_NAMES="datamap-column-names",a.COLUMN_ORDER="datamap-column-order",a.COLUMN_SIZING="datamap-column-sizing",a.COLUMN_VISIBILITY="datamap-column-visibility",a.CUSTOM_REPORT_ID="datamap-custom-report-id",a.FILTERS="datamap-filters",a.GROUP_BY="datamap-group-by",a.SORTING_STATE="datamap-sorting-state",a.WRAPPING_COLUMNS="datamap-wrapping-columns",(r=n||(n={})).SYSTEM_NAME="system_name",r.DATA_USE="data_uses",r.DATA_CATEGORY="data_categories",r.DATA_SUBJECT="data_subjects",r.LEGAL_NAME="legal_name",r.DPO="dpo",r.LEGAL_BASIS_FOR_PROCESSING="legal_basis_for_processing",r.ADMINISTRATING_DEPARTMENT="administrating_department",r.COOKIE_MAX_AGE_SECONDS="cookie_max_age_seconds",r.PRIVACY_POLICY="privacy_policy",r.LEGAL_ADDRESS="legal_address",r.COOKIE_REFRESH="cookie_refresh",r.DATA_SECURITY_PRACTICES="data_security_practices",r.DATA_SHARED_WITH_THIRD_PARTIES="data_shared_with_third_parties",r.DATA_STEWARDS="data_stewards",r.DECLARATION_NAME="declaration_name",r.DOES_INTERNATIONAL_TRANSFERS="does_international_transfers",r.DPA_LOCATION="dpa_location",r.DESTINATIONS="egress",r.EXEMPT_FROM_PRIVACY_REGULATIONS="exempt_from_privacy_regulations",r.FEATURES="features",r.FIDES_KEY="fides_key",r.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING="flexible_legal_basis_for_processing",r.IMPACT_ASSESSMENT_LOCATION="impact_assessment_location",r.SOURCES="ingress",r.JOINT_CONTROLLER_INFO="joint_controller_info",r.LEGAL_BASIS_FOR_PROFILING="legal_basis_for_profiling",r.LEGAL_BASIS_FOR_TRANSFERS="legal_basis_for_transfers",r.LEGITIMATE_INTEREST_DISCLOSURE_URL="legitimate_interest_disclosure_url",r.PROCESSES_PERSONAL_DATA="processes_personal_data",r.REASON_FOR_EXEMPTION="reason_for_exemption",r.REQUIRES_DATA_PROTECTION_ASSESSMENTS="requires_data_protection_assessments",r.RESPONSIBILITY="responsibility",r.RETENTION_PERIOD="retention_period",r.SHARED_CATEGORIES="shared_categories",r.SPECIAL_CATEGORY_LEGAL_BASIS="special_category_legal_basis",r.THIRD_PARTIES="third_parties",r.COOKIES="cookies",r.USES_COOKIES="uses_cookies",r.USES_NON_COOKIE_ACCESS="uses_non_cookie_access",r.USES_PROFILING="uses_profiling",r.SYSTEM_UNDECLARED_DATA_CATEGORIES="system_undeclared_data_categories",r.DATA_USE_UNDECLARED_DATA_CATEGORIES="data_use_undeclared_data_categories",r.PROCESSES_SPECIAL_CATEGORY_DATA="processes_special_category_data";let p={system_name:"System",data_uses:"Data use",data_categories:"Data categories",data_subjects:"Data subject",legal_name:"Legal name",dpo:"Data privacy officer",legal_basis_for_processing:"Legal basis for processing",administrating_department:"Administrating department",cookie_max_age_seconds:"Cookie max age seconds",privacy_policy:"Privacy policy",legal_address:"Legal address",cookie_refresh:"Cookie refresh",data_security_practices:"Data security practices",data_shared_with_third_parties:"Data shared with third parties",data_stewards:"Data stewards",declaration_name:"Declaration name",does_international_transfers:"Does international transfers",dpa_location:"DPA location",egress:"Destination",exempt_from_privacy_regulations:"Exempt from privacy regulations",features:"Features",fides_key:"Fides key",flexible_legal_basis_for_processing:"Flexible legal basis for processing",impact_assessment_location:"Impact assessment location",ingress:"Source",joint_controller_info:"Joint controller info",legal_basis_for_profiling:"Legal basis for profiling",legal_basis_for_transfers:"Legal basis for transfers",legitimate_interest_disclosure_url:"Legitimate interest disclosure URL",processes_personal_data:"Processes personal data",reason_for_exemption:"Reason for exemption",requires_data_protection_assessments:"Requires data protection assessments",responsibility:"Responsibility",retention_period:"Retention period",shared_categories:"Shared categories",special_category_legal_basis:"Special category legal basis",third_parties:"Third parties",system_undeclared_data_categories:"System undeclared data categories",data_use_undeclared_data_categories:"Data use undeclared data categories",cookies:"Cookies",uses_cookies:"Uses cookies",uses_non_cookie_access:"Uses non-cookie access",uses_profiling:"Uses profiling",processes_special_category_data:"Processes special category data"},m={[n.SYSTEM_UNDECLARED_DATA_CATEGORIES]:!1,[n.DATA_USE_UNDECLARED_DATA_CATEGORIES]:!1},E={dataUses:[],dataSubjects:[],dataCategories:[]},S=(0,l.createContext)({}),h=e=>{let{children:t}=e,[s,a]=(0,u._)(i.CUSTOM_REPORT_ID,""),[r,n]=(0,u._)(i.GROUP_BY,_.fI.SYSTEM_DATA_USE),[c,d]=(0,u._)(i.FILTERS,E),[p,h]=(0,u._)(i.COLUMN_ORDER,[]),[f,g]=(0,u._)(i.COLUMN_VISIBILITY,m),[A,x]=(0,u._)(i.COLUMN_SIZING,{}),[C,T]=(0,u._)(i.COLUMN_NAMES,{}),v=(0,l.useMemo)(()=>({savedCustomReportId:s,setSavedCustomReportId:a,groupBy:r,setGroupBy:n,selectedFilters:c,setSelectedFilters:d,columnOrder:p,setColumnOrder:h,columnVisibility:f,setColumnVisibility:g,columnSizing:A,setColumnSizing:x,columnNameMapOverrides:C,setColumnNameMapOverrides:T}),[s,a,r,n,c,d,p,h,f,g,A,x,C,T]);return(0,o.jsx)(S.Provider,{value:v,children:t})},f=()=>{let e=(0,l.useContext)(S);if(!e||0===Object.keys(e).length)throw Error("useDatamapReport must be used within a DatamapReportProvider");return e};var g=s(59003),A=s(92222),x=s(14481),C=s(91942),T=s(34090),v=s(66726),R=s.n(v),O=s(16134),j=s(34929),b=s(14048),y=s(19904),D=s(16394),I=s(38943),N=s(35258),L=e=>{let{children:t,heading:s,onCancel:a,onConfirm:r,isLoading:i,cancelButtonText:n,continueButtonText:l,"data-testid":c="standard-dialog",...d}=e,{onClose:u}=d;return(0,o.jsxs)(C.u_l,{closeOnOverlayClick:i,...d,children:[(0,o.jsx)(C.ZAr,{}),(0,o.jsxs)(C.hzk,{"data-testid":c,children:[s&&(0,o.jsx)(C.xBx,{children:s}),(0,o.jsx)(C.olH,{isDisabled:i,"data-testid":"standard-dialog-close-btn"}),t&&(0,o.jsx)(C.fef,{children:t}),(0,o.jsxs)(C.mzw,{gap:3,width:"100%",sx:{"& button":{width:"100%"}},children:[(0,o.jsx)(C.wpx,{onClick:()=>{a&&a(),u()},"data-testid":"".concat(c?"".concat(c,"-"):"","cancel-btn"),disabled:i,children:n||"Cancel"}),(0,o.jsx)(C.wpx,{onClick:r,type:"primary","data-testid":"".concat(c?"".concat(c,"-"):"","continue-btn"),loading:i,children:l||"Continue"})]})]})]})},w=s(22968),M=e=>{let[t,s]=(0,l.useState)(w.T2.csv),{onConfirm:a}=e;return(0,o.jsx)(L,{heading:"Export report",continueButtonText:"Download",size:"xl",...e,onConfirm:()=>a(t),"data-testid":"export-modal",children:(0,o.jsxs)(C.kCb,{direction:"column",gap:3,pb:3,children:[(0,o.jsx)(C.xvT,{textAlign:"left",children:"Export your data map report using the options below. Depending on the number of rows, the file may take a few minutes to process."}),(0,o.jsxs)(C.NIc,{children:[(0,o.jsx)(C.lXp,{htmlFor:"format",children:"Choose Format"}),(0,o.jsx)(C.WPr,{id:"format",value:t,onChange:s,"data-testid":"export-format-select",options:[{value:w.T2.csv,label:"CSV"},{value:w.T2.xlsx,label:"XLSX"}],className:"w-full"})]})]})})},P=s(624),U=s(30002),k=s(28079),G=s(90673),H=s(39864);let Y=e=>{let{label:t,children:s,...a}=e;return(0,o.jsxs)(C.Qdk,{...a,children:[(0,o.jsx)(C.X6q,{children:(0,o.jsxs)(C.KFZ,{height:"100%","data-testid":"filter-modal-accordion-button",textAlign:"left",fontWeight:600,children:[(0,o.jsx)(C.xuv,{flex:1,children:t}),(0,o.jsx)(C.XEm,{boxSize:7})]})}),(0,o.jsx)(C.Hk3,{children:s})]})},F=e=>{let{columnNameMap:t,selectedFilters:s,onFilterChange:a,onClose:r,...i}=e;(0,k.fd)(),(0,U.te)(),(0,H.MO)();let{dataUses:n,dataSubjects:c,dataCategories:d}=s,u=(0,O.C)(k.U3),_=(0,O.C)(U.ZL),p=(0,O.C)(H.qb),[m,E]=(0,l.useState)(n),[S,h]=(0,l.useState)(c),[f,g]=(0,l.useState)(d);(0,l.useEffect)(()=>{E(n)},[n]),(0,l.useEffect)(()=>{h(c)},[c]),(0,l.useEffect)(()=>{g(d)},[d]);let A=(0,l.useMemo)(()=>(0,G.Cd)(u),[u]),x=(0,l.useMemo)(()=>(0,G.Cd)(_),[_]),T=(0,l.useMemo)(()=>(0,G.Cd)(p),[p]);return(0,o.jsx)(L,{heading:"Filter Datamap Report",...i,onCancel:()=>{E([]),h([]),g([]),a({dataUses:[],dataSubjects:[],dataCategories:[]}),r()},onConfirm:()=>{a({dataUses:m,dataSubjects:S,dataCategories:f}),r()},onClose:r,cancelButtonText:"Reset filters",continueButtonText:"Done","data-testid":"datamap-report-filter-modal",children:(0,o.jsxs)(C.UQy,{allowToggle:!0,children:[(0,o.jsx)(Y,{label:t.data_uses,children:(0,o.jsx)(P.ZP,{nodes:A,selected:m,onSelected:E,"data-testid":"filter-modal-checkbox-tree-uses"})}),(0,o.jsx)(Y,{label:t.data_categories,children:(0,o.jsx)(P.ZP,{nodes:T,selected:f,onSelected:g,"data-testid":"filter-modal-checkbox-tree-categories"})}),(0,o.jsx)(Y,{label:t.data_subjects,children:(0,o.jsx)(P.ZP,{nodes:x,selected:S,onSelected:h,"data-testid":"filter-modal-checkbox-tree-subjects"})})]})})};var V=s(32885),Z=s(70416),B=s(812),z=s(56358);let{useGetMinimalCustomReportsQuery:W,useLazyGetCustomReportByIdQuery:q,usePostCustomReportMutation:X,useDeleteCustomReportMutation:J}=s(78780).u.injectEndpoints({endpoints:e=>({getMinimalCustomReports:e.query({query:e=>{let{pageIndex:t=1,pageSize:s=50,report_type:a=_.C2.DATAMAP}=e,r="page=".concat(t,"&size=").concat(s,"&report_type=").concat(a);return{url:"plus/custom-report/minimal?".concat(r)}},providesTags:["Custom Reports"]}),getCustomReportById:e.query({query:e=>({url:"plus/custom-report/".concat(e)}),providesTags:(e,t,s)=>[{type:"Custom Reports",id:s}]}),postCustomReport:e.mutation({query:e=>({method:"POST",url:"plus/custom-report",body:e}),invalidatesTags:["Custom Reports"]}),deleteCustomReport:e.mutation({query:e=>({method:"DELETE",url:"plus/custom-report/".concat(e)}),invalidatesTags:["Custom Reports"]})})});var K=s(55484),Q=s(40324);let $="Report name",ee=e=>{let{isOpen:t,handleClose:s,tableStateToSave:a,columnMapToSave:r={},unavailableNames:i,onCreateCustomReport:n}=e,c=(0,C.pmc)(),[d]=X(),u=(0,l.useMemo)(()=>K.Ry().shape({reportName:K.Z_().label($).required("Please provide a name for this report").test("is-unique","",async(e,t)=>null==i||!i.includes(e)||t.createError({message:"This name already exists"})).max(80,"Report name is too long (max 80 characters)")}),[i]),p=async e=>{var t;let i={};Object.entries(r).forEach(e=>{let[t,s]=e;i[t]={label:s,enabled:!0}}),Object.entries(null!==(t=null==a?void 0:a.columnVisibility)&&void 0!==t?t:{}).forEach(e=>{let[t,s]=e;i[t]||(i[t]={}),i[t].enabled=s});try{let t={name:e.trim(),type:_.C2.DATAMAP,config:{column_map:i,table_state:a}},r=await d(t);if((0,B.D4)(r))throw r.error;n(r.data),s()}catch(e){c({status:"error",description:(0,B.e$)(e,"A problem occurred while creating the report.")})}};return(0,o.jsxs)(C.u_l,{size:"lg",isOpen:t,onClose:s,motionPreset:"none",children:[(0,o.jsx)(C.ZAr,{}),(0,o.jsxs)(C.hzk,{children:[(0,o.jsx)(C.xBx,{pb:0,children:"Create a report"}),(0,o.jsx)(T.J9,{initialValues:{reportName:""},onSubmit:e=>p(e.reportName),onReset:s,validateOnBlur:!1,validationSchema:u,children:e=>{let{dirty:t,isValid:s}=e;return(0,o.jsxs)(T.l0,{"data-testid":"custom-report-form",children:[(0,o.jsxs)(C.fef,{children:[(0,o.jsx)(C.xvT,{fontSize:"sm",color:"gray.600",pb:6,children:"Customize and save your current filter settings for easy access in the future. This saved report will include the column layout and currently applied filter settings."}),(0,o.jsx)(Q.j0,{id:"reportName",name:"reportName",isRequired:!0,label:$,placeholder:"Enter a name for the report...",variant:"stacked",maxLength:80})]}),(0,o.jsxs)(C.mzw,{gap:2,children:[(0,o.jsx)(C.wpx,{size:"small",htmlType:"reset",children:"Cancel"}),(0,o.jsx)(C.wpx,{size:"small",disabled:!t||!s,type:"primary","data-testid":"custom-report-form-submit",htmlType:"submit",children:"Save"})]})]})}})]})]})},et="Report",es="Reports",ea=e=>{var t;let{reportType:s,savedReportId:a,tableStateToSave:r,currentColumnMap:i,onCustomReportSaved:n,onSavedReportDeleted:c}=e,d=(0,y.Tg)([_.Sh.CUSTOM_REPORT_CREATE]),u=(0,y.Tg)([_.Sh.CUSTOM_REPORT_DELETE]),p=(0,C.pmc)({id:"custom-report-toast"}),{data:m,isLoading:E}=W({report_type:s}),[S,h]=(0,l.useState)(),[f]=q(),[g]=J(),{isOpen:A,onToggle:x,onOpen:v,onClose:R}=(0,C.qY0)(),{isOpen:O,onOpen:j,onClose:b}=(0,C.qY0)(),{isOpen:D,onOpen:I,onClose:N}=(0,C.qY0)(),[L,w]=(0,l.useState)(),[M,P]=(0,l.useState)(),[U,k]=(0,l.useState)(),[G,H]=(0,l.useState)(!1),{resetForm:Y}=(0,T.u6)(),F=(0,l.useMemo)(()=>{var e;let t=null==m?void 0:null===(e=m.items.find(e=>e.id===a))||void 0===e?void 0:e.name;return null!=t?t:es},[null==m?void 0:m.items,a]),V=!E&&!(null==m?void 0:null===(t=m.items)||void 0===t?void 0:t.length),X=e=>{h(null==m?void 0:m.items.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())))},K=async e=>{w(e);let{data:t,isError:s,error:a}=await f(e);if(s){let e=(0,B.e$)(a,"A problem occurred while fetching the ".concat(et,"."));e.includes("not found")&&c(),p({status:"error",description:e})}else P(t)},Q=()=>{w(""),P(void 0),H(!1)},$=()=>{M?(H(!1),M.id!==a&&n(M,Y),R()):L?H(!0):(n(null,Y),R())},ea=async e=>{e===(null==M?void 0:M.id)&&(Q(),c()),g(e)};(0,l.useEffect)(()=>{m&&h(m.items)},[m]),(0,l.useEffect)(()=>{G&&(H(!1),$())},[M]),(0,l.useEffect)(()=>{a?K(a):Q()},[a]),(0,l.useEffect)(()=>{U&&I()},[I,U]);let er=!M&&!a||(null==M?void 0:M.id)===a;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(C.J2e,{placement:"bottom-end",isOpen:A,onClose:$,id:"custom-reports-selection",children:[(0,o.jsx)(C.xol,{children:(0,o.jsx)(C.wpx,{className:"max-w-40",icon:(0,o.jsx)(C.v4q,{}),iconPosition:"end","data-testid":"custom-reports-trigger",onClick:x,children:(0,o.jsx)(C.xvT,{noOfLines:1,display:"inline-block",children:F})})}),(0,o.jsx)(C.h_i,{children:(0,o.jsxs)(C.yky,{"data-testid":"custom-reports-popover",children:[(0,o.jsx)(C.QHN,{}),(0,o.jsx)(T.J9,{initialValues:{},onSubmit:$,onReset:Q,children:(0,o.jsxs)(T.l0,{children:[(0,o.jsx)(C.wpx,{size:"small",disabled:V,htmlType:"reset",className:"absolute left-2 top-2","data-testid":"custom-reports-reset-button",children:"Reset"}),(0,o.jsxs)(C.Ytg,{textAlign:"center",children:[(0,o.jsx)(C.xvT,{fontSize:"sm",children:es}),(0,o.jsx)(C.BZy,{size:"sm",mt:3,children:(0,o.jsx)(C.IIB,{type:"text",borderRadius:"md",placeholder:"Search...",onChange:e=>X(e.target.value)})})]}),(0,o.jsx)(C.usR,{top:2,onClick:()=>{a?K(a):Q(),R()},"data-testid":"custom-report-popover-cancel"}),(0,o.jsxs)(C.baG,{px:6,pt:5,pb:1,children:[V&&(0,o.jsxs)(C.gCW,{px:2,pt:6,pb:3,"data-testid":"custom-reports-empty-state",children:[(0,o.jsx)(C.wpx,{type:"primary",size:"small","aria-label":"add ".concat(et),icon:(0,o.jsx)(Z.d,{}),onClick:j,className:"rounded-full","data-testid":"add-report-button"}),(0,o.jsxs)(C.xvT,{fontSize:"sm",textAlign:"center",color:"gray.500",children:["No ",es.toLowerCase()," have been created. Start by applying your preferred filter and column settings, then create a"," ",et.toLowerCase()," for easy access later."]})]}),!V&&(E?(0,o.jsxs)(C.gCW,{pb:2,children:[(0,o.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]}),(0,o.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]}),(0,o.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]})]}):(0,o.jsx)(C.y02.Group,{onChange:e=>K(e.target.value),value:L,className:"flex flex-col gap-2",children:null==S?void 0:S.map(e=>(0,o.jsxs)(C.jqI,{className:u?"justify-between":"justify-start",children:[(0,o.jsx)(C.y02,{value:e.id,name:"custom-report-id","data-testid":"custom-report-item",children:(0,o.jsx)(C.xvT,{fontSize:"sm",children:e.name})}),u&&(0,o.jsx)(C.wpx,{type:"text",size:"small",icon:(0,o.jsx)(z.q,{fontSize:16}),onClick:()=>k(e),"data-testid":"delete-report-button"})]},e.id))}))]}),(0,o.jsx)(C.DT9,{border:"none",px:6,pb:4,pt:4,children:(0,o.jsxs)(C.Ugi,{children:[d&&r&&(0,o.jsxs)(C.wpx,{size:"small",onClick:j,className:"w-full","data-testid":"create-report-button",htmlType:"button",children:["+ Create ",et.toLowerCase()]}),(0,o.jsx)(C.wpx,{size:"small",type:"primary",loading:G,disabled:er,className:"w-full","data-testid":"apply-report-button",htmlType:"submit",children:"Apply"})]})})]})})]})})]}),(0,o.jsx)(ee,{isOpen:O,handleClose:()=>{b(),setTimeout(()=>{v()},100)},tableStateToSave:r,columnMapToSave:i,unavailableNames:null==m?void 0:m.items.map(e=>e.name),onCreateCustomReport:e=>n(e,Y)}),(0,o.jsx)(C.cVQ,{isOpen:D,onClose:()=>{k(void 0),N()},onConfirm:()=>{U&&ea(U.id),N()},title:"Delete ".concat(et),message:(0,o.jsxs)(C.xvT,{children:["You are about to permanently delete the"," ",et.toLowerCase()," named"," ",(0,o.jsx)("strong",{children:null==U?void 0:U.name}),". Are you sure you would like to continue?"]})})]})};var er=s(19785),ei=s.n(er),en=s(55807),eo=s.n(en),el=s(32526),ec=s.n(el),ed=s(72625),eu=s(43862);let e_=(0,A.Cl)(),ep=(e,t)=>({cell:e=>(0,o.jsx)(x.G3,{value:e.getValue()}),header:s=>{let a={};return Object.keys(e).forEach(t=>{"string"==typeof e[t]?a[t]=e[t]:e[t].label&&(a[t]=e[t].label||"")}),(0,o.jsx)(ed.Hm,{value:(0,eu.AH)({columnId:s.column.id,columnNameMap:a}),defaultValue:p[s.column.id]||(0,eu.AH)({columnId:s.column.id}),isEditing:t,...s})}}),em=(e,t)=>{var s;let a=(null==e?void 0:null===(s=e.items)||void 0===s?void 0:s.length)?Object.keys(e.items[0]):[],r=Object.values(n);return a.filter(e=>!r.includes(e)).filter(e=>e.startsWith("privacy_declaration_")||e.startsWith("system_")).map(e=>{let s=t.find(t=>e.includes(ec()(t.name)));return e_.accessor(t=>t[e],{id:e,cell:e=>Array.isArray(e.getValue())?(0,o.jsx)(x.WP,{value:e.getValue(),ignoreZero:!0,...e}):(0,o.jsx)(x.G3,{value:e.getValue()}),meta:{showHeaderMenu:(null==s?void 0:s.field_type)==="string[]"}})})},eE=e=>{let{onSelectRow:t,getDataUseDisplayName:s,getDataCategoryDisplayName:a,getDataSubjectDisplayName:r,datamapReport:i,customFields:l,isRenaming:c=!1}=e,d=em(i,l);return[e_.accessor(e=>e.system_name,{enableGrouping:!0,id:n.SYSTEM_NAME,meta:{onCellClick:t}}),e_.accessor(e=>e.data_uses,{id:n.DATA_USE,cell:e=>{let t=e.getValue();return(0,o.jsx)(x.WP,{suffix:"data uses",ignoreZero:!0,value:ei()(t)?eo()(t,s):s(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto"}}),e_.accessor(e=>e.data_categories,{id:n.DATA_CATEGORY,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,o.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_subjects,{id:n.DATA_SUBJECT,cell:e=>{let t=e.getValue();return(0,o.jsx)(x.WP,{suffix:"data subjects",ignoreZero:!0,value:ei()(t)?eo()(t,r):r(t||""),tagProps:{color:"white"},...e})},meta:{showHeaderMenu:!c}}),e_.accessor(e=>e.legal_name,{id:n.LEGAL_NAME}),e_.accessor(e=>e.dpo,{id:n.DPO}),e_.accessor(e=>e.legal_basis_for_processing,{id:n.LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.administrating_department,{id:n.ADMINISTRATING_DEPARTMENT}),e_.accessor(e=>e.cookie_max_age_seconds,{id:n.COOKIE_MAX_AGE_SECONDS}),e_.accessor(e=>e.privacy_policy,{id:n.PRIVACY_POLICY}),e_.accessor(e=>e.legal_address,{id:n.LEGAL_ADDRESS}),e_.accessor(e=>e.cookie_refresh,{id:n.COOKIE_REFRESH}),e_.accessor(e=>e.data_security_practices,{id:n.DATA_SECURITY_PRACTICES}),e_.accessor(e=>e.data_shared_with_third_parties,{id:n.DATA_SHARED_WITH_THIRD_PARTIES}),e_.accessor(e=>e.processes_special_category_data,{id:n.PROCESSES_SPECIAL_CATEGORY_DATA}),e_.accessor(e=>e.data_stewards,{id:n.DATA_STEWARDS,cell:e=>(0,o.jsx)(x.WP,{suffix:"data stewards",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.declaration_name,{id:n.DECLARATION_NAME}),e_.accessor(e=>e.does_international_transfers,{id:n.DOES_INTERNATIONAL_TRANSFERS}),e_.accessor(e=>e.dpa_location,{id:n.DPA_LOCATION}),e_.accessor(e=>e.egress,{id:n.DESTINATIONS,cell:e=>(0,o.jsx)(x.WP,{suffix:"destinations",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.exempt_from_privacy_regulations,{id:n.EXEMPT_FROM_PRIVACY_REGULATIONS}),e_.accessor(e=>e.features,{id:n.FEATURES,cell:e=>(0,o.jsx)(x.WP,{suffix:"features",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.fides_key,{id:n.FIDES_KEY}),e_.accessor(e=>e.flexible_legal_basis_for_processing,{id:n.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.impact_assessment_location,{id:n.IMPACT_ASSESSMENT_LOCATION}),e_.accessor(e=>e.ingress,{id:n.SOURCES,cell:e=>(0,o.jsx)(x.WP,{suffix:"sources",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.joint_controller_info,{id:n.JOINT_CONTROLLER_INFO}),e_.accessor(e=>e.legal_basis_for_profiling,{id:n.LEGAL_BASIS_FOR_PROFILING,cell:e=>(0,o.jsx)(x.WP,{suffix:"profiles",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legal_basis_for_transfers,{id:n.LEGAL_BASIS_FOR_TRANSFERS,cell:e=>(0,o.jsx)(x.WP,{suffix:"transfers",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legitimate_interest_disclosure_url,{id:n.LEGITIMATE_INTEREST_DISCLOSURE_URL}),e_.accessor(e=>e.processes_personal_data,{id:n.PROCESSES_PERSONAL_DATA}),e_.accessor(e=>e.reason_for_exemption,{id:n.REASON_FOR_EXEMPTION}),e_.accessor(e=>e.requires_data_protection_assessments,{id:n.REQUIRES_DATA_PROTECTION_ASSESSMENTS}),e_.accessor(e=>e.responsibility,{id:n.RESPONSIBILITY,cell:e=>(0,o.jsx)(x.WP,{suffix:"responsibilities",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.retention_period,{id:n.RETENTION_PERIOD}),e_.accessor(e=>e.shared_categories,{id:n.SHARED_CATEGORIES,cell:e=>(0,o.jsx)(x.WP,{suffix:"shared categories",ignoreZero:!0,value:e.getValue(),tagProps:{color:"white"},...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.special_category_legal_basis,{id:n.SPECIAL_CATEGORY_LEGAL_BASIS}),e_.accessor(e=>e.third_parties,{id:n.THIRD_PARTIES}),e_.accessor(e=>e.system_undeclared_data_categories,{id:n.SYSTEM_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,o.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_use_undeclared_data_categories,{id:n.DATA_USE_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,o.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.cookies,{id:n.COOKIES,cell:e=>(0,o.jsx)(x.WP,{ignoreZero:!0,suffix:"cookies",value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.uses_cookies,{id:n.USES_COOKIES}),e_.accessor(e=>e.uses_non_cookie_access,{id:n.USES_NON_COOKIE_ACCESS}),e_.accessor(e=>e.uses_profiling,{id:n.USES_PROFILING}),...d]},eS=e=>{let{columnNameMapOverrides:t,setColumnNameMapOverrides:s,setSavedCustomReportId:a,setIsRenamingColumns:r}=e,{submitForm:i,resetForm:n}=(0,T.u6)();return(0,o.jsxs)("div",{className:"flex gap-2",children:[(0,o.jsx)(C.wpx,{size:"small","data-testid":"rename-columns-reset-btn",onClick:()=>{s({}),a(""),n({values:{}}),r(!1)},children:"Reset all"}),(0,o.jsx)(C.wpx,{size:"small","data-testid":"rename-columns-cancel-btn",onClick:()=>{n({values:t}),r(!1)},children:"Cancel"}),(0,o.jsx)(C.wpx,{size:"small",type:"primary",htmlType:"submit","data-testid":"rename-columns-apply-btn",onClick:i,children:"Apply"})]})},eh=e=>e===_.fI.DATA_USE_SYSTEM?[n.DATA_USE]:[n.SYSTEM_NAME],ef=e=>{let t=[];return _.fI.SYSTEM_DATA_USE===e&&(t=[n.SYSTEM_NAME,n.DATA_USE]),_.fI.DATA_USE_SYSTEM===e&&(t=[n.DATA_USE,n.SYSTEM_NAME]),t},eg=(e,t)=>ef(e).concat(t.filter(e=>e!==n.SYSTEM_NAME&&e!==n.DATA_USE)),eA={items:[],total:0,page:1,size:25,pages:1},ex=()=>{let e=(0,y.Tg)([_.Sh.CUSTOM_REPORT_READ]),{isLoading:t}=(0,V.x8)(),{PAGE_SIZES:s,pageSize:a,setPageSize:r,onPreviousPageClick:n,isPreviousPageDisabled:c,onNextPageClick:d,isNextPageDisabled:u,startRange:S,endRange:h,pageIndex:v,setTotalPages:L,resetPageIndexToDefault:w}=(0,x.oi)(),P=(0,C.pmc)({id:"datamap-report-toast"}),{isOpen:U,onClose:k,onOpen:G}=(0,C.qY0)(),{getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,isLoading:B}=(0,j.Z)(),[z,W]=(0,l.useState)(),{savedCustomReportId:q,setSavedCustomReportId:X,groupBy:J,setGroupBy:K,selectedFilters:Q,setSelectedFilters:$,columnOrder:ee,setColumnOrder:et,columnVisibility:es,setColumnVisibility:er,columnSizing:ei,setColumnSizing:en,columnNameMapOverrides:eo,setColumnNameMapOverrides:el}=f(),[ec,ed]=(0,l.useState)(!1),eu=e=>{X(""),K(e),ed(!0),w()},[e_,em]=(0,l.useState)(""),ex=(0,l.useCallback)(e=>{w(),em(e)},[w,em]),eC={pageIndex:v,pageSize:a,groupBy:J,search:e_,dataUses:(0,D.du)(Q.dataUses,"data_uses"),dataSubjects:(0,D.du)(Q.dataSubjects,"data_subjects"),dataCategories:(0,D.du)(Q.dataCategories,"data_categories")},{data:eT,isLoading:ev,isFetching:eR}=(0,I.tH)(eC),[eO,{isLoading:ej,isError:eb}]=(0,I.Eo)(),{data:ey,totalRows:eD}=(0,l.useMemo)(()=>{let e=eT||eA,t=e.items;return ec&&ed(!1),L(e.pages),{totalRows:e.total,data:t}},[eT]);(0,V.GH)();let eI=(0,O.C)(V.fN),[eN,eL]=(0,l.useState)(!1),ew=(0,l.useMemo)(()=>eT?eE({onSelectRow:e=>W(e.fides_key),getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,datamapReport:eT,customFields:eI,isRenaming:eN}):[],[H,Z,Y,eT,eI,eN]),{isOpen:eM,onOpen:eP,onClose:eU}=(0,C.qY0)(),{isOpen:ek,onOpen:eG,onClose:eH}=(0,C.qY0)(),eY=(0,g.b7)({getCoreRowModel:(0,A.sC)(),getGroupedRowModel:(0,A.qe)(),getExpandedRowModel:(0,A.rV)(),manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onChange",columns:ew,defaultColumn:ep({...p,...eo},eN),data:ey,initialState:{expanded:!0,columnSizing:ei,columnOrder:ee,columnVisibility:es,grouping:eh(J)}});(0,l.useEffect)(()=>{J&&eY&&eT&&(0===eY.getState().columnOrder.length?et(eg(J,eY.getAllColumns().map(e=>e.id))):et(eg(J,eY.getState().columnOrder)))},[J,eY,eT]),(0,l.useEffect)(()=>{let e=eh(J);eT&&eY.setGrouping(e)},[eT]);let eF=(0,l.useMemo)(()=>R()(en,300),[en]);(0,l.useEffect)(()=>{let e=eY.getState().columnSizing;e&&eF(e)},[eY.getState().columnSizing]);let eV=(e,t)=>{if(e||q){if(!e){try{X(""),er(m),eY.toggleAllColumnsVisible(!0),eY.setColumnVisibility(m),et([]),eY.setColumnOrder([]),K(_.fI.SYSTEM_DATA_USE),$(E),el({}),t({values:{}})}catch(e){P({status:"error",description:"There was a problem resetting the report."})}return}try{var s,a,r,i;if(null===(s=e.config)||void 0===s?void 0:s.table_state){let{groupBy:t,filters:s,columnOrder:a}=e.config.table_state,i={};Object.entries(null!==(r=e.config.column_map)&&void 0!==r?r:{}).forEach(e=>{let[t,s]=e;i[t]=s.enabled||!1}),t&&K(t),s&&$(s),a&&(et(a),eY.setColumnOrder(a)),i&&(er(i),eY.setColumnVisibility(i))}if(null===(a=e.config)||void 0===a?void 0:a.column_map){let s={};Object.entries(null!==(i=e.config.column_map)&&void 0!==i?i:{}).forEach(e=>{let[t,a]=e;a.label&&(s[t]=a.label)}),el(s),t({values:s})}X(e.id),P({status:"success",description:"Report applied successfully."})}catch(e){P({status:"error",description:"There was a problem applying report."})}}};return ev||t||B?(0,o.jsx)(x.I4,{rowHeight:36,numRows:15}):(0,o.jsxs)(C.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,o.jsx)(F,{columnNameMap:{...p,...eo},selectedFilters:Q,isOpen:U,onClose:k,onFilterChange:e=>{X(""),$(e)}}),(0,o.jsx)(x.F1,{isOpen:eM,onClose:eU,headerText:"Data map settings",columnNameMap:{...p,...eo},prefixColumns:ef(J),tableInstance:eY,savedCustomReportId:q,onColumnOrderChange:e=>{X(""),eY.setColumnOrder(e),et(e)},onColumnVisibilityChange:e=>{X(""),eY.setColumnVisibility(e),er(e)}}),(0,o.jsx)(M,{isOpen:ek,onClose:eH,onConfirm:e=>{let t={};Object.entries(es).forEach(e=>{let[s,a]=e;t[s]={enabled:a}}),Object.entries(eo).forEach(e=>{let[s,a]=e;if(t[s])t[s].label=a;else{var r;t[s]={label:a,enabled:null===(r=es[s])||void 0===r||r}}}),eO({...eC,format:e,report_id:q,report:{name:"",type:"datamap",config:{column_map:t,table_state:{groupBy:J,filters:Q,columnOrder:ee}}}}).then(()=>{eb||eH()})},isLoading:ej}),(0,o.jsx)(T.J9,{initialValues:eo,onSubmit:e=>{X(""),el(e),eL(!1)},children:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(x.Q$,{children:[(0,o.jsx)(x.HO,{globalFilter:e_,setGlobalFilter:ex,placeholder:"System name, Fides key, or ID"}),(0,o.jsxs)(C.kCb,{alignItems:"center",gap:2,children:[e&&(0,o.jsx)(ea,{reportType:_.C2.DATAMAP,savedReportId:q,tableStateToSave:{groupBy:J,filters:Q,columnOrder:ee,columnVisibility:es},currentColumnMap:eo,onCustomReportSaved:(e,t)=>eV(e,t),onSavedReportDeleted:()=>{X("")}}),(0,o.jsxs)(C.v2r,{children:[(0,o.jsxs)(C.j2t,{as:C.wpx,icon:(0,o.jsx)(C.v4q,{}),iconPosition:"end",loading:ec,"data-testid":"group-by-menu",children:["Group by ",(()=>{switch(J){case _.fI.SYSTEM_DATA_USE:return"system";case _.fI.DATA_USE_SYSTEM:return"data use";default:return"system"}})()]}),(0,o.jsxs)(C.qyq,{zIndex:11,"data-testid":"group-by-menu-list",children:[(0,o.jsx)(C.iiZ,{onClick:()=>{eu(_.fI.SYSTEM_DATA_USE)},isChecked:_.fI.SYSTEM_DATA_USE===J,value:_.fI.SYSTEM_DATA_USE,"data-testid":"group-by-system-data-use",children:"System"}),(0,o.jsx)(C.iiZ,{onClick:()=>{eu(_.fI.DATA_USE_SYSTEM)},isChecked:_.fI.DATA_USE_SYSTEM===J,value:_.fI.DATA_USE_SYSTEM,"data-testid":"group-by-data-use-system",children:"Data use"})]})]}),(0,o.jsx)(C.wpx,{"data-testid":"filter-multiple-systems-btn",onClick:G,children:"Filter"}),(0,o.jsx)(C.wpx,{"aria-label":"Export report","data-testid":"export-btn",onClick:eG,icon:(0,o.jsx)(b.nM,{ml:"1.5px"})}),(0,o.jsxs)(C.v2r,{placement:"bottom-end",children:[(0,o.jsx)(C.j2t,{as:C.wpx,icon:(0,o.jsx)(C.nXP,{className:"rotate-90"}),"data-testid":"more-menu","aria-label":"More options",className:"w-6 gap-0"}),(0,o.jsxs)(C.qyq,{"data-testid":"more-menu-list",children:[(0,o.jsx)(C.sNh,{onClick:eP,"data-testid":"edit-columns-btn",children:"Edit columns"}),(0,o.jsx)(C.sNh,{onClick:()=>eL(!0),"data-testid":"rename-columns-btn",children:"Rename columns"})]})]}),eN&&(0,o.jsx)(eS,{columnNameMapOverrides:eo,setColumnNameMapOverrides:el,setSavedCustomReportId:X,setIsRenamingColumns:eL})]})]}),(0,o.jsx)(T.l0,{children:(0,o.jsx)(x.ZK,{tableInstance:eY,columnExpandStorageKey:i.COLUMN_EXPANSION_STATE,columnWrapStorageKey:i.WRAPPING_COLUMNS})})]})}),(0,o.jsx)(x.s8,{totalRows:eD||0,pageSizes:s,setPageSize:r,onPreviousPageClick:n,isPreviousPageDisabled:c||eR,onNextPageClick:d,isNextPageDisabled:u||eR,startRange:S,endRange:h}),(0,o.jsx)(N.Z,{selectedSystemId:z,resetSelectedSystemId:()=>W(void 0)})]})};var eC=()=>(0,o.jsxs)(c.Z,{title:"Datamap Report",children:[(0,o.jsx)(d.Z,{"data-testid":"datamap-report-heading",heading:"Data map report"}),(0,o.jsx)(h,{children:(0,o.jsx)(ex,{})})]})}},function(e){e.O(0,[8033,6060,2858,2866,9278,9187,7553,4481,7980,8499,5258,2888,9774,179],function(){return e(e.s=86548)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5135],{77713:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent/[configuration_id]/[purpose_id]",function(){return i(80758)}])},59301:function(e,t,i){"use strict";var r=i(24246);let{Link:n}=i(91942).AntTypography;t.Z=e=>(0,r.jsx)(n,{target:"_blank",rel:"noopener noreferrer",...e})},35287:function(e,t,i){"use strict";var r=i(24246),n=i(91942),s=i(88038),o=i.n(s);i(27378),t.Z=e=>{let{children:t,title:i,mainProps:s}=e;return(0,r.jsxs)(n.kCb,{"data-testid":i,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,r.jsxs)(o(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsx)(n.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:t})]})}},58754:function(e,t,i){"use strict";var r=i(24246),n=i(91942),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:o=!0,children:d,rightContent:l,style:a,...c}=e;return(0,r.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...a}:{paddingBottom:"24px",...a},children:[(0,r.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(n.lQT,{className:i||d?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!i&&(0,r.jsx)(s.m,{className:d?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),d]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return a}});var r=i(24246),n=i(91942),s=i(34090),o=i(27378),d=i(46238),l=i(40324);let a=e=>{let{name:t,label:i,labelProps:a,tooltip:c,isRequired:u,layout:p="inline",helperText:h,...v}=e,[_,m,{setValue:x}]=(0,s.U$)(t),f=!!(m.touched&&m.error),[g,R]=(0,o.useState)("");_.value||"tags"!==v.mode&&"multiple"!==v.mode||(_.value=[]),"tags"===v.mode&&"string"==typeof _.value&&(_.value=[_.value]);let j="tags"===v.mode?(e,t)=>e?e.value!==g||_.value.includes(g)?v.optionRender?v.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:v.optionRender||void 0,I=e=>{R(e),v.onSearch&&v.onSearch(e)},E=(e,t)=>{x(e),v.onChange&&v.onChange(e,t)};return"inline"===p?(0,r.jsx)(n.NIc,{isInvalid:f,isRequired:u,children:(0,r.jsxs)(n.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,r.jsx)(l.__,{htmlFor:v.id||t,...a,children:i}):null,(0,r.jsxs)(n.jqI,{align:"center",children:[(0,r.jsxs)(n.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(n.WPr,{..._,id:v.id||t,"data-testid":"controlled-select-".concat(_.name),...v,optionRender:j,onSearch:"tags"===v.mode?I:void 0,onChange:E,value:_.value||void 0,status:f?"error":void 0}),h&&(0,r.jsx)(n.Q6r,{children:h}),(0,r.jsx)(l.Bc,{isInvalid:f,message:m.error,fieldName:_.name})]}),(0,r.jsx)(d.b,{label:c})]})]})}):(0,r.jsx)(n.NIc,{isInvalid:f,isRequired:u,children:(0,r.jsxs)(n.gCW,{alignItems:"start",children:[(0,r.jsxs)(n.jqI,{align:"center",children:[i?(0,r.jsx)(l.__,{htmlFor:v.id||t,fontSize:"xs",my:0,mr:1,...a,children:i}):null,(0,r.jsx)(d.b,{label:c})]}),(0,r.jsx)(n.WPr,{..._,id:v.id||t,"data-testid":"controlled-select-".concat(_.name),...v,optionRender:j,onSearch:"tags"===v.mode?I:void 0,onChange:E,value:_.value||void 0,status:f?"error":void 0}),h&&(0,r.jsx)(n.Q6r,{style:{marginTop:0},children:h}),(0,r.jsx)(l.Bc,{isInvalid:f,message:m.error,fieldName:_.name})]})})}},8133:function(e,t,i){"use strict";var r=i(24246),n=i(91942);t.Z=e=>{let{title:t,children:i,isOpen:s,onClose:o,...d}=e;return(0,r.jsxs)(n.u_l,{isOpen:s,onClose:o,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...d,children:[(0,r.jsx)(n.ZAr,{}),(0,r.jsxs)(n.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,r.jsx)(n.xBx,{p:0,children:(0,r.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,r.jsx)(n.X6q,{as:"h3",size:"sm",children:t})})}),(0,r.jsx)(n.fef,{pb:4,overflow:"auto",children:i})]})]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return a}});var r=i(24246),n=i(91942),s=i(79894),o=i.n(s),d=i(27378);let{Text:l}=n.AntTypography,a=e=>{let{items:t,...i}=e,s=(0,d.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,d={...e},a=d.onClick&&!d.href;return("string"==typeof d.title&&(d.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:d.title})),a)?d.title=(0,r.jsx)(n.wpx,{type:"text",size:"small",icon:d.icon,onClick:d.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:d.title}):(d.icon&&(d.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:d.icon}),d.title]})),d.href&&d.title&&(d.title=(0,r.jsx)(o(),{href:d.href,className:"ant-breadcrumb-link",children:d.title}),delete d.href)),d}),[t]);return(0,r.jsx)(n.zrq,{items:s,...i})}},6675:function(e,t,i){"use strict";i.d(t,{ZS:function(){return d},a4:function(){return s}});var r=i(3228);let n=i(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:s}=n,o={purposes:{},special_purposes:{}},d=(0,r.P1)(n.endpoints.getPurposes.select(),e=>{let{data:t}=e;return t||o})},51263:function(e,t,i){"use strict";var r=i(24246),n=i(91942);t.Z=e=>{let{title:t,children:i,...s}=e;return(0,r.jsxs)(n.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(t),...s,children:[(0,r.jsx)(n.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:t}),i]})}},59512:function(e,t,i){"use strict";i.d(t,{Cu:function(){return d},Py:function(){return n},fj:function(){return o},uh:function(){return s}});var r=i(61317);let n=[1,3,4,5,6],s="https://ethyca.com/docs/tutorials/consent-management/consent-management-configuration/configure-tcf#vendor-overrides",o={[r.FF.PURPOSE_RESTRICTION]:"Purpose restriction",[r.FF.REQUIRE_CONSENT]:"Require consent",[r.FF.REQUIRE_LEGITIMATE_INTEREST]:"Require legitimate interest"},d={[r.PY.RESTRICT_ALL_VENDORS]:"Restrict all vendors",[r.PY.RESTRICT_SPECIFIC_VENDORS]:"Restrict specific vendors",[r.PY.ALLOW_SPECIFIC_VENDORS]:"Allow specific vendors"}},80758:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Z}});var r=i(24246),n=i(91942),s=i(86677),o=i(27378),d=i(59301),l=i(35287),a=i(58754),c=i(6675),u=i(51263),p=i(59512),h=i(59003),v=i(92222),_=i(14481),m=i(61317),x=i(34090),f=i(55484),g=i(97181),R=i(812),j=i(8133),I=i(46628),E=i(52955);let y=e=>{if(/^\d+$/.test(e))return!0;let t=e.match(/^(\d+)-(\d+)$/);return!!t&&parseInt(t[1],10)<parseInt(t[2],10)},C=e=>{if(/^\d+$/.test(e)){let t=parseInt(e,10);return{start:t,end:t}}let t=e.match(/^(\d+)-(\d+)$/);return t?{start:parseInt(t[1],10),end:parseInt(t[2],10)}:null},T=(e,t)=>e.end===e.start?e.start>=t.start&&(null===t.end||e.start<=t.end):t.end===t.start?t.start>=e.start&&(null===e.end||t.start<=e.end):null===e.end&&null!==t.end?e.start<=t.end:null===t.end&&null!==e.end?t.start<=e.end:null===e.end&&null===t.end||e.start<=t.end&&e.end>=t.start||t.start<=e.end&&t.end>=e.start,b=(e,t)=>e.end===e.start?e.start>=t.start&&(null===t.end||e.start<=t.end):null===t.end?e.start>=t.start:null!==e.end&&e.start>=t.start&&e.end<=t.end,S=(e,t,i,r)=>{var n;let s=t.filter(e=>e.purpose_id===i&&e.id!==r);if(!(null===(n=e.vendor_ids)||void 0===n?void 0:n.length))return!1;let o=e.vendor_ids.map(C).filter(e=>null!==e);return 0!==o.length&&s.some(t=>{let i=e.vendor_restriction===m.PY.RESTRICT_SPECIFIC_VENDORS&&t.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS||e.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS&&t.vendor_restriction===m.PY.RESTRICT_SPECIFIC_VENDORS,r=t.vendor_ids.map(C).filter(e=>null!==e);return i?e.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS?r.some(e=>o.some(t=>!b(e,t))):o.some(e=>r.some(t=>!b(e,t))):t.vendor_restriction===e.vendor_restriction&&o.some(e=>r.some(t=>T(e,t)))})},N=e=>{if(/^\d+$/.test(e))return{start_vendor_id:parseInt(e,10),end_vendor_id:null};let t=e.match(/^(\d+)-(\d+)$/);if(t){let e=parseInt(t[1],10),i=parseInt(t[2],10);if(e<i)return{start_vendor_id:e,end_vendor_id:i}}return null},F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(N).filter(e=>null!==e)},P="This restriction type is already in use for this purpose",w={restriction_type:"",vendor_restriction:"",vendor_ids:[]},O=e=>{let{isOpen:t,onClose:i,initialValues:s=w,existingRestrictions:o=[],purposeId:d,restrictionId:l,configurationId:a}=e,c=(0,n.pmc)(),[u]=(0,E.a_)(),[h]=(0,E.h3)(),v=!(d&&p.Py.includes(+d)),_=o.filter(e=>e.id!==l).map(e=>e.restriction_type),C=[{value:m.FF.PURPOSE_RESTRICTION,label:p.fj[m.FF.PURPOSE_RESTRICTION],disabled:_.includes(m.FF.PURPOSE_RESTRICTION),title:_.includes(m.FF.PURPOSE_RESTRICTION)?P:void 0},{value:m.FF.REQUIRE_CONSENT,label:p.fj[m.FF.REQUIRE_CONSENT],disabled:_.includes(m.FF.REQUIRE_CONSENT),title:_.includes(m.FF.REQUIRE_CONSENT)?P:void 0},{value:m.FF.REQUIRE_LEGITIMATE_INTEREST,label:p.fj[m.FF.REQUIRE_LEGITIMATE_INTEREST],disabled:_.includes(m.FF.REQUIRE_LEGITIMATE_INTEREST),title:_.includes(m.FF.REQUIRE_LEGITIMATE_INTEREST)?P:void 0}],T=[{value:m.PY.RESTRICT_ALL_VENDORS,label:p.Cu[m.PY.RESTRICT_ALL_VENDORS],disabled:_.length>0,title:_.length>0?"Cannot restrict all vendors when other restrictions exist":void 0},{value:m.PY.RESTRICT_SPECIFIC_VENDORS,label:p.Cu[m.PY.RESTRICT_SPECIFIC_VENDORS]},{value:m.PY.ALLOW_SPECIFIC_VENDORS,label:p.Cu[m.PY.ALLOW_SPECIFIC_VENDORS]}],b=f.Ry().shape({restriction_type:f.Z_().required("Restriction type is required"),vendor_restriction:f.Z_().required("Vendor restriction is required"),vendor_ids:f.IX().when("vendor_restriction",{is:e=>e!==m.PY.RESTRICT_ALL_VENDORS,then:e=>e.required("At least one vendor ID is required").min(1,"At least one vendor ID is required").test("valid-format","Vendor IDs must be numbers or ranges (e.g., 10 or 15-300)",e=>{var t;return null===(t=null==e?void 0:e.every(e=>y(e)))||void 0===t||t}).test("no-conflicts","One or more of these vendors already have a restriction for this purpose. Please update the existing restriction or remove duplicates.",(e,t)=>!S({...t.parent,vendor_ids:e},o,d,l))})}),N=async e=>{try{let t={restriction_type:e.restriction_type,vendor_restriction:e.vendor_restriction,range_entries:e.vendor_restriction!==m.PY.RESTRICT_ALL_VENDORS?F(e.vendor_ids):[]},r={...t,purpose_id:null!=d?d:0};if(l){let e=await h({configuration_id:a,restriction_id:l,restriction:t});if((0,R.D4)(e)){c((0,I.Vo)("Failed to update restriction"));return}c((0,I.t5)("Restriction updated successfully"))}else{let e=await u({configuration_id:a,restriction:r});if((0,R.D4)(e)){c((0,I.Vo)("Failed to create restriction"));return}c((0,I.t5)("Restriction created successfully"))}i()}catch(e){c((0,I.Vo)("Failed to save restriction"))}};return(0,r.jsx)(j.Z,{isOpen:t,onClose:i,title:"Edit restriction",children:(0,r.jsx)(x.J9,{initialValues:{...s,restriction_type:v?s.restriction_type:m.FF.PURPOSE_RESTRICTION},onSubmit:N,validationSchema:b,children:e=>{let{values:t,validateField:s,setTouched:o}=e;return(0,r.jsx)(x.l0,{children:(0,r.jsxs)(n.jqI,{vertical:!0,className:"gap-6",children:[(0,r.jsx)(n.xvT,{className:"text-sm",children:"Define how specific vendors are restricted from processing data for this purpose. Select a restriction type, set whether the listed vendors are restricted or allowed, and specify which vendor IDs the restriction applies to."}),(0,r.jsx)(n.esZ,{title:v?void 0:"Non-flexible purposes only support Purpose restrictions and cannot be restricted by consent or legitimate interest settings.",children:(0,r.jsx)(g.d,{name:"restriction_type",label:"Restriction type",options:C,layout:"stacked",tooltip:"Choose how vendors are permitted to process data for this purpose. This setting overrides the vendor's declared legal basis in the Global Vendor List.",isRequired:!0,disabled:!v,className:"w-full"})}),(0,r.jsx)(g.d,{name:"vendor_restriction",label:"Vendor restriction",options:T,layout:"stacked",tooltip:"Decide if the restriction applies to all vendors, specific vendors, or if only certain vendors are allowed.",isRequired:!0}),(0,r.jsx)(n.UO1,{in:!!t.restriction_type&&!!t.vendor_restriction&&t.vendor_restriction!==m.PY.RESTRICT_ALL_VENDORS,animateOpacity:!0,children:(0,r.jsx)(g.d,{name:"vendor_ids",label:"Vendor IDs",mode:"tags",options:[],layout:"stacked",placeholder:"Enter vendor IDs",open:!1,suffixIcon:(0,r.jsx)("span",{}),tooltip:"List the specific vendors that are restricted or allowed from processing data for this purpose.",disabled:t.vendor_restriction===m.PY.RESTRICT_ALL_VENDORS,tokenSeparators:[","," "],onBlur:()=>{setTimeout(()=>{o({vendor_ids:!0}),s("vendor_ids")},100)},helperText:"Enter IDs (e.g. 123) or ranges (e.g. 1-10) and press enter",isRequired:!0})}),(0,r.jsxs)(n.jqI,{justify:"flex-end",className:"gap-3 pt-4",children:[(0,r.jsx)(n.wpx,{onClick:i,"data-testid":"cancel-restriction-button",children:"Cancel"}),(0,r.jsx)(n.wpx,{type:"primary",htmlType:"submit","data-testid":"save-restriction-button",children:"Save"})]})]})})}})})};var L=i(72625),q=i(58452);let A=e=>{let{currentValues:t,existingRestrictions:i}=e,[d,l]=(0,o.useState)(!1),[a,c]=(0,o.useState)(!1),u=(0,s.useRouter)(),p=(0,n.pmc)(),[h]=(0,E.FC)(),v=u.query.purpose_id?parseInt(u.query.purpose_id,10):void 0,_=u.query.configuration_id,m=async()=>{try{if(!(null==t?void 0:t.id))return;let e=await h({configuration_id:_,restriction_id:t.id});if((0,R.D4)(e)){p((0,I.Vo)("Failed to delete publisher restriction"));return}l(!1),p((0,I.t5)("Publisher restriction deleted successfully"))}catch(e){p((0,I.Vo)("Failed to delete publisher restriction"))}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.vyj,{children:[(0,r.jsx)(n.wpx,{size:"small",onClick:()=>c(!0),"data-testid":"edit-restriction-button",children:"Edit"}),(0,r.jsx)(n.wpx,{size:"small",onClick:()=>l(!0),"data-testid":"delete-restriction-button",children:"Delete"})]}),(0,r.jsx)(O,{isOpen:a,onClose:()=>c(!1),initialValues:t,existingRestrictions:i,purposeId:v,restrictionId:null==t?void 0:t.id,configurationId:_}),(0,r.jsx)(q.Z,{isOpen:d,onClose:()=>l(!1),onConfirm:m,title:"Confirm deletion",message:"Are you sure you want to delete this publisher restriction? This action cannot be undone.",cancelButtonText:"Cancel",continueButtonText:"Delete"})]})},D=(0,v.Cl)(),V=()=>(0,o.useMemo)(()=>[D.accessor(e=>e.restriction_type,{id:"restriction_type",cell:e=>{let{getValue:t}=e,i=t();return(0,r.jsx)(_.G3,{value:p.fj[i]})},header:e=>(0,r.jsx)(_.Rr,{value:"Restriction type",...e})}),D.accessor(e=>e.vendor_restriction,{id:"vendor_restriction",cell:e=>{let{getValue:t}=e,i=t();return(0,r.jsx)(_.G3,{value:p.Cu[i]})},header:e=>(0,r.jsx)(_.Rr,{value:"Vendor restriction",...e})}),D.accessor(e=>e.vendor_ids,{id:"vendor_ids",cell:e=>{let{getValue:t}=e;return(0,r.jsx)(_.G3,{value:t().join(", ")||"All vendors"})},header:e=>(0,r.jsx)(L.vs,{value:"Vendors",helperText:"Specify which vendors the restriction applies to. You can apply restrictions to all vendors, specific vendors by their IDs, or allow only certain vendors while restricting the rest.",...e})}),D.display({id:"actions",cell:e=>(0,r.jsx)(A,{currentValues:e.row.original,existingRestrictions:e.table.getRowModel().rows.map(e=>e.original)}),header:"Actions",size:154,meta:{disableRowClick:!0}})],[]),k=e=>{let{onAdd:t}=e;return(0,r.jsxs)(n.jqI,{vertical:!0,align:"center",className:"mt-6 w-full gap-3 self-center whitespace-normal py-10","data-testid":"empty-table-notice",children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"semibold",children:"Add a restriction"}),(0,r.jsx)(n.xvT,{fontSize:"sm",className:"max-w-[70%]",children:"No restrictions have been added. By default, all vendors follow their declared legal basis unless a restriction is applied—add a restriction to override this behavior."}),(0,r.jsx)(n.wpx,{type:"primary",onClick:t,children:"Add +"})]})},U=()=>{let[e,t]=(0,o.useState)(!1),i=V(),d=(0,s.useRouter)(),l=d.query.purpose_id?parseInt(d.query.purpose_id,10):void 0,a=d.query.configuration_id,{data:c,isFetching:u}=(0,E.a9)({configuration_id:a,purpose_id:null!=l?l:0},{skip:!a||!l}),p=((null==c?void 0:c.items)||[]).map(e=>{var t;return{id:e.id,restriction_type:e.restriction_type,vendor_restriction:e.vendor_restriction,vendor_ids:(null===(t=e.range_entries)||void 0===t?void 0:t.map(e=>e.end_vendor_id?"".concat(e.start_vendor_id,"-").concat(e.end_vendor_id):e.start_vendor_id.toString()))||[],purpose_id:e.purpose_id}}),x=p.some(e=>e.vendor_restriction===m.PY.RESTRICT_ALL_VENDORS),f=Object.values(m.FF).every(e=>p.some(t=>t.restriction_type===e)),g=(0,h.b7)({getCoreRowModel:(0,v.sC)(),columns:i,data:p,columnResizeMode:"onChange",manualPagination:!0}),R=()=>{t(!0)};return(0,r.jsxs)(n.jqI,{vertical:!0,className:"overflow-auto",children:[(0,r.jsxs)(_.Q$,{children:[(0,r.jsx)(n.LZC,{}),(0,r.jsx)(n.esZ,{title:x?'Each vendor must have a unique restriction type. When "Restrict all vendors" is active for any restriction type, no other restrictions can be added.':f?"Each purpose must have a unique restriction type. When all restriction types are active, no other restrictions can be added. Use the 'Edit' button to change the vendor restrictions on each type.":void 0,children:(0,r.jsx)(n.wpx,{type:"primary",onClick:R,disabled:x||f,"data-testid":"add-restriction-button",children:"Add restriction +"})})]}),u?(0,r.jsx)(_.I4,{rowHeight:36,numRows:3}):(0,r.jsx)(_.ZK,{tableInstance:g,emptyTableNotice:(0,r.jsx)(k,{onAdd:R})}),(0,r.jsx)(O,{isOpen:e,onClose:()=>{t(!1)},existingRestrictions:p,purposeId:l,configurationId:a})]})};var Z=()=>{let e=(0,s.useRouter)(),t=decodeURIComponent(e.query.configuration_id),i=decodeURIComponent(e.query.purpose_id),{data:h,isLoading:v}=(0,c.a4)(),{data:_}=(0,E.NZ)(t),m=(0,o.useMemo)(()=>null==h?void 0:h.purposes[i],[h,i]);return(0,r.jsxs)(l.Z,{title:"Consent Configuration",children:[(0,r.jsx)(a.Z,{heading:"Consent configuration",breadcrumbItems:[{title:"Consent settings",href:"/settings/consent"},{title:(null==_?void 0:_.name)||"Configuration"},{title:"TCF purpose ".concat(i)}]}),(0,r.jsxs)(n.vyj,{direction:"vertical",size:"middle",children:[(0,r.jsxs)(n.vyj,{direction:"vertical",size:"middle",children:[(0,r.jsx)(u.Z,{title:"TCF purpose ".concat(i).concat((null==m?void 0:m.name)?": ".concat(null==m?void 0:m.name):""),children:v?(0,r.jsxs)(n.jqI,{vertical:!0,className:"gap-1.5",children:[(0,r.jsx)(n.OdW,{height:"16px",width:"100%"}),(0,r.jsx)(n.OdW,{height:"16px",width:"100%"}),(0,r.jsx)(n.OdW,{height:"16px",width:"30%"})]}):!!m&&(0,r.jsx)(n.xvT,{fontSize:"sm",children:null==m?void 0:m.description})}),(0,r.jsx)(u.Z,{title:(null==_?void 0:_.name)||"Configuration",children:(0,r.jsx)(n.vyj,{direction:"vertical",className:"gap-3",children:(0,r.jsxs)(n.xvT,{fontSize:"sm",children:["Add restrictions to control how vendors process data for specific purposes. For each restriction, choose a restriction type. Then, decide whether the restriction applies to all vendors, specific vendors, or only to a limited set of allowed vendors. You can add multiple restrictions—they'll appear in the table below."," ",(0,r.jsx)(d.Z,{href:p.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]})})})]}),(0,r.jsx)(U,{})]})]})}}},function(e){e.O(0,[8033,6060,7553,4481,2888,9774,179],function(){return e(e.s=77713)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53748:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return i(96236)}])},59301:function(e,t,i){"use strict";var n=i(24246);let{Link:r}=i(91942).AntTypography;t.Z=e=>(0,n.jsx)(r,{target:"_blank",rel:"noopener noreferrer",...e})},56358:function(e,t,i){"use strict";i.d(t,{q:function(){return r}});var n=i(24246);let r=(0,i(91942).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,n.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var n=i(24246),r=i(91942),s=i(88038),l=i.n(s),o=i(86677);i(27378);var a=i(25980),d=i(90867),c=i(77830),u=()=>{let e=(0,o.useRouter)();return(0,n.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(r.xuv,{children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:i,padded:s=!0,mainProps:c}=e,p=(0,a.hz)(),h=(0,o.useRouter)(),g="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(p.flags.privacyRequestsConfiguration&&g),{data:f}=(0,d.JE)(void 0,{skip:x}),{data:b}=(0,d.PW)(void 0,{skip:x}),v=p.flags.privacyRequestsConfiguration&&(!f||!b)&&g;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),r=i(91942),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:o,rightContent:a,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(r.lQT,{className:i||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!i&&(0,n.jsx)(s.m,{className:o?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,t,i){"use strict";i.d(t,{Tg:function(){return l}});var n=i(24246),r=i(16134),s=i(31793);let l=e=>(0,r.C)(s.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:i}=e;return l(t)?(0,n.jsx)(n.Fragment,{children:i}):null}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return s.D4},MM:function(){return p},Ot:function(){return d},c6:function(){return r},cj:function(){return g},e$:function(){return o},fn:function(){return a},iC:function(){return h},nU:function(){return u},tB:function(){return c}});var n,r,s=i(19043);let l="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function a(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:l};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:i}=e;return{status:i,message:o(e,t.message)}}return t},p=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=r||(r={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},g=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},71795:function(e,t,i){"use strict";i.d(t,{_:function(){return r}});var n=i(27378);function r(e,t){let[i,r]=(0,n.useState)(()=>{if(!e)return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(e){return console.error(e),t}});return[i,t=>{try{let n=t instanceof Function?t(i):t;r(n),e&&window.localStorage.setItem(e,JSON.stringify(n))}catch(e){console.error(e)}}]}},8133:function(e,t,i){"use strict";var n=i(24246),r=i(91942);t.Z=e=>{let{title:t,children:i,isOpen:s,onClose:l,...o}=e;return(0,n.jsxs)(r.u_l,{isOpen:s,onClose:l,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...o,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,n.jsx)(r.xBx,{p:0,children:(0,n.jsx)(r.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,n.jsx)(r.X6q,{as:"h3",size:"sm",children:t})})}),(0,n.jsx)(r.fef,{pb:4,overflow:"auto",children:i})]})]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var n=i(24246),r=i(91942),s=i(79894),l=i.n(s),o=i(27378);let{Text:a}=r.AntTypography,d=e=>{let{items:t,...i}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(a,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:o.title})),d)?o.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,n.jsx)(l(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,n.jsx)(r.zrq,{items:s,...i})}},6675:function(e,t,i){"use strict";i.d(t,{ZS:function(){return o},a4:function(){return s}});var n=i(3228);let r=i(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:s}=r,l={purposes:{},special_purposes:{}},o=(0,n.P1)(r.endpoints.getPurposes.select(),e=>{let{data:t}=e;return t||l})},51263:function(e,t,i){"use strict";var n=i(24246),r=i(91942);t.Z=e=>{let{title:t,children:i,...s}=e;return(0,n.jsxs)(r.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(t),...s,children:[(0,n.jsx)(r.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:t}),i]})}},59512:function(e,t,i){"use strict";i.d(t,{Cu:function(){return o},Py:function(){return r},fj:function(){return l},uh:function(){return s}});var n=i(61317);let r=[1,3,4,5,6],s="https://ethyca.com/docs/tutorials/consent-management/consent-management-configuration/configure-tcf#vendor-overrides",l={[n.FF.PURPOSE_RESTRICTION]:"Purpose restriction",[n.FF.REQUIRE_CONSENT]:"Require consent",[n.FF.REQUIRE_LEGITIMATE_INTEREST]:"Require legitimate interest"},o={[n.PY.RESTRICT_ALL_VENDORS]:"Restrict all vendors",[n.PY.RESTRICT_SPECIFIC_VENDORS]:"Restrict specific vendors",[n.PY.ALLOW_SPECIFIC_VENDORS]:"Allow specific vendors"}},60325:function(e,t,i){"use strict";i.d(t,{DD:function(){return o},Go:function(){return a},TK:function(){return r},Uv:function(){return c},k1:function(){return s},y3:function(){return u}});var n=i(61317);let r=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==t?t:[]},s=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected))&&void 0!==t?t:[]},l=[{language:n.eU.EN,is_default:!0,title:"Title",description:"Description",accept_button_label:"Accept",reject_button_label:"Reject",save_button_label:"Save",acknowledge_button_label:"OK",privacy_preferences_link_label:"Privacy Preferences"}],o={name:"",disabled:!1,dismissable:!0,allow_language_selection:!1,show_layer1_notices:!1,layer1_button_options:n.Of.OPT_IN_OPT_OUT,regions:[],translations:l,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0},a=(e,t)=>{let i=t.find(t=>t.id===e.language);return i?i.name:e.language},d=e=>{var t,i,n,r,s,l,o,a,d;let{language:c,is_default:u,accept_button_label:p,reject_button_label:h}=e;return{language:c,is_default:u,accept_button_label:p,reject_button_label:h,title:e.title,description:e.description,acknowledge_button_label:null!==(t=e.acknowledge_button_label)&&void 0!==t?t:void 0,banner_title:null!==(i=e.banner_title)&&void 0!==i?i:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(r=e.purpose_header)&&void 0!==r?r:void 0,privacy_policy_link_label:null!==(s=e.privacy_policy_link_label)&&void 0!==s?s:void 0,privacy_policy_url:null!==(l=e.privacy_policy_url)&&void 0!==l?l:void 0,privacy_preferences_link_label:null!==(o=e.privacy_preferences_link_label)&&void 0!==o?o:void 0,save_button_label:null!==(a=e.save_button_label)&&void 0!==a?a:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},c=e=>{let{created_at:t,updated_at:i,privacy_notices:n,origin:r,id:s,...l}=e;return{...l,privacy_notice_ids:n?n.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>d(e)):[]}},u=e=>e===n.re.PRIVACY_CENTER?{title:{included:!0,required:!0},description:{included:!0,required:!0},save_button_label:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},modal_link_label:{included:!0}}:e===n.re.MODAL?{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0},modal_link_label:{included:!0}}:e===n.re.BANNER_AND_MODAL?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:e===n.re.TCF_OVERLAY?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},purpose_header:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}},96236:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Q}});var n=i(24246),r=i(91942),s=i(34090),l=i(27378),o=i(16134),a=i(25980),d=i(812),c=i(77213),u=i(58754),p=i(6675),h=i(46628),g=i(7426),x=i(40324);let f=e=>{let{children:t,purpose:i,endCol:s}=e;return(0,n.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderRight:s?"solid 1px":"unset",borderColor:"gray.200",height:"100%",minWidth:"36px",children:[1,3,4,5,6].includes(i)?null:(0,n.jsx)(r.xuv,{children:t})})};var b=()=>{let{values:e,setFieldValue:t}=(0,s.u6)(),{purposes:i}=(0,o.C)(p.ZS);return(0,n.jsx)(s.F2,{name:"purposeOverrides",render:()=>(0,n.jsxs)(r.kCb,{flexDirection:"column",minWidth:"944px",children:[(0,n.jsxs)(r.kCb,{width:"100%",border:"solid 1px",borderColor:"gray.200",backgroundColor:"gray.50",height:"36px",children:[(0,n.jsx)(r.kCb,{width:"600px",pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:"TCF purpose"}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",minWidth:"36px",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Allowed"})}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Consent"})}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Legitimate interest"})})]}),e.purposeOverrides.map((s,l)=>(0,n.jsxs)(r.kCb,{width:"100%",height:"36px",alignItems:"center",borderBottom:"solid 1px",borderColor:"gray.200",backgroundColor:"#fff",children:[(0,n.jsxs)(r.kCb,{width:"600px",borderLeft:"solid 1px",borderColor:"gray.200",p:0,alignItems:"center",height:"100%",pl:"4",fontSize:"xs",fontWeight:"normal",lineHeight:"4",children:["Purpose ",s.purpose,": ",i[s.purpose].name]}),(0,n.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderColor:"gray.200",height:"100%",children:(0,n.jsx)(r.xuv,{children:(0,n.jsx)(x.w8,{name:"purposeOverrides[".concat(l,"].is_included"),onChange:e=>{e||(t("purposeOverrides[".concat(l,"].is_consent"),!1),t("purposeOverrides[".concat(l,"].is_legitimate_interest"),!1))}})})}),(0,n.jsx)(f,{purpose:s.purpose,children:(0,n.jsx)(x.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_legitimate_interest,name:"purposeOverrides[".concat(l,"].is_consent")})}),(0,n.jsx)(f,{purpose:s.purpose,endCol:!0,children:(0,n.jsx)(x.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_consent,name:"purposeOverrides[".concat(l,"].is_legitimate_interest")})})]},s.purpose))]})})},v=i(59301),m=e=>{let{name:t,enabled:i}=e;return(0,n.jsxs)(r.Kqy,{spacing:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:[(0,n.jsxs)(r.xvT,{children:[t," status"," ",i?(0,n.jsx)(r.j8w,{color:"success",children:"Enabled"}):(0,n.jsx)(r.j8w,{color:"error",children:"Disabled"})]}),(0,n.jsxs)(r.xvT,{children:["To ",i?"disable":"enable"," ",t,", please contact your Fides administrator or"," ",(0,n.jsx)(v.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},_=i(46238),j=e=>{var t,i;let{label:l,options:o,layout:a,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,s.U$)(c),h={...u,value:null!==(t=u.value)&&void 0!==t?t:""},g=!!(p.touched&&p.error),f=d?o[0]:void 0,b=null!==(i=o.find(e=>e.value===h.value))&&void 0!==i?i:f,v=e=>{h.onChange(c.name)(e.target.value)};return"stacked"===a?(0,n.jsxs)(r.NIc,{isInvalid:g,children:[(0,n.jsxs)(r.jqI,{className:"w-fit",children:[l?(0,n.jsx)(x.__,{children:l}):null,(0,n.jsx)(r.y02.Group,{onChange:v,value:null==b?void 0:b.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{className:"flex-col gap-3",children:o.map(e=>{let{value:t,label:i,tooltip:s}=e;return(0,n.jsx)(r.y02,{value:t,"data-testid":"option-".concat(t),children:(0,n.jsxs)(r.jqI,{className:"items-center gap-2",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:i}),s?(0,n.jsx)(_.b,{label:s}):null]})},t)})})})]}),(0,n.jsx)(x.Bc,{isInvalid:g,message:p.error,fieldName:h.name})]}):(0,n.jsxs)(r.NIc,{isInvalid:g,children:[(0,n.jsxs)(r.rjZ,{templateColumns:"1fr 3fr",children:[(0,n.jsx)(x.__,{children:l}),(0,n.jsx)(r.y02.Group,{onChange:v,value:null==b?void 0:b.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{children:o.map(e=>(0,n.jsx)(r.y02,{value:e.value,"data-testid":"option-".concat(e.value),children:e.label},e.value))})})]}),(0,n.jsx)(x.Bc,{isInvalid:g,message:p.error,fieldName:h.name})]})},y=i(61317),C=i(51263);let w=e=>{let{title:t,children:i}=e;return(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(t),children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:t}),i]})};var T=()=>{let{tcf:e}=(0,a.hz)(),t=!!(0,o.C)(g.D2).enabled,{values:i,setFieldValue:l}=(0,s.u6)(),d=!!i.gpp.us_approach;return(0,n.jsx)(C.Z,{title:"Global Privacy Platform",children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[(0,n.jsx)(m,{name:"GPP",enabled:t}),t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{title:"GPP U.S.",children:(0,n.jsx)(j,{name:"gpp.us_approach",layout:"stacked",defaultFirstSelected:!1,options:[{label:"Enable U.S. National",value:y.en.NATIONAL,tooltip:"When US National is selected, Fides will present the same privacy notices to all consumers located anywhere in the United States."},{label:"Enable U.S. State-by-State",value:y.en.STATE,tooltip:"When state-by-state is selected, Fides will only present consent to consumers and save their preferences if they are located in a state that is supported by the GPP. The consent options presented to consumers will vary depending on the regulations in each state."},{label:"Enable US National and State-by-State notices",value:y.en.ALL,tooltip:"When enabled, Fides can be configured to serve the National and U.S. state notices. This mode is intended to provide consent coverage to U.S. states with new privacy laws where GPP support lags behind the effective date of state laws."}]})}),d?(0,n.jsxs)(w,{title:"MSPA",children:[(0,n.jsx)(x.Xl,{name:"gpp.mspa_covered_transactions",label:"All transactions covered by MSPA",tooltip:"When selected, the Fides CMP will communicate to downstream vendors that all preferences are covered under the MSPA.",onChange:e=>{e||(l("gpp.mspa_service_provider_mode",!1),l("gpp.mspa_opt_out_option_mode",!1))}}),(0,n.jsx)(x.w8,{label:"Enable MSPA service provider mode",name:"gpp.mspa_service_provider_mode",variant:"switchFirst",tooltip:"Enable service provider mode if you do not engage in any sales or sharing of personal information.",isDisabled:!!i.gpp.mspa_opt_out_option_mode||!i.gpp.mspa_covered_transactions}),(0,n.jsx)(x.w8,{label:"Enable MSPA opt-out option mode",name:"gpp.mspa_opt_out_option_mode",variant:"switchFirst",tooltip:"Enable opt-out option mode if you engage or may engage in the sales or sharing of personal information, or process any information for the purpose of targeted advertising.",isDisabled:!!i.gpp.mspa_service_provider_mode||!i.gpp.mspa_covered_transactions})]}):null]}):null,e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.izJ,{color:"gray.200"}),(0,n.jsxs)(w,{title:"GPP Europe",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:"Configure TCF string for Global Privacy Platform"}),(0,n.jsx)(x.w8,{label:"Enable TC string",name:"gpp.enable_tcfeu_string",variant:"switchFirst",tooltip:"When enabled, the GPP API will include a TCF EU consent string for users who are in regions where TCF applies."})]})]}):null]})})},S=i(64781),k=i(60325),N=()=>{var e,t;let{tcf:i}=(0,a.hz)(),{values:l,setFieldValue:o}=(0,s.u6)(),{data:d,isLoading:c}=(0,S.gT)(),u=[...(0,k.k1)(null!==(e=null==d?void 0:d.locations)&&void 0!==e?e:[]),...(0,k.k1)(null!==(t=null==d?void 0:d.location_groups)&&void 0!==t?t:[])].sort((e,t)=>e.name<t.name?-1:1);return i?(0,n.jsxs)(C.Z,{title:"Publisher settings",children:[(0,n.jsx)(r.AntTypography.Paragraph,{className:"mb-3",children:"Specify the country in which your organization operates for TCF compliance. This setting will determine the 'Publisher Country Code ' transmitted in the Transparency and Consent (TC) Data."}),(0,n.jsx)("label",{htmlFor:"publisher_country_code",className:"mb-1 block",children:(0,n.jsx)(r.AntTypography.Text,{className:"font-semibold",children:"Publisher country"})}),(0,n.jsx)(r.WPr,{"data-testid":"input-publisher_settings.publisher_country_code",id:"publisher_country_code",loading:c,allowClear:!0,options:null==u?void 0:u.map(e=>({value:e.id,label:e.name})),showSearch:!0,optionFilterProp:"label",placeholder:"Select a country",value:l.tcfPublisherSettings.publisher_country_code,onChange:e=>o("tcfPublisherSettings.publisher_country_code",e),className:"w-80"})]}):null},E=i(52955),I=i(71795),q=i(59512),P=i(55484),O=i(8133),L=i(31883);let F=P.Ry().shape({name:P.Z_().required().label("Name")}),R=e=>{let{isOpen:t,onClose:i,onSuccess:l}=e,o=(0,r.pmc)(),[a]=(0,E.LK)(),c=async e=>{let t=await a({name:e.name});(0,L.D4)(t)?o((0,h.Vo)((0,d.e$)(t.error))):(o((0,h.t5)("Successfully created TCF configuration")),null==l||l(t.data.id),i())};return(0,n.jsx)(O.Z,{title:"Create a new TCF configuration",isOpen:t,onClose:i,children:(0,n.jsx)(s.J9,{initialValues:{name:""},onSubmit:c,validationSchema:F,children:e=>{let{isValid:t,dirty:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",className:"w-full",children:[(0,n.jsx)(r.xvT,{children:"TCF configurations allow you to define unique sets of publisher restrictions. These configurations can be added to privacy experiences."}),(0,n.jsx)(x.j0,{id:"name",name:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsxs)(r.vyj,{className:"w-full justify-end pt-6",children:[(0,n.jsx)(r.wpx,{onClick:i,children:"Cancel"}),(0,n.jsx)(r.wpx,{type:"primary",htmlType:"submit",disabled:!t||!l,"data-testid":"save-config-button",children:"Save"})]})]})})}})})};var A=i(79894),z=i.n(A);let D=e=>{let{width:t,style:i,borderLeft:s=!1,borderRight:l=!1,...o}=e;return(0,n.jsx)(r.jqI,{align:"center",className:"h-full px-4",...o,style:{borderLeft:s?"solid 1px":"none",borderRight:l?"solid 1px":"none",borderColor:"var(--ant-color-border)",width:t,...i},role:"cell"})},W=e=>{let{width:t,style:i,borderLeft:s=!1,children:l,...o}=e;return(0,n.jsx)(r.jqI,{align:"center",role:"columnheader",className:"px-4",...o,style:{borderLeft:s?"solid 1px":"none",borderColor:"var(--ant-color-border)",fontWeight:500,whiteSpace:"nowrap",width:t,...i},children:l})},M=e=>{let{isHeader:t=!1,isLastRow:i=!1,style:s,...l}=e;return(0,n.jsx)(r.jqI,{role:t?"rowheader":"row",className:"h-9 w-full",...l,style:{backgroundColor:t?"var(--fidesui-bg-default)":void 0,borderBottom:i?"none":"solid 1px",borderColor:"var(--ant-color-border)",...s}})},Z=e=>{let{config:t,isLoading:i,style:s,...l}=e,{purposes:a}=(0,o.C)(p.ZS);return(0,n.jsxs)(r.jqI,{vertical:!0,...l,style:{maxWidth:"1200px",border:"solid 1px",borderColor:"var(--ant-color-border)",backgroundColor:"var(--ant-color-bg-base)",fontSize:"12px",...s},"aria-label":"Publisher restrictions table",role:"table","data-testid":"publisher-restrictions-table",children:[(0,n.jsxs)(M,{isHeader:!0,style:{width:"100%"},children:[(0,n.jsx)(W,{width:"600px",children:"TCF purpose"}),(0,n.jsxs)(W,{flex:1,gap:3,borderLeft:!0,children:["Restrictions",(0,n.jsx)(_.b,{label:"Restrictions control how vendors are permitted to process data for specific purposes. Fides supports three restriction types: Purpose Restriction to completely disallow data processing for a purpose, Require Consent to allow processing only with explicit user consent, and Require Legitimate Interest to allow processing based on legitimate business interest unless the user objects."})]}),(0,n.jsxs)(W,{width:"100px",gap:3,borderLeft:!0,children:["Flexible",(0,n.jsx)(_.b,{label:'Indicates whether the legal basis for this purpose can be overridden by publisher restrictions. If marked "No," the purpose has a fixed legal basis defined by the TCF and cannot be changed.'})]}),(0,n.jsx)(W,{width:"100px",borderLeft:!0,children:"Actions"})]}),Object.values(a).map((e,s)=>(0,n.jsxs)(M,{isLastRow:s===Object.values(a).length-1,children:[(0,n.jsxs)(D,{width:"600px",children:["Purpose ",e.id,": ",e.name]}),(0,n.jsx)(D,{flex:1,borderLeft:!0,"data-testid":"restriction-type-cell-".concat(e.id),children:i?(0,n.jsx)(r.OdW,{height:"16px",width:"100%"}):(()=>{var i;let s=(null==t?void 0:null===(i=t.restriction_types_per_purpose)||void 0===i?void 0:i[e.id])||[];return 0===s.length?"none":1===s.length?(0,n.jsx)(r.xvT,{size:"sm",whiteSpace:"nowrap",children:q.fj[s[0]]}):(0,n.jsxs)(r.xvT,{children:[s.length," restrictions"]})})()}),(0,n.jsx)(D,{width:"100px",borderLeft:!0,children:q.Py.includes(e.id)?(0,n.jsx)(r.j8w,{color:"error","data-testid":"flexibility-tag-".concat(e.id),children:"No"}):(0,n.jsx)(r.j8w,{color:"success","data-testid":"flexibility-tag-".concat(e.id),children:"Yes"})}),(0,n.jsx)(D,{width:"100px",borderLeft:!0,children:(0,n.jsx)(z(),{href:"/settings/consent/".concat(null==t?void 0:t.id,"/").concat(e.id),passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(r.wpx,{size:"small","data-testid":"edit-restriction-btn-".concat(e.id),children:"Edit"})})})]},e.id))]})};var V=i(56358),H=i(19904);let B=()=>(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"})]}),G=e=>{let{searchResults:t,selectedConfigId:i,handleSelection:s,userCanDeleteConfigs:l,onDeleteOpen:o,setConfigToDelete:a}=e;return(0,n.jsx)(r.y02.Group,{onChange:e=>s(e.target.value),value:i,className:"flex flex-col gap-2",children:t.map(e=>(0,n.jsxs)(r.jqI,{className:l?"justify-between":"justify-start","data-testid":"tcf-config-item-".concat(e.id),children:[(0,n.jsx)(r.y02,{value:e.id,name:"tcf-config-id","data-testid":"tcf-config-item",children:(0,n.jsx)(r.xvT,{className:"text-sm",children:e.name})}),l&&(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:(0,n.jsx)(V.q,{fontSize:16}),onClick:t=>{t.stopPropagation(),a(e),o()},"data-testid":"delete-config-button"})]},e.id))})},U=e=>{let t,{searchTerm:i,setSearchTerm:s,searchResults:o,selectedConfigId:a,handleSelection:d,userCanCreateConfigs:c,userCanDeleteConfigs:u,modalOnOpen:p,onDeleteOpen:h,setConfigToDelete:g,isLoading:x,setDropdownOpen:f,configurations:b}=e,[v,m]=(0,l.useState)(a);return(0,l.useEffect)(()=>{m(a)},[a]),t=x?(0,n.jsx)(B,{}):0===o.length?(0,n.jsx)(r.xvT,{className:"text-center",children:"No configurations found."}):(0,n.jsx)(G,{searchResults:o,selectedConfigId:v,handleSelection:e=>{m(e)},userCanDeleteConfigs:u,onDeleteOpen:h,setConfigToDelete:g}),(0,n.jsxs)(r.V4A,{title:"TCF configurations",className:"min-w-[300px]",extra:(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:(0,n.jsx)(r.Two,{}),onClick:()=>f(!1),"data-testid":"close-config-dropdown"}),style:{boxShadow:"var(--ant-box-shadow)"},children:[b.length>10&&(0,n.jsx)(r.BZy,{size:"sm",children:(0,n.jsx)(r.uFc,{className:"mb-4",placeholder:"Search...",onChange:e=>s(e.target.value),value:i})}),t,(0,n.jsxs)(r.jqI,{gap:"small",className:"mt-4",children:[c&&(0,n.jsx)(r.wpx,{size:"small",onClick:()=>{p(),f(!1)},className:"flex-1","data-testid":"create-config-button",children:"+ Create"}),(0,n.jsx)(r.wpx,{size:"small",onClick:()=>d(v),className:"flex-1","data-testid":"apply-config-button",disabled:v===a,children:"Apply"})]})]})},$=e=>(0,n.jsx)(U,{...e}),K=e=>{var t;let{selectedConfigId:i,configurations:s,isLoading:o=!1,onConfigurationSelect:a,onConfigurationDelete:c}=e,u=(0,H.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),p=(0,H.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),h=(0,r.pmc)({id:"tcf-config-toast"}),[g]=(0,E.Cm)(),{isOpen:x,onOpen:f,onClose:b}=(0,r.qY0)(),{isOpen:v,onOpen:m,onClose:_}=(0,r.qY0)(),[j,C]=(0,l.useState)(""),[w,T]=(0,l.useState)(),[S,k]=(0,l.useState)(!1),N=(0,l.useMemo)(()=>j?s.filter(e=>e.name.toLowerCase().includes(j.toLowerCase())):s,[s,j]),I=(0,l.useMemo)(()=>s.find(e=>e.id===i),[s,i]),q=null!==(t=null==I?void 0:I.name)&&void 0!==t?t:"Select Configuration",P=e=>{a(e),k(!1)},O=async e=>{try{await g(e).unwrap(),null==c||c(e),T(void 0),_(),h({status:"success",description:'Configuration "'.concat(null==w?void 0:w.name,'" was successfully deleted.')})}catch(e){h({status:"error",description:(0,d.e$)(e,"A problem occurred while deleting the configuration.")})}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.S0p,{open:S,onOpenChange:k,trigger:["click"],overlayStyle:{zIndex:999},dropdownRender:()=>$({searchTerm:j,setSearchTerm:C,searchResults:N,selectedConfigId:i,handleSelection:P,userCanCreateConfigs:u,userCanDeleteConfigs:p,modalOnOpen:f,onDeleteOpen:m,setConfigToDelete:T,isLoading:o,setDropdownOpen:k,configurations:s}),children:(0,n.jsx)(r.wpx,{icon:(0,n.jsx)(r.v4q,{}),iconPosition:"end","data-testid":"tcf-config-dropdown-trigger",children:q})}),(0,n.jsx)(R,{isOpen:x,onClose:b,onSuccess:e=>{a(e)}}),(0,n.jsx)(r.cVQ,{isOpen:v,onClose:()=>{T(void 0),_()},onConfirm:()=>{w&&O(w.id)},title:"Delete configuration",message:"Are you sure you want to delete this configuration? This action cannot be undone."})]})};var Y=i(32885);let X=e=>{let{defaultChecked:t,onChange:i,...s}=e,o=(0,r.pmc)(),[a,c]=(0,l.useState)(t),[u,p]=(0,l.useState)(!1),{isLoading:x}=(0,Y.x8)(),[f,{isLoading:b}]=(0,g.L)(),[v]=(0,Y.M7)(),{data:m}=(0,Y.n3)(void 0,{skip:x}),j=async e=>{let t=await f({consent:{override_vendor_purposes:e}});e&&m&&await v(m.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(t=>{if(o.closeAll(),null==i||i(e),(0,L.D4)(t)){let e=(0,d.e$)(t.error,"An unexpected error occurred while saving vendor override settings. Please try again.");null==i||i(!1),o((0,h.Vo)(e))}})(t)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(r.xvT,{children:"Configure overrides for TCF related purposes."}),(0,n.jsxs)(r.vyj,{size:"small",children:[(0,n.jsx)(r.rAg,{size:"small",disabled:b,loading:b,...s,checked:a,defaultChecked:t,onClick:e=>{e?(c(e),j(e)):p(!0)},"data-testid":"tcf-override-toggle"}),(0,n.jsx)(r.xvT,{children:"Override vendor purposes"}),(0,n.jsx)(_.b,{label:"Toggle on if you want to globally change any flexible legal bases or remove TCF purposes from your CMP"})]})]}),(0,n.jsx)(r.cVQ,{isOpen:u,onClose:()=>p(!1),onConfirm:()=>{c(!1),j(!1),p(!1)},title:"Disable Vendor Overrides",message:"Are you sure you want to disable vendor overrides? Clicking 'Continue' will immediately remove any custom configurations you have set for TCF purposes for all experiences."})]})},J=e=>{var t;let{isTCFOverrideEnabled:i}=e,[s,o]=(0,l.useState)(i),[a,d]=(0,l.useState)(!1),[c,u]=(0,I._)("selectedTCFConfigId",null),{data:p,isLoading:h}=(0,E.LS)({page:1,size:50},{skip:!i}),{data:g,isFetching:x}=(0,E.NZ)(c||"",{skip:!c});return(0,l.useEffect)(()=>{var e,t;!h&&(null==p?void 0:null===(e=p.items)||void 0===e?void 0:e.length)&&!c&&u(p.items[0].id),h||!c||(null==p?void 0:null===(t=p.items)||void 0===t?void 0:t.length)||u(null)},[h,null==p?void 0:p.items,c,u]),(0,n.jsxs)(C.Z,{title:"Publisher restrictions",fontSize:"sm",children:[(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",style:{width:"100%"},children:[(0,n.jsx)(X,{defaultChecked:s,onChange:e=>o(e)}),s&&(0,n.jsxs)(n.Fragment,{children:[h&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.OdW,{height:"20px"}),(0,n.jsx)(r.OdW,{height:"20px"}),(0,n.jsx)(r.OdW,{height:"32px",width:"200px"})]}),!h&&(null==p?void 0:null===(t=p.items)||void 0===t?void 0:t.length)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activities."}),(0,n.jsxs)(r.xvT,{children:["To configure this section, select a TCF purpose to edit the restriction type and vendors."," ",(0,n.jsx)(v.Z,{href:q.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)(K,{selectedConfigId:c||"",configurations:(null==p?void 0:p.items)||[],onConfigurationSelect:u})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xvT,{children:['To define custom publisher restrictions select "create configuration" below.'," ",(0,n.jsx)(v.Z,{href:q.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)(r.wpx,{onClick:()=>d(!0),"data-testid":"create-config-button",children:"Create configuration +"})]})]})]}),(0,n.jsx)(R,{isOpen:a,onClose:()=>d(!1),onSuccess:e=>{u(e)}}),s&&c&&(0,n.jsx)(Z,{className:"mt-3",config:g,isLoading:x})]})};var Q=()=>{var e,t;let{isLoading:i}=(0,Y.x8)(),{tcf:x}=(0,a.hz)(),{data:f,isLoading:v}=(0,Y.n3)(void 0,{skip:i||!x}),[_,{isLoading:j}]=(0,Y.M7)(),{data:w,isLoading:S}=(0,g.tB)({api_set:!0}),{data:k,isLoading:E}=(0,g.tB)({api_set:!1}),[I]=(0,g.L)(),q=(0,o.C)(g.D2),P=(0,o.C)(g.Yh),O=(0,l.useMemo)(()=>w&&(null==w?void 0:w.consent)&&"override_vendor_purposes"in w.consent?w.consent.override_vendor_purposes:!!k&&null!=k&&!!k.consent&&"override_vendor_purposes"in k.consent&&k.consent.override_vendor_purposes,[w,k]),{isLoading:L}=(0,p.a4)(),F=(0,r.pmc)(),R=async e=>{var t;let i=e=>{if(F.closeAll(),(0,d.D4)(e)){let t=(0,d.e$)(e.error,"An unexpected error occurred while saving. Please try again.");F((0,h.Vo)(t))}else F((0,h.t5)("Settings saved successfully"))},n=[...e.purposeOverrides.map(e=>{let t;return e.is_consent&&(t=y.I$.CONSENT),e.is_legitimate_interest&&(t=y.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:t}})];if(O){let e=await _(n);if((0,d.D4)(e)){i(e);return}}let{enabled:r,...s}=e.gpp;i(await I({gpp:s,plus_consent_settings:{tcf_publisher_country_code:null!==(t=e.tcfPublisherSettings.publisher_country_code)&&void 0!==t?t:null}}))},A=(0,l.useMemo)(()=>({purposeOverrides:f?f.map(e=>({purpose:e.purpose,is_included:e.is_included,is_consent:e.required_legal_basis===y.I$.CONSENT,is_legitimate_interest:e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS})):[],gpp:q,tcfPublisherSettings:{publisher_country_code:P.tcf_publisher_country_code}}),[f,q,P]),z=(0,l.useMemo)(()=>(null==f?void 0:f.some(e=>!e.is_included||e.required_legal_basis===y.I$.CONSENT||e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS))||!1,[f]),D=null===(t=(0,a.hz)())||void 0===t?void 0:null===(e=t.flags)||void 0===e?void 0:e.publisherRestrictions;return(0,n.jsx)(c.Z,{title:"Consent Configuration",children:i||L||v||S||E?(0,n.jsx)(r.kCb,{justifyContent:"center",alignItems:"center",height:"100%",children:(0,n.jsx)(r.$jN,{})}):(0,n.jsxs)(r.xuv,{"data-testid":"consent-configuration",children:[(0,n.jsx)(u.Z,{heading:"Consent settings"}),(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,children:[(0,n.jsx)(C.Z,{title:"Transparency & Consent Framework settings",children:(0,n.jsx)(m,{name:"TCF",enabled:x})}),x&&!z&&D&&(0,n.jsx)(J,{isTCFOverrideEnabled:O})]}),(0,n.jsx)(s.J9,{initialValues:A,enableReinitialize:!0,onSubmit:R,children:e=>{let{dirty:t,isValid:i,isSubmitting:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[x&&(z||!D)&&(0,n.jsxs)(C.Z,{title:"Vendor overrides",fontSize:"sm",children:[(0,n.jsx)(X,{defaultChecked:O,disabled:j}),O&&(0,n.jsxs)(r.Kqy,{mt:2,spacing:2,children:[(0,n.jsx)(r.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activites."}),(0,n.jsx)(r.xvT,{children:"To configure this section, select the purposes you allow and where available, the appropriate legal bases (either Consent or Legitimate Interest)."}),(0,n.jsx)(b,{})]})]}),(0,n.jsx)(N,{}),(0,n.jsx)(T,{}),(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:!t||!i,loading:l,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return l},D4:function(){return r},Dy:function(){return a},XD:function(){return d},cz:function(){return c},hE:function(){return o},oK:function(){return s}});var n=i(76649);let r=e=>"error"in e,s=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,l=e=>(0,n.Ln)({status:"number",data:{}},e),o=e=>(0,n.Ln)({detail:"string"},e),a=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=i(19043)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>s(e,t),r=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>s(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>s(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>s(i,t[e]));class l{static narrow(e){return new l(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof l?e.NF:e instanceof Function?e:t=>n(e,t);return new l(e=>t(e)&&i(e))}}new l(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=53748)}),_N_E=e.O()}]);
|
fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-3a829c53d5d723d2.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4065],{70378:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/custom-fields",function(){return l(76513)}])},56358:function(e,t,l){"use strict";l.d(t,{q:function(){return s}});var i=l(24246);let s=(0,l(91942).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,i.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},95492:function(e,t,l){"use strict";l.d(t,{l:function(){return s}});var i=l(24246);let s=(0,l(91942).IUT)({displayName:"TrashCanSolidIcon",viewBox:"0 0 12 15",path:(0,i.jsx)("path",{d:"M8.37857 1.18083C8.23393 0.892838 7.93661 0.710938 7.6125 0.710938H4.3875C4.06339 0.710938 3.76607 0.892838 3.62143 1.18083L3.42857 1.56094H0.857143C0.383036 1.56094 -1.19209e-07 1.94158 -1.19209e-07 2.41094C-1.19209e-07 2.8803 0.383036 3.26094 0.857143 3.26094H11.1429C11.6162 3.26094 12 2.8803 12 2.41094C12 1.94158 11.6162 1.56094 11.1429 1.56094H8.57143L8.37857 1.18083ZM11.167 4.11094H0.857143V12.6109C0.857143 13.5486 1.62589 14.3109 2.57143 14.3109H9.45268C10.3754 14.3109 11.167 13.5486 11.167 12.6109V4.11094ZM9.02411 6.23594V12.1859C9.02411 12.4197 8.80714 12.6109 8.59554 12.6109C8.33571 12.6109 8.16696 12.4197 8.16696 12.1859V6.23594C8.16696 6.00219 8.33571 5.81094 8.59554 5.81094C8.80714 5.81094 9.02411 6.00219 9.02411 6.23594ZM6.45268 6.23594V12.1859C6.45268 12.4197 6.23571 12.6109 6.02411 12.6109C5.76429 12.6109 5.57143 12.4197 5.57143 12.1859V6.23594C5.57143 6.00219 5.76429 5.81094 6.02411 5.81094C6.23571 5.81094 6.45268 6.00219 6.45268 6.23594ZM3.85714 6.23594V12.1859C3.85714 12.4197 3.66429 12.6109 3.42857 12.6109C3.19286 12.6109 3 12.4197 3 12.1859V6.23594C3 6.00219 3.19286 5.81094 3.42857 5.81094C3.66429 5.81094 3.85714 6.00219 3.85714 6.23594Z",fill:"currentColor"})})},77213:function(e,t,l){"use strict";l.d(t,{Z:function(){return x}});var i=l(24246),s=l(91942),a=l(88038),o=l.n(a),n=l(86677);l(27378);var r=l(25980),d=l(90867),c=l(77830),u=()=>{let e=(0,n.useRouter)();return(0,i.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(s.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},x=e=>{let{children:t,title:l,padded:a=!0,mainProps:c}=e,x=(0,r.hz)(),p=(0,n.useRouter)(),m="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(x.flags.privacyRequestsConfiguration&&m),{data:v}=(0,d.JE)(void 0,{skip:h}),{data:f}=(0,d.PW)(void 0,{skip:h}),g=x.flags.privacyRequestsConfiguration&&(!v||!f)&&m;return(0,i.jsxs)(s.kCb,{"data-testid":l,direction:"column",h:"100vh",children:[(0,i.jsxs)(o(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",l]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(s.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[g?(0,i.jsx)(u,{}):null,t]})]})}},19904:function(e,t,l){"use strict";l.d(t,{Tg:function(){return o}});var i=l(24246),s=l(16134),a=l(31793);let o=e=>(0,s.C)(a.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:l}=e;return o(t)?(0,i.jsx)(i.Fragment,{children:l}):null}},70416:function(e,t,l){"use strict";l.d(t,{d:function(){return s}});var i=l(24246);let s=(0,l(91942).IUT)({displayName:"AddIcon",viewBox:"0 0 10 10",path:(0,i.jsx)("path",{d:"M4.33331 4.33398V0.333984H5.66665V4.33398H9.66665V5.66732H5.66665V9.66732H4.33331V5.66732H0.333313V4.33398H4.33331Z",fill:"currentColor"})})},97181:function(e,t,l){"use strict";l.d(t,{d:function(){return d}});var i=l(24246),s=l(91942),a=l(34090),o=l(27378),n=l(46238),r=l(40324);let d=e=>{let{name:t,label:l,labelProps:d,tooltip:c,isRequired:u,layout:x="inline",helperText:p,...m}=e,[h,v,{setValue:f}]=(0,a.U$)(t),g=!!(v.touched&&v.error),[C,j]=(0,o.useState)("");h.value||"tags"!==m.mode&&"multiple"!==m.mode||(h.value=[]),"tags"===m.mode&&"string"==typeof h.value&&(h.value=[h.value]);let _="tags"===m.mode?(e,t)=>e?e.value!==C||h.value.includes(C)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(C,'"'):void 0:m.optionRender||void 0,b=e=>{j(e),m.onSearch&&m.onSearch(e)},y=(e,t)=>{f(e),m.onChange&&m.onChange(e,t)};return"inline"===x?(0,i.jsx)(s.NIc,{isInvalid:g,isRequired:u,children:(0,i.jsxs)(s.rjZ,{templateColumns:l?"1fr 3fr":"1fr",children:[l?(0,i.jsx)(r.__,{htmlFor:m.id||t,...d,children:l}):null,(0,i.jsxs)(s.jqI,{align:"center",children:[(0,i.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(s.WPr,{...h,id:m.id||t,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:_,onSearch:"tags"===m.mode?b:void 0,onChange:y,value:h.value||void 0,status:g?"error":void 0}),p&&(0,i.jsx)(s.Q6r,{children:p}),(0,i.jsx)(r.Bc,{isInvalid:g,message:v.error,fieldName:h.name})]}),(0,i.jsx)(n.b,{label:c})]})]})}):(0,i.jsx)(s.NIc,{isInvalid:g,isRequired:u,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[l?(0,i.jsx)(r.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:l}):null,(0,i.jsx)(n.b,{label:c})]}),(0,i.jsx)(s.WPr,{...h,id:m.id||t,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:_,onSearch:"tags"===m.mode?b:void 0,onChange:y,value:h.value||void 0,status:g?"error":void 0}),p&&(0,i.jsx)(s.Q6r,{style:{marginTop:0},children:p}),(0,i.jsx)(r.Bc,{isInvalid:g,message:v.error,fieldName:h.name})]})})}},10342:function(e,t,l){"use strict";var i=l(24246),s=l(91942),a=l(46238);t.Z=e=>{let{title:t,tooltip:l,children:o,...n}=e;return(0,i.jsxs)(s.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...n,children:[(0,i.jsxs)(s.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[t,l?(0,i.jsx)(s.xvT,{as:"span",mx:1,children:(0,i.jsx)(a.b,{label:l})}):void 0]}),(0,i.jsx)(s.Kqy,{p:6,spacing:6,children:o})]})}},76513:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return Y}});var i=l(24246),s=l(77213),a=l(91942),o=l(27378),n=l(58754),r=l(92222),d=l(59003),c=l(16134),u=l(812),x=l(19904),p=l(14481),m=l(46628),h=l(72625),v=l(61317);let f=new Map([["string","Single Select"],["string[]","Multi Select"],["open-text","Open Text"]]),g=new Map([[v.P6.SYSTEM,"system:information"],[v.P6.DATA_USE,"taxonomy:data use"],[v.P6.DATA_CATEGORY,"taxonomy:data category"],[v.P6.DATA_SUBJECT,"taxonomy:data subject"],[v.P6.PRIVACY_DECLARATION,"system:data use"]]);var C=l(32885);let j=e=>{var t;let l=null!==(t=g.get(e.getValue()))&&void 0!==t?t:e.getValue();return(0,i.jsx)(h.G3,{...e,value:l})},_=e=>{let{row:t,getValue:l}=e,s=t.original.allow_list_id?l():"open-text",a=f.get(s)||s;return(0,i.jsx)(h.A4,{value:a})},b=e=>{let{row:t,getValue:l,isDisabled:s}=e,a=!!l(),[o]=(0,C.yM)(),n=async e=>o({...t.original,active:e});return(0,i.jsx)(h.S1,{enabled:a,onToggle:n,title:"Disable custom field",message:"Are you sure you want to disable this custom field?",isDisabled:s,"aria-label":a?"Disable custom field":"Enable custom field"})};var y=l(56358),w=l(58452);let T=e=>{let{customField:t,onEdit:l,onDelete:s,...o}=e,n=(0,a.qY0)();return(0,i.jsxs)(a.xuv,{...o,children:[(0,i.jsx)(a.wpx,{"aria-label":"Edit property","data-testid":"edit-property-button",size:"small",className:"mr-[10px]",icon:(0,i.jsx)(a.dY8,{}),onClick:e=>{e.stopPropagation(),l(t,e)}}),(0,i.jsx)(a.wpx,{"aria-label":"Delete property","data-testid":"delete-property-button",size:"small",className:"mr-[10px]",icon:(0,i.jsx)(y.q,{}),onClick:e=>{e.stopPropagation(),n.onOpen()}}),(0,i.jsx)(w.Z,{isOpen:n.isOpen,onClose:n.onClose,onConfirm:()=>{s(t),n.onClose()},title:"Delete custom field",message:(0,i.jsx)(a.xvT,{color:"gray.500",children:"Are you sure you want to delete this custom field? This will remove the custom field and all stored values and this action can't be undone."}),continueButtonText:"Confirm",isCentered:!0,icon:(0,i.jsx)(a.aNP,{})})]})};var E=l(95346),S=l(14047),I=l(34090),R=l(55484);let L={color:"gray.600",fontSize:"14px",fontWeight:"semibold",minWidth:"150px"};var N=e=>{let{customLabelProps:t,disabled:l=!1,isRequired:s=!1,label:o,type:n="text",placeholder:r,...d}=e,[c,u]=(0,I.U$)(d),{id:x,name:p,autoFocus:m}=d,h="custom-input-".concat(c.name);return(0,i.jsxs)(a.NIc,{display:"flex",isRequired:s,isInvalid:!!(u.error&&u.touched),children:[o&&(0,i.jsx)(a.lXp,{htmlFor:x||p,...t||L,children:o}),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["number"===n&&(0,i.jsxs)(a.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,i.jsx)(a.zuI,{...c,autoComplete:"off",autoFocus:m,"data-testid":h}),(0,i.jsxs)(a.FiK,{children:[(0,i.jsx)(a.WQu,{}),(0,i.jsx)(a.Y_d,{})]})]}),"text"===n&&(0,i.jsx)(a.IIB,{...c,autoComplete:"off",autoFocus:m,color:"gray.700",isDisabled:l,placeholder:r,size:"sm","data-testid":h}),"textarea"===n&&(0,i.jsx)(a.gxH,{...c,autoComplete:"off",autoFocus:m,color:"gray.700",placeholder:r,resize:"none",size:"sm",value:c.value||"","data-testid":h}),(0,i.jsx)(a.J1D,{children:u.error})]})]})},H=l(70416),P=l(10342),M=l(95492),V=l(97181);let A={...L,minWidth:"unset"},U=e=>{let{values:t,validationSchema:l,errors:s,dirty:n,isValid:r,isSubmitting:d,isLoading:c,onClose:u,handleDropdownChange:x,isEditing:p}=e,{validateForm:m}=(0,I.u6)();return(0,o.useEffect)(()=>{m()},[l,m]),(0,i.jsxs)(I.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(P.Z,{title:"Field Information",children:[(0,i.jsx)(N,{isRequired:!0,label:"Name",name:"name",customLabelProps:A}),(0,i.jsx)(N,{label:"Description",name:"description",customLabelProps:A}),(0,i.jsx)(V.d,{label:"Location",name:"resource_type",options:E.C7,labelProps:A,disabled:p})]})}),(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(P.Z,{title:"Configuration",children:[(0,i.jsx)(V.d,{label:"Field Type",name:"field_type",labelProps:A,options:E.Hn,onChange:x}),t.field_type!==E.Uv.OPEN_TEXT?(0,i.jsx)(a.kCb,{flexDirection:"column",gap:"12px",paddingTop:"6px",paddingBottom:"24px",children:(0,i.jsx)(I.F2,{name:"allow_list.allowed_values",render:e=>{let{allowed_values:l}=t.allow_list;return(0,i.jsxs)(a.kCb,{flexDirection:"column",gap:"6",pl:"6",children:[(0,i.jsx)(a.kCb,{flexDirection:"column",children:l.map((t,s)=>(0,i.jsxs)(a.kCb,{flexGrow:1,gap:"3",mt:s>0?3:void 0,children:[(0,i.jsx)(N,{customLabelProps:{color:"gray.600",fontSize:"sm",fontWeight:"500",lineHeight:"20px",minW:"126px",pr:"8px"},isRequired:!0,label:"List item ".concat(s+1),name:"allow_list.allowed_values[".concat(s,"]")}),(0,i.jsx)(a.wpx,{"aria-label":"Remove this list value","data-testid":"remove-list-value-btn-".concat(s),icon:(0,i.jsx)(M.l,{}),disabled:l.length<=1,onClick:()=>e.remove(s),type:"text"})]},s))}),(0,i.jsxs)(a.kCb,{alignItems:"center",children:[(0,i.jsx)(a.xvT,{color:"gray.600",fontSize:"xs",fontWeight:"500",lineHeight:"16px",pr:"8px",children:"Add a list value"}),(0,i.jsx)(a.wpx,{"aria-label":"Add a list value","data-testid":"add-list-value-btn",icon:(0,i.jsx)(H.d,{h:"7px",w:"7px"}),onClick:()=>{e.push("")},size:"small"}),0===l.length&&(null==s?void 0:s.allow_list)?(0,i.jsx)(a.xvT,{color:"red.500",pl:"18px",size:"sm",children:s.allow_list.allowed_values}):null]})]})}})}):null]})}),(0,i.jsxs)(a.kCb,{justifyContent:"space-between",width:"100%",children:[(0,i.jsx)(a.wpx,{onClick:u,disabled:c||d,className:"mr-3","data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",loading:c,disabled:!n||!r||d,children:"Save"})]})]})},k={description:"",field_type:E.Uv.OPEN_TEXT,name:"",resource_type:v.P6.SYSTEM,allow_list:{name:"",description:"",allowed_values:[]}},z=R.IX(R.Z_().optional().label("allowed_values")),F=R.IX(R.Z_().required("List item is required")).min(1,"Must add at least one list value").label("allowed_values"),D=R.Ry().shape({name:R.Z_().required("Name is required").trim(),allow_list:R.Ry().shape({allowed_values:z})}),Z=R.Ry().shape({name:R.Z_().required("Name is required").trim(),allow_list:R.Ry().shape({allowed_values:F})}),q=(e,t)=>{var l,i,s;let a;if(!e)return;e.field_type!==v.AL.STRING||e.allow_list_id||(a=E.Uv.OPEN_TEXT),e.field_type===v.AL.STRING&&e.allow_list_id&&(a=E.Uv.SINGLE_SELECT),e.field_type===v.AL.STRING_&&e.allow_list_id&&(a=E.Uv.MULTIPLE_SELECT);let o=t?{name:null!==(l=t.name)&&void 0!==l?l:"",description:null!==(i=t.description)&&void 0!==i?i:"",allowed_values:null!==(s=t.allowed_values)&&void 0!==s?s:[]}:k.allow_list;return{...e,field_type:a||E.Uv.OPEN_TEXT,allow_list:o}},O=e=>{let{isOpen:t,onClose:l,isLoading:s,customField:n}=e,{errorAlert:r,successAlert:d}=(0,S.V)(),[c]=(0,C.Ld)(),[x]=(0,C.yM)(),[p]=(0,C.Nt)(),{data:m,isLoading:h}=(0,C.vA)(null==n?void 0:n.allow_list_id,{skip:!(null==n?void 0:n.allow_list_id)}),[f,g]=(0,o.useState)(D);if(h||!t)return null;let j=q(n,m),_=!!j,b=e=>{e===E.Uv.OPEN_TEXT?g(D):g(Z)},y=async e=>{if([E.Uv.SINGLE_SELECT,E.Uv.MULTIPLE_SELECT].includes(e.field_type)){var t,i;if(new Set(null===(t=e.allow_list)||void 0===t?void 0:t.allowed_values.map(e=>e.toLowerCase().trim()).map(e=>e)).size<e.allow_list.allowed_values.length){r("List item value must be unique");return}let{allow_list:l}=e;e.allow_list_id&&(l.id=e.allow_list_id),l.name||(l.name=Date.now().toString()+Math.random().toString());let s=await p(l);(0,u.D4)(s)||e.allow_list_id||(e.allow_list_id=null===(i=s.data)||void 0===i?void 0:i.id)}e.field_type===E.Uv.OPEN_TEXT&&(e.allow_list_id=void 0),[E.Uv.SINGLE_SELECT,E.Uv.OPEN_TEXT].includes(e.field_type)&&(e.field_type=v.AL.STRING),e.field_type===E.Uv.MULTIPLE_SELECT&&(e.field_type=v.AL.STRING_);let s={...e};delete s.allow_list;let a=n?await x(s):await c(s);(0,u.D4)(a)?r((0,u.e$)(a.error),"Custom field has failed to save due to the following:"):(l(),d("Custom field successfully saved"))};return(0,i.jsxs)(a.u_l,{id:"custom-field-modal-hello-world",isOpen:t,onClose:l,size:"lg",returnFocusOnClose:!1,isCentered:!0,children:[(0,i.jsx)(a.ZAr,{}),(0,i.jsxs)(a.hzk,{id:"modal-content","data-testid":"custom-field-modal",maxHeight:"80%",overflowY:"auto",children:[(0,i.jsx)(a.xBx,{id:"modal-header",fontWeight:"semibold",lineHeight:5,fontSize:"sm",py:"18px",px:6,height:"56px",backgroundColor:"gray.50",borderColor:"gray.200",borderWidth:"0px 0px 1px 1p",borderTopRightRadius:"8px",borderTopLeftRadius:"8px",boxSizing:"border-box",children:n?"Manage Custom Field":"Add a custom field"}),(0,i.jsx)(a.fef,{px:6,py:0,children:(0,i.jsx)(I.J9,{initialValues:j||k,validationSchema:f,onSubmit:y,enableReinitialize:!0,validateOnChange:!0,children:e=>(0,i.jsx)(U,{isEditing:_,validationSchema:f,isLoading:s,onClose:l,handleDropdownChange:b,...e})})})]})]})},W="Add a custom field",G=()=>(0,i.jsx)(a.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,i.jsxs)(a.gCW,{children:[(0,i.jsx)(a.xvT,{fontSize:"md",fontWeight:"600",children:"It looks like it’s your first time here!"}),(0,i.jsxs)(a.xvT,{fontSize:"sm",children:["You haven’t created any custom fields yet.",(0,i.jsx)("br",{}),"To create a custom field, click on the"," ",(0,i.jsxs)("strong",{children:['"',W,'"']})," button"]})]})}),B=(0,r.Cl)(),X=e=>{let{...t}=e,l=(0,a.pmc)(),{isLoading:s}=(0,C.GH)(),n=(0,c.C)(C.fN),[h]=(0,C.UF)(),{isOpen:f,onClose:g,onOpen:y}=(0,a.qY0)(),[w,E]=(0,o.useState)(),[S,I]=(0,o.useState)(),R=(0,x.Tg)([v.Sh.CUSTOM_FIELD_UPDATE]),L=(0,x.Tg)([v.Sh.CUSTOM_FIELD_DELETE]),N=e=>{R&&(E(e),y())},H=async e=>{if(L&&e.id){let t=await h({id:e.id});if((0,u.D4)(t)){l((0,m.Vo)((0,u.e$)(t.error)));return}l((0,m.t5)("Custom field deleted"))}},P=(0,o.useMemo)(()=>[B.accessor(e=>e.name,{id:"name",cell:e=>(0,i.jsx)(p.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,i.jsx)(p.Rr,{value:"Label",...e})}),B.accessor(e=>e.description,{id:"description",cell:e=>(0,i.jsx)(p.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,i.jsx)(p.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),B.accessor(e=>e.field_type,{id:"field_type",cell:_,header:e=>(0,i.jsx)(p.Rr,{value:"Field Type",...e})}),B.accessor(e=>e.resource_type,{id:"resource_type",cell:j,header:e=>(0,i.jsx)(p.Rr,{value:"Locations",...e})}),R&&B.accessor(e=>e.active,{id:"enable",cell:b,header:e=>(0,i.jsx)(p.Rr,{value:"Enable",...e}),meta:{disableRowClick:!0}}),(R||L)&&B.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e;return(0,i.jsx)(T,{customField:t.original,onEdit:N,onDelete:H})},meta:{disableRowClick:!0}})].filter(Boolean),[L,R]),M=(0,d.b7)({getCoreRowModel:(0,r.sC)(),getFilteredRowModel:(0,r.vL)(),getSortedRowModel:(0,r.tj)(),onGlobalFilterChange:I,globalFilterFn:"includesString",columns:P,data:n,state:{globalFilter:S},columnResizeMode:"onChange"});return(0,i.jsxs)(a.xuv,{...t,children:[(0,i.jsx)(a.xuv,{maxWidth:600,children:(0,i.jsx)(a.xvT,{mb:10,fontSize:"sm",children:n.length>0?"Custom fields enable you to capture metrics specific to your organization and have those metrics appear in the data map and in reports.":"Custom fields provide organizations with the capability to capture metrics that are unique to their specific needs, allowing them to create customized reports. These fields can be added to either systems or elements within a taxonomy, and once added, they become reportable fields that are visible on the data map."})}),(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-page",children:[(0,i.jsxs)(p.Q$,{children:[(0,i.jsx)(p.HO,{globalFilter:S,setGlobalFilter:I,placeholder:"Search for a custom field"}),(0,i.jsx)(a.Ugi,{alignItems:"center",spacing:4,children:(0,i.jsx)(()=>(0,i.jsx)(x.ZP,{scopes:[v.Sh.CUSTOM_FIELD_DEFINITION_CREATE],children:(0,i.jsx)(a.wpx,{type:"primary","data-testid":"add-custom-field-btn",onClick:y,children:W})}),{})})]}),s?(0,i.jsx)(a.xuv,{p:2,borderWidth:1,children:(0,i.jsx)(p.I4,{rowHeight:26,numRows:10})}):(0,i.jsx)(p.ZK,{tableInstance:M,onRowClick:R?N:void 0,emptyTableNotice:(0,i.jsx)(G,{}),enableSorting:!0}),f&&(0,i.jsx)(O,{customField:w,isOpen:f,onClose:()=>{E(void 0),g()},isLoading:!1})]})]})};var Y=()=>(0,i.jsx)(s.Z,{title:"Custom fields",children:(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-management",children:[(0,i.jsx)(n.Z,{heading:"Custom fields"}),(0,i.jsx)(X,{})]})})}},function(e){e.O(0,[8033,6060,7553,4481,7980,2888,9774,179],function(){return e(e.s=70378)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1051],{55342:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/domain-records",function(){return o(64872)}])},77213:function(e,n,o){"use strict";o.d(n,{Z:function(){return m}});var r=o(24246),i=o(91942),t=o(88038),s=o.n(t),a=o(86677);o(27378);var c=o(25980),d=o(90867),l=o(77830),u=()=>{let e=(0,a.useRouter)();return(0,r.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(i.xuv,{children:[(0,r.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(i.wpx,{onClick:()=>{e.push(l.fz)},children:"Configure"})]}),(0,r.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:n,title:o,padded:t=!0,mainProps:l}=e,m=(0,c.hz)(),h=(0,a.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,f=!(m.flags.privacyRequestsConfiguration&&x),{data:p}=(0,d.JE)(void 0,{skip:f}),{data:v}=(0,d.PW)(void 0,{skip:f}),g=m.flags.privacyRequestsConfiguration&&(!p||!v)&&x;return(0,r.jsxs)(i.kCb,{"data-testid":o,direction:"column",h:"100vh",children:[(0,r.jsxs)(s(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",o]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(i.kCb,{as:"main",direction:"column",py:t?6:0,px:t?10:0,h:t?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...l,children:[g?(0,r.jsx)(u,{}):null,n]})]})}},64872:function(e,n,o){"use strict";o.r(n);var r=o(24246),i=o(92222),t=o(59003),s=o(91942),a=o(27378),c=o(88340),d=o(77213),l=o(14481),u=o(32885);let m=(0,i.Cl)();n.default=()=>{let e=(0,a.useMemo)(()=>[m.accessor(e=>e.hostName,{header:"Name",cell:e=>(0,r.jsx)(l.G3,{value:e.getValue()})}),m.accessor(e=>e.type,{header:"Type",cell:e=>(0,r.jsx)(l.G3,{value:e.getValue()})}),m.accessor(e=>e.data,{header:"Value",cell:e=>(0,r.jsx)(l.G3,{value:e.getValue()})}),m.display({id:"actions",cell:e=>{let{row:n}=e;return(0,r.jsx)(c.Z,{copyText:n.original.data,type:"default",size:"small"})},header:"Actions",maxSize:65})],[]),{data:n,isLoading:o}=(0,u.Vh)(),h=(0,a.useMemo)(()=>(null==n?void 0:n.domain_verification_records)?n.domain_verification_records.map(e=>({hostName:"www",type:"CNAME",data:e})):[],[n]),x=(0,t.b7)({getCoreRowModel:(0,i.sC)(),columns:e,data:h,columnResizeMode:"onChange"});return(0,r.jsx)(d.Z,{title:"Domain records",children:(0,r.jsxs)(s.xuv,{"data-testid":"domain-records",children:[(0,r.jsx)(s.X6q,{marginBottom:4,fontSize:"2xl",children:"Domain records"}),(0,r.jsxs)(s.xuv,{maxWidth:"600px",children:[(0,r.jsx)(s.xvT,{marginBottom:2,fontSize:"md",children:"Set the following record on your DNS provider to continue."}),(0,r.jsxs)(s.xvT,{mb:10,fontSize:"sm",children:["Please visit"," ",(0,r.jsx)(s.rUS,{color:"complimentary.500",href:"https://fid.es/manage-dns",isExternal:!0,children:"docs.ethyca.com"})," ","for more information on how to configure Domain records."]}),o?(0,r.jsx)(s.xuv,{p:2,borderWidth:1,children:(0,r.jsx)(l.I4,{rowHeight:26,numRows:5})}):(0,r.jsx)(l.ZK,{tableInstance:x})]})]})})}}},function(e){e.O(0,[8033,6060,4481,2888,9774,179],function(){return e(e.s=55342)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1051],{55342:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/domain-records",function(){return o(64872)}])},77213:function(e,n,o){"use strict";o.d(n,{Z:function(){return m}});var r=o(24246),i=o(91942),t=o(88038),s=o.n(t),a=o(86677);o(27378);var c=o(25980),d=o(90867),l=o(77830),u=()=>{let e=(0,a.useRouter)();return(0,r.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(i.xuv,{children:[(0,r.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(i.wpx,{onClick:()=>{e.push(l.fz)},children:"Configure"})]}),(0,r.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:n,title:o,padded:t=!0,mainProps:l}=e,m=(0,c.hz)(),h=(0,a.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,f=!(m.flags.privacyRequestsConfiguration&&x),{data:p}=(0,d.JE)(void 0,{skip:f}),{data:v}=(0,d.PW)(void 0,{skip:f}),g=m.flags.privacyRequestsConfiguration&&(!p||!v)&&x;return(0,r.jsxs)(i.kCb,{"data-testid":o,direction:"column",h:"100vh",children:[(0,r.jsxs)(s(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",o]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(i.kCb,{as:"main",direction:"column",py:t?6:0,px:t?10:0,h:t?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...l,children:[g?(0,r.jsx)(u,{}):null,n]})]})}},64872:function(e,n,o){"use strict";o.r(n);var r=o(24246),i=o(92222),t=o(59003),s=o(91942),a=o(27378),c=o(88340),d=o(77213),l=o(14481),u=o(32885);let m=(0,i.Cl)();n.default=()=>{let e=(0,a.useMemo)(()=>[m.accessor(e=>e.hostName,{header:"Name",cell:e=>(0,r.jsx)(l.G3,{value:e.getValue()})}),m.accessor(e=>e.type,{header:"Type",cell:e=>(0,r.jsx)(l.G3,{value:e.getValue()})}),m.accessor(e=>e.data,{header:"Value",cell:e=>(0,r.jsx)(l.G3,{value:e.getValue()})}),m.display({id:"actions",cell:e=>{let{row:n}=e;return(0,r.jsx)(c.Z,{copyText:n.original.data,type:"default",size:"small"})},header:"Actions",maxSize:65})],[]),{data:n,isLoading:o}=(0,u.Vh)(),h=(0,a.useMemo)(()=>(null==n?void 0:n.domain_verification_records)?n.domain_verification_records.map(e=>({hostName:"www",type:"CNAME",data:e})):[],[n]),x=(0,t.b7)({getCoreRowModel:(0,i.sC)(),columns:e,data:h,columnResizeMode:"onChange"});return(0,r.jsx)(d.Z,{title:"Domain records",children:(0,r.jsxs)(s.xuv,{"data-testid":"domain-records",children:[(0,r.jsx)(s.X6q,{marginBottom:4,fontSize:"2xl",children:"Domain records"}),(0,r.jsxs)(s.xuv,{maxWidth:"600px",children:[(0,r.jsx)(s.xvT,{marginBottom:2,fontSize:"md",children:"Set the following record on your DNS provider to continue."}),(0,r.jsxs)(s.xvT,{mb:10,fontSize:"sm",children:["Please visit"," ",(0,r.jsx)(s.rUS,{color:"complimentary.500",href:"https://fid.es/manage-dns",isExternal:!0,children:"docs.ethyca.com"})," ","for more information on how to configure Domain records."]}),o?(0,r.jsx)(s.xuv,{p:2,borderWidth:1,children:(0,r.jsx)(l.I4,{rowHeight:26,numRows:5})}):(0,r.jsx)(l.ZK,{tableInstance:x})]})]})})}}},function(e){e.O(0,[8033,6060,7553,4481,2888,9774,179],function(){return e(e.s=55342)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2462],{40135:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/locations",function(){return n(36956)}])},36956:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Z}});var i=n(24246),l=n(91942),s=n(16134),o=n(77213),a=n(58754),r=n(98784),d=n.n(r),c=n(86677),u=n(27378),h=n(812),g=n(58452),m=n(26917),x=n(46628),p=n(61317),j=n(31883),f=n(77830),v=n(26089),C=n(61524),y=n(46238),w=e=>{let{id:t,isChecked:n,onChange:s}=e;return(0,i.jsxs)(l.kCb,{alignItems:"center",gap:"8px",children:[(0,i.jsx)(l.rAg,{checked:n,size:"small",onChange:s,id:t,"data-testid":"regulated-toggle"}),(0,i.jsx)(l.lXp,{fontSize:"sm",m:0,htmlFor:t,children:"Regulated"}),(0,i.jsx)(y.b,{label:"Toggle on to see only locations in this region with privacy regulations supported by Fides"})]})},b=n(67991),k=n(12282),S=n(85759),_=e=>{let{groups:t,locations:n,isOpen:s,onClose:o,selected:a,onChange:r}=e,[d,c]=(0,u.useState)(a),[h,g]=(0,u.useState)(!1),{filteredLocations:m,locationsByGroup:x}=(0,u.useMemo)(()=>{let e=h?n.filter(e=>{var t;return null===(t=e.regulation)||void 0===t?void 0:t.length}):n;return{locationsByGroup:(0,S.VT)(e),filteredLocations:e}},[n,h]),{allSelected:p,handleToggleAll:j,handleToggleSelection:f}=(0,b.QZ)({items:m,selected:d,onChange:c}),v=d.filter(e=>!Object.keys(x).includes(e)).length,C=n[0].continent,y=Object.keys(x),_=!(1===y.length&&"Other"===y[0]);return(0,i.jsxs)(l.u_l,{size:"2xl",isOpen:s,onClose:o,isCentered:!0,children:[(0,i.jsx)(l.ZAr,{}),(0,i.jsxs)(l.hzk,{"data-testid":"subgroup-modal",children:[(0,i.jsx)(k.h4,{title:"Select locations"}),(0,i.jsxs)(l.fef,{p:6,maxHeight:"70vh",overflowY:"auto",children:[(0,i.jsx)(k.x$,{title:C,allSelected:p,onToggleAll:j,numSelected:v,children:(0,i.jsx)(w,{id:"".concat(C,"-modal-regulated"),isChecked:h,onChange:()=>g(!h)})}),_?(0,i.jsx)(l.UQy,{allowToggle:!0,allowMultiple:!0,children:Object.entries(x).map(e=>{let[n,s]=e,o=t.find(e=>n===e.id),a=o?o.name:n;return(0,i.jsxs)(l.Qdk,{"data-testid":"".concat(a,"-accordion"),children:[(0,i.jsx)("h2",{children:(0,i.jsxs)(l.KFZ,{children:[(0,i.jsx)(l.xuv,{as:"span",flex:"1",textAlign:"left",fontWeight:"semibold",fontSize:"sm",children:a}),(0,i.jsx)(l.XEm,{})]})}),(0,i.jsx)(l.Hk3,{pb:4,children:(0,i.jsx)(l.MIq,{columns:3,spacing:6,children:s.map(e=>(0,i.jsx)(l.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:d.includes(e.id),onChange:()=>f(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})})]},n)})}):(0,i.jsx)(l.MIq,{columns:3,spacing:6,paddingInline:4,children:m.map(e=>(0,i.jsx)(l.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:d.includes(e.id),onChange:()=>f(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})]}),(0,i.jsx)(k.$_,{onApply:()=>{let e=new Set(d);Object.entries(x).forEach(t=>{let[n,i]=t;i.every(e=>d.includes(e.id))?e.add(n):e.delete(n)}),r(Array.from(e)),o()},onClose:o})]})]})};let O=(e,t)=>{var n;return null===(n=e.name)||void 0===n?void 0:n.toLocaleLowerCase().includes(t.toLocaleLowerCase())};var E=e=>{let{title:t,groups:n,locations:s,selected:o,onChange:a,search:r}=e,d=(0,l.qY0)(),[c,h]=(0,u.useState)(!1),g=!!(null==r?void 0:r.length),m=n.length>0,x=s;n.length&&(x=n),g&&(x=[...s,...n].sort((e,t)=>e.name.localeCompare(t.name)));let p=c?x.filter(e=>(0,S.$q)(e,s)):x,j=r?p.filter(e=>O(e,r)):p,f=n.filter(e=>"checked"===(0,S.ji)({group:e,selected:o,locations:s})).map(e=>e.id),v=n.filter(e=>"indeterminate"===(0,S.ji)({group:e,selected:o,locations:s})).map(e=>e.id),y=m?[...f,...o]:o,b=o.length,k=e=>{a(s.map(t=>e.includes(t.id)?{...t,selected:!0}:{...t,selected:!1}))};return 0===j.length&&r?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C.ZP,{title:t,items:j,selected:y,indeterminate:m?v:[],onChange:e=>{let t=new Set(e),i=new Set(y);e.forEach(e=>{!i.has(e)&&n.find(t=>t.id===e)&&s.filter(t=>{var n;return null===(n=t.belongs_to)||void 0===n?void 0:n.includes(e)}).forEach(e=>{t.add(e.id)})}),i.forEach(e=>{!t.has(e)&&n.find(t=>t.id===e)&&s.filter(t=>{var n;return null===(n=t.belongs_to)||void 0===n?void 0:n.includes(e)}).forEach(e=>{t.delete(e.id)})}),k(Array.from(t))},onViewMore:()=>{d.onOpen()},numSelected:b,toggle:(0,i.jsx)(w,{id:"".concat(t,"-regulated"),isChecked:c,onChange:()=>h(!c)})}),(0,i.jsx)(_,{groups:n,locations:s,isOpen:d.isOpen,onClose:d.onClose,selected:o,onChange:k},"subgroup-modal-selected-".concat(y.length))]})},L=n(64781),A=e=>{var t,n;let{data:s}=e,o=(0,l.pmc)(),a=(0,l.qY0)(),[r,C]=(0,u.useState)(null!==(n=null===(t=s.locations)||void 0===t?void 0:t.filter(e=>e.id!==p._F.GLOBAL))&&void 0!==n?n:[]),[y,w]=(0,u.useState)(""),[b,{isLoading:k}]=(0,L.WA)(),_=(0,u.useMemo)(()=>(0,S.Il)((s.locations||[]).filter(e=>e.id!==p._F.GLOBAL),s.location_groups||[]),[s]),O=!d().isEqual(r,s.locations),A=(0,c.useRouter)(),Z=()=>{A.push(f.vY).then(()=>{o.closeAll()})},F=async()=>{let e=await b({locations:r.map(e=>({id:e.id,selected:e.selected})),regulations:[]});(0,j.D4)(e)?o((0,x.Vo)((0,h.e$)(e.error))):o((0,x.t5)((0,i.jsxs)(l.xvT,{display:"inline",children:["Fides has automatically associated the relevant regulations with your location choices."," ",(0,i.jsx)(v.Z,{onClick:Z,children:"View regulations here."})]})))},M=e=>{C(r.map(t=>{let n=e.find(e=>e.id===t.id);return null!=n?n:t}))};return(0,i.jsxs)(l.gCW,{alignItems:"start",spacing:4,children:[(0,i.jsx)(l.xuv,{maxWidth:"510px",width:"100%",children:(0,i.jsx)(m.Z,{onChange:w,placeholder:"Search",value:y,onClear:()=>w("")})}),(0,i.jsx)(l.MIq,{columns:{base:1,md:2,xl:3},spacing:6,width:"100%",children:Object.entries(_).map(e=>{let[t,n]=e;return(0,i.jsx)(E,{title:t,groups:n.locationGroups,locations:n.locations,selected:r.filter(e=>n.locations.find(t=>t.id===e.id)&&e.selected).map(e=>e.id),onChange:M,search:y},t)})}),(0,i.jsx)(g.Z,{isOpen:a.isOpen,onClose:a.onClose,onConfirm:()=>{F(),a.onClose()},title:"Regulation updates",message:"Modifications in your location settings may also affect your regulation settings to simplify management. You can override any Fides-initiated changes directly in the regulation settings.",isCentered:!0,icon:(0,i.jsx)(l.aNP,{color:"orange"})}),O?(0,i.jsx)(l.wpx,{type:"primary",onClick:a.onOpen,loading:k,"data-testid":"save-btn",children:"Save"}):null]})},Z=()=>{let{isLoading:e}=(0,L.QM)(),t=(0,s.C)(L.P8);return(0,i.jsx)(o.Z,{title:"Locations",children:(0,i.jsxs)(l.xuv,{"data-testid":"location-management",children:[(0,i.jsx)(a.Z,{heading:"Locations"}),(0,i.jsx)(l.xvT,{fontSize:"sm",maxWidth:"720px",pb:6,children:"Select the locations that you operate in and Fides will make sure that you are automatically presented with the relevant regulatory guidelines and global frameworks for your locations."}),(0,i.jsx)(l.xuv,{children:e?(0,i.jsx)(l.$jN,{}):(0,i.jsx)(A,{data:t})})]})})}}},function(e){e.O(0,[8033,3505,2888,9774,179],function(){return e(e.s=40135)}),_N_E=e.O()}]);
|