ethyca-fides 2.69.2rc2__py2.py3-none-any.whl → 2.69.3b1__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.
Potentially problematic release.
This version of ethyca-fides might be problematic. Click here for more details.
- {ethyca_fides-2.69.2rc2.dist-info → ethyca_fides-2.69.3b1.dist-info}/METADATA +1 -1
- {ethyca_fides-2.69.2rc2.dist-info → ethyca_fides-2.69.3b1.dist-info}/RECORD +231 -218
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/30369bb8ae01_add_webmonitorgroupjob_model.py +67 -0
- fides/api/alembic/migrations/versions/67d0e389b003_update_consentstatus_enum.py +47 -0
- fides/api/alembic/migrations/versions/f36ce1bde293_add_system_groups.py +132 -0
- fides/api/api/v1/endpoints/privacy_request_endpoints.py +3 -5
- fides/api/api/v1/endpoints/system.py +140 -55
- fides/api/api/v1/endpoints/user_endpoints.py +3 -3
- fides/api/db/base.py +2 -0
- fides/api/main.py +2 -0
- fides/api/models/asset.py +2 -0
- fides/api/models/detection_discovery/web_monitor.py +61 -0
- fides/api/models/sql_models.py +8 -0
- fides/api/models/system_group.py +85 -0
- fides/api/schemas/saas/saas_config.py +2 -17
- fides/api/schemas/saas/strategy_configuration.py +12 -0
- fides/api/schemas/system.py +8 -0
- fides/api/service/async_dsr/async_dsr_service.py +130 -10
- fides/api/service/async_dsr/async_dsr_strategy.py +5 -0
- fides/api/service/async_dsr/async_dsr_strategy_callback.py +16 -0
- fides/api/service/async_dsr/async_dsr_strategy_factory.py +63 -0
- fides/api/service/async_dsr/async_dsr_strategy_polling.py +94 -0
- fides/api/service/connectors/saas_connector.py +25 -7
- fides/api/service/deps.py +7 -0
- fides/api/service/privacy_request/request_service.py +30 -21
- fides/api/service/strategy.py +6 -3
- fides/api/task/graph_runners.py +2 -32
- fides/api/task/graph_task.py +5 -4
- fides/api/task/scheduler_utils.py +39 -0
- fides/api/util/filter_utils.py +0 -3
- fides/config/execution_settings.py +0 -4
- fides/service/system/__init__.py +0 -0
- fides/service/system/system_service.py +138 -0
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/_b75ACzlGNz3tZqGUPTE5/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{1345-5e1c5b66e25c566e.js → 1345-1961771e9619db39.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1817-0ca16d288fad916d.js → 1817-9423665774c2c08f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1896-49010da5c2705fc5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3620-602eb74dc896d556.js → 3620-34355b0c44325537.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3642-c052564812532324.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3729-c17ac8031a4c4fd1.js → 3729-c8accd71498f6fe4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3855-ef5194cdb228beb6.js → 3855-0565d44d150c985a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3872-f78dec02f0d959ae.js → 3872-c022bb7259a9f323.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4164-355644b916ae0094.js → 4164-cadb4c6528662248.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4608-be8cba73f5d7c326.js → 4608-caa9cb70fb66ac99.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4786-61154adf88e448e1.js → 4786-d2b03ba5c82a02ed.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4831-fd99c0b3784de128.js → 4831-c0d20b2a0b7332bb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4844-46324c3d848b8b6a.js → 4844-e5064a161a7e5a12.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5258-b0de22a8521686ab.js → 5258-0062e0a1e4f8c03e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5487-02d00bad7c6830e0.js → 5487-46774dc9df554af1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6084-c153669d5567e242.js → 6084-2c7b81cbcae7e3b4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6853-b17673391117c976.js → 6853-8fb39280a8f0eb89.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/6954-3b26ff8259c4d5c3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{7476-45c5088baa8b66af.js → 7476-fdd0eb08a12e0334.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{787-a8c7eab617e2fceb.js → 787-f2eca25837ff7305.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{79-65674011d455af4d.js → 79-68834fd07d69f428.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{8002-24af20d679efc04e.js → 8002-193a97fe4de8b779.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9046-712156d461165f56.js → 9046-1afcfb1c4dbdd6c6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9951-a88367a129b724ba.js → 9951-0c8a80f01e431957.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-fcdad91f6f66292b.js → _app-a653cee14ce2366b.js} +9 -9
- fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-bd0d82078e67cac3.js → add-systems-0a2b2f4a30245089.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-9dda4de5ec580279.js → privacy-experience-dff842dbed2bc6c8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-23d3e50db42f31b3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-28b192e2c074b0f3.js → reporting-75be0acd400cf527.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-30108b00ac769fc3.js → data-catalog-9fa11c01b44ba8f1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-fb16cb8fd2b3826f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-a481a5be96dede96.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-9a81d42a474e1e48.js → action-center-6c65b86a61340753.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-b6ae7adb8ef0b525.js → activity-7fe1ca395914f77f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-e32fccc4ca520d2b.js → new-85b28db67d96f201.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-7c59a6abf6ba6207.js → dataset-409fe1a086fb7d38.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-927b7e476c4b47d0.js → [id]-785205655317b1d3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-cbe100d50df34285.js → new-a6985f77afbc5bc0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-6cd8708106331b8d.js → index-bf3042fdbfb12b3d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-5d40db1ce8810e1d.js → [id]-e545f8ef5c945f45.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-95402b5001c07ef2.js → integrations-f297e6cdb9fe97b9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-0f25a76dd18c5e20.js → [id]-6e864b293571a508.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-ad6ad3e5bd72765d.js → messaging-0fc3f1f3b1cd6f2a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-6032d82f0fc2893d.js → storage-089c166287a89166.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-baf31c3e4b081046.js → privacy-requests-73be3cfaaa95ece4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-6903f42a0412bfa6.js → datamap-adbea0f9fd21ff3a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-9495e2eb506606c7.js → [purpose_id]-c64b87694eda4785.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-93a978443bf299db.js → consent-d502bf1e7580df06.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-9ecb803099082bf4.js → custom-fields-b841d63011827b43.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-2e635dcd11b78224.js → locations-e29384f7a3db5221.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-f547f1f33c12faf3.js → organization-88f6badc1bb38b97.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-20b1193ed76c56b0.js → test-datasets-0366184eda09a933.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-f4bf47ed2c4746ba.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-4d7827fc9c46b6b8.js → taxonomy-2d9548cfa6086e8f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-64452dfae2c5e614.js → [id]-763861f5eb207db5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-9cec020f89544426.js → user-management-98a3277820e232c7.js} +1 -1
- fides/ui-build/static/admin/_next/static/css/018c12b58ee7f861.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/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 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about/alpha.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/privacy-requests.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/5dPuc0vV0q3Rte9dEBVGg/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3847-230bf61b053bc706.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6954-5296188c19d7d0ac.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-0d4844d0b808e6e4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-e1ba213fb666b3f4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-6d133580045abdda.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-fbc8761ef4d55516.js +0 -1
- fides/ui-build/static/admin/_next/static/css/650df9c348000a26.css +0 -1
- {ethyca_fides-2.69.2rc2.dist-info → ethyca_fides-2.69.3b1.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.69.2rc2.dist-info → ethyca_fides-2.69.3b1.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.69.2rc2.dist-info → ethyca_fides-2.69.3b1.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.69.2rc2.dist-info → ethyca_fides-2.69.3b1.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{5dPuc0vV0q3Rte9dEBVGg → _b75ACzlGNz3tZqGUPTE5}/_ssgManifest.js +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1099-79646e64f26d62fa.js → 1099-718ce18b9bd70cdb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2921-52328140bc420d0f.js → 2921-765918f8aa37fdb2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3923-bb2417b8dcade7a4.js → 3923-23df37eef17d6ea2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{401-4af0a912e249d30f.js → 401-45f399d4d1325340.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4808-dd4157aa72648068.js → 4808-57c5ac15fd8b0d81.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{549-38ea1d91ee2addaa.js → 549-170c96caa601e15a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{7630-7ed6c6117775dffe.js → 7630-8613916021366672.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{796-9e1ca1a4030707c5.js → 796-8fbae2fc714e7a3a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9826-dbae8dee941a7fac.js → 9826-d49a56431e896acb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{404-471a6b18e712f050.js → 404-8d9c703c96662265.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-ace203dfacacbdc4.js → manual-adaec1ec185160af.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-920fb469e0dda1d2.js → multiple-20050dbae806179d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-406170eaae4329c6.js → add-vendors-7b8cec88b5ad53d1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-7207ab23bdb36ce8.js → configure-b7b7fb3e8b2ea816.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-f80cf2d3966816fd.js → [id]-c30382719d6f797a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-b378576cba255609.js → [id]-074cdbfc678ba791.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-2ca1de7b88094ab0.js → new-bcddda632b4df409.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-226efa1dcd41437f.js → properties-17cdca29c6d4cdd6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-3e8bdefe714254ec.js → consent-9b4e0a08ae6216c7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-2c29ff7a01198f30.js → [resourceUrn]-d0dbba5bff738b57.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-04cfe2cfba7b7cd8.js → [projectUrn]-8ffd8d148269d323.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-5f2d7b24804f861f.js → projects-25c5916c8357f98d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-8eb581024bc0172f.js → [resourceUrn]-cfc118e68285405c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-de704de849960f01.js → resources-9b7e4b86b1e8a40a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-c7390e046b2e2b7f.js → datamap-ea1eabce2a3fc2c7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-dfd71c1e9c458b89.js → [...subfieldNames]-3c629aecee30c575.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-7cdc42ec5493b83d.js → [collectionName]-a13ea13e0316d5a2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-e12b11ba15bc3fc1.js → [datasetId]-a6ae353b3b1536cc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-cce20440b177050b.js → datastore-connection-93d5c01dd927bad2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-3c6dc2f6e6bae960.js → [id]-f03f1fdaa1f5a0c6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-4a6d4023a7791be8.js → add-template-8f90e275e932940b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-76b204c9b98d656f.js → messaging-68385a251c7ade5f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-bc0e2adf6e0d3ac7.js → ant-components-fc7d652910f3ad8d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-86ffcc1ad3fa912e.js → AntForm-fb6e6f4b276b6189.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-ec04f595465bdf69.js → FormikAntFormItem-00869abf79950a9a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-41d309754ff0c1de.js → FormikControlled-5716d749236c9f70.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-cab1f78cec7808f9.js → FormikField-d6dfb9daa3935db3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-eb6058221403b156.js → forms-9697549bce7060be.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-48500551fd6a7602.js → table-migration-888656ae0bd40f62.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-d83e5bd52a638234.js → configure-5a3cd9b14a37ef27.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-e784c05d056b2371.js → [id]-3d2a77cb07aa8dc0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-0a7a2db148a7561a.js → add-property-210e7e3b3d776d44.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-da734840e4f9d04b.js → properties-18257b6a70fa8a97.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/{alpha-a82f3df840d5c1b5.js → alpha-b678e7577eef5e5c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-d06fb16487705b9d.js → about-3f3039c7e86cab2f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-16fdd91a81074dd1.js → domain-records-50f9b26c6907d6de.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-4cdd6001e7cb9aee.js → domains-5ae0d30eb3b770ab.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-1914de830ce5cfc4.js → email-templates-f5924e64a15a0dc3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{privacy-requests-2ecc073f41628f62.js → privacy-requests-d5f8db89c7e91a02.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-7c02e469d8c5bd74.js → regulations-46d06037fcadaf00.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-6e15332935f6b538.js → [id]-a659f18a30ef89f3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{webpack-678e89d68dbcd94f.js → webpack-606818148553db7b.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53748:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return t(96236)}])},59301:function(e,i,t){"use strict";var n=t(24246);let{Link:r}=t(96306).AntTypography;i.Z=e=>(0,n.jsx)(r,{target:"_blank",rel:"noopener noreferrer",...e})},56358:function(e,i,t){"use strict";t.d(i,{q:function(){return r}});var n=t(24246);let r=(0,t(96306).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,i,t){"use strict";t.d(i,{Z:function(){return p}});var n=t(24246),r=t(96306),s=t(88038),l=t.n(s),o=t(86677);t(27378);var a=t(25980),d=t(90867),c=t(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:i,title:t,padded:s=!0,mainProps:c}=e,p=(0,a.hz)(),h=(0,o.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,g=!(p.flags.privacyRequestsConfiguration&&x),{data:b}=(0,d.JE)(void 0,{skip:g}),{data:v}=(0,d.PW)(void 0,{skip:g}),m=p.flags.privacyRequestsConfiguration&&(!b||!v)&&x;return(0,n.jsxs)(r.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",t]}),(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:[m?(0,n.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var n=t(24246),r=t(96306),s=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,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 i?(0,n.jsx)(r.lQT,{className:t||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!t&&(0,n.jsx)(s.m,{className:o?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,i,t){"use strict";t.d(i,{Tg:function(){return l}});var n=t(24246),r=t(16134),s=t(31793);let l=e=>(0,r.C)(s.uu).filter(i=>e.includes(i)).length>0;i.ZP=e=>{let{scopes:i,children:t}=e;return l(i)?(0,n.jsx)(n.Fragment,{children:t}):null}},8133:function(e,i,t){"use strict";var n=t(24246),r=t(96306);i.Z=e=>{let{title:i,children:t,isOpen:s,onClose:l,modalContentProps:o,showCloseButton:a=!1,footer:d,...c}=e;return(0,n.jsxs)(r.u_l,{isOpen:s,onClose:l,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...o,children:[a&&(0,n.jsx)(r.olH,{}),(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:i})})}),(0,n.jsx)(r.fef,{pb:4,overflow:"auto",children:t}),d&&(0,n.jsx)(r.mzw,{children:d})]})]})}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return d}});var n=t(24246),r=t(96306),s=t(79894),l=t.n(s),o=t(27378);let{Text:a}=r.AntTypography,d=e=>{let{items:i,...t}=e,s=(0,o.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let s=t===i.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,id:s?"breadcrumb-current-page":void 0,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}),[i]);return(0,n.jsx)(r.zrq,{items:s,...t})}},6675:function(e,i,t){"use strict";t.d(i,{ZS:function(){return o},a4:function(){return s}});var n=t(3228);let r=t(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:i}=e;return i||l})},51263:function(e,i,t){"use strict";var n=t(24246),r=t(96306);i.Z=e=>{let{title:i,children:t,...s}=e;return(0,n.jsxs)(r.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(i),...s,children:[(0,n.jsx)(r.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:i}),t]})}},59512:function(e,i,t){"use strict";t.d(i,{Cu:function(){return o},Py:function(){return r},fj:function(){return l},uh:function(){return s}});var n=t(54682);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,i,t){"use strict";t.d(i,{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=t(54682);let r=e=>{var i;return null!==(i=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==i?i:[]},s=e=>{var i;return null!==(i=null==e?void 0:e.filter(e=>e.selected))&&void 0!==i?i:[]},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,i)=>{let t=i.find(i=>i.id===e.language);return t?t.name:e.language},d=e=>{var i,t,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!==(i=e.acknowledge_button_label)&&void 0!==i?i:void 0,banner_title:null!==(t=e.banner_title)&&void 0!==t?t: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:i,updated_at:t,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,i,t){"use strict";t.r(i),t.d(i,{default:function(){return J}});var n=t(24246),r=t(96306),s=t(34090),l=t(27378),o=t(16134),a=t(25980),d=t(812),c=t(77213),u=t(58754),p=t(6675),h=t(46628),x=t(7426),g=t(40324);let b=e=>{let{children:i,purpose:t,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(t)?null:(0,n.jsx)(r.xuv,{children:i})})};var v=()=>{let{values:e,setFieldValue:i}=(0,s.u6)(),{purposes:t}=(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,": ",t[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)(g.w8,{name:"purposeOverrides[".concat(l,"].is_included"),onChange:e=>{e||(i("purposeOverrides[".concat(l,"].is_consent"),!1),i("purposeOverrides[".concat(l,"].is_legitimate_interest"),!1))}})})}),(0,n.jsx)(b,{purpose:s.purpose,children:(0,n.jsx)(g.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_legitimate_interest,name:"purposeOverrides[".concat(l,"].is_consent")})}),(0,n.jsx)(b,{purpose:s.purpose,endCol:!0,children:(0,n.jsx)(g.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_consent,name:"purposeOverrides[".concat(l,"].is_legitimate_interest")})})]},s.purpose))]})})},m=t(59301),_=e=>{let{name:i,enabled:t}=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:[i," status"," ",t?(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 ",t?"disable":"enable"," ",i,", please contact your Fides administrator or"," ",(0,n.jsx)(m.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},f=t(46238),j=e=>{var i,t;let{label:l,options:o,layout:a,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,s.U$)(c),h={...u,value:null!==(i=u.value)&&void 0!==i?i:""},x=!!(p.touched&&p.error),b=d?o[0]:void 0,v=null!==(t=o.find(e=>e.value===h.value))&&void 0!==t?t:b,m=e=>{h.onChange(c.name)(e.target.value)};return"stacked"===a?(0,n.jsxs)(r.NIc,{isInvalid:x,children:[(0,n.jsxs)(r.jqI,{className:"w-fit",children:[l?(0,n.jsx)(g.__,{children:l}):null,(0,n.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{className:"flex-col gap-3",children:o.map(e=>{let{value:i,label:t,tooltip:s}=e;return(0,n.jsx)(r.y02,{value:i,"data-testid":"option-".concat(i),children:(0,n.jsxs)(r.jqI,{className:"items-center gap-2",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:t}),s?(0,n.jsx)(f.b,{label:s}):null]})},i)})})})]}),(0,n.jsx)(g.Bc,{isInvalid:x,message:p.error,fieldName:h.name})]}):(0,n.jsxs)(r.NIc,{isInvalid:x,children:[(0,n.jsxs)(r.rjZ,{templateColumns:"1fr 3fr",children:[(0,n.jsx)(g.__,{children:l}),(0,n.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.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)(g.Bc,{isInvalid:x,message:p.error,fieldName:h.name})]})},y=t(54682),C=t(51263);let w=e=>{let{title:i,children:t}=e;return(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(i),children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:i}),t]})};var T=()=>{let{tcf:e}=(0,a.hz)(),i=!!(0,o.C)(x.D2).enabled,{values:t,setFieldValue:l}=(0,s.u6)(),d=!!t.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)(_,{name:"GPP",enabled:i}),i?(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)(g.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)(g.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:!!t.gpp.mspa_opt_out_option_mode||!t.gpp.mspa_covered_transactions}),(0,n.jsx)(g.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:!!t.gpp.mspa_service_provider_mode||!t.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)(g.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=t(64781),k=t(60325),q=()=>{var e,i,t;let{tcf:l}=(0,a.hz)(),{values:o,setFieldValue:d}=(0,s.u6)(),{data:c,isLoading:u}=(0,S.gT)(),p=[...(0,k.k1)(null!==(i=null==c?void 0:c.locations)&&void 0!==i?i:[]),...(0,k.k1)(null!==(t=null==c?void 0:c.location_groups)&&void 0!==t?t:[])].sort((e,i)=>e.name<i.name?-1:1);return l?(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)(r.PPS.Item,{label:"Publisher country",htmlFor:"publisher_country_code",children:(0,n.jsx)(r.AOh,{"data-testid":"input-publisher_settings.publisher_country_code",id:"publisher_country_code",loading:u,allowClear:!0,options:(0,r.Ky_)(null==p?void 0:p.map(e=>e.id)),placeholder:"Select a country",value:null===(e=o.tcfPublisherSettings.publisher_country_code)||void 0===e?void 0:e.replace("_","-").toUpperCase(),onChange:e=>d("tcfPublisherSettings.publisher_country_code",null==e?void 0:e.toLowerCase()),className:"!w-80"})})]}):null},I=t(52955),N=t(71795),E=t(59512),P=t(55484),O=t(8133),R=t(31883);let F=P.Ry().shape({name:P.Z_().required().label("Name")}),L=e=>{let{isOpen:i,onClose:t,onSuccess:l}=e,o=(0,r.pmc)(),[a]=(0,I.LK)(),c=async e=>{let i=await a({name:e.name});(0,R.D4)(i)?o((0,h.Vo)((0,d.e$)(i.error))):(o((0,h.t5)("Successfully created TCF configuration")),null==l||l(i.data.id),t())};return(0,n.jsx)(O.Z,{title:"Create a new TCF configuration",isOpen:i,onClose:t,children:(0,n.jsx)(s.J9,{initialValues:{name:""},onSubmit:c,validationSchema:F,children:e=>{let{isValid:i,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)(g.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:t,children:"Cancel"}),(0,n.jsx)(r.wpx,{type:"primary",htmlType:"submit",disabled:!i||!l,"data-testid":"save-config-button",children:"Save"})]})]})})}})})};var A=t(79894),z=t.n(A);let W=e=>{let{width:i,style:t,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:i,...t},role:"cell"})},Z=e=>{let{width:i,style:t,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:i,...t},children:l})},D=e=>{let{isHeader:i=!1,isLastRow:t=!1,style:s,...l}=e;return(0,n.jsx)(r.jqI,{role:i?"rowheader":"row",className:"h-9 w-full",...l,style:{backgroundColor:i?"var(--fidesui-bg-default)":void 0,borderBottom:t?"none":"solid 1px",borderColor:"var(--ant-color-border)",...s}})},M=e=>{let{config:i,isLoading:t,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)(D,{isHeader:!0,style:{width:"100%"},children:[(0,n.jsx)(Z,{width:"600px",children:"TCF purpose"}),(0,n.jsxs)(Z,{flex:1,gap:3,borderLeft:!0,children:["Restrictions",(0,n.jsx)(f.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)(Z,{width:"100px",gap:3,borderLeft:!0,children:["Flexible",(0,n.jsx)(f.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)(Z,{width:"100px",borderLeft:!0,children:"Actions"})]}),Object.values(a).map((e,s)=>(0,n.jsxs)(D,{isLastRow:s===Object.values(a).length-1,children:[(0,n.jsxs)(W,{width:"600px",children:["Purpose ",e.id,": ",e.name]}),(0,n.jsx)(W,{flex:1,borderLeft:!0,"data-testid":"restriction-type-cell-".concat(e.id),children:t?(0,n.jsx)(r.OdW,{height:"16px",width:"100%"}):(()=>{var t;let s=(null==i?void 0:null===(t=i.restriction_types_per_purpose)||void 0===t?void 0:t[e.id])||[];return 0===s.length?"none":1===s.length?(0,n.jsx)(r.xvT,{size:"sm",whiteSpace:"nowrap",children:E.fj[s[0]]}):(0,n.jsxs)(r.xvT,{children:[s.length," restrictions"]})})()}),(0,n.jsx)(W,{width:"100px",borderLeft:!0,children:E.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)(W,{width:"100px",borderLeft:!0,children:(0,n.jsx)(z(),{href:"/settings/consent/".concat(null==i?void 0:i.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=t(56358),H=t(19904);let U=()=>(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"})]}),B=e=>{let{searchResults:i,selectedConfigId:t,handleSelection:s,userCanDeleteConfigs:l,onDeleteOpen:o,setConfigToDelete:a}=e;return(0,n.jsx)(r.y02.Group,{onChange:e=>s(e.target.value),value:t,className:"flex flex-col gap-2",children:i.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:i=>{i.stopPropagation(),a(e),o()},"data-testid":"delete-config-button"})]},e.id))})},G=e=>{let i,{searchTerm:t,setSearchTerm:s,searchResults:o,selectedConfigId:a,handleSelection:d,userCanCreateConfigs:c,userCanDeleteConfigs:u,modalOnOpen:p,onDeleteOpen:h,setConfigToDelete:x,isLoading:g,setDropdownOpen:b,configurations:v}=e,[m,_]=(0,l.useState)(a);return(0,l.useEffect)(()=>{_(a)},[a]),i=g?(0,n.jsx)(U,{}):0===o.length?(0,n.jsx)(r.xvT,{className:"text-center",children:"No configurations found."}):(0,n.jsx)(B,{searchResults:o,selectedConfigId:m,handleSelection:e=>{_(e)},userCanDeleteConfigs:u,onDeleteOpen:h,setConfigToDelete:x}),(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:()=>b(!1),"data-testid":"close-config-dropdown"}),style:{boxShadow:"var(--ant-box-shadow)"},children:[v.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:t})}),i,(0,n.jsxs)(r.jqI,{gap:"small",className:"mt-4",children:[c&&(0,n.jsx)(r.wpx,{size:"small",onClick:()=>{p(),b(!1)},className:"flex-1","data-testid":"create-config-button",children:"+ Create"}),(0,n.jsx)(r.wpx,{size:"small",onClick:()=>d(m),className:"flex-1","data-testid":"apply-config-button",disabled:m===a,children:"Apply"})]})]})},$=e=>(0,n.jsx)(G,{...e}),K=e=>{var i;let{selectedConfigId:t,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"}),[x]=(0,I.Cm)(),{isOpen:g,onOpen:b,onClose:v}=(0,r.qY0)(),{isOpen:m,onOpen:_,onClose:f}=(0,r.qY0)(),[j,C]=(0,l.useState)(""),[w,T]=(0,l.useState)(),[S,k]=(0,l.useState)(!1),q=(0,l.useMemo)(()=>j?s.filter(e=>e.name.toLowerCase().includes(j.toLowerCase())):s,[s,j]),N=(0,l.useMemo)(()=>s.find(e=>e.id===t),[s,t]),E=null!==(i=null==N?void 0:N.name)&&void 0!==i?i:"Select Configuration",P=e=>{a(e),k(!1)},O=async e=>{try{await x(e).unwrap(),null==c||c(e),T(void 0),f(),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:q,selectedConfigId:t,handleSelection:P,userCanCreateConfigs:u,userCanDeleteConfigs:p,modalOnOpen:b,onDeleteOpen:_,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:E})}),(0,n.jsx)(L,{isOpen:g,onClose:v,onSuccess:e=>{a(e)}}),(0,n.jsx)(r.cVQ,{isOpen:m,onClose:()=>{T(void 0),f()},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=t(32885);let X=e=>{let{defaultChecked:i,onChange:t,...s}=e,o=(0,r.pmc)(),[a,c]=(0,l.useState)(i),[u,p]=(0,l.useState)(!1),{isLoading:g}=(0,Y.x8)(),[b,{isLoading:v}]=(0,x.L)(),[m]=(0,Y.M7)(),{data:_}=(0,Y.n3)(void 0,{skip:g}),j=async e=>{let i=await b({consent:{override_vendor_purposes:e}});e&&_&&await m(_.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(i=>{if(o.closeAll(),null==t||t(e),(0,R.D4)(i)){let e=(0,d.e$)(i.error,"An unexpected error occurred while saving vendor override settings. Please try again.");null==t||t(!1),o((0,h.Vo)(e))}})(i)};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:v,loading:v,...s,checked:a,defaultChecked:i,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)(f.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."})]})},Q=e=>{var i;let{isTCFOverrideEnabled:t}=e,[s,o]=(0,l.useState)(t),[a,d]=(0,l.useState)(!1),[c,u]=(0,N._)("selectedTCFConfigId",null),{data:p,isLoading:h}=(0,I.LS)({page:1,size:50},{skip:!t}),{data:x,isFetching:g}=(0,I.NZ)(c||"",{skip:!c});return(0,l.useEffect)(()=>{var e,i;!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===(i=p.items)||void 0===i?void 0:i.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===(i=p.items)||void 0===i?void 0:i.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)(m.Z,{href:E.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)(m.Z,{href:E.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)(L,{isOpen:a,onClose:()=>d(!1),onSuccess:e=>{u(e)}}),s&&c&&(0,n.jsx)(M,{className:"mt-3",config:x,isLoading:g})]})};var J=()=>{var e,i;let{isLoading:t}=(0,Y.x8)(),{tcf:g}=(0,a.hz)(),{data:b,isLoading:m}=(0,Y.n3)(void 0,{skip:t||!g}),[f,{isLoading:j}]=(0,Y.M7)(),{data:w,isLoading:S}=(0,x.tB)({api_set:!0}),{data:k,isLoading:I}=(0,x.tB)({api_set:!1}),[N]=(0,x.L)(),E=(0,o.C)(x.D2),P=(0,o.C)(x.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:R}=(0,p.a4)(),F=(0,r.pmc)(),L=async e=>{var i;let t=e=>{if(F.closeAll(),(0,d.D4)(e)){let i=(0,d.e$)(e.error,"An unexpected error occurred while saving. Please try again.");F((0,h.Vo)(i))}else F((0,h.t5)("Settings saved successfully"))},n=[...e.purposeOverrides.map(e=>{let i;return e.is_consent&&(i=y.I$.CONSENT),e.is_legitimate_interest&&(i=y.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:i}})];if(O){let e=await f(n);if((0,d.D4)(e)){t(e);return}}let{enabled:r,...s}=e.gpp;t(await N({gpp:s,plus_consent_settings:{tcf_publisher_country_code:null!==(i=e.tcfPublisherSettings.publisher_country_code)&&void 0!==i?i:null}}))},A=(0,l.useMemo)(()=>({purposeOverrides:b?b.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:E,tcfPublisherSettings:{publisher_country_code:P.tcf_publisher_country_code}}),[b,E,P]),z=(0,l.useMemo)(()=>(null==b?void 0:b.some(e=>!e.is_included||e.required_legal_basis===y.I$.CONSENT||e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS))||!1,[b]),W=null===(i=(0,a.hz)())||void 0===i?void 0:null===(e=i.flags)||void 0===e?void 0:e.publisherRestrictions;return(0,n.jsx)(c.Z,{title:"Consent Configuration",children:t||R||m||S||I?(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)(_,{name:"TCF",enabled:g})}),g&&!z&&W&&(0,n.jsx)(Q,{isTCFOverrideEnabled:O})]}),(0,n.jsx)(s.J9,{initialValues:A,enableReinitialize:!0,onSubmit:L,children:e=>{let{dirty:i,isValid:t,isSubmitting:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[g&&(z||!W)&&(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)(v,{})]})]}),(0,n.jsx)(q,{}),(0,n.jsx)(T,{}),(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,loading:l,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},31883:function(e,i,t){"use strict";t.d(i,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=t(19043)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=53748)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53748:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return t(96236)}])},59301:function(e,i,t){"use strict";var n=t(24246);let{Link:r}=t(96306).AntTypography;i.Z=e=>(0,n.jsx)(r,{target:"_blank",rel:"noopener noreferrer",...e})},56358:function(e,i,t){"use strict";t.d(i,{q:function(){return r}});var n=t(24246);let r=(0,t(96306).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,i,t){"use strict";t.d(i,{Z:function(){return p}});var n=t(24246),r=t(96306),s=t(88038),l=t.n(s),o=t(86677);t(27378);var a=t(25980),d=t(90867),c=t(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:i,title:t,padded:s=!0,mainProps:c}=e,p=(0,a.hz)(),h=(0,o.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,g=!(p.flags.privacyRequestsConfiguration&&x),{data:b}=(0,d.JE)(void 0,{skip:g}),{data:v}=(0,d.PW)(void 0,{skip:g}),m=p.flags.privacyRequestsConfiguration&&(!b||!v)&&x;return(0,n.jsxs)(r.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",t]}),(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:[m?(0,n.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var n=t(24246),r=t(96306),s=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,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 i?(0,n.jsx)(r.lQT,{className:t||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!t&&(0,n.jsx)(s.m,{className:o?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,i,t){"use strict";t.d(i,{Tg:function(){return l}});var n=t(24246),r=t(16134),s=t(31793);let l=e=>(0,r.C)(s.uu).filter(i=>e.includes(i)).length>0;i.ZP=e=>{let{scopes:i,children:t}=e;return l(i)?(0,n.jsx)(n.Fragment,{children:t}):null}},8133:function(e,i,t){"use strict";var n=t(24246),r=t(96306);i.Z=e=>{let{title:i,children:t,isOpen:s,onClose:l,modalContentProps:o,showCloseButton:a=!1,footer:d,...c}=e;return(0,n.jsxs)(r.u_l,{isOpen:s,onClose:l,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...o,children:[a&&(0,n.jsx)(r.olH,{}),(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:i})})}),(0,n.jsx)(r.fef,{pb:4,overflow:"auto",children:t}),d&&(0,n.jsx)(r.mzw,{children:d})]})]})}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return d}});var n=t(24246),r=t(96306),s=t(79894),l=t.n(s),o=t(27378);let{Text:a}=r.AntTypography,d=e=>{let{items:i,...t}=e,s=(0,o.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let s=t===i.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,id:s?"breadcrumb-current-page":void 0,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}),[i]);return(0,n.jsx)(r.zrq,{items:s,...t})}},6675:function(e,i,t){"use strict";t.d(i,{ZS:function(){return o},a4:function(){return s}});var n=t(3228);let r=t(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:i}=e;return i||l})},51263:function(e,i,t){"use strict";var n=t(24246),r=t(96306);i.Z=e=>{let{title:i,children:t,...s}=e;return(0,n.jsxs)(r.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(i),...s,children:[(0,n.jsx)(r.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:i}),t]})}},59512:function(e,i,t){"use strict";t.d(i,{Cu:function(){return o},Py:function(){return r},fj:function(){return l},uh:function(){return s}});var n=t(21910);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,i,t){"use strict";t.d(i,{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=t(21910);let r=e=>{var i;return null!==(i=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==i?i:[]},s=e=>{var i;return null!==(i=null==e?void 0:e.filter(e=>e.selected))&&void 0!==i?i:[]},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,i)=>{let t=i.find(i=>i.id===e.language);return t?t.name:e.language},d=e=>{var i,t,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!==(i=e.acknowledge_button_label)&&void 0!==i?i:void 0,banner_title:null!==(t=e.banner_title)&&void 0!==t?t: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:i,updated_at:t,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,i,t){"use strict";t.r(i),t.d(i,{default:function(){return J}});var n=t(24246),r=t(96306),s=t(34090),l=t(27378),o=t(16134),a=t(25980),d=t(812),c=t(77213),u=t(58754),p=t(6675),h=t(46628),x=t(7426),g=t(40324);let b=e=>{let{children:i,purpose:t,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(t)?null:(0,n.jsx)(r.xuv,{children:i})})};var v=()=>{let{values:e,setFieldValue:i}=(0,s.u6)(),{purposes:t}=(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,": ",t[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)(g.w8,{name:"purposeOverrides[".concat(l,"].is_included"),onChange:e=>{e||(i("purposeOverrides[".concat(l,"].is_consent"),!1),i("purposeOverrides[".concat(l,"].is_legitimate_interest"),!1))}})})}),(0,n.jsx)(b,{purpose:s.purpose,children:(0,n.jsx)(g.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_legitimate_interest,name:"purposeOverrides[".concat(l,"].is_consent")})}),(0,n.jsx)(b,{purpose:s.purpose,endCol:!0,children:(0,n.jsx)(g.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_consent,name:"purposeOverrides[".concat(l,"].is_legitimate_interest")})})]},s.purpose))]})})},m=t(59301),_=e=>{let{name:i,enabled:t}=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:[i," status"," ",t?(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 ",t?"disable":"enable"," ",i,", please contact your Fides administrator or"," ",(0,n.jsx)(m.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},f=t(46238),j=e=>{var i,t;let{label:l,options:o,layout:a,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,s.U$)(c),h={...u,value:null!==(i=u.value)&&void 0!==i?i:""},x=!!(p.touched&&p.error),b=d?o[0]:void 0,v=null!==(t=o.find(e=>e.value===h.value))&&void 0!==t?t:b,m=e=>{h.onChange(c.name)(e.target.value)};return"stacked"===a?(0,n.jsxs)(r.NIc,{isInvalid:x,children:[(0,n.jsxs)(r.jqI,{className:"w-fit",children:[l?(0,n.jsx)(g.__,{children:l}):null,(0,n.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{className:"flex-col gap-3",children:o.map(e=>{let{value:i,label:t,tooltip:s}=e;return(0,n.jsx)(r.y02,{value:i,"data-testid":"option-".concat(i),children:(0,n.jsxs)(r.jqI,{className:"items-center gap-2",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:t}),s?(0,n.jsx)(f.b,{label:s}):null]})},i)})})})]}),(0,n.jsx)(g.Bc,{isInvalid:x,message:p.error,fieldName:h.name})]}):(0,n.jsxs)(r.NIc,{isInvalid:x,children:[(0,n.jsxs)(r.rjZ,{templateColumns:"1fr 3fr",children:[(0,n.jsx)(g.__,{children:l}),(0,n.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.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)(g.Bc,{isInvalid:x,message:p.error,fieldName:h.name})]})},y=t(21910),C=t(51263);let w=e=>{let{title:i,children:t}=e;return(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(i),children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:i}),t]})};var T=()=>{let{tcf:e}=(0,a.hz)(),i=!!(0,o.C)(x.D2).enabled,{values:t,setFieldValue:l}=(0,s.u6)(),d=!!t.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)(_,{name:"GPP",enabled:i}),i?(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)(g.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)(g.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:!!t.gpp.mspa_opt_out_option_mode||!t.gpp.mspa_covered_transactions}),(0,n.jsx)(g.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:!!t.gpp.mspa_service_provider_mode||!t.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)(g.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=t(64781),k=t(60325),q=()=>{var e,i,t;let{tcf:l}=(0,a.hz)(),{values:o,setFieldValue:d}=(0,s.u6)(),{data:c,isLoading:u}=(0,S.gT)(),p=[...(0,k.k1)(null!==(i=null==c?void 0:c.locations)&&void 0!==i?i:[]),...(0,k.k1)(null!==(t=null==c?void 0:c.location_groups)&&void 0!==t?t:[])].sort((e,i)=>e.name<i.name?-1:1);return l?(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)(r.PPS.Item,{label:"Publisher country",htmlFor:"publisher_country_code",children:(0,n.jsx)(r.AOh,{"data-testid":"input-publisher_settings.publisher_country_code",id:"publisher_country_code",loading:u,allowClear:!0,options:(0,r.Ky_)(null==p?void 0:p.map(e=>e.id)),placeholder:"Select a country",value:null===(e=o.tcfPublisherSettings.publisher_country_code)||void 0===e?void 0:e.replace("_","-").toUpperCase(),onChange:e=>d("tcfPublisherSettings.publisher_country_code",null==e?void 0:e.toLowerCase()),className:"!w-80"})})]}):null},I=t(52955),N=t(71795),E=t(59512),P=t(55484),O=t(8133),R=t(31883);let F=P.Ry().shape({name:P.Z_().required().label("Name")}),L=e=>{let{isOpen:i,onClose:t,onSuccess:l}=e,o=(0,r.pmc)(),[a]=(0,I.LK)(),c=async e=>{let i=await a({name:e.name});(0,R.D4)(i)?o((0,h.Vo)((0,d.e$)(i.error))):(o((0,h.t5)("Successfully created TCF configuration")),null==l||l(i.data.id),t())};return(0,n.jsx)(O.Z,{title:"Create a new TCF configuration",isOpen:i,onClose:t,children:(0,n.jsx)(s.J9,{initialValues:{name:""},onSubmit:c,validationSchema:F,children:e=>{let{isValid:i,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)(g.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:t,children:"Cancel"}),(0,n.jsx)(r.wpx,{type:"primary",htmlType:"submit",disabled:!i||!l,"data-testid":"save-config-button",children:"Save"})]})]})})}})})};var A=t(79894),z=t.n(A);let W=e=>{let{width:i,style:t,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:i,...t},role:"cell"})},Z=e=>{let{width:i,style:t,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:i,...t},children:l})},D=e=>{let{isHeader:i=!1,isLastRow:t=!1,style:s,...l}=e;return(0,n.jsx)(r.jqI,{role:i?"rowheader":"row",className:"h-9 w-full",...l,style:{backgroundColor:i?"var(--fidesui-bg-default)":void 0,borderBottom:t?"none":"solid 1px",borderColor:"var(--ant-color-border)",...s}})},M=e=>{let{config:i,isLoading:t,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)(D,{isHeader:!0,style:{width:"100%"},children:[(0,n.jsx)(Z,{width:"600px",children:"TCF purpose"}),(0,n.jsxs)(Z,{flex:1,gap:3,borderLeft:!0,children:["Restrictions",(0,n.jsx)(f.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)(Z,{width:"100px",gap:3,borderLeft:!0,children:["Flexible",(0,n.jsx)(f.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)(Z,{width:"100px",borderLeft:!0,children:"Actions"})]}),Object.values(a).map((e,s)=>(0,n.jsxs)(D,{isLastRow:s===Object.values(a).length-1,children:[(0,n.jsxs)(W,{width:"600px",children:["Purpose ",e.id,": ",e.name]}),(0,n.jsx)(W,{flex:1,borderLeft:!0,"data-testid":"restriction-type-cell-".concat(e.id),children:t?(0,n.jsx)(r.OdW,{height:"16px",width:"100%"}):(()=>{var t;let s=(null==i?void 0:null===(t=i.restriction_types_per_purpose)||void 0===t?void 0:t[e.id])||[];return 0===s.length?"none":1===s.length?(0,n.jsx)(r.xvT,{size:"sm",whiteSpace:"nowrap",children:E.fj[s[0]]}):(0,n.jsxs)(r.xvT,{children:[s.length," restrictions"]})})()}),(0,n.jsx)(W,{width:"100px",borderLeft:!0,children:E.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)(W,{width:"100px",borderLeft:!0,children:(0,n.jsx)(z(),{href:"/settings/consent/".concat(null==i?void 0:i.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=t(56358),H=t(19904);let U=()=>(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"})]}),B=e=>{let{searchResults:i,selectedConfigId:t,handleSelection:s,userCanDeleteConfigs:l,onDeleteOpen:o,setConfigToDelete:a}=e;return(0,n.jsx)(r.y02.Group,{onChange:e=>s(e.target.value),value:t,className:"flex flex-col gap-2",children:i.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:i=>{i.stopPropagation(),a(e),o()},"data-testid":"delete-config-button"})]},e.id))})},G=e=>{let i,{searchTerm:t,setSearchTerm:s,searchResults:o,selectedConfigId:a,handleSelection:d,userCanCreateConfigs:c,userCanDeleteConfigs:u,modalOnOpen:p,onDeleteOpen:h,setConfigToDelete:x,isLoading:g,setDropdownOpen:b,configurations:v}=e,[m,_]=(0,l.useState)(a);return(0,l.useEffect)(()=>{_(a)},[a]),i=g?(0,n.jsx)(U,{}):0===o.length?(0,n.jsx)(r.xvT,{className:"text-center",children:"No configurations found."}):(0,n.jsx)(B,{searchResults:o,selectedConfigId:m,handleSelection:e=>{_(e)},userCanDeleteConfigs:u,onDeleteOpen:h,setConfigToDelete:x}),(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:()=>b(!1),"data-testid":"close-config-dropdown"}),style:{boxShadow:"var(--ant-box-shadow)"},children:[v.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:t})}),i,(0,n.jsxs)(r.jqI,{gap:"small",className:"mt-4",children:[c&&(0,n.jsx)(r.wpx,{size:"small",onClick:()=>{p(),b(!1)},className:"flex-1","data-testid":"create-config-button",children:"+ Create"}),(0,n.jsx)(r.wpx,{size:"small",onClick:()=>d(m),className:"flex-1","data-testid":"apply-config-button",disabled:m===a,children:"Apply"})]})]})},$=e=>(0,n.jsx)(G,{...e}),K=e=>{var i;let{selectedConfigId:t,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"}),[x]=(0,I.Cm)(),{isOpen:g,onOpen:b,onClose:v}=(0,r.qY0)(),{isOpen:m,onOpen:_,onClose:f}=(0,r.qY0)(),[j,C]=(0,l.useState)(""),[w,T]=(0,l.useState)(),[S,k]=(0,l.useState)(!1),q=(0,l.useMemo)(()=>j?s.filter(e=>e.name.toLowerCase().includes(j.toLowerCase())):s,[s,j]),N=(0,l.useMemo)(()=>s.find(e=>e.id===t),[s,t]),E=null!==(i=null==N?void 0:N.name)&&void 0!==i?i:"Select Configuration",P=e=>{a(e),k(!1)},O=async e=>{try{await x(e).unwrap(),null==c||c(e),T(void 0),f(),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:q,selectedConfigId:t,handleSelection:P,userCanCreateConfigs:u,userCanDeleteConfigs:p,modalOnOpen:b,onDeleteOpen:_,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:E})}),(0,n.jsx)(L,{isOpen:g,onClose:v,onSuccess:e=>{a(e)}}),(0,n.jsx)(r.cVQ,{isOpen:m,onClose:()=>{T(void 0),f()},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=t(32885);let X=e=>{let{defaultChecked:i,onChange:t,...s}=e,o=(0,r.pmc)(),[a,c]=(0,l.useState)(i),[u,p]=(0,l.useState)(!1),{isLoading:g}=(0,Y.x8)(),[b,{isLoading:v}]=(0,x.L)(),[m]=(0,Y.M7)(),{data:_}=(0,Y.n3)(void 0,{skip:g}),j=async e=>{let i=await b({consent:{override_vendor_purposes:e}});e&&_&&await m(_.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(i=>{if(o.closeAll(),null==t||t(e),(0,R.D4)(i)){let e=(0,d.e$)(i.error,"An unexpected error occurred while saving vendor override settings. Please try again.");null==t||t(!1),o((0,h.Vo)(e))}})(i)};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:v,loading:v,...s,checked:a,defaultChecked:i,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)(f.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."})]})},Q=e=>{var i;let{isTCFOverrideEnabled:t}=e,[s,o]=(0,l.useState)(t),[a,d]=(0,l.useState)(!1),[c,u]=(0,N._)("selectedTCFConfigId",null),{data:p,isLoading:h}=(0,I.LS)({page:1,size:50},{skip:!t}),{data:x,isFetching:g}=(0,I.NZ)(c||"",{skip:!c});return(0,l.useEffect)(()=>{var e,i;!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===(i=p.items)||void 0===i?void 0:i.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===(i=p.items)||void 0===i?void 0:i.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)(m.Z,{href:E.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)(m.Z,{href:E.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)(L,{isOpen:a,onClose:()=>d(!1),onSuccess:e=>{u(e)}}),s&&c&&(0,n.jsx)(M,{className:"mt-3",config:x,isLoading:g})]})};var J=()=>{var e,i;let{isLoading:t}=(0,Y.x8)(),{tcf:g}=(0,a.hz)(),{data:b,isLoading:m}=(0,Y.n3)(void 0,{skip:t||!g}),[f,{isLoading:j}]=(0,Y.M7)(),{data:w,isLoading:S}=(0,x.tB)({api_set:!0}),{data:k,isLoading:I}=(0,x.tB)({api_set:!1}),[N]=(0,x.L)(),E=(0,o.C)(x.D2),P=(0,o.C)(x.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:R}=(0,p.a4)(),F=(0,r.pmc)(),L=async e=>{var i;let t=e=>{if(F.closeAll(),(0,d.D4)(e)){let i=(0,d.e$)(e.error,"An unexpected error occurred while saving. Please try again.");F((0,h.Vo)(i))}else F((0,h.t5)("Settings saved successfully"))},n=[...e.purposeOverrides.map(e=>{let i;return e.is_consent&&(i=y.I$.CONSENT),e.is_legitimate_interest&&(i=y.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:i}})];if(O){let e=await f(n);if((0,d.D4)(e)){t(e);return}}let{enabled:r,...s}=e.gpp;t(await N({gpp:s,plus_consent_settings:{tcf_publisher_country_code:null!==(i=e.tcfPublisherSettings.publisher_country_code)&&void 0!==i?i:null}}))},A=(0,l.useMemo)(()=>({purposeOverrides:b?b.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:E,tcfPublisherSettings:{publisher_country_code:P.tcf_publisher_country_code}}),[b,E,P]),z=(0,l.useMemo)(()=>(null==b?void 0:b.some(e=>!e.is_included||e.required_legal_basis===y.I$.CONSENT||e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS))||!1,[b]),W=null===(i=(0,a.hz)())||void 0===i?void 0:null===(e=i.flags)||void 0===e?void 0:e.publisherRestrictions;return(0,n.jsx)(c.Z,{title:"Consent Configuration",children:t||R||m||S||I?(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)(_,{name:"TCF",enabled:g})}),g&&!z&&W&&(0,n.jsx)(Q,{isTCFOverrideEnabled:O})]}),(0,n.jsx)(s.J9,{initialValues:A,enableReinitialize:!0,onSubmit:L,children:e=>{let{dirty:i,isValid:t,isSubmitting:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[g&&(z||!W)&&(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)(v,{})]})]}),(0,n.jsx)(q,{}),(0,n.jsx)(T,{}),(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,loading:l,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},31883:function(e,i,t){"use strict";t.d(i,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=t(19043)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=53748)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4065],{70378:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/custom-fields",function(){return t(78422)}])},56358:function(e,l,t){"use strict";t.d(l,{q:function(){return s}});var i=t(24246);let s=(0,t(96306).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,l,t){"use strict";t.d(l,{l:function(){return s}});var i=t(24246);let s=(0,t(96306).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,l,t){"use strict";t.d(l,{Z:function(){return p}});var i=t(24246),s=t(96306),a=t(88038),n=t.n(a),o=t(86677);t(27378);var r=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,o.useRouter)();return(0,i.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(s.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:l,title:t,padded:a=!0,mainProps:c}=e,p=(0,r.hz)(),x=(0,o.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,h=!(p.flags.privacyRequestsConfiguration&&m),{data:f}=(0,d.JE)(void 0,{skip:h}),{data:v}=(0,d.PW)(void 0,{skip:h}),C=p.flags.privacyRequestsConfiguration&&(!f||!v)&&m;return(0,i.jsxs)(s.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,i.jsxs)(n(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",t]}),(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:[C?(0,i.jsx)(u,{}):null,l]})]})}},19904:function(e,l,t){"use strict";t.d(l,{Tg:function(){return n}});var i=t(24246),s=t(16134),a=t(31793);let n=e=>(0,s.C)(a.uu).filter(l=>e.includes(l)).length>0;l.ZP=e=>{let{scopes:l,children:t}=e;return n(l)?(0,i.jsx)(i.Fragment,{children:t}):null}},94799:function(e,l,t){"use strict";t.d(l,{k:function(){return a}});var i=t(76649);let s=e=>(0,i.Ln)({id:"string"},e),a=e=>(null!=e?e:[]).filter(s)},30320:function(e,l,t){"use strict";t.d(l,{m:function(){return r}});var i=t(27378),s=t(25980),a=t(41841),n=t(32885),o=t(94799);let r=e=>{let{resourceFidesKey:l,resourceType:t}=e,{errorAlert:r}=(0,a.VY)(),{plus:d}=(0,s.hz)(),c=(0,i.useMemo)(()=>null!=l?l:"",[]),u=(0,n.YU)(!0,{skip:!d}),p=(0,n.VN)(t,{skip:!d}),{data:x,isLoading:m,error:h,isError:f}=(0,n.PV)(null!=l?l:"",{skip:""!==c&&!(d&&c)}),[v]=(0,n._D)(),C=u.isLoading||p.isLoading||m,_=(0,i.useMemo)(()=>new Map((0,o.k)(u.data).map(e=>{var l;return[e.id,{...e,options:(null!==(l=e.allowed_values)&&void 0!==l?l:[]).map(e=>({value:e,label:e}))}]})),[u.data]),g=(0,i.useMemo)(()=>{var e;return null===(e=p.data)||void 0===e?void 0:e.filter(e=>e.active)},[p.data]),j=(0,i.useMemo)(()=>new Map((0,o.k)(g).map(e=>[e.id,e])),[g]),b=(0,i.useMemo)(()=>f&&(null==h?void 0:h.status)===404?new Map:new Map((0,o.k)(x).map(e=>[e.custom_field_definition_id,e])),[x,f,h]),y=(0,i.useMemo)(()=>{let e=[...j.keys()];return e.sort(),e},[j]),T=(0,i.useMemo)(()=>{let e={};return g&&b&&g.forEach(l=>{let t=b.get(l.id||"");t&&(l.allow_list_id&&"string[]"===l.field_type?e[t.custom_field_definition_id]=t.value:e[t.custom_field_definition_id]=t.value.toString())}),e},[g,b]),w=(0,i.useCallback)(async e=>{if(!d)return;let i="fides_key"in e&&""!==e.fides_key?e.fides_key:l;if(!i)return;let{customFieldValues:s}=e;if(!s||0===Object.keys(s).length)return;let a=[],n=[];y.forEach(e=>{let l=b.get(e),t=s[e];void 0===t||""===t||Array.isArray(t)&&0===t.length?(null==l?void 0:l.id)&&n.push(l.id):a.push({custom_field_definition_id:e,resource_id:i,id:null==l?void 0:l.id,value:t})});try{await v({resource_type:t,resource_id:i,upsert:a,delete:n})}catch(e){r("One or more custom fields have failed to save, please try again."),console.error(e)}},[d,b,r,l,y,v,t]);return{customFieldValues:T,definitionIdToCustomField:b,idToAllowListWithOptions:_,idToCustomFieldDefinition:j,isEnabled:d,isLoading:C,sortedCustomFieldDefinitionIds:y,upsertCustomFields:w}}},95346:function(e,l,t){"use strict";t.d(l,{uc:function(){return v},Hn:function(){return r},Uv:function(){return n},C7:function(){return d},mZ:function(){return f.m}});var i,s,a,n,o=t(54682);(i=a||(a={}))[i.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",i[i.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",i[i.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",o.AL.STRING,o.AL.STRING,o.AL.STRING_,(s=n||(n={})).SINGLE_SELECT="singleSelect",s.MULTIPLE_SELECT="multipleSelect",s.LOCATION_SELECT="locationSelect",s.OPEN_TEXT="openText";let r=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Location select",value:"locationSelect"},{label:"Open Text",value:"openText"}],d=[{label:"taxonomy:".concat(o.P6.DATA_CATEGORY),value:o.P6.DATA_CATEGORY},{label:"taxonomy:".concat(o.P6.DATA_SUBJECT),value:o.P6.DATA_SUBJECT},{label:"taxonomy:".concat(o.P6.DATA_USE),value:o.P6.DATA_USE},{label:"".concat(o.P6.SYSTEM,":information"),value:o.P6.SYSTEM},{label:"system:data use",value:o.P6.PRIVACY_DECLARATION}];var c=t(24246),u=t(96306),p=t(34090),x=t(30234),m=t(97181),h=t(40324),f=t(30320);let v=e=>{let{resourceFidesKey:l,resourceType:t}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:s,isEnabled:a,isLoading:n,sortedCustomFieldDefinitionIds:r}=(0,f.m)({resourceFidesKey:l,resourceType:t});return a&&0!==r.length?(0,c.jsx)(x.Z,{heading:"Custom fields",children:(0,c.jsx)(u.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(u.kCb,{flexDir:"column",gap:"24px",children:n?(0,c.jsx)(u.M5Y,{children:(0,c.jsx)(u.$jN,{})}):r.length>0&&(0,c.jsx)(u.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:r.map(e=>{let l=s.get(e);if(!l)return null;let t="customFieldValues.".concat(l.id);if(!l.allow_list_id&&l.field_type===o.AL.STRING)return(0,c.jsx)(p.gN,{name:t,children:e=>{let{field:t}=e;return(0,c.jsx)(h.j0,{...t,label:l.name,tooltip:l.description,variant:"stacked"})}},e);let a=i.get(l.allow_list_id);if(!a)return null;let{options:n}=a;return(0,c.jsx)(m.d,{name:t,allowClear:!0,mode:l.field_type!==o.AL.STRING?"multiple":void 0,label:l.name,options:n,tooltip:l.description,layout:"stacked",className:"w-full"},e)})})})})}):null};t(94799)},97181:function(e,l,t){"use strict";t.d(l,{d:function(){return d}});var i=t(24246),s=t(96306),a=t(34090),n=t(27378),o=t(46238),r=t(40324);let d=e=>{let{name:l,label:t,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:x,...m}=e,[h,f,{setValue:v}]=(0,a.U$)(l),C=!!(f.touched&&f.error),[_,g]=(0,n.useState)("");h.value||"tags"!==m.mode&&"multiple"!==m.mode||(h.value=[]),"tags"===m.mode&&"string"==typeof h.value&&(h.value=[h.value]);let j="tags"===m.mode?(e,l)=>e?e.value!==_||h.value.includes(_)?m.optionRender?m.optionRender(e,l):e.label:'Create "'.concat(_,'"'):void 0:m.optionRender||void 0,b=e=>{g(e),m.onSearch&&m.onSearch(e)},y=(e,l)=>{v(e),m.onChange&&m.onChange(e,l)};return"inline"===p?(0,i.jsx)(s.NIc,{isInvalid:C,isRequired:u,children:(0,i.jsxs)(s.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,i.jsx)(r.__,{htmlFor:m.id||l,...d,children:t}):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||l,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:j,onSearch:"tags"===m.mode?b:void 0,onChange:y,value:h.value||void 0,status:C?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{children:x}),(0,i.jsx)(r.Bc,{isInvalid:C,message:f.error,fieldName:h.name})]}),(0,i.jsx)(o.b,{label:c,className:C?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(s.NIc,{isInvalid:C,isRequired:u,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[t?(0,i.jsx)(r.__,{htmlFor:m.id||l,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,i.jsx)(o.b,{label:c})]}),(0,i.jsx)(s.WPr,{...h,id:m.id||l,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:j,onSearch:"tags"===m.mode?b:void 0,onChange:y,value:h.value||void 0,status:C?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{style:{marginTop:0},children:x}),(0,i.jsx)(r.Bc,{isInvalid:C,message:f.error,fieldName:h.name})]})})}},10342:function(e,l,t){"use strict";var i=t(24246),s=t(96306),a=t(46238);l.Z=e=>{let{title:l,tooltip:t,children:n,...o}=e;return(0,i.jsxs)(s.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...o,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:[l,t?(0,i.jsx)(s.xvT,{as:"span",mx:1,children:(0,i.jsx)(a.b,{label:t})}):void 0]}),(0,i.jsx)(s.Kqy,{p:6,spacing:6,children:n})]})}},30234:function(e,l,t){"use strict";var i=t(24246),s=t(96306);l.Z=e=>{let{heading:l,HeadingButton:t,children:a}=e;return(0,i.jsx)(s.Kqy,{spacing:4,children:(0,i.jsxs)(s.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,i.jsxs)(s.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,i.jsx)(s.X6q,{as:"h3",size:"xs",children:l}),t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.LZC,{}),(0,i.jsx)(t,{})]}):null]}),(0,i.jsx)(s.Kqy,{spacing:4,px:6,py:6,children:a})]})})}},78422:function(e,l,t){"use strict";t.r(l),t.d(l,{default:function(){return X}});var i=t(24246),s=t(77213),a=t(96306),n=t(27378),o=t(58754),r=t(92222),d=t(59003),c=t(16134),u=t(812),p=t(19904),x=t(47935),m=t(46628),h=t(72625),f=t(54682);let v=new Map([["string","Single Select"],["string[]","Multi Select"],["open-text","Open Text"]]),C=new Map([[f.P6.SYSTEM,"system:information"],[f.P6.DATA_USE,"taxonomy:data use"],[f.P6.DATA_CATEGORY,"taxonomy:data category"],[f.P6.DATA_SUBJECT,"taxonomy:data subject"],[f.P6.PRIVACY_DECLARATION,"system:data use"]]);var _=t(32885);let g=e=>{var l;let t=null!==(l=C.get(e.getValue()))&&void 0!==l?l:e.getValue();return(0,i.jsx)(h.G3,{...e,value:t})},j=e=>{let{row:l,getValue:t}=e,s=l.original.allow_list_id?t():"open-text",a=v.get(s)||s;return(0,i.jsx)(h.A4,{value:a})},b=e=>{let{row:l,getValue:t,isDisabled:s}=e,a=!!t(),[n]=(0,_.yM)(),o=async e=>n({...l.original,active:e});return(0,i.jsx)(h.S1,{enabled:a,onToggle:o,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=t(56358),T=t(58452);let w=e=>{let{customField:l,onEdit:t,onDelete:s,...n}=e,o=(0,a.qY0)();return(0,i.jsxs)(a.xuv,{...n,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(),t(l,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(),o.onOpen()}}),(0,i.jsx)(T.Z,{isOpen:o.isOpen,onClose:o.onClose,onConfirm:()=>{s(l),o.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=t(34090),S=t(55484),L=t(95346),I=t(41841);let R={color:"gray.600",fontSize:"14px",fontWeight:"semibold",minWidth:"150px"};var A=e=>{let{customLabelProps:l,disabled:t=!1,isRequired:s=!1,label:n,type:o="text",placeholder:r,...d}=e,[c,u]=(0,E.U$)(d),{id:p,name:x,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:[n&&(0,i.jsx)(a.lXp,{htmlFor:p||x,...l||R,children:n}),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(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"===o&&(0,i.jsx)(a.IIB,{...c,autoComplete:"off",autoFocus:m,color:"gray.700",isDisabled:t,placeholder:r,size:"sm","data-testid":h}),"textarea"===o&&(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})]})]})};let N=(0,a.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"})});var M=t(10342),O=t(95492),P=t(97181);let k={...R,minWidth:"unset"},U=e=>{let{values:l,validationSchema:t,errors:s,dirty:o,isValid:r,isSubmitting:d,isLoading:c,onClose:u,handleDropdownChange:p,isEditing:x}=e,{validateForm:m}=(0,E.u6)();return(0,n.useEffect)(()=>{m()},[t,m]),(0,i.jsxs)(E.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(M.Z,{title:"Field Information",children:[(0,i.jsx)(A,{isRequired:!0,label:"Name",name:"name",customLabelProps:k}),(0,i.jsx)(A,{label:"Description",name:"description",customLabelProps:k}),(0,i.jsx)(P.d,{label:"Location",name:"resource_type",options:L.C7,labelProps:k,disabled:x})]})}),(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(M.Z,{title:"Configuration",children:[(0,i.jsx)(P.d,{label:"Field Type",name:"field_type",labelProps:k,options:L.Hn,onChange:p}),l.field_type!==L.Uv.OPEN_TEXT&&l.field_type!==L.Uv.LOCATION_SELECT?(0,i.jsx)(a.kCb,{flexDirection:"column",gap:"12px",paddingTop:"6px",paddingBottom:"24px",children:(0,i.jsx)(E.F2,{name:"allow_list.allowed_values",render:e=>{let{allowed_values:t}=l.allow_list;return(0,i.jsxs)(a.kCb,{flexDirection:"column",gap:"6",pl:"6",children:[(0,i.jsx)(a.kCb,{flexDirection:"column",children:t.map((l,s)=>(0,i.jsxs)(a.kCb,{flexGrow:1,gap:"3",mt:s>0?3:void 0,children:[(0,i.jsx)(A,{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)(O.l,{}),disabled:t.length<=1,onClick:()=>e.remove(s),type:"text"})]},s))}),(0,i.jsxs)(a.kCb,{alignItems:"center",children:[(0,i.jsx)(a.xvT,{color:"gray.600",fontSize:"xs",fontWeight:"500",lineHeight:"16px",pr:"8px",children:"Add a list value"}),(0,i.jsx)(a.wpx,{"aria-label":"Add a list value","data-testid":"add-list-value-btn",icon:(0,i.jsx)(N,{h:"7px",w:"7px"}),onClick:()=>{e.push("")},size:"small"}),0===t.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:!o||!r||d,children:"Save"})]})]})},D={description:"",field_type:L.Uv.OPEN_TEXT,name:"",resource_type:f.P6.SYSTEM,allow_list:{name:"",description:"",allowed_values:[]}},H=S.IX(S.Z_().optional().label("allowed_values")),V=S.IX(S.Z_().required("List item is required")).min(1,"Must add at least one list value").label("allowed_values"),F=S.Ry().shape({name:S.Z_().required("Name is required").trim(),allow_list:S.Ry().shape({allowed_values:H})}),Z=S.Ry().shape({name:S.Z_().required("Name is required").trim(),allow_list:S.Ry().shape({allowed_values:V})}),z=(e,l)=>{var t,i,s;let a;if(!e)return;e.field_type!==f.AL.STRING||e.allow_list_id||(a=L.Uv.OPEN_TEXT),e.field_type===f.AL.STRING&&e.allow_list_id&&(a=L.Uv.SINGLE_SELECT),e.field_type===f.AL.STRING_&&e.allow_list_id&&(a=L.Uv.MULTIPLE_SELECT);let n=l?{name:null!==(t=l.name)&&void 0!==t?t:"",description:null!==(i=l.description)&&void 0!==i?i:"",allowed_values:null!==(s=l.allowed_values)&&void 0!==s?s:[]}:D.allow_list;return{...e,field_type:a||L.Uv.OPEN_TEXT,allow_list:n}},q=e=>{let{isOpen:l,onClose:t,isLoading:s,customField:o}=e,{errorAlert:r,successAlert:d}=(0,I.VY)(),[c]=(0,_.Ld)(),[p]=(0,_.yM)(),[x]=(0,_.Nt)(),{data:m,isLoading:h}=(0,_.vA)(null==o?void 0:o.allow_list_id,{skip:!(null==o?void 0:o.allow_list_id)}),[v,C]=(0,n.useState)(F);if(h||!l)return null;let g=z(o,m),j=!!g,b=e=>{e===L.Uv.OPEN_TEXT||e===L.Uv.LOCATION_SELECT?C(F):C(Z)},y=async e=>{if([L.Uv.SINGLE_SELECT,L.Uv.MULTIPLE_SELECT].includes(e.field_type)){var l,i;if(new Set(null===(l=e.allow_list)||void 0===l?void 0:l.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:t}=e;e.allow_list_id&&(t.id=e.allow_list_id),t.name||(t.name=Date.now().toString()+Math.random().toString());let s=await x(t);(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===L.Uv.OPEN_TEXT||e.field_type===L.Uv.LOCATION_SELECT)&&(e.allow_list_id=void 0),[L.Uv.SINGLE_SELECT,L.Uv.OPEN_TEXT,L.Uv.LOCATION_SELECT].includes(e.field_type)&&(e.field_type=f.AL.STRING),e.field_type===L.Uv.MULTIPLE_SELECT&&(e.field_type=f.AL.STRING_);let s={...e};delete s.allow_list;let a=o?await p(s):await c(s);(0,u.D4)(a)?r((0,u.e$)(a.error),"Custom field has failed to save due to the following:"):(t(),d("Custom field successfully saved"))};return(0,i.jsxs)(a.u_l,{id:"custom-field-modal-hello-world",isOpen:l,onClose:t,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:o?"Manage Custom Field":"Add a custom field"}),(0,i.jsx)(a.fef,{px:6,py:0,children:(0,i.jsx)(E.J9,{initialValues:g||D,validationSchema:v,onSubmit:y,enableReinitialize:!0,validateOnChange:!0,children:e=>(0,i.jsx)(U,{isEditing:j,validationSchema:v,isLoading:s,onClose:t,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"]})]})}),Y=(0,r.Cl)(),B=e=>{let{...l}=e,t=(0,a.pmc)(),{isLoading:s}=(0,_.GH)(),o=(0,c.C)(_.fN),[h]=(0,_.UF)(),{isOpen:v,onClose:C,onOpen:y}=(0,a.qY0)(),[T,E]=(0,n.useState)(),[S,L]=(0,n.useState)(),I=(0,p.Tg)([f.Sh.CUSTOM_FIELD_UPDATE]),R=(0,p.Tg)([f.Sh.CUSTOM_FIELD_DELETE]),A=e=>{I&&(E(e),y())},N=async e=>{if(R&&e.id){let l=await h({id:e.id});if((0,u.D4)(l)){t((0,m.Vo)((0,u.e$)(l.error)));return}t((0,m.t5)("Custom field deleted"))}},M=(0,n.useMemo)(()=>[Y.accessor(e=>e.name,{id:"name",cell:e=>(0,i.jsx)(x.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,i.jsx)(x.Rr,{value:"Label",...e})}),Y.accessor(e=>e.description,{id:"description",cell:e=>(0,i.jsx)(x.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,i.jsx)(x.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),Y.accessor(e=>e.field_type,{id:"field_type",cell:j,header:e=>(0,i.jsx)(x.Rr,{value:"Field Type",...e})}),Y.accessor(e=>e.resource_type,{id:"resource_type",cell:g,header:e=>(0,i.jsx)(x.Rr,{value:"Locations",...e})}),I&&Y.accessor(e=>e.active,{id:"enable",cell:b,header:e=>(0,i.jsx)(x.Rr,{value:"Enable",...e}),meta:{disableRowClick:!0}}),(I||R)&&Y.display({id:"actions",header:"Actions",cell:e=>{let{row:l}=e;return(0,i.jsx)(w,{customField:l.original,onEdit:A,onDelete:N})},meta:{disableRowClick:!0}})].filter(Boolean),[R,I]),O=(0,d.b7)({getCoreRowModel:(0,r.sC)(),getFilteredRowModel:(0,r.vL)(),getSortedRowModel:(0,r.tj)(),onGlobalFilterChange:L,globalFilterFn:"includesString",columns:M,data:o,state:{globalFilter:S},columnResizeMode:"onChange"});return(0,i.jsxs)(a.xuv,{...l,children:[(0,i.jsx)(a.xuv,{maxWidth:600,children:(0,i.jsx)(a.xvT,{mb:10,fontSize:"sm",children:o.length>0?"Custom fields enable you to capture metrics specific to your organization and have those metrics appear in the data map and in reports.":"Custom fields provide organizations with the capability to capture metrics that are unique to their specific needs, allowing them to create customized reports. These fields can be added to either systems or elements within a taxonomy, and once added, they become reportable fields that are visible on the data map."})}),(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-page",children:[(0,i.jsxs)(x.Q$,{children:[(0,i.jsx)(x.HO,{globalFilter:S,setGlobalFilter:L,placeholder:"Search for a custom field"}),(0,i.jsx)(a.Ugi,{alignItems:"center",spacing:4,children:(0,i.jsx)(()=>(0,i.jsx)(p.ZP,{scopes:[f.Sh.CUSTOM_FIELD_DEFINITION_CREATE],children:(0,i.jsx)(a.wpx,{type:"primary","data-testid":"add-custom-field-btn",onClick:y,children:W})}),{})})]}),s?(0,i.jsx)(a.xuv,{p:2,borderWidth:1,children:(0,i.jsx)(x.I4,{rowHeight:26,numRows:10})}):(0,i.jsx)(x.ZK,{tableInstance:O,onRowClick:I?A:void 0,emptyTableNotice:(0,i.jsx)(G,{}),enableSorting:!0}),v&&(0,i.jsx)(q,{customField:T,isOpen:v,onClose:()=>{E(void 0),C()},isLoading:!1})]})]})};var X=()=>(0,i.jsx)(s.Z,{title:"Custom fields",children:(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-management",children:[(0,i.jsx)(o.Z,{heading:"Custom fields"}),(0,i.jsx)(B,{})]})})}},function(e){e.O(0,[431,4164,2888,9774,179],function(){return e(e.s=70378)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4065],{70378:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/custom-fields",function(){return t(78422)}])},56358:function(e,l,t){"use strict";t.d(l,{q:function(){return s}});var i=t(24246);let s=(0,t(96306).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,l,t){"use strict";t.d(l,{l:function(){return s}});var i=t(24246);let s=(0,t(96306).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,l,t){"use strict";t.d(l,{Z:function(){return p}});var i=t(24246),s=t(96306),a=t(88038),n=t.n(a),o=t(86677);t(27378);var r=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,o.useRouter)();return(0,i.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(s.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:l,title:t,padded:a=!0,mainProps:c}=e,p=(0,r.hz)(),x=(0,o.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,h=!(p.flags.privacyRequestsConfiguration&&m),{data:f}=(0,d.JE)(void 0,{skip:h}),{data:v}=(0,d.PW)(void 0,{skip:h}),C=p.flags.privacyRequestsConfiguration&&(!f||!v)&&m;return(0,i.jsxs)(s.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,i.jsxs)(n(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",t]}),(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:[C?(0,i.jsx)(u,{}):null,l]})]})}},19904:function(e,l,t){"use strict";t.d(l,{Tg:function(){return n}});var i=t(24246),s=t(16134),a=t(31793);let n=e=>(0,s.C)(a.uu).filter(l=>e.includes(l)).length>0;l.ZP=e=>{let{scopes:l,children:t}=e;return n(l)?(0,i.jsx)(i.Fragment,{children:t}):null}},94799:function(e,l,t){"use strict";t.d(l,{k:function(){return a}});var i=t(76649);let s=e=>(0,i.Ln)({id:"string"},e),a=e=>(null!=e?e:[]).filter(s)},30320:function(e,l,t){"use strict";t.d(l,{m:function(){return r}});var i=t(27378),s=t(25980),a=t(41841),n=t(32885),o=t(94799);let r=e=>{let{resourceFidesKey:l,resourceType:t}=e,{errorAlert:r}=(0,a.VY)(),{plus:d}=(0,s.hz)(),c=(0,i.useMemo)(()=>null!=l?l:"",[]),u=(0,n.YU)(!0,{skip:!d}),p=(0,n.VN)(t,{skip:!d}),{data:x,isLoading:m,error:h,isError:f}=(0,n.PV)(null!=l?l:"",{skip:""!==c&&!(d&&c)}),[v]=(0,n._D)(),C=u.isLoading||p.isLoading||m,_=(0,i.useMemo)(()=>new Map((0,o.k)(u.data).map(e=>{var l;return[e.id,{...e,options:(null!==(l=e.allowed_values)&&void 0!==l?l:[]).map(e=>({value:e,label:e}))}]})),[u.data]),g=(0,i.useMemo)(()=>{var e;return null===(e=p.data)||void 0===e?void 0:e.filter(e=>e.active)},[p.data]),j=(0,i.useMemo)(()=>new Map((0,o.k)(g).map(e=>[e.id,e])),[g]),b=(0,i.useMemo)(()=>f&&(null==h?void 0:h.status)===404?new Map:new Map((0,o.k)(x).map(e=>[e.custom_field_definition_id,e])),[x,f,h]),y=(0,i.useMemo)(()=>{let e=[...j.keys()];return e.sort(),e},[j]),T=(0,i.useMemo)(()=>{let e={};return g&&b&&g.forEach(l=>{let t=b.get(l.id||"");t&&(l.allow_list_id&&"string[]"===l.field_type?e[t.custom_field_definition_id]=t.value:e[t.custom_field_definition_id]=t.value.toString())}),e},[g,b]),w=(0,i.useCallback)(async e=>{if(!d)return;let i="fides_key"in e&&""!==e.fides_key?e.fides_key:l;if(!i)return;let{customFieldValues:s}=e;if(!s||0===Object.keys(s).length)return;let a=[],n=[];y.forEach(e=>{let l=b.get(e),t=s[e];void 0===t||""===t||Array.isArray(t)&&0===t.length?(null==l?void 0:l.id)&&n.push(l.id):a.push({custom_field_definition_id:e,resource_id:i,id:null==l?void 0:l.id,value:t})});try{await v({resource_type:t,resource_id:i,upsert:a,delete:n})}catch(e){r("One or more custom fields have failed to save, please try again."),console.error(e)}},[d,b,r,l,y,v,t]);return{customFieldValues:T,definitionIdToCustomField:b,idToAllowListWithOptions:_,idToCustomFieldDefinition:j,isEnabled:d,isLoading:C,sortedCustomFieldDefinitionIds:y,upsertCustomFields:w}}},95346:function(e,l,t){"use strict";t.d(l,{uc:function(){return v},Hn:function(){return r},Uv:function(){return n},C7:function(){return d},mZ:function(){return f.m}});var i,s,a,n,o=t(21910);(i=a||(a={}))[i.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",i[i.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",i[i.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",o.AL.STRING,o.AL.STRING,o.AL.STRING_,(s=n||(n={})).SINGLE_SELECT="singleSelect",s.MULTIPLE_SELECT="multipleSelect",s.LOCATION_SELECT="locationSelect",s.OPEN_TEXT="openText";let r=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Location select",value:"locationSelect"},{label:"Open Text",value:"openText"}],d=[{label:"taxonomy:".concat(o.P6.DATA_CATEGORY),value:o.P6.DATA_CATEGORY},{label:"taxonomy:".concat(o.P6.DATA_SUBJECT),value:o.P6.DATA_SUBJECT},{label:"taxonomy:".concat(o.P6.DATA_USE),value:o.P6.DATA_USE},{label:"".concat(o.P6.SYSTEM,":information"),value:o.P6.SYSTEM},{label:"system:data use",value:o.P6.PRIVACY_DECLARATION}];var c=t(24246),u=t(96306),p=t(34090),x=t(30234),m=t(97181),h=t(40324),f=t(30320);let v=e=>{let{resourceFidesKey:l,resourceType:t}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:s,isEnabled:a,isLoading:n,sortedCustomFieldDefinitionIds:r}=(0,f.m)({resourceFidesKey:l,resourceType:t});return a&&0!==r.length?(0,c.jsx)(x.Z,{heading:"Custom fields",children:(0,c.jsx)(u.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(u.kCb,{flexDir:"column",gap:"24px",children:n?(0,c.jsx)(u.M5Y,{children:(0,c.jsx)(u.$jN,{})}):r.length>0&&(0,c.jsx)(u.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:r.map(e=>{let l=s.get(e);if(!l)return null;let t="customFieldValues.".concat(l.id);if(!l.allow_list_id&&l.field_type===o.AL.STRING)return(0,c.jsx)(p.gN,{name:t,children:e=>{let{field:t}=e;return(0,c.jsx)(h.j0,{...t,label:l.name,tooltip:l.description,variant:"stacked"})}},e);let a=i.get(l.allow_list_id);if(!a)return null;let{options:n}=a;return(0,c.jsx)(m.d,{name:t,allowClear:!0,mode:l.field_type!==o.AL.STRING?"multiple":void 0,label:l.name,options:n,tooltip:l.description,layout:"stacked",className:"w-full"},e)})})})})}):null};t(94799)},97181:function(e,l,t){"use strict";t.d(l,{d:function(){return d}});var i=t(24246),s=t(96306),a=t(34090),n=t(27378),o=t(46238),r=t(40324);let d=e=>{let{name:l,label:t,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:x,...m}=e,[h,f,{setValue:v}]=(0,a.U$)(l),C=!!(f.touched&&f.error),[_,g]=(0,n.useState)("");h.value||"tags"!==m.mode&&"multiple"!==m.mode||(h.value=[]),"tags"===m.mode&&"string"==typeof h.value&&(h.value=[h.value]);let j="tags"===m.mode?(e,l)=>e?e.value!==_||h.value.includes(_)?m.optionRender?m.optionRender(e,l):e.label:'Create "'.concat(_,'"'):void 0:m.optionRender||void 0,b=e=>{g(e),m.onSearch&&m.onSearch(e)},y=(e,l)=>{v(e),m.onChange&&m.onChange(e,l)};return"inline"===p?(0,i.jsx)(s.NIc,{isInvalid:C,isRequired:u,children:(0,i.jsxs)(s.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,i.jsx)(r.__,{htmlFor:m.id||l,...d,children:t}):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||l,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:j,onSearch:"tags"===m.mode?b:void 0,onChange:y,value:h.value||void 0,status:C?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{children:x}),(0,i.jsx)(r.Bc,{isInvalid:C,message:f.error,fieldName:h.name})]}),(0,i.jsx)(o.b,{label:c,className:C?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(s.NIc,{isInvalid:C,isRequired:u,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[t?(0,i.jsx)(r.__,{htmlFor:m.id||l,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,i.jsx)(o.b,{label:c})]}),(0,i.jsx)(s.WPr,{...h,id:m.id||l,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:j,onSearch:"tags"===m.mode?b:void 0,onChange:y,value:h.value||void 0,status:C?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{style:{marginTop:0},children:x}),(0,i.jsx)(r.Bc,{isInvalid:C,message:f.error,fieldName:h.name})]})})}},10342:function(e,l,t){"use strict";var i=t(24246),s=t(96306),a=t(46238);l.Z=e=>{let{title:l,tooltip:t,children:n,...o}=e;return(0,i.jsxs)(s.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...o,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:[l,t?(0,i.jsx)(s.xvT,{as:"span",mx:1,children:(0,i.jsx)(a.b,{label:t})}):void 0]}),(0,i.jsx)(s.Kqy,{p:6,spacing:6,children:n})]})}},30234:function(e,l,t){"use strict";var i=t(24246),s=t(96306);l.Z=e=>{let{heading:l,HeadingButton:t,children:a}=e;return(0,i.jsx)(s.Kqy,{spacing:4,children:(0,i.jsxs)(s.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,i.jsxs)(s.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,i.jsx)(s.X6q,{as:"h3",size:"xs",children:l}),t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.LZC,{}),(0,i.jsx)(t,{})]}):null]}),(0,i.jsx)(s.Kqy,{spacing:4,px:6,py:6,children:a})]})})}},78422:function(e,l,t){"use strict";t.r(l),t.d(l,{default:function(){return X}});var i=t(24246),s=t(77213),a=t(96306),n=t(27378),o=t(58754),r=t(92222),d=t(59003),c=t(16134),u=t(812),p=t(19904),x=t(47935),m=t(46628),h=t(72625),f=t(21910);let v=new Map([["string","Single Select"],["string[]","Multi Select"],["open-text","Open Text"]]),C=new Map([[f.P6.SYSTEM,"system:information"],[f.P6.DATA_USE,"taxonomy:data use"],[f.P6.DATA_CATEGORY,"taxonomy:data category"],[f.P6.DATA_SUBJECT,"taxonomy:data subject"],[f.P6.PRIVACY_DECLARATION,"system:data use"]]);var _=t(32885);let g=e=>{var l;let t=null!==(l=C.get(e.getValue()))&&void 0!==l?l:e.getValue();return(0,i.jsx)(h.G3,{...e,value:t})},j=e=>{let{row:l,getValue:t}=e,s=l.original.allow_list_id?t():"open-text",a=v.get(s)||s;return(0,i.jsx)(h.A4,{value:a})},b=e=>{let{row:l,getValue:t,isDisabled:s}=e,a=!!t(),[n]=(0,_.yM)(),o=async e=>n({...l.original,active:e});return(0,i.jsx)(h.S1,{enabled:a,onToggle:o,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=t(56358),T=t(58452);let w=e=>{let{customField:l,onEdit:t,onDelete:s,...n}=e,o=(0,a.qY0)();return(0,i.jsxs)(a.xuv,{...n,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(),t(l,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(),o.onOpen()}}),(0,i.jsx)(T.Z,{isOpen:o.isOpen,onClose:o.onClose,onConfirm:()=>{s(l),o.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=t(34090),S=t(55484),L=t(95346),I=t(41841);let R={color:"gray.600",fontSize:"14px",fontWeight:"semibold",minWidth:"150px"};var A=e=>{let{customLabelProps:l,disabled:t=!1,isRequired:s=!1,label:n,type:o="text",placeholder:r,...d}=e,[c,u]=(0,E.U$)(d),{id:p,name:x,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:[n&&(0,i.jsx)(a.lXp,{htmlFor:p||x,...l||R,children:n}),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(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"===o&&(0,i.jsx)(a.IIB,{...c,autoComplete:"off",autoFocus:m,color:"gray.700",isDisabled:t,placeholder:r,size:"sm","data-testid":h}),"textarea"===o&&(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})]})]})};let N=(0,a.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"})});var M=t(10342),O=t(95492),P=t(97181);let k={...R,minWidth:"unset"},U=e=>{let{values:l,validationSchema:t,errors:s,dirty:o,isValid:r,isSubmitting:d,isLoading:c,onClose:u,handleDropdownChange:p,isEditing:x}=e,{validateForm:m}=(0,E.u6)();return(0,n.useEffect)(()=>{m()},[t,m]),(0,i.jsxs)(E.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(M.Z,{title:"Field Information",children:[(0,i.jsx)(A,{isRequired:!0,label:"Name",name:"name",customLabelProps:k}),(0,i.jsx)(A,{label:"Description",name:"description",customLabelProps:k}),(0,i.jsx)(P.d,{label:"Location",name:"resource_type",options:L.C7,labelProps:k,disabled:x})]})}),(0,i.jsx)(a.xuv,{py:3,children:(0,i.jsxs)(M.Z,{title:"Configuration",children:[(0,i.jsx)(P.d,{label:"Field Type",name:"field_type",labelProps:k,options:L.Hn,onChange:p}),l.field_type!==L.Uv.OPEN_TEXT&&l.field_type!==L.Uv.LOCATION_SELECT?(0,i.jsx)(a.kCb,{flexDirection:"column",gap:"12px",paddingTop:"6px",paddingBottom:"24px",children:(0,i.jsx)(E.F2,{name:"allow_list.allowed_values",render:e=>{let{allowed_values:t}=l.allow_list;return(0,i.jsxs)(a.kCb,{flexDirection:"column",gap:"6",pl:"6",children:[(0,i.jsx)(a.kCb,{flexDirection:"column",children:t.map((l,s)=>(0,i.jsxs)(a.kCb,{flexGrow:1,gap:"3",mt:s>0?3:void 0,children:[(0,i.jsx)(A,{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)(O.l,{}),disabled:t.length<=1,onClick:()=>e.remove(s),type:"text"})]},s))}),(0,i.jsxs)(a.kCb,{alignItems:"center",children:[(0,i.jsx)(a.xvT,{color:"gray.600",fontSize:"xs",fontWeight:"500",lineHeight:"16px",pr:"8px",children:"Add a list value"}),(0,i.jsx)(a.wpx,{"aria-label":"Add a list value","data-testid":"add-list-value-btn",icon:(0,i.jsx)(N,{h:"7px",w:"7px"}),onClick:()=>{e.push("")},size:"small"}),0===t.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:!o||!r||d,children:"Save"})]})]})},D={description:"",field_type:L.Uv.OPEN_TEXT,name:"",resource_type:f.P6.SYSTEM,allow_list:{name:"",description:"",allowed_values:[]}},H=S.IX(S.Z_().optional().label("allowed_values")),V=S.IX(S.Z_().required("List item is required")).min(1,"Must add at least one list value").label("allowed_values"),F=S.Ry().shape({name:S.Z_().required("Name is required").trim(),allow_list:S.Ry().shape({allowed_values:H})}),Z=S.Ry().shape({name:S.Z_().required("Name is required").trim(),allow_list:S.Ry().shape({allowed_values:V})}),z=(e,l)=>{var t,i,s;let a;if(!e)return;e.field_type!==f.AL.STRING||e.allow_list_id||(a=L.Uv.OPEN_TEXT),e.field_type===f.AL.STRING&&e.allow_list_id&&(a=L.Uv.SINGLE_SELECT),e.field_type===f.AL.STRING_&&e.allow_list_id&&(a=L.Uv.MULTIPLE_SELECT);let n=l?{name:null!==(t=l.name)&&void 0!==t?t:"",description:null!==(i=l.description)&&void 0!==i?i:"",allowed_values:null!==(s=l.allowed_values)&&void 0!==s?s:[]}:D.allow_list;return{...e,field_type:a||L.Uv.OPEN_TEXT,allow_list:n}},q=e=>{let{isOpen:l,onClose:t,isLoading:s,customField:o}=e,{errorAlert:r,successAlert:d}=(0,I.VY)(),[c]=(0,_.Ld)(),[p]=(0,_.yM)(),[x]=(0,_.Nt)(),{data:m,isLoading:h}=(0,_.vA)(null==o?void 0:o.allow_list_id,{skip:!(null==o?void 0:o.allow_list_id)}),[v,C]=(0,n.useState)(F);if(h||!l)return null;let g=z(o,m),j=!!g,b=e=>{e===L.Uv.OPEN_TEXT||e===L.Uv.LOCATION_SELECT?C(F):C(Z)},y=async e=>{if([L.Uv.SINGLE_SELECT,L.Uv.MULTIPLE_SELECT].includes(e.field_type)){var l,i;if(new Set(null===(l=e.allow_list)||void 0===l?void 0:l.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:t}=e;e.allow_list_id&&(t.id=e.allow_list_id),t.name||(t.name=Date.now().toString()+Math.random().toString());let s=await x(t);(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===L.Uv.OPEN_TEXT||e.field_type===L.Uv.LOCATION_SELECT)&&(e.allow_list_id=void 0),[L.Uv.SINGLE_SELECT,L.Uv.OPEN_TEXT,L.Uv.LOCATION_SELECT].includes(e.field_type)&&(e.field_type=f.AL.STRING),e.field_type===L.Uv.MULTIPLE_SELECT&&(e.field_type=f.AL.STRING_);let s={...e};delete s.allow_list;let a=o?await p(s):await c(s);(0,u.D4)(a)?r((0,u.e$)(a.error),"Custom field has failed to save due to the following:"):(t(),d("Custom field successfully saved"))};return(0,i.jsxs)(a.u_l,{id:"custom-field-modal-hello-world",isOpen:l,onClose:t,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:o?"Manage Custom Field":"Add a custom field"}),(0,i.jsx)(a.fef,{px:6,py:0,children:(0,i.jsx)(E.J9,{initialValues:g||D,validationSchema:v,onSubmit:y,enableReinitialize:!0,validateOnChange:!0,children:e=>(0,i.jsx)(U,{isEditing:j,validationSchema:v,isLoading:s,onClose:t,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"]})]})}),Y=(0,r.Cl)(),B=e=>{let{...l}=e,t=(0,a.pmc)(),{isLoading:s}=(0,_.GH)(),o=(0,c.C)(_.fN),[h]=(0,_.UF)(),{isOpen:v,onClose:C,onOpen:y}=(0,a.qY0)(),[T,E]=(0,n.useState)(),[S,L]=(0,n.useState)(),I=(0,p.Tg)([f.Sh.CUSTOM_FIELD_UPDATE]),R=(0,p.Tg)([f.Sh.CUSTOM_FIELD_DELETE]),A=e=>{I&&(E(e),y())},N=async e=>{if(R&&e.id){let l=await h({id:e.id});if((0,u.D4)(l)){t((0,m.Vo)((0,u.e$)(l.error)));return}t((0,m.t5)("Custom field deleted"))}},M=(0,n.useMemo)(()=>[Y.accessor(e=>e.name,{id:"name",cell:e=>(0,i.jsx)(x.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,i.jsx)(x.Rr,{value:"Label",...e})}),Y.accessor(e=>e.description,{id:"description",cell:e=>(0,i.jsx)(x.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,i.jsx)(x.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),Y.accessor(e=>e.field_type,{id:"field_type",cell:j,header:e=>(0,i.jsx)(x.Rr,{value:"Field Type",...e})}),Y.accessor(e=>e.resource_type,{id:"resource_type",cell:g,header:e=>(0,i.jsx)(x.Rr,{value:"Locations",...e})}),I&&Y.accessor(e=>e.active,{id:"enable",cell:b,header:e=>(0,i.jsx)(x.Rr,{value:"Enable",...e}),meta:{disableRowClick:!0}}),(I||R)&&Y.display({id:"actions",header:"Actions",cell:e=>{let{row:l}=e;return(0,i.jsx)(w,{customField:l.original,onEdit:A,onDelete:N})},meta:{disableRowClick:!0}})].filter(Boolean),[R,I]),O=(0,d.b7)({getCoreRowModel:(0,r.sC)(),getFilteredRowModel:(0,r.vL)(),getSortedRowModel:(0,r.tj)(),onGlobalFilterChange:L,globalFilterFn:"includesString",columns:M,data:o,state:{globalFilter:S},columnResizeMode:"onChange"});return(0,i.jsxs)(a.xuv,{...l,children:[(0,i.jsx)(a.xuv,{maxWidth:600,children:(0,i.jsx)(a.xvT,{mb:10,fontSize:"sm",children:o.length>0?"Custom fields enable you to capture metrics specific to your organization and have those metrics appear in the data map and in reports.":"Custom fields provide organizations with the capability to capture metrics that are unique to their specific needs, allowing them to create customized reports. These fields can be added to either systems or elements within a taxonomy, and once added, they become reportable fields that are visible on the data map."})}),(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-page",children:[(0,i.jsxs)(x.Q$,{children:[(0,i.jsx)(x.HO,{globalFilter:S,setGlobalFilter:L,placeholder:"Search for a custom field"}),(0,i.jsx)(a.Ugi,{alignItems:"center",spacing:4,children:(0,i.jsx)(()=>(0,i.jsx)(p.ZP,{scopes:[f.Sh.CUSTOM_FIELD_DEFINITION_CREATE],children:(0,i.jsx)(a.wpx,{type:"primary","data-testid":"add-custom-field-btn",onClick:y,children:W})}),{})})]}),s?(0,i.jsx)(a.xuv,{p:2,borderWidth:1,children:(0,i.jsx)(x.I4,{rowHeight:26,numRows:10})}):(0,i.jsx)(x.ZK,{tableInstance:O,onRowClick:I?A:void 0,emptyTableNotice:(0,i.jsx)(G,{}),enableSorting:!0}),v&&(0,i.jsx)(q,{customField:T,isOpen:v,onClose:()=>{E(void 0),C()},isLoading:!1})]})]})};var X=()=>(0,i.jsx)(s.Z,{title:"Custom fields",children:(0,i.jsxs)(a.xuv,{"data-testid":"custom-fields-management",children:[(0,i.jsx)(o.Z,{heading:"Custom fields"}),(0,i.jsx)(B,{})]})})}},function(e){e.O(0,[431,4164,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([[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(96306),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(
|
|
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(96306),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(21910),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,[9826,2888,9774,179],function(){return e(e.s=40135)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2828],{85082:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/organization",function(){return t(5417)}])},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return p}});var r=t(24246),n=t(96306),a=t(88038),o=t.n(a),s=t(86677);t(27378);var l=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,s.useRouter)();return(0,r.jsx)(n.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)(n.xuv,{children:[(0,r.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(n.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,r.jsxs)(n.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:i,title:t,padded:a=!0,mainProps:c}=e,p=(0,l.hz)(),x=(0,s.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,h=!(p.flags.privacyRequestsConfiguration&&m),{data:v}=(0,d.JE)(void 0,{skip:h}),{data:j}=(0,d.PW)(void 0,{skip:h}),g=p.flags.privacyRequestsConfiguration&&(!v||!j)&&m;return(0,r.jsxs)(n.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,r.jsxs)(o(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(n.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,r.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var r=t(24246),n=t(96306),a=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:o=!0,children:s,rightContent:l,style:d,...c}=e;return(0,r.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,r.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof i?(0,r.jsx)(n.lQT,{className:t||s?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!t&&(0,r.jsx)(a.m,{className:s?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),s]})}},19904:function(e,i,t){"use strict";t.d(i,{Tg:function(){return o}});var r=t(24246),n=t(16134),a=t(31793);let o=e=>(0,n.C)(a.uu).filter(i=>e.includes(i)).length>0;i.ZP=e=>{let{scopes:i,children:t}=e;return o(i)?(0,r.jsx)(r.Fragment,{children:t}):null}},97181:function(e,i,t){"use strict";t.d(i,{d:function(){return d}});var r=t(24246),n=t(96306),a=t(34090),o=t(27378),s=t(46238),l=t(40324);let d=e=>{let{name:i,label:t,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:x,...m}=e,[h,v,{setValue:j}]=(0,a.U$)(i),g=!!(v.touched&&v.error),[f,b]=(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 y="tags"===m.mode?(e,i)=>e?e.value!==f||h.value.includes(f)?m.optionRender?m.optionRender(e,i):e.label:'Create "'.concat(f,'"'):void 0:m.optionRender||void 0,k=e=>{b(e),m.onSearch&&m.onSearch(e)},C=(e,i)=>{j(e),m.onChange&&m.onChange(e,i)};return"inline"===p?(0,r.jsx)(n.NIc,{isInvalid:g,isRequired:u,children:(0,r.jsxs)(n.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,r.jsx)(l.__,{htmlFor:m.id||i,...d,children:t}):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,{...h,id:m.id||i,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:y,onSearch:"tags"===m.mode?k:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),x&&(0,r.jsx)(n.Q6r,{children:x}),(0,r.jsx)(l.Bc,{isInvalid:g,message:v.error,fieldName:h.name})]}),(0,r.jsx)(s.b,{label:c,className:g?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(n.NIc,{isInvalid:g,isRequired:u,children:(0,r.jsxs)(n.gCW,{alignItems:"start",children:[(0,r.jsxs)(n.jqI,{align:"center",children:[t?(0,r.jsx)(l.__,{htmlFor:m.id||i,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,r.jsx)(s.b,{label:c})]}),(0,r.jsx)(n.WPr,{...h,id:m.id||i,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:y,onSearch:"tags"===m.mode?k:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),x&&(0,r.jsx)(n.Q6r,{style:{marginTop:0},children:x}),(0,r.jsx)(l.Bc,{isInvalid:g,message:v.error,fieldName:h.name})]})})}},8133:function(e,i,t){"use strict";var r=t(24246),n=t(96306);i.Z=e=>{let{title:i,children:t,isOpen:a,onClose:o,modalContentProps:s,showCloseButton:l=!1,footer:d,...c}=e;return(0,r.jsxs)(n.u_l,{isOpen:a,onClose:o,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,r.jsx)(n.ZAr,{}),(0,r.jsxs)(n.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...s,children:[l&&(0,r.jsx)(n.olH,{}),(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:i})})}),(0,r.jsx)(n.fef,{pb:4,overflow:"auto",children:t}),d&&(0,r.jsx)(n.mzw,{children:d})]})]})}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return d}});var r=t(24246),n=t(96306),a=t(79894),o=t.n(a),s=t(27378);let{Text:l}=n.AntTypography,d=e=>{let{items:i,...t}=e,a=(0,s.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let a=t===i.length-1,s={...e},d=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,id:a?"breadcrumb-current-page":void 0,children:s.title})),d)?s.title=(0,r.jsx)(n.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,r.jsx)(o(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[i]);return(0,r.jsx)(n.zrq,{items:a,...t})}},5417:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return N}});var r=t(24246),n=t(19904),a=t(96306),o=t(25980),s=t(77213),l=t(58754),d=t(8133),c=t(34090),u=t(27378),p=t(55484),x=t(40324),m=t(812),h=t(46628),v=t(76174),j=t(97181);let g={identifier:"",name:"",client_id:"",client_secret:""},f=e=>({...e}),b=p.Ry().shape({provider:p.Z_().required().label("Provider"),name:p.Z_().required().label("Name"),client_id:p.Z_().required().label("Client ID"),client_secret:p.Z_().required().label("Client Secret")});var y=e=>{let{openIDProvider:i,onSuccess:t,onClose:n}=e,[o]=(0,v.Qc)(),[s]=(0,v.oP)(),l=(0,u.useMemo)(()=>i?f(i):g,[i]),d=(0,a.pmc)(),p=async(e,i)=>{(e=>{if((0,m.D4)(e)){let i=(0,m.e$)(e.error,"An unexpected error occurred while editing the SSO provider. Please try again.");d((0,h.Vo)(i))}else d((0,h.t5)("SSO provider configuration saved.")),n(),i.resetForm({}),t&&t(e.data)})(l.id?await s(e):await o(e))},y=[{label:"Azure",value:"azure"},{label:"Google",value:"google"},{label:"Okta",value:"okta"},{label:"Custom",value:"custom"}],k=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0})]}),C=()=>(0,r.jsx)(x.j0,{id:"domain",name:"domain",label:"Domain",tooltip:"Domain for your Okta provider",variant:"stacked",isRequired:!0}),_=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"userinfo_url",name:"user_info_url",label:"User Info URL",tooltip:"User Info URL for your provider",variant:"stacked",isRequired:!0})]});return(0,r.jsx)(c.J9,{initialValues:l,enableReinitialize:!0,onSubmit:p,validationSchema:b,children:e=>{let{dirty:i,isValid:t,values:o}=e;return(0,r.jsx)(c.l0,{"data-testid":"openIDProvider-form",children:(0,r.jsxs)(a.Kqy,{spacing:4,children:[(0,r.jsx)(j.d,{name:"provider",label:"Provider",options:y,layout:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"identifier",name:"identifier",label:"Identifier",tooltip:"Unique identifier for your provider",variant:"stacked",isRequired:!0,disabled:!!l.id}),(0,r.jsx)(x.j0,{id:"name",name:"name",label:"Name",tooltip:"Display name for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"client_id",name:"client_id",label:"Client ID",type:"password",tooltip:"Client ID for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"client_secret",name:"client_secret",label:"Client secret",type:"password",tooltip:"Client secret for your provider",variant:"stacked",isRequired:!0}),"azure"===o.provider&&k(),"okta"===o.provider&&C(),"custom"===o.provider&&_(),(0,r.jsxs)(a.xuv,{textAlign:"right",children:[(0,r.jsx)(a.wpx,{htmlType:"button","data-testid":"cancel-btn",className:"mr-3",onClick:n,children:"Cancel"}),(0,r.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,"data-testid":"save-btn",children:"Save"})]})]})})}})},k=e=>{let{isOpen:i,onClose:t}=e;return(0,r.jsx)(d.Z,{isOpen:i,onClose:t,title:"Add SSO Provider",children:(0,r.jsx)(y,{onClose:t})})},C=e=>{let{isOpen:i,onClose:t,openIDProvider:n}=e;return(0,r.jsx)(d.Z,{isOpen:i,onClose:t,title:"Edit SSO Provider",children:(0,r.jsx)(y,{openIDProvider:n,onClose:t})})},_=e=>{let{openIDProvider:i}=e,{onOpen:t,isOpen:n,onClose:o}=(0,a.qY0)(),{onOpen:s,isOpen:l,onClose:d}=(0,a.qY0)(),c=(0,a.pmc)(),[u]=(0,v.rB)(),p=async()=>{let e=await u(i.identifier);if((0,m.D4)(e)){c((0,h.Vo)((0,m.e$)(e.error))),d();return}c((0,h.t5)("SSO provider deleted successfully")),d()};return(0,r.jsxs)(a.xuv,{alignItems:"center",borderRadius:"lg",borderWidth:"1px",display:"flex",height:"74px",marginBottom:"24px",padding:2,children:[(0,r.jsxs)(a.xuv,{display:"flex",alignItems:"center",children:[(0,r.jsx)(a.Eep,{src:"/images/oauth-login/".concat(i.provider,".svg"),alt:"".concat(i.provider," icon"),width:"40px",height:"40px"}),(0,r.jsxs)(a.xuv,{display:"flex",flexDirection:"column",children:[(0,r.jsx)(a.xvT,{fontSize:"medium",fontWeight:"bold",marginLeft:"16px",children:i.name}),(0,r.jsx)(a.xvT,{fontSize:"medium",marginLeft:"16px",children:i.identifier})]})]}),(0,r.jsxs)(a.xuv,{flexGrow:1,display:"flex",justifyContent:"flex-end",children:[(0,r.jsx)(a.wpx,{className:"mr-3",onClick:s,"data-testid":"remove-sso-provider-btn",children:"Remove"}),(0,r.jsx)(a.wpx,{className:"mr-3",onClick:t,"data-testid":"edit-sso-provider-btn",children:"Edit"})]}),(0,r.jsx)(C,{isOpen:n,onClose:o,openIDProvider:i}),(0,r.jsx)(a.cVQ,{isOpen:l,onClose:d,onConfirm:p,title:"Remove SSO provider",message:(0,r.jsx)(a.xvT,{children:"You are about to permanently remove this SSO provider. Are you sure you would like to continue?"})})]})},R=()=>{let{onOpen:e,isOpen:i,onClose:t}=(0,a.qY0)(),{data:n}=(0,v.qv)();return(0,r.jsxs)(a.xuv,{maxWidth:"600px",marginTop:"40px",children:[(0,r.jsxs)(a.X6q,{marginBottom:4,fontSize:"lg",display:"flex",justifyContent:"space-between",children:["SSO Providers",n&&n.length<5&&(0,r.jsx)(a.wpx,{onClick:e,"data-testid":"add-sso-provider-btn",children:"Add SSO Provider"})]}),(0,r.jsx)(a.xvT,{marginBottom:"30px",fontSize:"sm",children:"Use this area to add and manage SSO providers for you organization. Select “Add SSO provider” to add a new provider."}),null==n?void 0:n.map(e=>(0,r.jsx)(_,{openIDProvider:e},e.identifier)),(0,r.jsx)(k,{isOpen:i,onClose:t})]})},z=t(83265);let S={description:"",fides_key:z.Av,name:""},q=e=>({...e}),w=e=>({description:e.description,fides_key:e.fides_key,name:e.name}),O=p.Ry().shape({description:p.Z_().required().label("Description"),fides_key:p.Z_().required().label("Organization Fides Key"),name:p.Z_().required().label("Name")}),I=e=>{let{organization:i,onSuccess:t}=e,[n,o]=(0,z.$f)(),s=(0,u.useMemo)(()=>i?q(i):S,[i]),l=(0,a.pmc)(),d=async(e,i)=>{let r=w(e);(n=>{if((0,m.D4)(n)){let e=(0,m.e$)(n.error,"An unexpected error occurred while editing the organization. Please try again.");l((0,h.Vo)(e))}else l((0,h.t5)("Organization configuration saved.")),i.resetForm({values:e}),t&&t(r)})(await n(r))},p=!i||o.isLoading;return(0,r.jsx)(c.J9,{initialValues:s,enableReinitialize:!0,onSubmit:d,validationSchema:O,children:e=>{let{dirty:i,isValid:t}=e;return(0,r.jsx)(c.l0,{"data-testid":"organization-form",children:(0,r.jsxs)(a.Kqy,{spacing:4,children:[(0,r.jsx)(x.j0,{id:"fides_key",name:"fides_key",label:"Fides Key",disabled:!0,tooltip:"A unique key that identifies your organization. Not editable via UI.",variant:"stacked"}),(0,r.jsx)(x.j0,{id:"name",name:"name",label:"Name",disabled:p,tooltip:"User-friendly name for your organization, used in messaging to end-users and other public locations.",variant:"stacked"}),(0,r.jsx)(x.j0,{id:"description",name:"description",label:"Description",disabled:p,tooltip:"Short description of your organization, your services, etc.",variant:"stacked"}),(0,r.jsx)(a.xuv,{textAlign:"right",children:(0,r.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:p||!i||!t,loading:p,"data-testid":"save-btn",children:"Save"})})]})})}})};var P=t(54682),N=()=>{let{data:e}=(0,z.GQ)(z.Av),{plus:i}=(0,o.hz)();return(0,r.jsx)(s.Z,{title:"Organization",children:(0,r.jsxs)(a.xuv,{"data-testid":"organization-management",children:[(0,r.jsx)(l.Z,{heading:"Organization Management"}),(0,r.jsxs)(a.xuv,{maxWidth:"600px",children:[(0,r.jsx)(a.xvT,{pb:6,fontSize:"sm",children:"Please use this section to manage your organization‘s details, including key information that will be recorded in the RoPA (Record of Processing Activities)."}),(0,r.jsx)(a.xuv,{background:"gray.50",padding:2,children:(0,r.jsx)(I,{organization:e})}),i&&(0,r.jsx)(n.ZP,{scopes:[P.Sh.OPENID_PROVIDER_CREATE],children:(0,r.jsx)(R,{})})]})]})})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=85082)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2828],{85082:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/organization",function(){return t(5417)}])},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return p}});var r=t(24246),n=t(96306),a=t(88038),o=t.n(a),s=t(86677);t(27378);var l=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,s.useRouter)();return(0,r.jsx)(n.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)(n.xuv,{children:[(0,r.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(n.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,r.jsxs)(n.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:i,title:t,padded:a=!0,mainProps:c}=e,p=(0,l.hz)(),x=(0,s.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,h=!(p.flags.privacyRequestsConfiguration&&m),{data:v}=(0,d.JE)(void 0,{skip:h}),{data:j}=(0,d.PW)(void 0,{skip:h}),g=p.flags.privacyRequestsConfiguration&&(!v||!j)&&m;return(0,r.jsxs)(n.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,r.jsxs)(o(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(n.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,r.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var r=t(24246),n=t(96306),a=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:o=!0,children:s,rightContent:l,style:d,...c}=e;return(0,r.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,r.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof i?(0,r.jsx)(n.lQT,{className:t||s?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!t&&(0,r.jsx)(a.m,{className:s?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),s]})}},19904:function(e,i,t){"use strict";t.d(i,{Tg:function(){return o}});var r=t(24246),n=t(16134),a=t(31793);let o=e=>(0,n.C)(a.uu).filter(i=>e.includes(i)).length>0;i.ZP=e=>{let{scopes:i,children:t}=e;return o(i)?(0,r.jsx)(r.Fragment,{children:t}):null}},97181:function(e,i,t){"use strict";t.d(i,{d:function(){return d}});var r=t(24246),n=t(96306),a=t(34090),o=t(27378),s=t(46238),l=t(40324);let d=e=>{let{name:i,label:t,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:x,...m}=e,[h,v,{setValue:j}]=(0,a.U$)(i),g=!!(v.touched&&v.error),[f,b]=(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 y="tags"===m.mode?(e,i)=>e?e.value!==f||h.value.includes(f)?m.optionRender?m.optionRender(e,i):e.label:'Create "'.concat(f,'"'):void 0:m.optionRender||void 0,k=e=>{b(e),m.onSearch&&m.onSearch(e)},C=(e,i)=>{j(e),m.onChange&&m.onChange(e,i)};return"inline"===p?(0,r.jsx)(n.NIc,{isInvalid:g,isRequired:u,children:(0,r.jsxs)(n.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,r.jsx)(l.__,{htmlFor:m.id||i,...d,children:t}):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,{...h,id:m.id||i,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:y,onSearch:"tags"===m.mode?k:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),x&&(0,r.jsx)(n.Q6r,{children:x}),(0,r.jsx)(l.Bc,{isInvalid:g,message:v.error,fieldName:h.name})]}),(0,r.jsx)(s.b,{label:c,className:g?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(n.NIc,{isInvalid:g,isRequired:u,children:(0,r.jsxs)(n.gCW,{alignItems:"start",children:[(0,r.jsxs)(n.jqI,{align:"center",children:[t?(0,r.jsx)(l.__,{htmlFor:m.id||i,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,r.jsx)(s.b,{label:c})]}),(0,r.jsx)(n.WPr,{...h,id:m.id||i,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:y,onSearch:"tags"===m.mode?k:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),x&&(0,r.jsx)(n.Q6r,{style:{marginTop:0},children:x}),(0,r.jsx)(l.Bc,{isInvalid:g,message:v.error,fieldName:h.name})]})})}},8133:function(e,i,t){"use strict";var r=t(24246),n=t(96306);i.Z=e=>{let{title:i,children:t,isOpen:a,onClose:o,modalContentProps:s,showCloseButton:l=!1,footer:d,...c}=e;return(0,r.jsxs)(n.u_l,{isOpen:a,onClose:o,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,r.jsx)(n.ZAr,{}),(0,r.jsxs)(n.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...s,children:[l&&(0,r.jsx)(n.olH,{}),(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:i})})}),(0,r.jsx)(n.fef,{pb:4,overflow:"auto",children:t}),d&&(0,r.jsx)(n.mzw,{children:d})]})]})}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return d}});var r=t(24246),n=t(96306),a=t(79894),o=t.n(a),s=t(27378);let{Text:l}=n.AntTypography,d=e=>{let{items:i,...t}=e,a=(0,s.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let a=t===i.length-1,s={...e},d=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,id:a?"breadcrumb-current-page":void 0,children:s.title})),d)?s.title=(0,r.jsx)(n.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,r.jsx)(o(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[i]);return(0,r.jsx)(n.zrq,{items:a,...t})}},5417:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return N}});var r=t(24246),n=t(19904),a=t(96306),o=t(25980),s=t(77213),l=t(58754),d=t(8133),c=t(34090),u=t(27378),p=t(55484),x=t(40324),m=t(812),h=t(46628),v=t(76174),j=t(97181);let g={identifier:"",name:"",client_id:"",client_secret:""},f=e=>({...e}),b=p.Ry().shape({provider:p.Z_().required().label("Provider"),name:p.Z_().required().label("Name"),client_id:p.Z_().required().label("Client ID"),client_secret:p.Z_().required().label("Client Secret")});var y=e=>{let{openIDProvider:i,onSuccess:t,onClose:n}=e,[o]=(0,v.Qc)(),[s]=(0,v.oP)(),l=(0,u.useMemo)(()=>i?f(i):g,[i]),d=(0,a.pmc)(),p=async(e,i)=>{(e=>{if((0,m.D4)(e)){let i=(0,m.e$)(e.error,"An unexpected error occurred while editing the SSO provider. Please try again.");d((0,h.Vo)(i))}else d((0,h.t5)("SSO provider configuration saved.")),n(),i.resetForm({}),t&&t(e.data)})(l.id?await s(e):await o(e))},y=[{label:"Azure",value:"azure"},{label:"Google",value:"google"},{label:"Okta",value:"okta"},{label:"Custom",value:"custom"}],k=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0})]}),C=()=>(0,r.jsx)(x.j0,{id:"domain",name:"domain",label:"Domain",tooltip:"Domain for your Okta provider",variant:"stacked",isRequired:!0}),_=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"userinfo_url",name:"user_info_url",label:"User Info URL",tooltip:"User Info URL for your provider",variant:"stacked",isRequired:!0})]});return(0,r.jsx)(c.J9,{initialValues:l,enableReinitialize:!0,onSubmit:p,validationSchema:b,children:e=>{let{dirty:i,isValid:t,values:o}=e;return(0,r.jsx)(c.l0,{"data-testid":"openIDProvider-form",children:(0,r.jsxs)(a.Kqy,{spacing:4,children:[(0,r.jsx)(j.d,{name:"provider",label:"Provider",options:y,layout:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"identifier",name:"identifier",label:"Identifier",tooltip:"Unique identifier for your provider",variant:"stacked",isRequired:!0,disabled:!!l.id}),(0,r.jsx)(x.j0,{id:"name",name:"name",label:"Name",tooltip:"Display name for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"client_id",name:"client_id",label:"Client ID",type:"password",tooltip:"Client ID for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"client_secret",name:"client_secret",label:"Client secret",type:"password",tooltip:"Client secret for your provider",variant:"stacked",isRequired:!0}),"azure"===o.provider&&k(),"okta"===o.provider&&C(),"custom"===o.provider&&_(),(0,r.jsxs)(a.xuv,{textAlign:"right",children:[(0,r.jsx)(a.wpx,{htmlType:"button","data-testid":"cancel-btn",className:"mr-3",onClick:n,children:"Cancel"}),(0,r.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,"data-testid":"save-btn",children:"Save"})]})]})})}})},k=e=>{let{isOpen:i,onClose:t}=e;return(0,r.jsx)(d.Z,{isOpen:i,onClose:t,title:"Add SSO Provider",children:(0,r.jsx)(y,{onClose:t})})},C=e=>{let{isOpen:i,onClose:t,openIDProvider:n}=e;return(0,r.jsx)(d.Z,{isOpen:i,onClose:t,title:"Edit SSO Provider",children:(0,r.jsx)(y,{openIDProvider:n,onClose:t})})},_=e=>{let{openIDProvider:i}=e,{onOpen:t,isOpen:n,onClose:o}=(0,a.qY0)(),{onOpen:s,isOpen:l,onClose:d}=(0,a.qY0)(),c=(0,a.pmc)(),[u]=(0,v.rB)(),p=async()=>{let e=await u(i.identifier);if((0,m.D4)(e)){c((0,h.Vo)((0,m.e$)(e.error))),d();return}c((0,h.t5)("SSO provider deleted successfully")),d()};return(0,r.jsxs)(a.xuv,{alignItems:"center",borderRadius:"lg",borderWidth:"1px",display:"flex",height:"74px",marginBottom:"24px",padding:2,children:[(0,r.jsxs)(a.xuv,{display:"flex",alignItems:"center",children:[(0,r.jsx)(a.Eep,{src:"/images/oauth-login/".concat(i.provider,".svg"),alt:"".concat(i.provider," icon"),width:"40px",height:"40px"}),(0,r.jsxs)(a.xuv,{display:"flex",flexDirection:"column",children:[(0,r.jsx)(a.xvT,{fontSize:"medium",fontWeight:"bold",marginLeft:"16px",children:i.name}),(0,r.jsx)(a.xvT,{fontSize:"medium",marginLeft:"16px",children:i.identifier})]})]}),(0,r.jsxs)(a.xuv,{flexGrow:1,display:"flex",justifyContent:"flex-end",children:[(0,r.jsx)(a.wpx,{className:"mr-3",onClick:s,"data-testid":"remove-sso-provider-btn",children:"Remove"}),(0,r.jsx)(a.wpx,{className:"mr-3",onClick:t,"data-testid":"edit-sso-provider-btn",children:"Edit"})]}),(0,r.jsx)(C,{isOpen:n,onClose:o,openIDProvider:i}),(0,r.jsx)(a.cVQ,{isOpen:l,onClose:d,onConfirm:p,title:"Remove SSO provider",message:(0,r.jsx)(a.xvT,{children:"You are about to permanently remove this SSO provider. Are you sure you would like to continue?"})})]})},R=()=>{let{onOpen:e,isOpen:i,onClose:t}=(0,a.qY0)(),{data:n}=(0,v.qv)();return(0,r.jsxs)(a.xuv,{maxWidth:"600px",marginTop:"40px",children:[(0,r.jsxs)(a.X6q,{marginBottom:4,fontSize:"lg",display:"flex",justifyContent:"space-between",children:["SSO Providers",n&&n.length<5&&(0,r.jsx)(a.wpx,{onClick:e,"data-testid":"add-sso-provider-btn",children:"Add SSO Provider"})]}),(0,r.jsx)(a.xvT,{marginBottom:"30px",fontSize:"sm",children:"Use this area to add and manage SSO providers for you organization. Select “Add SSO provider” to add a new provider."}),null==n?void 0:n.map(e=>(0,r.jsx)(_,{openIDProvider:e},e.identifier)),(0,r.jsx)(k,{isOpen:i,onClose:t})]})},z=t(83265);let S={description:"",fides_key:z.Av,name:""},q=e=>({...e}),w=e=>({description:e.description,fides_key:e.fides_key,name:e.name}),O=p.Ry().shape({description:p.Z_().required().label("Description"),fides_key:p.Z_().required().label("Organization Fides Key"),name:p.Z_().required().label("Name")}),I=e=>{let{organization:i,onSuccess:t}=e,[n,o]=(0,z.$f)(),s=(0,u.useMemo)(()=>i?q(i):S,[i]),l=(0,a.pmc)(),d=async(e,i)=>{let r=w(e);(n=>{if((0,m.D4)(n)){let e=(0,m.e$)(n.error,"An unexpected error occurred while editing the organization. Please try again.");l((0,h.Vo)(e))}else l((0,h.t5)("Organization configuration saved.")),i.resetForm({values:e}),t&&t(r)})(await n(r))},p=!i||o.isLoading;return(0,r.jsx)(c.J9,{initialValues:s,enableReinitialize:!0,onSubmit:d,validationSchema:O,children:e=>{let{dirty:i,isValid:t}=e;return(0,r.jsx)(c.l0,{"data-testid":"organization-form",children:(0,r.jsxs)(a.Kqy,{spacing:4,children:[(0,r.jsx)(x.j0,{id:"fides_key",name:"fides_key",label:"Fides Key",disabled:!0,tooltip:"A unique key that identifies your organization. Not editable via UI.",variant:"stacked"}),(0,r.jsx)(x.j0,{id:"name",name:"name",label:"Name",disabled:p,tooltip:"User-friendly name for your organization, used in messaging to end-users and other public locations.",variant:"stacked"}),(0,r.jsx)(x.j0,{id:"description",name:"description",label:"Description",disabled:p,tooltip:"Short description of your organization, your services, etc.",variant:"stacked"}),(0,r.jsx)(a.xuv,{textAlign:"right",children:(0,r.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:p||!i||!t,loading:p,"data-testid":"save-btn",children:"Save"})})]})})}})};var P=t(21910),N=()=>{let{data:e}=(0,z.GQ)(z.Av),{plus:i}=(0,o.hz)();return(0,r.jsx)(s.Z,{title:"Organization",children:(0,r.jsxs)(a.xuv,{"data-testid":"organization-management",children:[(0,r.jsx)(l.Z,{heading:"Organization Management"}),(0,r.jsxs)(a.xuv,{maxWidth:"600px",children:[(0,r.jsx)(a.xvT,{pb:6,fontSize:"sm",children:"Please use this section to manage your organization‘s details, including key information that will be recorded in the RoPA (Record of Processing Activities)."}),(0,r.jsx)(a.xuv,{background:"gray.50",padding:2,children:(0,r.jsx)(I,{organization:e})}),i&&(0,r.jsx)(n.ZP,{scopes:[P.Sh.OPENID_PROVIDER_CREATE],children:(0,r.jsx)(R,{})})]})]})})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=85082)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1617],{54543:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]/test-datasets",function(){return i(94010)}])},18225:function(e,t,i){"use strict";var s=i(24246),n=i(96306);t.Z=e=>{let{alignment:t="center",...i}=e;return(0,s.jsx)(n.kCb,{boxSize:"full",align:"center",justify:t,children:(0,s.jsx)(n.$jN,{color:"primary",...i})})}},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return f}});var s=i(24246),n=i(96306),r=i(88038),l=i.n(r),a=i(86677);i(27378);var o=i(25980),d=i(90867),u=i(77830),c=()=>{let e=(0,a.useRouter)();return(0,s.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(n.xuv,{children:[(0,s.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(n.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,s.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},f=e=>{let{children:t,title:i,padded:r=!0,mainProps:u}=e,f=(0,o.hz)(),h=(0,a.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,m=!(f.flags.privacyRequestsConfiguration&&p),{data:y}=(0,d.JE)(void 0,{skip:m}),{data:x}=(0,d.PW)(void 0,{skip:m}),v=f.flags.privacyRequestsConfiguration&&(!y||!x)&&p;return(0,s.jsxs)(n.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(l(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(n.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:[v?(0,s.jsx)(c,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var s=i(24246),n=i(96306),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:a,rightContent:o,style:d,...u}=e;return(0,s.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",...d}:{paddingBottom:"24px",...d},children:[(0,s.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(n.lQT,{className:i||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,s.jsx)(r.m,{className:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var s=i(24246),n=i(96306),r=i(79894),l=i.n(r),a=i(27378);let{Text:o}=n.AntTypography,d=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},d=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,id:r?"breadcrumb-current-page":void 0,children:a.title})),d)?a.title=(0,s.jsx)(n.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,s.jsx)(l(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,s.jsx)(n.zrq,{items:r,...i})}},41207:function(e,t,i){"use strict";i.d(t,{F:function(){return l},M:function(){return r}});var s=i(76649),n=i(65218);let r=i.n(n)()(()=>i.e(7088).then(i.bind(i,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),l=e=>(0,s.Ln)({name:"string"},e)&&"YAMLException"===e.name},94010:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return z}});var s=i(24246),n=i(96306),r=i(86677),l=i(27378),a=i(16134),o=i(18225),d=i(77213),u=i(77830),c=i(58754),f=i(1315),h=i(66527),p=i(88340),m=i(812),y=i(46628),x=i(41207),v=i(41966),g=i(94725),b=i(88124);let _=e=>Array.isArray(e)?e.map(e=>_(e)).filter(e=>null!==e):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(e=>{let[t,i]=e;return[t,_(i)]}).filter(e=>{let[,t]=e;return null!==t})):e,j=e=>{if(Array.isArray(e)){let t=e[0];if(!t)return"";let i=t.msg||"",s=t.loc?" (".concat(t.loc,")"):"";return"".concat(i).concat(s)}return e};var k=e=>{let{connectionKey:t}=e,i=(0,n.pmc)(),r=(0,a.T)(),[o]=(0,v.TG)(),[d,u]=(0,l.useState)(""),c=(0,a.C)(b.fD),f=(0,a.C)(b.lR),{data:k,isLoading:w,refetch:T}=(0,g.Eg)(t,{skip:!t}),{data:C,refetch:E}=(0,g.tW)({connectionKey:t,datasetKey:(null==c?void 0:c.fides_key)||"",policyKey:f},{skip:!t||!(null==c?void 0:c.fides_key)||!f});(0,l.useEffect)(()=>{C&&r((0,b.x0)(C.reachable))},[C,r]);let R=(0,l.useMemo)(()=>((null==k?void 0:k.items)||[]).map(e=>({value:e.fides_key,label:e.fides_key})),[null==k?void 0:k.items]);(0,l.useEffect)(()=>{if((null==k?void 0:k.items.length)&&(!c||!k.items.find(e=>e.fides_key===c.fides_key))){let e=k.items[0];r((0,b.w7)(e))}},[k,c,r]),(0,l.useEffect)(()=>{(null==c?void 0:c.ctl_dataset)&&u(h.ZP.dump(_(null==c?void 0:c.ctl_dataset)))},[c]),(0,l.useEffect)(()=>{f&&(null==c?void 0:c.fides_key)&&t&&E()},[f,null==c?void 0:c.fides_key,t,E]),(0,l.useEffect)(()=>{C&&r((0,b.x0)(C.reachable))},[C,r]);let S=async e=>{let t=null==k?void 0:k.items.find(t=>t.fides_key===e);t&&r((0,b.w7)(t))},O=async()=>{let e;if(!c)return;try{e=h.ZP.load(d)}catch(e){i((0,y.Vo)("YAML Parsing Error: ".concat(e instanceof h._L?"".concat(e.reason," ").concat(e.mark?"at line ".concat(e.mark.line):""):"Invalid YAML format")));return}let t=await o(e);if((0,m.D4)(t)){i((0,y.Vo)((0,m.e$)(t.error)));return}r((0,b.w7)({fides_key:c.fides_key,ctl_dataset:t.data})),i((0,y.t5)("Successfully modified dataset")),await T(),await E()},N=async()=>{try{let{data:e}=await T(),t=null==e?void 0:e.items.find(e=>e.fides_key===(null==c?void 0:c.fides_key));(null==t?void 0:t.ctl_dataset)&&u(h.ZP.dump(_(t.ctl_dataset))),i((0,y.t5)("Successfully refreshed datasets"))}catch(e){i((0,y.Vo)((0,m.e$)(e)))}};return(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",maxHeight:"100vh",children:[(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Edit dataset: "}),(0,s.jsx)(n.WPr,{id:"format","data-testid":"export-format-select",value:(null==c?void 0:c.fides_key)||"",options:R,onChange:S,className:"w-64"}),(0,s.jsx)(p.Z,{copyText:d})]}),(0,s.jsxs)(n.Ugi,{spacing:2,children:[(0,s.jsx)(n.esZ,{title:"Refresh to load the latest data from the database. This will overwrite any unsaved local changes.",placement:"top",children:(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small","data-testid":"refresh-btn",onClick:N,loading:w,children:"Refresh"})}),(0,s.jsx)(n.esZ,{title:"Save your changes to update the dataset in the database.",placement:"top",children:(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small",onClick:O,children:"Save"})})]})]}),(0,s.jsx)(n.Kqy,{border:"1px solid",borderColor:"gray.200",borderRadius:"md",justifyContent:"space-between",py:4,pr:4,"data-testid":"empty-state",flex:"1 1 auto",minHeight:"200px",children:(0,s.jsx)(x.M,{defaultLanguage:"yaml",value:d,height:"100%",onChange:e=>u(e||""),onMount:()=>{},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!1},readOnly:!1,hideCursorInOverviewRuler:!0,overviewRulerBorder:!1,scrollBeyondLastLine:!1},theme:"light"})}),C&&(0,s.jsx)(n.Kqy,{backgroundColor:(null==C?void 0:C.reachable)?"green.50":"red.50",border:"1px solid",borderColor:(null==C?void 0:C.reachable)?"green.500":"red.500",borderRadius:"md",p:2,flexShrink:0,mt:2,children:(0,s.jsx)(n.Ugi,{alignItems:"center",children:(0,s.jsxs)(n.Ugi,{flex:"1",children:[(null==C?void 0:C.reachable)?(0,s.jsx)(n.StI,{}):(0,s.jsx)(n.f9v,{}),(0,s.jsx)(n.xvT,{fontSize:"sm",whiteSpace:"pre-wrap",children:(null==C?void 0:C.reachable)?"Dataset is reachable":"Dataset is not reachable. ".concat(j(null==C?void 0:C.details))})]})})})]})},w=i(54458),T=i(16125),C=i(99716);let E=e=>{let t=new Date(e);return(0,w.WU)(t,"yyyy-MM-dd HH:mm:ss.SSS")},R=e=>{switch(e){case"ERROR":return"red.500";case"WARNING":return"orange.500";case"INFO":return"blue.500";default:return"gray.500"}},S=(0,l.memo)(e=>{let{log:t}=e;return(0,s.jsxs)(n.xuv,{as:"pre",margin:0,fontSize:"xs",fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word",children:[(0,s.jsx)(n.xvT,{as:"span",color:"green.500",children:E(t.timestamp)}),(0,s.jsx)(n.xvT,{as:"span",children:" | "}),(0,s.jsx)(n.xvT,{as:"span",color:R(t.level),children:t.level.padEnd(8)}),(0,s.jsx)(n.xvT,{as:"span",children:" | "}),(0,s.jsx)(n.xvT,{as:"span",color:"cyan.500",children:t.module_info}),(0,s.jsx)(n.xvT,{as:"span",children:" - "}),(0,s.jsx)(n.xvT,{as:"span",color:"ERROR"===t.level||"WARNING"===t.level?R(t.level):"gray.800",children:t.message})]})});S.displayName="LogLine";var O=(0,l.memo)(()=>{let e=(0,a.T)(),t=(0,l.useRef)(null),i=(0,T.v9)(b.HN),r=(0,T.v9)(b.pz),{data:o}=(0,C.fV)({privacy_request_id:i},{skip:!i,pollingInterval:1e3});(0,l.useEffect)(()=>{o&&e((0,b.Hy)(o))},[o,e]);let d=(0,l.useCallback)(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[]);(0,l.useEffect)(()=>{d()},[r,d]);let u=(0,l.useMemo)(()=>(null==r?void 0:r.map(e=>"".concat(E(e.timestamp)," | ").concat(e.level," | ").concat(e.module_info," - ").concat(e.message)).join("\n"))||"",[r]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Test logs"}),(0,s.jsx)(p.Z,{copyText:u})]})}),(0,s.jsx)(n.xuv,{ref:t,height:"200px",overflowY:"auto",borderWidth:1,borderColor:"gray.200",borderRadius:"md",p:2,children:null==r?void 0:r.map(e=>(0,s.jsx)(S,{log:e},"".concat(e.timestamp,"-").concat(e.module_info,"-").concat(e.message)))})]})}),N=i(46238);let{useGetPoliciesQuery:P}=i(78780).u.injectEndpoints({endpoints:e=>({getPolicies:e.query({query:()=>({url:"/dsr/policy"}),providesTags:()=>["Policies"]})})});var q=i(54682),I=i(31883),M=e=>{let{connectionKey:t}=e,i=(0,n.pmc)(),r=(0,a.T)(),[o]=(0,g.s7)(),d=(0,T.v9)(b.fD),u=(0,T.v9)(b.YS),c=(0,T.v9)(b.Af),f=(0,T.v9)(b.zn),h=(0,T.v9)(b.lR),x=(0,T.v9)(b.M_),v=(0,T.v9)(b.HN),[_,j]=(0,l.useState)("{}");(0,l.useEffect)(()=>{d&&j(JSON.stringify(f,null,2))},[d,f]);let{data:k,error:w}=(0,C.Z2)({privacy_request_id:v},{skip:!v||!(null==d?void 0:d.fides_key),pollingInterval:2e3}),{refetch:E}=(0,C.fV)({privacy_request_id:v},{skip:!v}),{refetch:R}=(0,g.I1)({connectionKey:t,datasetKey:(null==d?void 0:d.fides_key)||""},{skip:!t||!(null==d?void 0:d.fides_key),refetchOnMountOrArgChange:!0}),{data:S}=P(),O=(0,l.useMemo)(()=>((null==S?void 0:S.items)||[]).filter(e=>{var t;return null===(t=e.rules)||void 0===t?void 0:t.some(e=>"access"===e.action_type)}).map(e=>({value:e.key,label:e.name})),[null==S?void 0:S.items]);(0,l.useEffect)(()=>{let e=null==d?void 0:d.fides_key;t&&e&&R().then(t=>{t.data&&(null==d?void 0:d.fides_key)===e&&r((0,b.qD)({datasetKey:e,values:t.data}))})},[d,t,r,R]),(0,l.useEffect)(()=>{let e=null==d?void 0:d.fides_key;if(w&&"status"in w&&404===w.status){r((0,b.hT)()),i((0,y.Vo)("Test run failed"));return}if(!k||k.privacy_request_id!==v||!e)return;let t={datasetKey:e,values:JSON.stringify(k,null,2)};k.status===q.q2.COMPLETE?x&&E().then(()=>{r((0,b.EO)(t)),r((0,b.hT)()),i((0,y.t5)("Test run completed successfully"))}):k.status===q.q2.ERROR&&E().then(()=>{r((0,b.EO)(t)),r((0,b.hT)()),i((0,y.Vo)("Test run failed"))})},[k,w,v,d,x,r,i,E]);let M=(0,l.useMemo)(()=>h&&(null==S?void 0:S.items)?h:null,[h,null==S?void 0:S.items]),D=async()=>{if((null==d?void 0:d.fides_key)&&h)try{let e;try{e=JSON.parse(_)}catch(e){i((0,y.Vo)("Invalid JSON in test input"));return}r((0,b.Vh)(d.fides_key)),i((0,y.t5)("Test run started"));let s=await o({connection_key:t,dataset_key:d.fides_key,identities:e,policy_key:h});(0,I.D4)(s)?(i((0,y.Vo)((0,m.e$)(s.error))),r((0,b.hT)())):"data"in s?r((0,b.eY)(s.data.privacy_request_id)):(r((0,b.hT)()),i((0,y.Vo)("No privacy request ID in response")))}catch(e){r((0,b.hT)()),i((0,y.Vo)("Failed to start test run"))}};return(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",minHeight:"0",children:[(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Test inputs"}),(0,s.jsx)(p.Z,{copyText:_})]}),(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.WPr,{id:"policy","aria-label":"Policy selector","data-testid":"policy-select",placeholder:"Select policy",value:M,options:O,onChange:e=>{r((0,b.kF)(e))},className:"w-64"}),(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small",type:"primary","data-testid":"run-btn",onClick:x?()=>{r((0,b.qU)()),i((0,y.t5)("Test manually stopped by user"))}:D,disabled:!h||!u,children:x?"Stop":"Run"}),(0,s.jsx)(N.b,{label:x?"Stop the currently running test":"Run a test access request using the provided test input data and the selected access policy"})]})]}),(0,s.jsx)(n.gxH,{size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:x,height:"100%",value:_,onChange:e=>{let t=e.target.value;j(t);try{let e=JSON.parse(t);d&&r((0,b.qD)({datasetKey:d.fides_key,values:e}))}catch(e){}}}),(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",children:["Test results ",(0,s.jsx)(p.Z,{copyText:c})]}),(0,s.jsx)(n.gxH,{isReadOnly:!0,size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:!1,height:"100%",value:c})]})};let D=e=>e.id?Array.isArray(e.id)?e.id[0]:e.id:"";var z=()=>{var e;let t=(0,r.useRouter)(),i=(0,a.T)(),h=D(t.query),{data:p,isLoading:m}=(0,f.rn)(h,{skip:!h}),y=(null==p?void 0:null===(e=p.connection_configs)||void 0===e?void 0:e.key)||"";return((0,l.useEffect)(()=>{i((0,f.db)(p))},[p,i]),m)?(0,s.jsx)(d.Z,{title:"Systems",children:(0,s.jsx)(o.Z,{})}):(0,s.jsxs)(d.Z,{title:"System inventory",mainProps:{height:"100vh",display:"flex",flexDirection:"column"},children:[(0,s.jsx)(c.Z,{heading:"System inventory",breadcrumbItems:[{title:"System inventory",href:u.So},{title:(null==p?void 0:p.name)||"",href:"/systems/configure/".concat(h,"#integrations")},{title:"Test datasets"}]}),(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",padding:"0",children:[(0,s.jsxs)(n.Ugi,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",maxHeight:"60vh",children:[(0,s.jsx)(k,{connectionKey:y}),(0,s.jsx)(M,{connectionKey:y})]}),(0,s.jsx)(n.xuv,{flex:"0 0 auto",children:(0,s.jsx)(O,{})})]})]})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return s.Bw},D4:function(){return s.D4}});var s=i(19043)},76737:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{default:function(){return a},noSSR:function(){return l}});let s=i(51538);i(24246),i(27378);let n=s._(i(21887));function r(e){return{default:(null==e?void 0:e.default)||e}}function l(e,t){return delete t.webpack,delete t.modules,e(t)}function a(e,t){let i=n.default,s={loading:e=>{let{error:t,isLoading:i,pastDelay:s}=e;return null}};e instanceof Promise?s.loader=()=>e:"function"==typeof e?s.loader=e:"object"==typeof e&&(s={...s,...e});let a=(s={...s,...t}).loader;return(s.loadableGenerated&&(s={...s,...s.loadableGenerated},delete s.loadableGenerated),"boolean"!=typeof s.ssr||s.ssr)?i({...s,loader:()=>null!=a?a().then(r):Promise.resolve(r(()=>null))}):(delete s.webpack,delete s.modules,l(i,s))}("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,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return s}});let s=i(51538)._(i(27378)).default.createContext(null)},21887:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let s=i(51538)._(i(27378)),n=i(28438),r=[],l=[],a=!1;function o(e){let t=e(),i={loading:!0,loaded:null,error:null};return i.promise=t.then(e=>(i.loading=!1,i.loaded=e,e)).catch(e=>{throw i.loading=!1,i.error=e,e}),i}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 i=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),r=null;function o(){if(!r){let t=new d(e,i);r={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return r.promise()}if(!a){let e=i.webpack?i.webpack():i.modules;e&&l.push(t=>{for(let i of e)if(t.includes(i))return o()})}function u(e,t){!function(){o();let e=s.default.useContext(n.LoadableContext);e&&Array.isArray(i.modules)&&i.modules.forEach(t=>{e(t)})}();let l=s.default.useSyncExternalStore(r.subscribe,r.getCurrentValue,r.getCurrentValue);return s.default.useImperativeHandle(t,()=>({retry:r.retry}),[]),s.default.useMemo(()=>{var t;return l.loading||l.error?s.default.createElement(i.loading,{isLoading:l.loading,pastDelay:l.pastDelay,timedOut:l.timedOut,error:l.error,retry:r.retry}):l.loaded?s.default.createElement((t=l.loaded)&&t.default?t.default:t,e):null},[e,l])}return u.preload=()=>o(),u.displayName="LoadableComponent",s.default.forwardRef(u)}(o,e)}function c(e,t){let i=[];for(;e.length;){let s=e.pop();i.push(s(t))}return Promise.all(i).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(r).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let i=()=>(a=!0,t());c(l,e).then(i,i)})),window.__NEXT_PRELOADREADY=u.preloadReady;let f=u},65218:function(e,t,i){e.exports=i(76737)}},function(e){e.O(0,[6527,2888,9774,179],function(){return e(e.s=54543)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1617],{54543:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]/test-datasets",function(){return i(94010)}])},18225:function(e,t,i){"use strict";var s=i(24246),n=i(96306);t.Z=e=>{let{alignment:t="center",...i}=e;return(0,s.jsx)(n.kCb,{boxSize:"full",align:"center",justify:t,children:(0,s.jsx)(n.$jN,{color:"primary",...i})})}},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return f}});var s=i(24246),n=i(96306),r=i(88038),l=i.n(r),a=i(86677);i(27378);var o=i(25980),d=i(90867),u=i(77830),c=()=>{let e=(0,a.useRouter)();return(0,s.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(n.xuv,{children:[(0,s.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(n.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,s.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},f=e=>{let{children:t,title:i,padded:r=!0,mainProps:u}=e,f=(0,o.hz)(),h=(0,a.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,m=!(f.flags.privacyRequestsConfiguration&&p),{data:y}=(0,d.JE)(void 0,{skip:m}),{data:x}=(0,d.PW)(void 0,{skip:m}),v=f.flags.privacyRequestsConfiguration&&(!y||!x)&&p;return(0,s.jsxs)(n.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(l(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(n.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:[v?(0,s.jsx)(c,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var s=i(24246),n=i(96306),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:a,rightContent:o,style:d,...u}=e;return(0,s.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",...d}:{paddingBottom:"24px",...d},children:[(0,s.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(n.lQT,{className:i||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,s.jsx)(r.m,{className:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var s=i(24246),n=i(96306),r=i(79894),l=i.n(r),a=i(27378);let{Text:o}=n.AntTypography,d=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},d=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,id:r?"breadcrumb-current-page":void 0,children:a.title})),d)?a.title=(0,s.jsx)(n.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,s.jsx)(l(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,s.jsx)(n.zrq,{items:r,...i})}},41207:function(e,t,i){"use strict";i.d(t,{F:function(){return l},M:function(){return r}});var s=i(76649),n=i(65218);let r=i.n(n)()(()=>i.e(7088).then(i.bind(i,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),l=e=>(0,s.Ln)({name:"string"},e)&&"YAMLException"===e.name},94010:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return z}});var s=i(24246),n=i(96306),r=i(86677),l=i(27378),a=i(16134),o=i(18225),d=i(77213),u=i(77830),c=i(58754),f=i(1315),h=i(66527),p=i(88340),m=i(812),y=i(46628),x=i(41207),v=i(41966),g=i(94725),b=i(88124);let _=e=>Array.isArray(e)?e.map(e=>_(e)).filter(e=>null!==e):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(e=>{let[t,i]=e;return[t,_(i)]}).filter(e=>{let[,t]=e;return null!==t})):e,j=e=>{if(Array.isArray(e)){let t=e[0];if(!t)return"";let i=t.msg||"",s=t.loc?" (".concat(t.loc,")"):"";return"".concat(i).concat(s)}return e};var k=e=>{let{connectionKey:t}=e,i=(0,n.pmc)(),r=(0,a.T)(),[o]=(0,v.TG)(),[d,u]=(0,l.useState)(""),c=(0,a.C)(b.fD),f=(0,a.C)(b.lR),{data:k,isLoading:w,refetch:T}=(0,g.Eg)(t,{skip:!t}),{data:C,refetch:E}=(0,g.tW)({connectionKey:t,datasetKey:(null==c?void 0:c.fides_key)||"",policyKey:f},{skip:!t||!(null==c?void 0:c.fides_key)||!f});(0,l.useEffect)(()=>{C&&r((0,b.x0)(C.reachable))},[C,r]);let R=(0,l.useMemo)(()=>((null==k?void 0:k.items)||[]).map(e=>({value:e.fides_key,label:e.fides_key})),[null==k?void 0:k.items]);(0,l.useEffect)(()=>{if((null==k?void 0:k.items.length)&&(!c||!k.items.find(e=>e.fides_key===c.fides_key))){let e=k.items[0];r((0,b.w7)(e))}},[k,c,r]),(0,l.useEffect)(()=>{(null==c?void 0:c.ctl_dataset)&&u(h.ZP.dump(_(null==c?void 0:c.ctl_dataset)))},[c]),(0,l.useEffect)(()=>{f&&(null==c?void 0:c.fides_key)&&t&&E()},[f,null==c?void 0:c.fides_key,t,E]),(0,l.useEffect)(()=>{C&&r((0,b.x0)(C.reachable))},[C,r]);let S=async e=>{let t=null==k?void 0:k.items.find(t=>t.fides_key===e);t&&r((0,b.w7)(t))},O=async()=>{let e;if(!c)return;try{e=h.ZP.load(d)}catch(e){i((0,y.Vo)("YAML Parsing Error: ".concat(e instanceof h._L?"".concat(e.reason," ").concat(e.mark?"at line ".concat(e.mark.line):""):"Invalid YAML format")));return}let t=await o(e);if((0,m.D4)(t)){i((0,y.Vo)((0,m.e$)(t.error)));return}r((0,b.w7)({fides_key:c.fides_key,ctl_dataset:t.data})),i((0,y.t5)("Successfully modified dataset")),await T(),await E()},N=async()=>{try{let{data:e}=await T(),t=null==e?void 0:e.items.find(e=>e.fides_key===(null==c?void 0:c.fides_key));(null==t?void 0:t.ctl_dataset)&&u(h.ZP.dump(_(t.ctl_dataset))),i((0,y.t5)("Successfully refreshed datasets"))}catch(e){i((0,y.Vo)((0,m.e$)(e)))}};return(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",maxHeight:"100vh",children:[(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Edit dataset: "}),(0,s.jsx)(n.WPr,{id:"format","data-testid":"export-format-select",value:(null==c?void 0:c.fides_key)||"",options:R,onChange:S,className:"w-64"}),(0,s.jsx)(p.Z,{copyText:d})]}),(0,s.jsxs)(n.Ugi,{spacing:2,children:[(0,s.jsx)(n.esZ,{title:"Refresh to load the latest data from the database. This will overwrite any unsaved local changes.",placement:"top",children:(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small","data-testid":"refresh-btn",onClick:N,loading:w,children:"Refresh"})}),(0,s.jsx)(n.esZ,{title:"Save your changes to update the dataset in the database.",placement:"top",children:(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small",onClick:O,children:"Save"})})]})]}),(0,s.jsx)(n.Kqy,{border:"1px solid",borderColor:"gray.200",borderRadius:"md",justifyContent:"space-between",py:4,pr:4,"data-testid":"empty-state",flex:"1 1 auto",minHeight:"200px",children:(0,s.jsx)(x.M,{defaultLanguage:"yaml",value:d,height:"100%",onChange:e=>u(e||""),onMount:()=>{},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!1},readOnly:!1,hideCursorInOverviewRuler:!0,overviewRulerBorder:!1,scrollBeyondLastLine:!1},theme:"light"})}),C&&(0,s.jsx)(n.Kqy,{backgroundColor:(null==C?void 0:C.reachable)?"green.50":"red.50",border:"1px solid",borderColor:(null==C?void 0:C.reachable)?"green.500":"red.500",borderRadius:"md",p:2,flexShrink:0,mt:2,children:(0,s.jsx)(n.Ugi,{alignItems:"center",children:(0,s.jsxs)(n.Ugi,{flex:"1",children:[(null==C?void 0:C.reachable)?(0,s.jsx)(n.StI,{}):(0,s.jsx)(n.f9v,{}),(0,s.jsx)(n.xvT,{fontSize:"sm",whiteSpace:"pre-wrap",children:(null==C?void 0:C.reachable)?"Dataset is reachable":"Dataset is not reachable. ".concat(j(null==C?void 0:C.details))})]})})})]})},w=i(54458),T=i(16125),C=i(99716);let E=e=>{let t=new Date(e);return(0,w.WU)(t,"yyyy-MM-dd HH:mm:ss.SSS")},R=e=>{switch(e){case"ERROR":return"red.500";case"WARNING":return"orange.500";case"INFO":return"blue.500";default:return"gray.500"}},S=(0,l.memo)(e=>{let{log:t}=e;return(0,s.jsxs)(n.xuv,{as:"pre",margin:0,fontSize:"xs",fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word",children:[(0,s.jsx)(n.xvT,{as:"span",color:"green.500",children:E(t.timestamp)}),(0,s.jsx)(n.xvT,{as:"span",children:" | "}),(0,s.jsx)(n.xvT,{as:"span",color:R(t.level),children:t.level.padEnd(8)}),(0,s.jsx)(n.xvT,{as:"span",children:" | "}),(0,s.jsx)(n.xvT,{as:"span",color:"cyan.500",children:t.module_info}),(0,s.jsx)(n.xvT,{as:"span",children:" - "}),(0,s.jsx)(n.xvT,{as:"span",color:"ERROR"===t.level||"WARNING"===t.level?R(t.level):"gray.800",children:t.message})]})});S.displayName="LogLine";var O=(0,l.memo)(()=>{let e=(0,a.T)(),t=(0,l.useRef)(null),i=(0,T.v9)(b.HN),r=(0,T.v9)(b.pz),{data:o}=(0,C.fV)({privacy_request_id:i},{skip:!i,pollingInterval:1e3});(0,l.useEffect)(()=>{o&&e((0,b.Hy)(o))},[o,e]);let d=(0,l.useCallback)(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[]);(0,l.useEffect)(()=>{d()},[r,d]);let u=(0,l.useMemo)(()=>(null==r?void 0:r.map(e=>"".concat(E(e.timestamp)," | ").concat(e.level," | ").concat(e.module_info," - ").concat(e.message)).join("\n"))||"",[r]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Test logs"}),(0,s.jsx)(p.Z,{copyText:u})]})}),(0,s.jsx)(n.xuv,{ref:t,height:"200px",overflowY:"auto",borderWidth:1,borderColor:"gray.200",borderRadius:"md",p:2,children:null==r?void 0:r.map(e=>(0,s.jsx)(S,{log:e},"".concat(e.timestamp,"-").concat(e.module_info,"-").concat(e.message)))})]})}),N=i(46238);let{useGetPoliciesQuery:P}=i(78780).u.injectEndpoints({endpoints:e=>({getPolicies:e.query({query:()=>({url:"/dsr/policy"}),providesTags:()=>["Policies"]})})});var q=i(21910),I=i(31883),M=e=>{let{connectionKey:t}=e,i=(0,n.pmc)(),r=(0,a.T)(),[o]=(0,g.s7)(),d=(0,T.v9)(b.fD),u=(0,T.v9)(b.YS),c=(0,T.v9)(b.Af),f=(0,T.v9)(b.zn),h=(0,T.v9)(b.lR),x=(0,T.v9)(b.M_),v=(0,T.v9)(b.HN),[_,j]=(0,l.useState)("{}");(0,l.useEffect)(()=>{d&&j(JSON.stringify(f,null,2))},[d,f]);let{data:k,error:w}=(0,C.Z2)({privacy_request_id:v},{skip:!v||!(null==d?void 0:d.fides_key),pollingInterval:2e3}),{refetch:E}=(0,C.fV)({privacy_request_id:v},{skip:!v}),{refetch:R}=(0,g.I1)({connectionKey:t,datasetKey:(null==d?void 0:d.fides_key)||""},{skip:!t||!(null==d?void 0:d.fides_key),refetchOnMountOrArgChange:!0}),{data:S}=P(),O=(0,l.useMemo)(()=>((null==S?void 0:S.items)||[]).filter(e=>{var t;return null===(t=e.rules)||void 0===t?void 0:t.some(e=>"access"===e.action_type)}).map(e=>({value:e.key,label:e.name})),[null==S?void 0:S.items]);(0,l.useEffect)(()=>{let e=null==d?void 0:d.fides_key;t&&e&&R().then(t=>{t.data&&(null==d?void 0:d.fides_key)===e&&r((0,b.qD)({datasetKey:e,values:t.data}))})},[d,t,r,R]),(0,l.useEffect)(()=>{let e=null==d?void 0:d.fides_key;if(w&&"status"in w&&404===w.status){r((0,b.hT)()),i((0,y.Vo)("Test run failed"));return}if(!k||k.privacy_request_id!==v||!e)return;let t={datasetKey:e,values:JSON.stringify(k,null,2)};k.status===q.q2.COMPLETE?x&&E().then(()=>{r((0,b.EO)(t)),r((0,b.hT)()),i((0,y.t5)("Test run completed successfully"))}):k.status===q.q2.ERROR&&E().then(()=>{r((0,b.EO)(t)),r((0,b.hT)()),i((0,y.Vo)("Test run failed"))})},[k,w,v,d,x,r,i,E]);let M=(0,l.useMemo)(()=>h&&(null==S?void 0:S.items)?h:null,[h,null==S?void 0:S.items]),D=async()=>{if((null==d?void 0:d.fides_key)&&h)try{let e;try{e=JSON.parse(_)}catch(e){i((0,y.Vo)("Invalid JSON in test input"));return}r((0,b.Vh)(d.fides_key)),i((0,y.t5)("Test run started"));let s=await o({connection_key:t,dataset_key:d.fides_key,identities:e,policy_key:h});(0,I.D4)(s)?(i((0,y.Vo)((0,m.e$)(s.error))),r((0,b.hT)())):"data"in s?r((0,b.eY)(s.data.privacy_request_id)):(r((0,b.hT)()),i((0,y.Vo)("No privacy request ID in response")))}catch(e){r((0,b.hT)()),i((0,y.Vo)("Failed to start test run"))}};return(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",minHeight:"0",children:[(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Test inputs"}),(0,s.jsx)(p.Z,{copyText:_})]}),(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.WPr,{id:"policy","aria-label":"Policy selector","data-testid":"policy-select",placeholder:"Select policy",value:M,options:O,onChange:e=>{r((0,b.kF)(e))},className:"w-64"}),(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small",type:"primary","data-testid":"run-btn",onClick:x?()=>{r((0,b.qU)()),i((0,y.t5)("Test manually stopped by user"))}:D,disabled:!h||!u,children:x?"Stop":"Run"}),(0,s.jsx)(N.b,{label:x?"Stop the currently running test":"Run a test access request using the provided test input data and the selected access policy"})]})]}),(0,s.jsx)(n.gxH,{size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:x,height:"100%",value:_,onChange:e=>{let t=e.target.value;j(t);try{let e=JSON.parse(t);d&&r((0,b.qD)({datasetKey:d.fides_key,values:e}))}catch(e){}}}),(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",children:["Test results ",(0,s.jsx)(p.Z,{copyText:c})]}),(0,s.jsx)(n.gxH,{isReadOnly:!0,size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:!1,height:"100%",value:c})]})};let D=e=>e.id?Array.isArray(e.id)?e.id[0]:e.id:"";var z=()=>{var e;let t=(0,r.useRouter)(),i=(0,a.T)(),h=D(t.query),{data:p,isLoading:m}=(0,f.rn)(h,{skip:!h}),y=(null==p?void 0:null===(e=p.connection_configs)||void 0===e?void 0:e.key)||"";return((0,l.useEffect)(()=>{i((0,f.db)(p))},[p,i]),m)?(0,s.jsx)(d.Z,{title:"Systems",children:(0,s.jsx)(o.Z,{})}):(0,s.jsxs)(d.Z,{title:"System inventory",mainProps:{height:"100vh",display:"flex",flexDirection:"column"},children:[(0,s.jsx)(c.Z,{heading:"System inventory",breadcrumbItems:[{title:"System inventory",href:u.So},{title:(null==p?void 0:p.name)||"",href:"/systems/configure/".concat(h,"#integrations")},{title:"Test datasets"}]}),(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",padding:"0",children:[(0,s.jsxs)(n.Ugi,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",maxHeight:"60vh",children:[(0,s.jsx)(k,{connectionKey:y}),(0,s.jsx)(M,{connectionKey:y})]}),(0,s.jsx)(n.xuv,{flex:"0 0 auto",children:(0,s.jsx)(O,{})})]})]})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return s.Bw},D4:function(){return s.D4}});var s=i(19043)},76737:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{default:function(){return a},noSSR:function(){return l}});let s=i(51538);i(24246),i(27378);let n=s._(i(21887));function r(e){return{default:(null==e?void 0:e.default)||e}}function l(e,t){return delete t.webpack,delete t.modules,e(t)}function a(e,t){let i=n.default,s={loading:e=>{let{error:t,isLoading:i,pastDelay:s}=e;return null}};e instanceof Promise?s.loader=()=>e:"function"==typeof e?s.loader=e:"object"==typeof e&&(s={...s,...e});let a=(s={...s,...t}).loader;return(s.loadableGenerated&&(s={...s,...s.loadableGenerated},delete s.loadableGenerated),"boolean"!=typeof s.ssr||s.ssr)?i({...s,loader:()=>null!=a?a().then(r):Promise.resolve(r(()=>null))}):(delete s.webpack,delete s.modules,l(i,s))}("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,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return s}});let s=i(51538)._(i(27378)).default.createContext(null)},21887:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let s=i(51538)._(i(27378)),n=i(28438),r=[],l=[],a=!1;function o(e){let t=e(),i={loading:!0,loaded:null,error:null};return i.promise=t.then(e=>(i.loading=!1,i.loaded=e,e)).catch(e=>{throw i.loading=!1,i.error=e,e}),i}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 i=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),r=null;function o(){if(!r){let t=new d(e,i);r={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return r.promise()}if(!a){let e=i.webpack?i.webpack():i.modules;e&&l.push(t=>{for(let i of e)if(t.includes(i))return o()})}function u(e,t){!function(){o();let e=s.default.useContext(n.LoadableContext);e&&Array.isArray(i.modules)&&i.modules.forEach(t=>{e(t)})}();let l=s.default.useSyncExternalStore(r.subscribe,r.getCurrentValue,r.getCurrentValue);return s.default.useImperativeHandle(t,()=>({retry:r.retry}),[]),s.default.useMemo(()=>{var t;return l.loading||l.error?s.default.createElement(i.loading,{isLoading:l.loading,pastDelay:l.pastDelay,timedOut:l.timedOut,error:l.error,retry:r.retry}):l.loaded?s.default.createElement((t=l.loaded)&&t.default?t.default:t,e):null},[e,l])}return u.preload=()=>o(),u.displayName="LoadableComponent",s.default.forwardRef(u)}(o,e)}function c(e,t){let i=[];for(;e.length;){let s=e.pop();i.push(s(t))}return Promise.all(i).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(r).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let i=()=>(a=!0,t());c(l,e).then(i,i)})),window.__NEXT_PRELOADREADY=u.preloadReady;let f=u},65218:function(e,t,i){e.exports=i(76737)}},function(e){e.O(0,[6527,2888,9774,179],function(){return e(e.s=54543)}),_N_E=e.O()}]);
|