ethyca-fides 2.63.3b0__py2.py3-none-any.whl → 2.64.0rc0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ethyca_fides-2.63.3b0.dist-info → ethyca_fides-2.64.0rc0.dist-info}/METADATA +1 -1
- {ethyca_fides-2.63.3b0.dist-info → ethyca_fides-2.64.0rc0.dist-info}/RECORD +228 -225
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/ba414a58ba90_create_manual_task_config_tables.py +121 -0
- fides/api/db/base.py +4 -0
- fides/api/models/attachment.py +1 -0
- fides/api/models/manual_tasks/__init__.py +6 -0
- fides/api/models/manual_tasks/manual_task.py +11 -1
- fides/api/models/manual_tasks/manual_task_config.py +136 -0
- fides/api/models/manual_tasks/manual_task_log.py +13 -9
- fides/api/schemas/manual_tasks/manual_task_config.py +311 -0
- fides/api/schemas/manual_tasks/manual_task_schemas.py +1 -1
- fides/api/schemas/manual_tasks/manual_task_status.py +1 -1
- fides/api/schemas/privacy_request.py +2 -0
- fides/api/util/cache.py +6 -3
- fides/config/redis_settings.py +105 -44
- fides/service/manual_tasks/manual_task_config_service.py +370 -0
- fides/service/manual_tasks/manual_task_service.py +231 -87
- fides/service/manual_tasks/utils.py +185 -0
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1040-630c7f4284dc6f70.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1316-6cc72a45ebf7ff81.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2430-b480401d44c55416.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2599-6c4d22e75028d8b6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3450-bdaeb35442d810b4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3855-0dec3e7d9e886550.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/401-fceaae662cfca5a5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/409-037cfc3f096150f0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4230-1cdb7ea1be370ed3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/431-f72599f01b98f07d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5309-4511df9708d5a63c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5574-3cd33b3a6c937899.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6662-cb11881dcaabe5e2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6882-3cc73d407a088d7d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/699-8ca44b0de9fa20f0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9046-fdf53cc7e926a8c1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{905-5fe5124abfb5c542.js → 905-742074a074be1055.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9226-ba6587e46ec7659a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9767-e49b065d03ce4e80.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9951-f9ab5cac7e2c05ab.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-0e0fdbcc0ec1c76b.js → _app-8ec6e466f3373ac0.js} +6 -6
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-3065022f370ec055.js → manual-0a5f2310ce6b1059.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-18e3faf7963962e4.js → [resourceUrn]-c623d6f1a61c8ea9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-cfac259a30641e68.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-7320524a47104798.js → [resourceUrn]-57bd5cdf784f059f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-7b5aec33da578745.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-c948f93c833d4358.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-333f53caab751428.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-18c144223277bc2e.js → action-center-27205f8457a1ecb0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-20a1043f6a06198f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-4c526db0c30c488a.js → [resourceUrn]-06edce289876dea1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-6f27dbb7c8edc69d.js → detection-faf326a6200637d0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-562d2b8ae90dd1f0.js → [resourceUrn]-64acf269256ee74f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-fe7f51502eda57c9.js → discovery-8c3e4be6d36da66d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-9af01b6cf4cbe8af.js → datamap-fb50de22f83edd4a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-41ab27c4195cfa93.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-6e2caba24b3e78c2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-904d43e31157aa55.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-d4e31a1c4a58800e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-8f7d16bc5e9229c8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-18ff06fc09c22c33.js → [id]-4a33dd0371dbaebc.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-979eff6888e42b6b.js → new-e88509346b2d2851.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{fides-js-docs-80b241bf6cddb72e.js → fides-js-docs-5d8fd1af75f19e2f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-fdc2964fa7d1d8fd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-adc286ff254e7f41.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-4cdbbb8cd1d8698e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-d0e350d2a2667883.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-7796fbf458f8f159.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-6f866bc799a5f67f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-24108f615ff5e1e7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-fef247a87baeb080.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-2b540203a2d7b59d.js → [id]-6eb886e7b7e6785b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-18534d2a79a3850b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/webpack-0a61b5bd21a41fe6.js +1 -0
- fides/ui-build/static/admin/_next/static/css/c693338e3bc8dcc6.css +1 -0
- fides/ui-build/static/admin/_next/static/lDN8BtGGiw3b60__SDnAa/_buildManifest.js +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-preview.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
- fides/ui-build/static/admin/lib/fides.js +2 -2
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/poc/ant-components.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
- fides/ui-build/static/admin/poc/forms.html +1 -1
- fides/ui-build/static/admin/poc/table-migration.html +1 -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/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/0S8UTwc7FKVdi3Eb4LgFK/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1099-f2199d5b88dd98b4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/155-8ad794121fef6281.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1904-e33cb75edb93d3d3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2310-efaa2a52fc487db4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3119-9be74ade1504a7e7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/401-710009c2a7408818.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4132-76ca1bcf79bf1d77.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5258-8a1f7feddee7a960.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5404-a8a82985736363f4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5487-483a111405f678e0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5683-7144f557d701406c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6202-86a62d94744e2c18.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/641-7e4eef3222cbda70.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7980-3da0fe6938b0b758.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8032-4b8bda7166eff954.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8499-a65187ae77b7307b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8702-d1c8296f9f6afc10.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9187-851756440f79cd75.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9327-eb3b84680abcc660.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9494-04a0483ed0ddad7c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-a3ed98edff04e6ed.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-b02050eb3b7113d4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-ff211c7a968bda47.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-7f7435f28861ee78.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-ec4b981fd9cff542.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-e18f14b8d598e942.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-1987ef0d3c687aaa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-979828f48148b37c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-e85c3537d3aade4a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-6d44abbe7d454435.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-42f276660c107e1c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-63361d914d70d647.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-fd73f276dad7a06c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-f85f92726a61a668.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-e090903a572cba68.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-f0c8e4eced9f5cc5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-f7a271ee53cb4e51.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-dd903f6e03c4ee4e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-493dc9b4595c9fb4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-6d790458dd21dde7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/webpack-abfd03ce7f1e55ac.js +0 -1
- fides/ui-build/static/admin/_next/static/css/c3377f99bf988d68.css +0 -1
- {ethyca_fides-2.63.3b0.dist-info → ethyca_fides-2.64.0rc0.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.63.3b0.dist-info → ethyca_fides-2.64.0rc0.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.63.3b0.dist-info → ethyca_fides-2.64.0rc0.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.63.3b0.dist-info → ethyca_fides-2.64.0rc0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1100-d617215143d70d3d.js → 1100-d43cb04522a6505c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1817-ddfdd6ed9529bba6.js → 1817-b4688ba5042ec687.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2921-19664dd93e2bf1ea.js → 2921-aabf41bf3d7573f9.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3505-f6d55694ca5c9816.js → 3505-a79256cd851dfab4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3513-656df06b45fedba3.js → 3513-8677ee280eaef0da.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3872-09df90521f7db611.js → 3872-ffa16c2df7ef0ab6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3923-3d80020d02819c33.js → 3923-5d580fbb1dd6ae01.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4060-4e196835f56cc326.js → 4060-71cd041e5a57ca5a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4121-80ac9bcd08f9cd7a.js → 4121-78a76e980acbd539.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4481-be144b50994f5135.js → 4481-f597a7cf03f8c9e1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6277-0b1e3d23e97f5e19.js → 6277-3fb4c7fc790a6d20.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6853-d9c6c55d8562bc9b.js → 6853-a4097260e402980e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{69-a4d64cabe750b286.js → 69-6889d6674c95e7b5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6954-8ed05ffdbf2ec086.js → 6954-13a25cef3a8fdd76.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{7553-77c9715868d6ad13.js → 7553-a95939c32d54b5b7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{79-6c977013b6bedc23.js → 79-5670e31eb65d0a53.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{796-1d77aa88b776ee4e.js → 796-9a6b13c838e25538.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8433-88fd946149dd1f27.js → 8433-adb1fcb29d82f1b7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{404-c50dccc133b332a9.js → 404-ac2f0844e5c4b4cd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-357ef3b269c576bb.js → multiple-00cb904825aad7e3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-e8ae218a9d124ba7.js → add-systems-587e21d14e0a5196.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-488507bb244cce9d.js → add-vendors-fa7305b88c1afd20.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-6f0b46ac2b112bfe.js → configure-f140ec9d8e8a0f7a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-5024b4ab40ba024c.js → [id]-0edb7c92518e7d21.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-2b62e5facfc51808.js → privacy-experience-d8d926f0735a2546.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-71791459da78e35d.js → [id]-5c949f2e3cef2398.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-26a7d52615b1ebb8.js → new-130155cfb4a0bcc7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-25836dd5142f37e8.js → privacy-notices-1135ad8924d32c36.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-3a9021850242c78f.js → properties-776855e370414beb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-9a5d3cc5cbb4ef27.js → reporting-21c23f75ff1135d9.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-9e21184279f8e126.js → consent-4d5ea70a77df1bb8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-64cea013d41e348a.js → [projectUrn]-030ee304cbe5e530.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-343a3830b2d4cf22.js → datastore-connection-8f9b8890018e1ea5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{index-737b0c430bf2f7a0.js → index-1adb6bcb71701ac2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-91e865a65a88d1a4.js → [id]-9b4d1d61c7c97509.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-529c7e09b073edd2.js → add-template-f8fd4795e260887c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-6226faba9595da71.js → messaging-aa744ae8b61e5ff2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-0f7d4390e01f4ffb.js → ant-components-3407158757fb3627.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-a4e470f75a5553f8.js → AntForm-47e947c02ae90fd0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-d814c1c56b4b04d8.js → FormikAntFormItem-24f9a44512ce8827.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-0f68f2be09df2c76.js → FormikControlled-e567a69f8c37fb9a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-6b63d5c992466891.js → FormikField-35a33f9c7def2220.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-88eb9b98e8e4b426.js → forms-780e18dde8e38099.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-a3da91fd04eec8f5.js → table-migration-7a17dffa515e5560.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-b2ea863afce1d7f0.js → [id]-91dd0039cc2b70bc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-0831dfaa65ce0d50.js → messaging-b01cbbaac34dadbc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-709676f00a491bca.js → storage-a15410de7f1d0f84.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-0eac9951504b46a7.js → configure-1a1aa83a3f88844c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-88e20023c30113df.js → privacy-requests-c4e1b69fb5bab61a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-3acc3107e9a21260.js → [id]-19737d4f21aadbee.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-2bf13ee02d8d5ab9.js → add-property-9ccb295110feee20.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-822eac07220f55f8.js → properties-3a1037a2e036212a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/{alpha-88999260f855b448.js → alpha-965cc21889b25e44.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-928b0b69e05fd430.js → about-0e1c381d488a7ada.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-611980eee1ce9c8a.js → domain-records-0b44b2b224077dcd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-382cb6df12684bf8.js → domains-5d00e1155bd11178.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-5d664f2a0f11b626.js → email-templates-d2cdbe770683e9df.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-ba569d22e1e3f6df.js → locations-811dadb489f23d7d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-fae8ecf7878bad2d.js → regulations-54f142bc3e4c95ba.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{systems-a278608ba0ddc66c.js → systems-7b71274334c559a4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-eb30c9230a9ce9cc.js → [id]-75d41fde668b9025.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-381146aa81e3ffea.js → user-management-dd43755b687c09a7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/{0S8UTwc7FKVdi3Eb4LgFK → lDN8BtGGiw3b60__SDnAa}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8473],{64902:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset",function(){return a(91949)}])},79806:function(e,t,a){"use strict";a.d(t,{Gn:function(){return r},zR:function(){return n}});var s=a(24246),l=a(62051),i=a(56358);let n=e=>{let{title:t}=e;return(0,s.jsx)(l.OXI,{py:0,display:"flex",alignItems:"flex-start",children:(0,s.jsx)(l.xvT,{mr:"2",color:"gray.700",fontSize:"lg",lineHeight:1.8,children:t})})},r=e=>{let{onDelete:t,onEditYaml:a,formId:n,isSaving:r}=e;return(0,s.jsxs)(l.zeN,{justifyContent:"space-between",children:[t?(0,s.jsx)(l.wpx,{"aria-label":"delete",icon:(0,s.jsx)(i.q,{fontSize:"small"}),onClick:t,"data-testid":"delete-btn"}):null,(0,s.jsxs)("div",{className:"flex gap-2",children:[a&&(0,s.jsx)(l.wpx,{onClick:a,"data-testid":"edit-yaml-btn",children:"Edit YAML"}),(0,s.jsx)(l.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:n,loading:r,children:"Save"})]})]})};t.ZP=e=>{let{header:t,description:a,isOpen:i,onClose:n,children:r,footer:o}=e;return(0,s.jsxs)(l.dys,{placement:"right",isOpen:i,onClose:n,size:"md",children:[(0,s.jsx)(l.P1B,{}),(0,s.jsxs)(l.scA,{"data-testid":"edit-drawer-content",py:2,children:[(0,s.jsxs)(l.xuv,{display:"flex",justifyContent:"space-between",alignItems:"top",mr:2,py:2,gap:2,children:[(0,s.jsx)(l.xuv,{flex:1,minH:8,children:t}),(0,s.jsx)(l.xuv,{display:"flex",justifyContent:"flex-end",mr:2,children:(0,s.jsx)(l.wpx,{"aria-label":"Close editor",onClick:n,"data-testid":"close-drawer-btn",icon:(0,s.jsx)(l.Two,{fontSize:"smaller"})})})]}),(0,s.jsxs)(l.Ng0,{pt:1,children:[a?(0,s.jsx)(l.xvT,{fontSize:"sm",mb:4,color:"gray.600",children:a}):null,r]}),o]})]})}},56358:function(e,t,a){"use strict";a.d(t,{q:function(){return l}});var s=a(24246);let l=(0,a(62051).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,s.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"})})},8133:function(e,t,a){"use strict";var s=a(24246),l=a(62051);t.Z=e=>{let{title:t,children:a,isOpen:i,onClose:n,showCloseButton:r=!1,modalContentProps:o,footer:d,...u}=e;return(0,s.jsxs)(l.u_l,{isOpen:i,onClose:n,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...u,children:[(0,s.jsx)(l.ZAr,{}),(0,s.jsxs)(l.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...o,children:[r&&(0,s.jsx)(l.olH,{}),(0,s.jsx)(l.xBx,{p:0,children:(0,s.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,s.jsx)(l.X6q,{as:"h3",size:"sm",children:t})})}),(0,s.jsx)(l.fef,{pb:4,overflow:"auto",children:a}),d&&(0,s.jsx)(l.mzw,{children:d})]})]})}},56026:function(e,t,a){"use strict";a.d(t,{QL:function(){return i},du:function(){return l},tz:function(){return s}});let s={name:{tooltip:"A UI-friendly label for the Dataset."},description:{tooltip:"A human-readable description of the Dataset."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to all collections in the Dataset."}},l={description:{tooltip:"A human-readable description of the collection."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to all fields in the collection."}},i={description:{tooltip:"A human-readable description of the field."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to this field."}}},91949:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return I}});var s=a(24246),l=a(92222),i=a(59003),n=a(62051),r=a(79894),o=a.n(r),d=a(86677),u=a(27378),c=a(16125),p=a(32885),f=a(46420);let h=e=>{let{resourceType:t,fidesKeys:a,skip:s}=e,[l,i]=(0,u.useState)(!0),n=(0,p.Wm)({resource_type:t,fides_keys:a},{skip:s,pollingInterval:l?3e3:void 0}),r=!!n.data&&n.data.every(e=>e.status===f.Wg.COMPLETE||e.status===f.Wg.FAILED||e.status===f.Wg.REVIEWED);return(0,u.useEffect)(()=>{r&&i(!1)},[r]),{...n,isClassificationFinished:r}};var m=a(25980),x=a(77213),y=a(77830),g=a(58754),b=a(14481),j=a(20386),C=a(79806),_=a(812),v=a(46628),w=a(8133),k=a(84306),S=a(66527),O=a(41207),z=a(39715),D=a(41966),P=e=>{let{data:t=[],isSubmitting:a=!1,onCancel:l,onSubmit:i,disabled:r,isLoading:o,onChange:d}=e,c=(0,u.useRef)(null),{errorAlert:p}=(0,k.V)(),f=t.length>0?S.ZP.dump(t):void 0,[h,m]=(0,u.useState)(void 0),[x,y]=(0,u.useState)(!1),[g,b]=(0,u.useState)(!f),{data:j}=(0,D.NR)(),[C,_]=(0,u.useState)([]),v=e=>{S.ZP.load(e,{json:!0}),m(void 0)},w=()=>{if(j&&j.length){let e=c.current.getValue();_(j.filter(t=>e.includes("fides_key: ".concat(t.fides_key,"\n"))).map(e=>e.fides_key))}},P=r||g||!x||!!h||a;return(0,s.jsxs)(n.kCb,{gap:"97px",children:[(0,s.jsxs)(n.gCW,{align:"stretch",w:"800px",children:[(0,s.jsx)(O.M,{defaultLanguage:"yaml",defaultValue:f,height:"calc(100vh - 526px)",onChange:e=>{try{y(!0),v(e),b(!e||""===e.trim());let t=S.ZP.load(e||"",{json:!0});Array.isArray(t)?d(t[0]):d(t),w()}catch(e){(0,O.F)(e)?m(e):p("Could not parse the supplied YAML")}},onMount:(e,t)=>{c.current=e,c.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!1},readOnly:r},theme:"light"}),C.length>0?(0,s.jsxs)(n.xvT,{children:["You are about to overwrite the dataset",C.length>1?"s":""," ",C.map((e,t)=>{let a=t===C.length-1;return(0,s.jsxs)(u.Fragment,{children:[(0,s.jsx)(n.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),a?".":", "]},e)})]}):null,(0,s.jsx)(n.mzw,{children:(0,s.jsxs)("div",{className:"flex w-full justify-end gap-4",children:[l&&(0,s.jsx)(n.wpx,{onClick:l,"data-testid":"cancel-btn",disabled:o,children:"Cancel"}),(0,s.jsx)(n.wpx,{type:"primary",onClick:()=>{null==i||i(),null==l||l()},"data-testid":"continue-btn",disabled:P,loading:a||o,children:"Confirm"})]})})]}),x&&(g||h)&&(0,s.jsx)(z.Z,{isEmptyState:g,yamlError:h})]})},E=e=>{let{isOpen:t,onClose:a,title:l,isLoading:i,returnFocusOnClose:r,isDatasetSelected:o,dataset:d,onChange:u,onSubmit:c}=e;return(0,s.jsx)(w.Z,{isOpen:t,onClose:a,size:"3xl",returnFocusOnClose:null==r||r,isCentered:!0,title:null!=l?l:"Edit Dataset",children:(0,s.jsx)(n.xuv,{"data-testid":"yaml-editor-section",children:(0,s.jsx)(P,{data:d?[d]:[],onSubmit:c,isSubmitting:!1,disabled:o,onChange:u,isLoading:i,onCancel:a})})})},T=a(34090),A=a(40324),R=a(56026);let V="edit-field-drawer";var M=e=>{var t,a;let{values:l,onSubmit:i}=e,r={name:null!==(t=l.name)&&void 0!==t?t:"",description:null!==(a=l.description)&&void 0!==a?a:"",data_categories:l.data_categories};return(0,s.jsx)(T.J9,{initialValues:r,onSubmit:e=>{i({...e,data_categories:l.data_categories||[]})},children:(0,s.jsx)(T.l0,{id:V,children:(0,s.jsxs)(n.Kqy,{spacing:"3",children:[(0,s.jsx)(A.j0,{name:"name",label:"Name",tooltip:R.tz.name.tooltip,"data-testid":"name-input",variant:"block"}),(0,s.jsx)(A.j0,{name:"description",label:"Description",tooltip:R.tz.description.tooltip,"data-testid":"description-input",variant:"block"})]})})})},H=e=>{let{dataset:t,isOpen:a,onClose:l}=e,[i,{isLoading:r}]=(0,j.TG)(),[o]=(0,j.QY)(),c=(0,d.useRouter)(),p=(0,n.pmc)(),{isOpen:f,onOpen:h,onClose:m}=(0,n.qY0)(),{isOpen:x,onOpen:y,onClose:g}=(0,n.qY0)(),[b,w]=(0,u.useState)(void 0),k=async e=>{let a={...t,...e};try{let e=await i(a);(0,_.D4)(e)?p((0,v.Vo)((0,_.e$)(e.error))):p((0,v.t5)("Successfully modified dataset"))}catch(e){p((0,v.Vo)(e))}l()},S=async()=>{let{fides_key:e}=t,a=await o(e);(0,_.D4)(a)?p((0,v.Vo)((0,_.e$)(a.error))):p((0,v.t5)("Successfully deleted dataset")),(0,j.Zl)(void 0),c.push("/dataset"),l(),m()};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(C.ZP,{isOpen:a,onClose:l,description:"A Dataset takes a database schema (tables and columns) and adds Fides privacy categorizations. Provide additional context to this dataset by filling out the fields below.",header:(0,s.jsx)(C.zR,{title:"Edit: ".concat(null==t?void 0:t.name)}),footer:(0,s.jsx)(C.Gn,{onClose:l,onDelete:h,onEditYaml:()=>y(),formId:V}),children:[(0,s.jsx)(E,{isOpen:x,onClose:g,onChange:w,onSubmit:()=>k(b),title:"Edit dataset YAML",isLoading:r,isDatasetSelected:!1,dataset:t}),(0,s.jsx)(M,{values:t,onSubmit:k})]}),(0,s.jsx)(n.cVQ,{isOpen:f,onClose:m,onConfirm:S,title:"Delete Dataset",message:(0,s.jsxs)(n.xvT,{children:["You are about to permanently delete the dataset named"," ",(0,s.jsx)(n.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name}),". Are you sure you would like to continue?"]})})]})};let L=(0,l.Cl)(),Z={items:[],total:0,page:1,size:25,pages:1},N=()=>(0,s.jsx)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,s.jsxs)(n.gCW,{children:[(0,s.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No datasets found."}),(0,s.jsx)(n.xvT,{fontSize:"sm",children:'Click "Create new dataset" to add your first dataset to Fides.'})]})});var I=()=>{let e=(0,c.I0)(),t=(0,d.useRouter)(),[a,r]=(0,u.useState)(!1),[p,C]=(0,u.useState)(),{PAGE_SIZES:_,pageSize:v,setPageSize:w,onPreviousPageClick:k,isPreviousPageDisabled:S,onNextPageClick:O,isNextPageDisabled:z,startRange:D,endRange:P,pageIndex:E,setTotalPages:T,resetPageIndexToDefault:A}=(0,b.oi)(),[R,V]=(0,u.useState)(),M=(0,u.useCallback)(e=>{A(),V(e)},[A,V]),{data:I,isLoading:F,isFetching:W}=(0,j.rt)({page:E,size:v,search:R,exclude_saas_datasets:!0}),{items:Y,total:G,pages:q}=(0,u.useMemo)(()=>null!=I?I:Z,[I]);(0,u.useEffect)(()=>{T(q)},[q,T]);let B=(0,u.useCallback)(a=>{e((0,j.Zl)(a.fides_key)),t.push({pathname:y.o5,query:{datasetId:encodeURIComponent(a.fides_key)}})},[e,t]),X=(0,m.hz)();h({resourceType:f.j.DATASETS,skip:!X.plus});let Q=(0,u.useMemo)(()=>[L.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(b.G3,{value:e.getValue(),fontWeight:"semibold"}),header:e=>(0,s.jsx)(b.Rr,{value:"Dataset Name",...e}),size:180}),L.accessor(e=>e.fides_key,{id:"fides_key",cell:e=>(0,s.jsx)(b.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(b.Rr,{value:"Fides Key",...e}),size:150}),L.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(b.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(b.Rr,{value:"Description",...e}),size:300,meta:{showHeaderMenu:!0}}),L.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e,a=t.original;return(0,s.jsx)(n.Ugi,{spacing:0,"data-testid":"dataset-".concat(a.fides_key),children:(0,s.jsx)(n.wpx,{size:"small",icon:(0,s.jsx)(n.dY8,{}),onClick:()=>{C(a),r(!0)},children:"Edit"})})},meta:{disableRowClick:!0}})].filter(Boolean),[]),U=(0,i.b7)({getCoreRowModel:(0,l.sC)(),getFilteredRowModel:(0,l.vL)(),getSortedRowModel:(0,l.tj)(),columns:Q,data:Y,columnResizeMode:"onChange"});return(0,s.jsx)(x.Z,{title:"Datasets",children:(0,s.jsxs)(n.xuv,{"data-testid":"system-management",children:[(0,s.jsx)(g.Z,{heading:"Datasets",breadcrumbItems:[{title:"All datasets"}],rightContent:(0,s.jsx)(o(),{href:"/dataset/new",passHref:!0,legacyBehavior:!0,children:(0,s.jsx)(n.wpx,{"data-testid":"create-dataset-btn",children:"+ Add dataset"})})}),F?(0,s.jsx)(b.I4,{rowHeight:36,numRows:15}):(0,s.jsxs)(n.xuv,{"data-testid":"dataset-table",children:[(0,s.jsx)(b.Q$,{children:(0,s.jsx)(b.HO,{globalFilter:R,setGlobalFilter:M,placeholder:"Search",testid:"dataset-search"})}),(0,s.jsx)(b.ZK,{tableInstance:U,emptyTableNotice:(0,s.jsx)(N,{}),onRowClick:B})]}),(0,s.jsx)(b.s8,{totalRows:G||0,pageSizes:_,setPageSize:w,onPreviousPageClick:k,isPreviousPageDisabled:S||W,onNextPageClick:O,isNextPageDisabled:z||W,startRange:D,endRange:P}),(0,s.jsx)(H,{dataset:p,isOpen:a,onClose:()=>{C(void 0),r(!1)}})]})})}},76737:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var a in t)Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}(t,{default:function(){return r},noSSR:function(){return n}});let s=a(51538);a(24246),a(27378);let l=s._(a(21887));function i(e){return{default:(null==e?void 0:e.default)||e}}function n(e,t){return delete t.webpack,delete t.modules,e(t)}function r(e,t){let a=l.default,s={loading:e=>{let{error:t,isLoading:a,pastDelay:s}=e;return null}};e instanceof Promise?s.loader=()=>e:"function"==typeof e?s.loader=e:"object"==typeof e&&(s={...s,...e});let r=(s={...s,...t}).loader;return(s.loadableGenerated&&(s={...s,...s.loadableGenerated},delete s.loadableGenerated),"boolean"!=typeof s.ssr||s.ssr)?a({...s,loader:()=>null!=r?r().then(i):Promise.resolve(i(()=>null))}):(delete s.webpack,delete s.modules,n(a,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,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return s}});let s=a(51538)._(a(27378)).default.createContext(null)},21887:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});let s=a(51538)._(a(27378)),l=a(28438),i=[],n=[],r=!1;function o(e){let t=e(),a={loading:!0,loaded:null,error:null};return a.promise=t.then(e=>(a.loading=!1,a.loaded=e,e)).catch(e=>{throw a.loading=!1,a.error=e,e}),a}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 a=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),i=null;function o(){if(!i){let t=new d(e,a);i={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return i.promise()}if(!r){let e=a.webpack?a.webpack():a.modules;e&&n.push(t=>{for(let a of e)if(t.includes(a))return o()})}function u(e,t){!function(){o();let e=s.default.useContext(l.LoadableContext);e&&Array.isArray(a.modules)&&a.modules.forEach(t=>{e(t)})}();let n=s.default.useSyncExternalStore(i.subscribe,i.getCurrentValue,i.getCurrentValue);return s.default.useImperativeHandle(t,()=>({retry:i.retry}),[]),s.default.useMemo(()=>{var t;return n.loading||n.error?s.default.createElement(a.loading,{isLoading:n.loading,pastDelay:n.pastDelay,timedOut:n.timedOut,error:n.error,retry:i.retry}):n.loaded?s.default.createElement((t=n.loaded)&&t.default?t.default:t,e):null},[e,n])}return u.preload=()=>o(),u.displayName="LoadableComponent",s.default.forwardRef(u)}(o,e)}function c(e,t){let a=[];for(;e.length;){let s=e.pop();a.push(s(t))}return Promise.all(a).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(i).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let a=()=>(r=!0,t());c(n,e).then(a,a)})),window.__NEXT_PRELOADREADY=u.preloadReady;let p=u},65218:function(e,t,a){e.exports=a(76737)}},function(e){e.O(0,[8033,6060,6527,7553,4481,5574,2888,9774,179],function(){return e(e.s=64902)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6446],{10463:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/datastore-connection/[id]",function(){return n(88228)}])},88228:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return w}});var i=n(24246),l=n(1226),s=n(62051),a=n(86677),r=n(27378),o=n(16134),c=n(14047),u=n(77830),d=n(20682),f=n(94725),h=n(7617),x=n(58754),p=n(11274),v=n(26788),j=n(38212),y=n(50881),m=n(41337),_=()=>{let e=(0,o.T)(),{connection:t,connectionOption:n}=(0,o.C)(d.ZZ),[l,a]=(0,r.useState)(void 0),c=(0,r.useMemo)(()=>()=>{let e=[];return(null==l?void 0:l.options)&&l.options.forEach(n=>{let l;switch(n){case v.H5.CONNECTOR_PARAMETERS:l={label:n,content:(0,i.jsx)(p.s,{})};break;case v.H5.DATASET_CONFIGURATION:l=(null==t?void 0:t.key)?{label:n,content:(0,i.jsx)(j.Z,{})}:void 0;break;case v.H5.DSR_CUSTOMIZATION:l=(null==t?void 0:t.key)?{label:n,content:(0,i.jsx)(y.Z,{})}:void 0}l&&e.push(l)}),e},[null==t?void 0:t.key,null==l?void 0:l.options]);return(0,r.useEffect)(()=>{if(n){let t=v.IM.find(e=>e.type===(null==n?void 0:n.type));t&&(a(t),e((0,d.nj)(v.Ss[2])))}return()=>{e((0,d.mc)())}},[n,e]),t&&n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.Z,{heading:"Connection manager",breadcrumbItems:[{title:"All connections",href:u.JR},{title:t.name}]}),(0,i.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",maxHeight:"40px",mb:"4px",whiteSpace:"nowrap",children:(0,i.jsxs)(s.xuv,{alignItems:"center",display:"flex",children:[(0,i.jsx)(m.Z,{data:n}),(0,i.jsx)(s.xvT,{ml:"8px",children:t.name})]})}),(0,i.jsx)(s.gCW,{alignItems:"stretch",flex:"1",gap:"18px",children:(0,i.jsx)(h.Z,{data:c(),flexGrow:1,isLazy:!0})})]}):null},g=n(46420),w=()=>{let e=(0,o.T)(),t=(0,a.useRouter)(),{id:n}=t.query,{errorAlert:h}=(0,c.V)(),x=(0,o.C)(d.y_),[p,v]=(0,r.useState)(!0),j=(e,t)=>t.find(t=>{var n;return t.identifier===e.connection_type&&t.identifier!==g.Rj.SAAS||t.identifier===(null===(n=e.saas_config)||void 0===n?void 0:n.type)});return(0,r.useEffect)(()=>{let i=()=>{h("An error occurred while loading ".concat(t.query.id)),t.push(u.JR,void 0,{shallow:!0})},l=async t=>{try{let n=[];n.push(e(f.DM.endpoints.getDatastoreConnectionByKey.initiate(t))),0===x.length&&n.push(e(d.d8.endpoints.getAllConnectionTypes.initiate({search:""})));let l=await Promise.allSettled(n);if(l.every(e=>"fulfilled"===e.status)){e((0,d.lm)(l[0].value.data));let t=[...l[1]?l[1].value.data.items:x],n=j(l[0].value.data,t);e((0,d.yA)(n)),v(!1)}else i()}catch(e){i()}};return n&&l(n),()=>{}},[n]),(0,i.jsxs)(i.Fragment,{children:[p&&(0,i.jsx)(s.xuv,{display:"flex",h:"100vh",justifyContent:"center",children:(0,i.jsx)(s.M5Y,{children:(0,i.jsx)(s.$jN,{})})}),!p&&(0,i.jsx)(l.Z,{children:(0,i.jsx)(_,{})})]})}}},function(e){e.O(0,[6527,
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6446],{10463:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/datastore-connection/[id]",function(){return n(88228)}])},88228:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return w}});var i=n(24246),l=n(1226),s=n(62051),a=n(86677),r=n(27378),o=n(16134),c=n(14047),u=n(77830),d=n(20682),f=n(94725),h=n(7617),x=n(58754),p=n(11274),v=n(26788),j=n(38212),y=n(50881),m=n(41337),_=()=>{let e=(0,o.T)(),{connection:t,connectionOption:n}=(0,o.C)(d.ZZ),[l,a]=(0,r.useState)(void 0),c=(0,r.useMemo)(()=>()=>{let e=[];return(null==l?void 0:l.options)&&l.options.forEach(n=>{let l;switch(n){case v.H5.CONNECTOR_PARAMETERS:l={label:n,content:(0,i.jsx)(p.s,{})};break;case v.H5.DATASET_CONFIGURATION:l=(null==t?void 0:t.key)?{label:n,content:(0,i.jsx)(j.Z,{})}:void 0;break;case v.H5.DSR_CUSTOMIZATION:l=(null==t?void 0:t.key)?{label:n,content:(0,i.jsx)(y.Z,{})}:void 0}l&&e.push(l)}),e},[null==t?void 0:t.key,null==l?void 0:l.options]);return(0,r.useEffect)(()=>{if(n){let t=v.IM.find(e=>e.type===(null==n?void 0:n.type));t&&(a(t),e((0,d.nj)(v.Ss[2])))}return()=>{e((0,d.mc)())}},[n,e]),t&&n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.Z,{heading:"Connection manager",breadcrumbItems:[{title:"All connections",href:u.JR},{title:t.name}]}),(0,i.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",maxHeight:"40px",mb:"4px",whiteSpace:"nowrap",children:(0,i.jsxs)(s.xuv,{alignItems:"center",display:"flex",children:[(0,i.jsx)(m.Z,{data:n}),(0,i.jsx)(s.xvT,{ml:"8px",children:t.name})]})}),(0,i.jsx)(s.gCW,{alignItems:"stretch",flex:"1",gap:"18px",children:(0,i.jsx)(h.Z,{data:c(),flexGrow:1,isLazy:!0})})]}):null},g=n(46420),w=()=>{let e=(0,o.T)(),t=(0,a.useRouter)(),{id:n}=t.query,{errorAlert:h}=(0,c.V)(),x=(0,o.C)(d.y_),[p,v]=(0,r.useState)(!0),j=(e,t)=>t.find(t=>{var n;return t.identifier===e.connection_type&&t.identifier!==g.Rj.SAAS||t.identifier===(null===(n=e.saas_config)||void 0===n?void 0:n.type)});return(0,r.useEffect)(()=>{let i=()=>{h("An error occurred while loading ".concat(t.query.id)),t.push(u.JR,void 0,{shallow:!0})},l=async t=>{try{let n=[];n.push(e(f.DM.endpoints.getDatastoreConnectionByKey.initiate(t))),0===x.length&&n.push(e(d.d8.endpoints.getAllConnectionTypes.initiate({search:""})));let l=await Promise.allSettled(n);if(l.every(e=>"fulfilled"===e.status)){e((0,d.lm)(l[0].value.data));let t=[...l[1]?l[1].value.data.items:x],n=j(l[0].value.data,t);e((0,d.yA)(n)),v(!1)}else i()}catch(e){i()}};return n&&l(n),()=>{}},[n]),(0,i.jsxs)(i.Fragment,{children:[p&&(0,i.jsx)(s.xuv,{display:"flex",h:"100vh",justifyContent:"center",children:(0,i.jsx)(s.M5Y,{children:(0,i.jsx)(s.$jN,{})})}),!p&&(0,i.jsx)(l.Z,{children:(0,i.jsx)(_,{})})]})}}},function(e){e.O(0,[2858,699,6527,2430,5574,9767,2888,9774,179],function(){return e(e.s=10463)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6050],{91747:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/datastore-connection/new",function(){return n(7936)}])},19904:function(e,t,n){"use strict";n.d(t,{Tg:function(){return a}});var i=n(24246),l=n(16134),r=n(31793);let a=e=>(0,l.C)(r.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,i.jsx)(i.Fragment,{children:n}):null}},96718:function(e,t,n){"use strict";n.d(t,{z:function(){return r}});var i=n(24246),l=n(62051);let r=e=>{let{...t}=e,n="multiple"===t.mode;return(0,i.jsx)(l.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,dropdownStyle:n?void 0:{width:"auto",minWidth:"200px"},className:"w-auto","data-testid":"filter-select",...t})}},44553:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var i=n(24246),l=n(62051),r=n(27378),a=n(45277),s=n(16125),o=n(812),c=n(46628),d=n(20682),u=n(54427),p=n(52253),x=n(78780);let{reducer:h}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:f}=x.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let t=new FormData;return t.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:t}},invalidatesTags:()=>["Connection Type"]})})});var m=e=>{let{isOpen:t,onClose:n,testId:u="connector-template-modal"}=e,p=(0,s.I0)(),[x,h]=(0,r.useState)(null),m=(0,l.pmc)(),{getRootProps:y,getInputProps:j,isDragActive:g}=(0,a.uI)({onDrop:e=>{var t;if("zip"!==(null===(t=e[0].name.split(".").pop())||void 0===t?void 0:t.toLowerCase())){m((0,c.Vo)("Only zip files are allowed."));return}h(e[0])}}),[v,{isLoading:C}]=f(),{refetch:b}=(0,d.$I)({search:""},{skip:!1}),w=async()=>{if(x)try{var e;await v(x).unwrap(),m((0,c.t5)("Integration template uploaded successfully."));let{data:t}=await b();p((0,d.fP)(null!==(e=null==t?void 0:t.items)&&void 0!==e?e:[])),n()}catch(e){m((0,c.Vo)((0,o.e$)(e)))}finally{h(null)}};return(0,i.jsxs)(l.u_l,{isOpen:t,onClose:n,size:"2xl",children:[(0,i.jsx)(l.ZAr,{}),(0,i.jsxs)(l.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,i.jsx)(l.xBx,{children:"Upload integration template"}),(0,i.jsxs)(l.fef,{children:[(0,i.jsx)(l.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,i.jsxs)(l.xuv,{...y(),bg:g?"gray.100":"gray.50",border:"2px dashed",borderColor:g?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,i.jsx)("input",{...j()}),x?(0,i.jsx)(l.xvT,{children:x.name}):g?(0,i.jsx)(l.xvT,{children:"Drop the file here..."}):(0,i.jsx)(l.xvT,{children:"Click or drag and drop your file here."})]}),(0,i.jsx)(l.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,i.jsxs)(l.mzw,{className:"flex w-full justify-end gap-2",children:[(0,i.jsx)(l.wpx,{onClick:n,"data-testid":"cancel-btn",disabled:C,children:"Cancel"}),(0,i.jsx)(l.wpx,{type:"primary",htmlType:"submit",disabled:!x||C,onClick:w,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},7936:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return R}});var i=n(24246),l=n(96356),r=n(41337),a=n(62051),s=n(86677),o=n(27378),c=n(16125),d=n(16134),u=n(77830),p=n(58754),x=n(16394),h=n(19904),f=n(44553),m=n(46420),y=n(96718),j=n(26788),g=()=>{let e=(0,c.I0)(),t=(0,o.useRef)(!1);(0,o.useEffect)(()=>(t.current=!0,()=>{e((0,l.zq)(j.gA)),t.current=!1}),[e]);let n=(0,o.useRef)([...j.yI].map(e=>{let[t,n]=e;return{value:null==n?void 0:n.value,label:t}}));return(0,i.jsx)(y.z,{allowClear:!1,options:n.current,onChange:t=>{e((0,l.zq)(t||j.gA))},defaultValue:"","data-testid":"connection-type-filter"})},v=n(79894),C=n.n(v),b=e=>{let{items:t}=e;return(0,i.jsx)(a.MIq,{columns:4,spacingX:"16px",spacingY:"16px",children:t.map(e=>(0,i.jsx)(C(),{href:{pathname:window.location.pathname,query:{step:2,connectorType:JSON.stringify(e)}},children:(0,i.jsx)(a.xuv,{boxShadow:"base",borderRadius:"5px",maxWidth:"331px",overflow:"hidden",_hover:{boxShadow:"lg",cursor:"pointer"},"data-testid":"".concat(e.identifier,"-item"),children:(0,i.jsxs)(a.kCb,{alignItems:"center",justifyContent:"start",pl:"24px",pr:"24px",color:"gray.700",fontSize:"14px",fontStyle:"normal",fontWeight:"600",lineHeight:"20px",h:"80px",children:[(0,i.jsx)(r.Z,{data:e}),(0,i.jsx)(a.xvT,{ml:"12px",children:e.human_readable})]})})},e.identifier))})},w=()=>{let e=(0,c.I0)(),t=(0,o.useRef)(!1),{step:n}=(0,d.C)(l.ZZ),r=(0,d.C)(l.pw),{data:s,isFetching:u,isLoading:p,isSuccess:y}=(0,l.$I)(r),[j,v]=(0,o.useState)(!1),C=(0,o.useCallback)(t=>{(0===t.target.value.length||t.target.value.length>1)&&e((0,l.qP)(t.target.value))},[e]),w=(0,o.useMemo)(()=>(0,x.Ds)(C,250),[C]),T=(0,o.useMemo)(()=>(null==s?void 0:s.items)&&[...s.items].sort((e,t)=>e.human_readable>t.human_readable?1:-1),[s]);return(0,o.useEffect)(()=>(t.current=!0,()=>{e((0,l.qP)("")),t.current=!1}),[e]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.kCb,{minWidth:"fit-content",children:(0,i.jsx)(a.xuv,{color:"gray.700",fontSize:"14px",maxHeight:"80px",maxWidth:"474px",mb:"24px",children:n.description})}),(0,i.jsxs)(a.kCb,{alignItems:"center",gap:"4",mb:"24px",minWidth:"fit-content",children:[(0,i.jsx)(g,{}),(0,i.jsxs)(a.BZy,{size:"sm",children:[(0,i.jsx)(a.Z8_,{pointerEvents:"none",children:(0,i.jsx)(a.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,i.jsx)(a.IIB,{autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:w,placeholder:"Search integrations",size:"sm",type:"search"})]}),(0,i.jsx)(h.ZP,{scopes:[m.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,i.jsx)(a.wpx,{onClick:()=>{v(!0)},type:"primary",htmlType:"submit","data-testid":"upload-btn",children:"Upload connector"})})]}),(0,i.jsx)(f.Z,{isOpen:j,onClose:()=>v(!1)}),(u||p)&&(0,i.jsx)(a.M5Y,{children:(0,i.jsx)(a.$jN,{})}),y&&T?(0,i.jsx)(b,{items:T}):null]})},T=n(7617),S=n(11274),I=n(38212),k=n(50881),N=()=>{let e=(0,c.I0)(),t=(0,o.useRef)(!1),[n,r]=(0,o.useState)(!1),{connection:s,connectionOption:u}=(0,d.C)(l.ZZ),p=j.IM.find(e=>e.type===(null==u?void 0:u.type)),[x,h]=(0,o.useState)(null==p?void 0:p.options[0]),f=()=>{r(!0)},y=(0,o.useMemo)(()=>()=>{let e=[];return(null==p?void 0:p.options)&&p.options.forEach(t=>{let n;switch(t){case j.H5.CONNECTOR_PARAMETERS:n={label:t,content:(0,i.jsx)(S.s,{onConnectionCreated:f})};break;case j.H5.DATASET_CONFIGURATION:n=(null==s?void 0:s.key)?{label:t,content:(0,i.jsx)(I.Z,{})}:void 0;break;case j.H5.DSR_CUSTOMIZATION:n=(null==s?void 0:s.key)?{label:t,content:(0,i.jsx)(k.Z,{})}:void 0}n&&e.push(n)}),e},[null==s?void 0:s.key,null==p?void 0:p.options]),g=(0,o.useCallback)(t=>{switch(t){case j.H5.DATASET_CONFIGURATION:case j.H5.DSR_CUSTOMIZATION:e((0,l.nj)(j.Ss[3]));break;case j.H5.CONNECTOR_PARAMETERS:default:e((0,l.nj)(j.Ss[2]))}h(t)},[e]);return(0,o.useEffect)(()=>(t.current=!0,()=>{t.current=!1,e((0,l.mc)())}),[e]),(0,o.useEffect)(()=>{(null==s?void 0:s.key)&&(g((null==u?void 0:u.type)!==m.Zi.MANUAL?j.H5.DATASET_CONFIGURATION:j.H5.DSR_CUSTOMIZATION),n&&r(!1))},[n,null==s?void 0:s.key,null==u?void 0:u.type,null==p?void 0:p.options,g]),(0,i.jsx)(a.gCW,{alignItems:"stretch",gap:"18px",children:(0,i.jsx)(T.Z,{data:y(),flexGrow:1,index:null==p?void 0:p.options.findIndex(e=>e===x),isLazy:!0})})};let _=(e,t)=>{let n="".concat(window.location.origin+t,"&key=").concat(e);window.location.href.toLowerCase()!==n.toLowerCase()&&window.history.replaceState(null,"",n)},{Title:A}=a.AntTypography;var E=()=>{let e=(0,c.I0)(),t=(0,s.useRouter)(),{connectorType:n,step:x}=t.query,{connection:h,connectionOption:f,step:m}=(0,d.C)(l.ZZ);(0,o.useEffect)(()=>{if(n&&e((0,l.yA)(JSON.parse(n))),t.query.step){let t=j.Ss.find(e=>e.stepId===Number(x));e((0,l.nj)(t||j.Ss[1]))}return!t.query.id&&(null==h?void 0:h.key)&&_(h.key,m.href),()=>{}},[null==h?void 0:h.key,n,x,e,t.query.id,t.query.step,m.href]);let y=(0,o.useCallback)(e=>{let t="";switch(e.stepId){case 2:case 3:t=e.label.replace("{identifier}",f.human_readable);break;default:t=e.label}return t},[f]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.Z,{heading:"Connections",breadcrumbItems:[{title:"Unlinked connections",href:u.JR},{title:"New connection"}],children:(0,i.jsx)(A,{level:3,style:{marginBottom:0},className:"mt-4",children:f?(0,i.jsxs)(a.vyj,{children:[(0,i.jsx)(r.Z,{data:f}),y(m)]}):y(m)})}),(()=>{switch(m.stepId){case 1:default:return(0,i.jsx)(w,{});case 2:case 3:return(0,i.jsx)(N,{})}})()]})},O=n(1226),R=()=>(0,i.jsx)(O.Z,{children:(0,i.jsx)(E,{})})}},function(e){e.O(0,[6527,5277,
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6050],{91747:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/datastore-connection/new",function(){return n(7936)}])},19904:function(e,t,n){"use strict";n.d(t,{Tg:function(){return a}});var i=n(24246),l=n(16134),r=n(31793);let a=e=>(0,l.C)(r.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,i.jsx)(i.Fragment,{children:n}):null}},96718:function(e,t,n){"use strict";n.d(t,{z:function(){return r}});var i=n(24246),l=n(62051);let r=e=>{let{...t}=e,n="multiple"===t.mode;return(0,i.jsx)(l.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,dropdownStyle:n?void 0:{width:"auto",minWidth:"200px"},className:"w-auto","data-testid":"filter-select",...t})}},44553:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var i=n(24246),l=n(62051),r=n(27378),a=n(45277),s=n(16125),o=n(812),c=n(46628),d=n(20682),u=n(54427),p=n(52253),x=n(78780);let{reducer:h}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:f}=x.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let t=new FormData;return t.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:t}},invalidatesTags:()=>["Connection Type"]})})});var m=e=>{let{isOpen:t,onClose:n,testId:u="connector-template-modal"}=e,p=(0,s.I0)(),[x,h]=(0,r.useState)(null),m=(0,l.pmc)(),{getRootProps:y,getInputProps:j,isDragActive:g}=(0,a.uI)({onDrop:e=>{var t;if("zip"!==(null===(t=e[0].name.split(".").pop())||void 0===t?void 0:t.toLowerCase())){m((0,c.Vo)("Only zip files are allowed."));return}h(e[0])}}),[v,{isLoading:C}]=f(),{refetch:b}=(0,d.$I)({search:""},{skip:!1}),w=async()=>{if(x)try{var e;await v(x).unwrap(),m((0,c.t5)("Integration template uploaded successfully."));let{data:t}=await b();p((0,d.fP)(null!==(e=null==t?void 0:t.items)&&void 0!==e?e:[])),n()}catch(e){m((0,c.Vo)((0,o.e$)(e)))}finally{h(null)}};return(0,i.jsxs)(l.u_l,{isOpen:t,onClose:n,size:"2xl",children:[(0,i.jsx)(l.ZAr,{}),(0,i.jsxs)(l.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,i.jsx)(l.xBx,{children:"Upload integration template"}),(0,i.jsxs)(l.fef,{children:[(0,i.jsx)(l.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,i.jsxs)(l.xuv,{...y(),bg:g?"gray.100":"gray.50",border:"2px dashed",borderColor:g?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,i.jsx)("input",{...j()}),x?(0,i.jsx)(l.xvT,{children:x.name}):g?(0,i.jsx)(l.xvT,{children:"Drop the file here..."}):(0,i.jsx)(l.xvT,{children:"Click or drag and drop your file here."})]}),(0,i.jsx)(l.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,i.jsxs)(l.mzw,{className:"flex w-full justify-end gap-2",children:[(0,i.jsx)(l.wpx,{onClick:n,"data-testid":"cancel-btn",disabled:C,children:"Cancel"}),(0,i.jsx)(l.wpx,{type:"primary",htmlType:"submit",disabled:!x||C,onClick:w,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},7936:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return R}});var i=n(24246),l=n(96356),r=n(41337),a=n(62051),s=n(86677),o=n(27378),c=n(16125),d=n(16134),u=n(77830),p=n(58754),x=n(16394),h=n(19904),f=n(44553),m=n(46420),y=n(96718),j=n(26788),g=()=>{let e=(0,c.I0)(),t=(0,o.useRef)(!1);(0,o.useEffect)(()=>(t.current=!0,()=>{e((0,l.zq)(j.gA)),t.current=!1}),[e]);let n=(0,o.useRef)([...j.yI].map(e=>{let[t,n]=e;return{value:null==n?void 0:n.value,label:t}}));return(0,i.jsx)(y.z,{allowClear:!1,options:n.current,onChange:t=>{e((0,l.zq)(t||j.gA))},defaultValue:"","data-testid":"connection-type-filter"})},v=n(79894),C=n.n(v),b=e=>{let{items:t}=e;return(0,i.jsx)(a.MIq,{columns:4,spacingX:"16px",spacingY:"16px",children:t.map(e=>(0,i.jsx)(C(),{href:{pathname:window.location.pathname,query:{step:2,connectorType:JSON.stringify(e)}},children:(0,i.jsx)(a.xuv,{boxShadow:"base",borderRadius:"5px",maxWidth:"331px",overflow:"hidden",_hover:{boxShadow:"lg",cursor:"pointer"},"data-testid":"".concat(e.identifier,"-item"),children:(0,i.jsxs)(a.kCb,{alignItems:"center",justifyContent:"start",pl:"24px",pr:"24px",color:"gray.700",fontSize:"14px",fontStyle:"normal",fontWeight:"600",lineHeight:"20px",h:"80px",children:[(0,i.jsx)(r.Z,{data:e}),(0,i.jsx)(a.xvT,{ml:"12px",children:e.human_readable})]})})},e.identifier))})},w=()=>{let e=(0,c.I0)(),t=(0,o.useRef)(!1),{step:n}=(0,d.C)(l.ZZ),r=(0,d.C)(l.pw),{data:s,isFetching:u,isLoading:p,isSuccess:y}=(0,l.$I)(r),[j,v]=(0,o.useState)(!1),C=(0,o.useCallback)(t=>{(0===t.target.value.length||t.target.value.length>1)&&e((0,l.qP)(t.target.value))},[e]),w=(0,o.useMemo)(()=>(0,x.Ds)(C,250),[C]),T=(0,o.useMemo)(()=>(null==s?void 0:s.items)&&[...s.items].sort((e,t)=>e.human_readable>t.human_readable?1:-1),[s]);return(0,o.useEffect)(()=>(t.current=!0,()=>{e((0,l.qP)("")),t.current=!1}),[e]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.kCb,{minWidth:"fit-content",children:(0,i.jsx)(a.xuv,{color:"gray.700",fontSize:"14px",maxHeight:"80px",maxWidth:"474px",mb:"24px",children:n.description})}),(0,i.jsxs)(a.kCb,{alignItems:"center",gap:"4",mb:"24px",minWidth:"fit-content",children:[(0,i.jsx)(g,{}),(0,i.jsxs)(a.BZy,{size:"sm",children:[(0,i.jsx)(a.Z8_,{pointerEvents:"none",children:(0,i.jsx)(a.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,i.jsx)(a.IIB,{autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:w,placeholder:"Search integrations",size:"sm",type:"search"})]}),(0,i.jsx)(h.ZP,{scopes:[m.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,i.jsx)(a.wpx,{onClick:()=>{v(!0)},type:"primary",htmlType:"submit","data-testid":"upload-btn",children:"Upload connector"})})]}),(0,i.jsx)(f.Z,{isOpen:j,onClose:()=>v(!1)}),(u||p)&&(0,i.jsx)(a.M5Y,{children:(0,i.jsx)(a.$jN,{})}),y&&T?(0,i.jsx)(b,{items:T}):null]})},T=n(7617),S=n(11274),I=n(38212),k=n(50881),N=()=>{let e=(0,c.I0)(),t=(0,o.useRef)(!1),[n,r]=(0,o.useState)(!1),{connection:s,connectionOption:u}=(0,d.C)(l.ZZ),p=j.IM.find(e=>e.type===(null==u?void 0:u.type)),[x,h]=(0,o.useState)(null==p?void 0:p.options[0]),f=()=>{r(!0)},y=(0,o.useMemo)(()=>()=>{let e=[];return(null==p?void 0:p.options)&&p.options.forEach(t=>{let n;switch(t){case j.H5.CONNECTOR_PARAMETERS:n={label:t,content:(0,i.jsx)(S.s,{onConnectionCreated:f})};break;case j.H5.DATASET_CONFIGURATION:n=(null==s?void 0:s.key)?{label:t,content:(0,i.jsx)(I.Z,{})}:void 0;break;case j.H5.DSR_CUSTOMIZATION:n=(null==s?void 0:s.key)?{label:t,content:(0,i.jsx)(k.Z,{})}:void 0}n&&e.push(n)}),e},[null==s?void 0:s.key,null==p?void 0:p.options]),g=(0,o.useCallback)(t=>{switch(t){case j.H5.DATASET_CONFIGURATION:case j.H5.DSR_CUSTOMIZATION:e((0,l.nj)(j.Ss[3]));break;case j.H5.CONNECTOR_PARAMETERS:default:e((0,l.nj)(j.Ss[2]))}h(t)},[e]);return(0,o.useEffect)(()=>(t.current=!0,()=>{t.current=!1,e((0,l.mc)())}),[e]),(0,o.useEffect)(()=>{(null==s?void 0:s.key)&&(g((null==u?void 0:u.type)!==m.Zi.MANUAL?j.H5.DATASET_CONFIGURATION:j.H5.DSR_CUSTOMIZATION),n&&r(!1))},[n,null==s?void 0:s.key,null==u?void 0:u.type,null==p?void 0:p.options,g]),(0,i.jsx)(a.gCW,{alignItems:"stretch",gap:"18px",children:(0,i.jsx)(T.Z,{data:y(),flexGrow:1,index:null==p?void 0:p.options.findIndex(e=>e===x),isLazy:!0})})};let _=(e,t)=>{let n="".concat(window.location.origin+t,"&key=").concat(e);window.location.href.toLowerCase()!==n.toLowerCase()&&window.history.replaceState(null,"",n)},{Title:A}=a.AntTypography;var E=()=>{let e=(0,c.I0)(),t=(0,s.useRouter)(),{connectorType:n,step:x}=t.query,{connection:h,connectionOption:f,step:m}=(0,d.C)(l.ZZ);(0,o.useEffect)(()=>{if(n&&e((0,l.yA)(JSON.parse(n))),t.query.step){let t=j.Ss.find(e=>e.stepId===Number(x));e((0,l.nj)(t||j.Ss[1]))}return!t.query.id&&(null==h?void 0:h.key)&&_(h.key,m.href),()=>{}},[null==h?void 0:h.key,n,x,e,t.query.id,t.query.step,m.href]);let y=(0,o.useCallback)(e=>{let t="";switch(e.stepId){case 2:case 3:t=e.label.replace("{identifier}",f.human_readable);break;default:t=e.label}return t},[f]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.Z,{heading:"Connections",breadcrumbItems:[{title:"Unlinked connections",href:u.JR},{title:"New connection"}],children:(0,i.jsx)(A,{level:3,style:{marginBottom:0},className:"mt-4",children:f?(0,i.jsxs)(a.vyj,{children:[(0,i.jsx)(r.Z,{data:f}),y(m)]}):y(m)})}),(()=>{switch(m.stepId){case 1:default:return(0,i.jsx)(w,{});case 2:case 3:return(0,i.jsx)(N,{})}})()]})},O=n(1226),R=()=>(0,i.jsx)(O.Z,{children:(0,i.jsx)(E,{})})}},function(e){e.O(0,[2858,699,6527,5277,2430,5574,9767,2888,9774,179],function(){return e(e.s=91747)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8740],{17094:function(n,u,_){(window.__NEXT_P=window.__NEXT_P||[]).push(["/fides-js-docs",function(){return _(73536)}])},73536:function(n,u,_){"use strict";_.r(u),_.d(u,{__N_SSG:function(){return t}});var i=_(24246);_(66586);var s=_(88653),t=!0;u.default=()=>(0,i.jsx)(s.Z,{url:"/api/openapi.json"})}},function(n){n.O(0,[4270,4917,2858,2866,9278,6527,
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8740],{17094:function(n,u,_){(window.__NEXT_P=window.__NEXT_P||[]).push(["/fides-js-docs",function(){return _(73536)}])},73536:function(n,u,_){"use strict";_.r(u),_.d(u,{__N_SSG:function(){return t}});var i=_(24246);_(66586);var s=_(88653),t=!0;u.default=()=>(0,i.jsx)(s.Z,{url:"/api/openapi.json"})}},function(n){n.O(0,[4270,4917,2858,2866,9278,699,6527,2599,905,2888,9774,179],function(){return n(n.s=17094)}),_N_E=n.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1500],{50697:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations/[id]",function(){return i(13636)}])},7617:function(e,t,i){"use strict";i.d(t,{q:function(){return o}});var n=i(24246),a=i(62051);let o=e=>{let{label:t,isDisabled:i,...o}=e;return(0,n.jsx)(a.OK9,{"data-testid":"tab-".concat(t),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:o.fontSize,fontWeight:"500",color:"gray.500",isDisabled:i||!1,children:t})};t.Z=e=>{let{data:t,border:i="partial",...l}=e;return(0,n.jsxs)(a.mQc,{colorScheme:"complimentary",...l,children:[(0,n.jsx)(a.tdY,{width:"partial"===i?"max-content":void 0,children:t.map(e=>(0,n.jsx)(o,{label:e.label,isDisabled:e.isDisabled,fontSize:l.fontSize},e.label))}),(0,n.jsx)(a.nPR,{children:t.map(e=>(0,n.jsx)(a.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},67991:function(e,t,i){"use strict";i.d(t,{Od:function(){return o},QZ:function(){return a}});var n=i(27378);let a=e=>{let{items:t,selected:i,onChange:n}=e,a=t.every(e=>i.includes(e.id))&&!!t.length;return{allSelected:a,someSelected:t.some(e=>i.includes(e.id))&&!!t.length,handleToggleAll:()=>{a?n([]):n(t.map(e=>e.id))},handleToggleSelection:e=>{i.includes(e)?n(i.filter(t=>t!==e)):n([...i,e])}}},o=e=>{let{initialSelected:t,initialExcluded:i,initialAllSelected:a,itemCount:o}=e,[l,r]=(0,n.useState)(t),[s,d]=(0,n.useState)(i),[c,u]=(0,n.useState)(a||l.length===o),_=!!l.length||!!s.length;return{selected:l,excluded:s,allSelected:c,someSelected:_,handleToggleAll:()=>{c?(d([]),s.length||u(!1)):(r([]),u(!0))},handleToggleItemSelected:e=>{if(c)d(s.includes(e)?s.filter(t=>t!==e):[...s,e]);else{let t=l.includes(e)?l.filter(t=>t!==e):[...l,e];r(t),t.length===o&&u(!0)}}}}},90111:function(e,t,i){"use strict";var n=i(24246),a=i(62051);t.Z=e=>{let{children:t,...i}=e;return(0,n.jsx)(a.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...i,children:t})}},8411:function(e,t,i){"use strict";i.d(t,{NA:function(){return o},Z8:function(){return a}});var n=i(46420);let a={[n._F.ER]:"Eritrea",[n._F.DJ]:"Djibouti",[n._F.MR]:"Mauritania",[n._F.NA]:"Namibia",[n._F.GH]:"Ghana",[n._F.SS]:"South Sudan",[n._F.SC]:"Seychelles",[n._F.IO]:"British Indian Ocean Territory",[n._F.GQ]:"Equatorial Guinea",[n._F.AO]:"Angola",[n._F.CG]:"Republic of the Congo",[n._F.BW]:"Botswana",[n._F.BI]:"Burundi",[n._F.DZ]:"Algeria",[n._F.TD]:"Chad",[n._F.NG]:"Nigeria",[n._F.TZ]:"Tanzania",[n._F.EH]:"Western Sahara",[n._F.SN]:"Senegal",[n._F.LR]:"Liberia",[n._F.ZA]:"South Africa",[n._F.CV]:"Cape Verde",[n._F.GM]:"Gambia",[n._F.SD]:"Sudan",[n._F.KM]:"Comoros",[n._F.SZ]:"Eswatini",[n._F.UG]:"Uganda",[n._F.MG]:"Madagascar",[n._F.RW]:"Rwanda",[n._F.CD]:"DR Congo",[n._F.CM]:"Cameroon",[n._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[n._F.TG]:"Togo",[n._F.MU]:"Mauritius",[n._F.NE]:"Niger",[n._F.BJ]:"Benin",[n._F.EG]:"Egypt",[n._F.LS]:"Lesotho",[n._F.ET]:"Ethiopia",[n._F.MA]:"Morocco",[n._F.YT]:"Mayotte",[n._F.BF]:"Burkina Faso",[n._F.RE]:"R\xe9union",[n._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[n._F.CF]:"Central African Republic",[n._F.MZ]:"Mozambique",[n._F.MW]:"Malawi",[n._F.ML]:"Mali",[n._F.ZM]:"Zambia",[n._F.LY]:"Libya",[n._F.GW]:"Guinea-Bissau",[n._F.SO]:"Somalia",[n._F.KE]:"Kenya",[n._F.GN]:"Guinea",[n._F.ZW]:"Zimbabwe",[n._F.TN]:"Tunisia",[n._F.SL]:"Sierra Leone",[n._F.GA]:"Gabon",[n._F.CI]:"Ivory Coast",[n._F.JO]:"Jordan",[n._F.PK]:"Pakistan",[n._F.KP]:"North Korea",[n._F.MO]:"Macau",[n._F.AM]:"Armenia",[n._F.SY]:"Syria",[n._F.TJ]:"Tajikistan",[n._F.SA]:"Saudi Arabia",[n._F.KR]:"South Korea",[n._F.NP]:"Nepal",[n._F.PH]:"Philippines",[n._F.IQ]:"Iraq",[n._F.LB]:"Lebanon",[n._F.MN]:"Mongolia",[n._F.PS]:"Palestine",[n._F.YE]:"Yemen",[n._F.JP]:"Japan",[n._F.KZ]:"Kazakhstan",[n._F.LK]:"Sri Lanka",[n._F.MM]:"Myanmar",[n._F.KG]:"Kyrgyzstan",[n._F.CN]:"China",[n._F.AF]:"Afghanistan",[n._F.OM]:"Oman",[n._F.IN]:"India",[n._F.LA]:"Laos",[n._F.UZ]:"Uzbekistan",[n._F.MV]:"Maldives",[n._F.ID]:"Indonesia",[n._F.VN]:"Vietnam",[n._F.MY]:"Malaysia",[n._F.TW]:"Taiwan",[n._F.KH]:"Cambodia",[n._F.AE]:"United Arab Emirates",[n._F.HK]:"Hong Kong",[n._F.GE]:"Georgia (Country)",[n._F.BD]:"Bangladesh",[n._F.KW]:"Kuwait",[n._F.TM]:"Turkmenistan",[n._F.QA]:"Qatar",[n._F.BH]:"Bahrain",[n._F.BN]:"Brunei",[n._F.TH]:"Thailand",[n._F.BT]:"Bhutan",[n._F.SG]:"Singapore",[n._F.IL]:"Israel",[n._F.AZ]:"Azerbaijan",[n._F.TL]:"Timor-Leste",[n._F.IR]:"Iran",[n._F.TR]:"Turkey",[n._F.MK]:"North Macedonia",[n._F.IE]:"Ireland",[n._F.DK]:"Denmark",[n._F.SK]:"Slovakia",[n._F.MD]:"Moldova",[n._F.AX]:"\xc5land Islands",[n._F.PL]:"Poland",[n._F.BA]:"Bosnia and Herzegovina",[n._F.SM]:"San Marino",[n._F.CZ]:"Czechia",[n._F.EE]:"Estonia",[n._F.XK]:"Kosovo",[n._F.FO]:"Faroe Islands",[n._F.SJ]:"Svalbard and Jan Mayen",[n._F.GG]:"Guernsey",[n._F.FR]:"France",[n._F.NL]:"Netherlands",[n._F.FI]:"Finland",[n._F.PT]:"Portugal",[n._F.DE]:"Germany",[n._F.MT]:"Malta",[n._F.JE]:"Jersey",[n._F.IS]:"Iceland",[n._F.ES]:"Spain",[n._F.GI]:"Gibraltar",[n._F.NO]:"Norway",[n._F.CY]:"Cyprus",[n._F.RS]:"Serbia",[n._F.LT]:"Lithuania",[n._F.MC]:"Monaco",[n._F.LU]:"Luxembourg",[n._F.UA]:"Ukraine",[n._F.IM]:"Isle of Man",[n._F.RO]:"Romania",[n._F.BE]:"Belgium",[n._F.SE]:"Sweden",[n._F.ME]:"Montenegro",[n._F.LV]:"Latvia",[n._F.VA]:"Vatican City",[n._F.AT]:"Austria",[n._F.AL]:"Albania",[n._F.LI]:"Liechtenstein",[n._F.GR]:"Greece",[n._F.IT]:"Italy",[n._F.AD]:"Andorra",[n._F.GB]:"United Kingdom",[n._F.RU]:"Russia",[n._F.SI]:"Slovenia",[n._F.BY]:"Belarus",[n._F.CH]:"Switzerland",[n._F.HU]:"Hungary",[n._F.BG]:"Bulgaria",[n._F.HR]:"Croatia",[n._F.TC]:"Turks and Caicos Islands",[n._F.CW]:"Cura\xe7ao",[n._F.GP]:"Guadeloupe",[n._F.UM]:"United States Minor Outlying Islands",[n._F.GT]:"Guatemala",[n._F.PM]:"Saint Pierre and Miquelon",[n._F.BQ]:"Caribbean Netherlands",[n._F.GL]:"Greenland",[n._F.SX]:"Sint Maarten",[n._F.PA]:"Panama",[n._F.AW]:"Aruba",[n._F.MQ]:"Martinique",[n._F.AG]:"Antigua and Barbuda",[n._F.BM]:"Bermuda",[n._F.CU]:"Cuba",[n._F.GD]:"Grenada",[n._F.NI]:"Nicaragua",[n._F.LC]:"Saint Lucia",[n._F.KN]:"Saint Kitts and Nevis",[n._F.DO]:"Dominican Republic",[n._F.VC]:"Saint Vincent and the Grenadines",[n._F.BZ]:"Belize",[n._F.HT]:"Haiti",[n._F.JM]:"Jamaica",[n._F.BS]:"Bahamas",[n._F.MX]:"Mexico",[n._F.MF]:"Saint Martin",[n._F.SV]:"El Salvador",[n._F.BL]:"Saint Barth\xe9lemy",[n._F.AI]:"Anguilla",[n._F.MS]:"Montserrat",[n._F.VG]:"British Virgin Islands",[n._F.BB]:"Barbados",[n._F.HN]:"Honduras",[n._F.KY]:"Cayman Islands",[n._F.DM]:"Dominica",[n._F.TT]:"Trinidad and Tobago",[n._F.CR]:"Costa Rica",[n._F.SR]:"Suriname",[n._F.CX]:"Christmas Island",[n._F.WS]:"Samoa",[n._F.PF]:"French Polynesia",[n._F.AS]:"American Samoa",[n._F.NC]:"New Caledonia",[n._F.TK]:"Tokelau",[n._F.PW]:"Palau",[n._F.KI]:"Kiribati",[n._F.VU]:"Vanuatu",[n._F.PN]:"Pitcairn Islands",[n._F.CK]:"Cook Islands",[n._F.FJ]:"Fiji",[n._F.PG]:"Papua New Guinea",[n._F.MP]:"Northern Mariana Islands",[n._F.NU]:"Niue",[n._F.TV]:"Tuvalu",[n._F.NF]:"Norfolk Island",[n._F.TO]:"Tonga",[n._F.FM]:"Micronesia",[n._F.SB]:"Solomon Islands",[n._F.NR]:"Nauru",[n._F.WF]:"Wallis and Futuna",[n._F.GU]:"Guam",[n._F.AU]:"Australia",[n._F.NZ]:"New Zealand",[n._F.MH]:"Marshall Islands",[n._F.CC]:"Cocos (Keeling) Islands",[n._F.VE]:"Venezuela",[n._F.PY]:"Paraguay",[n._F.BR]:"Brazil",[n._F.CO]:"Colombia",[n._F.PE]:"Peru",[n._F.CL]:"Chile",[n._F.UY]:"Uruguay",[n._F.AR]:"Argentina",[n._F.GY]:"Guyana",[n._F.BO]:"Bolivia",[n._F.GF]:"French Guiana",[n._F.EC]:"Ecuador",[n._F.FK]:"Falkland Islands",[n._F.US_AL]:"Alabama",[n._F.US_AK]:"Alaska",[n._F.US_AZ]:"Arizona",[n._F.US_AR]:"Arkansas",[n._F.US_CA]:"California",[n._F.US_CO]:"Colorado",[n._F.US_CT]:"Connecticut",[n._F.US_DE]:"Delaware",[n._F.US_DC]:"District of Columbia (DC)",[n._F.US_FL]:"Florida",[n._F.US_GA]:"Georgia",[n._F.US_HI]:"Hawaii",[n._F.US_ID]:"Idaho",[n._F.US_IL]:"Illinois",[n._F.US_IN]:"Indiana",[n._F.US_IA]:"Iowa",[n._F.US_KS]:"Kansas",[n._F.US_KY]:"Kentucky",[n._F.US_LA]:"Louisiana",[n._F.US_ME]:"Maine",[n._F.US_MD]:"Maryland",[n._F.US_MA]:"Massachusetts",[n._F.US_MI]:"Michigan",[n._F.US_MN]:"Minnesota",[n._F.US_MS]:"Mississippi",[n._F.US_MO]:"Missouri",[n._F.US_MT]:"Montana",[n._F.US_NE]:"Nebraska",[n._F.US_NV]:"Nevada",[n._F.US_NH]:"New Hampshire",[n._F.US_NJ]:"New Jersey",[n._F.US_NM]:"New Mexico",[n._F.US_NY]:"New York",[n._F.US_NC]:"North Carolina",[n._F.US_ND]:"North Dakota",[n._F.US_OH]:"Ohio",[n._F.US_OK]:"Oklahoma",[n._F.US_OR]:"Oregon",[n._F.US_PA]:"Pennsylvania",[n._F.US_PR]:"Puerto Rico",[n._F.US_RI]:"Rhode Island",[n._F.US_SC]:"South Carolina",[n._F.US_SD]:"South Dakota",[n._F.US_TN]:"Tennessee",[n._F.US_TX]:"Texas",[n._F.US_UT]:"Utah",[n._F.US_VA]:"Virginia",[n._F.US_VI]:"United States Virgin Islands",[n._F.US_VT]:"Vermont",[n._F.US_WA]:"Washington",[n._F.US_WV]:"West Virginia",[n._F.US_WI]:"Wisconsin",[n._F.US_WY]:"Wyoming",[n._F.CA_AB]:"Alberta",[n._F.CA_BC]:"British Columbia",[n._F.CA_MB]:"Manitoba",[n._F.CA_NB]:"New Brunswick",[n._F.CA_NL]:"Newfoundland and Labrador",[n._F.CA_NS]:"Nova Scotia",[n._F.CA_ON]:"Ontario",[n._F.CA_PE]:"Prince Edward Island",[n._F.CA_QC]:"Quebec",[n._F.CA_SK]:"Saskatchewan",[n._F.CA_NT]:"Northwest Territories",[n._F.CA_NU]:"Nunavut",[n._F.CA_YT]:"Yukon",[n._F.CA]:"Canada",[n._F.US]:"United States",[n._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[n._F.CARIBBEAN]:"Caribbean",[n._F.EEA]:"European Economic Area (EEA)",[n._F.NON_EEA]:"Non European Economic Area",[n._F.GLOBAL]:"Global"},o=new Map(Object.entries(a));Object.entries(a).map(e=>({value:e[0],label:e[1]}))},79494:function(e,t,i){"use strict";var n=i(24246),a=i(62051);t.Z=e=>{let{title:t,icon:i,type:o,...l}=e;return(0,n.jsx)(a.wpx,{size:"small",type:o,"data-testid":"action-".concat(t),icon:i,iconPosition:"start",...l,children:t})}},60325:function(e,t,i){"use strict";i.d(t,{DD:function(){return r},Go:function(){return s},TK:function(){return a},Uv:function(){return c},k1:function(){return o},y3:function(){return u}});var n=i(46420);let a=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==t?t:[]},o=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected))&&void 0!==t?t:[]},l=[{language:n.eU.EN,is_default:!0,title:"Title",description:"Description",accept_button_label:"Accept",reject_button_label:"Reject",save_button_label:"Save",acknowledge_button_label:"OK",privacy_preferences_link_label:"Privacy Preferences"}],r={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},s=(e,t)=>{let i=t.find(t=>t.id===e.language);return i?i.name:e.language},d=e=>{var t,i,n,a,o,l,r,s,d;let{language:c,is_default:u,accept_button_label:_,reject_button_label:m}=e;return{language:c,is_default:u,accept_button_label:_,reject_button_label:m,title:e.title,description:e.description,acknowledge_button_label:null!==(t=e.acknowledge_button_label)&&void 0!==t?t:void 0,banner_title:null!==(i=e.banner_title)&&void 0!==i?i:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(a=e.purpose_header)&&void 0!==a?a:void 0,privacy_policy_link_label:null!==(o=e.privacy_policy_link_label)&&void 0!==o?o:void 0,privacy_policy_url:null!==(l=e.privacy_policy_url)&&void 0!==l?l:void 0,privacy_preferences_link_label:null!==(r=e.privacy_preferences_link_label)&&void 0!==r?r:void 0,save_button_label:null!==(s=e.save_button_label)&&void 0!==s?s:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},c=e=>{let{created_at:t,updated_at:i,privacy_notices:n,origin:a,id:o,...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}}},13636:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return eP}});var n=i(24246),a=i(62051),o=i(86677),l=i(7617),r=i(77213),s=i(77830),d=i(58754),c=i(94725),u=i(45216),_=i(52352),m=i(92222),h=i(59003),g=i(27378),p=i(18225);let F=(0,a.IUT)({displayName:"MonitorIcon",viewBox:"0 0 12 12",path:(0,n.jsx)("path",{d:"M1.33333 2.21875C1.15 2.21875 1 2.37344 1 2.5625V5.65625H3.66667C3.84167 5.65625 4.00417 5.75078 4.09583 5.90762L4.62708 6.8207L5.88542 4.22324C5.96667 4.05566 6.13125 3.94609 6.3125 3.93965C6.49375 3.9332 6.66667 4.02773 6.76042 4.18887L7.61458 5.65625H8.83333C9.11042 5.65625 9.33333 5.88613 9.33333 6.17188C9.33333 6.45762 9.11042 6.6875 8.83333 6.6875H7.33333C7.15833 6.6875 6.99583 6.59297 6.90417 6.43613L6.37292 5.52305L5.11458 8.12051C5.03333 8.28809 4.86875 8.39766 4.6875 8.4041C4.50625 8.41055 4.33333 8.31602 4.23958 8.15488L3.38542 6.6875H1V9.4375C1 9.62656 1.15 9.78125 1.33333 9.78125H10.6667C10.85 9.78125 11 9.62656 11 9.4375V2.5625C11 2.37344 10.85 2.21875 10.6667 2.21875H1.33333ZM0 2.5625C0 1.8041 0.597917 1.1875 1.33333 1.1875H10.6667C11.4021 1.1875 12 1.8041 12 2.5625V9.4375C12 10.1959 11.4021 10.8125 10.6667 10.8125H1.33333C0.597917 10.8125 0 10.1959 0 9.4375V2.5625Z",fill:"currentColor"})});var b=i(8411),x=i(14481),y=i(70675),v=i(812),f=i(14047),S=i(8133),j=i(46628),C=i(67991),N=i(46238);let T=(0,m.Cl)();var w=e=>{let{items:t,totalItemCount:i,selected:o,excluded:l,allSelected:r,someSelected:s,moreLoading:d,handleToggleSelection:c,handleToggleAll:u,onMoreClick:_}=e,F=t.map(e=>({id:e,isSelected:o.includes(e),isExcluded:l.includes(e)})),b=(0,g.useMemo)(()=>[T.display({id:"select",cell:e=>{let{row:t}=e;return(0,n.jsx)(x.k,{isChecked:t.original.isSelected||r&&!t.original.isExcluded,onChange:()=>c(t.original.id),dataTestId:"".concat(t.original.id,"-checkbox")})},header:()=>(0,n.jsx)(x.k,{isChecked:r,isIndeterminate:s,onChange:u,dataTestId:"select-all-checkbox"}),size:1}),T.accessor(e=>e.id,{id:"id",cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Scope",...e})})],[c,u,r,s]),y=(0,h.b7)({getCoreRowModel:(0,m.sC)(),getRowId:e=>e.id,manualPagination:!0,data:F,columns:b,columnResizeMode:"onChange"});return(0,n.jsx)(a.kCb,{w:"full",direction:"column",maxH:"lg",children:(0,n.jsx)(x.ZK,{tableInstance:y,onRowClick:e=>c(e.id),footer:!!_&&(0,n.jsx)(x.vr,{totalColumns:2,children:(0,n.jsx)(a.kCb,{justify:"center",children:d?(0,n.jsx)(p.Z,{size:"xs"}):(0,n.jsxs)(a.kCb,{align:"center",children:[(0,n.jsxs)(a.xvT,{fontSize:"xs",mr:4,children:["Showing ",t.length," of ",i]}),(0,n.jsx)(a.wpx,{onClick:_,size:"small","data-testid":"load-more-btn",children:"Load more..."})]})})})})})};let A={items:[],total:1,page:1,size:50,pages:0};var k=(e,t)=>{let[i,n]=(0,g.useState)(2),{data:a,isLoading:o}=(0,y.oN)({page:1,size:25,connection_config_key:e}),l=(0,g.useRef)(o),{items:r,total:s}=null!=a?a:A,d=!!(null==a?void 0:a.pages)&&i>a.pages,[c,u]=(0,g.useState)(r);(0,g.useEffect)(()=>{l.current=o,u(r)},[o,r]),(0,g.useEffect)(()=>{let e=setTimeout(()=>{l.current&&t&&t()},5e3);return()=>clearTimeout(e)},[]);let[_,{isLoading:m,isFetching:h}]=(0,y.j3)(),p=m||h||o,F=async()=>{var t,a;if(d)return;let o=await _({connection_config_key:e,size:25,page:i+1});o.isError||(n(i+1),u([...c,...null!==(a=null===(t=o.data)||void 0===t?void 0:t.items)&&void 0!==a?a:[]]))};return{databases:c,totalDatabases:s,fetchMore:F,initialIsLoading:o,isLoading:p,reachedEnd:d}},M=e=>{var t;let{monitor:i,isEditing:o,isSubmitting:l,integrationKey:r,onSubmit:s,onClose:d}=e,c=(0,a.pmc)(),{databases:u,totalDatabases:_,fetchMore:m,reachedEnd:h,isLoading:g,initialIsLoading:F}=k(r,()=>{s({...i,databases:[]}),c({...j.MA,status:"info",description:"Loading resources is taking longer than expected. The monitor has been saved and is tracking all available resources. You can return later to limit its scope if needed"}),d()}),b=null!==(t=null==i?void 0:i.databases)&&void 0!==t?t:[],{selected:x,excluded:y,allSelected:v,someSelected:f,handleToggleItemSelected:S,handleToggleAll:T}=(0,C.Od)({initialSelected:b,initialExcluded:[],initialAllSelected:o&&!b.length,itemCount:_}),A=!v&&0===x.length;return F?(0,n.jsx)(p.Z,{my:12}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.kCb,{p:4,direction:"column",children:[(0,n.jsxs)(a.kCb,{direction:"row",mb:4,gap:1,align:"center",children:[(0,n.jsx)(a.xvT,{fontSize:"sm",children:"Select projects to monitor"}),(0,n.jsx)(N.b,{label:"Selecting a project will monitor all current and future datasets within that project."})]}),(0,n.jsx)(w,{items:u,totalItemCount:_,selected:x,excluded:y,allSelected:v,someSelected:f,moreLoading:g,handleToggleSelection:S,handleToggleAll:T,onMoreClick:h?void 0:m})]}),(0,n.jsxs)("div",{className:"mt-4 flex w-full justify-between",children:[(0,n.jsx)(a.wpx,{onClick:d,children:"Cancel"}),(0,n.jsx)(a.esZ,{title:A?"Select one or more projects to save":void 0,children:(0,n.jsx)(a.wpx,{onClick:()=>{s({...i,excluded_databases:y,databases:v?[]:x})},loading:l,type:"primary","data-testid":"save-btn",disabled:A,children:"Save"})})]})]})},D=i(64892),E=i(6680),U=i(54743);function I(e,t){let i,n;let a=()=>(0,E.L)(t?.in,NaN),o=t?.additionalDigits??2,l=function(e){let t;let i={},n=e.split(R.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?t=n[0]:(i.date=n[0],t=n[1],R.timeZoneDelimiter.test(i.date)&&(i.date=e.split(R.timeZoneDelimiter)[0],t=e.substr(i.date.length,e.length))),t){let e=R.timezone.exec(t);e?(i.time=t.replace(e[1],""),i.timezone=e[1]):i.time=t}return i}(e);if(l.date){let e=function(e,t){let i=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(i);if(!n)return{year:NaN,restDateString:""};let a=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:null===o?a:100*o,restDateString:e.slice((n[1]||n[2]).length)}}(l.date,o);i=function(e,t){if(null===t)return new Date(NaN);let i=e.match(L);if(!i)return new Date(NaN);let n=!!i[4],a=P(i[1]),o=P(i[2])-1,l=P(i[3]),r=P(i[4]),s=P(i[5])-1;if(n)return r>=1&&r<=53&&s>=0&&s<=6?function(e,t,i){let n=new Date(0);n.setUTCFullYear(e,0,4);let a=n.getUTCDay()||7;return n.setUTCDate(n.getUTCDate()+((t-1)*7+i+1-a)),n}(t,r,s):new Date(NaN);{let e=new Date(0);return o>=0&&o<=11&&l>=1&&l<=(Z[o]||(B(t)?29:28))&&a>=1&&a<=(B(t)?366:365)?(e.setUTCFullYear(t,o,Math.max(a,l)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!i||isNaN(+i))return a();let r=+i,s=0;if(l.time&&isNaN(s=function(e){let t=e.match(q);if(!t)return NaN;let i=z(t[1]),n=z(t[2]),a=z(t[3]);return(24===i?0===n&&0===a:a>=0&&a<60&&n>=0&&n<60&&i>=0&&i<25)?i*D.vh+n*D.yJ+1e3*a:NaN}(l.time)))return a();if(l.timezone){if(isNaN(n=function(e){if("Z"===e)return 0;let t=e.match(O);if(!t)return 0;let i="+"===t[1]?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return a>=0&&a<=59?i*(n*D.vh+a*D.yJ):NaN}(l.timezone)))return a()}else{let e=new Date(r+s),i=(0,U.Q)(0,t?.in);return i.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),i.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),i}return(0,U.Q)(r+s+n,t?.in)}let R={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},L=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,q=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,O=/^([+-])(\d{2})(?::?(\d{2}))?$/;function P(e){return e?parseInt(e):1}function z(e){return e&&parseFloat(e.replace(",","."))||0}let Z=[31,null,31,30,31,30,31,31,30,31,30,31];function B(e){return e%400==0||e%4==0&&e%100!=0}var V=i(96063),G=i(34090),H=i(55484),K=i(97181),W=i(40324),Y=i(11013);let J=e=>{let{layout:t="stacked",...i}=e,{data:a}=(0,Y.eV)({page:1,size:100}),o=null==a?void 0:a.items.map(e=>({label:e.name,value:e.id}));return(0,n.jsx)(K.d,{tooltip:"If a shared monitor config is selected, the monitor will use the shared config to classify resources",options:o,label:"Shared monitor config",layout:t,...i})};var Q=i(46420),X=e=>{var t,i,l;let{monitor:r,integrationOption:s,isSubmitting:d,databasesAvailable:c,onClose:u,onAdvance:_,onSubmit:m}=e,h=!!r,g=(0,o.useRouter)(),p=Array.isArray(g.query.id)?g.query.id[0]:g.query.id,F=H.Ry().shape({name:H.Z_().required().label("Name"),execution_frequency:H.Z_().nullable().label("Execution frequency"),execution_start_date:H.hT().nullable().label("Execution start date")}),b=(null==r?void 0:r.execution_start_date)?I(r.execution_start_date):Date.now(),x={name:null!==(t=null==r?void 0:r.name)&&void 0!==t?t:"",shared_config_id:null!==(i=null==r?void 0:r.shared_config_id)&&void 0!==i?i:void 0,execution_start_date:(0,V.WU)(b,"yyyy-MM-dd'T'HH:mm"),execution_frequency:null!==(l=null==r?void 0:r.execution_frequency)&&void 0!==l?l:Q.hV.MONTHLY},y=(0,v.MM)(Q.hV);return(0,n.jsx)(G.J9,{initialValues:x,enableReinitialize:!0,onSubmit:e=>{let t=e.execution_frequency!==Q.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:Q.hV.NOT_SCHEDULED,execution_start_date:void 0},i=h?{...r,...t,name:e.name,shared_config_id:e.shared_config_id}:{...t,name:e.name,shared_config_id:e.shared_config_id,connection_config_key:p,classify_params:{num_samples:25,num_threads:1}};s.identifier===Q.Rj.DYNAMODB&&(i.datasource_params={single_dataset:!1}),c?_(i):m(i)},validationSchema:F,children:e=>{let{values:t,isValid:i,resetForm:o}=e;return(0,n.jsx)(G.l0,{children:(0,n.jsxs)(a.gCW,{alignItems:"start",spacing:6,mt:4,children:[(0,n.jsx)(W.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsx)(K.d,{name:"execution_frequency",id:"execution_frequency",tooltip:"Interval to run the monitor automatically after the start date",options:y,label:"Automatic execution frequency",layout:"stacked"}),(0,n.jsx)(J,{name:"shared_config_id",id:"shared_config_id"}),(0,n.jsx)(W.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:t.execution_frequency===Q.hV.NOT_SCHEDULED,id:"execution_start_date"}),(0,n.jsxs)("div",{className:"flex w-full justify-between",children:[(0,n.jsx)(a.wpx,{onClick:()=>{o(),u()},children:"Cancel"}),(0,n.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!i,loading:d,"data-testid":"next-btn",children:c?"Next":"Save"})]})]})})}})},$=i(90111),ee=i(64781),et=i(60325);let ei=H.Ry().shape({name:H.Z_().required().label("Name"),execution_frequency:H.Z_().nullable().label("Execution frequency"),execution_start_date:H.hT().nullable().label("Execution start date"),datasource_params:H.Ry().shape({locations:H.IX().label("Locations"),exclude_domains:H.IX().label("Exclude domains"),sitemap_url:H.Z_().nullable().url().label("Sitemap URL")})});var en=e=>{var t,i,l,r;let{monitor:s,url:d,onClose:c,onSubmit:u}=e,_=(0,o.useRouter)(),m=Array.isArray(_.query.id)?_.query.id[0]:_.query.id,h=(null==s?void 0:s.execution_start_date)?I(s.execution_start_date):Date.now(),{data:g,isLoading:p}=(0,ee.gT)(),F=[...(0,et.TK)(null!==(t=null==g?void 0:g.locations)&&void 0!==t?t:[]),...(0,et.TK)(null!==(i=null==g?void 0:g.location_groups)&&void 0!==i?i:[])].map(e=>({value:e,label:b.Z8[e]})),x={name:(null==s?void 0:s.name)||"",shared_config_id:null!==(l=null==s?void 0:s.shared_config_id)&&void 0!==l?l:void 0,execution_frequency:(null==s?void 0:s.execution_frequency)||Q.hV.NOT_SCHEDULED,execution_start_date:(0,V.WU)(h,"yyyy-MM-dd'T'HH:mm"),url:d,connection_config_key:m,datasource_params:null!==(r=null==s?void 0:s.datasource_params)&&void 0!==r?r:{locations:[]}},y=async e=>{let t=e.execution_frequency!==Q.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:Q.hV.NOT_SCHEDULED,execution_start_date:void 0};u({...s,...e,...t,key:null==s?void 0:s.key,classify_params:(null==s?void 0:s.classify_params)||{},datasource_params:e.datasource_params||{},connection_config_key:m})},f=(0,v.MM)(Q.hV).filter(e=>[Q.hV.MONTHLY,Q.hV.QUARTERLY,Q.hV.YEARLY,Q.hV.NOT_SCHEDULED].includes(e.value));return(0,n.jsxs)(a.jqI,{vertical:!0,className:"pt-4",children:[(0,n.jsx)($.Z,{children:(0,n.jsx)(a.xvT,{fontSize:"sm",children:"This monitor allows you to simulate and verify user consent actions, such as 'accept,' 'reject,' or 'opt-out,' on consent experiences. For each detected activity, the monitor will record whether it occurred before or after the configured user actions, ensuring compliance with user consent choices."})}),(0,n.jsx)(G.J9,{initialValues:x,enableReinitialize:!0,onSubmit:y,validationSchema:ei,children:e=>{let{values:t,resetForm:i}=e;return(0,n.jsx)(G.l0,{children:(0,n.jsxs)(a.jqI,{vertical:!0,gap:"middle",children:[(0,n.jsx)(W.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsx)(W.j0,{name:"datasource_params.sitemap_url",id:"sitemap_url",label:"Sitemap URL",variant:"stacked"}),(0,n.jsx)(K.d,{mode:"tags",name:"datasource_params.exclude_domains",placeholder:"Enter domains to exclude",id:"exclude_domains",label:"Exclude domains",options:[],open:!1,layout:"stacked"}),(0,n.jsx)(W.j0,{name:"url",id:"url",label:"URL",isRequired:!0,disabled:!0,variant:"stacked"}),(0,n.jsx)(K.d,{mode:"multiple",isRequired:!0,name:"datasource_params.locations",id:"locations",label:"Locations",loading:p,options:F,optionFilterProp:"label",tooltip:"Specify the region(s) to include in the scan. The monitor will scan the same URL across these locations to identify tracking technologies, such as cookies served by ad tech vendors.",layout:"stacked"}),(0,n.jsx)(J,{name:"shared_config_id",id:"shared_config_id"}),(0,n.jsx)(K.d,{name:"execution_frequency",id:"execution_frequency",options:f,label:"Automatic execution frequency",layout:"stacked"}),(0,n.jsx)(W.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:t.execution_frequency===Q.hV.NOT_SCHEDULED,id:"execution_start_date",tooltip:"Set the start time for the scan. For optimal performance and minimal disruption, schedule scans during periods of low traffic."}),(0,n.jsxs)(a.jqI,{className:"mt-2 justify-between",children:[(0,n.jsx)(a.wpx,{onClick:()=>{i(),c()},children:"Cancel"}),(0,n.jsx)(a.wpx,{type:"primary",htmlType:"submit","data-testid":"save-btn",children:"Save"})]})]})})}})]})},ea=i(31883),eo=e=>{let{isOpen:t,onClose:i,formStep:o,onAdvance:l,monitor:r,isEditing:s,integration:d,integrationOption:c,isWebsiteMonitor:u}=e,[_,{isLoading:m}]=(0,y.Fy)(),{data:h}=(0,y.oN)({page:1,size:25,connection_config_key:d.key}),g=!!h&&!!h.total,F=(0,a.pmc)(),{successAlert:b,errorAlert:x}=(0,f.V)(),C=async e=>{let t;let n=setTimeout(()=>{t||(F({...j.MA,status:"info",description:"Saving this monitor is taking longer than expected. Fides will continue processing it in the background, and you can check back later to view the updates."}),i())},5e3);if(t=await _(e)){if(clearTimeout(n),(0,ea.D4)(t)){x((0,v.e$)(t.error),"Error creating monitor");return}if(s){b("Monitor updated successfully"),i();return}if(u){b(e.execution_frequency===Q.hV.NOT_SCHEDULED?'Your monitor has been created with no schedule. Select "Scan" in the table below to begin scanning your website.':"Your monitor has been created and is now scanning your website. Once the monitor is finished scanning, results can be found in the action center."),i();return}b("Monitor created successfully"),i()}};return u?(0,n.jsx)(S.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure website monitor",isOpen:t,onClose:i,children:(0,n.jsx)(en,{monitor:r,url:d.secrets.url,onClose:i,onSubmit:C})}):(0,n.jsxs)(S.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure discovery monitor",isOpen:t,onClose:i,children:[0===o&&(0,n.jsx)(X,{monitor:r,onClose:i,onAdvance:l,onSubmit:C,isSubmitting:m,databasesAvailable:g,integrationOption:c}),1===o&&(r?(0,n.jsx)(M,{monitor:r,isEditing:s,isSubmitting:m,onSubmit:C,onClose:i,integrationKey:d.key}):(0,n.jsx)(p.Z,{}))]})},el=e=>{let{defaultSuccessMsg:t,defaultErrorMsg:i}=e,{successAlert:n,errorAlert:a}=(0,f.V)();return{toastResult:e=>{(0,v.D4)(e)?a((0,v.e$)(e.error,i)):n(t)}}},er=i(58452),es=i(79494),ed=e=>{let{monitorId:t,isWebsiteMonitor:i,onEditClick:o}=e,[l]=(0,y.Sb)(),{toastResult:r}=el({defaultErrorMsg:"A problem occurred deleting this monitor",defaultSuccessMsg:"Monitor deleted successfully"}),[s,{isLoading:d}]=(0,y.V9)(),{toastResult:c}=el({defaultErrorMsg:"A problem occurred initiating monitor execution",defaultSuccessMsg:i?"Scanning your website now. Once the monitor is finished, results can be found in the action center.":"Monitor execution successfully started"}),u=async()=>{r(await l({monitor_config_id:t}))},{isOpen:_,onOpen:m,onClose:h}=(0,a.qY0)(),g=async()=>{c(await s({monitor_config_id:t}))};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(er.Z,{isOpen:_,onClose:h,onConfirm:u,title:"Delete monitor",message:"Are you sure you want to delete this discovery monitor?",continueButtonText:"Delete",isCentered:!0}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(a.esZ,{title:"Edit",children:(0,n.jsx)(a.wpx,{onClick:o,size:"small",icon:(0,n.jsx)(a.dY8,{}),"data-testid":"edit-monitor-btn","aria-label":"Edit monitor"})}),(0,n.jsx)(a.esZ,{title:"Delete",children:(0,n.jsx)(a.wpx,{onClick:m,size:"small",icon:(0,n.jsx)(a.pJl,{}),"aria-label":"Delete monitor","data-testid":"delete-monitor-btn"})}),(0,n.jsx)(es.Z,{onClick:g,title:"Scan",loading:d})]})]})},ec=i(72625);let eu=e=>{let{row:t,getValue:i}=e,[a]=(0,y.Fy)(),o=async e=>a({...t.original,enabled:e}),l=i();return(0,n.jsx)(ec.S1,{enabled:l,onToggle:o,title:"Disabling monitor",message:"You are about to disable this monitor. If you continue, it will no longer scan automatically."})};var e_=i(7195),em=i(16394),eh=i(16964),eg=i.n(eh),ep=e=>{var t,i;let{monitor:o}=e,l=null===(t=o.execution_records)||void 0===t?void 0:t[0],{isOpen:r,onOpen:s,onClose:d}=(0,a.qY0)(),c=o.last_monitored?new Date(o.last_monitored):null,u=c?(0,em.p6)(c):"N/A",_=c?(0,e_.B)(c,new Date,{addSuffix:!0}):"N/A";return l?l.status===Q.L2.IN_PROGRESS?c?(0,n.jsx)(a.esZ,{title:"Last scan: ".concat(_),children:(0,n.jsx)(a.j8w,{color:"info",children:"Scanning"})}):(0,n.jsx)(a.j8w,{color:"info",children:"Scanning"}):l.status===Q.L2.COMPLETED?(0,n.jsx)(a.esZ,{title:u,children:(0,n.jsx)(a.j8w,{color:"success","data-testid":"tag-success",children:_})}):l.status===Q.L2.ERRORED?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.j8w,{color:"error",className:eg().monitorStatusTag,"data-testid":"tag-error",children:(0,n.jsx)("button",{onClick:s,className:eg().errorTagText,type:"button",children:"Incomplete"})}),(0,n.jsxs)(a.dys,{isOpen:r,onClose:d,size:"md",children:[(0,n.jsx)(a.P1B,{}),(0,n.jsxs)(a.scA,{"data-testid":"error-log-drawer",children:[(0,n.jsx)(a.OXI,{children:"Failure log"}),(0,n.jsx)(a.cCv,{}),(0,n.jsxs)(a.Ng0,{children:[l.completed&&(0,n.jsx)(a.AntTypography.Paragraph,{className:eg().errorResultTimestamp,children:(0,em.p6)(new Date(l.completed))}),null===(i=l.messages)||void 0===i?void 0:i.map((e,t)=>(0,n.jsxs)(g.Fragment,{children:[(0,n.jsx)(a.AntTypography.Paragraph,{"data-testid":"error-log-message",children:e}),t<l.messages.length-1&&(0,n.jsx)(a.izJ,{className:"mb-3"})]},t))]})]})]})]}):(0,n.jsx)(a.j8w,{children:"N/A"}):(0,n.jsx)(a.j8w,{children:"N/A"})},eF=i(40774);let eb={items:[],total:0,page:1,size:50,pages:0},ex={[Q.Rj.WEBSITE]:"Configure your website monitor to identify active ad tech vendors and tracking technologies across your site. This monitor will analyze selected pages for vendor activity, compliance with privacy requirements, and data collection practices. Set your preferences below to customize the monitor frequency and scan locations.",[Q.Rj.OKTA]:"Configure your SSO provider monitor to detect and map systems within your infrastructure. This monitor will analyze connected systems to identify their activity and ensure accurate representation in your data map. Set your preferences below to customize the monitor's scan frequency and scope. To learn more about monitors, view our docs here."},ey=(0,m.Cl)();var ev=e=>{var t,i;let{integration:o,integrationOption:l}=e,r=(null==l?void 0:l.identifier)===Q.Rj.WEBSITE,s=(null==l?void 0:l.type)===Q.Zi.SAAS,{PAGE_SIZES:d,pageSize:c,setPageSize:u,onPreviousPageClick:_,isPreviousPageDisabled:v,onNextPageClick:f,isNextPageDisabled:S,startRange:j,endRange:C,pageIndex:N,setTotalPages:T}=(0,x.oi)(),{isLoading:w,isFetching:A,data:k}=(0,y.Fu)({page:N,size:c,connection_config_key:o.key}),M=(0,a.qY0)(),[D,E]=(0,g.useState)(void 0),[U,I]=(0,g.useState)(!1),[R,L]=(0,g.useState)(0),q=e=>{E(e),I(!0),M.onOpen()},O=null!=k?k:eb,{items:P,total:z,pages:Z}=(0,g.useMemo)(()=>O,[O]);(0,g.useEffect)(()=>{T(Z)},[Z,T]);let B=(0,g.useMemo)(()=>{let e=ey.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Name",...e})}),t=ey.accessor(e=>e.databases,{id:"projects",cell:e=>{var t;return(null===(t=e.getValue())||void 0===t?void 0:t.length)===0?(0,n.jsx)(x.G3,{value:"All projects"}):(0,n.jsx)(x.WP,{suffix:"Projects",value:e.getValue(),...e,cellState:{isExpanded:!0}})},header:e=>(0,n.jsx)(x.Rr,{value:"Scope",...e})}),i=ey.accessor(()=>{let e=o.secrets;return null==e?void 0:e.url},{id:"source_url",cell:e=>{var t;return(0,n.jsx)(x.G3,{value:null!==(t=e.getValue())&&void 0!==t?t:"Not scheduled"})},header:e=>(0,n.jsx)(x.Rr,{value:"Source URL",...e})}),a=ey.accessor(e=>e.execution_frequency,{id:"frequency",cell:e=>{var t;return(0,n.jsx)(x.G3,{value:null!==(t=e.getValue())&&void 0!==t?t:"Not scheduled"})},header:e=>(0,n.jsx)(x.Rr,{value:"Scan frequency",...e})}),l=ey.display({id:"monitor_status",cell:e=>(0,n.jsx)(ep,{monitor:e.row.original}),header:e=>(0,n.jsx)(x.Rr,{value:"Scan status",...e}),meta:{disableRowClick:!0}}),s=ey.accessor(e=>{var t;let i=e.datasource_params;return(null==i?void 0:null===(t=i.locations)||void 0===t?void 0:t.map(e=>b.Z8[e]).join(", "))||"No regions selected"},{id:"regions",cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Regions",...e})}),d=ey.accessor(e=>e.enabled,{id:"status",cell:eu,header:e=>(0,n.jsx)(x.Rr,{value:"Status",...e}),size:0,meta:{disableRowClick:!0}}),c=ey.display({id:"action",cell:e=>(0,n.jsx)(ed,{onEditClick:()=>q(e.row.original),isWebsiteMonitor:r,monitorId:e.row.original.key}),header:"Actions",meta:{disableRowClick:!0}});return r?[e,i,a,s,l,d,c]:[e,t,a,l,d,c]},[]),V=(0,h.b7)({getCoreRowModel:(0,m.sC)(),getGroupedRowModel:(0,m.qe)(),getExpandedRowModel:(0,m.rV)(),getRowId:e=>e.name,manualPagination:!0,data:P,columns:B,columnResizeMode:"onChange"});if(w)return(0,n.jsx)(p.Z,{});let G=null!==(t=ex[null==l?void 0:l.identifier])&&void 0!==t?t:"A data discovery monitor observes configured systems for data model changes to proactively discover and classify data risks. Monitors can observe part or all of a project, dataset, table, or API for changes and each can be assigned to a different data steward.",{isDisabled:H,tooltip:K}=s&&P.length>0?{isDisabled:!0,tooltip:"API integrations only use a single monitor"}:o.name||(null===(i=o.saas_config)||void 0===i?void 0:i.type)!=="salesforce"?{isDisabled:!1,tooltip:null}:{isDisabled:!0,tooltip:"This is a legacy connection and cannot be used to create a monitor. Create a new Salesforce integration to use this feature."};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.xvT,{maxW:"720px",mb:6,fontSize:"sm","data-testid":"monitor-description",children:G}),(0,n.jsxs)(x.Q$,{children:[(0,n.jsx)(eF.Z,{}),(0,n.jsx)(a.LZC,{}),(0,n.jsx)(a.ua7,{label:K,children:(0,n.jsx)("span",{children:(0,n.jsx)(a.wpx,{onClick:M.onOpen,icon:(0,n.jsx)(F,{}),iconPosition:"end","data-testid":"add-monitor-btn",disabled:H,children:"Add monitor"})})}),(0,n.jsx)(eo,{isOpen:M.isOpen,onClose:()=>{E(void 0),I(!1),L(0),M.onClose()},formStep:R,onAdvance:e=>{E(e),L(1)},monitor:D,isEditing:U,integration:o,integrationOption:l,isWebsiteMonitor:r})]}),(0,n.jsx)(x.ZK,{tableInstance:V,onRowClick:q,emptyTableNotice:(0,n.jsx)(()=>(0,n.jsx)(a.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,n.jsxs)(a.gCW,{children:[(0,n.jsx)(a.xvT,{fontSize:"md",fontWeight:"600",children:"No monitors"}),(0,n.jsx)(a.xvT,{fontSize:"sm",children:'You have not configured any data discovery monitors. Click "Add monitor" to configure data discovery now.'})]})}),{})}),(0,n.jsx)(x.s8,{totalRows:z||0,pageSizes:d,setPageSize:u,onPreviousPageClick:_,isPreviousPageDisabled:v||A,onNextPageClick:f,isNextPageDisabled:S||A,startRange:j,endRange:C})]})},ef=i(41966),eS=i(32885),ej=e=>{let{integration:t}=e,{data:i}=(0,c.Eg)(t.key),{data:o}=(0,ef.LH)({minimal:!0,connection_type:Q.Rj.BIGQUERY}),[l,{isLoading:r}]=(0,eS.Qd)(),s=(0,a.pmc)(),d=async()=>{try{var e,n,a,r,d;let c=null!==(a=null==i?void 0:null===(e=i.items)||void 0===e?void 0:e.map(e=>e.fides_key))&&void 0!==a?a:[],u=null!==(r=null==o?void 0:o.map(e=>e.fides_key))&&void 0!==r?r:[],_=c.length>0?c:u,m=await l({connectionKey:t.key,datasetIds:_}),h=null!==(d=null===(n=m.data)||void 0===n?void 0:n.succeeded.length)&&void 0!==d?d:0,g="Fides has begun syncing with DataHub. There ".concat(1===h?"is":"are"," ").concat(h," dataset").concat(1===h?"":"s"," queued for syncing.");s((0,j.t5)(g))}catch(e){s({title:"Error syncing datasets",description:"There was an error syncing your datasets with DataHub. Please try again.",status:"error",duration:5e3,isClosable:!0})}};return(0,n.jsxs)(a.gCW,{spacing:6,align:"stretch",children:[(0,n.jsxs)(a.gCW,{spacing:4,align:"stretch",children:[(0,n.jsx)(a.xvT,{maxW:"720px",fontSize:"sm","data-testid":"scan-description-1",children:"If you're using DataHub for metadata management, select sync datasets to push data categories from Fides to your DataHub datasets."}),(0,n.jsxs)(a.xvT,{maxW:"720px",fontSize:"sm","data-testid":"scan-description-2",children:["Fides assigns data categories to datasets based on your privacy taxonomy. With this integration, those categories can be added as glossary terms to matching datasets in DataHub-keeping your labeling consistent across systems. To learn more about our DataHub integration, view our docs ",(0,n.jsx)(a.rUS,{href:"https://ethyca.com/docs/user-guides/integrations/saas-integrations/datahub",isExternal:!0,color:"blue.500",textDecoration:"underline",children:"here"}),"."]})]}),(0,n.jsx)(a.zxk,{colorScheme:"primary",onClick:d,"data-testid":"sync-button",width:"fit-content",isLoading:r,loadingText:"Syncing datasets...",children:"Sync Datasets"})]})},eC=i(15987),eN=i(64176),eT=e=>{var t;let{isOpen:i,onClose:o,connection:l,description:r}=e,[s,d]=(0,g.useState)(null),c=(0,eN.Z)(l.connection_type,null==l?void 0:null===(t=l.saas_config)||void 0===t?void 0:t.type),u=(0,n.jsxs)("div",{className:"flex w-full justify-between",children:[(0,n.jsx)(a.wpx,{onClick:o,"data-testid":"cancel-btn",children:"Cancel"}),(0,n.jsx)(a.wpx,{type:"primary",onClick:()=>{s&&s.submitForm&&s.submitForm()},disabled:!s||!s.isValid||!s.dirty,loading:null==s?void 0:s.loading,"data-testid":"save-btn",children:"Save"})]});return(0,n.jsx)(S.Z,{title:"Manage ".concat(null==l?void 0:l.name," integration"),isOpen:i,onClose:o,footer:u,children:(0,n.jsx)(eC.Z,{connection:l,connectionOption:c,onCancel:o,description:r,onFormStateChange:d})})},ew=i(41553),eA=i(93633),ek=i(75595),eM=i(29379);let eD=e=>{let{testData:t,connectionOption:i}=e;return(null==i?void 0:i.authorization_required)?{title:"Authorize integration",description:(0,n.jsx)("span",{children:(null==t?void 0:t.authorized)?"Integration authorized successfully":"Authorize access to your integration"}),state:(null==t?void 0:t.authorized)?"finish":"process"}:null},eE=()=>({title:"Create integration",description:"Integration created successfully",state:"finish"}),eU=e=>{var t,i,n,a;let{enabledFeatures:o}=(0,_.ZP)(e.connection.connection_type,null===(t=e.connection.saas_config)||void 0===t?void 0:t.type),l=null==o?void 0:o.includes(eM.j.DATA_DISCOVERY),{data:r}=(0,y.Fu)({connection_config_key:null===(i=e.testData)||void 0===i?void 0:i.connectionKey,page:1,size:1},{skip:!(null===(n=e.testData)||void 0===n?void 0:n.connectionKey)||!l});if(!l)return null;let s=!!(null==r?void 0:null===(a=r.items)||void 0===a?void 0:a.length);return{title:"Create monitor",description:s?"Data monitor created successfully":"Use the Data discovery tab in this page to add a new monitor",state:s?"finish":"process"}};var eI=i(79894),eR=i.n(eI);let eL=e=>{let{connection:t}=e,i=!!(null==t?void 0:t.system_key),o=i?s.Dv.replace("[id]",t.system_key):s.So;return{title:"Link system",description:i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eR(),{href:o,passHref:!0,children:(0,n.jsx)(a.FKJ,{children:"System linked"})})," ","successfully"]}):(0,n.jsxs)(n.Fragment,{children:["Link this integration in the"," ",(0,n.jsx)(eR(),{href:o,passHref:!0,children:(0,n.jsx)(a.FKJ,{children:"system inventory"})}),'. Navigate to the appropriate system and within the integration tab select "Link integration".']}),state:i?"finish":"process"}},eq=e=>{let{testData:t,testIsLoading:i,connectionOption:o,connection:l}=e,r=eE(),s=eD({testData:t,testIsLoading:i,connection:l,connectionOption:o}),d=eU({testData:t,testIsLoading:i,connection:l,connectionOption:o}),c=eL({testData:t,testIsLoading:i,connection:l,connectionOption:o}),u=(0,g.useMemo)(()=>[r,s,d,c].filter(e=>null!==e),[r,s,d,c]),_=(0,g.useMemo)(()=>u.map(e=>({...e,icon:"finish"===e.state?(0,n.jsx)(a.PJP.WzW,{size:24}):void 0})),[u]);return(0,n.jsx)(a.V4A,{title:"Integration setup","data-testid":"integration-setup-card",children:(0,n.jsx)(a.XX8,{direction:"vertical",current:(()=>{let e=u.findIndex(e=>"finish"!==e.state);return -1===e&&u.length>0?u.length-1:e})(),status:(()=>{let e=u.findIndex(e=>"finish"!==e.state);return -1===e?"finish":u[e].state})(),items:_,size:"small"})})};var eO=i(80388),eP=()=>{var e,t,i,m;let{query:h}=(0,o.useRouter)(),g=Array.isArray(h.id)?h.id[0]:h.id,{data:p,isLoading:F}=(0,c.jA)(null!=g?g:""),b=null==p?void 0:null===(e=p.saas_config)||void 0===e?void 0:e.type,x=(0,eN.Z)(null==p?void 0:p.connection_type,b&&Object.values(eO.m).includes(b)?b:void 0),{testConnection:y,isLoading:v,testData:f}=(0,u.Z)(p),{handleAuthorize:S,needsAuthorization:j}=(0,eA.z)({connection:p,connectionOption:x,testData:f}),{onOpen:C,isOpen:N,onClose:T}=(0,a.qY0)(),{overview:w,instructions:A,description:k,enabledFeatures:M}=(0,_.ZP)(null==p?void 0:p.connection_type,null==p?void 0:null===(t=p.saas_config)||void 0===t?void 0:t.type),D=(0,o.useRouter)();p&&!_.jq.includes(p.connection_type)&&D.push(s.KH);let E=(null==p?void 0:p.connection_type)!==Q.Rj.MANUAL_WEBHOOK,U=[];return(null==M?void 0:M.includes(eM.j.WITHOUT_CONNECTION))?U.push({label:"Details",content:(0,n.jsxs)(a.xuv,{children:[(0,n.jsx)(a.kCb,{children:(0,n.jsx)(a.wpx,{onClick:C,"data-testid":"manage-btn",children:"Edit integration"})}),(0,n.jsx)(eT,{isOpen:N,onClose:T,connection:p,description:k}),w,A]})}):U.push({label:"Connection",content:(0,n.jsxs)(a.xuv,{children:[E&&(0,n.jsxs)(a.kCb,{borderRadius:"md",outline:"1px solid",outlineColor:"gray.100",align:"center",p:3,children:[(0,n.jsx)(a.kCb,{flexDirection:"column",children:(0,n.jsx)(ew.Z,{testData:f,connectionOption:x})}),(0,n.jsx)(a.LZC,{}),(0,n.jsxs)("div",{className:"flex gap-4",children:[j&&(0,n.jsx)(a.wpx,{onClick:S,"data-testid":"authorize-integration-btn",children:"Authorize integration"}),!j&&(0,n.jsx)(a.wpx,{onClick:y,loading:v,"data-testid":"test-connection-btn",children:"Test connection"}),(0,n.jsx)(a.wpx,{onClick:C,"data-testid":"manage-btn",children:"Manage"})]})]}),(0,n.jsx)(eT,{isOpen:N,onClose:T,connection:p,description:k}),w,A]})}),(null==M?void 0:M.includes(eM.j.DATA_SYNC))&&U.push({label:"Data sync",content:(0,n.jsx)(ej,{integration:p})}),(null==M?void 0:M.includes(eM.j.DATA_DISCOVERY))&&U.push({label:"Data discovery",content:(0,n.jsx)(ev,{integration:p,integrationOption:x})}),(0,n.jsx)(r.Z,{title:"Integrations",children:(0,n.jsx)(d.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations",href:s.KH},{title:null!==(m=null!==(i=null==p?void 0:p.name)&&void 0!==i?i:null==p?void 0:p.key)&&void 0!==m?m:""}],children:(0,n.jsxs)(a.jqI,{gap:24,children:[(0,n.jsxs)("div",{className:"grow",children:[(0,n.jsx)("div",{className:"mb-6",children:(0,n.jsx)(ek.Z,{integration:p,showDeleteButton:!0})}),F?(0,n.jsx)(a.$jN,{}):!!p&&(0,n.jsx)(l.Z,{data:U,border:"full-width",isLazy:!0})]}),(0,n.jsx)("div",{className:"w-[350px] shrink-0",children:F?(0,n.jsx)(a.$jN,{}):!!p&&(0,n.jsx)(eq,{testData:f,testIsLoading:v,connectionOption:x,connection:p})})]})})})}},16964:function(e){e.exports={errorResultTimestamp:"MonitorStatusCell_errorResultTimestamp__DQQWt",errorTagText:"MonitorStatusCell_errorTagText___MiU0"}}},function(e){e.O(0,[8033,6060,2858,2866,9278,699,3662,1316,7553,4481,6662,2888,9774,179],function(){return e(e.s=50697)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[710],{66726:function(e,t,n){var i=n(11611),a=n(82846),o=n(91936),l=Math.max,r=Math.min;e.exports=function(e,t,n){var s,c,d,u,p,m,h=0,x=!1,v=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function g(t){var n=s,i=c;return s=c=void 0,h=t,u=e.apply(i,n)}function y(e){var n=e-m,i=e-h;return void 0===m||n>=t||n<0||v&&i>=d}function w(){var e,n,i,o=a();if(y(o))return j(o);p=setTimeout(w,(e=o-m,n=o-h,i=t-e,v?r(i,d-n):i))}function j(e){return(p=void 0,f&&s)?g(e):(s=c=void 0,u)}function C(){var e,n=a(),i=y(n);if(s=arguments,c=this,m=n,i){if(void 0===p)return h=e=m,p=setTimeout(w,t),x?g(e):u;if(v)return clearTimeout(p),p=setTimeout(w,t),g(m)}return void 0===p&&(p=setTimeout(w,t)),u}return t=o(t)||0,i(n)&&(x=!!n.leading,d=(v="maxWait"in n)?l(o(n.maxWait)||0,t):d,f="trailing"in n?!!n.trailing:f),C.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=m=c=p=void 0},C.flush=function(){return void 0===p?u:j(a())},C}},82846:function(e,t,n){var i=n(77400);e.exports=function(){return i.Date.now()}},9387:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations",function(){return n(4561)}])},30952:function(e,t,n){"use strict";n.d(t,{f:function(){return s}});var i=n(24246),a=n(66726),o=n.n(a),l=n(27378),r=n(26917);let s=e=>{let{value:t,onChange:n,placeholder:a,...s}=e,[c,d]=(0,l.useState)(t),u=o()(n,500),p=(0,l.useCallback)(e=>{d(e),u(e)},[]);return(0,i.jsx)(r.Z,{value:c,onChange:p,onClear:()=>{d(""),n("")},placeholder:a,...s})}},4561:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Z}});var i,a,o,l,r=n(24246),s=n(62051),c=n(86677),d=n(27378),u=n(30952),p=n(62165),m=n(18225),h=n(77213),x=n(77830),v=n(58754),f=n(16394),g=n(41337),y=n(14207),w=n(8133),j=n(52352),C=n(15987),b=n(75595),k=e=>{let{integrationType:t,onConfigure:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Z,{integration:null==t?void 0:t.placeholder,onConfigureClick:n}),null==t?void 0:t.overview]})},_=n(25980),N=e=>{let t=(0,d.useRef)(null);return(0,d.useEffect)(()=>{let n=n=>{!t.current||t.current.contains(n.target)||n.target.closest('button, [role="button"], a, input, select, textarea')||e()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e]),t},S=e=>{var t;let{integration:n,selected:i=!1,onClick:a,onDetailsClick:o,onUnfocus:l}=e,c=(0,j.ZP)(null==n?void 0:n.connection_type,null==n?void 0:null===(t=n.saas_config)||void 0===t?void 0:t.type),d=N(()=>{i&&l&&l()});return(0,r.jsxs)(s.xuv,{ref:d,borderWidth:1,borderColor:i?"black":"gray.200",backgroundColor:i?"gray.50":"transparent",boxShadow:i?"md":"none",borderRadius:"lg",overflow:"hidden",padding:"12px",cursor:"pointer",onClick:a,"data-testid":"integration-info-".concat(null==n?void 0:n.key),children:[(0,r.jsxs)(s.kCb,{justifyContent:"space-between",alignItems:"flex-start",children:[(0,r.jsxs)(s.kCb,{flexGrow:1,children:[(0,r.jsx)(g.Z,{data:null!=n?n:"",boxSize:"40px"}),(0,r.jsxs)(s.kCb,{direction:"column",flexGrow:1,marginLeft:"12px",marginRight:"12px",children:[(0,r.jsx)(s.xvT,{color:"gray.700",fontWeight:"semibold",fontSize:"sm",children:(null==n?void 0:n.name)||"(No name)"}),(0,r.jsx)(s.xvT,{color:"gray.600",fontSize:"xs",mt:1,children:c.category})]})]}),o&&(0,r.jsx)(s.wpx,{size:"small",onClick:e=>{e.stopPropagation(),o()},type:"default",className:"px-2 py-1 text-xs","data-testid":"details-btn-".concat(null==n?void 0:n.key),children:"Details"})]}),(0,r.jsxs)(s.Eq9,{marginTop:"12px",spacing:1,children:[c.tags.slice(0,3).map(e=>(0,r.jsx)(s.j8w,{children:e},e)),c.tags.length>3&&(0,r.jsxs)(s.j8w,{color:"corinth",children:["+",c.tags.length-3]})]})]})};(i=o||(o={})).ALL="All",i.CRM="CRM",i.DATA_CATALOG="Data Catalog",i.DATABASE="Database",i.DATA_WAREHOUSE="Data Warehouse",i.IDENTITY_PROVIDER="Identity Provider",i.WEBSITE="Website",i.MANUAL="Manual";var T=e=>{let{selectedIntegration:t,onSelectIntegration:n,onDetailClick:i}=e,[a,l]=(0,d.useState)(""),[c,u]=(0,d.useState)(o.ALL),[p,h]=(0,d.useState)(!1),{flags:{oktaMonitor:x,alphaNewManualIntegration:v}}=(0,_.Vb)(),f=(0,d.useMemo)(()=>Object.values(o).filter(e=>(e!==o.IDENTITY_PROVIDER||x)&&(e!==o.MANUAL||v)),[x,v]),g=(0,d.useMemo)(()=>{let e=j.FO;if(c!==o.ALL&&(e=e.filter(e=>e.category===c)),a.trim()){let t=a.toLowerCase();e=e.filter(e=>(e.placeholder.name||"").toLowerCase().includes(t))}return e.filter(e=>(!!x||"okta"!==e.placeholder.connection_type)&&(!!v||"manual_webhook"!==e.placeholder.connection_type))},[a,c,x,v]),y=f.map(e=>({label:e,value:e}));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-4 mt-3 flex items-center justify-between gap-4",children:[(0,r.jsx)(s.uFc,{placeholder:"Search by name...",value:a,onChange:e=>l(e.target.value),className:"w-64",allowClear:!0}),(0,r.jsx)(s.WPr,{value:c,onChange:e=>{h(!0),u(e),setTimeout(()=>h(!1),100)},options:y,className:"w-48",placeholder:"Select category","data-testid":"category-filter-select"})]}),p?(0,r.jsx)(m.Z,{}):(0,r.jsx)("div",{className:"grid grid-cols-3 gap-6",children:g.map(e=>(0,r.jsx)("div",{children:(0,r.jsx)(S,{integration:e.placeholder,selected:(null==t?void 0:t.placeholder.key)===e.placeholder.key,onClick:()=>{n((null==t?void 0:t.placeholder.key)===e.placeholder.key?void 0:e)},onDetailsClick:()=>i(e),onUnfocus:()=>n(void 0)})},e.placeholder.key))})]})},A=n(64176);(a=l||(l={})).LIST_VIEW="list-view",a.DETAIL="detail",a.FORM="form";var I=e=>{var t,n,i;let{isOpen:a,onClose:o}=e,[l,c]=(0,d.useState)("list-view"),[u,p]=(0,d.useState)(null),[m,h]=(0,d.useState)(),[x,v]=(0,d.useState)(null),f=(0,A.Z)(null==m?void 0:m.placeholder.connection_type,null==m?void 0:null===(n=m.placeholder)||void 0===n?void 0:null===(t=n.saas_config)||void 0===t?void 0:t.type),{description:g}=(0,j.ZP)(null==m?void 0:m.placeholder.connection_type,null==m?void 0:null===(i=m.placeholder.saas_config)||void 0===i?void 0:i.type),y=()=>{c("list-view"),p(null),h(void 0),v(null),o()},b=()=>{p("detail"),c("form")},_=m&&"list-view"!==l?"".concat(m.placeholder.name," Integration"):"Add integration",N="list-view"===l?(0,r.jsxs)("div",{className:"flex w-full justify-between",children:[(0,r.jsx)(s.wpx,{onClick:y,children:"Cancel"}),(0,r.jsx)(s.wpx,{type:"primary",onClick:()=>{"list-view"===l&&m&&(p("list-view"),c("form"))},disabled:!m,children:"Next"})]}):"detail"===l?(0,r.jsxs)("div",{className:"flex w-full justify-between",children:[(0,r.jsx)(s.wpx,{onClick:()=>c("list-view"),children:"Back"}),(0,r.jsx)(s.wpx,{onClick:b,type:"primary","data-testid":"configure-modal-btn",children:"Next"})]}):"form"===l?(0,r.jsxs)("div",{className:"flex w-full justify-between",children:[(0,r.jsx)(s.wpx,{onClick:()=>{u&&(c(u),p(null))},children:"Back"}),(0,r.jsx)(s.wpx,{type:"primary",onClick:()=>{x&&x.submitForm&&x.submitForm()},disabled:!x||!x.isValid||!x.dirty,loading:null==x?void 0:x.loading,"data-testid":"save-btn",children:"Save"})]}):null;return(0,r.jsxs)(w.Z,{isOpen:a,onClose:y,title:_,scrollBehavior:"inside",showCloseButton:!0,modalContentProps:{height:"700px",maxWidth:"1010px"},footer:N,children:["list-view"===l&&(0,r.jsx)(T,{selectedIntegration:m,onSelectIntegration:e=>{h(e)},onDetailClick:e=>{c("detail"),h(e)}}),"detail"===l&&(0,r.jsx)(k,{integrationType:m,onConfigure:b}),"form"===l&&(0,r.jsx)(C.Z,{connectionOption:f,onCancel:y,description:g,onFormStateChange:v})]})},E=n(40774),L=n(46420),Z=()=>{let[e,t]=(0,d.useState)(1),[n,i]=(0,d.useState)(50),[a,o]=(0,d.useState)(""),l=(0,c.useRouter)(),w=(0,d.useCallback)(a=>{(null==a?void 0:a.current)!==e&&t(a.current),(null==a?void 0:a.pageSize)&&a.pageSize!==n&&i(a.pageSize)},[e,n]),{flags:C}=(0,p.Vb)(),b=(0,d.useMemo)(()=>j.jq.filter(e=>e!==L.Rj.MANUAL_WEBHOOK||C.alphaNewManualIntegration),[C.alphaNewManualIntegration]),{data:k,isLoading:_}=(0,y.AZ)({connection_type:b,size:n,page:e,search:a.trim()||void 0}),{items:N,total:S}=null!=k?k:{},{onOpen:T,isOpen:A,onClose:Z}=(0,s.qY0)(),M=(0,d.useMemo)(()=>{var e;return null!==(e=null==N?void 0:N.map(e=>{var t;return{...e,integrationTypeInfo:(0,j.ZP)(e.connection_type,null===(t=e.saas_config)||void 0===t?void 0:t.type)}}))&&void 0!==e?e:[]},[N]),D=e=>{l.push("".concat(x.KH,"/").concat(e.key))},O=[{title:"Name",dataIndex:"name",key:"name",width:250,render:(e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(g.Z,{data:t,boxSize:"20px"}),(0,r.jsx)(s.AntTypography.Text,{ellipsis:{tooltip:e||"(No name)"},className:"font-semibold",children:e||"(No name)"})]})},{title:"Type",dataIndex:"connection_type",key:"connection_type",width:150,render:e=>{var t,n;return(0,j.ZP)(e,null==N?void 0:null===(n=N.find(t=>t.connection_type===e))||void 0===n?void 0:null===(t=n.saas_config)||void 0===t?void 0:t.type).placeholder.name||e}},{title:"Capabilities",dataIndex:["integrationTypeInfo","tags"],key:"capabilities",width:300,render:e=>(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:e.map(e=>(0,r.jsx)(s.j8w,{children:e},e))})},{title:"Connection Status",key:"connection_status",width:150,render:(e,t)=>{let{status:n,color:i}=null===t.last_test_timestamp||void 0===t.last_test_timestamp?{status:"Untested",color:"default"}:!0===t.last_test_succeeded?{status:"Healthy",color:"success"}:!1===t.last_test_succeeded?{status:"Failed",color:"error"}:{status:"Untested",color:"default"},a=t.last_test_timestamp?"Last connection: ".concat((0,f.p6)(t.last_test_timestamp)):"The connection has not been tested";return(0,r.jsx)(s.esZ,{title:a,children:(0,r.jsx)(s.j8w,{color:i,children:n})})}},{title:"Actions",key:"actions",width:100,render:(e,t)=>(0,r.jsx)(s.wpx,{onClick:()=>D(t),"data-testid":"manage-btn-".concat(t.key),size:"small",children:"Manage"})}],R={emptyText:a.trim()?"No integrations match your search":(0,r.jsx)("div",{"data-testid":"empty-state",children:'You have not configured any integrations. Click "Add Integration" to connect and configure systems now.'})};return(0,r.jsxs)(h.Z,{title:"Integrations",children:[(0,r.jsx)(v.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations"}],rightContent:(0,r.jsx)(s.wpx,{onClick:T,"data-testid":"add-integration-btn",type:"primary",children:"Add integration"})}),(0,r.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-4",children:[(0,r.jsx)(u.f,{placeholder:"Search by name...",value:a,onChange:e=>{o(e),t(1)},className:"max-w-sm"}),(0,r.jsx)(E.Z,{})]}),_?(0,r.jsx)(m.Z,{}):(0,r.jsx)(s.V5H,{columns:O,dataSource:M,rowKey:"key",pagination:{current:e,pageSize:n,total:S,showSizeChanger:!0,showQuickJumper:!1,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," integrations"),pageSizeOptions:["10","25","50","100"]},loading:_,size:"small",locale:R,bordered:!0,onRow:e=>({onClick:()=>D(e),"data-testid":"integration-info-".concat(e.key)}),rowClassName:"cursor-pointer",onChange:w,"data-testid":"integrations-table"}),(0,r.jsx)(I,{isOpen:A,onClose:Z})]})}}},function(e){e.O(0,[8033,6060,2858,2866,9278,699,3662,1316,7553,4481,6662,2888,9774,179],function(){return e(e.s=9387)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9196],{67375:function(e,t,s){var a=s(52033),r=s(80068);e.exports=function(e,t){var s=-1,i=r(e)?Array(e.length):[];return a(e,function(e,a,r){i[++s]=t(e,a,r)}),i}},55807:function(e,t,s){var a=s(66070),r=s(89278),i=s(67375),o=s(19785);e.exports=function(e,t){return(o(e)?a:i)(e,r(t,3))}},32526:function(e,t,s){var a=s(68267)(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});e.exports=a},86548:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reporting/datamap",function(){return s(27901)}])},624:function(e,t,s){"use strict";var a=s(24246),r=s(62051),i=s(27378);let o=e=>{let t=e.split("."),s=[];return t.forEach(e=>{let t=s.length>0?s[s.length-1]:null;t?s.push("".concat(t,".").concat(e)):s.push(e)}),s},n=(e,t)=>{let s=o(t).filter(e=>e!==t);return e.filter(e=>s.includes(e)).length>0},l=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,s)=>{let a=null!=s?s:[];return e.forEach(e=>{e.children&&c(e.children,t,a),l(e.value,t)&&a.push(e)}),a},d=e=>{let{node:t,isChecked:s,onChecked:i,isExpanded:o,onExpanded:n,isIndeterminate:l,isDisabled:c,children:d}=e,{value:u,label:_}=t,p=!!t.children&&t.children.length>0;return(0,a.jsxs)(r.xuv,{children:[(0,a.jsxs)(r.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>n(t),minHeight:8,children:[(0,a.jsx)(r.XZJ,{colorScheme:"complimentary",value:u,isChecked:!l&&s,isIndeterminate:l,isDisabled:c,onChange:()=>i(t),mx:2,"data-testid":"checkbox-".concat(_),children:_}),p?(0,a.jsx)(r.wpx,{"data-testid":"expand-".concat(_),"aria-label":o?"collapse":"expand",icon:(0,a.jsx)(r.v4q,{boxSize:5}),type:"text",onClick:()=>n(t),className:o?"rotate-180":void 0}):null]}),d&&(0,a.jsx)(r.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:s,onSelected:u,..._}=e,[p,m]=(0,i.useState)([]),[E,S]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=Array.from(new Set([...s.map(e=>o(e)).reduce((e,t)=>e.concat(t),[]),...s.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));S(e),m(e)},[s,t]);let h=e=>{let a=[],r=[];p.indexOf(e.value)>=0?(a=p.filter(t=>!l(t,e.value)),r=s.filter(t=>!l(t,e.value))):(a=[...p,...c(t,e.value).map(e=>e.value)],r=[...s,e.value]),m(a),u(r)},A=e=>{E.indexOf(e.value)>=0?S(E.filter(t=>!l(t,e.value))):S([...E,e.value])},g=e=>{if(e.children){let r=p.indexOf(e.value)>=0,o=E.indexOf(e.value)>=0,l=c(t,e.value),u=r&&e.children.length>0&&p.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==l.length,_=n(s,e.value);return(0,a.jsx)(d,{node:e,isChecked:r,onChecked:h,isExpanded:o,onExpanded:A,isDisabled:_,isIndeterminate:u,children:o?e.children.map(e=>(0,a.jsx)(i.Fragment,{children:g(e)},e.value)):void 0})}return null};return(0,a.jsx)(r.xuv,{..._,children:t.map(e=>(0,a.jsx)(r.xuv,{children:g(e)},e.value))})}},35287:function(e,t,s){"use strict";var a=s(24246),r=s(62051),i=s(88038),o=s.n(i);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:i}=e;return(0,a.jsxs)(r.kCb,{"data-testid":s,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,a.jsxs)(o(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...i,children:t})]})}},56358:function(e,t,s){"use strict";s.d(t,{q:function(){return r}});var a=s(24246);let r=(0,s(62051).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,a.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},19904:function(e,t,s){"use strict";s.d(t,{Tg:function(){return o}});var a=s(24246),r=s(16134),i=s(31793);let o=e=>(0,r.C)(i.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:s}=e;return o(t)?(0,a.jsx)(a.Fragment,{children:s}):null}},70416:function(e,t,s){"use strict";s.d(t,{d:function(){return r}});var a=s(24246);let r=(0,s(62051).IUT)({displayName:"AddIcon",viewBox:"0 0 10 10",path:(0,a.jsx)("path",{d:"M4.33331 4.33398V0.333984H5.66665V4.33398H9.66665V5.66732H5.66665V9.66732H4.33331V5.66732H0.333313V4.33398H4.33331Z",fill:"currentColor"})})},34929:function(e,t,s){"use strict";var a=s(24246),r=s(64925),i=s.n(r),o=s(27378),n=s(16134),l=s(30002),c=s(28079),d=s(57072);let u=()=>{let{isLoading:e}=(0,c.fd)(),t=(0,n.C)(c.U3),{isLoading:s}=(0,d.MO)(),a=(0,n.C)(d.qb),{isLoading:r}=(0,l.te)();return{dataUses:t,dataSubjects:(0,n.C)(l.ZL),dataCategories:a,isLoading:e||s||r}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:s,isLoading:r}=u(),n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},l=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=t(e);if(!a)return{};let r=t(n(e,s)),i=!!a.parent_key;return{name:a.name||void 0,primaryName:i&&(null==r?void 0:r.name)!==a.name&&(null==r?void 0:r.name)||void 0}},c=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:i}=l(e,t,s);return r?i?(0,a.jsxs)(o.Fragment,{children:[(0,a.jsxs)("strong",{children:[i,":"]})," ",r]},e):(0,a.jsx)("strong",{children:r},e):e},d=t=>i()(e,{fides_key:t}),_=e=>i()(t,{fides_key:e}),p=e=>i()(s,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:d,getDataUseDisplayName:e=>c(e,d,1),getDataUseDisplayNameProps:e=>l(e,d,1),getDataCategories:()=>t,getDataCategoryByKey:_,getDataCategoryDisplayName:e=>c(e,_,2),getDataCategoryDisplayNameProps:e=>l(e,_,2),getDataSubjects:()=>s,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:n,isLoading:r}}},59001:function(e,t,s){"use strict";s.d(t,{Ch:function(){return o},Hy:function(){return n},Lo:function(){return r}});var a,r,i=s(46420);let o="root";(a=r||(r={})).DATA_CATEGORIES="Data categories",a.DATA_USES="Data uses",a.DATA_SUBJECTS="Data subjects";let n=e=>{switch(e){case"Data categories":return{UPDATE:i.Sh.DATA_CATEGORY_UPDATE,CREATE:i.Sh.DATA_CATEGORY_CREATE,DELETE:i.Sh.DATA_CATEGORY_DELETE,READ:i.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:i.Sh.DATA_USE_UPDATE,CREATE:i.Sh.DATA_USE_CREATE,DELETE:i.Sh.DATA_USE_DELETE,READ:i.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:i.Sh.DATA_SUBJECT_UPDATE,CREATE:i.Sh.DATA_SUBJECT_CREATE,DELETE:i.Sh.DATA_SUBJECT_DELETE,READ:i.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,s){"use strict";s.d(t,{Cd:function(){return i},Xl:function(){return o}});var a=s(46420),r=s(59001);let i=(e,t)=>{let s;if(null==t&&e.every(e=>void 0===e.parent_key))s=e;else{let a=null!=t?t:null;s=e.filter(e=>e.parent_key===a)}return s.map(t=>{var s,a;let r=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:i(e,r),is_default:null!==(s=t.is_default)&&void 0!==s&&s,active:null!==(a=t.active)&&void 0!==a&&a}})},o=e=>{switch(e){case r.Lo.DATA_CATEGORIES:return a.P6.DATA_CATEGORY;case r.Lo.DATA_SUBJECTS:return a.P6.DATA_SUBJECT;case r.Lo.DATA_USES:return a.P6.DATA_USE;default:return}}},27901:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eC}});var a,r,i,o,n=s(24246),l=s(27378),c=s(35287),d=s(58754),u=s(71795),_=s(46420);(a=i||(i={})).COLUMN_EXPANSION_STATE="datamap-column-expansion-state",a.COLUMN_NAMES="datamap-column-names",a.COLUMN_ORDER="datamap-column-order",a.COLUMN_SIZING="datamap-column-sizing",a.COLUMN_VISIBILITY="datamap-column-visibility",a.CUSTOM_REPORT_ID="datamap-custom-report-id",a.FILTERS="datamap-filters",a.GROUP_BY="datamap-group-by",a.SORTING_STATE="datamap-sorting-state",a.WRAPPING_COLUMNS="datamap-wrapping-columns",(r=o||(o={})).SYSTEM_NAME="system_name",r.DATA_USE="data_uses",r.DATA_CATEGORY="data_categories",r.DATA_SUBJECT="data_subjects",r.LEGAL_NAME="legal_name",r.DPO="dpo",r.LEGAL_BASIS_FOR_PROCESSING="legal_basis_for_processing",r.ADMINISTRATING_DEPARTMENT="administrating_department",r.COOKIE_MAX_AGE_SECONDS="cookie_max_age_seconds",r.PRIVACY_POLICY="privacy_policy",r.LEGAL_ADDRESS="legal_address",r.COOKIE_REFRESH="cookie_refresh",r.DATA_SECURITY_PRACTICES="data_security_practices",r.DATA_SHARED_WITH_THIRD_PARTIES="data_shared_with_third_parties",r.DATA_STEWARDS="data_stewards",r.DECLARATION_NAME="declaration_name",r.DOES_INTERNATIONAL_TRANSFERS="does_international_transfers",r.DPA_LOCATION="dpa_location",r.DESTINATIONS="egress",r.EXEMPT_FROM_PRIVACY_REGULATIONS="exempt_from_privacy_regulations",r.FEATURES="features",r.FIDES_KEY="fides_key",r.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING="flexible_legal_basis_for_processing",r.IMPACT_ASSESSMENT_LOCATION="impact_assessment_location",r.SOURCES="ingress",r.JOINT_CONTROLLER_INFO="joint_controller_info",r.LEGAL_BASIS_FOR_PROFILING="legal_basis_for_profiling",r.LEGAL_BASIS_FOR_TRANSFERS="legal_basis_for_transfers",r.LEGITIMATE_INTEREST_DISCLOSURE_URL="legitimate_interest_disclosure_url",r.PROCESSES_PERSONAL_DATA="processes_personal_data",r.REASON_FOR_EXEMPTION="reason_for_exemption",r.REQUIRES_DATA_PROTECTION_ASSESSMENTS="requires_data_protection_assessments",r.RESPONSIBILITY="responsibility",r.RETENTION_PERIOD="retention_period",r.SHARED_CATEGORIES="shared_categories",r.SPECIAL_CATEGORY_LEGAL_BASIS="special_category_legal_basis",r.THIRD_PARTIES="third_parties",r.COOKIES="cookies",r.USES_COOKIES="uses_cookies",r.USES_NON_COOKIE_ACCESS="uses_non_cookie_access",r.USES_PROFILING="uses_profiling",r.SYSTEM_UNDECLARED_DATA_CATEGORIES="system_undeclared_data_categories",r.DATA_USE_UNDECLARED_DATA_CATEGORIES="data_use_undeclared_data_categories",r.PROCESSES_SPECIAL_CATEGORY_DATA="processes_special_category_data";let p={system_name:"System",data_uses:"Data use",data_categories:"Data categories",data_subjects:"Data subject",legal_name:"Legal name",dpo:"Data privacy officer",legal_basis_for_processing:"Legal basis for processing",administrating_department:"Administrating department",cookie_max_age_seconds:"Cookie max age seconds",privacy_policy:"Privacy policy",legal_address:"Legal address",cookie_refresh:"Cookie refresh",data_security_practices:"Data security practices",data_shared_with_third_parties:"Data shared with third parties",data_stewards:"Data stewards",declaration_name:"Declaration name",does_international_transfers:"Does international transfers",dpa_location:"DPA location",egress:"Destination",exempt_from_privacy_regulations:"Exempt from privacy regulations",features:"Features",fides_key:"Fides key",flexible_legal_basis_for_processing:"Flexible legal basis for processing",impact_assessment_location:"Impact assessment location",ingress:"Source",joint_controller_info:"Joint controller info",legal_basis_for_profiling:"Legal basis for profiling",legal_basis_for_transfers:"Legal basis for transfers",legitimate_interest_disclosure_url:"Legitimate interest disclosure URL",processes_personal_data:"Processes personal data",reason_for_exemption:"Reason for exemption",requires_data_protection_assessments:"Requires data protection assessments",responsibility:"Responsibility",retention_period:"Retention period",shared_categories:"Shared categories",special_category_legal_basis:"Special category legal basis",third_parties:"Third parties",system_undeclared_data_categories:"System undeclared data categories",data_use_undeclared_data_categories:"Data use undeclared data categories",cookies:"Cookies",uses_cookies:"Uses cookies",uses_non_cookie_access:"Uses non-cookie access",uses_profiling:"Uses profiling",processes_special_category_data:"Processes special category data"},m={[o.SYSTEM_UNDECLARED_DATA_CATEGORIES]:!1,[o.DATA_USE_UNDECLARED_DATA_CATEGORIES]:!1},E={dataUses:[],dataSubjects:[],dataCategories:[]},S=(0,l.createContext)({}),h=e=>{let{children:t}=e,[s,a]=(0,u._)(i.CUSTOM_REPORT_ID,""),[r,o]=(0,u._)(i.GROUP_BY,_.fI.SYSTEM_DATA_USE),[c,d]=(0,u._)(i.FILTERS,E),[p,h]=(0,u._)(i.COLUMN_ORDER,[]),[A,g]=(0,u._)(i.COLUMN_VISIBILITY,m),[f,x]=(0,u._)(i.COLUMN_SIZING,{}),[C,T]=(0,u._)(i.COLUMN_NAMES,{}),R=(0,l.useMemo)(()=>({savedCustomReportId:s,setSavedCustomReportId:a,groupBy:r,setGroupBy:o,selectedFilters:c,setSelectedFilters:d,columnOrder:p,setColumnOrder:h,columnVisibility:A,setColumnVisibility:g,columnSizing:f,setColumnSizing:x,columnNameMapOverrides:C,setColumnNameMapOverrides:T}),[s,a,r,o,c,d,p,h,A,g,f,x,C,T]);return(0,n.jsx)(S.Provider,{value:R,children:t})},A=()=>{let e=(0,l.useContext)(S);if(!e||0===Object.keys(e).length)throw Error("useDatamapReport must be used within a DatamapReportProvider");return e};var g=s(59003),f=s(92222),x=s(14481),C=s(62051),T=s(34090),R=s(66726),O=s.n(R),j=s(16134),v=s(34929),b=s(14048),D=s(19904),y=s(16394),I=s(38943),N=s(35258),L=e=>{let{children:t,heading:s,onCancel:a,onConfirm:r,isLoading:i,cancelButtonText:o,continueButtonText:l,"data-testid":c="standard-dialog",...d}=e,{onClose:u}=d;return(0,n.jsxs)(C.u_l,{closeOnOverlayClick:i,...d,children:[(0,n.jsx)(C.ZAr,{}),(0,n.jsxs)(C.hzk,{"data-testid":c,children:[s&&(0,n.jsx)(C.xBx,{children:s}),(0,n.jsx)(C.olH,{isDisabled:i,"data-testid":"standard-dialog-close-btn"}),t&&(0,n.jsx)(C.fef,{children:t}),(0,n.jsxs)(C.mzw,{gap:3,width:"100%",sx:{"& button":{width:"100%"}},children:[(0,n.jsx)(C.wpx,{onClick:()=>{a&&a(),u()},"data-testid":"".concat(c?"".concat(c,"-"):"","cancel-btn"),disabled:i,children:o||"Cancel"}),(0,n.jsx)(C.wpx,{onClick:r,type:"primary","data-testid":"".concat(c?"".concat(c,"-"):"","continue-btn"),loading:i,children:l||"Continue"})]})]})]})},w=s(22968),M=e=>{let[t,s]=(0,l.useState)(w.T2.csv),{onConfirm:a}=e;return(0,n.jsx)(L,{heading:"Export report",continueButtonText:"Download",size:"xl",...e,onConfirm:()=>a(t),"data-testid":"export-modal",children:(0,n.jsxs)(C.kCb,{direction:"column",gap:3,pb:3,children:[(0,n.jsx)(C.xvT,{textAlign:"left",children:"Export your data map report using the options below. Depending on the number of rows, the file may take a few minutes to process."}),(0,n.jsxs)(C.NIc,{children:[(0,n.jsx)(C.lXp,{htmlFor:"format",children:"Choose Format"}),(0,n.jsx)(C.WPr,{id:"format",value:t,onChange:s,"data-testid":"export-format-select",options:[{value:w.T2.csv,label:"CSV"},{value:w.T2.xlsx,label:"XLSX"}],className:"w-full"})]})]})})},P=s(624),U=s(30002),k=s(28079),G=s(90673),H=s(39864);let Y=e=>{let{label:t,children:s,...a}=e;return(0,n.jsxs)(C.Qdk,{...a,children:[(0,n.jsx)(C.X6q,{children:(0,n.jsxs)(C.KFZ,{height:"100%","data-testid":"filter-modal-accordion-button",textAlign:"left",fontWeight:600,children:[(0,n.jsx)(C.xuv,{flex:1,children:t}),(0,n.jsx)(C.XEm,{boxSize:7})]})}),(0,n.jsx)(C.Hk3,{children:s})]})},F=e=>{let{columnNameMap:t,selectedFilters:s,onFilterChange:a,onClose:r,...i}=e;(0,k.fd)(),(0,U.te)(),(0,H.MO)();let{dataUses:o,dataSubjects:c,dataCategories:d}=s,u=(0,j.C)(k.U3),_=(0,j.C)(U.ZL),p=(0,j.C)(H.qb),[m,E]=(0,l.useState)(o),[S,h]=(0,l.useState)(c),[A,g]=(0,l.useState)(d);(0,l.useEffect)(()=>{E(o)},[o]),(0,l.useEffect)(()=>{h(c)},[c]),(0,l.useEffect)(()=>{g(d)},[d]);let f=(0,l.useMemo)(()=>(0,G.Cd)(u),[u]),x=(0,l.useMemo)(()=>(0,G.Cd)(_),[_]),T=(0,l.useMemo)(()=>(0,G.Cd)(p),[p]);return(0,n.jsx)(L,{heading:"Filter Datamap Report",...i,onCancel:()=>{E([]),h([]),g([]),a({dataUses:[],dataSubjects:[],dataCategories:[]}),r()},onConfirm:()=>{a({dataUses:m,dataSubjects:S,dataCategories:A}),r()},onClose:r,cancelButtonText:"Reset filters",continueButtonText:"Done","data-testid":"datamap-report-filter-modal",children:(0,n.jsxs)(C.UQy,{allowToggle:!0,children:[(0,n.jsx)(Y,{label:t.data_uses,children:(0,n.jsx)(P.ZP,{nodes:f,selected:m,onSelected:E,"data-testid":"filter-modal-checkbox-tree-uses"})}),(0,n.jsx)(Y,{label:t.data_categories,children:(0,n.jsx)(P.ZP,{nodes:T,selected:A,onSelected:g,"data-testid":"filter-modal-checkbox-tree-categories"})}),(0,n.jsx)(Y,{label:t.data_subjects,children:(0,n.jsx)(P.ZP,{nodes:x,selected:S,onSelected:h,"data-testid":"filter-modal-checkbox-tree-subjects"})})]})})};var V=s(32885),Z=s(70416),B=s(812),z=s(56358);let{useGetMinimalCustomReportsQuery:W,useLazyGetCustomReportByIdQuery:q,usePostCustomReportMutation:X,useDeleteCustomReportMutation:J}=s(78780).u.injectEndpoints({endpoints:e=>({getMinimalCustomReports:e.query({query:e=>{let{pageIndex:t=1,pageSize:s=50,report_type:a=_.C2.DATAMAP}=e,r="page=".concat(t,"&size=").concat(s,"&report_type=").concat(a);return{url:"plus/custom-report/minimal?".concat(r)}},providesTags:["Custom Reports"]}),getCustomReportById:e.query({query:e=>({url:"plus/custom-report/".concat(e)}),providesTags:(e,t,s)=>[{type:"Custom Reports",id:s}]}),postCustomReport:e.mutation({query:e=>({method:"POST",url:"plus/custom-report",body:e}),invalidatesTags:["Custom Reports"]}),deleteCustomReport:e.mutation({query:e=>({method:"DELETE",url:"plus/custom-report/".concat(e)}),invalidatesTags:["Custom Reports"]})})});var K=s(55484),Q=s(40324);let $="Report name",ee=e=>{let{isOpen:t,handleClose:s,tableStateToSave:a,columnMapToSave:r={},unavailableNames:i,onCreateCustomReport:o}=e,c=(0,C.pmc)(),[d]=X(),u=(0,l.useMemo)(()=>K.Ry().shape({reportName:K.Z_().label($).required("Please provide a name for this report").test("is-unique","",async(e,t)=>null==i||!i.includes(e)||t.createError({message:"This name already exists"})).max(80,"Report name is too long (max 80 characters)")}),[i]),p=async e=>{var t;let i={};Object.entries(r).forEach(e=>{let[t,s]=e;i[t]={label:s,enabled:!0}}),Object.entries(null!==(t=null==a?void 0:a.columnVisibility)&&void 0!==t?t:{}).forEach(e=>{let[t,s]=e;i[t]||(i[t]={}),i[t].enabled=s});try{let t={name:e.trim(),type:_.C2.DATAMAP,config:{column_map:i,table_state:a}},r=await d(t);if((0,B.D4)(r))throw r.error;o(r.data),s()}catch(e){c({status:"error",description:(0,B.e$)(e,"A problem occurred while creating the report.")})}};return(0,n.jsxs)(C.u_l,{size:"lg",isOpen:t,onClose:s,motionPreset:"none",children:[(0,n.jsx)(C.ZAr,{}),(0,n.jsxs)(C.hzk,{children:[(0,n.jsx)(C.xBx,{pb:0,children:"Create a report"}),(0,n.jsx)(T.J9,{initialValues:{reportName:""},onSubmit:e=>p(e.reportName),onReset:s,validateOnBlur:!1,validationSchema:u,children:e=>{let{dirty:t,isValid:s}=e;return(0,n.jsxs)(T.l0,{"data-testid":"custom-report-form",children:[(0,n.jsxs)(C.fef,{children:[(0,n.jsx)(C.xvT,{fontSize:"sm",color:"gray.600",pb:6,children:"Customize and save your current filter settings for easy access in the future. This saved report will include the column layout and currently applied filter settings."}),(0,n.jsx)(Q.j0,{id:"reportName",name:"reportName",isRequired:!0,label:$,placeholder:"Enter a name for the report...",variant:"stacked",maxLength:80})]}),(0,n.jsxs)(C.mzw,{gap:2,children:[(0,n.jsx)(C.wpx,{size:"small",htmlType:"reset",children:"Cancel"}),(0,n.jsx)(C.wpx,{size:"small",disabled:!t||!s,type:"primary","data-testid":"custom-report-form-submit",htmlType:"submit",children:"Save"})]})]})}})]})]})},et="Report",es="Reports",ea=e=>{var t;let{reportType:s,savedReportId:a,tableStateToSave:r,currentColumnMap:i,onCustomReportSaved:o,onSavedReportDeleted:c}=e,d=(0,D.Tg)([_.Sh.CUSTOM_REPORT_CREATE]),u=(0,D.Tg)([_.Sh.CUSTOM_REPORT_DELETE]),p=(0,C.pmc)({id:"custom-report-toast"}),{data:m,isLoading:E}=W({report_type:s}),[S,h]=(0,l.useState)(),[A]=q(),[g]=J(),{isOpen:f,onToggle:x,onOpen:R,onClose:O}=(0,C.qY0)(),{isOpen:j,onOpen:v,onClose:b}=(0,C.qY0)(),{isOpen:y,onOpen:I,onClose:N}=(0,C.qY0)(),[L,w]=(0,l.useState)(),[M,P]=(0,l.useState)(),[U,k]=(0,l.useState)(),[G,H]=(0,l.useState)(!1),{resetForm:Y}=(0,T.u6)(),F=(0,l.useMemo)(()=>{var e;let t=null==m?void 0:null===(e=m.items.find(e=>e.id===a))||void 0===e?void 0:e.name;return null!=t?t:es},[null==m?void 0:m.items,a]),V=!E&&!(null==m?void 0:null===(t=m.items)||void 0===t?void 0:t.length),X=e=>{h(null==m?void 0:m.items.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())))},K=async e=>{w(e);let{data:t,isError:s,error:a}=await A(e);if(s){let e=(0,B.e$)(a,"A problem occurred while fetching the ".concat(et,"."));e.includes("not found")&&c(),p({status:"error",description:e})}else P(t)},Q=()=>{w(""),P(void 0),H(!1)},$=()=>{M?(H(!1),M.id!==a&&o(M,Y),O()):L?H(!0):(o(null,Y),O())},ea=async e=>{e===(null==M?void 0:M.id)&&(Q(),c()),g(e)};(0,l.useEffect)(()=>{m&&h(m.items)},[m]),(0,l.useEffect)(()=>{G&&(H(!1),$())},[M]),(0,l.useEffect)(()=>{a?K(a):Q()},[a]),(0,l.useEffect)(()=>{U&&I()},[I,U]);let er=!M&&!a||(null==M?void 0:M.id)===a;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(C.J2e,{placement:"bottom-end",isOpen:f,onClose:$,id:"custom-reports-selection",children:[(0,n.jsx)(C.xol,{children:(0,n.jsx)(C.wpx,{className:"max-w-40",icon:(0,n.jsx)(C.v4q,{}),iconPosition:"end","data-testid":"custom-reports-trigger",onClick:x,children:(0,n.jsx)(C.xvT,{noOfLines:1,display:"inline-block",children:F})})}),(0,n.jsx)(C.h_i,{children:(0,n.jsxs)(C.yky,{"data-testid":"custom-reports-popover",children:[(0,n.jsx)(C.QHN,{}),(0,n.jsx)(T.J9,{initialValues:{},onSubmit:$,onReset:Q,children:(0,n.jsxs)(T.l0,{children:[(0,n.jsx)(C.wpx,{size:"small",disabled:V,htmlType:"reset",className:"absolute left-2 top-2","data-testid":"custom-reports-reset-button",children:"Reset"}),(0,n.jsxs)(C.Ytg,{textAlign:"center",children:[(0,n.jsx)(C.xvT,{fontSize:"sm",children:es}),(0,n.jsx)(C.BZy,{size:"sm",mt:3,children:(0,n.jsx)(C.IIB,{type:"text",borderRadius:"md",placeholder:"Search...",onChange:e=>X(e.target.value)})})]}),(0,n.jsx)(C.usR,{top:2,onClick:()=>{a?K(a):Q(),O()},"data-testid":"custom-report-popover-cancel"}),(0,n.jsxs)(C.baG,{px:6,pt:5,pb:1,children:[V&&(0,n.jsxs)(C.gCW,{px:2,pt:6,pb:3,"data-testid":"custom-reports-empty-state",children:[(0,n.jsx)(C.wpx,{type:"primary",size:"small","aria-label":"add ".concat(et),icon:(0,n.jsx)(Z.d,{}),onClick:v,className:"rounded-full","data-testid":"add-report-button"}),(0,n.jsxs)(C.xvT,{fontSize:"sm",textAlign:"center",color:"gray.500",children:["No ",es.toLowerCase()," have been created. Start by applying your preferred filter and column settings, then create a"," ",et.toLowerCase()," for easy access later."]})]}),!V&&(E?(0,n.jsxs)(C.gCW,{pb:2,children:[(0,n.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]}),(0,n.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]}),(0,n.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]})]}):(0,n.jsx)(C.y02.Group,{onChange:e=>K(e.target.value),value:L,className:"flex flex-col gap-2",children:null==S?void 0:S.map(e=>(0,n.jsxs)(C.jqI,{className:u?"justify-between":"justify-start",children:[(0,n.jsx)(C.y02,{value:e.id,name:"custom-report-id","data-testid":"custom-report-item",children:(0,n.jsx)(C.xvT,{fontSize:"sm",children:e.name})}),u&&(0,n.jsx)(C.wpx,{type:"text",size:"small",icon:(0,n.jsx)(z.q,{fontSize:16}),onClick:()=>k(e),"data-testid":"delete-report-button"})]},e.id))}))]}),(0,n.jsx)(C.DT9,{border:"none",px:6,pb:4,pt:4,children:(0,n.jsxs)(C.Ugi,{children:[d&&r&&(0,n.jsxs)(C.wpx,{size:"small",onClick:v,className:"w-full","data-testid":"create-report-button",htmlType:"button",children:["+ Create ",et.toLowerCase()]}),(0,n.jsx)(C.wpx,{size:"small",type:"primary",loading:G,disabled:er,className:"w-full","data-testid":"apply-report-button",htmlType:"submit",children:"Apply"})]})})]})})]})})]}),(0,n.jsx)(ee,{isOpen:j,handleClose:()=>{b(),setTimeout(()=>{R()},100)},tableStateToSave:r,columnMapToSave:i,unavailableNames:null==m?void 0:m.items.map(e=>e.name),onCreateCustomReport:e=>o(e,Y)}),(0,n.jsx)(C.cVQ,{isOpen:y,onClose:()=>{k(void 0),N()},onConfirm:()=>{U&&ea(U.id),N()},title:"Delete ".concat(et),message:(0,n.jsxs)(C.xvT,{children:["You are about to permanently delete the"," ",et.toLowerCase()," named"," ",(0,n.jsx)("strong",{children:null==U?void 0:U.name}),". Are you sure you would like to continue?"]})})]})};var er=s(19785),ei=s.n(er),eo=s(55807),en=s.n(eo),el=s(32526),ec=s.n(el),ed=s(72625),eu=s(43862);let e_=(0,f.Cl)(),ep=(e,t)=>({cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:s=>{let a={};return Object.keys(e).forEach(t=>{"string"==typeof e[t]?a[t]=e[t]:e[t].label&&(a[t]=e[t].label||"")}),(0,n.jsx)(ed.Hm,{value:(0,eu.AH)({columnId:s.column.id,columnNameMap:a}),defaultValue:p[s.column.id]||(0,eu.AH)({columnId:s.column.id}),isEditing:t,...s})}}),em=(e,t)=>{var s;let a=(null==e?void 0:null===(s=e.items)||void 0===s?void 0:s.length)?Object.keys(e.items[0]):[],r=Object.values(o);return a.filter(e=>!r.includes(e)).filter(e=>e.startsWith("privacy_declaration_")||e.startsWith("system_")).map(e=>{let s=t.find(t=>e.includes(ec()(t.name)));return e_.accessor(t=>t[e],{id:e,cell:e=>Array.isArray(e.getValue())?(0,n.jsx)(x.WP,{value:e.getValue(),ignoreZero:!0,...e}):(0,n.jsx)(x.G3,{value:e.getValue()}),meta:{showHeaderMenu:(null==s?void 0:s.field_type)==="string[]"}})})},eE=e=>{let{onSelectRow:t,getDataUseDisplayName:s,getDataCategoryDisplayName:a,getDataSubjectDisplayName:r,datamapReport:i,customFields:l,isRenaming:c=!1}=e,d=em(i,l);return[e_.accessor(e=>e.system_name,{enableGrouping:!0,id:o.SYSTEM_NAME,meta:{onCellClick:t}}),e_.accessor(e=>e.data_uses,{id:o.DATA_USE,cell:e=>{let t=e.getValue();return(0,n.jsx)(x.WP,{suffix:"data uses",ignoreZero:!0,value:ei()(t)?en()(t,s):s(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto"}}),e_.accessor(e=>e.data_categories,{id:o.DATA_CATEGORY,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,n.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_subjects,{id:o.DATA_SUBJECT,cell:e=>{let t=e.getValue();return(0,n.jsx)(x.WP,{suffix:"data subjects",ignoreZero:!0,value:ei()(t)?en()(t,r):r(t||""),tagProps:{color:"white"},...e})},meta:{showHeaderMenu:!c}}),e_.accessor(e=>e.legal_name,{id:o.LEGAL_NAME}),e_.accessor(e=>e.dpo,{id:o.DPO}),e_.accessor(e=>e.legal_basis_for_processing,{id:o.LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.administrating_department,{id:o.ADMINISTRATING_DEPARTMENT}),e_.accessor(e=>e.cookie_max_age_seconds,{id:o.COOKIE_MAX_AGE_SECONDS}),e_.accessor(e=>e.privacy_policy,{id:o.PRIVACY_POLICY}),e_.accessor(e=>e.legal_address,{id:o.LEGAL_ADDRESS}),e_.accessor(e=>e.cookie_refresh,{id:o.COOKIE_REFRESH}),e_.accessor(e=>e.data_security_practices,{id:o.DATA_SECURITY_PRACTICES}),e_.accessor(e=>e.data_shared_with_third_parties,{id:o.DATA_SHARED_WITH_THIRD_PARTIES}),e_.accessor(e=>e.processes_special_category_data,{id:o.PROCESSES_SPECIAL_CATEGORY_DATA}),e_.accessor(e=>e.data_stewards,{id:o.DATA_STEWARDS,cell:e=>(0,n.jsx)(x.WP,{suffix:"data stewards",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.declaration_name,{id:o.DECLARATION_NAME}),e_.accessor(e=>e.does_international_transfers,{id:o.DOES_INTERNATIONAL_TRANSFERS}),e_.accessor(e=>e.dpa_location,{id:o.DPA_LOCATION}),e_.accessor(e=>e.egress,{id:o.DESTINATIONS,cell:e=>(0,n.jsx)(x.WP,{suffix:"destinations",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.exempt_from_privacy_regulations,{id:o.EXEMPT_FROM_PRIVACY_REGULATIONS}),e_.accessor(e=>e.features,{id:o.FEATURES,cell:e=>(0,n.jsx)(x.WP,{suffix:"features",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.fides_key,{id:o.FIDES_KEY}),e_.accessor(e=>e.flexible_legal_basis_for_processing,{id:o.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.impact_assessment_location,{id:o.IMPACT_ASSESSMENT_LOCATION}),e_.accessor(e=>e.ingress,{id:o.SOURCES,cell:e=>(0,n.jsx)(x.WP,{suffix:"sources",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.joint_controller_info,{id:o.JOINT_CONTROLLER_INFO}),e_.accessor(e=>e.legal_basis_for_profiling,{id:o.LEGAL_BASIS_FOR_PROFILING,cell:e=>(0,n.jsx)(x.WP,{suffix:"profiles",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legal_basis_for_transfers,{id:o.LEGAL_BASIS_FOR_TRANSFERS,cell:e=>(0,n.jsx)(x.WP,{suffix:"transfers",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legitimate_interest_disclosure_url,{id:o.LEGITIMATE_INTEREST_DISCLOSURE_URL}),e_.accessor(e=>e.processes_personal_data,{id:o.PROCESSES_PERSONAL_DATA}),e_.accessor(e=>e.reason_for_exemption,{id:o.REASON_FOR_EXEMPTION}),e_.accessor(e=>e.requires_data_protection_assessments,{id:o.REQUIRES_DATA_PROTECTION_ASSESSMENTS}),e_.accessor(e=>e.responsibility,{id:o.RESPONSIBILITY,cell:e=>(0,n.jsx)(x.WP,{suffix:"responsibilities",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.retention_period,{id:o.RETENTION_PERIOD}),e_.accessor(e=>e.shared_categories,{id:o.SHARED_CATEGORIES,cell:e=>(0,n.jsx)(x.WP,{suffix:"shared categories",ignoreZero:!0,value:e.getValue(),tagProps:{color:"white"},...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.special_category_legal_basis,{id:o.SPECIAL_CATEGORY_LEGAL_BASIS}),e_.accessor(e=>e.third_parties,{id:o.THIRD_PARTIES}),e_.accessor(e=>e.system_undeclared_data_categories,{id:o.SYSTEM_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,n.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_use_undeclared_data_categories,{id:o.DATA_USE_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,n.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.cookies,{id:o.COOKIES,cell:e=>(0,n.jsx)(x.WP,{ignoreZero:!0,suffix:"cookies",value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.uses_cookies,{id:o.USES_COOKIES}),e_.accessor(e=>e.uses_non_cookie_access,{id:o.USES_NON_COOKIE_ACCESS}),e_.accessor(e=>e.uses_profiling,{id:o.USES_PROFILING}),...d]},eS=e=>{let{columnNameMapOverrides:t,setColumnNameMapOverrides:s,setSavedCustomReportId:a,setIsRenamingColumns:r}=e,{submitForm:i,resetForm:o}=(0,T.u6)();return(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(C.wpx,{size:"small","data-testid":"rename-columns-reset-btn",onClick:()=>{s({}),a(""),o({values:{}}),r(!1)},children:"Reset all"}),(0,n.jsx)(C.wpx,{size:"small","data-testid":"rename-columns-cancel-btn",onClick:()=>{o({values:t}),r(!1)},children:"Cancel"}),(0,n.jsx)(C.wpx,{size:"small",type:"primary",htmlType:"submit","data-testid":"rename-columns-apply-btn",onClick:i,children:"Apply"})]})},eh=e=>e===_.fI.DATA_USE_SYSTEM?[o.DATA_USE]:[o.SYSTEM_NAME],eA=e=>{let t=[];return _.fI.SYSTEM_DATA_USE===e&&(t=[o.SYSTEM_NAME,o.DATA_USE]),_.fI.DATA_USE_SYSTEM===e&&(t=[o.DATA_USE,o.SYSTEM_NAME]),t},eg=(e,t)=>eA(e).concat(t.filter(e=>e!==o.SYSTEM_NAME&&e!==o.DATA_USE)),ef={items:[],total:0,page:1,size:25,pages:1},ex=()=>{let e=(0,D.Tg)([_.Sh.CUSTOM_REPORT_READ]),{isLoading:t}=(0,V.x8)(),{PAGE_SIZES:s,pageSize:a,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:c,onNextPageClick:d,isNextPageDisabled:u,startRange:S,endRange:h,pageIndex:R,setTotalPages:L,resetPageIndexToDefault:w}=(0,x.oi)(),P=(0,C.pmc)({id:"datamap-report-toast"}),{isOpen:U,onClose:k,onOpen:G}=(0,C.qY0)(),{getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,isLoading:B}=(0,v.Z)(),[z,W]=(0,l.useState)(),{savedCustomReportId:q,setSavedCustomReportId:X,groupBy:J,setGroupBy:K,selectedFilters:Q,setSelectedFilters:$,columnOrder:ee,setColumnOrder:et,columnVisibility:es,setColumnVisibility:er,columnSizing:ei,setColumnSizing:eo,columnNameMapOverrides:en,setColumnNameMapOverrides:el}=A(),[ec,ed]=(0,l.useState)(!1),eu=e=>{X(""),K(e),ed(!0),w()},[e_,em]=(0,l.useState)(""),ex=(0,l.useCallback)(e=>{w(),em(e)},[w,em]),eC={pageIndex:R,pageSize:a,groupBy:J,search:e_,dataUses:(0,y.du)(Q.dataUses,"data_uses"),dataSubjects:(0,y.du)(Q.dataSubjects,"data_subjects"),dataCategories:(0,y.du)(Q.dataCategories,"data_categories")},{data:eT,isLoading:eR,isFetching:eO}=(0,I.tH)(eC),[ej,{isLoading:ev,isError:eb}]=(0,I.Eo)(),{data:eD,totalRows:ey}=(0,l.useMemo)(()=>{let e=eT||ef,t=e.items;return ec&&ed(!1),L(e.pages),{totalRows:e.total,data:t}},[eT]);(0,V.GH)();let eI=(0,j.C)(V.fN),[eN,eL]=(0,l.useState)(!1),ew=(0,l.useMemo)(()=>eT?eE({onSelectRow:e=>W(e.fides_key),getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,datamapReport:eT,customFields:eI,isRenaming:eN}):[],[H,Z,Y,eT,eI,eN]),{isOpen:eM,onOpen:eP,onClose:eU}=(0,C.qY0)(),{isOpen:ek,onOpen:eG,onClose:eH}=(0,C.qY0)(),eY=(0,g.b7)({getCoreRowModel:(0,f.sC)(),getGroupedRowModel:(0,f.qe)(),getExpandedRowModel:(0,f.rV)(),manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onChange",columns:ew,defaultColumn:ep({...p,...en},eN),data:eD,initialState:{expanded:!0,columnSizing:ei,columnOrder:ee,columnVisibility:es,grouping:eh(J)}});(0,l.useEffect)(()=>{J&&eY&&eT&&(0===eY.getState().columnOrder.length?et(eg(J,eY.getAllColumns().map(e=>e.id))):et(eg(J,eY.getState().columnOrder)))},[J,eY,eT]),(0,l.useEffect)(()=>{let e=eh(J);eT&&eY.setGrouping(e)},[eT]);let eF=(0,l.useMemo)(()=>O()(eo,300),[eo]);(0,l.useEffect)(()=>{let e=eY.getState().columnSizing;e&&eF(e)},[eY.getState().columnSizing]);let eV=(e,t)=>{if(e||q){if(!e){try{X(""),er(m),eY.toggleAllColumnsVisible(!0),eY.setColumnVisibility(m),et([]),eY.setColumnOrder([]),K(_.fI.SYSTEM_DATA_USE),$(E),el({}),t({values:{}})}catch(e){P({status:"error",description:"There was a problem resetting the report."})}return}try{var s,a,r,i;if(null===(s=e.config)||void 0===s?void 0:s.table_state){let{groupBy:t,filters:s,columnOrder:a}=e.config.table_state,i={};Object.entries(null!==(r=e.config.column_map)&&void 0!==r?r:{}).forEach(e=>{let[t,s]=e;i[t]=s.enabled||!1}),t&&K(t),s&&$(s),a&&(et(a),eY.setColumnOrder(a)),i&&(er(i),eY.setColumnVisibility(i))}if(null===(a=e.config)||void 0===a?void 0:a.column_map){let s={};Object.entries(null!==(i=e.config.column_map)&&void 0!==i?i:{}).forEach(e=>{let[t,a]=e;a.label&&(s[t]=a.label)}),el(s),t({values:s})}X(e.id),P({status:"success",description:"Report applied successfully."})}catch(e){P({status:"error",description:"There was a problem applying report."})}}};return eR||t||B?(0,n.jsx)(x.I4,{rowHeight:36,numRows:15}):(0,n.jsxs)(C.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,n.jsx)(F,{columnNameMap:{...p,...en},selectedFilters:Q,isOpen:U,onClose:k,onFilterChange:e=>{X(""),$(e)}}),(0,n.jsx)(x.F1,{isOpen:eM,onClose:eU,headerText:"Data map settings",columnNameMap:{...p,...en},prefixColumns:eA(J),tableInstance:eY,savedCustomReportId:q,onColumnOrderChange:e=>{X(""),eY.setColumnOrder(e),et(e)},onColumnVisibilityChange:e=>{X(""),eY.setColumnVisibility(e),er(e)}}),(0,n.jsx)(M,{isOpen:ek,onClose:eH,onConfirm:e=>{let t={};Object.entries(es).forEach(e=>{let[s,a]=e;t[s]={enabled:a}}),Object.entries(en).forEach(e=>{let[s,a]=e;if(t[s])t[s].label=a;else{var r;t[s]={label:a,enabled:null===(r=es[s])||void 0===r||r}}}),ej({...eC,format:e,report_id:q,report:{name:"",type:"datamap",config:{column_map:t,table_state:{groupBy:J,filters:Q,columnOrder:ee}}}}).then(()=>{eb||eH()})},isLoading:ev}),(0,n.jsx)(T.J9,{initialValues:en,onSubmit:e=>{X(""),el(e),eL(!1)},children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(x.Q$,{children:[(0,n.jsx)(x.HO,{globalFilter:e_,setGlobalFilter:ex,placeholder:"System name, Fides key, or ID"}),(0,n.jsxs)(C.kCb,{alignItems:"center",gap:2,children:[e&&(0,n.jsx)(ea,{reportType:_.C2.DATAMAP,savedReportId:q,tableStateToSave:{groupBy:J,filters:Q,columnOrder:ee,columnVisibility:es},currentColumnMap:en,onCustomReportSaved:(e,t)=>eV(e,t),onSavedReportDeleted:()=>{X("")}}),(0,n.jsxs)(C.v2r,{children:[(0,n.jsxs)(C.j2t,{as:C.wpx,icon:(0,n.jsx)(C.v4q,{}),iconPosition:"end",loading:ec,"data-testid":"group-by-menu",children:["Group by ",(()=>{switch(J){case _.fI.SYSTEM_DATA_USE:return"system";case _.fI.DATA_USE_SYSTEM:return"data use";default:return"system"}})()]}),(0,n.jsxs)(C.qyq,{zIndex:11,"data-testid":"group-by-menu-list",children:[(0,n.jsx)(C.iiZ,{onClick:()=>{eu(_.fI.SYSTEM_DATA_USE)},isChecked:_.fI.SYSTEM_DATA_USE===J,value:_.fI.SYSTEM_DATA_USE,"data-testid":"group-by-system-data-use",children:"System"}),(0,n.jsx)(C.iiZ,{onClick:()=>{eu(_.fI.DATA_USE_SYSTEM)},isChecked:_.fI.DATA_USE_SYSTEM===J,value:_.fI.DATA_USE_SYSTEM,"data-testid":"group-by-data-use-system",children:"Data use"})]})]}),(0,n.jsx)(C.wpx,{"data-testid":"filter-multiple-systems-btn",onClick:G,children:"Filter"}),(0,n.jsx)(C.wpx,{"aria-label":"Export report","data-testid":"export-btn",onClick:eG,icon:(0,n.jsx)(b.nM,{ml:"1.5px"})}),(0,n.jsxs)(C.v2r,{placement:"bottom-end",children:[(0,n.jsx)(C.j2t,{as:C.wpx,icon:(0,n.jsx)(C.nXP,{className:"rotate-90"}),"data-testid":"more-menu","aria-label":"More options",className:"w-6 gap-0"}),(0,n.jsxs)(C.qyq,{"data-testid":"more-menu-list",children:[(0,n.jsx)(C.sNh,{onClick:eP,"data-testid":"edit-columns-btn",children:"Edit columns"}),(0,n.jsx)(C.sNh,{onClick:()=>eL(!0),"data-testid":"rename-columns-btn",children:"Rename columns"})]})]}),eN&&(0,n.jsx)(eS,{columnNameMapOverrides:en,setColumnNameMapOverrides:el,setSavedCustomReportId:X,setIsRenamingColumns:eL})]})]}),(0,n.jsx)(T.l0,{children:(0,n.jsx)(x.ZK,{tableInstance:eY,columnExpandStorageKey:i.COLUMN_EXPANSION_STATE,columnWrapStorageKey:i.WRAPPING_COLUMNS})})]})}),(0,n.jsx)(x.s8,{totalRows:ey||0,pageSizes:s,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:c||eO,onNextPageClick:d,isNextPageDisabled:u||eO,startRange:S,endRange:h}),(0,n.jsx)(N.Z,{selectedSystemId:z,resetSelectedSystemId:()=>W(void 0)})]})};var eC=()=>(0,n.jsxs)(c.Z,{title:"Datamap Report",children:[(0,n.jsx)(d.Z,{"data-testid":"datamap-report-heading",heading:"Data map report"}),(0,n.jsx)(h,{children:(0,n.jsx)(ex,{})})]})}},function(e){e.O(0,[8033,6060,2858,2866,9278,2599,7553,4481,9951,4230,2888,9774,179],function(){return e(e.s=86548)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5135],{77713:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent/[configuration_id]/[purpose_id]",function(){return i(80758)}])},59301:function(e,t,i){"use strict";var r=i(24246);let{Link:n}=i(62051).AntTypography;t.Z=e=>(0,r.jsx)(n,{target:"_blank",rel:"noopener noreferrer",...e})},35287:function(e,t,i){"use strict";var r=i(24246),n=i(62051),s=i(88038),o=i.n(s);i(27378),t.Z=e=>{let{children:t,title:i,mainProps:s}=e;return(0,r.jsxs)(n.kCb,{"data-testid":i,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,r.jsxs)(o(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsx)(n.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:t})]})}},58754:function(e,t,i){"use strict";var r=i(24246),n=i(62051),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:o=!0,children:d,rightContent:l,style:a,...c}=e;return(0,r.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...a}:{paddingBottom:"24px",...a},children:[(0,r.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(n.lQT,{className:i||d?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!i&&(0,r.jsx)(s.m,{className:d?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),d]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return a}});var r=i(24246),n=i(62051),s=i(34090),o=i(27378),d=i(46238),l=i(40324);let a=e=>{let{name:t,label:i,labelProps:a,tooltip:c,isRequired:u,layout:p="inline",helperText:h,...v}=e,[_,m,{setValue:x}]=(0,s.U$)(t),f=!!(m.touched&&m.error),[g,R]=(0,o.useState)("");_.value||"tags"!==v.mode&&"multiple"!==v.mode||(_.value=[]),"tags"===v.mode&&"string"==typeof _.value&&(_.value=[_.value]);let j="tags"===v.mode?(e,t)=>e?e.value!==g||_.value.includes(g)?v.optionRender?v.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:v.optionRender||void 0,I=e=>{R(e),v.onSearch&&v.onSearch(e)},E=(e,t)=>{x(e),v.onChange&&v.onChange(e,t)};return"inline"===p?(0,r.jsx)(n.NIc,{isInvalid:f,isRequired:u,children:(0,r.jsxs)(n.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,r.jsx)(l.__,{htmlFor:v.id||t,...a,children:i}):null,(0,r.jsxs)(n.jqI,{align:"center",children:[(0,r.jsxs)(n.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(n.WPr,{..._,id:v.id||t,"data-testid":"controlled-select-".concat(_.name),...v,optionRender:j,onSearch:"tags"===v.mode?I:void 0,onChange:E,value:_.value||void 0,status:f?"error":void 0}),h&&(0,r.jsx)(n.Q6r,{children:h}),(0,r.jsx)(l.Bc,{isInvalid:f,message:m.error,fieldName:_.name})]}),(0,r.jsx)(d.b,{label:c,className:f?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(n.NIc,{isInvalid:f,isRequired:u,children:(0,r.jsxs)(n.gCW,{alignItems:"start",children:[(0,r.jsxs)(n.jqI,{align:"center",children:[i?(0,r.jsx)(l.__,{htmlFor:v.id||t,fontSize:"xs",my:0,mr:1,...a,children:i}):null,(0,r.jsx)(d.b,{label:c})]}),(0,r.jsx)(n.WPr,{..._,id:v.id||t,"data-testid":"controlled-select-".concat(_.name),...v,optionRender:j,onSearch:"tags"===v.mode?I:void 0,onChange:E,value:_.value||void 0,status:f?"error":void 0}),h&&(0,r.jsx)(n.Q6r,{style:{marginTop:0},children:h}),(0,r.jsx)(l.Bc,{isInvalid:f,message:m.error,fieldName:_.name})]})})}},8133:function(e,t,i){"use strict";var r=i(24246),n=i(62051);t.Z=e=>{let{title:t,children:i,isOpen:s,onClose:o,showCloseButton:d=!1,modalContentProps:l,footer:a,...c}=e;return(0,r.jsxs)(n.u_l,{isOpen:s,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",...l,children:[d&&(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:t})})}),(0,r.jsx)(n.fef,{pb:4,overflow:"auto",children:i}),a&&(0,r.jsx)(n.mzw,{children:a})]})]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return a}});var r=i(24246),n=i(62051),s=i(79894),o=i.n(s),d=i(27378);let{Text:l}=n.AntTypography,a=e=>{let{items:t,...i}=e,s=(0,d.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,d={...e},a=d.onClick&&!d.href;return("string"==typeof d.title&&(d.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:d.title})),a)?d.title=(0,r.jsx)(n.wpx,{type:"text",size:"small",icon:d.icon,onClick:d.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:d.title}):(d.icon&&(d.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:d.icon}),d.title]})),d.href&&d.title&&(d.title=(0,r.jsx)(o(),{href:d.href,className:"ant-breadcrumb-link",children:d.title}),delete d.href)),d}),[t]);return(0,r.jsx)(n.zrq,{items:s,...i})}},6675:function(e,t,i){"use strict";i.d(t,{ZS:function(){return d},a4:function(){return s}});var r=i(3228);let n=i(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:s}=n,o={purposes:{},special_purposes:{}},d=(0,r.P1)(n.endpoints.getPurposes.select(),e=>{let{data:t}=e;return t||o})},51263:function(e,t,i){"use strict";var r=i(24246),n=i(62051);t.Z=e=>{let{title:t,children:i,...s}=e;return(0,r.jsxs)(n.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(t),...s,children:[(0,r.jsx)(n.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:t}),i]})}},59512:function(e,t,i){"use strict";i.d(t,{Cu:function(){return d},Py:function(){return n},fj:function(){return o},uh:function(){return s}});var r=i(46420);let n=[1,3,4,5,6],s="https://ethyca.com/docs/tutorials/consent-management/consent-management-configuration/configure-tcf#vendor-overrides",o={[r.FF.PURPOSE_RESTRICTION]:"Purpose restriction",[r.FF.REQUIRE_CONSENT]:"Require consent",[r.FF.REQUIRE_LEGITIMATE_INTEREST]:"Require legitimate interest"},d={[r.PY.RESTRICT_ALL_VENDORS]:"Restrict all vendors",[r.PY.RESTRICT_SPECIFIC_VENDORS]:"Restrict specific vendors",[r.PY.ALLOW_SPECIFIC_VENDORS]:"Allow specific vendors"}},80758:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Z}});var r=i(24246),n=i(62051),s=i(86677),o=i(27378),d=i(59301),l=i(35287),a=i(58754),c=i(6675),u=i(51263),p=i(59512),h=i(59003),v=i(92222),_=i(14481),m=i(46420),x=i(34090),f=i(55484),g=i(97181),R=i(812),j=i(8133),I=i(46628),E=i(52955);let y=e=>{if(/^\d+$/.test(e))return!0;let t=e.match(/^(\d+)-(\d+)$/);return!!t&&parseInt(t[1],10)<parseInt(t[2],10)},C=e=>{if(/^\d+$/.test(e)){let t=parseInt(e,10);return{start:t,end:t}}let t=e.match(/^(\d+)-(\d+)$/);return t?{start:parseInt(t[1],10),end:parseInt(t[2],10)}:null},T=(e,t)=>e.end===e.start?e.start>=t.start&&(null===t.end||e.start<=t.end):t.end===t.start?t.start>=e.start&&(null===e.end||t.start<=e.end):null===e.end&&null!==t.end?e.start<=t.end:null===t.end&&null!==e.end?t.start<=e.end:null===e.end&&null===t.end||e.start<=t.end&&e.end>=t.start||t.start<=e.end&&t.end>=e.start,b=(e,t)=>e.end===e.start?e.start>=t.start&&(null===t.end||e.start<=t.end):null===t.end?e.start>=t.start:null!==e.end&&e.start>=t.start&&e.end<=t.end,S=(e,t,i,r)=>{var n;let s=t.filter(e=>e.purpose_id===i&&e.id!==r);if(!(null===(n=e.vendor_ids)||void 0===n?void 0:n.length))return!1;let o=e.vendor_ids.map(C).filter(e=>null!==e);return 0!==o.length&&s.some(t=>{let i=e.vendor_restriction===m.PY.RESTRICT_SPECIFIC_VENDORS&&t.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS||e.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS&&t.vendor_restriction===m.PY.RESTRICT_SPECIFIC_VENDORS,r=t.vendor_ids.map(C).filter(e=>null!==e);return i?e.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS?r.some(e=>o.some(t=>!b(e,t))):o.some(e=>r.some(t=>!b(e,t))):t.vendor_restriction===e.vendor_restriction&&o.some(e=>r.some(t=>T(e,t)))})},N=e=>{if(/^\d+$/.test(e))return{start_vendor_id:parseInt(e,10),end_vendor_id:null};let t=e.match(/^(\d+)-(\d+)$/);if(t){let e=parseInt(t[1],10),i=parseInt(t[2],10);if(e<i)return{start_vendor_id:e,end_vendor_id:i}}return null},F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(N).filter(e=>null!==e)},w="This restriction type is already in use for this purpose",P={restriction_type:"",vendor_restriction:"",vendor_ids:[]},O=e=>{let{isOpen:t,onClose:i,initialValues:s=P,existingRestrictions:o=[],purposeId:d,restrictionId:l,configurationId:a}=e,c=(0,n.pmc)(),[u]=(0,E.a_)(),[h]=(0,E.h3)(),v=!(d&&p.Py.includes(+d)),_=o.filter(e=>e.id!==l).map(e=>e.restriction_type),C=[{value:m.FF.PURPOSE_RESTRICTION,label:p.fj[m.FF.PURPOSE_RESTRICTION],disabled:_.includes(m.FF.PURPOSE_RESTRICTION),title:_.includes(m.FF.PURPOSE_RESTRICTION)?w:void 0},{value:m.FF.REQUIRE_CONSENT,label:p.fj[m.FF.REQUIRE_CONSENT],disabled:_.includes(m.FF.REQUIRE_CONSENT),title:_.includes(m.FF.REQUIRE_CONSENT)?w:void 0},{value:m.FF.REQUIRE_LEGITIMATE_INTEREST,label:p.fj[m.FF.REQUIRE_LEGITIMATE_INTEREST],disabled:_.includes(m.FF.REQUIRE_LEGITIMATE_INTEREST),title:_.includes(m.FF.REQUIRE_LEGITIMATE_INTEREST)?w:void 0}],T=[{value:m.PY.RESTRICT_ALL_VENDORS,label:p.Cu[m.PY.RESTRICT_ALL_VENDORS],disabled:_.length>0,title:_.length>0?"Cannot restrict all vendors when other restrictions exist":void 0},{value:m.PY.RESTRICT_SPECIFIC_VENDORS,label:p.Cu[m.PY.RESTRICT_SPECIFIC_VENDORS]},{value:m.PY.ALLOW_SPECIFIC_VENDORS,label:p.Cu[m.PY.ALLOW_SPECIFIC_VENDORS]}],b=f.Ry().shape({restriction_type:f.Z_().required("Restriction type is required"),vendor_restriction:f.Z_().required("Vendor restriction is required"),vendor_ids:f.IX().when("vendor_restriction",{is:e=>e!==m.PY.RESTRICT_ALL_VENDORS,then:e=>e.required("At least one vendor ID is required").min(1,"At least one vendor ID is required").test("valid-format","Vendor IDs must be numbers or ranges (e.g., 10 or 15-300)",e=>{var t;return null===(t=null==e?void 0:e.every(e=>y(e)))||void 0===t||t}).test("no-conflicts","One or more of these vendors already have a restriction for this purpose. Please update the existing restriction or remove duplicates.",(e,t)=>!S({...t.parent,vendor_ids:e},o,d,l))})}),N=async e=>{try{let t={restriction_type:e.restriction_type,vendor_restriction:e.vendor_restriction,range_entries:e.vendor_restriction!==m.PY.RESTRICT_ALL_VENDORS?F(e.vendor_ids):[]},r={...t,purpose_id:null!=d?d:0};if(l){let e=await h({configuration_id:a,restriction_id:l,restriction:t});if((0,R.D4)(e)){c((0,I.Vo)("Failed to update restriction"));return}c((0,I.t5)("Restriction updated successfully"))}else{let e=await u({configuration_id:a,restriction:r});if((0,R.D4)(e)){c((0,I.Vo)("Failed to create restriction"));return}c((0,I.t5)("Restriction created successfully"))}i()}catch(e){c((0,I.Vo)("Failed to save restriction"))}};return(0,r.jsx)(j.Z,{isOpen:t,onClose:i,title:"Edit restriction",children:(0,r.jsx)(x.J9,{initialValues:{...s,restriction_type:v?s.restriction_type:m.FF.PURPOSE_RESTRICTION},onSubmit:N,validationSchema:b,children:e=>{let{values:t,validateField:s,setTouched:o}=e;return(0,r.jsx)(x.l0,{children:(0,r.jsxs)(n.jqI,{vertical:!0,className:"gap-6",children:[(0,r.jsx)(n.xvT,{className:"text-sm",children:"Define how specific vendors are restricted from processing data for this purpose. Select a restriction type, set whether the listed vendors are restricted or allowed, and specify which vendor IDs the restriction applies to."}),(0,r.jsx)(n.esZ,{title:v?void 0:"Non-flexible purposes only support Purpose restrictions and cannot be restricted by consent or legitimate interest settings.",children:(0,r.jsx)(g.d,{name:"restriction_type",label:"Restriction type",options:C,layout:"stacked",tooltip:"Choose how vendors are permitted to process data for this purpose. This setting overrides the vendor's declared legal basis in the Global Vendor List.",isRequired:!0,disabled:!v,className:"w-full"})}),(0,r.jsx)(g.d,{name:"vendor_restriction",label:"Vendor restriction",options:T,layout:"stacked",tooltip:"Decide if the restriction applies to all vendors, specific vendors, or if only certain vendors are allowed.",isRequired:!0}),(0,r.jsx)(n.UO1,{in:!!t.restriction_type&&!!t.vendor_restriction&&t.vendor_restriction!==m.PY.RESTRICT_ALL_VENDORS,animateOpacity:!0,children:(0,r.jsx)(g.d,{name:"vendor_ids",label:"Vendor IDs",mode:"tags",options:[],layout:"stacked",placeholder:"Enter vendor IDs",open:!1,suffixIcon:(0,r.jsx)("span",{}),tooltip:"List the specific vendors that are restricted or allowed from processing data for this purpose.",disabled:t.vendor_restriction===m.PY.RESTRICT_ALL_VENDORS,tokenSeparators:[","," "],onBlur:()=>{setTimeout(()=>{o({vendor_ids:!0}),s("vendor_ids")},100)},helperText:"Enter IDs (e.g. 123) or ranges (e.g. 1-10) and press enter",isRequired:!0})}),(0,r.jsxs)(n.jqI,{justify:"flex-end",className:"gap-3 pt-4",children:[(0,r.jsx)(n.wpx,{onClick:i,"data-testid":"cancel-restriction-button",children:"Cancel"}),(0,r.jsx)(n.wpx,{type:"primary",htmlType:"submit","data-testid":"save-restriction-button",children:"Save"})]})]})})}})})};var L=i(72625),q=i(58452);let A=e=>{let{currentValues:t,existingRestrictions:i}=e,[d,l]=(0,o.useState)(!1),[a,c]=(0,o.useState)(!1),u=(0,s.useRouter)(),p=(0,n.pmc)(),[h]=(0,E.FC)(),v=u.query.purpose_id?parseInt(u.query.purpose_id,10):void 0,_=u.query.configuration_id,m=async()=>{try{if(!(null==t?void 0:t.id))return;let e=await h({configuration_id:_,restriction_id:t.id});if((0,R.D4)(e)){p((0,I.Vo)("Failed to delete publisher restriction"));return}l(!1),p((0,I.t5)("Publisher restriction deleted successfully"))}catch(e){p((0,I.Vo)("Failed to delete publisher restriction"))}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.vyj,{children:[(0,r.jsx)(n.wpx,{size:"small",onClick:()=>c(!0),"data-testid":"edit-restriction-button",children:"Edit"}),(0,r.jsx)(n.wpx,{size:"small",onClick:()=>l(!0),"data-testid":"delete-restriction-button",children:"Delete"})]}),(0,r.jsx)(O,{isOpen:a,onClose:()=>c(!1),initialValues:t,existingRestrictions:i,purposeId:v,restrictionId:null==t?void 0:t.id,configurationId:_}),(0,r.jsx)(q.Z,{isOpen:d,onClose:()=>l(!1),onConfirm:m,title:"Confirm deletion",message:"Are you sure you want to delete this publisher restriction? This action cannot be undone.",cancelButtonText:"Cancel",continueButtonText:"Delete"})]})},D=(0,v.Cl)(),V=()=>(0,o.useMemo)(()=>[D.accessor(e=>e.restriction_type,{id:"restriction_type",cell:e=>{let{getValue:t}=e,i=t();return(0,r.jsx)(_.G3,{value:p.fj[i]})},header:e=>(0,r.jsx)(_.Rr,{value:"Restriction type",...e})}),D.accessor(e=>e.vendor_restriction,{id:"vendor_restriction",cell:e=>{let{getValue:t}=e,i=t();return(0,r.jsx)(_.G3,{value:p.Cu[i]})},header:e=>(0,r.jsx)(_.Rr,{value:"Vendor restriction",...e})}),D.accessor(e=>e.vendor_ids,{id:"vendor_ids",cell:e=>{let{getValue:t}=e;return(0,r.jsx)(_.G3,{value:t().join(", ")||"All vendors"})},header:e=>(0,r.jsx)(L.vs,{value:"Vendors",helperText:"Specify which vendors the restriction applies to. You can apply restrictions to all vendors, specific vendors by their IDs, or allow only certain vendors while restricting the rest.",...e})}),D.display({id:"actions",cell:e=>(0,r.jsx)(A,{currentValues:e.row.original,existingRestrictions:e.table.getRowModel().rows.map(e=>e.original)}),header:"Actions",size:154,meta:{disableRowClick:!0}})],[]),k=e=>{let{onAdd:t}=e;return(0,r.jsxs)(n.jqI,{vertical:!0,align:"center",className:"mt-6 w-full gap-3 self-center whitespace-normal py-10","data-testid":"empty-table-notice",children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"semibold",children:"Add a restriction"}),(0,r.jsx)(n.xvT,{fontSize:"sm",className:"max-w-[70%]",children:"No restrictions have been added. By default, all vendors follow their declared legal basis unless a restriction is applied—add a restriction to override this behavior."}),(0,r.jsx)(n.wpx,{type:"primary",onClick:t,children:"Add +"})]})},U=()=>{let[e,t]=(0,o.useState)(!1),i=V(),d=(0,s.useRouter)(),l=d.query.purpose_id?parseInt(d.query.purpose_id,10):void 0,a=d.query.configuration_id,{data:c,isFetching:u}=(0,E.a9)({configuration_id:a,purpose_id:null!=l?l:0},{skip:!a||!l}),p=((null==c?void 0:c.items)||[]).map(e=>{var t;return{id:e.id,restriction_type:e.restriction_type,vendor_restriction:e.vendor_restriction,vendor_ids:(null===(t=e.range_entries)||void 0===t?void 0:t.map(e=>e.end_vendor_id?"".concat(e.start_vendor_id,"-").concat(e.end_vendor_id):e.start_vendor_id.toString()))||[],purpose_id:e.purpose_id}}),x=p.some(e=>e.vendor_restriction===m.PY.RESTRICT_ALL_VENDORS),f=Object.values(m.FF).every(e=>p.some(t=>t.restriction_type===e)),g=(0,h.b7)({getCoreRowModel:(0,v.sC)(),columns:i,data:p,columnResizeMode:"onChange",manualPagination:!0}),R=()=>{t(!0)};return(0,r.jsxs)(n.jqI,{vertical:!0,className:"overflow-auto",children:[(0,r.jsxs)(_.Q$,{children:[(0,r.jsx)(n.LZC,{}),(0,r.jsx)(n.esZ,{title:x?'Each vendor must have a unique restriction type. When "Restrict all vendors" is active for any restriction type, no other restrictions can be added.':f?"Each purpose must have a unique restriction type. When all restriction types are active, no other restrictions can be added. Use the 'Edit' button to change the vendor restrictions on each type.":void 0,children:(0,r.jsx)(n.wpx,{type:"primary",onClick:R,disabled:x||f,"data-testid":"add-restriction-button",children:"Add restriction +"})})]}),u?(0,r.jsx)(_.I4,{rowHeight:36,numRows:3}):(0,r.jsx)(_.ZK,{tableInstance:g,emptyTableNotice:(0,r.jsx)(k,{onAdd:R})}),(0,r.jsx)(O,{isOpen:e,onClose:()=>{t(!1)},existingRestrictions:p,purposeId:l,configurationId:a})]})};var Z=()=>{let e=(0,s.useRouter)(),t=decodeURIComponent(e.query.configuration_id),i=decodeURIComponent(e.query.purpose_id),{data:h,isLoading:v}=(0,c.a4)(),{data:_}=(0,E.NZ)(t),m=(0,o.useMemo)(()=>null==h?void 0:h.purposes[i],[h,i]);return(0,r.jsxs)(l.Z,{title:"Consent Configuration",children:[(0,r.jsx)(a.Z,{heading:"Consent configuration",breadcrumbItems:[{title:"Consent settings",href:"/settings/consent"},{title:(null==_?void 0:_.name)||"Configuration"},{title:"TCF purpose ".concat(i)}]}),(0,r.jsxs)(n.vyj,{direction:"vertical",size:"middle",children:[(0,r.jsxs)(n.vyj,{direction:"vertical",size:"middle",children:[(0,r.jsx)(u.Z,{title:"TCF purpose ".concat(i).concat((null==m?void 0:m.name)?": ".concat(null==m?void 0:m.name):""),children:v?(0,r.jsxs)(n.jqI,{vertical:!0,className:"gap-1.5",children:[(0,r.jsx)(n.OdW,{height:"16px",width:"100%"}),(0,r.jsx)(n.OdW,{height:"16px",width:"100%"}),(0,r.jsx)(n.OdW,{height:"16px",width:"30%"})]}):!!m&&(0,r.jsx)(n.xvT,{fontSize:"sm",children:null==m?void 0:m.description})}),(0,r.jsx)(u.Z,{title:(null==_?void 0:_.name)||"Configuration",children:(0,r.jsx)(n.vyj,{direction:"vertical",className:"gap-3",children:(0,r.jsxs)(n.xvT,{fontSize:"sm",children:["Add restrictions to control how vendors process data for specific purposes. For each restriction, choose a restriction type. Then, decide whether the restriction applies to all vendors, specific vendors, or only to a limited set of allowed vendors. You can add multiple restrictions—they'll appear in the table below."," ",(0,r.jsx)(d.Z,{href:p.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]})})})]}),(0,r.jsx)(U,{})]})]})}}},function(e){e.O(0,[8033,6060,7553,4481,2888,9774,179],function(){return e(e.s=77713)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53748:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return i(96236)}])},59301:function(e,t,i){"use strict";var n=i(24246);let{Link:r}=i(62051).AntTypography;t.Z=e=>(0,n.jsx)(r,{target:"_blank",rel:"noopener noreferrer",...e})},56358:function(e,t,i){"use strict";i.d(t,{q:function(){return r}});var n=i(24246);let r=(0,i(62051).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,n.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var n=i(24246),r=i(62051),s=i(88038),l=i.n(s),o=i(86677);i(27378);var a=i(25980),d=i(90867),c=i(77830),u=()=>{let e=(0,o.useRouter)();return(0,n.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(r.xuv,{children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:i,padded:s=!0,mainProps:c}=e,p=(0,a.hz)(),h=(0,o.useRouter)(),g="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(p.flags.privacyRequestsConfiguration&&g),{data:f}=(0,d.JE)(void 0,{skip:x}),{data:b}=(0,d.PW)(void 0,{skip:x}),v=p.flags.privacyRequestsConfiguration&&(!f||!b)&&g;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),r=i(62051),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:o,rightContent:a,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(r.lQT,{className:i||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!i&&(0,n.jsx)(s.m,{className:o?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,t,i){"use strict";i.d(t,{Tg:function(){return l}});var n=i(24246),r=i(16134),s=i(31793);let l=e=>(0,r.C)(s.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:i}=e;return l(t)?(0,n.jsx)(n.Fragment,{children:i}):null}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return s.D4},MM:function(){return p},Ot:function(){return d},c6:function(){return r},cj:function(){return g},e$:function(){return o},fn:function(){return a},iC:function(){return h},nU:function(){return u},tB:function(){return c}});var n,r,s=i(19043);let l="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function a(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:l};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:i}=e;return{status:i,message:o(e,t.message)}}return t},p=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=r||(r={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},g=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},71795:function(e,t,i){"use strict";i.d(t,{_:function(){return r}});var n=i(27378);function r(e,t){let[i,r]=(0,n.useState)(()=>{if(!e)return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(e){return console.error(e),t}});return[i,t=>{try{let n=t instanceof Function?t(i):t;r(n),e&&window.localStorage.setItem(e,JSON.stringify(n))}catch(e){console.error(e)}}]}},8133:function(e,t,i){"use strict";var n=i(24246),r=i(62051);t.Z=e=>{let{title:t,children:i,isOpen:s,onClose:l,showCloseButton:o=!1,modalContentProps:a,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",...a,children:[o&&(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:t})})}),(0,n.jsx)(r.fef,{pb:4,overflow:"auto",children:i}),d&&(0,n.jsx)(r.mzw,{children:d})]})]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var n=i(24246),r=i(62051),s=i(79894),l=i.n(s),o=i(27378);let{Text:a}=r.AntTypography,d=e=>{let{items:t,...i}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(a,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:o.title})),d)?o.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,n.jsx)(l(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,n.jsx)(r.zrq,{items:s,...i})}},6675:function(e,t,i){"use strict";i.d(t,{ZS:function(){return o},a4:function(){return s}});var n=i(3228);let r=i(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:s}=r,l={purposes:{},special_purposes:{}},o=(0,n.P1)(r.endpoints.getPurposes.select(),e=>{let{data:t}=e;return t||l})},51263:function(e,t,i){"use strict";var n=i(24246),r=i(62051);t.Z=e=>{let{title:t,children:i,...s}=e;return(0,n.jsxs)(r.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(t),...s,children:[(0,n.jsx)(r.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:t}),i]})}},59512:function(e,t,i){"use strict";i.d(t,{Cu:function(){return o},Py:function(){return r},fj:function(){return l},uh:function(){return s}});var n=i(46420);let r=[1,3,4,5,6],s="https://ethyca.com/docs/tutorials/consent-management/consent-management-configuration/configure-tcf#vendor-overrides",l={[n.FF.PURPOSE_RESTRICTION]:"Purpose restriction",[n.FF.REQUIRE_CONSENT]:"Require consent",[n.FF.REQUIRE_LEGITIMATE_INTEREST]:"Require legitimate interest"},o={[n.PY.RESTRICT_ALL_VENDORS]:"Restrict all vendors",[n.PY.RESTRICT_SPECIFIC_VENDORS]:"Restrict specific vendors",[n.PY.ALLOW_SPECIFIC_VENDORS]:"Allow specific vendors"}},60325:function(e,t,i){"use strict";i.d(t,{DD:function(){return o},Go:function(){return a},TK:function(){return r},Uv:function(){return c},k1:function(){return s},y3:function(){return u}});var n=i(46420);let r=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==t?t:[]},s=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected))&&void 0!==t?t:[]},l=[{language:n.eU.EN,is_default:!0,title:"Title",description:"Description",accept_button_label:"Accept",reject_button_label:"Reject",save_button_label:"Save",acknowledge_button_label:"OK",privacy_preferences_link_label:"Privacy Preferences"}],o={name:"",disabled:!1,dismissable:!0,allow_language_selection:!1,show_layer1_notices:!1,layer1_button_options:n.Of.OPT_IN_OPT_OUT,regions:[],translations:l,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0},a=(e,t)=>{let i=t.find(t=>t.id===e.language);return i?i.name:e.language},d=e=>{var t,i,n,r,s,l,o,a,d;let{language:c,is_default:u,accept_button_label:p,reject_button_label:h}=e;return{language:c,is_default:u,accept_button_label:p,reject_button_label:h,title:e.title,description:e.description,acknowledge_button_label:null!==(t=e.acknowledge_button_label)&&void 0!==t?t:void 0,banner_title:null!==(i=e.banner_title)&&void 0!==i?i:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(r=e.purpose_header)&&void 0!==r?r:void 0,privacy_policy_link_label:null!==(s=e.privacy_policy_link_label)&&void 0!==s?s:void 0,privacy_policy_url:null!==(l=e.privacy_policy_url)&&void 0!==l?l:void 0,privacy_preferences_link_label:null!==(o=e.privacy_preferences_link_label)&&void 0!==o?o:void 0,save_button_label:null!==(a=e.save_button_label)&&void 0!==a?a:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},c=e=>{let{created_at:t,updated_at:i,privacy_notices:n,origin:r,id:s,...l}=e;return{...l,privacy_notice_ids:n?n.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>d(e)):[]}},u=e=>e===n.re.PRIVACY_CENTER?{title:{included:!0,required:!0},description:{included:!0,required:!0},save_button_label:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},modal_link_label:{included:!0}}:e===n.re.MODAL?{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0},modal_link_label:{included:!0}}:e===n.re.BANNER_AND_MODAL?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:e===n.re.TCF_OVERLAY?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},purpose_header:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}},96236:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Q}});var n=i(24246),r=i(62051),s=i(34090),l=i(27378),o=i(16134),a=i(25980),d=i(812),c=i(77213),u=i(58754),p=i(6675),h=i(46628),g=i(7426),x=i(40324);let f=e=>{let{children:t,purpose:i,endCol:s}=e;return(0,n.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderRight:s?"solid 1px":"unset",borderColor:"gray.200",height:"100%",minWidth:"36px",children:[1,3,4,5,6].includes(i)?null:(0,n.jsx)(r.xuv,{children:t})})};var b=()=>{let{values:e,setFieldValue:t}=(0,s.u6)(),{purposes:i}=(0,o.C)(p.ZS);return(0,n.jsx)(s.F2,{name:"purposeOverrides",render:()=>(0,n.jsxs)(r.kCb,{flexDirection:"column",minWidth:"944px",children:[(0,n.jsxs)(r.kCb,{width:"100%",border:"solid 1px",borderColor:"gray.200",backgroundColor:"gray.50",height:"36px",children:[(0,n.jsx)(r.kCb,{width:"600px",pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:"TCF purpose"}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",minWidth:"36px",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Allowed"})}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Consent"})}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Legitimate interest"})})]}),e.purposeOverrides.map((s,l)=>(0,n.jsxs)(r.kCb,{width:"100%",height:"36px",alignItems:"center",borderBottom:"solid 1px",borderColor:"gray.200",backgroundColor:"#fff",children:[(0,n.jsxs)(r.kCb,{width:"600px",borderLeft:"solid 1px",borderColor:"gray.200",p:0,alignItems:"center",height:"100%",pl:"4",fontSize:"xs",fontWeight:"normal",lineHeight:"4",children:["Purpose ",s.purpose,": ",i[s.purpose].name]}),(0,n.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderColor:"gray.200",height:"100%",children:(0,n.jsx)(r.xuv,{children:(0,n.jsx)(x.w8,{name:"purposeOverrides[".concat(l,"].is_included"),onChange:e=>{e||(t("purposeOverrides[".concat(l,"].is_consent"),!1),t("purposeOverrides[".concat(l,"].is_legitimate_interest"),!1))}})})}),(0,n.jsx)(f,{purpose:s.purpose,children:(0,n.jsx)(x.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_legitimate_interest,name:"purposeOverrides[".concat(l,"].is_consent")})}),(0,n.jsx)(f,{purpose:s.purpose,endCol:!0,children:(0,n.jsx)(x.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_consent,name:"purposeOverrides[".concat(l,"].is_legitimate_interest")})})]},s.purpose))]})})},v=i(59301),m=e=>{let{name:t,enabled:i}=e;return(0,n.jsxs)(r.Kqy,{spacing:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:[(0,n.jsxs)(r.xvT,{children:[t," status"," ",i?(0,n.jsx)(r.j8w,{color:"success",children:"Enabled"}):(0,n.jsx)(r.j8w,{color:"error",children:"Disabled"})]}),(0,n.jsxs)(r.xvT,{children:["To ",i?"disable":"enable"," ",t,", please contact your Fides administrator or"," ",(0,n.jsx)(v.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},_=i(46238),j=e=>{var t,i;let{label:l,options:o,layout:a,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,s.U$)(c),h={...u,value:null!==(t=u.value)&&void 0!==t?t:""},g=!!(p.touched&&p.error),f=d?o[0]:void 0,b=null!==(i=o.find(e=>e.value===h.value))&&void 0!==i?i:f,v=e=>{h.onChange(c.name)(e.target.value)};return"stacked"===a?(0,n.jsxs)(r.NIc,{isInvalid:g,children:[(0,n.jsxs)(r.jqI,{className:"w-fit",children:[l?(0,n.jsx)(x.__,{children:l}):null,(0,n.jsx)(r.y02.Group,{onChange:v,value:null==b?void 0:b.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{className:"flex-col gap-3",children:o.map(e=>{let{value:t,label:i,tooltip:s}=e;return(0,n.jsx)(r.y02,{value:t,"data-testid":"option-".concat(t),children:(0,n.jsxs)(r.jqI,{className:"items-center gap-2",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:i}),s?(0,n.jsx)(_.b,{label:s}):null]})},t)})})})]}),(0,n.jsx)(x.Bc,{isInvalid:g,message:p.error,fieldName:h.name})]}):(0,n.jsxs)(r.NIc,{isInvalid:g,children:[(0,n.jsxs)(r.rjZ,{templateColumns:"1fr 3fr",children:[(0,n.jsx)(x.__,{children:l}),(0,n.jsx)(r.y02.Group,{onChange:v,value:null==b?void 0:b.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{children:o.map(e=>(0,n.jsx)(r.y02,{value:e.value,"data-testid":"option-".concat(e.value),children:e.label},e.value))})})]}),(0,n.jsx)(x.Bc,{isInvalid:g,message:p.error,fieldName:h.name})]})},y=i(46420),C=i(51263);let w=e=>{let{title:t,children:i}=e;return(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(t),children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:t}),i]})};var T=()=>{let{tcf:e}=(0,a.hz)(),t=!!(0,o.C)(g.D2).enabled,{values:i,setFieldValue:l}=(0,s.u6)(),d=!!i.gpp.us_approach;return(0,n.jsx)(C.Z,{title:"Global Privacy Platform",children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[(0,n.jsx)(m,{name:"GPP",enabled:t}),t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{title:"GPP U.S.",children:(0,n.jsx)(j,{name:"gpp.us_approach",layout:"stacked",defaultFirstSelected:!1,options:[{label:"Enable U.S. National",value:y.en.NATIONAL,tooltip:"When US National is selected, Fides will present the same privacy notices to all consumers located anywhere in the United States."},{label:"Enable U.S. State-by-State",value:y.en.STATE,tooltip:"When state-by-state is selected, Fides will only present consent to consumers and save their preferences if they are located in a state that is supported by the GPP. The consent options presented to consumers will vary depending on the regulations in each state."},{label:"Enable US National and State-by-State notices",value:y.en.ALL,tooltip:"When enabled, Fides can be configured to serve the National and U.S. state notices. This mode is intended to provide consent coverage to U.S. states with new privacy laws where GPP support lags behind the effective date of state laws."}]})}),d?(0,n.jsxs)(w,{title:"MSPA",children:[(0,n.jsx)(x.Xl,{name:"gpp.mspa_covered_transactions",label:"All transactions covered by MSPA",tooltip:"When selected, the Fides CMP will communicate to downstream vendors that all preferences are covered under the MSPA.",onChange:e=>{e||(l("gpp.mspa_service_provider_mode",!1),l("gpp.mspa_opt_out_option_mode",!1))}}),(0,n.jsx)(x.w8,{label:"Enable MSPA service provider mode",name:"gpp.mspa_service_provider_mode",variant:"switchFirst",tooltip:"Enable service provider mode if you do not engage in any sales or sharing of personal information.",isDisabled:!!i.gpp.mspa_opt_out_option_mode||!i.gpp.mspa_covered_transactions}),(0,n.jsx)(x.w8,{label:"Enable MSPA opt-out option mode",name:"gpp.mspa_opt_out_option_mode",variant:"switchFirst",tooltip:"Enable opt-out option mode if you engage or may engage in the sales or sharing of personal information, or process any information for the purpose of targeted advertising.",isDisabled:!!i.gpp.mspa_service_provider_mode||!i.gpp.mspa_covered_transactions})]}):null]}):null,e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.izJ,{color:"gray.200"}),(0,n.jsxs)(w,{title:"GPP Europe",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:"Configure TCF string for Global Privacy Platform"}),(0,n.jsx)(x.w8,{label:"Enable TC string",name:"gpp.enable_tcfeu_string",variant:"switchFirst",tooltip:"When enabled, the GPP API will include a TCF EU consent string for users who are in regions where TCF applies."})]})]}):null]})})},S=i(64781),k=i(60325),N=()=>{var e,t;let{tcf:i}=(0,a.hz)(),{values:l,setFieldValue:o}=(0,s.u6)(),{data:d,isLoading:c}=(0,S.gT)(),u=[...(0,k.k1)(null!==(e=null==d?void 0:d.locations)&&void 0!==e?e:[]),...(0,k.k1)(null!==(t=null==d?void 0:d.location_groups)&&void 0!==t?t:[])].sort((e,t)=>e.name<t.name?-1:1);return i?(0,n.jsxs)(C.Z,{title:"Publisher settings",children:[(0,n.jsx)(r.AntTypography.Paragraph,{className:"mb-3",children:"Specify the country in which your organization operates for TCF compliance. This setting will determine the 'Publisher Country Code ' transmitted in the Transparency and Consent (TC) Data."}),(0,n.jsx)("label",{htmlFor:"publisher_country_code",className:"mb-1 block",children:(0,n.jsx)(r.AntTypography.Text,{className:"font-semibold",children:"Publisher country"})}),(0,n.jsx)(r.WPr,{"data-testid":"input-publisher_settings.publisher_country_code",id:"publisher_country_code",loading:c,allowClear:!0,options:null==u?void 0:u.map(e=>({value:e.id,label:e.name})),showSearch:!0,optionFilterProp:"label",placeholder:"Select a country",value:l.tcfPublisherSettings.publisher_country_code,onChange:e=>o("tcfPublisherSettings.publisher_country_code",e),className:"w-80"})]}):null},E=i(52955),I=i(71795),q=i(59512),P=i(55484),O=i(8133),L=i(31883);let F=P.Ry().shape({name:P.Z_().required().label("Name")}),R=e=>{let{isOpen:t,onClose:i,onSuccess:l}=e,o=(0,r.pmc)(),[a]=(0,E.LK)(),c=async e=>{let t=await a({name:e.name});(0,L.D4)(t)?o((0,h.Vo)((0,d.e$)(t.error))):(o((0,h.t5)("Successfully created TCF configuration")),null==l||l(t.data.id),i())};return(0,n.jsx)(O.Z,{title:"Create a new TCF configuration",isOpen:t,onClose:i,children:(0,n.jsx)(s.J9,{initialValues:{name:""},onSubmit:c,validationSchema:F,children:e=>{let{isValid:t,dirty:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",className:"w-full",children:[(0,n.jsx)(r.xvT,{children:"TCF configurations allow you to define unique sets of publisher restrictions. These configurations can be added to privacy experiences."}),(0,n.jsx)(x.j0,{id:"name",name:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsxs)(r.vyj,{className:"w-full justify-end pt-6",children:[(0,n.jsx)(r.wpx,{onClick:i,children:"Cancel"}),(0,n.jsx)(r.wpx,{type:"primary",htmlType:"submit",disabled:!t||!l,"data-testid":"save-config-button",children:"Save"})]})]})})}})})};var A=i(79894),z=i.n(A);let D=e=>{let{width:t,style:i,borderLeft:s=!1,borderRight:l=!1,...o}=e;return(0,n.jsx)(r.jqI,{align:"center",className:"h-full px-4",...o,style:{borderLeft:s?"solid 1px":"none",borderRight:l?"solid 1px":"none",borderColor:"var(--ant-color-border)",width:t,...i},role:"cell"})},W=e=>{let{width:t,style:i,borderLeft:s=!1,children:l,...o}=e;return(0,n.jsx)(r.jqI,{align:"center",role:"columnheader",className:"px-4",...o,style:{borderLeft:s?"solid 1px":"none",borderColor:"var(--ant-color-border)",fontWeight:500,whiteSpace:"nowrap",width:t,...i},children:l})},M=e=>{let{isHeader:t=!1,isLastRow:i=!1,style:s,...l}=e;return(0,n.jsx)(r.jqI,{role:t?"rowheader":"row",className:"h-9 w-full",...l,style:{backgroundColor:t?"var(--fidesui-bg-default)":void 0,borderBottom:i?"none":"solid 1px",borderColor:"var(--ant-color-border)",...s}})},Z=e=>{let{config:t,isLoading:i,style:s,...l}=e,{purposes:a}=(0,o.C)(p.ZS);return(0,n.jsxs)(r.jqI,{vertical:!0,...l,style:{maxWidth:"1200px",border:"solid 1px",borderColor:"var(--ant-color-border)",backgroundColor:"var(--ant-color-bg-base)",fontSize:"12px",...s},"aria-label":"Publisher restrictions table",role:"table","data-testid":"publisher-restrictions-table",children:[(0,n.jsxs)(M,{isHeader:!0,style:{width:"100%"},children:[(0,n.jsx)(W,{width:"600px",children:"TCF purpose"}),(0,n.jsxs)(W,{flex:1,gap:3,borderLeft:!0,children:["Restrictions",(0,n.jsx)(_.b,{label:"Restrictions control how vendors are permitted to process data for specific purposes. Fides supports three restriction types: Purpose Restriction to completely disallow data processing for a purpose, Require Consent to allow processing only with explicit user consent, and Require Legitimate Interest to allow processing based on legitimate business interest unless the user objects."})]}),(0,n.jsxs)(W,{width:"100px",gap:3,borderLeft:!0,children:["Flexible",(0,n.jsx)(_.b,{label:'Indicates whether the legal basis for this purpose can be overridden by publisher restrictions. If marked "No," the purpose has a fixed legal basis defined by the TCF and cannot be changed.'})]}),(0,n.jsx)(W,{width:"100px",borderLeft:!0,children:"Actions"})]}),Object.values(a).map((e,s)=>(0,n.jsxs)(M,{isLastRow:s===Object.values(a).length-1,children:[(0,n.jsxs)(D,{width:"600px",children:["Purpose ",e.id,": ",e.name]}),(0,n.jsx)(D,{flex:1,borderLeft:!0,"data-testid":"restriction-type-cell-".concat(e.id),children:i?(0,n.jsx)(r.OdW,{height:"16px",width:"100%"}):(()=>{var i;let s=(null==t?void 0:null===(i=t.restriction_types_per_purpose)||void 0===i?void 0:i[e.id])||[];return 0===s.length?"none":1===s.length?(0,n.jsx)(r.xvT,{size:"sm",whiteSpace:"nowrap",children:q.fj[s[0]]}):(0,n.jsxs)(r.xvT,{children:[s.length," restrictions"]})})()}),(0,n.jsx)(D,{width:"100px",borderLeft:!0,children:q.Py.includes(e.id)?(0,n.jsx)(r.j8w,{color:"error","data-testid":"flexibility-tag-".concat(e.id),children:"No"}):(0,n.jsx)(r.j8w,{color:"success","data-testid":"flexibility-tag-".concat(e.id),children:"Yes"})}),(0,n.jsx)(D,{width:"100px",borderLeft:!0,children:(0,n.jsx)(z(),{href:"/settings/consent/".concat(null==t?void 0:t.id,"/").concat(e.id),passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(r.wpx,{size:"small","data-testid":"edit-restriction-btn-".concat(e.id),children:"Edit"})})})]},e.id))]})};var V=i(56358),H=i(19904);let B=()=>(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"})]}),G=e=>{let{searchResults:t,selectedConfigId:i,handleSelection:s,userCanDeleteConfigs:l,onDeleteOpen:o,setConfigToDelete:a}=e;return(0,n.jsx)(r.y02.Group,{onChange:e=>s(e.target.value),value:i,className:"flex flex-col gap-2",children:t.map(e=>(0,n.jsxs)(r.jqI,{className:l?"justify-between":"justify-start","data-testid":"tcf-config-item-".concat(e.id),children:[(0,n.jsx)(r.y02,{value:e.id,name:"tcf-config-id","data-testid":"tcf-config-item",children:(0,n.jsx)(r.xvT,{className:"text-sm",children:e.name})}),l&&(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:(0,n.jsx)(V.q,{fontSize:16}),onClick:t=>{t.stopPropagation(),a(e),o()},"data-testid":"delete-config-button"})]},e.id))})},U=e=>{let t,{searchTerm:i,setSearchTerm:s,searchResults:o,selectedConfigId:a,handleSelection:d,userCanCreateConfigs:c,userCanDeleteConfigs:u,modalOnOpen:p,onDeleteOpen:h,setConfigToDelete:g,isLoading:x,setDropdownOpen:f,configurations:b}=e,[v,m]=(0,l.useState)(a);return(0,l.useEffect)(()=>{m(a)},[a]),t=x?(0,n.jsx)(B,{}):0===o.length?(0,n.jsx)(r.xvT,{className:"text-center",children:"No configurations found."}):(0,n.jsx)(G,{searchResults:o,selectedConfigId:v,handleSelection:e=>{m(e)},userCanDeleteConfigs:u,onDeleteOpen:h,setConfigToDelete:g}),(0,n.jsxs)(r.V4A,{title:"TCF configurations",className:"min-w-[300px]",extra:(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:(0,n.jsx)(r.Two,{}),onClick:()=>f(!1),"data-testid":"close-config-dropdown"}),style:{boxShadow:"var(--ant-box-shadow)"},children:[b.length>10&&(0,n.jsx)(r.BZy,{size:"sm",children:(0,n.jsx)(r.uFc,{className:"mb-4",placeholder:"Search...",onChange:e=>s(e.target.value),value:i})}),t,(0,n.jsxs)(r.jqI,{gap:"small",className:"mt-4",children:[c&&(0,n.jsx)(r.wpx,{size:"small",onClick:()=>{p(),f(!1)},className:"flex-1","data-testid":"create-config-button",children:"+ Create"}),(0,n.jsx)(r.wpx,{size:"small",onClick:()=>d(v),className:"flex-1","data-testid":"apply-config-button",disabled:v===a,children:"Apply"})]})]})},$=e=>(0,n.jsx)(U,{...e}),K=e=>{var t;let{selectedConfigId:i,configurations:s,isLoading:o=!1,onConfigurationSelect:a,onConfigurationDelete:c}=e,u=(0,H.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),p=(0,H.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),h=(0,r.pmc)({id:"tcf-config-toast"}),[g]=(0,E.Cm)(),{isOpen:x,onOpen:f,onClose:b}=(0,r.qY0)(),{isOpen:v,onOpen:m,onClose:_}=(0,r.qY0)(),[j,C]=(0,l.useState)(""),[w,T]=(0,l.useState)(),[S,k]=(0,l.useState)(!1),N=(0,l.useMemo)(()=>j?s.filter(e=>e.name.toLowerCase().includes(j.toLowerCase())):s,[s,j]),I=(0,l.useMemo)(()=>s.find(e=>e.id===i),[s,i]),q=null!==(t=null==I?void 0:I.name)&&void 0!==t?t:"Select Configuration",P=e=>{a(e),k(!1)},O=async e=>{try{await g(e).unwrap(),null==c||c(e),T(void 0),_(),h({status:"success",description:'Configuration "'.concat(null==w?void 0:w.name,'" was successfully deleted.')})}catch(e){h({status:"error",description:(0,d.e$)(e,"A problem occurred while deleting the configuration.")})}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.S0p,{open:S,onOpenChange:k,trigger:["click"],overlayStyle:{zIndex:999},dropdownRender:()=>$({searchTerm:j,setSearchTerm:C,searchResults:N,selectedConfigId:i,handleSelection:P,userCanCreateConfigs:u,userCanDeleteConfigs:p,modalOnOpen:f,onDeleteOpen:m,setConfigToDelete:T,isLoading:o,setDropdownOpen:k,configurations:s}),children:(0,n.jsx)(r.wpx,{icon:(0,n.jsx)(r.v4q,{}),iconPosition:"end","data-testid":"tcf-config-dropdown-trigger",children:q})}),(0,n.jsx)(R,{isOpen:x,onClose:b,onSuccess:e=>{a(e)}}),(0,n.jsx)(r.cVQ,{isOpen:v,onClose:()=>{T(void 0),_()},onConfirm:()=>{w&&O(w.id)},title:"Delete configuration",message:"Are you sure you want to delete this configuration? This action cannot be undone."})]})};var Y=i(32885);let X=e=>{let{defaultChecked:t,onChange:i,...s}=e,o=(0,r.pmc)(),[a,c]=(0,l.useState)(t),[u,p]=(0,l.useState)(!1),{isLoading:x}=(0,Y.x8)(),[f,{isLoading:b}]=(0,g.L)(),[v]=(0,Y.M7)(),{data:m}=(0,Y.n3)(void 0,{skip:x}),j=async e=>{let t=await f({consent:{override_vendor_purposes:e}});e&&m&&await v(m.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(t=>{if(o.closeAll(),null==i||i(e),(0,L.D4)(t)){let e=(0,d.e$)(t.error,"An unexpected error occurred while saving vendor override settings. Please try again.");null==i||i(!1),o((0,h.Vo)(e))}})(t)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(r.xvT,{children:"Configure overrides for TCF related purposes."}),(0,n.jsxs)(r.vyj,{size:"small",children:[(0,n.jsx)(r.rAg,{size:"small",disabled:b,loading:b,...s,checked:a,defaultChecked:t,onClick:e=>{e?(c(e),j(e)):p(!0)},"data-testid":"tcf-override-toggle"}),(0,n.jsx)(r.xvT,{children:"Override vendor purposes"}),(0,n.jsx)(_.b,{label:"Toggle on if you want to globally change any flexible legal bases or remove TCF purposes from your CMP"})]})]}),(0,n.jsx)(r.cVQ,{isOpen:u,onClose:()=>p(!1),onConfirm:()=>{c(!1),j(!1),p(!1)},title:"Disable Vendor Overrides",message:"Are you sure you want to disable vendor overrides? Clicking 'Continue' will immediately remove any custom configurations you have set for TCF purposes for all experiences."})]})},J=e=>{var t;let{isTCFOverrideEnabled:i}=e,[s,o]=(0,l.useState)(i),[a,d]=(0,l.useState)(!1),[c,u]=(0,I._)("selectedTCFConfigId",null),{data:p,isLoading:h}=(0,E.LS)({page:1,size:50},{skip:!i}),{data:g,isFetching:x}=(0,E.NZ)(c||"",{skip:!c});return(0,l.useEffect)(()=>{var e,t;!h&&(null==p?void 0:null===(e=p.items)||void 0===e?void 0:e.length)&&!c&&u(p.items[0].id),h||!c||(null==p?void 0:null===(t=p.items)||void 0===t?void 0:t.length)||u(null)},[h,null==p?void 0:p.items,c,u]),(0,n.jsxs)(C.Z,{title:"Publisher restrictions",fontSize:"sm",children:[(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",style:{width:"100%"},children:[(0,n.jsx)(X,{defaultChecked:s,onChange:e=>o(e)}),s&&(0,n.jsxs)(n.Fragment,{children:[h&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.OdW,{height:"20px"}),(0,n.jsx)(r.OdW,{height:"20px"}),(0,n.jsx)(r.OdW,{height:"32px",width:"200px"})]}),!h&&(null==p?void 0:null===(t=p.items)||void 0===t?void 0:t.length)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activities."}),(0,n.jsxs)(r.xvT,{children:["To configure this section, select a TCF purpose to edit the restriction type and vendors."," ",(0,n.jsx)(v.Z,{href:q.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)(K,{selectedConfigId:c||"",configurations:(null==p?void 0:p.items)||[],onConfigurationSelect:u})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xvT,{children:['To define custom publisher restrictions select "create configuration" below.'," ",(0,n.jsx)(v.Z,{href:q.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)(r.wpx,{onClick:()=>d(!0),"data-testid":"create-config-button",children:"Create configuration +"})]})]})]}),(0,n.jsx)(R,{isOpen:a,onClose:()=>d(!1),onSuccess:e=>{u(e)}}),s&&c&&(0,n.jsx)(Z,{className:"mt-3",config:g,isLoading:x})]})};var Q=()=>{var e,t;let{isLoading:i}=(0,Y.x8)(),{tcf:x}=(0,a.hz)(),{data:f,isLoading:v}=(0,Y.n3)(void 0,{skip:i||!x}),[_,{isLoading:j}]=(0,Y.M7)(),{data:w,isLoading:S}=(0,g.tB)({api_set:!0}),{data:k,isLoading:E}=(0,g.tB)({api_set:!1}),[I]=(0,g.L)(),q=(0,o.C)(g.D2),P=(0,o.C)(g.Yh),O=(0,l.useMemo)(()=>w&&(null==w?void 0:w.consent)&&"override_vendor_purposes"in w.consent?w.consent.override_vendor_purposes:!!k&&null!=k&&!!k.consent&&"override_vendor_purposes"in k.consent&&k.consent.override_vendor_purposes,[w,k]),{isLoading:L}=(0,p.a4)(),F=(0,r.pmc)(),R=async e=>{var t;let i=e=>{if(F.closeAll(),(0,d.D4)(e)){let t=(0,d.e$)(e.error,"An unexpected error occurred while saving. Please try again.");F((0,h.Vo)(t))}else F((0,h.t5)("Settings saved successfully"))},n=[...e.purposeOverrides.map(e=>{let t;return e.is_consent&&(t=y.I$.CONSENT),e.is_legitimate_interest&&(t=y.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:t}})];if(O){let e=await _(n);if((0,d.D4)(e)){i(e);return}}let{enabled:r,...s}=e.gpp;i(await I({gpp:s,plus_consent_settings:{tcf_publisher_country_code:null!==(t=e.tcfPublisherSettings.publisher_country_code)&&void 0!==t?t:null}}))},A=(0,l.useMemo)(()=>({purposeOverrides:f?f.map(e=>({purpose:e.purpose,is_included:e.is_included,is_consent:e.required_legal_basis===y.I$.CONSENT,is_legitimate_interest:e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS})):[],gpp:q,tcfPublisherSettings:{publisher_country_code:P.tcf_publisher_country_code}}),[f,q,P]),z=(0,l.useMemo)(()=>(null==f?void 0:f.some(e=>!e.is_included||e.required_legal_basis===y.I$.CONSENT||e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS))||!1,[f]),D=null===(t=(0,a.hz)())||void 0===t?void 0:null===(e=t.flags)||void 0===e?void 0:e.publisherRestrictions;return(0,n.jsx)(c.Z,{title:"Consent Configuration",children:i||L||v||S||E?(0,n.jsx)(r.kCb,{justifyContent:"center",alignItems:"center",height:"100%",children:(0,n.jsx)(r.$jN,{})}):(0,n.jsxs)(r.xuv,{"data-testid":"consent-configuration",children:[(0,n.jsx)(u.Z,{heading:"Consent settings"}),(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,children:[(0,n.jsx)(C.Z,{title:"Transparency & Consent Framework settings",children:(0,n.jsx)(m,{name:"TCF",enabled:x})}),x&&!z&&D&&(0,n.jsx)(J,{isTCFOverrideEnabled:O})]}),(0,n.jsx)(s.J9,{initialValues:A,enableReinitialize:!0,onSubmit:R,children:e=>{let{dirty:t,isValid:i,isSubmitting:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[x&&(z||!D)&&(0,n.jsxs)(C.Z,{title:"Vendor overrides",fontSize:"sm",children:[(0,n.jsx)(X,{defaultChecked:O,disabled:j}),O&&(0,n.jsxs)(r.Kqy,{mt:2,spacing:2,children:[(0,n.jsx)(r.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activites."}),(0,n.jsx)(r.xvT,{children:"To configure this section, select the purposes you allow and where available, the appropriate legal bases (either Consent or Legitimate Interest)."}),(0,n.jsx)(b,{})]})]}),(0,n.jsx)(N,{}),(0,n.jsx)(T,{}),(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:!t||!i,loading:l,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return l},D4:function(){return r},Dy:function(){return a},XD:function(){return d},cz:function(){return c},hE:function(){return o},oK:function(){return s}});var n=i(76649);let r=e=>"error"in e,s=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,l=e=>(0,n.Ln)({status:"number",data:{}},e),o=e=>(0,n.Ln)({detail:"string"},e),a=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=i(19043)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>s(e,t),r=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>s(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>s(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>s(i,t[e]));class l{static narrow(e){return new l(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof l?e.NF:e instanceof Function?e:t=>n(e,t);return new l(e=>t(e)&&i(e))}}new l(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=53748)}),_N_E=e.O()}]);
|