ethyca-fides 2.68.1b1__py2.py3-none-any.whl → 2.68.1b3__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ethyca-fides might be problematic. Click here for more details.

Files changed (309) hide show
  1. {ethyca_fides-2.68.1b1.dist-info → ethyca_fides-2.68.1b3.dist-info}/METADATA +3 -1
  2. {ethyca_fides-2.68.1b1.dist-info → ethyca_fides-2.68.1b3.dist-info}/RECORD +247 -224
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/3baf42d251a6_add_generic_taxonomy_models.py +239 -0
  5. fides/api/alembic/migrations/versions/90502bcda282_update_request_tasks_add_polling_async.py +35 -0
  6. fides/api/api/v1/endpoints/generic_overrides.py +64 -167
  7. fides/api/api/v1/endpoints/privacy_request_endpoints.py +1 -1
  8. fides/api/common_exceptions.py +12 -3
  9. fides/api/db/base.py +6 -0
  10. fides/api/models/detection_discovery/core.py +6 -0
  11. fides/api/models/privacy_request/request_task.py +25 -0
  12. fides/api/models/taxonomy.py +275 -0
  13. fides/api/schemas/privacy_center_config.py +48 -19
  14. fides/api/schemas/storage/storage.py +2 -0
  15. fides/api/service/async_dsr/__init__.py +0 -0
  16. fides/api/service/async_dsr/async_dsr_service.py +75 -0
  17. fides/api/service/connectors/saas_connector.py +5 -6
  18. fides/api/service/deps.py +5 -0
  19. fides/api/service/privacy_request/dsr_package/dsr_report_builder.py +6 -4
  20. fides/api/service/privacy_request/request_service.py +56 -3
  21. fides/api/service/storage/storage_uploader_service.py +80 -5
  22. fides/api/service/storage/streaming/__init__.py +42 -0
  23. fides/api/service/storage/streaming/base_storage_client.py +61 -0
  24. fides/api/service/storage/streaming/dsr_storage.py +98 -0
  25. fides/api/service/storage/streaming/retry.py +282 -0
  26. fides/api/service/storage/streaming/s3/__init__.py +5 -0
  27. fides/api/service/storage/streaming/s3/s3_storage_client.py +113 -0
  28. fides/api/service/storage/streaming/s3/streaming_s3.py +196 -0
  29. fides/api/service/storage/streaming/schemas.py +173 -0
  30. fides/api/service/storage/streaming/smart_open_client.py +265 -0
  31. fides/api/service/storage/streaming/smart_open_streaming_storage.py +998 -0
  32. fides/api/service/storage/streaming/storage_client_factory.py +60 -0
  33. fides/api/task/graph_task.py +4 -4
  34. fides/api/task/manual/manual_task_graph_task.py +14 -4
  35. fides/api/util/connection_type.py +68 -33
  36. fides/config/execution_settings.py +4 -0
  37. fides/data/sample_project/docker-compose.yml +3 -3
  38. fides/service/privacy_request/privacy_request_service.py +1 -9
  39. fides/service/taxonomy/__init__.py +0 -0
  40. fides/service/taxonomy/handlers/__init__.py +11 -0
  41. fides/service/taxonomy/handlers/base.py +42 -0
  42. fides/service/taxonomy/handlers/legacy_handler.py +95 -0
  43. fides/service/taxonomy/taxonomy_service.py +261 -0
  44. fides/service/taxonomy/utils.py +160 -0
  45. fides/ui-build/static/admin/404.html +1 -1
  46. fides/ui-build/static/admin/_next/static/_BLI2ArqQzY5XnXbrcxa2/_buildManifest.js +1 -0
  47. fides/ui-build/static/admin/_next/static/chunks/1099-7b2085a3931da9e4.js +1 -0
  48. fides/ui-build/static/admin/_next/static/chunks/1138-0d846ffef62c580f.js +1 -0
  49. fides/ui-build/static/admin/_next/static/chunks/1345-ab756811e19ff4fc.js +1 -0
  50. fides/ui-build/static/admin/_next/static/chunks/{1817-c90365325f8a3d75.js → 1817-fd21f1f5ef0faffa.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/{1975.e5cc7a1ccd477671.js → 1975.16126463309143e3.js} +1 -1
  52. fides/ui-build/static/admin/_next/static/chunks/{2921-46f9465c2852a46b.js → 2921-0e5cc63a82e31830.js} +1 -1
  53. fides/ui-build/static/admin/_next/static/chunks/3620-6cceae71bae5b531.js +1 -0
  54. fides/ui-build/static/admin/_next/static/chunks/3729-7d2d52400f1f7413.js +1 -0
  55. fides/ui-build/static/admin/_next/static/chunks/3855-64541570e2f838fb.js +1 -0
  56. fides/ui-build/static/admin/_next/static/chunks/3872-7a18d18a5e287e4e.js +1 -0
  57. fides/ui-build/static/admin/_next/static/chunks/{3923-a33633feba5e655e.js → 3923-5c87b3d7f1626678.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/{401-741bb31b586b7c96.js → 401-3902e3e98790d401.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/chunks/{4121-94354b50a41f8497.js → 4121-64ef70ef906bbdd0.js} +1 -1
  60. fides/ui-build/static/admin/_next/static/chunks/431-86ad2beeb93c95c9.js +1 -0
  61. fides/ui-build/static/admin/_next/static/chunks/4608-70521532195124de.js +1 -0
  62. fides/ui-build/static/admin/_next/static/chunks/4786-53ef1662f2d0d98c.js +1 -0
  63. fides/ui-build/static/admin/_next/static/chunks/4808-8713433c84a62efe.js +1 -0
  64. fides/ui-build/static/admin/_next/static/chunks/4844-351f99b6644b654e.js +1 -0
  65. fides/ui-build/static/admin/_next/static/chunks/5258-c6f96dc740eb5fb1.js +1 -0
  66. fides/ui-build/static/admin/_next/static/chunks/5487-338800277d36b8d7.js +1 -0
  67. fides/ui-build/static/admin/_next/static/chunks/549-e6453a3526023e85.js +1 -0
  68. fides/ui-build/static/admin/_next/static/chunks/602-80d113e801d7407d.js +1 -0
  69. fides/ui-build/static/admin/_next/static/chunks/{6084-02abe12327fc3dbc.js → 6084-da63f20d9416a982.js} +1 -1
  70. fides/ui-build/static/admin/_next/static/chunks/{6853-270261ef5537a106.js → 6853-1d947b75eb07188c.js} +1 -1
  71. fides/ui-build/static/admin/_next/static/chunks/6954-24f9a4f27d67b732.js +1 -0
  72. fides/ui-build/static/admin/_next/static/chunks/7476-a0dd03bfccf60d0c.js +1 -0
  73. fides/ui-build/static/admin/_next/static/chunks/7630-9fbe06cfb98266fe.js +1 -0
  74. fides/ui-build/static/admin/_next/static/chunks/{787-5ba991cad1f7664a.js → 787-3dd31844cf7fec55.js} +1 -1
  75. fides/ui-build/static/admin/_next/static/chunks/79-dcd20e8b09501c17.js +1 -0
  76. fides/ui-build/static/admin/_next/static/chunks/796-8773e04b64ce2260.js +1 -0
  77. fides/ui-build/static/admin/_next/static/chunks/8002-dcd02da6e5649a1c.js +1 -0
  78. fides/ui-build/static/admin/_next/static/chunks/9046-57eab238570b8bf4.js +1 -0
  79. fides/ui-build/static/admin/_next/static/chunks/9676.bf0a8a6ff6dfd2af.js +1 -0
  80. fides/ui-build/static/admin/_next/static/chunks/{9826-8c81c97a72510fcf.js → 9826-756c958aecab59a2.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/9951-cdf73904a3adb27b.js +1 -0
  82. fides/ui-build/static/admin/_next/static/chunks/pages/{404-9174cdb70126c2c5.js → 404-dd625a559ada46ca.js} +1 -1
  83. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-65723cd4b8fc36ac.js → _app-b6b09b2878b77b21.js} +136 -135
  84. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-621416493c89ef01.js → manual-92cf5e313be1f9e2.js} +1 -1
  85. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-0b9908c3e1dfe49e.js → multiple-d6c525ee731a2993.js} +1 -1
  86. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-5664a3ea796e5ffb.js +1 -0
  87. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-5bb1b31ae8752250.js → add-vendors-78f13de90111fd80.js} +1 -1
  88. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-0fc678f3d6d2fcec.js +1 -0
  89. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-4e4d9426743b5cb4.js → [id]-126db59dc25ca326.js} +1 -1
  90. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-d72460348fadcab8.js → privacy-experience-289605267d6cce7e.js} +1 -1
  91. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-3e7ddc252da00c98.js → [id]-e9fd9b28ac9705af.js} +1 -1
  92. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-35a7c305beee9428.js → new-28c003b6043bd16c.js} +1 -1
  93. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-c643eff04525298e.js +1 -0
  94. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-ab96939421639153.js → properties-3ef5d01779a26455.js} +1 -1
  95. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-baa4a2f8f08ac224.js +1 -0
  96. fides/ui-build/static/admin/_next/static/chunks/pages/{consent-13240e3ca77acfeb.js → consent-8d4be9e7ec7d2a35.js} +1 -1
  97. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-aad6047a4604b945.js → [resourceUrn]-f27ec4578c674181.js} +1 -1
  98. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-bd37b407c80c6986.js → [projectUrn]-27b6c255bd9e73b6.js} +1 -1
  99. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-0f66dac32040519c.js +1 -0
  100. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-b6b98cea25dd94fa.js → [resourceUrn]-3b938562df81c4b0.js} +1 -1
  101. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-ebf5e7fa4e2ffb49.js +1 -0
  102. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-b27c660039d951c9.js +1 -0
  103. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-8ce5d24af470888e.js +1 -0
  104. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-8e35e33928abbcdc.js +1 -0
  105. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-21c141279e66237a.js +1 -0
  106. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-31e6c54794a9883e.js → [resourceUrn]-3bc6a207693fd175.js} +1 -1
  107. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-2822a423a7ad0550.js → detection-da16e73df395ad1d.js} +1 -1
  108. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-f98dd251babb7e28.js → [resourceUrn]-04b242632a114405.js} +1 -1
  109. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-56eb4c014f0d96a3.js → discovery-900fe50183a40d72.js} +1 -1
  110. fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-8f88dc31c5144ea8.js → datamap-4f1f7c3a9531a8f4.js} +1 -1
  111. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-343294dcb10d9532.js +1 -0
  112. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-1c097a0809fa5b6f.js +1 -0
  113. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-b47fa2498b534719.js +1 -0
  114. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-a31f881cab25704a.js +1 -0
  115. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-858c59c9e67e318d.js +1 -0
  116. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-67a7fe58b96ea739.js → [id]-16c28d272225afb6.js} +1 -1
  117. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-90a8df230cb89877.js → new-68f502d8b0b5792c.js} +1 -1
  118. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-1eb9acb17b133fd1.js +1 -0
  119. fides/ui-build/static/admin/_next/static/chunks/pages/{index-876bfd7210040cec.js → index-fec557d99211f577.js} +1 -1
  120. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-766e57bcf38b5b1e.js → [id]-e613543818d6cbd2.js} +1 -1
  121. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-8069f7c33695fd45.js +1 -0
  122. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-6e796c3fe632280b.js → [id]-4a08ca7762a19700.js} +1 -1
  123. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-fa0f3841c5bdfdeb.js → add-template-343a965dcdb3d11e.js} +1 -1
  124. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-3ade4c54b1c8a11e.js +1 -0
  125. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-9103bfb854f71410.js +1 -0
  126. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-11503454a62d8d7b.js → AntForm-3b97029bd4d3c3ea.js} +1 -1
  127. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-a504941807bdb7f1.js → FormikAntFormItem-9d9beb8f0d8a278c.js} +1 -1
  128. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-0119403c8ff97f83.js → FormikControlled-84a4d8fc60f839ed.js} +1 -1
  129. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-94f6d57d6c94ddf7.js → FormikField-1fccf542ab2e33bf.js} +1 -1
  130. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-ed1a3ae09d72df89.js → forms-aa75263ae1ba67bb.js} +1 -1
  131. fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-db334a1cbb102255.js +1 -0
  132. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-11c1e4545c8f528c.js +1 -0
  133. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-192a986f61c23268.js +1 -0
  134. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-9216ac993d71387e.js +1 -0
  135. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-e55ec84d5380401d.js +1 -0
  136. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-48f447b31c786b80.js +1 -0
  137. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-41976b28503623cd.js → [id]-a74b51b704b80cb2.js} +1 -1
  138. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-cb438d8f5ec6007a.js → add-property-8d23f0c55ff6510a.js} +1 -1
  139. fides/ui-build/static/admin/_next/static/chunks/pages/{properties-b6db7036993709b3.js → properties-77acceac4f99e7af.js} +1 -1
  140. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-4bc3e281409265cc.js → datamap-e60d398e255f4e00.js} +1 -1
  141. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/alpha-6aad3f563ed03b3f.js +1 -0
  142. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about-c1b8f3606d160bb1.js +1 -0
  143. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-d9f7f78810d58d08.js +1 -0
  144. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-ee2c7dde99b1dafb.js +1 -0
  145. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-a4dad8ca9de2d07b.js +1 -0
  146. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-386368bf7cb31771.js → domain-records-31c270d228e00581.js} +1 -1
  147. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-996b3f250dd3ea1f.js +1 -0
  148. fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-ee94981326ddcbf4.js +1 -0
  149. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-b41fb5ad277088ab.js → locations-0b831c58966782b8.js} +1 -1
  150. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-94271ba4a224a353.js +1 -0
  151. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-a94dfeea43fbca7d.js → regulations-41b8136e50320fd3.js} +1 -1
  152. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-52b45569cbc82e60.js +1 -0
  153. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-18b316e2dad73731.js → [id]-36d74e93e54aabaf.js} +1 -1
  154. fides/ui-build/static/admin/_next/static/chunks/pages/systems-24dfc8e2279ced2e.js +1 -0
  155. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-d9675cf5e6083b27.js +1 -0
  156. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-3237881945acc0ee.js → [id]-866826d7959df487.js} +1 -1
  157. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-a3a50d9d79066935.js → user-management-e63b61a8f99ccd57.js} +1 -1
  158. fides/ui-build/static/admin/_next/static/chunks/{webpack-69658aeaf6155d89.js → webpack-6d0a487039bcf30c.js} +1 -1
  159. fides/ui-build/static/admin/_next/static/css/92441453b27e9c34.css +1 -0
  160. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  161. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  162. fides/ui-build/static/admin/add-systems.html +1 -1
  163. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  164. fides/ui-build/static/admin/consent/configure.html +1 -1
  165. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  166. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  167. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  168. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  169. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  170. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  171. fides/ui-build/static/admin/consent/properties.html +1 -1
  172. fides/ui-build/static/admin/consent/reporting.html +1 -1
  173. fides/ui-build/static/admin/consent.html +1 -1
  174. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  175. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  176. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  177. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  178. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  179. fides/ui-build/static/admin/data-catalog.html +1 -1
  180. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  181. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  182. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  183. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  184. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  185. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  186. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  187. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  188. fides/ui-build/static/admin/datamap.html +1 -1
  189. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  190. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  191. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  192. fides/ui-build/static/admin/dataset/new.html +1 -1
  193. fides/ui-build/static/admin/dataset.html +1 -1
  194. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  195. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  196. fides/ui-build/static/admin/datastore-connection.html +1 -1
  197. fides/ui-build/static/admin/index.html +1 -1
  198. fides/ui-build/static/admin/integrations/[id].html +1 -1
  199. fides/ui-build/static/admin/integrations.html +1 -1
  200. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  201. fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
  202. fides/ui-build/static/admin/lib/fides.js +1 -1
  203. fides/ui-build/static/admin/login/[provider].html +1 -1
  204. fides/ui-build/static/admin/login.html +1 -1
  205. fides/ui-build/static/admin/messaging/[id].html +1 -1
  206. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  207. fides/ui-build/static/admin/messaging.html +1 -1
  208. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  209. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  210. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  211. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  212. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  213. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  214. fides/ui-build/static/admin/poc/forms.html +1 -1
  215. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  216. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  217. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  218. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  219. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  220. fides/ui-build/static/admin/privacy-requests.html +1 -1
  221. fides/ui-build/static/admin/properties/[id].html +1 -1
  222. fides/ui-build/static/admin/properties/add-property.html +1 -1
  223. fides/ui-build/static/admin/properties.html +1 -1
  224. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  225. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  226. fides/ui-build/static/admin/settings/about.html +1 -1
  227. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  228. fides/ui-build/static/admin/settings/consent.html +1 -1
  229. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  230. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  231. fides/ui-build/static/admin/settings/domains.html +1 -1
  232. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  233. fides/ui-build/static/admin/settings/locations.html +1 -1
  234. fides/ui-build/static/admin/settings/organization.html +1 -1
  235. fides/ui-build/static/admin/settings/regulations.html +1 -1
  236. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  237. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  238. fides/ui-build/static/admin/systems.html +1 -1
  239. fides/ui-build/static/admin/taxonomy.html +1 -1
  240. fides/ui-build/static/admin/user-management/new.html +1 -1
  241. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  242. fides/ui-build/static/admin/user-management.html +1 -1
  243. fides/ui-build/static/admin/_next/static/chunks/203-0c6cadcda98bdd33.js +0 -1
  244. fides/ui-build/static/admin/_next/static/chunks/3450-9314e1b15df8a8da.js +0 -1
  245. fides/ui-build/static/admin/_next/static/chunks/3855-4267fd8193e7f525.js +0 -1
  246. fides/ui-build/static/admin/_next/static/chunks/3872-ac5feefd40b61ae3.js +0 -1
  247. fides/ui-build/static/admin/_next/static/chunks/409-5bc4369b80a8c11d.js +0 -1
  248. fides/ui-build/static/admin/_next/static/chunks/4230-1ebc8c0ab293a077.js +0 -1
  249. fides/ui-build/static/admin/_next/static/chunks/431-a34d7ceff17c2169.js +0 -1
  250. fides/ui-build/static/admin/_next/static/chunks/4608-557fb24665b2e4bf.js +0 -1
  251. fides/ui-build/static/admin/_next/static/chunks/5309-ffdec884eec79d29.js +0 -1
  252. fides/ui-build/static/admin/_next/static/chunks/5574-831167a8da90e2e6.js +0 -1
  253. fides/ui-build/static/admin/_next/static/chunks/6662-499c189f932a35aa.js +0 -1
  254. fides/ui-build/static/admin/_next/static/chunks/6780-7d28e030f6516e5d.js +0 -1
  255. fides/ui-build/static/admin/_next/static/chunks/6882-7cc1d14e27a80c10.js +0 -1
  256. fides/ui-build/static/admin/_next/static/chunks/6954-7784e8d5ad6b8110.js +0 -1
  257. fides/ui-build/static/admin/_next/static/chunks/7476-4de465016d3433b4.js +0 -1
  258. fides/ui-build/static/admin/_next/static/chunks/7630-2a5c57787632693d.js +0 -1
  259. fides/ui-build/static/admin/_next/static/chunks/7725-c79513b04113112b.js +0 -1
  260. fides/ui-build/static/admin/_next/static/chunks/79-98cfab20bb831137.js +0 -1
  261. fides/ui-build/static/admin/_next/static/chunks/796-0b768155bf20505f.js +0 -1
  262. fides/ui-build/static/admin/_next/static/chunks/8735-f84afcc50885883c.js +0 -1
  263. fides/ui-build/static/admin/_next/static/chunks/9046-97a972cc8a8ed24d.js +0 -1
  264. fides/ui-build/static/admin/_next/static/chunks/9226-318dadf1c050ecda.js +0 -1
  265. fides/ui-build/static/admin/_next/static/chunks/9676.9e6828b42ef05e06.js +0 -1
  266. fides/ui-build/static/admin/_next/static/chunks/9951-4df2b67e0def5500.js +0 -1
  267. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-18e96ce81dab51a4.js +0 -1
  268. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-54d7c7310763c66d.js +0 -1
  269. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-6bc3b73a21576869.js +0 -1
  270. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-fe3d6887fecf0f86.js +0 -1
  271. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-e4770acf7044e2f5.js +0 -1
  272. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-0db635c3483c9da8.js +0 -1
  273. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-0c0e0a7798345541.js +0 -1
  274. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-3c56e5fe072a44c6.js +0 -1
  275. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-53a763e49ce34a74.js +0 -1
  276. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-6a90131dcecd694c.js +0 -1
  277. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-145fe9e4cfcb231d.js +0 -1
  278. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-8a1e5d140785c1e9.js +0 -1
  279. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-227b5db4b472a6a7.js +0 -1
  280. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-8401f17fe5d9a1dc.js +0 -1
  281. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-7d77b3ad069be268.js +0 -1
  282. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-cfb25b02abb8da71.js +0 -1
  283. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-3fdc55d4c129e618.js +0 -1
  284. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-8f9c006b6166f002.js +0 -1
  285. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-6ba7ae4f26c06cb0.js +0 -1
  286. fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-e8db3ad525e7ddbd.js +0 -1
  287. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-c14dd24592369467.js +0 -1
  288. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-100d7d03930629a8.js +0 -1
  289. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-6f8d1b3ec83cfcf0.js +0 -1
  290. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-3ce15577435d47cb.js +0 -1
  291. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-f43a988542813110.js +0 -1
  292. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/alpha-1ea40fcd6b4268bf.js +0 -1
  293. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about-65c7600fadc6e55a.js +0 -1
  294. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-33dab986141b3663.js +0 -1
  295. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-1195042727c399ed.js +0 -1
  296. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-71b98858ecb4e097.js +0 -1
  297. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-cf427e04f862b5d2.js +0 -1
  298. fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-eabeeec5bf2773c6.js +0 -1
  299. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-ee56698ae3a6a78b.js +0 -1
  300. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-0e2e98cc38ee5499.js +0 -1
  301. fides/ui-build/static/admin/_next/static/chunks/pages/systems-c32589c86081b750.js +0 -1
  302. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-a8f09bf8f3204ca7.js +0 -1
  303. fides/ui-build/static/admin/_next/static/css/e1628f15dd5f019b.css +0 -1
  304. fides/ui-build/static/admin/_next/static/tzF4yti8NslASlGnxnZ8m/_buildManifest.js +0 -1
  305. {ethyca_fides-2.68.1b1.dist-info → ethyca_fides-2.68.1b3.dist-info}/WHEEL +0 -0
  306. {ethyca_fides-2.68.1b1.dist-info → ethyca_fides-2.68.1b3.dist-info}/entry_points.txt +0 -0
  307. {ethyca_fides-2.68.1b1.dist-info → ethyca_fides-2.68.1b3.dist-info}/licenses/LICENSE +0 -0
  308. {ethyca_fides-2.68.1b1.dist-info → ethyca_fides-2.68.1b3.dist-info}/top_level.txt +0 -0
  309. /fides/ui-build/static/admin/_next/static/{tzF4yti8NslASlGnxnZ8m → _BLI2ArqQzY5XnXbrcxa2}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3450],{30454:function(e,s,t){var a=t(40699);e.exports=function(e){return a(e,5)}},77867:function(e,s,t){"use strict";var a=t(24246),i=t(27824);s.Z=e=>{let{connected:s,...t}=e,n="red.500";return null==s?n="gray.300":s&&(n="green.500"),(0,a.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...t})}},59301:function(e,s,t){"use strict";var a=t(24246);let{Link:i}=t(27824).AntTypography;s.Z=e=>(0,a.jsx)(i,{target:"_blank",rel:"noopener noreferrer",...e})},77213:function(e,s,t){"use strict";t.d(s,{Z:function(){return p}});var a=t(24246),i=t(27824),n=t(88038),r=t.n(n),l=t(86677);t(27378);var o=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,l.useRouter)();return(0,a.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,a.jsxs)(i.xuv,{children:[(0,a.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,a.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,a.jsx)(i.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,a.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:s,title:t,padded:n=!0,mainProps:c}=e,p=(0,o.hz)(),m=(0,l.useRouter)(),h="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,x=!(p.flags.privacyRequestsConfiguration&&h),{data:g}=(0,d.JE)(void 0,{skip:x}),{data:y}=(0,d.PW)(void 0,{skip:x}),f=p.flags.privacyRequestsConfiguration&&(!g||!y)&&h;return(0,a.jsxs)(i.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,a.jsxs)(r(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsxs)(i.kCb,{as:"main",direction:"column",py:n?6:0,px:n?10:0,h:n?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[f?(0,a.jsx)(u,{}):null,s]})]})}},19904:function(e,s,t){"use strict";t.d(s,{Tg:function(){return r}});var a=t(24246),i=t(16134),n=t(31793);let r=e=>(0,i.C)(n.uu).filter(s=>e.includes(s)).length>0;s.ZP=e=>{let{scopes:s,children:t}=e;return r(s)?(0,a.jsx)(a.Fragment,{children:t}):null}},83099:function(e,s,t){"use strict";var a=t(24246),i=t(79283),n=t(34929);s.Z=e=>{let{selectedTaxonomies:s,showDisabled:t=!1,...r}=e,{getDataUseDisplayNameProps:l,getDataUses:o}=(0,n.Z)(),d=(t?o():o().filter(e=>e.active)).filter(e=>!s.includes(e.fides_key)).map(e=>{let{name:s,primaryName:t}=l(e.fides_key);return{value:e.fides_key,name:s,primaryName:t,description:e.description||""}});return(0,a.jsx)(i.l,{options:d,...r})}},71248:function(e,s,t){"use strict";t.d(s,{A:function(){return o}});var a=t(24246),i=t(34090),n=t(46782),r=t(97181),l=t(40324);let o=e=>{var s,t;let{name:o,fieldSchema:d,isRequired:c,layout:u="stacked",secretsSchema:p,validate:m}=e,h=(null===(t=d.allOf)||void 0===t?void 0:null===(s=t[0])||void 0===s?void 0:s.$ref)&&d.allOf[0].$ref!==n.j?null==p?void 0:p.definitions[d.allOf[0].$ref.replace("#/definitions/","")]:void 0,x=!!(null==h?void 0:h.enum)||d.options,g="boolean"===d.type,y=()=>{var e;if((null===(e=d.allOf)||void 0===e?void 0:e[0].$ref)===n.j)return"Enter dataset.collection.field"};return(0,a.jsx)(i.gN,{id:o,name:o,validate:m,children:e=>{let{field:s}=e;if(x){var t,i,n;let e=null!==(n=null==h?void 0:null===(t=h.enum)||void 0===t?void 0:t.map(e=>({label:e,value:e})))&&void 0!==n?n:null===(i=d.options)||void 0===i?void 0:i.map(e=>({label:e,value:e}));return(0,a.jsx)(r.d,{name:s.name,id:s.name,label:d.title,isRequired:c,tooltip:d.description,layout:u,options:e,mode:d.multiselect?"multiple":void 0},s.name)}return g?(0,a.jsx)(r.d,{name:s.name,id:s.name,label:d.title,isRequired:c,tooltip:d.description,layout:u,options:[{label:"False",value:"false"},{label:"True",value:"true"}]},s.name):(0,a.jsx)(l.j0,{...s,label:d.title,tooltip:d.description,isRequired:c,type:d.sensitive?"password":"text",placeholder:y(),autoComplete:"off",color:"gray.700",variant:u})}},o)}},46782:function(e,s,t){"use strict";t.d(s,{j:function(){return n},l:function(){return r}});var a=t(30454),i=t.n(a);let n="#/definitions/FidesDatasetReference",r=e=>{let s=(e,s,t)=>{let a;return(void 0===s||""===s||void 0===s)&&(a="".concat(e," is required")),t===n&&((null==s?void 0:s.includes("."))?s.split(".").length<3&&(a="Dataset reference must include at least three parts"):a="Dataset reference must be dot delimited"),a},t=s=>{var t,a;return null!==(a=null==e?void 0:null===(t=e.required)||void 0===t?void 0:t.includes(s))&&void 0!==a&&a};return{validateField:s,isRequiredField:t,getFieldValidation:(e,a)=>{if(t(e))return e=>{var t;return s(a.title,e,null===(t=a.allOf)||void 0===t?void 0:t[0].$ref)}},preprocessValues:s=>{let t=i()(s);return e&&Object.keys(e.properties).forEach(s=>{var a,i;if((null===(a=e.properties[s].allOf)||void 0===a?void 0:a[0].$ref)===n){let e=null===(i=t.secrets[s])||void 0===i?void 0:i.split(".");e&&(t.secrets[s]={dataset:e.shift(),field:e.join("."),direction:"from"})}"WebsiteSchema"!==e.title||"URL"!==e.properties[s].title||t.secrets[s].startsWith("http://")||t.secrets[s].startsWith("https://")||(t.secrets[s]="https://".concat(t.secrets[s]))}),t}}}},16220:function(e,s,t){"use strict";t.d(s,{V:function(){return n}});var a=t(25980),i=t(77830);let n=()=>({systemOrDatamapRoute:(0,a.hz)().plus?i.oG:i.So})},90111:function(e,s,t){"use strict";var a=t(24246),i=t(27824);s.Z=e=>{let{children:s,...t}=e;return(0,a.jsx)(i.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...t,children:s})}},44553:function(e,s,t){"use strict";t.d(s,{Z:function(){return g}});var a=t(24246),i=t(27824),n=t(27378),r=t(45277),l=t(16125),o=t(812),d=t(46628),c=t(20682),u=t(54427),p=t(52253),m=t(78780);let{reducer:h}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:x}=m.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let s=new FormData;return s.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:s}},invalidatesTags:()=>["Connection Type"]})})});var g=e=>{let{isOpen:s,onClose:t,testId:u="connector-template-modal"}=e,p=(0,l.I0)(),[m,h]=(0,n.useState)(null),g=(0,i.pmc)(),{getRootProps:y,getInputProps:f,isDragActive:_}=(0,r.uI)({onDrop:e=>{var s;if("zip"!==(null===(s=e[0].name.split(".").pop())||void 0===s?void 0:s.toLowerCase())){g((0,d.Vo)("Only zip files are allowed."));return}h(e[0])}}),[v,{isLoading:b}]=x(),{refetch:j}=(0,c.$I)({search:""},{skip:!1}),k=async()=>{if(m)try{var e;await v(m).unwrap(),g((0,d.t5)("Integration template uploaded successfully."));let{data:s}=await j();p((0,c.fP)(null!==(e=null==s?void 0:s.items)&&void 0!==e?e:[])),t()}catch(e){g((0,d.Vo)((0,o.e$)(e)))}finally{h(null)}};return(0,a.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"2xl",children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,a.jsx)(i.xBx,{children:"Upload integration template"}),(0,a.jsxs)(i.fef,{children:[(0,a.jsx)(i.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,a.jsxs)(i.xuv,{...y(),bg:_?"gray.100":"gray.50",border:"2px dashed",borderColor:_?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,a.jsx)("input",{...f()}),m?(0,a.jsx)(i.xvT,{children:m.name}):_?(0,a.jsx)(i.xvT,{children:"Drop the file here..."}):(0,a.jsx)(i.xvT,{children:"Click or drag and drop your file here."})]}),(0,a.jsx)(i.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,a.jsxs)(i.mzw,{className:"flex w-full justify-end gap-2",children:[(0,a.jsx)(i.wpx,{onClick:t,"data-testid":"cancel-btn",disabled:b,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!m||b,onClick:k,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},3765:function(e,s,t){"use strict";var a=t(27824),i=t(812),n=t(46628),r=t(1315),l=t(31883);s.Z=e=>{let s=(0,a.pmc)(),[t]=(0,r.qQ)(),o=t=>!!e.privacy_declarations.find(e=>e.data_use===t.data_use&&e.name===t.name)&&(s((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),d=(e,t)=>{if((0,l.D4)(e)){let t=(0,i.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");s((0,n.Vo)(t));return}return s.closeAll(),s((0,n.t5)(t?"Data use deleted":"Data use saved")),e.data.privacy_declarations},c=async(s,a)=>{let i=s.map(e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:""}}),n={...e,privacy_declarations:i};return d(await t(n),a)};return{createDataUse:async t=>{if(!o(t))return s.closeAll(),c([...e.privacy_declarations,t])},updateDataUse:async(s,t)=>{if(!(t.id!==s.id&&o(t)))return c(e.privacy_declarations.map(e=>e.id===s.id?t:e))},deleteDataUse:async s=>c(e.privacy_declarations.filter(e=>e.id!==s.id),!0),deleteDeclarationByDataUse:async s=>c(e.privacy_declarations.filter(e=>e.data_use!==s),!0)}}},41337:function(e,s,t){"use strict";var a=t(24246),i=t(27824);t(27378);var n=t(88337),r=t(16394),l=t(14746);let o=l.Ny+l.iW.get(n.R.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===n.R.WEBSITE,p=e=>(null==e?void 0:e.connection_type)===n.R.SAAS;s.Z=e=>{let{data:s,...t}=e;return(0,a.jsx)(i.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{var e,t;let a;if(c(s)&&s.encoded_icon)return"data:image/svg+xml;base64,".concat(s.encoded_icon);if(u(s)){let t=null===(e=s.secrets)||void 0===e?void 0:e.url;if(!t)return o;let a=(0,r.ge)(t);return(0,r.tl)(a,100)}if(d(s)){if(p(s)&&(null===(t=s.saas_config)||void 0===t?void 0:t.type)){let e=s.saas_config.type,t=l.LN.get(e);return t?l.Ny+t:l.Ny+l.iW.get(n.R.SAAS)}a=[...l.iW].find(e=>{let[t]=e;return s.connection_type.toString()===t.toString()})}else if(c(s)){let{identifier:e}=s;a=[...l.iW].find(s=>{let[t]=s;return t.toLowerCase()===e.toLowerCase()})}return a?l.Ny+a[1]:l.VD})(),fallbackSrc:u(s)?o:l.VD,alt:(()=>{if(d(s)){var e;return null!==(e=s.name)&&void 0!==e?e:s.key}return c(s)?s.human_readable:s})(),...t})}},73183:function(e,s,t){"use strict";var a=t(24246),i=t(27824);t(27378);var n=t(14207);s.Z=e=>{let{connection_key:s,disabled:t,name:r,access_type:l,connection_type:o,isSwitch:d}=e,{isOpen:c,onOpen:u,onClose:p}=(0,i.qY0)(),[m,h]=(0,n.XX)(),x=async()=>{await m({key:s,name:r,disabled:!t,access:l,connection_type:o}),p()},g=()=>{h.isLoading||p()};return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsxs)(i.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,a.jsx)(i.xvT,{fontSize:"sm",children:"Enable integration"}),(0,a.jsx)(i.rAg,{className:"ml-2",checked:!t,onChange:()=>u()})]}):(0,a.jsx)(i.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:u,children:(0,a.jsx)(i.xvT,{fontSize:"sm",children:t?"Enable":"Disable"})}),(0,a.jsxs)(i.u_l,{isCentered:!0,isOpen:c,onClose:g,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{children:[(0,a.jsxs)(i.xBx,{children:[t?"Enable":"Disable"," Connection"]}),(0,a.jsx)(i.olH,{}),(0,a.jsx)(i.fef,{pb:6,children:(0,a.jsx)(i.Kqy,{direction:"column",spacing:"15px",children:(0,a.jsxs)(i.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[t?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,a.jsxs)(i.mzw,{className:"flex gap-4",children:[(0,a.jsx)(i.wpx,{onClick:g,className:"w-1/2",children:"Cancel"}),(0,a.jsxs)(i.wpx,{onClick:x,loading:h.isLoading,className:"w-1/2",children:[t?"Enable":"Disable"," Connection"]})]})]})]})]})}},8627:function(e,s,t){"use strict";t.d(s,{s:function(){return l}});var a=t(24246),i=t(27824),n=t(77867),r=t(16394);let l=e=>{let{succeeded:s,timestamp:t}=e,l=t?(0,r.p6)(t):"";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{connected:s}),(0,a.jsx)(i.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:t?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},27259:function(e,s,t){"use strict";var a=t(24246),i=t(27824),n=t(34090);s.Z=e=>{let{disabled:s=!1,isRequired:t=!1,label:r,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[p,m]=(0,n.U$)(d);return(0,a.jsxs)(i.NIc,{display:"flex",isRequired:t,isInvalid:!!(m.error&&m.touched),children:[r&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:r}),(0,a.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,a.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,a.jsx)(i.zuI,{...p,autoComplete:"off",autoFocus:u}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]}),"text"===o&&(0,a.jsx)(i.IIB,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:s,placeholder:l,size:"sm"}),"textarea"===o&&(0,a.jsx)(i.gxH,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:p.value||""}),(0,a.jsx)(i.J1D,{children:m.error})]})]})}},19812:function(e,s,t){"use strict";t.d(s,{t:function(){return l}});var a=t(14047),i=t(14207),n=t(27378),r=t(41966);let l=e=>{var s,t,l;let{connectionConfig:o}=e,[d]=(0,i.S6)(),{data:c}=(0,i.Eg)(null!==(t=null==o?void 0:o.key)&&void 0!==t?t:""),u=null!==(l=null==c?void 0:null===(s=c.items)||void 0===s?void 0:s.map(e=>e.fides_key))&&void 0!==l?l:[],p=u.map(e=>({label:e,value:e})),{data:m}=(0,r.LH)({onlyUnlinkedDatasets:!0,minimal:!0}),h=(0,n.useMemo)(()=>{var e;return null!==(e=null==m?void 0:m.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[m]),{errorAlert:x,successAlert:g}=(0,a.V)();return{dropdownOptions:[...p,...h],initialDatasets:u,patchConnectionDatasetConfig:async function(e,s){var t,a,i;let{showSuccessAlert:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null!==(i=null===(t=e.dataset)||void 0===t?void 0:t.map(e=>({fides_key:e,ctl_dataset_fides_key:e})))&&void 0!==i?i:[],l=await d({connection_key:s,dataset_pairs:r}).unwrap();(null===(a=l.failed)||void 0===a?void 0:a.length)>0?x(l.failed[0].message):n&&g("Dataset successfully updated!")}}}},72774:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});var a=t(24246),i=t(27824),n=e=>{let{title:s,description:t,button:n}=e;return(0,a.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:[(0,a.jsx)(i.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,a.jsxs)(i.xuv,{flexGrow:1,children:[(0,a.jsx)(i.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,a.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:t})]}),n]})},r=()=>(0,a.jsx)(i.xuv,{mb:"6",maxW:"720px","data-testid":"locked-for-GVL-notice",children:(0,a.jsx)(n,{title:"This system is part of the TCF Global Vendor List (GVL)",description:(0,a.jsxs)(a.Fragment,{children:["As a result, certain fields are not editable as they come directly from Fides Compass and the Global Vendor List (GVL). In some cases, where the legal basis has been declared to be flexible, you may update the legal basis for particular data uses."," ",(0,a.jsx)(i.rUS,{href:"https://fid.es/tcf_gvl",isExternal:!0,color:"complimentary.500",children:"For more information on the Global Vendor List, click here."})]})})})},69525:function(e,s,t){"use strict";t.d(s,{U:function(){return a}});let a=e=>{let s=e.data_categories.flatMap(e=>e.split(","));return{data_use:e.data_use,data_categories:s,features:e.features,legal_basis_for_processing:e.legal_basis_for_processing,flexible_legal_basis_for_processing:e.flexible_legal_basis_for_processing,retention_period:e.retention_period?e.retention_period:""}}},72250:function(e,s,t){"use strict";t.d(s,{Z:function(){return sH}});var a,i,n,r,l=t(24246),o=t(27824),d=t(79894),c=t.n(d),u=t(86677),p=t.n(u),m=t(27378),h=t(16134),x=t(25980),g=t(45938),y=t(16220),f=t(77830),_=t(84720),v=t(14908),b=t(46628),j=t(26089),k=t(19904),w=t(16394),C=t(20682),S=t(41337);let D=e=>{let{connectionConfig:s}=e,t=(0,h.C)(C.pw),{data:a}=(0,C.$I)(t),i=(0,m.useMemo)(()=>(null==a?void 0:a.items)||[],[a]),[n,r]=(0,m.useState)(),l=(0,m.useMemo)(()=>[...i].sort((e,s)=>e.human_readable>s.human_readable?1:-1),[i]),o=(0,m.useMemo)(()=>{let e=new Map;return null==l||l.map(s=>e.set(s.human_readable,{value:s})),e},[l]),d=(0,m.useMemo)(()=>{var e;return(null===(e=i.find(e=>e.identifier===(null==s?void 0:s.connection_type)||(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)))||void 0===e?void 0:e.type)||"ethyca"},[s,i]);return(0,m.useMemo)(()=>{let e=i.find(e=>(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)||e.identifier===(null==s?void 0:s.connection_type));e&&r(e)},[s,i]),{dropDownOptions:o,selectedValue:n,setSelectedValue:r,systemType:d}};var T=e=>{var s;let{disabled:t,hasClear:a=!0,label:i,list:n,onChange:r,selectedValue:d}=e,c=(0,m.useRef)(null),[u,p]=(0,m.useState)(!1),[h,x]=(0,m.useState)(""),g=()=>{p(!1)},y=null===(s=[...n].find(e=>{let[,s]=e;return s.value.identifier===(null==d?void 0:d.identifier)}))||void 0===s?void 0:s[0],f=(0,m.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(x(e.target.value),setTimeout(()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},0))},[]),_=(0,m.useMemo)(()=>(0,w.Ds)(f,100),[f]),v=(0,m.useMemo)(()=>[...n].filter(e=>e[0].toLowerCase().includes(h.toLowerCase())),[n,h]);return(0,l.jsxs)(o.v2r,{isLazy:!0,onClose:g,onOpen:()=>{p(!0)},strategy:"fixed",matchWidth:!0,children:[(0,l.jsx)(o.j2t,{"aria-label":null!=y?y:i,as:o.wpx,color:y?"complimentary.500":void 0,disabled:t,icon:(0,l.jsx)(o.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,l.jsx)(o.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=y?y:i})}),u?(0,l.jsxs)(o.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,l.jsx)(o.xuv,{px:"8px",mt:2,children:(0,l.jsxs)(o.BZy,{size:"sm",children:[(0,l.jsx)(o.Z8_,{pointerEvents:"none",children:(0,l.jsx)(o.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,l.jsx)(o.IIB,{"data-testid":"input-search-integrations",ref:c,autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:_,placeholder:"Search integrations",size:"sm",type:"search"})]})}),a&&(0,l.jsx)(o.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,l.jsx)(o.wpx,{onClick:()=>{r(void 0),x(""),g()},size:"small",children:"Clear"})}),(0,l.jsx)(o.xuv,{overflowY:"auto",maxHeight:"272px",children:v.map(e=>{let[s,t]=e;return(0,l.jsx)(o.esZ,{title:t.toolTip,placement:"rightTop",mouseEnterDelay:.5,children:(0,l.jsxs)(o.sNh,{color:d===t.value?"complimentary.500":void 0,isDisabled:t.isDisabled,onClick:()=>r(t.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,l.jsx)(S.Z,{data:t.value}),(0,l.jsx)(o.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},A=t(14047),E=t(1315),q=t(54682),R=t(84306),I=t(14207),z=t(59301),F=(0,o.IUT)({displayName:"RightArrow",viewBox:"0 0 16 16",d:"M10.7814 7.33312L7.20541 3.75712L8.14808 2.81445L13.3334 7.99979L8.14808 13.1851L7.20541 12.2425L10.7814 8.66645H2.66675V7.33312H10.7814Z"}),L=t(19812),O=e=>{let{status:s,failure_reason:t}=e;if("error"===s){let e="Connection test failed.";return t&&(e+=" ".concat(t)),(0,l.jsx)(o.xvT,{"data-testid":"toast-error-msg",children:e})}return(0,l.jsx)(o.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"})},Z=t(8627),W=t(32885),P=t(65450),N=t(40324),U=t(34090),V=t(55484),B=t(97181),M=t(57072),K=t(39864),H=t(27259);let Y=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,l.jsxs)(o.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,l.jsx)(o.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,l.jsx)(o.zxk,{bg:"primary.800",color:"white",isDisabled:s,isLoading:s,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})};var G=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:a,onCancel:i}=e,{isLoading:n}=(0,M.MO)(),r=(0,h.C)(K.qb),{errorAlert:d}=(0,A.V)();return n?null:(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:{fields:s.length>0?s:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,s)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}a(e,s)},validateOnBlur:!1,validateOnChange:!1,validationSchema:V.Ry({fields:V.IX().of(V.Ry().shape({pii_field:V.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:V.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:V.IX(V.Z_()).label("Data Categories")}))}),children:e=>(0,l.jsx)(U.l0,{style:{marginTop:0},noValidate:!0,children:(0,l.jsx)(o.gCW,{align:"stretch",children:(0,l.jsx)(U.F2,{name:"fields",render:s=>{let{fields:a}=e.values;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,l.jsx)(o.xuv,{w:"416px",children:"PII Field"}),(0,l.jsx)(o.xuv,{w:"416px",children:"DSR Package Label"}),(0,l.jsx)(o.xuv,{w:"416px",children:"Data Categories"}),(0,l.jsx)(o.xuv,{visibility:"hidden",children:(0,l.jsx)(o.lr0,{})})]}),(0,l.jsx)(o.xuv,{children:a&&a.length>0?a.map((e,t)=>(0,l.jsxs)(o.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(H.Z,{autoFocus:0===t,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(H.Z,{isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(B.d,{name:"fields.".concat(t,".data_categories"),options:r.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,l.jsx)(o.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,l.jsx)(o.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,l.jsx)(o.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{s.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,l.jsx)(Y,{isSubmitting:t,onCancelClick:i})]})}})})})})},$=e=>{let{connectionConfig:s}=e,t=(0,m.useRef)(!1),{successAlert:a}=(0,A.V)(),{handleError:i}=(0,A.H)(),[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)([]),{isOpen:u,onOpen:p,onClose:h}=(0,o.qY0)(),{data:x,isFetching:g,isLoading:y,isSuccess:f}=(0,I.QV)(s?s.key:"",{skip:!s}),[_]=(0,I.jF)(),[v]=(0,I._d)(),b=async(e,t)=>{try{r(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await v(t).unwrap():await _(t).unwrap(),a("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){i(e)}finally{r(!1)}};(0,m.useEffect)(()=>(t.current=!0,f&&x&&c(x.fields),()=>{t.current=!1}),[x,f]);let j=(0,l.jsx)(o.wpx,{disabled:!s||n,loading:n,onClick:p,children:"Customize DSR"});return(0,l.jsxs)(l.Fragment,{children:[s?j:(0,l.jsx)(o.esZ,{title:"Save an Integration first to customize the DSR",placement:"top",children:j}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:h,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{minWidth:"775px",children:[(0,l.jsx)(o.xBx,{children:"Customize DSR"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsxs)(o.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsx)(o.xuv,{color:"gray.700",fontSize:"14px",children:'Customize your PII fields to create a friendly label name for your privacy request packages. This "Package Label" is the label your user will see in their downloaded package.'}),(g||y)&&(0,l.jsx)(o.M5Y,{children:(0,l.jsx)(o.$jN,{})}),t.current&&!y?(0,l.jsx)(G,{data:d,isSubmitting:n,onSaveClick:b,onCancel:h}):null]})})]})]})]})},Q=t(98784),J=t.n(Q),X=t(71248),ee=t(46782),es=t(73183),et=t(95492),ea=e=>{let{onDelete:s,deleteResult:t}=e,{isOpen:a,onOpen:i,onClose:n}=(0,o.qY0)(),r=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&n()};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(o.xvT,{fontSize:"sm",children:"Delete integration"}),(0,l.jsx)(o.wpx,{"aria-label":"Delete integration",icon:(0,l.jsx)(et.l,{}),disabled:t.isLoading,onClick:i,className:"ml-2"})]})]}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:a,onClose:r,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsx)(o.xBx,{children:"Delete integration"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsx)(o.Kqy,{direction:"column",spacing:"15px",children:(0,l.jsx)(o.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"Deleting an integration may impact any privacy request that is currently in progress. Do you wish to proceed?"})})}),(0,l.jsxs)(o.mzw,{children:[(0,l.jsx)(o.wpx,{onClick:r,className:"w-1/2",children:"Cancel"}),(0,l.jsx)(o.wpx,{onClick:()=>{s()},loading:t.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},ei=t(99792);let en=(e,s)=>{let t={...e};return s&&Object.entries(s.properties).forEach(e=>{let[s,a]=e;if("secrets"in t||(t.secrets={}),"integer"===a.type)t.secrets[s]=a.default?Number(a.default):0;else{var i;t.secrets[s]=null!==(i=a.default)&&void 0!==i?i:""}}),t},er=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===ei.Z.SAAS&&(t+="_api"),t},el=e=>{let{secretsSchema:s,defaultValues:t,isSubmitting:a=!1,isAuthorizing:i=!1,onSaveClick:n,onTestConnectionClick:r,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:p,connectionConfig:m,initialDatasets:h,datasetDropdownOptions:g,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[v,{isLoading:b,isFetching:j}]=(0,I.h2)(),{plus:k}=(0,x.hz)(),{getFieldValidation:w,preprocessValues:C}=(0,ee.l)(s),S=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(C(e))},D=async e=>{Object.keys(await e.validateForm()).length>0||r(await v(m.key))},T=(null==m?void 0:m.disabled)||!1;return(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==m?void 0:m.key){var a,i;return e.name=null!==(i=m.name)&&void 0!==i?i:"",e.description=m.description,e.instance_key=m.connection_type===q.Rj.SAAS?null===(a=m.saas_config)||void 0===a?void 0:a.fides_key:m.key,e.enabled_actions=(m.enabled_actions||[]).map(e=>e.toString()),e.secrets=m.secrets?J().cloneDeep(m.secrets):{},e.dataset=h,(null==s?void 0:s.properties)&&Object.entries(s.properties).forEach(s=>{var t;let[a,i]=s;if((null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)===ee.j){let s=e.secrets[a];s&&(e.secrets[a]="".concat(s.dataset,".").concat(s.field))}}),e}return J().isEmpty(e.enabled_actions)&&(e.enabled_actions=p.supported_actions.map(e=>e.toString())),en(e,s)})(),onSubmit:(e,s)=>{n(C(e),s)},validateOnBlur:!0,children:e=>{var t;let n=!e.dirty&&(null==m?void 0:m.authorized);return(0,l.jsx)(U.l0,{children:(0,l.jsxs)(o.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsxs)("div",{className:"flex flex-row",children:[m?(0,l.jsx)(es.Z,{connection_key:null==m?void 0:m.key,disabled:T,connection_type:null==m?void 0:m.connection_type,access_type:null==m?void 0:m.access,name:null!==(t=null==m?void 0:m.name)&&void 0!==t?t:m.key,isSwitch:!0}):null,m?(0,l.jsx)(ea,{onDelete:f,deleteResult:_}):null]}),!!(null==m?void 0:m.key)&&(0,l.jsx)(N.j0,{name:"instance_key",id:"instance_key",label:"Integration identifier",isRequired:!0,disabled:!!(null==m?void 0:m.key),tooltip:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this integration."},"instance_key"),s?Object.entries(s.properties).map(e=>{var t;let[a,i]=e;return"advanced_settings"===a?null:(0,l.jsx)(X.A,{name:"secrets.".concat(a),fieldSchema:i,isRequired:null===(t=s.required)||void 0===t?void 0:t.includes(a),secretsSchema:s,validate:w(a,i),layout:"inline"},"secrets.".concat(a))}):null,k&&(0,l.jsx)(B.d,{name:"enabled_actions",id:"enabled_actions",label:"Request types",isRequired:!0,layout:"inline",mode:"multiple",tooltip:"The request types that are supported for this integration",options:p.supported_actions.map(e=>({label:J().upperFirst(e),value:e}))},"enabled_actions"),q.Zi.DATABASE===p.type&&!y&&(0,l.jsx)(B.d,{name:"dataset",id:"dataset",tooltip:"Select datasets to associate with this integration",label:"Datasets",options:g,layout:"inline",mode:"multiple"}),(0,l.jsxs)("div",{className:"flex gap-4",children:[!p.authorization_required||n?(0,l.jsx)(o.wpx,{disabled:!(null==m?void 0:m.key)||a||_.isLoading,loading:b||j,onClick:()=>D(e),"data-testid":"test-connection-button",children:u}):null,k&&q.Zi.DATABASE===p.type&&!J().isEmpty(h)&&(0,l.jsx)(o.wpx,{onClick:()=>d(),children:"Test datasets"}),p.authorization_required&&!n?(0,l.jsx)(o.wpx,{loading:i,onClick:()=>S(e.values,e),children:"Authorize integration"}):null,p.type===q.Zi.MANUAL?(0,l.jsx)($,{connectionConfig:m}):null,(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit","data-testid":"save-integration-btn",children:"Save"})]})]})})}})},eo=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:er(a,t),saas_connector_type:t.identifier,secrets:{},...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},r={systemFidesKey:a,connectionConfig:n};return Object.entries(s.properties).forEach(s=>{r.connectionConfig.secrets[s[0]]=e.secrets[s[0]]}),await i(r).unwrap()},ed=async(e,s,t,a,i)=>{var n;let r=a?a.key:er(t,s),l={access:q.uv.WRITE,connection_type:s.type===q.Zi.SAAS?s.type:s.identifier,description:e.description,key:r,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:t,connectionConfigs:[l]}).unwrap();if((null===(n=o.failed)||void 0===n?void 0:n.length)>0){let e=o.failed[0].message;throw Object.assign(Error(e),{data:{detail:e}})}return o},ec=async(e,s,t,a,i)=>{let n={systemFidesKey:t,secrets:{}};return(Object.entries(s.properties).forEach(s=>{s[0]in a&&e.secrets[s[0]]===a[s[0]]||(n.secrets[s[0]]=e.secrets[s[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},eu=e=>{let{secretsSchema:s,systemFidesKey:t,connectionOption:a,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,R.V)(),{handleError:l}=(0,A.H)(),o=(0,h.T)(),[d,c]=(0,m.useState)(!1),[u,p]=(0,m.useState)(!1),{dropdownOptions:g,patchConnectionDatasetConfig:y,initialDatasets:f}=(0,L.t)({connectionConfig:i}),[_]=(0,I.NG)(),[v]=(0,W.IB)(),[b]=(0,I.rO)(),[j]=(0,P.Zh)(),[k]=(0,P.qd)(),[w]=(0,W.kg)(),[C,S]=(0,P._w)(),{plus:D}=(0,x.hz)(),T=(0,m.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]),E=(0,h.C)(P.NC);return{isSubmitting:d,isAuthorizing:u,handleSubmit:async e=>{let n=!i;try{if(c(!0),a.type===q.Zi.SAAS&&n)i=(await eo(e,s,a,t,D?v:_)).connection;else{let n=await ed(e,a,t,i,D?w:k);i||a.type!==q.Zi.DATABASE||(i=n.succeeded[0]),a.type!==q.Zi.MANUAL&&await ec(e,s,t,T,j)}i&&e.dataset&&a.type===q.Zi.DATABASE&&await y(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{c(!1)}},handleAuthorization:async e=>{let n=!i;try{p(!0),n?i=(await eo(e,s,a,t,_)).connection:await ec(e,s,t,T,j);let r=await b(i.key).unwrap();p(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{p(!1)}},datasetDropdownOptions:g,initialDatasets:f,handleDelete:async()=>{try{await C(t),o((0,P.db)({...E,connection_configs:null})),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:S}},ep=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i}=e,[n,r]=(0,m.useState)(),d=(0,o.pmc)(),c=t.type===q.Zi.MANUAL,{data:u}=(0,C.n3)(t.identifier,{skip:c}),{isSubmitting:h,isAuthorizing:x,handleSubmit:g,handleAuthorization:y,datasetDropdownOptions:f,initialDatasets:_,handleDelete:v,deleteDatastoreConnectionResult:j}=eu({secretsSchema:u,systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i});return u||t.type===q.Zi.MANUAL?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,l.jsxs)("div",{children:["Connect to your ",t.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),t.user_guide&&(0,l.jsx)("div",{style:{marginTop:"12px"},children:(0,l.jsxs)(z.Z,{href:t.user_guide,children:["View docs for help with this integration ",(0,l.jsx)(F,{})]})})]}),(0,l.jsx)(el,{secretsSchema:u,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:h,isAuthorizing:x,onSaveClick:g,onTestConnectionClick:e=>{var s,t;r(e);let a=(null===(s=e.data)||void 0===s?void 0:s.test_status)==="succeeded"?"success":"error";d({...b.MA,status:a,description:(0,l.jsx)(O,{status:a,failure_reason:null===(t=e.data)||void 0===t?void 0:t.failure_reason})})},onTestDatasetsClick:()=>{p().push("/systems/configure/".concat(s,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:t,connectionConfig:a,datasetDropdownOptions:f,initialDatasets:_,isCreatingConnectionConfig:!a,onDelete:v,deleteResult:j}),a?(0,l.jsxs)(o.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[n&&n.data&&void 0!==n.fulfilledTimeStamp?(0,l.jsx)(Z.s,{succeeded:"succeeded"===n.data.test_status,timestamp:n.fulfilledTimeStamp}):(0,l.jsx)(Z.s,{succeeded:null==a?void 0:a.last_test_succeeded,timestamp:(null==a?void 0:a.last_test_timestamp)||""}),(0,l.jsx)(o.LZC,{})]}):null]}):null};var em=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:a,onOpen:i,onClose:n}=(0,o.qY0)(),[r,d]=(0,m.useState)(null),{successAlert:c}=(0,A.V)(),[u,{isLoading:p}]=(0,E.qd)(),x=(0,h.C)(C.pw),{data:g}=(0,C.$I)(x),y=(0,m.useMemo)(()=>(null==g?void 0:g.items)||[],[g]),{handleError:f}=(0,A.H)(),_=()=>{p||(r&&d(null),n())},v=async()=>{try{if(r){var e;let s={...r,instance_key:r.connection_type===q.Rj.SAAS?null===(e=r.saas_config)||void 0===e?void 0:e.fides_key:r.key},a=y.find(e=>(null==r?void 0:r.saas_config)&&e.identifier===(null==r?void 0:r.saas_config.type)||e.identifier===(null==r?void 0:r.connection_type));(await ed(s,a,t,r,u)).succeeded[0]&&c("Integration successfully linked!"),d(null),n()}}catch(e){f(e)}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.wpx,{onClick:i,children:"Link integration"}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:a,size:"lg",onClose:_,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsx)(o.xBx,{children:"Unlinked Integrations"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsxs)(o.Kqy,{direction:"column",spacing:"15px",children:[(0,l.jsx)(o.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"These are all the integrations that are not linked to a system. Please select an integration to link to a system."}),(0,l.jsx)(o.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,l.jsxs)(o.kCb,{flexDirection:"row",alignItems:"center",_hover:{bg:"gray.100",color:"gray.600"},bg:(null==r?void 0:r.key)===e.key?"gray.100":"unset",color:(null==r?void 0:r.key)===e.key?"gray.600":"unset",cursor:"pointer",onClick:()=>{d(e)},className:"mb-2",children:[(0,l.jsx)(S.Z,{data:e,className:"mr-2"}),(0,l.jsx)(o.xvT,{children:e.name})]},e.key))})]})}),(0,l.jsxs)(o.mzw,{className:"flex gap-4",children:[(0,l.jsx)(o.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,l.jsx)(o.wpx,{onClick:v,loading:p,disabled:!r||p,className:"w-1/2",children:"Link integration"})]})]})]})]})},eh=t(44553),ex=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:a,selectedValue:i,setSelectedValue:n}=D({connectionConfig:s}),r=(0,h.C)(I.dR),{data:d}=(0,I.AZ)({...r,orphaned_from_system:!0}),[c,u]=(0,m.useState)([]);(0,m.useEffect)(()=>{d&&u(d.items)},[d]);let p=(0,o.qY0)();return(0,l.jsxs)(o.xuv,{id:"con-wrapper",px:6,children:[(0,l.jsxs)(o.kCb,{py:5,children:[(0,l.jsxs)(o.Kqy,{direction:{base:"column",lg:"row"},children:[(0,l.jsx)(T,{list:a,label:"Integration type",selectedValue:i,onChange:n,disabled:!!(s&&null!==s)}),!s&&c.length>0?(0,l.jsx)(em,{connectionConfigs:c,systemFidesKey:t}):null,(0,l.jsx)(k.ZP,{scopes:[q.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,l.jsx)(o.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:p.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,l.jsx)(eh.Z,{isOpen:p.isOpen,onClose:p.onClose})]}),(null==i?void 0:i.type)&&[q.Zi.DATABASE,q.Zi.DATA_CATALOG,q.Zi.SAAS,q.Zi.MANUAL,q.Zi.EMAIL].includes(i.type)?(0,l.jsx)(ep,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:n,systemFidesKey:t}):null]})},eg=t(71922),ey=t(31883);let ef=e=>{let{item:s,options:t=[],onNoticeChange:a,isChild:i}=e,{external_id:n,name:r}=s,d="".concat(n,"-notice_id"),[c,,u]=(0,U.U$)(d),{setValue:p}=u;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Ugi,{flexGrow:1,children:[i&&(0,l.jsx)(o.LqM,{}),(0,l.jsx)(o.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(i?"-child":""),m:0,fontSize:"14px",fontWeight:i?"normal":"semibold",children:r})]}),(0,l.jsx)(o.WPr,{...c,id:d,allowClear:!0,placeholder:"None",options:t,onChange:e=>{p(e),a(s={...s,notice_id:e})},className:"w-full","data-testid":"consentable-item-select"})]})},e_=e=>{let{connectionKey:s,...t}=e,a=(0,o.pmc)(),{data:i,isLoading:n}=(0,W.EQ)(s),[r,{isLoading:d}]=(0,W.Am)(),c=(0,h.C)(eg.Zp),u=(0,h.C)(eg.G1),{data:p,isLoading:x}=(0,eg.J6)({page:c,size:u}),[g,y]=(0,m.useState)(),[f,_]=(0,m.useState)([]),v=(0,m.useMemo)(()=>null==g?void 0:g.reduce((e,s)=>{var t;return s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id),(null===(t=s.children)||void 0===t?void 0:t.length)&&s.children.forEach(s=>{s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id)}),e},{}),[g]),j=e=>{let s=e.notice_id;if(s){let e=null==p?void 0:p.items.filter(e=>e.id===s);if(null==e?void 0:e.length){var t;let s=(null===(t=e[0].children)||void 0===t?void 0:t.map(e=>e.id))||[];return f.filter(e=>s.includes(e.value))}}return f},k=async()=>{let e=await r({connectionKey:s,consentableItems:g});(0,ey.D4)(e)?a((0,b.Vo)("Failed to save consent automation")):a({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,l.jsx)(o.xvT,{"data-testid":"toast-success-msg",children:"Your consent automation settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,m.useEffect)(()=>{i&&y(i)},[i]),(0,m.useEffect)(()=>{p&&_(p.items.map(e=>({label:e.name,value:e.id})))},[p]),n||x)return(0,l.jsx)(o.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,l.jsx)(o.OdW,{height:"35px"})});if(!g||!g.length||!p)return null;let w=(e,s)=>{y(g.map(t=>{if(s?t.external_id===s.external_id:t.external_id===e.external_id){if(s){var a;return{...t,children:null===(a=t.children)||void 0===a?void 0:a.map(s=>s.external_id===e.external_id?e:s)}}return e}return t}))};return(0,l.jsx)(o.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,l.jsx)(o.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,l.jsxs)(o.Qdk,{border:"none",children:[(0,l.jsxs)(o.KFZ,{children:[(0,l.jsx)(o.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,l.jsx)(o.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Consent automation"})}),(0,l.jsx)(o.XEm,{})]}),(0,l.jsxs)(o.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,l.jsx)(o.xvT,{mb:7,children:"Map consentable items, such as channels and subscriptions, from your integration to Fides privacy notices. This ensures that updates to consent preferences in either location remain accurate and up-to-date."}),(0,l.jsx)(U.J9,{initialValues:v||{},onSubmit:k,children:(0,l.jsxs)(U.l0,{children:[(0,l.jsx)(o.MIq,{columns:2,spacing:3,children:g.map(e=>{var s;return(0,l.jsxs)(m.Fragment,{children:[(0,l.jsx)(ef,{item:e,options:f,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,l.jsx)(ef,{item:s,options:j(e),isChild:!0,onNoticeChange:s=>w(s,e)},s.external_id))]},e.external_id)})}),(0,l.jsx)(o.Ugi,{justifyContent:"flex-end",mt:3,children:(0,l.jsx)(o.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var ev=t(57865),eb=t(3124),ej=t.n(eb),ek=(0,o.IUT)({displayName:"NextArrow",viewBox:"0 0 12 12",d:"M6.58584 5.99999L4.11084 3.52499L4.81784 2.81799L7.99984 5.99999L4.81784 9.18199L4.11084 8.47499L6.58584 5.99999Z"}),ew=(0,o.IUT)({displayName:"PrevArrow",viewBox:"0 0 12 12",d:"M5.414 5.99999L7.889 8.47499L7.182 9.18199L4 5.99999L7.182 2.81799L7.889 3.52499L5.414 5.99999Z"});let eC=e=>{let s=new Date(e),t=navigator.language;return{formattedTime:s.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"}),formattedDate:s.toLocaleDateString(t,{year:"numeric",month:"long",day:"numeric"})}},eS=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,eD=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=eS(t),l=e[t],o=s[t];if("boolean"==typeof l||"boolean"==typeof o||"number"==typeof l||"number"==typeof o){l!==o&&n.push(r);return}!((J().isNil(l)||J().isEmpty(l))&&(J().isNil(o)||J().isEmpty(o)))&&(J().isEqual(l,o)||(J().isNil(l)||J().isEmpty(l)?a.push(r):J().isNil(o)||J().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},eT=e=>{let{edited_by:s,before:t,after:a,created_at:i}=e,n=[],r=[],o=[];t.custom_fields||a.custom_fields?{addedFields:n,removedFields:r,changedFields:o}=eD(t.custom_fields,a.custom_fields):{addedFields:n,removedFields:r,changedFields:o}=eD(t,a);let d=[];if(n.length>0&&d.push(["added ",(0,l.jsx)("b",{children:n.join(", ")})]),r.length>0&&d.push(["removed ",(0,l.jsx)("b",{children:r.join(", ")})]),o.length>0&&d.push(["changed ",(0,l.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let c=d.pop(),u=d.length>0?(0,l.jsxs)(l.Fragment,{children:[d.map((e,s)=>(0,l.jsxs)(m.Fragment,{children:[e,s<d.length-1?", ":""]},s)),d.length>=2?", and ":" and ",c]}):c,{formattedTime:p,formattedDate:h}=eC(i);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("b",{children:s})," ",u," on ",h," at ",p]})},eA=(e,s)=>{let t=e=>e.map(e=>{let t=s.find(s=>s.fides_key===e.fides_key);return t&&t.name?t.name:e.fides_key}),a={...e.before},i={...e.after};return a.ingress&&(a.ingress=t(a.ingress)),a.egress&&(a.egress=t(a.egress)),i.ingress&&(i.ingress=t(i.ingress)),i&&i.egress&&(i.egress=t(i.egress)),{...e,before:a,after:i}},eE=(e,s)=>{if(J().isEmpty(s))return e;let t=(e,s)=>{var t,a;return null!==(a=null===(t=s.find(s=>s.value===e))||void 0===t?void 0:t.label)&&void 0!==a?a:e};return{...e,before:{...e.before,vendor_id:t(e.before.vendor_id,s)},after:{...e.after,vendor_id:t(e.after.vendor_id,s)}}},eq=e=>{let s=e.before.privacy_declarations||[],t=e.after.privacy_declarations||[],a=new Set([...s,...t].map(e=>e.data_use)),i=[],n=[];return a.forEach(e=>{let a=s.find(s=>s.data_use===e)||{data_use:"",data_categories:[]},r=t.find(s=>s.data_use===e)||{data_use:"",data_categories:[]};i.push(a),n.push(r)}),{...e,before:{...e.before,privacy_declarations:i},after:{...e.after,privacy_declarations:n}}},eR=e=>{let s={...e.before.custom_fields},t={...e.after.custom_fields};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,custom_fields:s},after:{...e.after,custom_fields:t}}},eI=e=>{if(!e.before.privacy_declarations||!e.before.privacy_declarations[0]||!e.before.privacy_declarations[0].custom_fields)return e;let s={...e.before.privacy_declarations[0].custom_fields},t=e.after.privacy_declarations&&e.after.privacy_declarations[0]?{...e.after.privacy_declarations[0].custom_fields}:{};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,privacy_declarations:[{...e.before.privacy_declarations[0],custom_fields:s}]},after:{...e.after,privacy_declarations:[{...e.after.privacy_declarations[0],custom_fields:t}]}}},ez=(0,m.createContext)(null),eF=()=>(0,m.useContext)(ez);var eL=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,m.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,l.jsx)(ez.Provider,{value:i,children:s})},eO=t(62165),eZ=t(30320),eW=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eF(),i=m.Children.toArray(t).filter(e=>{if(m.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=J().get(null==a?void 0:a.before,s),i=J().get(null==a?void 0:a.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&J().isEmpty(t),r="boolean"!=typeof i&&"number"!=typeof i&&J().isEmpty(i);return!n||!r}return!1});return 0===i.length?null:(0,l.jsx)(o.Kqy,{marginTop:"0px !important",children:(0,l.jsxs)(o.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,l.jsx)(o.X6q,{as:"h3",size:"xs",children:s})}),(0,l.jsx)(o.Kqy,{children:i})]})})},eP=t(46238),eN=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:n,formType:r}=eF(),[d]=(0,U.U$)(i.name),c={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,m.useRef)(null),[p,h]=(0,m.useState)(null),[x,g]=(0,m.useState)([]),[y,f]=(0,m.useState)(!1);(0,m.useEffect)(()=>{let e=J().get(null==n?void 0:n.before,i.name)||[],s=J().get(null==n?void 0:n.after,i.name)||[];f(!J().isEqual(e,s)),g(e.length>s.length?e:s)},[n,i.name]),(0,m.useEffect)(()=>{u.current&&h(u.current.offsetHeight)},[x]);let _={};return y&&(_="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,l.jsx)(eP.b,{label:a})]}),(0,l.jsx)(o.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(p,"px")},children:(p?c.value:x).map((e,s)=>(0,l.jsx)(o.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},s))}),"before"===r&&y&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eU=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:n,formType:r}=eF(),[d]=(0,U.U$)(i),c={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,m.useRef)(null),[p,h]=(0,m.useState)(null),[x,g]=(0,m.useState)(!1);(0,m.useEffect)(()=>{let e=J().get(null==n?void 0:n.before,i.name)||"",s=J().get(null==n?void 0:n.after,i.name)||"";g(!J().isEqual(e,s));let t=e.length>s.length?e:s;u.current&&(u.current.textContent=t,h(u.current.offsetHeight),u.current.textContent=c.value)},[n,i.name,c.value]);let y={};return x&&(y="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:y,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,l.jsx)(eP.b,{label:a})]}),(0,l.jsx)(o.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(p,"px")},children:c.value}),"before"===r&&x&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eV=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:a}=(0,eZ.m)({resourceType:t}),i=e=>Array.from(a.values()).some(s=>s.name===e&&!!s.allow_list_id),n=t===q.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",r=Object.keys(s).sort();return(0,l.jsx)(eW,{heading:"Custom fields",children:r.map(e=>i(e)?(0,l.jsx)(eN,{label:e,name:"".concat(n,".").concat(e)},e):(0,l.jsx)(eU,{label:e,name:"".concat(n,".").concat(e)},e))})},eB=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:n}=eF(),[r]=(0,U.U$)(a),d={...r,value:r.value},[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{u(J().get(null==i?void 0:i.before,a.name)!==J().get(null==i?void 0:i.after,a.name))},[i,a.name,d.value]);let p={};return c&&(p="before"===n?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:p,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",minHeight:"46px",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),(0,l.jsx)(eP.b,{label:t})]}),void 0!==d.value&&(0,l.jsx)(o.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===n&&c&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eM=e=>{let{initialValues:s}=e,t=(0,eO.hz)();return(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,l.jsx)(U.l0,{children:(0,l.jsxs)(o.Kqy,{children:[(0,l.jsxs)(eW,{heading:"System details",children:[t.dictionaryService?(0,l.jsx)(eU,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,l.jsx)(eU,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,l.jsx)(eU,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,l.jsx)(eU,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,l.jsx)(eN,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,l.jsx)(eW,{heading:"Dataset reference",children:(0,l.jsx)(eN,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,l.jsxs)(eW,{heading:"Data processing properties",children:[(0,l.jsx)(eB,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,l.jsx)(eB,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,l.jsx)(eU,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,l.jsx)(eB,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,l.jsx)(eN,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,l.jsx)(eB,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,l.jsx)(eN,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,l.jsx)(eB,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,l.jsx)(eU,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,l.jsxs)(eW,{heading:"Administrative properties",children:[(0,l.jsx)(eU,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,l.jsx)(eU,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,l.jsx)(eU,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,l.jsx)(eU,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,l.jsx)(eU,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,l.jsx)(eN,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,l.jsx)(eU,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,l.jsx)(eU,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,l.jsx)(eU,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,l.jsx)(eV,{customFields:s.custom_fields,resourceType:q.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,l.jsxs)(m.Fragment,{children:[(0,l.jsxs)(eW,{heading:"Data use",children:[(0,l.jsx)(eU,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,l.jsx)(eN,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,l.jsx)(eN,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].legal_basis_for_processing"),label:"Legal basis for processing",tooltip:"What is the legal basis under which personal data is processed for this purpose?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,l.jsx)(eW,{heading:"Features",children:(0,l.jsx)(eN,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,l.jsx)(eW,{heading:"Dataset reference",children:(0,l.jsx)(eN,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,l.jsxs)(eW,{heading:"Special category data",children:[(0,l.jsx)(eB,{name:"privacy_declarations[".concat(t,"].processes_special_category_data"),label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,l.jsxs)(eW,{heading:"Third parties",children:[(0,l.jsx)(eB,{name:"privacy_declarations[".concat(t,"].data_shared_with_third_parties"),label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,l.jsx)(eN,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,l.jsx)(eV,{customFields:s.privacy_declarations[0].custom_fields,resourceType:q.P6.PRIVACY_DECLARATION})]},t)),(0,l.jsxs)(eW,{heading:"Data flow",children:[(0,l.jsx)(eN,{name:"ingress",label:"Sources"}),(0,l.jsx)(eN,{name:"egress",label:"Destinations"})]})]})})})};let eK=(e,s)=>{let t=[],a=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||s.egress||e.ingress||s.ingress)&&t.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||s.privacy_declarations&&s.privacy_declarations.length>0;i&&t.push("Data Uses");let n=[...Object.keys(e),...Object.keys(s)].some(e=>!a.has(e));return!i&&n&&t.unshift("System Information"),t};var eH=e=>{let{selectedHistory:s,isOpen:t,onClose:a}=e;return(0,l.jsxs)(o.u_l,{isOpen:t,onClose:a,size:"4xl",children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsxs)(o.xBx,{backgroundColor:ej().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,l.jsxs)(o.X6q,{size:"xs",children:[(0,l.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),s&&(0,l.jsx)(l.Fragment,{children:eK(s.before,s.after).map((e,s)=>(0,l.jsx)(o.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.olH,{})]})]}),(0,l.jsx)(o.fef,{paddingTop:0,paddingBottom:6,children:(0,l.jsxs)(o.kCb,{justifyContent:"space-between",children:[(0,l.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,l.jsx)(eL,{selectedHistory:s,formType:"before",children:(0,l.jsx)(eM,{initialValues:null==s?void 0:s.before})})}),(0,l.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,l.jsx)(eL,{selectedHistory:s,formType:"after",children:(0,l.jsx)(eM,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eY=e=>{let{system:s}=e,[t,a]=(0,m.useState)(1),{data:i}=(0,W.Xc)({system_key:s.fides_key,page:t,size:10}),[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)(null),u=(0,h.C)(W.o),{data:p=[]}=(0,P.K3)(),x=(null==i?void 0:i.items)||[],g=e=>{c(e=eI(e=eR(e=eA(e=eE(e=eq(e),u),p)))),r(!0)},{formattedTime:y,formattedDate:f}=eC(s.created_at),_=i&&i.total?Math.ceil(i.total/10):0;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.iA_,{ml:"24px",children:[(0,l.jsx)(o.hrZ,{children:(0,l.jsx)(o.Tr,{children:(0,l.jsxs)(o.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:ej().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,l.jsx)(o.p3B,{children:x.map((e,s)=>{let t=eT(e);return t?(0,l.jsx)(o.Tr,{onClick:()=>g(e),style:{cursor:"pointer"},children:(0,l.jsx)(o.Td,{pt:"10px",pb:"10px",pl:"16px",fontSize:"12px",border:"1px solid #E2E8F0",children:t})},s):null})})]}),((null==i?void 0:i.total)||0)>10&&(0,l.jsxs)(o.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,l.jsxs)(o.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"600",paddingX:2,children:[(t-1)*10+1," -"," ",Math.min(10*t,(null==i?void 0:i.total)||0)," of"," ",(null==i?void 0:i.total)||0]}),(0,l.jsx)(o.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&a(t-1)},disabled:1===t,icon:(0,l.jsx)(ew,{})}),(0,l.jsx)(o.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,l.jsx)(ek,{})})]}),(0,l.jsx)(eH,{selectedHistory:d,isOpen:n,onClose:()=>{r(!1),c(null)}})]})},eG=t(52368),e$=t(3765),eQ=e=>{let{title:s,description:t,handleAdd:a}=e;return(0,l.jsx)(o.Kqy,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.500",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:(0,l.jsxs)(o.Ugi,{children:[(0,l.jsx)(o.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,l.jsxs)(o.xuv,{children:[(0,l.jsx)(o.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,l.jsx)(o.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,l.jsx)(o.Ugi,{mt:4,children:(0,l.jsx)(o.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:a,icon:(0,l.jsx)(o.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},eJ=t(58452);let eX=e=>{let{declaration:s,title:t,handleDelete:a,handleEdit:i}=e,{isOpen:n,onOpen:r,onClose:d}=(0,o.qY0)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,l.jsx)(o.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,l.jsxs)(o.Ugi,{children:[(0,l.jsx)(o.AB5,{onClick:()=>i(s),role:"button",tabIndex:0,children:(0,l.jsx)(o.xvT,{children:t||s.data_use})}),(0,l.jsx)(o.LZC,{}),a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:r,"data-testid":"delete-btn",children:(0,l.jsx)(o.pJl,{})}),(0,l.jsx)(eJ.Z,{isOpen:n,onClose:d,onConfirm:()=>a(s),title:"Delete data use declaration",message:(0,l.jsxs)(o.xvT,{children:["You are about to delete the data use declaration"," ",(0,l.jsx)(o.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:t||s.data_use}),", including all its cookies. Are you sure you want to continue?"]}),isCentered:!0})]}):null]})})}),(0,l.jsx)(o.izJ,{})]})},e0=e=>{let{heading:s,children:t,headerButton:a,footerButton:i}=e;return(0,l.jsx)(o.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,l.jsxs)(o.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,l.jsxs)(o.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,l.jsx)(o.X6q,{as:"h3",size:"xs",children:s}),(0,l.jsx)(o.LZC,{}),a||null]}),(0,l.jsx)(o.Kqy,{spacing:0,children:t}),(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:i||null})]})})},e1=e=>{let{heading:s,declarations:t,handleAdd:a,handleDelete:i,handleEdit:n,allDataUses:r}=e,d=e=>{let s=r.filter(s=>s.fides_key===e.data_use)[0];return s?e.name?"".concat(s.name," - ").concat(e.name):s.name:""},c=(0,h.C)(ev.gU);return(0,l.jsx)(e0,{heading:s,footerButton:!c&&(0,l.jsx)(o.wpx,{onClick:a,size:"small",icon:(0,l.jsx)(o.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,l.jsx)(eX,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:n},e.id))})};var e2=t(95346),e4=t(54748),e8=t(28325),e3=t(30234);let e5=V.Ry().shape({data_categories:V.IX(V.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:V.Z_().required().label("Data use")}),e6={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},id:""},e7=e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:"",special_category_legal_basis:e.processes_special_category_data?e.special_category_legal_basis:void 0,third_parties:e.data_shared_with_third_parties?e.third_parties:void 0,shared_categories:e.data_shared_with_third_parties?e.shared_categories:void 0}},e9=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,values:n,includeCustomFields:r,privacyDeclarationId:d,lockedForGVL:c}=e,u=!!d,{legalBasisOptions:p}=(0,e4.Z)(),{specialCategoryLegalBasisOptions:h}=(0,e8.Z)(),x=(0,m.useMemo)(()=>i?i.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[i]);return(0,l.jsxs)(o.Kqy,{spacing:4,children:[(0,l.jsxs)(e3.Z,{heading:"Data use declaration",children:[(0,l.jsx)(N.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:u,variant:"stacked"}),(0,l.jsx)(B.d,{id:"data_use",label:"Data use",name:"data_use",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:u}),(0,l.jsx)(B.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data are collected for this purpose?",mode:"multiple",isRequired:!0,disabled:c,layout:"stacked"}),(0,l.jsx)(B.d,{name:"data_subjects",label:"Data subjects",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",layout:"stacked"}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(B.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:p,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled:c}),(0,l.jsx)(o.UO1,{in:"Legitimate interests"===n.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked"})})})]}),(0,l.jsx)(o.xuv,{mt:5,pl:4,children:(0,l.jsx)(N.w8,{name:"flexible_legal_basis_for_processing",label:"This legal basis is flexible",tooltip:"Has the vendor declared that the legal basis may be overridden?",variant:"stacked",isDisabled:c})}),(0,l.jsx)(N.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:c})]}),(0,l.jsx)(e3.Z,{heading:"Features",children:(0,l.jsx)(B.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:c,mode:"tags"})}),(0,l.jsx)(e3.Z,{heading:"Dataset reference",children:(0,l.jsx)(B.d,{name:"dataset_references",label:"Dataset references",options:x,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked"})}),(0,l.jsx)(e3.Z,{heading:"Special category data",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"processes_special_category_data",label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:n.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(B.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:h,isRequired:n.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked"})})})]})}),(0,l.jsx)(e3.Z,{heading:"Third parties",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"data_shared_with_third_parties",label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:n.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsxs)(o.Kqy,{mt:4,spacing:4,children:[(0,l.jsx)(N.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked"}),(0,l.jsx)(B.d,{name:"shared_categories",label:"Shared categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data does this system share with third parties?",layout:"stacked",mode:"multiple"})]})})]})}),r?(0,l.jsx)(e2.uc,{resourceType:q.P6.PRIVACY_DECLARATION,resourceFidesKey:d}):null]})},se=(e,s)=>e?{...e,customFieldValues:s||{}}:e6,ss=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,e2.mZ)({resourceType:q.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e7(e),r=await s(i,t);if(r){let s=r.filter(s=>s.data_use===e.data_use&&(!s.name||s.name===e.name));s.length>0&&await n({customFieldValues:a,fides_key:s[0].id})}},initialValues:(0,m.useMemo)(()=>se(t,i),[t,i])}},st=e=>{let{onSubmit:s,onCancel:t,initialValues:a,...i}=e,n=null==a?void 0:a.id,{handleSubmit:r,initialValues:d}=ss({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:n}),c=(0,h.C)(ev.gU);return(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:d,onSubmit:r,validationSchema:e5,children:e=>{let{dirty:s,values:a}=e;return(0,l.jsxs)(U.l0,{"data-testid":"declaration-form",children:[(0,l.jsx)(g.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,l.jsxs)(o.Kqy,{spacing:4,children:[(0,l.jsx)(e9,{values:a,lockedForGVL:c,privacyDeclarationId:n,...i}),(0,l.jsxs)(o.kCb,{w:"100%",children:[(0,l.jsx)(o.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{type:"primary",htmlType:"submit",disabled:!s,"data-testid":"save-btn",children:"Save"})]})]})]})}})},sa=e=>{let{isOpen:s,onClose:t,heading:a,isCentered:i=!1,testId:n="privacy-declaration-modal",children:r}=e;return(0,l.jsxs)(o.u_l,{isOpen:s,onClose:t,isCentered:i,scrollBehavior:"inside",size:"3xl",children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{textAlign:"left",p:0,"data-testid":n,children:[(0,l.jsx)(o.xBx,{p:0,children:(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,l.jsx)(o.X6q,{as:"h3",size:"sm",children:a})})}),(0,l.jsx)(o.fef,{pb:4,children:r})]})]})};var si=e=>{let{system:s,includeCustomFields:t,...a}=e,{isOpen:i,onClose:n,onOpen:r}=(0,o.qY0)(),[d,c]=(0,m.useState)(void 0),{createDataUse:u,updateDataUse:p,deleteDataUse:h}=(0,e$.Z)(s),x=()=>{n(),c(void 0)},g=()=>{r(),c(void 0)},y=async e=>(x(),d)?p(d,e):u(e);return(0,m.useEffect)(()=>{n()},[n,s.fides_key]),(0,l.jsxs)(o.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===s.privacy_declarations.length?(0,l.jsx)(eQ,{title:"You don't have a data use set up for this system yet.",description:'A Data Use is the purpose for which data is used in a system. In Fides, a system may have more than one Data Use. For example, a CRM system may be used both for "Customer Support" and also for "Email Marketing", each of these is a Data Use.',handleAdd:g}):(0,l.jsx)(e1,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:g,handleEdit:e=>{r(),c(e)},handleDelete:h,allDataUses:a.allDataUses}),(0,l.jsx)(sa,{isOpen:i,onClose:x,heading:"Configure data use",children:(0,l.jsx)(st,{initialValues:d,onSubmit:y,onCancel:x,includeCustomFields:t,...a})})]})},sn=e=>{let{system:s}=e,{isLoading:t,...a}=(0,eG.f)({includeDatasets:!0,includeDisabled:!1}),i=a.allDataCategories.filter(e=>e.active),n=a.allDataUses.filter(e=>e.active),r=a.allDataSubjects.filter(e=>e.active),d={...a,allDataCategories:i,allDataUses:n,allDataSubject:r};return(0,l.jsxs)(o.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,l.jsx)(o.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,l.jsxs)(o.xvT,{fontSize:"sm",fontWeight:"medium",children:["Data Uses describe the business purpose for which the personal data is processed or collected. Within a Data Use, you assign which categories of personal information are collected for this purpose and for which categories of data subjects. To update the available categories and uses, please visit"," ",(0,l.jsx)(o.rUS,{as:c(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,l.jsx)(o.$jN,{}):(0,l.jsx)(si,{system:s,includeCustomFields:!0,...d})]})},sr=t(812),sl=t(93237),so=t(69525),sd=t(33335);let sc={system_type:"",fides_key:"",tags:[],name:"",description:"",dataset_references:[],processes_personal_data:!0,exempt_from_privacy_regulations:!1,reason_for_exemption:"",uses_profiling:!1,does_international_transfers:!1,requires_data_protection_assessments:!1,privacy_policy:"",legal_name:"",legal_address:"",administrating_department:"",responsibility:[],joint_controller_info:"",data_security_practices:"",privacy_declarations:[],data_stewards:"",dpo:"",cookie_max_age_seconds:void 0,uses_cookies:!1,cookie_refresh:!1,uses_non_cookie_access:!1,legitimate_interest_disclosure_url:""},su=(e,s)=>{var t;let a=null==e?void 0:null===(t=e.data_stewards)||void 0===t?void 0:t.map(e=>e.username).join(", ");return{...e,customFieldValues:s,description:e.description?e.description:"",legal_address:e.legal_address?e.legal_address:"",dpo:e.dpo?e.dpo:"",cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:"",legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:"",vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,privacy_policy:e.privacy_policy?e.privacy_policy:"",data_security_practices:e.data_security_practices?e.data_security_practices:"",legal_basis_for_profiling:e.legal_basis_for_profiling?e.legal_basis_for_profiling:"",legal_basis_for_transfers:e.legal_basis_for_transfers?e.legal_basis_for_transfers:"",data_stewards:a}},sp=e=>{let s=e.fides_key?e.fides_key:(0,sd.E)(e.name),t=""===e.privacy_policy?void 0:e.privacy_policy,a={system_type:e.system_type,fides_key:s,name:e.name,description:e.description?e.description:"",dataset_references:e.dataset_references,tags:e.tags,processes_personal_data:e.processes_personal_data,exempt_from_privacy_regulations:e.exempt_from_privacy_regulations,reason_for_exemption:e.exempt_from_privacy_regulations?e.reason_for_exemption:void 0,privacy_declarations:e.processes_personal_data?e.privacy_declarations:[],vendor_id:e.vendor_id,ingress:e.ingress,egress:e.egress,meta:e.meta,fidesctl_meta:e.fidesctl_meta,organization_fides_key:e.organization_fides_key,dpa_progress:e.dpa_progress,previous_vendor_id:e.previous_vendor_id,cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:void 0,uses_cookies:e.uses_cookies,cookie_refresh:e.cookie_refresh,uses_non_cookie_access:e.uses_non_cookie_access,legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:void 0,vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0};return e.processes_personal_data&&(a={...a,dataset_references:e.dataset_references,uses_profiling:e.uses_profiling,legal_basis_for_profiling:e.uses_profiling?e.legal_basis_for_profiling:void 0,does_international_transfers:e.does_international_transfers,legal_basis_for_transfers:e.does_international_transfers?e.legal_basis_for_transfers:void 0,requires_data_protection_assessments:e.requires_data_protection_assessments,dpa_location:e.requires_data_protection_assessments?e.dpa_location:void 0,privacy_policy:t,legal_name:e.legal_name,legal_address:e.legal_address,responsibility:e.responsibility,dpo:e.dpo,data_security_practices:e.data_security_practices},e.administrating_department&&(a.administrating_department=e.administrating_department),e.joint_controller_info&&(a.joint_controller_info=e.joint_controller_info)),a},{useGetSystemAssetsQuery:sm,useAddSystemAssetMutation:sh,useUpdateSystemAssetsMutation:sx,useDeleteSystemAssetsMutation:sg,usePopulateSystemAssetsMutation:sy}=t(78780).u.injectEndpoints({endpoints:e=>({getSystemAssets:e.query({query:e=>{let{fides_key:s,...t}=e;return{method:"GET",url:"/plus/system-assets/".concat(s),params:t}},providesTags:["System Assets"]}),addSystemAsset:e.mutation({query:e=>{let{systemKey:s,asset:t}=e;return{method:"POST",url:"/plus/system-assets/".concat(s,"/assets"),body:t}},invalidatesTags:["System Assets"]}),updateSystemAssets:e.mutation({query:e=>{let{systemKey:s,assets:t}=e;return{method:"PUT",url:"/plus/system-assets/".concat(s,"/assets/"),body:t}},invalidatesTags:["System Assets"]}),deleteSystemAssets:e.mutation({query:e=>{let{systemKey:s,asset_ids:t}=e;return{method:"DELETE",url:"/plus/system-assets/".concat(s,"/assets?").concat((0,w.du)(t,"asset_ids"))}},invalidatesTags:["System Assets"]}),populateSystemAssets:e.mutation({query:e=>{let{systemKey:s}=e;return{method:"POST",url:"/plus/dictionary/system-vendors/cookie-assets",body:[s]}}})})});var sf=t(36345);let s_=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sv=[{value:"Adequacy Decision",label:"Adequacy decision"},{value:"Supplementary measures",label:"Supplementary measures"},{value:"SCCs",label:"Standard contractual clauses"},{value:"BCRs",label:"Binding corporate rules"},{value:"Other",label:"Other"}],sb=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),sj=e=>{var s;let{system:t}=e,a=t?null!==(s=t.name)&&void 0!==s?s:"this system":"your new system";return(0,l.jsxs)(o.X6q,{as:"h3",size:"lg",children:["Describe ",a]})};var sk=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:n=[]}=(0,P.K3)(),r=(0,h.T)(),d=(0,e2.mZ)({resourceType:q.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...c}=(0,eG.f)({includeDatasets:!0,includeDisabled:!1}),u=(0,m.useMemo)(()=>t?su(t,d.customFieldValues):sc,[t,d.customFieldValues]),[p]=(0,P.in)(),x=(0,m.useMemo)(()=>V.Ry().shape({name:V.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await p({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(e=>e.name!==u.name).some(s=>s.name===e)||s.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})}),privacy_policy:V.Z_().min(1).url().nullable()}),[p,u.name]),y=(0,eO.hz)(),[f,_]=(0,P.f7)(),[v,j]=(0,P.qQ)(),[k]=sy();(0,W.Rd)(void 0,{skip:!y.dictionaryService});let[w]=(0,W.qz)(),C=(0,h.C)(W.o),S=(0,h.C)(ev.gU),D=(0,m.useMemo)(()=>!!(t&&(null==n?void 0:n.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,n]),T=(0,m.useMemo)(()=>c.allDatasets?c.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[c.allDatasets]),A=(0,o.pmc)(),E=async(e,t)=>{var a;let i,n;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await w({vendor_id:e.vendor_id});if(s.isError){if(!((0,sr.fn)(s.error)&&404===s.error.status)){let e=(0,sr.e$)(s.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.");A((0,b.Vo)(e))}}else s.data&&s.data.items.length>0&&(i=s.data.items.map(e=>{var s;return{...(0,so.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let l=sp({...e,privacy_declarations:null!=i?i:e.privacy_declarations});if(n=D?await v(l):await f(l),await d.upsertCustomFields(e),!D&&e.vendor_id&&(null===(a=n.data)||void 0===a?void 0:a.fides_key)){let e=await k({systemKey:n.data.fides_key});(0,sr.D4)(e)&&A((0,b.Vo)("An unexpected error occurred while populating the system assets from Compass. Please try again."))}(0,sr.D4)(n)?A({status:"error",description:(0,sr.e$)(n.error,"An unexpected error occurred while ".concat(D?"editing":"creating"," the system. Please try again."))}):(A.closeAll(),t.resetForm({values:e}),s(n.data),r((0,ev.b3)("initial")))},R=e=>{if(y.dictionaryService){if(!e){r((0,ev.b3)("hiding")),r((0,ev.gQ)(!1));return}r((0,ev.b3)("showing")),y.tcf&&(0,sr.cj)(e)===sr.c6.GVL?r((0,ev.gQ)(!0)):r((0,ev.gQ)(!1))}},I=j.isLoading||_.isLoading||d.isLoading;return(0,l.jsx)(U.J9,{initialValues:u,enableReinitialize:!0,onSubmit:E,validationSchema:x,children:e=>{let{dirty:s,values:n,isValid:r}=e;return(0,l.jsxs)(U.l0,{children:[(0,l.jsx)(g.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,l.jsxs)(o.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[a?(0,l.jsx)(sj,{system:t}):null,(0,l.jsx)(o.xvT,{fontSize:"sm",fontWeight:"medium",children:"By providing a small amount of additional context for each system we can make reporting and understanding our tech stack much easier for everyone from engineering to legal teams. So let’s do this now."}),a?(0,l.jsx)(sj,{system:t}):null,(0,l.jsxs)(e3.Z,{heading:"System details",children:[y.dictionaryService?(0,l.jsx)(sf.Z,{label:"System name",options:C,onVendorSelected:R,isCreate:!t,lockedForGVL:S}):(0,l.jsx)(N.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(null==t?void 0:t.fides_key)&&(0,l.jsx)(N.j0,{id:"fides_key",name:"fides_key",label:"Unique ID",disabled:!0,variant:"stacked",tooltip:"An auto-generated unique ID based on the system name"}),(0,l.jsx)(sl.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?"}),(0,l.jsx)(B.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:u.tags?u.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?"})]}),(0,l.jsx)(e3.Z,{heading:"Dataset reference",children:(0,l.jsx)(B.d,{name:"dataset_references",label:"Dataset references",options:T,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked"})}),(0,l.jsx)(e3.Z,{heading:"Data processing properties",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(o.xuv,{mb:4,children:(0,l.jsx)(sl.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:S})}),(0,l.jsx)(o.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(sl.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!n.processes_personal_data||S}),(0,l.jsx)(o.UO1,{in:n.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:n.exempt_from_privacy_regulations,disabled:S})})})]})}),(0,l.jsx)(o.UO1,{in:n.processes_personal_data&&!n.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,l.jsxs)(o.Kqy,{spacing:4,mt:4,children:[(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(sl.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:S}),(0,l.jsx)(o.UO1,{in:n.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(B.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:s_,tooltip:"What is the legal basis under which profiling is performed?",disabled:S,isRequired:n.uses_profiling})})})]}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(sl.dQ,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?",disabled:S}),(0,l.jsx)(o.UO1,{in:n.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(B.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sv,tooltip:"What is the legal basis under which the data is transferred?",isRequired:n.does_international_transfers,disabled:S})})})]}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?",variant:"stacked",isDisabled:S}),(0,l.jsx)(o.UO1,{in:n.requires_data_protection_assessments,animateOpacity:!0,children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:S,isRequired:n.requires_data_protection_assessments})})})]})]})})]})}),(0,l.jsxs)(o.UO1,{in:n.processes_personal_data&&!n.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,l.jsxs)(e3.Z,{heading:"Cookie properties",children:[(0,l.jsx)(sl.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:S}),(0,l.jsx)(sl.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:S}),(0,l.jsx)(sl.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:S}),(0,l.jsx)(sl.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:S})]}),(0,l.jsxs)(e3.Z,{heading:"Administrative properties",children:[(0,l.jsx)(N.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,l.jsx)(sl.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:S}),(0,l.jsx)(sl.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,l.jsx)(sl.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,l.jsx)(N.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(B.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:sb,tooltip:"What is the role of the business with regard to data processing?",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(sl.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:S}),(0,l.jsx)(N.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(sl.Yb,{label:"Data security practices",name:"data_security_practices",id:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"}),(0,l.jsx)(sl.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:S}),(0,l.jsx)(sl.Yb,{label:"Vendor deleted date",name:"vendor_deleted_date",id:"vendor_deleted_date",tooltip:"If this vendor is no longer active, it will be 'soft' deleted. When that occurs, it's deleted date will be recorded here for reporting.",disabled:!0})]}),n.fides_key?(0,l.jsx)(e2.uc,{resourceType:q.P6.SYSTEM,resourceFidesKey:n.fides_key}):null]})]}),(0,l.jsx)(o.xuv,{mt:6,children:(0,l.jsx)(o.wpx,{htmlType:"submit",type:"primary",disabled:I||!s||!r,loading:I,"data-testid":"save-btn",children:"Save"})}),i]})}})},sw=t(59003),sC=t(92222),sS=t(30952),sD=t(47935),sT=t(90111),sA=t(8133),sE=t(83099),sq=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[n,r,{setValue:d,setTouched:c}]=(0,U.U$)(s),u=!!(r.touched&&r.error);return(0,l.jsx)(o.NIc,{isInvalid:u,isRequired:!0,children:(0,l.jsxs)(o.jqI,{vertical:!0,children:[(0,l.jsxs)(o.jqI,{align:"center",children:[t&&(0,l.jsx)(N.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,l.jsx)(eP.b,{label:i})]}),(0,l.jsx)(sE.Z,{...n,mode:"multiple",selectedTaxonomies:[],onChange:e=>{d(e)},onBlur:()=>c(!0),variant:"outlined",autoFocus:!1,status:u?"error":void 0,"data-testid":"controlled-select-".concat(s)}),(0,l.jsx)(N.Bc,{isInvalid:u,message:r.error,fieldName:s})]})})};(a=n||(n={})).COOKIE="Cookie",a.BROWSER_REQUEST="Browser Request",a.I_FRAME="iFrame",a.JAVASCRIPT_TAG="Javascript tag",a.IMAGE="Image";let sR=V.Ry().shape({name:V.Z_().required("Enter a name for this asset"),domain:V.Z_().required("Enter a valid domain for this asset"),asset_type:V.Z_().required("Select an asset type"),data_uses:V.IX().min(1,"Select at least one data use"),base_url:V.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sI={name:"",description:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sz=e=>{let{isOpen:s,onClose:t,systemKey:a,asset:i,...r}=e,d=!i,[c,{isLoading:u}]=sh(),[p,{isLoading:m}]=sx(),h=(0,o.pmc)(),x=async e=>{let s=await c({systemKey:a,asset:e});if((0,sr.D4)(s)){let e=(0,sr.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,b.Vo)(e))}else h((0,b.t5)("Asset added successfully")),t()},g=async e=>{let s=await p({systemKey:a,assets:[e]});if((0,sr.D4)(s)){let e=(0,sr.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,b.Vo)(e))}else h((0,b.t5)("Asset updated successfully")),t()};return(0,l.jsx)(sA.Z,{title:d?"Add asset":"Edit asset",onClose:t,isOpen:s,...r,children:(0,l.jsx)(U.J9,{initialValues:null!=i?i:sI,onSubmit:e=>{d?x(e):g(e)},validationSchema:sR,children:e=>{let{values:s,isValid:a,dirty:i}=e;return(0,l.jsxs)(U.l0,{children:[(0,l.jsxs)(o.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,l.jsx)(sT.Z,{children:(0,l.jsx)(o.xvT,{fontSize:"sm",children:"Create and configure assets (e.g. cookies, pixels, tags) for this system to ensure proper consent enforcement. Adding assets manually allows you to define key attributes, assign categories, and align them with compliance requirements."})}),(0,l.jsxs)(o.jqI,{vertical:!0,gap:20,children:[(0,l.jsx)(N.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!d}),(0,l.jsx)(B.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,sr.MM)(n),layout:"stacked",disabled:!d}),(0,l.jsx)(sq,{name:"data_uses",label:"Data uses",layout:"stacked"}),(0,l.jsx)(N.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!d}),(0,l.jsx)(N.Ks,{id:"description",name:"description",label:"Description",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:!!s.asset_type&&"Cookie"!==s.asset_type,children:(0,l.jsx)(N.j0,{id:"base_url",name:"base_url",label:"Base URL",variant:"stacked",isRequired:!!s.asset_type&&"Cookie"!==s.asset_type})})]})]}),(0,l.jsxs)(o.jqI,{justify:"space-between",children:[(0,l.jsx)(o.wpx,{onClick:t,children:"Cancel"}),(0,l.jsx)(o.wpx,{type:"primary",htmlType:"submit",loading:u||m,disabled:!a||!i,"data-testid":"save-btn",children:"Save"})]})]})}})})},sF=t(8411),sL=t(72625),sO=t(29850),sZ=t(77685),sW=e=>{let{systemKey:s,systemName:t,asset:a,readonly:i}=e,[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)(),[u,p]=(0,m.useState)(!1),[h,{isLoading:x}]=sx(),{successAlert:g,errorAlert:y}=(0,A.V)(),f=(0,o.qY0)(),{asset_type:_,name:v}=a,b=(0,m.useCallback)(e=>{e.preventDefault(),p(!0)},[]),j=async e=>{if(!e)return;let{newSystemKey:t,newSystemName:i,isNewSystem:n}=e,l=await h({systemKey:s,assets:[{id:a.id,system_key:t}]});(0,ey.D4)(l)?y((0,sr.e$)(l.error)):g(n?"".concat(i," has been added to your system inventory and the ").concat(_,' "').concat(v,'" has been assigned to that system.'):"".concat(_," ").concat(v," has been assigned to ").concat(i)),r(!1),c(void 0)},k=e=>{c(e),f.onOpen()};return i?(0,l.jsx)(o.j8w,{"data-testid":"system-badge",color:"white",children:t}):(0,l.jsxs)(l.Fragment,{children:[!n&&(0,l.jsxs)(o.j8w,{"data-testid":"system-badge",color:"white",onClick:()=>r(!0),children:[t," ",(0,l.jsx)(o.PJP.I8b,{})]}),!!n&&(0,l.jsx)(sO.R,{variant:"borderless",className:"w-full",autoFocus:!0,defaultOpen:!0,defaultValue:s,onBlur:e=>{var s;(null===(s=e.relatedTarget)||void 0===s?void 0:s.getAttribute("id"))!=="add-new-system"&&r(!1)},onAddSystem:b,onSelect:(e,s)=>k({newSystemKey:e,newSystemName:s.label}),loading:x}),u&&(0,l.jsx)(sZ.i,{isOpen:!0,onClose:()=>p(!1),onSuccessfulSubmit:(e,s)=>k({newSystemKey:e,newSystemName:s,isNewSystem:!0})}),(0,l.jsx)(o.cVQ,{isOpen:f.isOpen,onClose:f.onClose,onConfirm:()=>{j(d)},title:"Reassign asset",message:"Are you sure you want to reassign this asset to ".concat(null==d?void 0:d.newSystemName,"?"),isCentered:!0})]})},sP=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:n}]=sg(),r=(0,o.pmc)(),{isOpen:d,onClose:c,onOpen:u}=(0,o.qY0)(),p=async()=>{let e=await i({systemKey:t,asset_ids:[s.id]});(0,ey.D4)(e)?r((0,b.Vo)((0,sr.e$)(e.error,"A problem occurred removing this asset. Please try again"))):r((0,b.t5)("Asset removed successfully"))};return(0,l.jsxs)(o.jqI,{className:"gap-1",children:[(0,l.jsx)(o.wpx,{size:"small",onClick:a,"data-testid":"edit-btn",children:"Edit"}),(0,l.jsx)(o.wpx,{size:"small",onClick:u,loading:n,"data-testid":"remove-btn",children:"Remove"}),(0,l.jsx)(o.cVQ,{isOpen:d,onClose:c,onConfirm:p,title:"Remove asset",message:"Are you sure you want to ignore the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]})},sN=t(34929),sU=t(26183),sV=e=>{var s,t;let{asset:a,systemId:i,readonly:n}=e,{getDataUseDisplayName:r}=(0,sN.Z)(),[d]=sx(),{errorAlert:c,successAlert:u}=(0,R.V)(),[p,h]=(0,m.useState)(!1),x=async e=>{let s=[...a.data_uses||[],e],t=await d({systemKey:i,assets:[{id:a.id,data_uses:s}]});(0,ey.D4)(t)?c((0,sr.e$)(t.error)):u("Consent category added to ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},g=async e=>{var s;let t=null===(s=a.data_uses)||void 0===s?void 0:s.filter(s=>s!==e),n=await d({systemKey:i,assets:[{id:a.id,data_uses:t}]});(0,ey.D4)(n)?c((0,sr.e$)(n.error)):u("Consent category removed from ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},y=null!==(t=null===(s=a.data_uses)||void 0===s?void 0:s.map(e=>({label:r(e),key:e})))&&void 0!==t?t:[];return n?(0,l.jsx)(sU.Z,{children:y.map(e=>(0,l.jsx)(o.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",children:e.label},e.key))}):(0,l.jsxs)(sU.Z,{children:[!p&&(0,l.jsxs)(l.Fragment,{children:[y.map(e=>(0,l.jsx)(o.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",closable:!0,onClose:()=>g(e.key),closeButtonLabel:"Remove data use",children:e.label},e.key)),(0,l.jsx)(o.j8w,{onClick:()=>h(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),p&&(0,l.jsx)(o.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,l.jsx)(sE.Z,{selectedTaxonomies:a.data_uses||[],onSelect:x,onBlur:()=>h(!1),open:!0})})]})},sB=e=>{let{systemKey:s,systemName:t,lockedForGVL:a,onEditClick:i}=e,n=(0,sC.Cl)(),r=n.display({id:"select",cell:e=>{let{row:s}=e;return(0,l.jsx)(sL.k,{isChecked:s.getIsSelected(),onChange:s.getToggleSelectedHandler(),dataTestId:"select-".concat(s.original.name||s.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(sL.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40,meta:{cellProps:{borderRight:"none",paddingRight:0}}}),o=n.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(sD.G3,{value:e.getValue()}),header:"Asset"}),d=n.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,l.jsx)(sD.G3,{value:e.getValue()}),header:"Type"}),c=n.display({id:"system",cell:e=>(0,l.jsx)(sW,{systemKey:s,systemName:t,asset:e.row.original,readonly:a}),header:"System"}),u=n.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,l.jsx)(sV,{asset:e.row.original,systemId:s,readonly:a}),header:"Categories of consent",size:200}),p=n.accessor(e=>e.locations,{id:"locations",cell:e=>(0,l.jsx)(sL.mb,{values:e.getValue().map(e=>({label:sF.Z8[e],key:e}))}),header:"Locations",size:300}),m=n.accessor(e=>e.domain,{id:"domain",cell:e=>(0,l.jsx)(sD.G3,{value:e.getValue()}),header:"Domain"}),h=n.accessor(e=>e.page,{id:"page",cell:e=>(0,l.jsx)(sL.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,l.jsx)(sL.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),x=n.display({id:"actions",cell:e=>{let{row:t}=e;return(0,l.jsx)(sP,{asset:t.original,systemKey:s,onEditClick:()=>i(t.original)})},header:"Actions"}),g=[o,d,c,u,p,m,h];return a?g:[r,...g,x]},sM=e=>{var s;let{system:t}=e,{PAGE_SIZES:a,pageSize:i,setPageSize:n,onPreviousPageClick:r,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:p,endRange:x,pageIndex:g,setTotalPages:y,resetPageIndexToDefault:f}=(0,sD.oi)(),[_,v]=(0,m.useState)(""),[j,k]=(0,m.useState)(void 0),[w,C]=(0,m.useState)({}),[S]=sg(),D=(0,h.C)(ev.gU),T=(0,o.pmc)(),{data:A,isLoading:E,isFetching:q}=sm({fides_key:t.fides_key,search:_,page:g,size:i}),{isOpen:R,onClose:I,onOpen:z}=(0,o.qY0)(),{isOpen:F,onClose:L,onOpen:O}=(0,o.qY0)();(0,m.useEffect)(()=>{f()},[_,f]),(0,m.useEffect)(()=>{y(null==A?void 0:A.pages)},[A,y]);let Z=sB({systemName:null!==(s=t.name)&&void 0!==s?s:t.fides_key,systemKey:t.fides_key,onEditClick:e=>{k(e),z()},lockedForGVL:D}),W=(0,sw.b7)({getCoreRowModel:(0,sC.sC)(),columns:Z,manualPagination:!0,data:(null==A?void 0:A.items)||[],columnResizeMode:"onChange",onRowSelectionChange:C,state:{rowSelection:w}}),P=W.getSelectedRowModel().rows.map(e=>e.original.id),N=async()=>{let e=await S({systemKey:t.fides_key,asset_ids:P});(0,ey.D4)(e)?T((0,b.Vo)((0,sr.e$)(e.error,"A problem occurred removing these assets. Please try again."))):(W.resetRowSelection(),T((0,b.t5)("Assets removed successfully"))),L()};return t?E?(0,l.jsx)(sD.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.xvT,{fontSize:"sm",mb:4,children:D?"This page displays all assets associated with this system. Use the table below to review these technologies for compliance and detailed insights.":"This page displays all assets associated with this system. Use the table below to review and manage these technologies for compliance and detailed insights."}),(0,l.jsxs)(sD.Q$,{children:[(0,l.jsx)(sS.f,{value:_,onChange:v}),!D&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.PJP.mm_,{}),iconPosition:"end",onClick:z,"data-testid":"add-asset-btn",children:"Add asset"}),(0,l.jsx)(sz,{isOpen:R,onClose:()=>{k(void 0),I()},systemKey:t.fides_key,asset:j}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.PJP.ZNm,{}),iconPosition:"end",onClick:O,disabled:!P.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,l.jsx)(o.cVQ,{isOpen:F,onClose:L,onConfirm:N,title:"Remove assets",message:"Are you sure you want to remove the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]})]}),(0,l.jsx)(sD.ZK,{tableInstance:W,emptyTableNotice:(0,l.jsx)(o.oj8,{image:o.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,l.jsx)(sD.s8,{totalRows:(null==A?void 0:A.total)||0,pageSizes:a,setPageSize:n,onPreviousPageClick:r,isPreviousPageDisabled:d||q,onNextPageClick:c,isNextPageDisabled:u||q,startRange:p,endRange:x})]}):null};(i=r||(r={})).INFORMATION="information",i.DATA_USES="data-uses",i.DATA_FLOW="data-flow",i.INTEGRATIONS="integrations",i.ASSETS="assets",i.HISTORY="history";let sK=e=>{let{onViewDatamap:s,onAddPrivacyDeclaration:t}=e;return(0,l.jsxs)(o.xuv,{children:[(0,l.jsx)(o.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,l.jsxs)(o.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,l.jsx)(j.Z,{onClick:s,children:"view it now"})," or"," ",(0,l.jsx)(j.Z,{onClick:t,children:"add privacy declarations in the next tab"}),"."]})]})};var sH=e=>{var s,t;let{isCreate:a}=e,i=(0,u.useRouter)(),{activeTab:n,onTabChange:d}=(0,v.Z)({tabKeys:Object.values(r)}),[p,j]=(0,m.useState)(!1),{systemOrDatamapRoute:k}=(0,y.V)(),w=(0,o.pmc)(),C=(0,h.T)(),S=(0,h.C)(P.NC),[D,T]=(0,m.useState)(void 0),{plus:A}=(0,x.hz)(),{plus:E}=(0,x.hz)(),{data:q}=(0,P.rn)(null==S?void 0:S.fides_key,{skip:!S});(0,m.useEffect)(()=>{C((0,P.db)(q))},[q,C]),(0,m.useEffect)(()=>{S&&T(S.processes_personal_data)},[S]);let R=(0,m.useCallback)(e=>{void 0===S&&j(!0),C((0,P.db)(e)),i.push({pathname:f.Dv,query:{id:e.fides_key}});let s={...b.MA,description:(0,l.jsx)(sK,{onViewDatamap:()=>{i.push(k).then(()=>{w.closeAll()})},onAddPrivacyDeclaration:()=>{d("data-uses"),w.closeAll()}})};w({...s})},[S,C,i,k,w,d]);(0,m.useEffect)(()=>(a&&(C((0,P.db)(void 0)),C((0,ev.b3)("initial")),C((0,ev.gQ)(!1))),()=>{C((0,P.db)(void 0))}),[C,a]);let{attemptAction:I}=(0,g.oI)(),z=(0,m.useCallback)(e=>{I().then(async s=>{if(s){let{status:s}=i.query;if(s&&("succeeded"===s?w((0,b.t5)("Integration successfully authorized.")):w((0,b.Vo)("Failed to authorize integration."))),i.isReady){let e={...i.query};delete e.status,await i.replace({pathname:i.pathname,query:e},void 0,{shallow:!0})}d(e)}})},[I,i,w,d]);(0,m.useEffect)(()=>{let{status:e}=i.query;e&&z("integrations")},[i.query,z]);let F=[{label:"Information",key:"information",children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.xuv,{px:6,mb:9,children:[(0,l.jsx)(g.eB,{}),(0,l.jsx)(sk,{onSuccess:R,system:S})]}),p?(0,l.jsx)(o.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,l.jsxs)(o.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,l.jsx)(o.rUS,{as:c(),href:k,textDecor:"underline",children:"ready to view in your data map"}),". You can return to this setup at any time to add privacy declarations to this system."]})}):null]})},{label:"Data uses",key:"data-uses",children:S?(0,l.jsx)(o.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,l.jsx)(sn,{system:S})}):null,disabled:!S||!D},{label:"Data flow",key:"data-flow",children:S?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsxs)(o.xuv,{px:6,paddingBottom:2,children:[(0,l.jsx)(o.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"Data flow describes the flow of data between systems in your Data Map. Below, you can configure Source and Destination systems and the corresponding links will be drawn in the Data Map graph. Source systems are systems that send data to this system while Destination systems receive data from this system."})]}),(0,l.jsx)(_.q,{system:S,isSystemTab:!0})]}):null,disabled:!S},{label:"Integrations",key:"integrations",children:S?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsx)(o.xuv,{px:6,paddingBottom:2,children:(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,children:E?(0,l.jsxs)(l.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,l.jsx)(o.rUS,{href:f.KH,color:"link.900",children:"Integration Management"})," ","to set up monitoring on databases."]}):"Integrations are used to process privacy requests for access erasure, portability, rectification, and consent."})}),(0,l.jsx)(ex,{connectionConfig:S.connection_configs,systemFidesKey:S.fides_key}),(null===(s=S.connection_configs)||void 0===s?void 0:s.key)&&(0,l.jsx)(e_,{m:6,connectionKey:null===(t=S.connection_configs)||void 0===t?void 0:t.key})]}):null,disabled:!S}];return A&&F.push({label:"Assets",key:"assets",children:S?(0,l.jsx)(sM,{system:S}):null,disabled:!S}),A&&F.push({label:"History",key:"history",children:S?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsx)(o.xuv,{px:6,paddingBottom:6,children:(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"All changes to this system are tracked here in this audit table by date and by user. You can inspect the changes by selecting any of the events listed."})}),(0,l.jsx)(eY,{system:S})]}):null,disabled:!S}),{tabData:F,activeKey:n,onTabChange:z}}},54748:function(e,s,t){"use strict";var a=t(27378),i=t(54682);s.Z=()=>({legalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},28325:function(e,s,t){"use strict";var a=t(27378),i=t(54682);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3855],{66726:function(e,t,i){var r=i(11611),n=i(82846),a=i(91936),s=Math.max,l=Math.min;e.exports=function(e,t,i){var o,c,u,d,p,g,f=0,x=!1,h=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function j(t){var i=o,r=c;return o=c=void 0,f=t,d=e.apply(r,i)}function m(e){var i=e-g,r=e-f;return void 0===g||i>=t||i<0||h&&r>=u}function C(){var e,i,r,a=n();if(m(a))return y(a);p=setTimeout(C,(e=a-g,i=a-f,r=t-e,h?l(r,u-i):r))}function y(e){return(p=void 0,v&&o)?j(e):(o=c=void 0,d)}function I(){var e,i=n(),r=m(i);if(o=arguments,c=this,g=i,r){if(void 0===p)return f=e=g,p=setTimeout(C,t),x?j(e):d;if(h)return clearTimeout(p),p=setTimeout(C,t),j(g)}return void 0===p&&(p=setTimeout(C,t)),d}return t=a(t)||0,r(i)&&(x=!!i.leading,u=(h="maxWait"in i)?s(a(i.maxWait)||0,t):u,v="trailing"in i?!!i.trailing:v),I.cancel=function(){void 0!==p&&clearTimeout(p),f=0,o=g=c=p=void 0},I.flush=function(){return void 0===p?d:y(n())},I}},82846:function(e,t,i){var r=i(77400);e.exports=function(){return r.Date.now()}},30952:function(e,t,i){"use strict";i.d(t,{f:function(){return o}});var r=i(24246),n=i(66726),a=i.n(n),s=i(27378),l=i(26917);let o=e=>{let{value:t,onChange:i,placeholder:n,...o}=e,[c,u]=(0,s.useState)(t),d=a()(i,500),p=(0,s.useCallback)(e=>{u(e),d(e)},[]);return(0,r.jsx)(l.Z,{value:c,onChange:p,onClear:()=>{u(""),i("")},placeholder:n,...o})}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return a},V:function(){return r.V}});var r=i(84306),n=i(812);let a=()=>{let{errorAlert:e}=(0,r.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,n.Ot)(t)?i=t.data.detail:(0,n.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return a}});var r=i(24246),n=i(27824);let a=()=>{let e=(0,n.pmc)();return{errorAlert:(t,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)},successAlert:(t,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)}}}},81406:function(e,t,i){"use strict";var r=i(24246),n=i(27824);t.Z=()=>(0,r.jsxs)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,r.jsx)(n.xvT,{fontSize:"sm",children:"You're up to date!"})]})},25077:function(e,t,i){"use strict";i.d(t,{Z:function(){return A}});var r=i(24246),n=i(59003),a=i(92222),s=i(27824),l=i(27378),o=i(30952),c=i(47935),u=i(81406),d=i(99763),p=i(72625),g=i(14047),f=i(28976),x=i(8151),h=i(70675),v=e=>{let{resource:t,onDetailClick:i}=e,{successAlert:n}=(0,g.V)(),a=(0,x.u)(t),[l,{isLoading:o}]=(0,h.v8)(),[c,{isLoading:u}]=(0,h.cM)(),[d,{isLoading:p}]=(0,h.vi)(),v=async()=>{var e;await l({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0}),n("Started classification on ".concat(null!==(e=t.name)&&void 0!==e?e:"this resource"))},j=async()=>{var e;await c({staged_resource_urn:t.urn}),n("Approved ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},m=async()=>{var e;await d({staged_resource_urn:t.urn}),n("Hid ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},C=o||u||p;return(0,r.jsxs)(s.kCb,{gap:2,justify:"space-between",children:[a===x.e.ATTENTION_REQUIRED&&(0,r.jsx)(s.wpx,{size:"small",onClick:v,loading:o,disabled:C,"data-testid":"classify-btn",children:"Classify"}),a===x.e.IN_REVIEW&&(0,r.jsx)(s.wpx,{size:"small",onClick:j,loading:u,disabled:C,"data-testid":"approve-btn",children:"Approve"}),(0,r.jsx)(s.LZC,{}),(0,r.jsx)(f.Z,{onHideClick:m,onDetailClick:i})]})},j=i(89200),m=i(5945),C=i(61099),y=i(79947),I=i(54682);let L=(0,a.Cl)();var _=(e,t)=>{let i=[];return e?e===I.D$.TABLE?[L.display({id:"name",cell:e=>{let{row:t}=e;return(0,r.jsx)(j.Z,{resource:t.original})},header:"Table"}),L.display({id:"status",cell:e=>{let{row:t}=e;return(0,r.jsx)(m.Z,{status:(0,x.u)(t.original)})},header:"Status"}),L.display({id:"category",cell:e=>{let{row:t}=e;return(0,r.jsx)(C.Z,{resource:t.original})},header:"Data categories",minSize:280,meta:{disableRowClick:!0}}),L.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:"Description"}),L.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,r.jsx)(p.Cy,{time:e.getValue()}),header:"Updated"}),L.display({id:"actions",cell:e=>{let{row:i}=e;return(0,r.jsx)(v,{resource:i.original,onDetailClick:()=>t(i.original)})},header:"Actions",meta:{disableRowClick:!0}})]:e===I.D$.FIELD?[L.display({id:"name",cell:e=>{let{row:t}=e;return(0,r.jsx)(j.Z,{resource:t.original})},header:"Field"}),L.display({id:"status",cell:e=>{let{row:t}=e;return(0,r.jsx)(m.Z,{status:(0,x.u)(t.original)})},header:"Status"}),L.accessor(e=>e.data_type,{id:"dataType",cell:e=>(0,r.jsx)(y.Z,{type:e.getValue()}),header:"Data type"}),L.display({id:"category",cell:e=>{let{row:t}=e;return(0,r.jsx)(C.Z,{resource:t.original})},header:"Data categories",minSize:280,meta:{disableRowClick:!0}}),L.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:"Description"}),L.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,r.jsx)(p.Cy,{time:e.getValue()}),header:"Updated"}),L.display({id:"actions",cell:e=>{let{row:i}=e;return(0,r.jsx)(v,{resource:i.original,onDetailClick:()=>t(i.original)})},header:"Actions",meta:{disableRowClick:!0}})]:i:i},b=i(7940),k=i(80356);let w=[I.LL.ADDITION,I.LL.CLASSIFYING,I.LL.CLASSIFICATION_ADDITION,I.LL.CLASSIFICATION_QUEUED,I.LL.CLASSIFICATION_UPDATE,I.LL.MONITORED,I.LL.PROMOTING,I.LL.REMOVAL,I.LL.REMOVING],T={items:[],total:0,page:1,size:50,pages:1};var A=e=>{let{resourceUrn:t,onRowClick:i}=e,{PAGE_SIZES:p,pageSize:g,setPageSize:f,onPreviousPageClick:x,isPreviousPageDisabled:v,onNextPageClick:j,isNextPageDisabled:m,startRange:C,endRange:y,pageIndex:I,setTotalPages:L,resetPageIndexToDefault:A}=(0,c.oi)(),[R,S]=(0,l.useState)("");(0,l.useEffect)(()=>{A()},[t,A]);let{isFetching:Z,isLoading:D,data:E}=(0,h.z8)({staged_resource_urn:t,page:I,size:g,diff_status:w,search:R}),{items:P,total:N,pages:z}=(0,l.useMemo)(()=>null!=E?E:T,[E]);(0,l.useEffect)(()=>{L(z)},[z,L]);let[M,V]=(0,l.useState)(void 0),O=_((0,b.G)(P[0]),V),U=(0,n.b7)({getCoreRowModel:(0,a.sC)(),getGroupedRowModel:(0,a.qe)(),getExpandedRowModel:(0,a.rV)(),columns:O,manualPagination:!0,data:P,columnResizeMode:"onChange",getRowId:e=>e.urn});return D||Z?(0,r.jsx)(c.I4,{rowHeight:36,numRows:36}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Q$,{children:(0,r.jsx)(s.kCb,{gap:6,align:"center",children:(0,r.jsx)(s.xuv,{flexShrink:0,children:(0,r.jsx)(o.f,{value:R,onChange:S})})})}),(0,r.jsx)(c.ZK,{tableInstance:U,emptyTableNotice:(0,r.jsx)(u.Z,{}),getRowIsClickable:e=>(0,k.Z)(e),onRowClick:i}),(0,r.jsx)(c.s8,{totalRows:N||0,pageSizes:p,setPageSize:f,onPreviousPageClick:x,isPreviousPageDisabled:v,onNextPageClick:j,isNextPageDisabled:m,startRange:C,endRange:y}),(0,r.jsx)(d.Z,{resource:M,onClose:()=>V(void 0)})]})}},94780:function(e,t,i){"use strict";i.d(t,{X5:function(){return l},pN:function(){return o},sv:function(){return a}});var r=i(24246),n=i(27824);let a=e=>e.split(".")[1],s=[(0,r.jsx)(n.PJP.S9g,{},"layers"),(0,r.jsx)(n.PJP.iA_,{},"table"),(0,r.jsx)(n.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")],l=(e,t)=>{if(!e)return[];let i=e.split(".");if(i.length<2)return[];let l=i.splice(0,2).join("."),o=[];return i.reduce((e,r,n)=>{let a=n===i.length-1,c="".concat(e).concat(".").concat(r);return o.push({title:r,href:a?void 0:"".concat(t,"/").concat(l,"/").concat(c),icon:s[n]}),c},l),[{title:a(l),href:"".concat(t,"/").concat(l),icon:(0,r.jsx)(n.PJP.ehp,{})},...o]},o=(e,t)=>{if(!e)return[];let i=e.split(".");if(i.length<2)return[];let r=i.shift(),n=[];return i.reduce((e,r,a)=>{let l=a===i.length-1,o="".concat(e).concat(".").concat(r);return n.push({title:r,href:l?void 0:"".concat(t,"/").concat(o),icon:s[a]}),o},r),n}},79947:function(e,t,i){"use strict";var r=i(24246),n=i(27824);t.Z=e=>{let{type:t}=e;return(0,r.jsx)(n.kCb,{align:"center",h:"full",children:!!t&&(0,r.jsx)(n.j8w,{children:t})})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3872],{77213:function(e,t,i){i.d(t,{Z:function(){return f}});var n=i(24246),r=i(27824),s=i(88038),l=i.n(s),d=i(86677);i(27378);var a=i(25980),o=i(90867),c=i(77830),u=()=>{let e=(0,d.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."," "]})]})})},f=e=>{let{children:t,title:i,padded:s=!0,mainProps:c}=e,f=(0,a.hz)(),x=(0,d.useRouter)(),h="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,p=!(f.flags.privacyRequestsConfiguration&&h),{data:m}=(0,o.JE)(void 0,{skip:p}),{data:j}=(0,o.PW)(void 0,{skip:p}),v=f.flags.privacyRequestsConfiguration&&(!m||!j)&&h;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){var n=i(24246),r=i(27824),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:d,rightContent:a,style:o,...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",...o}:{paddingBottom:"24px",...o},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(r.lQT,{className:i||d?"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:d?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),d]})}},79789:function(e,t,i){i.d(t,{Hn:function(){return d},XU:function(){return l},Z5:function(){return a},aG:function(){return u},cB:function(){return s},hX:function(){return c},vQ:function(){return o}});var n=i(24246),r=i(27824);let s=e=>{let{text:t,...i}=e;return(0,n.jsx)(r.X6q,{fontSize:"sm",mt:4,mb:1,...i,children:t})},l=e=>{let{children:t}=e;return(0,n.jsx)(r.xvT,{fontSize:"14px",mb:4,children:t})},d=e=>{let{children:t,href:i}=e;return(0,n.jsx)(r.rUS,{href:i,textDecoration:"underline",isExternal:!0,children:t})},a=e=>{let{children:t}=e;return(0,n.jsx)(r.QI$,{fontSize:"14px",mb:4,children:t})},o=e=>{let{children:t}=e;return(0,n.jsx)(r.GSI,{fontSize:"14px",mb:4,ml:6,children:t})},c=e=>{let{children:t}=e;return(0,n.jsx)(r.EKh,{display:"block",whiteSpace:"pre",p:4,mb:4,overflowX:"scroll",children:t})},u=e=>{let{data:t}=e;return(0,n.jsxs)(r.iA_,{fontSize:"14px",children:[(0,n.jsx)(r.hrZ,{children:(0,n.jsxs)(r.Tr,{children:[(0,n.jsx)(r.Th,{children:"Permission"}),(0,n.jsx)(r.Th,{children:"Description"})]})}),(0,n.jsx)(r.p3B,{children:t.map(e=>(0,n.jsxs)(r.Tr,{children:[(0,n.jsx)(r.Td,{children:(0,n.jsx)(r.Vp9,{children:e.permission})}),(0,n.jsx)(r.Td,{children:e.description})]},e.permission))})]})}},70788:function(e,t,i){i.d(t,{m:function(){return o}});var n=i(24246),r=i(27824),s=i(79894),l=i.n(s),d=i(27378);let{Text:a}=r.AntTypography,o=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},o=d.onClick&&!d.href;return("string"==typeof d.title&&(d.title=(0,n.jsx)(a,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:d.title})),o)?d.title=(0,n.jsx)(r.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,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:d.icon}),d.title]})),d.href&&d.title&&(d.title=(0,n.jsx)(l(),{href:d.href,className:"ant-breadcrumb-link",children:d.title}),delete d.href)),d}),[t]);return(0,n.jsx)(r.zrq,{items:s,...i})}},89200:function(e,t,i){var n=i(24246),r=i(47935),s=i(98559),l=i(80356);t.Z=e=>{let{resource:t}=e;return(0,n.jsx)(r.G3,{value:(0,s.Z)(t),fontWeight:(0,l.Z)(t)?"semibold":"normal"})}},5945:function(e,t,i){var n=i(24246),r=i(47935),s=i(8151);let l={[s.e.ATTENTION_REQUIRED]:"error",[s.e.APPROVED]:"success",[s.e.IN_REVIEW]:"warning",[s.e.CLASSIFYING]:"info",[s.e.NONE]:"marble"};t.Z=e=>{let{status:t}=e;return(0,n.jsx)(r.A4,{color:l[t],value:t})}},98800:function(e,t,i){var n=i(24246),r=i(27824),s=i(79789);t.Z=e=>{var t;let{dataset:i,onClose:l}=e;return(0,n.jsxs)(r.dys,{isOpen:!!i,onClose:l,size:"md",children:[(0,n.jsx)(r.P1B,{}),(0,n.jsxs)(r.scA,{children:[(0,n.jsx)(r.OXI,{children:(null==i?void 0:i.name)||(null==i?void 0:i.urn)}),(0,n.jsx)(r.cCv,{}),(0,n.jsxs)(r.Ng0,{children:[(0,n.jsx)(s.cB,{text:"Title",mt:0}),(0,n.jsx)(s.XU,{children:null!==(t=null==i?void 0:i.name)&&void 0!==t?t:null==i?void 0:i.urn}),(null==i?void 0:i.description)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.cB,{text:"Description"}),(0,n.jsx)(s.XU,{children:null==i?void 0:i.description})]})]})]})]})}},81406:function(e,t,i){var n=i(24246),r=i(27824);t.Z=()=>(0,n.jsxs)(r.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,n.jsx)(r.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,n.jsx)(r.xvT,{fontSize:"sm",children:"You're up to date!"})]})},69172:function(e,t,i){var n=i(24246),r=i(92222),s=i(27824),l=i(27378),d=i(47935),a=i(72625),o=i(89200),c=i(5945),u=i(8151);let f=(0,r.Cl)(),x=e=>{let{onDetailClick:t}=e;return(0,n.jsxs)(s.v2r,{children:[(0,n.jsx)(s.j2t,{as:s.wpx,size:"small",type:"text",icon:(0,n.jsx)(s.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"dataset-actions"}),(0,n.jsx)(s.qyq,{children:(0,n.jsx)(s.sNh,{"data-testid":"view-dataset-details",onClick:t,children:"View details"})})]})};t.Z=e=>{let{onDetailClick:t}=e;return(0,l.useMemo)(()=>[f.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(o.Z,{resource:e.row.original}),header:"Dataset"}),f.display({id:"status",cell:e=>{let{row:t}=e;return(0,n.jsx)(c.Z,{status:(0,u.u)(t.original)})},header:"Status"}),f.accessor(e=>e.description,{id:"description",cell:e=>(0,n.jsx)(d.G3,{value:e.getValue()}),header:"Description"}),f.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,n.jsx)(a.Cy,{time:e.getValue()}),header:"Updated"}),f.display({id:"actions",cell:e=>{let{row:i}=e;return(0,n.jsx)(x,{onDetailClick:()=>t(i.original)})},size:25,meta:{disableRowClick:!0}})],[t])}},8151:function(e,t,i){i.d(t,{e:function(){return r},u:function(){return l}});var n,r,s=i(54682);(n=r||(r={})).ATTENTION_REQUIRED="Attention required",n.IN_REVIEW="In review",n.APPROVED="Approved",n.CLASSIFYING="Classifying",n.NONE="None";let l=e=>{if(!e)return"Approved";let t=e.diff_status===s.LL.ADDITION||e.diff_status===s.LL.REMOVAL,i=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.ADDITION]||e.child_diff_statuses[s.LL.REMOVAL]);if(t||i)return"Attention required";let n=e.diff_status===s.LL.CLASSIFICATION_QUEUED||e.diff_status===s.LL.CLASSIFYING,r=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.CLASSIFICATION_QUEUED]||e.child_diff_statuses[s.LL.CLASSIFYING]);if(n||r)return"Classifying";let l=e.diff_status===s.LL.CLASSIFICATION_ADDITION||e.diff_status===s.LL.CLASSIFICATION_UPDATE,d=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[s.LL.CLASSIFICATION_UPDATE]);return l||d?"In review":"Approved"}},7940:function(e,t,i){i.d(t,{G:function(){return r}});var n=i(54682);let r=e=>{var t,i,r;return e?e.resource_type?e.resource_type:(null===(t=e.schemas)||void 0===t?void 0:t.length)?n.D$.DATABASE:(null===(i=e.tables)||void 0===i?void 0:i.length)?n.D$.SCHEMA:(null===(r=e.fields)||void 0===r?void 0:r.length)?n.D$.TABLE:n.D$.FIELD:void 0}},98559:function(e,t){t.Z=e=>{let{name:t,urn:i,monitor_config_id:n,database_name:r,schema_name:s,table_name:l,top_level_field_name:d,top_level_field_urn:a}=e;if(!d)return t;let o=i.split(".");return a?i.replace("".concat(a).concat("."),""):([n,r,s,l,d].forEach(e=>{if(e){let t=o.indexOf(e);t>-1&&o.splice(t,1)}}),o.join("."))}},36168:function(e,t){t.Z=e=>{var t;return!!e.parent_table_urn&&null!==(t=e.sub_field_urns)&&void 0!==t&&!!t.length&&!e.top_level_field_name}},80356:function(e,t,i){var n=i(7940),r=i(36168),s=i(54682);t.Z=e=>(0,n.G)(e)!==s.D$.FIELD||(0,r.Z)(e)}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{74833:function(t,e,n){var i=n(56127),r=/^\s+/;t.exports=function(t){return t?t.slice(0,i(t)+1).replace(r,""):t}},56632:function(t,e,n){var i=n(89278),r=n(80068),a=n(50098);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!r(e)){var l=i(n,3);e=a(e),n=function(t){return l(s[t],t,s)}}var c=t(e,n,o);return c>-1?s[l?e[c]:c]:void 0}}},56127:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},64925:function(t,e,n){var i=n(56632)(n(66259));t.exports=i},66259:function(t,e,n){var i=n(95372),r=n(89278),a=n(47991),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return -1;var l=null==n?0:a(n);return l<0&&(l=o(s+l,0)),i(t,r(e,3),l)}},94919:function(t,e,n){var i=n(91936),r=1/0;t.exports=function(t){return t?(t=i(t))===r||t===-r?(t<0?-1:1)*17976931348623157e292:t==t?t:0:0===t?t:0}},47991:function(t,e,n){var i=n(94919);t.exports=function(t){var e=i(t),n=e%1;return e==e?n?e-n:e:0}},91936:function(t,e,n){var i=n(74833),r=n(11611),a=n(55193),o=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(a(t))return o;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=i(t);var n=l.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):s.test(t)?o:+t}},58754:function(t,e,n){"use strict";var i=n(24246),r=n(27824),a=n(70788);e.Z=t=>{let{heading:e,breadcrumbItems:n,isSticky:o=!0,children:s,rightContent:l,style:c,...u}=t;return(0,i.jsxs)("div",{...u,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",...c}:{paddingBottom:"24px",...c},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof e?(0,i.jsx)(r.lQT,{className:n||s?"pb-4":void 0,level:1,"data-testid":"page-heading",children:e}):e,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(a.m,{className:s?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),s]})}},79283:function(t,e,n){"use strict";n.d(e,{l:function(){return l}});var i=n(24246),r=n(27824),a=n(72707),o=n.n(a);let s=t=>{let{data:{formattedTitle:e,description:n,name:a,primaryName:o}}=t;return(0,i.jsxs)(r.jqI,{gap:12,title:"".concat(e," - ").concat(n),children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("strong",{children:o||a}),o&&": ".concat(a)]}),(0,i.jsx)("em",{children:n})]})},l=t=>{let{options:e,...n}=t,a=null==e?void 0:e.map(t=>({...t,className:o().option,formattedTitle:[t.primaryName,t.name].filter(t=>t).join(": ")}));return(0,i.jsx)(r.WPr,{options:a,filterOption:(t,e)=>(null==e?void 0:e.formattedTitle.toLowerCase().includes(t.toLowerCase()))||(null==e?void 0:e.value.toLowerCase().includes(t.toLowerCase()))||!1,optionFilterProp:"label",autoFocus:!0,variant:"borderless",optionRender:s,dropdownStyle:{minWidth:"500px"},className:"w-full p-0","data-testid":"taxonomy-select",...n})}},34929:function(t,e,n){"use strict";var i=n(24246),r=n(64925),a=n.n(r),o=n(27378),s=n(16134),l=n(30002),c=n(28079),u=n(57072);let d=()=>{let{isLoading:t}=(0,c.fd)(),e=(0,s.C)(c.U3),{isLoading:n}=(0,u.MO)(),i=(0,s.C)(u.qb),{isLoading:r}=(0,l.te)();return{dataUses:e,dataSubjects:(0,s.C)(l.ZL),dataCategories:i,isLoading:t||n||r}};e.Z=()=>{let{dataUses:t,dataCategories:e,dataSubjects:n,isLoading:r}=d(),s=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.split(".").slice(0,e).join(".")},l=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=e(t);if(!i)return{};let r=e(s(t,n)),a=!!i.parent_key;return{name:i.name||void 0,primaryName:a&&(null==r?void 0:r.name)!==i.name&&(null==r?void 0:r.name)||void 0}},c=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:a}=l(t,e,n);return r?a?(0,i.jsxs)(o.Fragment,{children:[(0,i.jsxs)("strong",{children:[a,":"]})," ",r]},t):(0,i.jsx)("strong",{children:r},t):t},u=e=>a()(t,{fides_key:e}),p=t=>a()(e,{fides_key:t}),f=t=>a()(n,{fides_key:t});return{getDataUses:()=>t,getDataUseByKey:u,getDataUseDisplayName:t=>c(t,u,1),getDataUseDisplayNameProps:t=>l(t,u,1),getDataCategories:()=>e,getDataCategoryByKey:p,getDataCategoryDisplayName:t=>c(t,p,2),getDataCategoryDisplayNameProps:t=>l(t,p,2),getDataSubjects:()=>n,getDataSubjectByKey:f,getDataSubjectDisplayName:t=>{let e=f(t);return e?e.name:t},getPrimaryKey:s,isLoading:r}}},70788:function(t,e,n){"use strict";n.d(e,{m:function(){return c}});var i=n(24246),r=n(27824),a=n(79894),o=n.n(a),s=n(27378);let{Text:l}=r.AntTypography,c=t=>{let{items:e,...n}=t,a=(0,s.useMemo)(()=>null==e?void 0:e.map((t,n)=>{let a=n===e.length-1,s={...t},c=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,children:s.title})),c)?s.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,i.jsx)(o(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[e]);return(0,i.jsx)(r.zrq,{items:a,...n})}},26183:function(t,e,n){"use strict";var i=n(24246);n(27378),e.Z=t=>{let{children:e,className:n,...r}=t;return(0,i.jsx)("div",{className:"relative flex w-full flex-wrap items-center gap-2 overflow-x-auto py-2 ".concat(n||""),...r,children:e})}},72707:function(t){t.exports={option:"TaxonomySelect_option__vY6v2"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4230],{58754:function(e,t,a){var i=a(24246),s=a(27824),n=a(70788);t.Z=e=>{let{heading:t,breadcrumbItems:a,isSticky:l=!0,children:r,rightContent:d,style:o,...c}=e;return(0,i.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",...o}:{paddingBottom:"24px",...o},children:[(0,i.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(s.lQT,{className:a||r?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,d&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:d})]}),!!a&&(0,i.jsx)(n.m,{className:r?"pb-4":void 0,items:a,"data-testid":"page-breadcrumb"}),r]})}},97181:function(e,t,a){a.d(t,{d:function(){return o}});var i=a(24246),s=a(27824),n=a(34090),l=a(27378),r=a(46238),d=a(40324);let o=e=>{let{name:t,label:a,labelProps:o,tooltip:c,isRequired:u,layout:m="inline",helperText:p,...x}=e,[h,y,{setValue:g}]=(0,n.U$)(t),v=!!(y.touched&&y.error),[j,b]=(0,l.useState)("");h.value||"tags"!==x.mode&&"multiple"!==x.mode||(h.value=[]),"tags"===x.mode&&"string"==typeof h.value&&(h.value=[h.value]);let f="tags"===x.mode?(e,t)=>e?e.value!==j||h.value.includes(j)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(j,'"'):void 0:x.optionRender||void 0,_=e=>{b(e),x.onSearch&&x.onSearch(e)},k=(e,t)=>{g(e),x.onChange&&x.onChange(e,t)};return"inline"===m?(0,i.jsx)(s.NIc,{isInvalid:v,isRequired:u,children:(0,i.jsxs)(s.rjZ,{templateColumns:a?"1fr 3fr":"1fr",children:[a?(0,i.jsx)(d.__,{htmlFor:x.id||t,...o,children:a}):null,(0,i.jsxs)(s.jqI,{align:"center",children:[(0,i.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(s.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:f,onSearch:"tags"===x.mode?_:void 0,onChange:k,value:h.value||void 0,status:v?"error":void 0}),p&&(0,i.jsx)(s.Q6r,{children:p}),(0,i.jsx)(d.Bc,{isInvalid:v,message:y.error,fieldName:h.name})]}),(0,i.jsx)(r.b,{label:c,className:v?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(s.NIc,{isInvalid:v,isRequired:u,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[a?(0,i.jsx)(d.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...o,children:a}):null,(0,i.jsx)(r.b,{label:c})]}),(0,i.jsx)(s.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:f,onSearch:"tags"===x.mode?_:void 0,onChange:k,value:h.value||void 0,status:v?"error":void 0}),p&&(0,i.jsx)(s.Q6r,{style:{marginTop:0},children:p}),(0,i.jsx)(d.Bc,{isInvalid:v,message:y.error,fieldName:h.name})]})})}},70788:function(e,t,a){a.d(t,{m:function(){return o}});var i=a(24246),s=a(27824),n=a(79894),l=a.n(n),r=a(27378);let{Text:d}=s.AntTypography,o=e=>{let{items:t,...a}=e,n=(0,r.useMemo)(()=>null==t?void 0:t.map((e,a)=>{let n=a===t.length-1,r={...e},o=r.onClick&&!r.href;return("string"==typeof r.title&&(r.title=(0,i.jsx)(d,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,children:r.title})),o)?r.title=(0,i.jsx)(s.wpx,{type:"text",size:"small",icon:r.icon,onClick:r.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:r.title}):(r.icon&&(r.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:r.icon}),r.title]})),r.href&&r.title&&(r.title=(0,i.jsx)(l(),{href:r.href,className:"ant-breadcrumb-link",children:r.title}),delete r.href)),r}),[t]);return(0,i.jsx)(s.zrq,{items:n,...a})}},35258:function(e,t,a){a.d(t,{Z:function(){return q}});var i=a(24246),s=a(27824),n=a(27378),l=a(84720),r=a(52368),d=a(812),o=a(46628),c=a(65450),u=a(31883),m=a(34090),p=a(45938),x=a(95346),h=a(55484),y=a(97181),g=a(40324),v=a(54682);let j=h.Ry().shape({data_categories:h.IX(h.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:h.Z_().required().label("Data use"),data_subjects:h.IX(h.Z_()).min(1,"Must assign at least one data subject").label("Data subjects")}),b={data_categories:[],data_subjects:[],data_use:"",dataset_references:[],customFieldValues:{},id:""},f=e=>{var t;let{customFieldValues:a,...i}=e;return{...i,name:null!==(t=e.name)&&void 0!==t?t:""}},_=e=>{let{allDataUses:t,allDataCategories:a,allDataSubjects:n,allDatasets:l,privacyDeclarationId:r,includeCustomFields:d}=e,o=l?l.map(e=>{var t;return{label:null!==(t=e.name)&&void 0!==t?t:e.fides_key,value:e.fides_key}}):[];return(0,i.jsxs)(s.Kqy,{spacing:4,children:[(0,i.jsx)(y.d,{id:"data_use",label:"Data use",name:"data_use",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What is the system using the data for. For example, is it for third party advertising or perhaps simply providing system operations.",layout:"stacked",disabled:!!r}),(0,i.jsx)(g.j0,{id:"name",label:"Processing Activity",name:"name",variant:"stacked",tooltip:"The personal data processing activity or activities associated with this data use.",disabled:!!r}),(0,i.jsx)(y.d,{name:"data_categories",label:"Data categories",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What type of data is your system processing? This could be various types of user or system data.",mode:"multiple",layout:"stacked",disabled:!0}),(0,i.jsx)(y.d,{name:"data_subjects",label:"Data subjects",options:n.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Whose data are you processing? This could be customers, employees or any other type of user in your system.",mode:"multiple",layout:"stacked",disabled:!0}),l?(0,i.jsx)(y.d,{name:"dataset_references",label:"Dataset references",options:o,tooltip:"Referenced Dataset fides keys used by the system.",mode:"multiple",layout:"stacked"}):null,d?(0,i.jsx)(x.uc,{resourceType:v.P6.PRIVACY_DECLARATION,resourceFidesKey:r}):null]})},k=(e,t)=>e?{...e,customFieldValues:t||{}}:b,C=e=>{let{onSubmit:t,initialValues:a,allDataUses:l,privacyDeclarationId:r}=e,{customFieldValues:d,upsertCustomFields:o}=(0,x.mZ)({resourceType:v.P6.PRIVACY_DECLARATION,resourceFidesKey:r}),c=(0,n.useMemo)(()=>k(a,d),[a,d]),[u,m]=(0,n.useState)(!1),p=(0,n.useMemo)(()=>{let e=l.filter(e=>e.fides_key===c.data_use)[0];if(e)return c.name?"".concat(e.name," - ").concat(c.name):e.name},[l,c]);return{handleSubmit:async(e,a)=>{let{customFieldValues:i}=e,s=f(e),n=await t(s,a);if(n){let t=n.filter(t=>t.data_use===e.data_use&&(!t.name||t.name===e.name));t.length>0&&await o({customFieldValues:i,fides_key:t[0].id}),a.resetForm({values:e}),m(!0)}},renderHeader:e=>{let{dirty:t,boxProps:a,hideSaved:n}=e;return(0,i.jsxs)(s.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",...a,children:[p?(0,i.jsx)(s.X6q,{as:"h4",size:"xs",fontWeight:"medium",mr:4,children:p}):null,!n&&u&&!t&&c.data_use?(0,i.jsxs)(s.xvT,{fontSize:"sm","data-testid":"saved-indicator",children:[(0,i.jsx)(s.StI,{})," Saved"]}):null]})},initialValues:c}},w=e=>{let{onSubmit:t,initialValues:a,onDelete:n,...l}=e,{handleSubmit:r,renderHeader:d,initialValues:o}=C({onSubmit:t,initialValues:a,allDataUses:l.allDataUses,privacyDeclarationId:null==a?void 0:a.id});return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:o,onSubmit:r,validationSchema:j,children:e=>{let{dirty:t}=e;return(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(p.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,i.jsxs)(s.Kqy,{spacing:4,children:[(0,i.jsx)(s.xuv,{"data-testid":"header",children:d({dirty:t})}),(0,i.jsx)(_,{onDelete:n,...l})]})]})}})},S=e=>{let{privacyDeclaration:t,onEdit:a,onDelete:n,includeCustomFields:l,...r}=e,{initialValues:d,renderHeader:o,handleSubmit:c}=C({initialValues:t,onSubmit:e=>a(t,e),privacyDeclarationId:t.id,...r});return(0,i.jsx)(s.Qdk,{children:e=>{let{isExpanded:a}=e;return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:d,onSubmit:c,validationSchema:j,children:e=>{let{dirty:d}=e;return(0,i.jsxs)(m.l0,{"data-testid":"".concat(t.data_use,"-form"),children:[(0,i.jsx)(p.Gt,{id:"".concat(t.id,"-form"),name:t.id}),(0,i.jsxs)(s.KFZ,{py:4,borderBottomWidth:a?"0px":"1px",backgroundColor:a?"gray.50":void 0,"data-testid":"accordion-header-".concat(t.data_use),children:[o({dirty:d,boxProps:{flex:"1",textAlign:"left"},hideSaved:!a}),(0,i.jsx)(s.XEm,{})]}),(0,i.jsx)(s.Hk3,{backgroundColor:"gray.50",pt:0,children:(0,i.jsx)(s.Kqy,{spacing:4,children:(0,i.jsx)(_,{privacyDeclarationId:t.id,onDelete:n,includeCustomFields:l,...r})})})]})}})}})};var D=e=>{let{privacyDeclarations:t,...a}=e;return(0,i.jsx)(s.UQy,{allowToggle:!0,border:"transparent","data-testid":"privacy-declaration-accordion",children:t.map(e=>(0,i.jsx)(S,{privacyDeclaration:e,...a},e.id))})},I=e=>{let{system:t,includeCustomFields:a,onSave:l,...r}=e,m=(0,s.pmc)(),[p]=(0,c.qQ)(),[x,h]=(0,n.useState)(!1),[y,g]=(0,n.useState)(void 0),v=(0,n.useMemo)(()=>y?t.privacy_declarations.filter(e=>e.id!==y.id):t.privacy_declarations,[y,t]),j=e=>v.filter(t=>t.data_use===e.data_use&&t.name===e.name).length>0&&(m((0,o.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),b=async(e,a)=>{let i=e.map(e=>{var t;return{...e,name:null!==(t=e.name)&&void 0!==t?t:""}}),s={...t,privacy_declarations:i};return(e=>{if((0,u.D4)(e)){let t=(0,d.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");m((0,o.Vo)(t));return}return m.closeAll(),m((0,o.t5)(a?"Data use deleted":"Data use saved")),l&&l(e.data),e.data.privacy_declarations})(await p(s))},f=async(e,a)=>{if(!(a.id!==e.id&&j(a)))return b(t.privacy_declarations.map(t=>t.id===e.id?a:t))},_=async e=>{if(j(e))return;m.closeAll();let t=[...v,e],a=await b(t);return a&&g(a.filter(t=>(!t.name||t.name===e.name)&&t.data_use===e.data_use)[0]),a},k=async e=>b(t.privacy_declarations.filter(t=>t.id!==e.id),!0),C=async e=>{let t=await k(e);return t&&(h(!1),g(void 0)),t};return(0,n.useEffect)(()=>{h(!1)},[t.fides_key]),(0,i.jsxs)(s.Kqy,{spacing:3,children:[(0,i.jsx)(D,{privacyDeclarations:v,onEdit:f,onDelete:k,includeCustomFields:a,...r}),x?(0,i.jsx)(s.xuv,{backgroundColor:"gray.50",p:4,"data-testid":"new-declaration-form",children:(0,i.jsx)(w,{initialValues:y,onSubmit:_,onDelete:C,includeCustomFields:a,...r})}):null,0===t.privacy_declarations.length?(0,i.jsx)(s.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",pl:2,children:"No data uses"}):null]})},T=a(19043);let R=e=>{let[t]=(0,c.dB)(),a=(0,s.pmc)();return{handleUpsertSystem:async(i,s)=>{let n=[{...e,name:i.name,description:i.description}],l=await t(n);(0,T.D4)(l)?a((0,o.Vo)((0,d.e$)(l.error))):(a((0,o.t5)("Successfully saved system info")),s.resetForm({values:i}))},validationSchema:h.Ry().shape({name:h.Z_().required().label("Name"),description:h.Z_().required().label("Description")})}},N={name:"",description:""};var V=e=>{let{system:t}=e,a="/systems/configure/".concat(t.fides_key),{handleUpsertSystem:n,validationSchema:l}=R(t);return(0,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.kCb,{alignItems:"center",children:[(0,i.jsx)(s.xvT,{color:"gray.600",size:"md",lineHeight:6,fontWeight:"semibold",marginBottom:2,children:"System details"}),(0,i.jsx)(s.LZC,{}),(0,i.jsxs)(s._pl,{color:"complimentary.500",href:a,children:["View more",(0,i.jsx)(s.h0n,{ml:2})]})]}),(0,i.jsx)(s.xuv,{width:"100%",padding:4,borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:null!=t?t:N,validationSchema:l,onSubmit:n,children:()=>(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(p.Gt,{id:"SystemInfoDrawer",name:"System Info"}),(0,i.jsx)(s.xuv,{marginTop:3,children:(0,i.jsx)(g.j0,{label:"System name",name:"name",variant:"stacked",disabled:!0})}),(0,i.jsx)(s.xuv,{marginTop:3,children:(0,i.jsx)(g.Ks,{label:"System description",name:"description",variant:"stacked",disabled:!0})})]})})})]})},q=e=>{var t;let{selectedSystemId:a,resetSelectedSystemId:d}=e,o=(0,n.useMemo)(()=>!!a,[a]),{isLoading:u,...m}=(0,r.f)({includeDatasets:!1,includeDisabled:!1}),{data:p}=(0,c.rn)(a,{skip:!a});return(0,i.jsx)(s.xuv,{position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,overflow:"hidden",children:(0,i.jsx)(s.Mi4,{transition:{enter:{ease:"easeInOut",duration:.5},exit:{ease:"easeInOut",duration:.5}},direction:"right",in:o,unmountOnExit:!0,style:{zIndex:11,pointerEvents:"none",position:"absolute"},children:(0,i.jsxs)(s.xuv,{position:"absolute",right:"0px",height:"100%",width:"100%",maxWidth:"480px",pointerEvents:"auto",borderWidth:0,boxShadow:"0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)",display:a?"unset":"none",backgroundColor:"white","data-testid":"datamap-drawer",children:[(0,i.jsx)(s.xuv,{id:"drawer-header",borderBottomWidth:1,paddingX:6,paddingY:3,children:(0,i.jsxs)(s.kCb,{children:[(0,i.jsx)(s.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:(0,i.jsx)(s.xvT,{fontWeight:"semibold",fontSize:"lg",lineHeight:"7",color:"gray.900",children:null!==(t=null==p?void 0:p.name)&&void 0!==t?t:"System Information"})}),(0,i.jsx)(s.LZC,{}),(0,i.jsx)(s.kCb,{alignItems:"center",children:(0,i.jsx)(s.wpx,{icon:(0,i.jsx)(s.Two,{}),"aria-label":"Close error message",type:"text",onClick:d,"data-testid":"datamap-drawer-close"})})]})}),(0,i.jsx)(s.xuv,{id:"drawer-body",height:"calc(100% - 46px)",overflowY:"auto",padding:6,style:{scrollbarGutter:"stable"},children:p?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(V,{system:p}),(0,i.jsx)(s.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,children:"Data uses"}),(0,i.jsx)(s.xuv,{borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(s.xuv,{pb:3,children:(0,i.jsx)(I,{system:p,...m})})}),(0,i.jsx)(s.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,paddingBottom:2,children:"Data flow"}),(0,i.jsx)(l.q,{system:p})]}):null})]})})})}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[431],{66726:function(e,t,i){var n=i(11611),s=i(82846),r=i(91936),o=Math.max,l=Math.min;e.exports=function(e,t,i){var c,a,u,d,f,v,x=0,h=!1,j=!1,I=!0;if("function"!=typeof e)throw TypeError("Expected a function");function E(t){var i=c,n=a;return c=a=void 0,x=t,d=e.apply(n,i)}function L(e){var i=e-v,n=e-x;return void 0===v||i>=t||i<0||j&&n>=u}function C(){var e,i,n,r=s();if(L(r))return A(r);f=setTimeout(C,(e=r-v,i=r-x,n=t-e,j?l(n,u-i):n))}function A(e){return(f=void 0,I&&c)?E(e):(c=a=void 0,d)}function _(){var e,i=s(),n=L(i);if(c=arguments,a=this,v=i,n){if(void 0===f)return x=e=v,f=setTimeout(C,t),h?E(e):d;if(j)return clearTimeout(f),f=setTimeout(C,t),E(v)}return void 0===f&&(f=setTimeout(C,t)),d}return t=r(t)||0,n(i)&&(h=!!i.leading,u=(j="maxWait"in i)?o(r(i.maxWait)||0,t):u,I="trailing"in i?!!i.trailing:I),_.cancel=function(){void 0!==f&&clearTimeout(f),x=0,c=v=a=f=void 0},_.flush=function(){return void 0===f?d:A(s())},_}},82846:function(e,t,i){var n=i(77400);e.exports=function(){return n.Date.now()}},30952:function(e,t,i){"use strict";i.d(t,{f:function(){return c}});var n=i(24246),s=i(66726),r=i.n(s),o=i(27378),l=i(26917);let c=e=>{let{value:t,onChange:i,placeholder:s,...c}=e,[a,u]=(0,o.useState)(t),d=r()(i,500),f=(0,o.useCallback)(e=>{u(e),d(e)},[]);return(0,n.jsx)(l.Z,{value:a,onChange:f,onClear:()=>{u(""),i("")},placeholder:s,...c})}},35287:function(e,t,i){"use strict";var n=i(24246),s=i(27824),r=i(88038),o=i.n(r);i(27378),t.Z=e=>{let{children:t,title:i,mainProps:r}=e;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsx)(s.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...r,children:t})]})}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),s=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?i=t.data.detail:(0,s.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var n=i(24246),s=i(27824);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(t,i,r)=>{let o={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,o):e(o)},successAlert:(t,i,r)=>{let o={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,o):e(o)}}}},79494:function(e,t,i){"use strict";var n=i(24246),s=i(27824);t.Z=e=>{let{title:t,icon:i,type:r,...o}=e;return(0,n.jsx)(s.wpx,{size:"small",type:r,"data-testid":"action-".concat(t),icon:i,iconPosition:"start",...o,children:t})}},38347:function(e,t,i){"use strict";var n=i(24246),s=i(27824),r=i(76904);t.Z=()=>(0,n.jsxs)(s.J2e,{isLazy:!0,trigger:"hover",children:[(0,n.jsx)(s.xol,{children:(0,n.jsx)(s.UOT,{color:"gray.400"})}),(0,n.jsxs)(s.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,n.jsx)(s.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,n.jsx)(s.QHN,{bgColor:"gray.800"}),(0,n.jsx)(s.baG,{border:"none",children:(0,n.jsxs)(s.MIq,{columns:2,spacing:2,children:[(0,n.jsxs)(s.vyj,{children:[(0,n.jsx)(r.Rv,{}),(0,n.jsx)("div",{children:"Change detected"})]}),(0,n.jsxs)(s.vyj,{children:[(0,n.jsx)(r.$P,{}),(0,n.jsx)("div",{children:"Data labeled"})]}),(0,n.jsxs)(s.vyj,{children:[(0,n.jsx)(r.zj,{}),(0,n.jsx)("div",{children:"Monitoring"})]}),(0,n.jsxs)(s.vyj,{children:[(0,n.jsx)(r.dK,{}),(0,n.jsx)("div",{children:"Addition detected"})]}),(0,n.jsxs)(s.vyj,{children:[(0,n.jsx)(r.Kr,{}),(0,n.jsx)("div",{children:"Unmonitored"})]}),(0,n.jsxs)(s.vyj,{children:[(0,n.jsx)(r.q1,{}),(0,n.jsx)("div",{children:"Removal detected"})]})]})})]})]})},47182:function(e,t,i){"use strict";var n=i(86677),s=i(77830);t.Z=()=>{let e=(0,n.useRouter)();return{monitorId:e.query.monitorId,resourceUrn:e.query.resourceUrn,navigateToDetectionResults:t=>{let{resourceUrn:i,filterTab:n}=t;e.push({pathname:s.dS,query:{resourceUrn:i},hash:n})},navigateToDiscoveryResults:t=>{let{resourceUrn:i,filterTab:n}=t;e.push({pathname:s.Sj,query:{resourceUrn:i},hash:n})}}}},76904:function(e,t,i){"use strict";i.d(t,{dK:function(){return d},Rv:function(){return h},$P:function(){return v},zj:function(){return j},Kr:function(){return I},q1:function(){return f},QL:function(){return E}});var n=i(24246),s=i(27824),r=i(3124),o=i.n(r);let l=e=>{let{...t}=e;return(0,n.jsx)("svg",{viewBox:"0 0 8 8",focusable:"false",...t,children:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 8H8V7.23192V1.85539V1.08731H6.46385V1.85539V5.37654L1.62976 0.544855L1.08731 0L0 1.08731L0.542454 1.62976L5.37654 6.46385H1.85539H1.08731V8H1.85539H7.23192Z"})})},c=e=>{let{...t}=e;return(0,n.jsx)("svg",{viewBox:"0 0 8 8",focusable:"false",...t,children:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 0H8V0.768077V6.14461V6.91269H6.46385V6.14461V2.62346L1.62976 7.45515L1.08731 8L0 6.91269L0.542454 6.37024L5.37654 1.53615H1.85539H1.08731V0H1.85539H7.23192Z"})})},a=e=>{let{...t}=e;return(0,n.jsx)("svg",{viewBox:"0 0 9 10",focusable:"false",...t,children:(0,n.jsx)("path",{fill:"currentColor",d:"M0 0.5V5L4.5 9.5L9 5L4.5 0.5H0ZM2.25 2.10714C2.4205 2.10714 2.58401 2.17487 2.70457 2.29543C2.82513 2.41599 2.89286 2.5795 2.89286 2.75C2.89286 2.9205 2.82513 3.08401 2.70457 3.20457C2.58401 3.32513 2.4205 3.39286 2.25 3.39286C2.0795 3.39286 1.91599 3.32513 1.79543 3.20457C1.67487 3.08401 1.60714 2.9205 1.60714 2.75C1.60714 2.5795 1.67487 2.41599 1.79543 2.29543C1.91599 2.17487 2.0795 2.10714 2.25 2.10714Z"})})};var u=i(28278);let d=()=>(0,n.jsx)(c,{style:{color:o().FIDESUI_SUCCESS},className:"size-2","data-testid":"add-icon"}),f=()=>(0,n.jsx)(l,{style:{color:o().FIDESUI_ERROR},className:"size-2","data-testid":"remove-icon"}),v=()=>(0,n.jsx)(a,{style:{color:o().FIDESUI_WARNING},className:"size-3","data-testid":"classify-icon"}),x=e=>{let{color:t,...i}=e;return(0,n.jsx)(s.PJP.fRw,{style:{color:t},className:"size-2",...i})},h=()=>(0,n.jsx)(x,{color:o().FIDESUI_INFO,"data-testid":"change-icon"}),j=()=>(0,n.jsx)(x,{color:o().FIDESUI_SUCCESS,"data-testid":"monitored-icon"}),I=()=>(0,n.jsx)(x,{color:o().FIDESUI_ERROR,"data-testid":"muted-icon"}),E={[u.E.ADDITION]:(0,n.jsx)(d,{}),[u.E.REMOVAL]:(0,n.jsx)(f,{}),[u.E.CLASSIFICATION]:(0,n.jsx)(v,{}),[u.E.CHANGE]:(0,n.jsx)(h,{}),[u.E.MONITORED]:(0,n.jsx)(j,{}),[u.E.MUTED]:(0,n.jsx)(I,{}),[u.E.IN_PROGRESS]:(0,n.jsx)(()=>(0,n.jsx)(x,{color:o().FIDESUI_WARNING,"data-testid":"in-progress-icon"}),{}),[u.E.NONE]:null}},87667:function(e,t,i){"use strict";var n=i(24246),s=i(27824),r=i(76904),o=i(20449),l=i(98559),c=i(80356);t.Z=e=>{let{result:t,changeTypeOverride:i}=e,a=null!=i?i:(0,o.Z)(t);return(0,n.jsxs)(s.vyj,{className:"h-full",children:[(0,n.jsx)(s.esZ,{title:a,children:(0,n.jsx)("span",{children:r.QL[a]})}),(0,n.jsx)(s.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,c.Z)(t)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,l.Z)(t)})]})}},50169:function(e,t,i){"use strict";var n=i(24246),s=i(47935),r=i(28278),o=i(20449);let l={[r.E.MUTED]:{color:"marble",label:"Unmonitored"},[r.E.MONITORED]:{color:"success",label:"Monitoring"},[r.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};t.Z=e=>{var t,i,r,c,a;let{result:u,changeTypeOverride:d}=e;if(null===(t=u.user_assigned_data_categories)||void 0===t?void 0:t.length)return(0,n.jsx)(s.A4,{color:"success",value:"Reviewed"});let f=null!=d?d:(0,o.Z)(u);return(0,n.jsx)(s.A4,{color:null!==(c=null===(i=l[f])||void 0===i?void 0:i.color)&&void 0!==c?c:"warning",value:null!==(a=null===(r=l[f])||void 0===r?void 0:r.label)&&void 0!==a?a:"Pending review"})}},28278:function(e,t,i){"use strict";var n,s;i.d(t,{E:function(){return n}}),(s=n||(n={})).ADDITION="Addition",s.CHANGE="Change",s.REMOVAL="Removal",s.CLASSIFICATION="Classification",s.IN_PROGRESS="Classifying",s.MONITORED="Monitoring",s.MUTED="Unmonitored",s.NONE="--"},74241:function(e,t){"use strict";t.Z=e=>{let t=e.split(".");return t.length>1?t[1]:""}},20449:function(e,t,i){"use strict";var n=i(28278),s=i(54682);t.Z=e=>e.diff_status===s.LL.ADDITION?n.E.ADDITION:e.diff_status===s.LL.REMOVAL?n.E.REMOVAL:e.diff_status===s.LL.CLASSIFYING||e.diff_status===s.LL.CLASSIFICATION_QUEUED?n.E.IN_PROGRESS:e.diff_status===s.LL.CLASSIFICATION_ADDITION||e.diff_status===s.LL.CLASSIFICATION_UPDATE?n.E.CLASSIFICATION:e.child_diff_statuses?e.child_diff_statuses[s.LL.CLASSIFYING]||e.child_diff_statuses[s.LL.CLASSIFICATION_QUEUED]?n.E.IN_PROGRESS:e.child_diff_statuses[s.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[s.LL.CLASSIFICATION_UPDATE]?n.E.CLASSIFICATION:e.child_diff_statuses[s.LL.ADDITION]||e.child_diff_statuses[s.LL.REMOVAL]?n.E.CHANGE:e.diff_status===s.LL.MONITORED?n.E.MONITORED:e.diff_status===s.LL.MUTED?n.E.MUTED:n.E.NONE:n.E.NONE},7940:function(e,t,i){"use strict";i.d(t,{G:function(){return s}});var n=i(54682);let s=e=>{var t,i,s;return e?e.resource_type?e.resource_type:(null===(t=e.schemas)||void 0===t?void 0:t.length)?n.D$.DATABASE:(null===(i=e.tables)||void 0===i?void 0:i.length)?n.D$.SCHEMA:(null===(s=e.fields)||void 0===s?void 0:s.length)?n.D$.TABLE:n.D$.FIELD:void 0}},98559:function(e,t){"use strict";t.Z=e=>{let{name:t,urn:i,monitor_config_id:n,database_name:s,schema_name:r,table_name:o,top_level_field_name:l,top_level_field_urn:c}=e;if(!l)return t;let a=i.split(".");return c?i.replace("".concat(c).concat("."),""):([n,s,r,o,l].forEach(e=>{if(e){let t=a.indexOf(e);t>-1&&a.splice(t,1)}}),a.join("."))}},80285:function(e,t){"use strict";t.Z=e=>e.urn},36168:function(e,t){"use strict";t.Z=e=>{var t;return!!e.parent_table_urn&&null!==(t=e.sub_field_urns)&&void 0!==t&&!!t.length&&!e.top_level_field_name}},80356:function(e,t,i){"use strict";var n=i(7940),s=i(36168),r=i(54682);t.Z=e=>(0,n.G)(e)!==r.D$.FIELD||(0,s.Z)(e)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4608],{97181:function(e,t,i){i.d(t,{d:function(){return d}});var n=i(24246),a=i(27824),r=i(34090),s=i(27378),l=i(46238),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:h="inline",helperText:x,...m}=e,[p,f,{setValue:g}]=(0,r.U$)(t),v=!!(f.touched&&f.error),[y,j]=(0,s.useState)("");p.value||"tags"!==m.mode&&"multiple"!==m.mode||(p.value=[]),"tags"===m.mode&&"string"==typeof p.value&&(p.value=[p.value]);let b="tags"===m.mode?(e,t)=>e?e.value!==y||p.value.includes(y)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:m.optionRender||void 0,_=e=>{j(e),m.onSearch&&m.onSearch(e)},k=(e,t)=>{g(e),m.onChange&&m.onChange(e,t)};return"inline"===h?(0,n.jsx)(a.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(a.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,n.jsx)(o.__,{htmlFor:m.id||t,...d,children:i}):null,(0,n.jsxs)(a.jqI,{align:"center",children:[(0,n.jsxs)(a.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(a.WPr,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?_:void 0,onChange:k,value:p.value||void 0,status:v?"error":void 0}),x&&(0,n.jsx)(a.Q6r,{children:x}),(0,n.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]}),(0,n.jsx)(l.b,{label:c,className:v?"mt-2 self-start":void 0})]})]})}):(0,n.jsx)(a.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(a.gCW,{alignItems:"start",children:[(0,n.jsxs)(a.jqI,{align:"center",children:[i?(0,n.jsx)(o.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,(0,n.jsx)(l.b,{label:c})]}),(0,n.jsx)(a.WPr,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?_:void 0,onChange:k,value:p.value||void 0,status:v?"error":void 0}),x&&(0,n.jsx)(a.Q6r,{style:{marginTop:0},children:x}),(0,n.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]})})}},46782:function(e,t,i){i.d(t,{j:function(){return r},l:function(){return s}});var n=i(30454),a=i.n(n);let r="#/definitions/FidesDatasetReference",s=e=>{let t=(e,t,i)=>{let n;return(void 0===t||""===t||void 0===t)&&(n="".concat(e," is required")),i===r&&((null==t?void 0:t.includes("."))?t.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},i=t=>{var i,n;return null!==(n=null==e?void 0:null===(i=e.required)||void 0===i?void 0:i.includes(t))&&void 0!==n&&n};return{validateField:t,isRequiredField:i,getFieldValidation:(e,n)=>{if(i(e))return e=>{var i;return t(n.title,e,null===(i=n.allOf)||void 0===i?void 0:i[0].$ref)}},preprocessValues:t=>{let i=a()(t);return e&&Object.keys(e.properties).forEach(t=>{var n,a;if((null===(n=e.properties[t].allOf)||void 0===n?void 0:n[0].$ref)===r){let e=null===(a=i.secrets[t])||void 0===a?void 0:a.split(".");e&&(i.secrets[t]={dataset:e.shift(),field:e.join("."),direction:"from"})}"WebsiteSchema"!==e.title||"URL"!==e.properties[t].title||i.secrets[t].startsWith("http://")||i.secrets[t].startsWith("https://")||(i.secrets[t]="https://".concat(i.secrets[t]))}),i}}}},14047:function(e,t,i){i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),a=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,a.Ot)(t)?i=t.data.detail:(0,a.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},41337:function(e,t,i){var n=i(24246),a=i(27824);i(27378);var r=i(88337),s=i(16394),l=i(14746);let o=l.Ny+l.iW.get(r.R.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===r.R.WEBSITE,h=e=>(null==e?void 0:e.connection_type)===r.R.SAAS;t.Z=e=>{let{data:t,...i}=e;return(0,n.jsx)(a.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{var e,i;let n;if(c(t)&&t.encoded_icon)return"data:image/svg+xml;base64,".concat(t.encoded_icon);if(u(t)){let i=null===(e=t.secrets)||void 0===e?void 0:e.url;if(!i)return o;let n=(0,s.ge)(i);return(0,s.tl)(n,100)}if(d(t)){if(h(t)&&(null===(i=t.saas_config)||void 0===i?void 0:i.type)){let e=t.saas_config.type,i=l.LN.get(e);return i?l.Ny+i:l.Ny+l.iW.get(r.R.SAAS)}n=[...l.iW].find(e=>{let[i]=e;return t.connection_type.toString()===i.toString()})}else if(c(t)){let{identifier:e}=t;n=[...l.iW].find(t=>{let[i]=t;return i.toLowerCase()===e.toLowerCase()})}return n?l.Ny+n[1]:l.VD})(),fallbackSrc:u(t)?o:l.VD,alt:(()=>{if(d(t)){var e;return null!==(e=t.name)&&void 0!==e?e:t.key}return c(t)?t.human_readable:t})(),...i})}},1226:function(e,t,i){var n=i(24246);i(27378);var a=i(77213);t.Z=e=>{let{children:t}=e;return(0,n.jsx)(a.Z,{title:"Connections",children:t})}},11274:function(e,t,i){i.d(t,{s:function(){return F}});var n=i(24246),a=i(96356),r=i(27824),s=i(86677),l=i(27378),o=i(16134),d=i(77830),c=i(54682),u=i(14047),h=i(84306),x=i(14207),m=i(16125),p=i(33335),f=i(34090),g=i(46782),v=i(46238);let y=(e,t)=>{let i={...e};return Object.entries(t.properties).forEach(t=>{let[n,a]=t;if("integer"===a.type){let t=a.default?Number(a.default):e[n];i[n]=t||0}else{var r;let t=null!==(r=a.default)&&void 0!==r?r:e[n];i[n]=null!=t?t:null}}),i};var j=e=>{let{data:t,defaultValues:i,isSubmitting:s=!1,onSaveClick:d,onTestConnectionClick:h,testButtonLabel:m="Test integration"}=e,p=(0,l.useRef)(!1),{handleError:j}=(0,u.H)(),{connection:b,connectionOption:_}=(0,o.C)(a.ZZ),[k,C]=(0,x.h2)(),S=e=>{let t;return(void 0===e||""===e)&&(t="Connection Identifier is required"),e&&(0,r.kEn)(e)&&(t="Connection Identifier must be an alphanumeric value"),t},w=(e,t,i)=>{let n;return(void 0===t||""===t)&&(n="".concat(e," is required")),i===g.j&&(t.includes(".")?t.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},I=(e,t)=>(0,n.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:t}),R=e=>{var t;if((null===(t=e.allOf)||void 0===t?void 0:t[0].$ref)===g.j)return"Enter dataset.collection.field"},z=(e,i)=>{var a;return(0,n.jsx)(f.gN,{id:e,name:e,validate:(null!==(a=t.required)&&void 0!==a&&!!a.includes(e)||"integer"===i.type)&&(e=>{var t;return w(i.title,e,null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)}),children:a=>{var s;let{field:l,form:o}=a;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:null===(s=t.required)||void 0===s?void 0:s.includes(e),isInvalid:o.errors[e]&&o.touched[e],children:[I(e,i.title),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:["integer"!==i.type&&(0,n.jsx)(r.IIB,{...l,value:l.value||"",placeholder:R(i),autoComplete:"off",color:"gray.700",size:"sm"}),"integer"===i.type&&(0,n.jsxs)(r.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(r.zuI,{...l,autoComplete:"off"}),(0,n.jsxs)(r.FiK,{children:[(0,n.jsx)(r.WQu,{}),(0,n.jsx)(r.Y_d,{})]})]}),(0,n.jsx)(r.J1D,{children:o.errors[e]})]}),(0,n.jsx)(r.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(v.b,{label:i.description})})]})}},e)},W=async()=>{try{await k(b.key).unwrap()}catch(e){j(e)}};return(0,l.useEffect)(()=>(p.current=!0,C.isSuccess&&h(C),()=>{p.current=!1}),[h,C]),(0,n.jsx)(f.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...i};if(null==b?void 0:b.key){var n,a;e.name=null!==(a=b.name)&&void 0!==a?a:"",e.description=b.description,e.instance_key=b.connection_type===c.Rj.SAAS?null===(n=b.saas_config)||void 0===n?void 0:n.fides_key:b.key}return y(e,t)})(),onSubmit:(e,i)=>{let n={...e};Object.keys(t.properties).forEach(i=>{var a;if((null===(a=t.properties[i].allOf)||void 0===a?void 0:a[0].$ref)===g.j){let t=e[i].split(".");n[i]={dataset:t.shift(),field:t.join("."),direction:"from"}}}),d(n,i)},validateOnBlur:!1,validateOnChange:!1,children:e=>(0,n.jsx)(f.l0,{noValidate:!0,children:(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(f.gN,{id:"name",name:"name",validate:e=>w("Name",e),children:t=>{let{field:i}=t;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.name&&e.touched.name,children:[I("name","Name"),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",mr:"6",children:[(0,n.jsx)(r.IIB,{...i,autoComplete:"off",autoFocus:!0,color:"gray.700",placeholder:"Enter a friendly name for your new ".concat(_.human_readable," connection"),size:"sm","data-testid":"input-name"}),(0,n.jsx)(r.J1D,{children:e.errors.name})]})]})}}),(0,n.jsx)(f.gN,{id:"description",name:"description",children:e=>{let{field:t}=e;return(0,n.jsxs)(r.NIc,{display:"flex",children:[I("description","Description"),(0,n.jsx)(r.gxH,{...t,color:"gray.700",placeholder:"Enter a description for your new ".concat(_.human_readable," connection"),resize:"none",size:"sm",value:t.value||"",mr:"6"})]})}}),(0,n.jsx)(f.gN,{id:"instance_key",name:"instance_key",validate:S,children:t=>{let{field:i}=t;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.instance_key&&e.touched.instance_key,children:[I("instance_key","Connection Identifier"),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(r.IIB,{...i,autoComplete:"off",color:"gray.700",isDisabled:!!(null==b?void 0:b.key),placeholder:"A unique identifier for your new ".concat(_.human_readable," connection"),size:"sm"}),(0,n.jsx)(r.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(r.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(v.b,{label:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this connection."})})]})}}),Object.entries(t.properties).map(e=>{let[t,i]=e;return"advanced_settings"===t?null:z(t,i)}),(0,n.jsxs)(r.kCb,{gap:2,children:[(0,n.jsx)(r.wpx,{disabled:!(null==b?void 0:b.key),loading:C.isLoading||C.isFetching,onClick:W,"data-testid":"test-connection-button",children:m}),(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:s,loading:s,children:"Save"})]})]})})})};let b=e=>{let{onConnectionCreated:t,data:i}=e,r=(0,m.I0)(),{errorAlert:s,successAlert:d}=(0,h.V)(),{handleError:f}=(0,u.H)(),[g,v]=(0,l.useState)(!1),{connection:y,connectionOption:j}=(0,o.C)(a.ZZ),[b]=(0,x.pH)(),[_]=(0,x.Du)();return{isSubmitting:g,handleSubmit:async e=>{try{var l;v(!0);let o={access:c.uv.WRITE,connection_type:null==j?void 0:j.identifier,description:e.description,disabled:!1,key:(0,p.E)(e.instance_key),name:e.name},u=await b(o).unwrap();if((null===(l=u.failed)||void 0===l?void 0:l.length)>0)s(u.failed[0].message);else{let l={connection_key:u.succeeded[0].key,secrets:{}};Object.entries(i.properties).forEach(t=>{l.secrets[t[0]]=e[t[0]]});let o=await _(l).unwrap();"failed"===o.test_status?s((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",o.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",o.failure_reason]})):(r((0,a.lm)(u.succeeded[0])),d("Connector successfully ".concat((null==y?void 0:y.key)?"updated":"added","!")),(null==y?void 0:y.key)||!t||t())}}catch(e){f(e)}finally{v(!1)}},connectionOption:j}},_=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:a}=e,{isSubmitting:s,handleSubmit:l,connectionOption:o}=b({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",o.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(j,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:s,onSaveClick:l,onTestConnectionClick:a})]})},k={description:"",instance_key:"",name:""},C=e=>{let{data:t,onConnectionCreated:i,onTestEmail:a}=e,{connectionOption:s,isSubmitting:l,handleSubmit:o}=b({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Configure your ",s.human_readable," connector by providing the connector name, description and a test email address. Once you have saved the details, you can click test email to check the format of the email."]}),(0,n.jsx)(j,{data:t,defaultValues:k,isSubmitting:l,onSaveClick:e=>{o(e)},onTestConnectionClick:a,testButtonLabel:"Test email"})]})};var S=i(55484),w=i(27259),I=i(67762),R=e=>{let{defaultValues:t,isSubmitting:i=!1,onSaveClick:l}=e,c=(0,s.useRouter)(),{connection:u,connectionOption:h}=(0,o.C)(a.ZZ);return(0,n.jsx)(f.J9,{initialValues:(()=>{if(null==u?void 0:u.key){var e;t.name=null!==(e=u.name)&&void 0!==e?e:"",t.description=u.description}return t})(),onSubmit:(e,t)=>{l(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:S.Ry().shape({name:S.Z_().required("Name is required")}),children:(0,n.jsx)(f.l0,{noValidate:!0,children:(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(w.Z,{autoFocus:!0,disabled:!!(null==u?void 0:u.key),isRequired:!0,label:"Name",name:"name",placeholder:"Enter a friendly name for your new ".concat(h.human_readable," connection")}),(0,n.jsx)(w.Z,{label:"Description",name:"description",placeholder:"Enter a description for your new ".concat(h.human_readable," connection"),type:"textarea"}),(0,n.jsx)(I.h,{isSubmitting:i,onCancelClick:()=>{c.push(d.JR)}})]})})})};let z=e=>{let{onConnectionCreated:t}=e,i=(0,m.I0)(),{errorAlert:s,successAlert:d}=(0,h.V)(),{handleError:p}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:v,connectionOption:y}=(0,o.C)(a.ZZ),[j]=(0,x.pH)(),b=async(e,n)=>{try{var r;g(!0);let n={access:c.uv.WRITE,connection_type:null==y?void 0:y.identifier,description:e.description,disabled:!1,name:e.name,key:null==v?void 0:v.key},l=await j(n).unwrap();(null===(r=l.failed)||void 0===r?void 0:r.length)>0?s(l.failed[0].message):(i((0,a.lm)(l.succeeded[0])),d("Connector successfully ".concat((null==v?void 0:v.key)?"updated":"added","!")),(null==v?void 0:v.key)||!t||t())}catch(e){p(e)}finally{g(!1)}};return(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",children:["To begin setting up your new ",y.human_readable," ","connector you must first assign a name to the connector and a description.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Once you have completed this section you can then progress onto"," ",(0,n.jsx)(r.xvT,{display:"inline-block",fontWeight:"700",children:"DSR customization"})," ","using the menu on the left hand side."]}),(0,n.jsx)(R,{defaultValues:{description:"",name:""},isSubmitting:f,onSaveClick:b})]})},W=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:s}=e,d=(0,m.I0)(),{errorAlert:f,successAlert:g}=(0,h.V)(),{handleError:v}=(0,u.H)(),[y,b]=(0,l.useState)(!1),{connection:_,connectionOption:k}=(0,o.C)(a.ZZ),[C]=(0,x.pL)(),[S]=(0,x.pH)(),[w]=(0,x.Du)(),I=async(e,r)=>{try{if(b(!0),_){var s;let i={access:c.uv.WRITE,connection_type:_.connection_type,description:e.description,disabled:!1,key:_.key,name:e.name},r=await S(i).unwrap();if((null===(s=r.failed)||void 0===s?void 0:s.length)>0)f(r.failed[0].message);else{d((0,a.lm)(r.succeeded[0]));let i={connection_key:_.key,secrets:{}};Object.entries(t.properties).forEach(t=>{i.secrets[t[0]]=e[t[0]]});let s=await w(i).unwrap();"failed"===s.test_status?f((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",s.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",s.failure_reason]})):g("Connector successfully updated!")}}else{let n={description:e.description,name:e.name,instance_key:(0,p.E)(e.instance_key),saas_connector_type:k.identifier,secrets:{}};Object.entries(t.properties).forEach(t=>{n.secrets[t[0]]=e[t[0]]});let r=await C(n).unwrap();d((0,a.lm)(r.connection)),g("Connector successfully added!"),null==i||i()}}catch(e){v(e)}finally{b(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",k.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(j,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:y,onSaveClick:I,onTestConnectionClick:s})]})};var Z=i(16394);let E=e=>{var t,i;let{response:s}=e,{connectionOption:l}=(0,o.C)(a.ZZ);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.izJ,{color:"gray.100"}),(0,n.jsxs)(r.gCW,{align:"flex-start",mt:"16px",children:[(null===(t=s.data)||void 0===t?void 0:t.test_status)==="succeeded"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.Ugi,{children:[(0,n.jsxs)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Successfully connected to ",l.human_readable]}),(0,n.jsx)(r.Vp9,{colorScheme:"green",size:"sm",variant:"solid",children:"Success"})]}),(0,n.jsx)(r.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,n.jsx)(r.xuv,{bg:"green.100",border:"1px solid",borderColor:"green.300",color:"green.700",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(r.StI,{}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"green.500",fontWeight:"semibold",size:"xs",children:"Success message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]}),(null===(i=s.data)||void 0===i?void 0:i.test_status)==="failed"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.Ugi,{children:[(0,n.jsxs)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Output error to ",l.human_readable]}),(0,n.jsx)(r.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(r.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,n.jsx)(r.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(r.f9v,{}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.failure_reason}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]})]})]})},F=e=>{let{onConnectionCreated:t}=e,i=(0,s.useRouter)(),{connectionOption:u}=(0,o.C)(a.ZZ),h=u&&u.type===c.Zi.MANUAL,{data:x,isFetching:m,isLoading:p,isSuccess:f}=(0,a.n3)(u.identifier,{skip:h}),[g,v]=(0,l.useState)(),y=e=>{v(e)},j=(0,l.useCallback)(()=>{i.push(d.JR)},[i]),b=(0,l.useCallback)(()=>{switch(null==u?void 0:u.type){case c.Zi.DATABASE:if(f&&x)return(0,n.jsx)(_,{data:x,onConnectionCreated:t,onTestConnectionClick:y});break;case c.Zi.MANUAL:return(0,n.jsx)(z,{onConnectionCreated:t});case c.Zi.SAAS:if(f&&x)return(0,n.jsx)(W,{data:x,onConnectionCreated:t,onTestConnectionClick:y});break;case c.Zi.EMAIL:if(f&&x)return(0,n.jsx)(C,{data:x,onConnectionCreated:j,onTestEmail:y})}},[null==u?void 0:u.type,x,f,t,j]);return(0,n.jsxs)(r.kCb,{gap:"97px",children:[(0,n.jsxs)(r.gCW,{w:"579px",gap:"16px",align:"stretch",children:[(m||p)&&(0,n.jsx)(r.M5Y,{children:(0,n.jsx)(r.$jN,{})}),b()]}),g&&(0,n.jsxs)(r.Rg9,{in:!0,children:[" ",(0,n.jsx)(r.xuv,{mt:"16px",maxW:"528px",w:"fit-content",children:(0,n.jsx)(E,{response:g})})]})]})}},38212:function(e,t,i){i.d(t,{Z:function(){return j}});var n=i(24246),a=i(14047),r=i(96356),s=i(14207),l=i(27824),o=i(86677),d=i(27378),c=i(16134),u=i(812),h=i(77830),x=i(41966),m=i(84306),p=i(66527),f=i(41207),g=i(39715),v=e=>{let{data:t=[],isSubmitting:i=!1,onSubmit:a,onCancel:r,disabled:s}=e,o=(0,d.useRef)(null),{errorAlert:c}=(0,m.V)(),u=t.length>0?p.ZP.dump(t):void 0,[h,v]=(0,d.useState)(void 0),[y,j]=(0,d.useState)(!1),[b,_]=(0,d.useState)(!u),k=(0,l.qY0)(),{data:C}=(0,x.LH)({minimal:!0}),[S,w]=(0,d.useState)([]),I=e=>{p.ZP.load(e,{json:!0}),v(void 0)},R=()=>{let e=o.current.getValue();a(p.ZP.load(e,{json:!0})),w([])};return(0,n.jsxs)(l.kCb,{gap:"97px",children:[(0,n.jsxs)(l.gCW,{align:"stretch",w:"800px",children:[(0,n.jsx)(f.M,{defaultLanguage:"yaml",defaultValue:u,height:"calc(100vh - 526px)",onChange:e=>{try{j(!0),I(e),_(!!(!e||""===e.trim()))}catch(e){(0,f.F)(e)?v(e):c("Could not parse the supplied YAML")}},onMount:(e,t)=>{o.current=e,o.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0},readOnly:s},theme:"light"}),(0,n.jsxs)(l.Ugi,{justifyContent:"flex-end",pr:6,children:[r&&(0,n.jsx)(l.wpx,{onClick:r,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",disabled:s||b||!!h||i,loading:i,onClick:()=>{if(C&&C.length){let e=o.current.getValue(),t=C.filter(t=>e.includes("fides_key: ".concat(t.fides_key,"\n"))).map(e=>e.fides_key);if(w(t),t.length){k.onOpen();return}}R()},htmlType:"submit","data-testid":"save-yaml-btn",children:"Save"})]})]}),y&&(b||h)&&(0,n.jsx)(g.Z,{isEmptyState:b,yamlError:h}),(0,n.jsx)(l.cVQ,{isOpen:k.isOpen,onClose:k.onClose,onConfirm:()=>{R(),k.onClose()},title:"Overwrite dataset",message:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xvT,{children:["You are about to overwrite the dataset",S.length>1?"s":""," ",S.map((e,t)=>{let i=t===S.length-1;return(0,n.jsxs)(d.Fragment,{children:[(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),i?".":", "]},e)})]}),(0,n.jsx)(l.xvT,{children:"Are you sure you would like to continue?"})]})})]})};let y=e=>{let{children:t,...i}=e;return(0,n.jsx)(l.xvT,{color:"gray.700",fontSize:"14px",...i,children:t})};var j=()=>{let e=(0,o.useRouter)(),{errorAlert:t,successAlert:i}=(0,a.V)(),{handleError:m}=(0,a.H)(),[p,f]=(0,d.useState)(!1),{connection:g}=(0,c.C)(r.ZZ),{data:j,isFetching:b,isLoading:_,isSuccess:k}=(0,s.Eg)(g.key),[C]=(0,s.Lz)(),[S]=(0,x.EG)(),{data:w,isLoading:I,error:R}=(0,x.LH)({minimal:!0}),[z,W]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{j&&j.items.length&&W(j.items[0].ctl_dataset.fides_key)},[j]);let Z=async n=>{var a;let r={connection_key:null==g?void 0:g.key,dataset_pairs:n},s=await C(r).unwrap();(null===(a=s.failed)||void 0===a?void 0:a.length)>0?t(s.failed[0].message):i("Dataset successfully updated!"),e.push(h.JR)},E=async()=>{if(z)try{let e=z;j&&j.items.length&&(e=j.items[0].fides_key);let t=[{fides_key:e,ctl_dataset_fides_key:z}];Z(t)}catch(e){m(e)}},F=async e=>{try{f(!0);let i=Array.isArray(e)?e:[e],n=await S(i);if((0,u.D4)(n)){let e=(0,u.e$)(n.error);t(e);return}let a=i.map(e=>({fides_key:e.fides_key,ctl_dataset_fides_key:e.fides_key}));if(j&&j.items.length){let{items:e}=j;a=e.map((e,t)=>({fides_key:e.fides_key,ctl_dataset_fides_key:i[t].fides_key}))}Z(a)}catch(e){m(e)}finally{f(!1)}},T=""!==z&&void 0!==z;if(b||_||I&&!R)return(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})});let q=w&&w.length;return(0,n.jsxs)(l.gCW,{alignItems:"left",gap:4,children:[R&&(0,n.jsx)(y,{color:"red",children:"There was a problem loading existing datasets, please try again."}),(0,n.jsxs)(l.gCW,{alignItems:"flex-start",children:[q&&(0,n.jsx)("div",{children:(0,n.jsx)(l.gCW,{alignSelf:"start",gap:4,children:(0,n.jsxs)(l.xuv,{"data-testid":"dataset-selector-section",children:[(0,n.jsx)(y,{mb:4,children:"Choose a dataset to associate with this connector."}),(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.WPr,{allowClear:!0,options:w.map(e=>({label:e.fides_key,value:e.fides_key})),className:"w-full",placeholder:"Select",onChange:e=>W(e),value:z,"data-testid":"dataset-selector"}),(0,n.jsx)(l.wpx,{onClick:E,type:"primary",className:"self-start",disabled:!T,"data-testid":"save-dataset-link-btn",children:"Save"})]})]})})}),q&&k&&(null==j?void 0:j.items)&&(0,n.jsx)(l.htM,{plain:!0,children:"or"}),k&&(null==j?void 0:j.items)&&(0,n.jsxs)(l.xuv,{"data-testid":"yaml-editor-section",children:[(0,n.jsx)(y,{mb:4,children:"View your dataset YAML below!"}),(0,n.jsx)(v,{data:j.items.map(e=>e.ctl_dataset),isSubmitting:p,onSubmit:F,disabled:T})]})]})]})}},27259:function(e,t,i){var n=i(24246),a=i(27824),r=i(34090);t.Z=e=>{let{disabled:t=!1,isRequired:i=!1,label:s,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[h,x]=(0,r.U$)(d);return(0,n.jsxs)(a.NIc,{display:"flex",isRequired:i,isInvalid:!!(x.error&&x.touched),children:[s&&(0,n.jsx)(a.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:s}),(0,n.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,n.jsxs)(a.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(a.zuI,{...h,autoComplete:"off",autoFocus:u}),(0,n.jsxs)(a.FiK,{children:[(0,n.jsx)(a.WQu,{}),(0,n.jsx)(a.Y_d,{})]})]}),"text"===o&&(0,n.jsx)(a.IIB,{...h,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:t,placeholder:l,size:"sm"}),"textarea"===o&&(0,n.jsx)(a.gxH,{...h,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:h.value||""}),(0,n.jsx)(a.J1D,{children:x.error})]})]})}},67762:function(e,t,i){i.d(t,{h:function(){return r}});var n=i(24246),a=i(27824);i(27378);let r=e=>{let{isSubmitting:t=!1,onCancelClick:i}=e;return(0,n.jsxs)(a.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(a.zxk,{onClick:i,variant:"outline",children:"Cancel"}),(0,n.jsx)(a.zxk,{bg:"primary.800",color:"white",isDisabled:t,isLoading:t,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})}},50881:function(e,t,i){i.d(t,{Z:function(){return j}});var n=i(24246),a=i(14047),r=i(96356),s=i(14207),l=i(27824),o=i(86677),d=i(27378),c=i(16134),u=i(77830),h=i(34090),x=i(55484),m=i(97181),p=i(57072),f=i(39864),g=i(27259),v=i(67762),y=e=>{let{data:t=[],isSubmitting:i=!1,onSaveClick:r}=e,{isLoading:s}=(0,p.MO)(),d=(0,c.C)(f.qb),y=(0,o.useRouter)(),{errorAlert:j}=(0,a.V)(),b=()=>{y.push(u.JR)};return s?null:(0,n.jsx)(h.J9,{enableReinitialize:!0,initialValues:{fields:t.length>0?t:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,t)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){j("PII Field must be unique");return}r(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:x.Ry({fields:x.IX().of(x.Ry().shape({pii_field:x.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:x.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:x.IX(x.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(h.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(h.F2,{name:"fields",render:t=>{let{fields:a}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(l.xuv,{visibility:"hidden",children:(0,n.jsx)(l.lr0,{})})]}),(0,n.jsx)(l.xuv,{children:a&&a.length>0?a.map((e,i)=>(0,n.jsxs)(l.Ugi,{mt:i>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{autoFocus:0===i,isRequired:!0,name:"fields.".concat(i,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{isRequired:!0,name:"fields.".concat(i,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(m.d,{name:"fields.".concat(i,".data_categories"),options:d.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:i>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>t.remove(i),_hover:{cursor:"pointer"}})})]},i)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{t.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(v.h,{isSubmitting:i,onCancelClick:b})]})}})})})})},j=()=>{let e=(0,d.useRef)(!1),t=(0,o.useRouter)(),{successAlert:i}=(0,a.V)(),{handleError:h}=(0,a.H)(),[x,m]=(0,d.useState)(!1),[p,f]=(0,d.useState)([]),{connection:g}=(0,c.C)(r.ZZ),{data:v,isFetching:j,isLoading:b,isSuccess:_}=(0,s.QV)(g.key),[k]=(0,s.jF)(),[C]=(0,s._d)(),S=async(e,n)=>{try{m(!0);let n={connection_key:null==g?void 0:g.key,body:{...e}};p.length>0?await C(n).unwrap():await k(n).unwrap(),i("DSR customization ".concat(p.length>0?"updated":"added","!")),t.push(u.JR)}catch(e){h(e)}finally{m(!1)}};return(0,d.useEffect)(()=>(e.current=!0,_&&v&&f(v.fields),()=>{e.current=!1}),[v,_]),(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",w:"572px",children:"Customize your PII fields to create a friendly label name for your privacy request packages. This “Package Label” is the label your user will see in their downloaded package."}),(j||b)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),e.current&&!b?(0,n.jsx)(y,{data:p,isSubmitting:x,onSaveClick:S}):null]})}},33335:function(e,t,i){i.d(t,{E:function(){return n}});let n=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5309],{74833:function(e,t,i){var r=i(56127),a=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(a,""):e}},56127:function(e){var t=/\s/;e.exports=function(e){for(var i=e.length;i--&&t.test(e.charAt(i)););return i}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},55193:function(e,t,i){var r=i(99736),a=i(92360);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},91936:function(e,t,i){var r=i(74833),a=i(11611),s=i(55193),l=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return l;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var i=o.test(e);return i||c.test(e)?d(e.slice(2),i?2:8):n.test(e)?l:+e}},58754:function(e,t,i){"use strict";var r=i(24246),a=i(27824),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:n,rightContent:o,style:c,...d}=e;return(0,r.jsxs)("div",{...d,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,r.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(a.lQT,{className:i||n?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,r.jsx)(s.m,{className:n?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),n]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return c}});var r=i(24246),a=i(27824),s=i(79894),l=i.n(s),n=i(27378);let{Text:o}=a.AntTypography,c=e=>{let{items:t,...i}=e,s=(0,n.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,n={...e},c=n.onClick&&!n.href;return("string"==typeof n.title&&(n.title=(0,r.jsx)(o,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:n.title})),c)?n.title=(0,r.jsx)(a.wpx,{type:"text",size:"small",icon:n.icon,onClick:n.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:n.title}):(n.icon&&(n.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:n.icon}),n.title]})),n.href&&n.title&&(n.title=(0,r.jsx)(l(),{href:n.href,className:"ant-breadcrumb-link",children:n.title}),delete n.href)),n}),[t]);return(0,r.jsx)(a.zrq,{items:s,...i})}},14908:function(e,t,i){"use strict";var r=i(86677),a=i(27378);let s=e=>e.startsWith("#")?e.slice(1):e;t.Z=e=>{let{tabKeys:t,initialTab:i}=e,l=(0,r.useRouter)(),n=l.asPath.split("#")[1]||t[0],[o,c]=(0,a.useState)(n);return(0,a.useEffect)(()=>{i&&t.includes(i)&&c(i)},[i,t,l.isReady]),{activeTab:o,onTabChange:(0,a.useCallback)(async e=>{if(!t.includes(e)){await l.replace({pathname:l.pathname,query:l.query,hash:void 0}),c(t[0]);return}l.isReady&&(await l.replace({pathname:l.pathname,query:l.query,hash:s(e)},void 0,{shallow:!0}),c(e))},[l,t])}}},69828:function(e,t,i){"use strict";i.d(t,{Y:function(){return l}});var r=i(24246),a=i(27824),s=i(70788);let l=[(0,r.jsx)(a.PJP.S9g,{},"layers"),(0,r.jsx)(a.PJP.ehp,{},"dataset"),(0,r.jsx)(a.PJP.iA_,{},"table"),(0,r.jsx)(a.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];t.Z=e=>{let{resourceUrn:t,parentLink:i,onPathClick:a=()=>{}}=e,n=[];if(t||n.push({title:"All activity"}),t){n.push({title:"All activity",href:i});let e=t.split(".");e.forEach((t,i)=>{0!==i&&n.push({title:t,icon:l[i-1],onClick:t=>{t.preventDefault(),a(e.slice(0,i+1).join("."))}})})}return(0,r.jsx)(s.m,{"data-testid":"results-breadcrumb",items:n})}},1039:function(e,t,i){"use strict";i.d(t,{Z:function(){return M}});var r,a,s=i(24246),l=i(59003),n=i(92222),o=i(27824),c=i(27378),d=i(47935),u=i(70675),h=i(72625),p=i(54409),m=i(79947),g=i(87667),x=i(50169),f=i(28278),v=i(54682),j=i(74241),L=e=>{let{resourceType:t,changeTypeOverride:i}=e,r=(0,n.Cl)(),a=[];return t?t===v.D$.SCHEMA?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Name",...e}),size:300}),r.accessor(e=>e.urn,{id:"project",cell:e=>(0,s.jsx)(d.G3,{value:(0,j.Z)(e.getValue())}),header:e=>(0,s.jsx)(d.Rr,{value:"Project",...e})}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.system,{id:"system",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"System",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{ignoreChildActions:i===f.E.MONITORED||i===f.E.MUTED,resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.TABLE?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Table name",...e}),size:300}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.FIELD?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Field name",...e}),size:300}),r.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,s.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Data type",...e})}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.ENDPOINT?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Object",...e}),size:300}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:{columns:a}:{columns:a}},y=i(14908);(r=a||(a={})).ACTION_REQUIRED="action-required",r.MONITORED="monitored",r.UNMONITORED="unmonitored";let b={"action-required":{label:"Action Required",key:"action-required",filters:[v.LL.ADDITION,v.LL.REMOVAL],childFilters:[v.LL.ADDITION,v.LL.REMOVAL]},monitored:{label:"Monitored",key:"monitored",filters:[v.LL.MONITORED],childFilters:[],changeTypeOverride:f.E.MONITORED},unmonitored:{label:"Unmonitored",key:"unmonitored",filters:[v.LL.MUTED],childFilters:[],changeTypeOverride:f.E.MUTED}};var R=()=>{var e,t,i;let{activeTab:r,onTabChange:s}=(0,y.Z)({tabKeys:Object.values(a)});return{filterTabs:Object.values(b),activeTabKey:r,onTabChange:s,activeDiffFilters:null===(e=b[r])||void 0===e?void 0:e.filters,activeChildDiffFilters:null===(t=b[r])||void 0===t?void 0:t.childFilters,activeChangeTypeOverride:null===(i=b[r])||void 0===i?void 0:i.changeTypeOverride}},D=i(47182),T=i(38347),w=i(7940),_=i(80285),C=i(36168),O=i(30952);let I={items:[],total:0,page:1,size:50,pages:1},H=()=>(0,s.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,s.jsxs)(o.gCW,{children:[(0,s.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,s.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var M=e=>{let{resourceUrn:t}=e,[i,r]=(0,c.useState)(""),{filterTabs:a,activeTabKey:h,onTabChange:p,activeDiffFilters:m,activeChildDiffFilters:g,activeChangeTypeOverride:x}=R(),{PAGE_SIZES:f,pageSize:j,setPageSize:y,onPreviousPageClick:b,isPreviousPageDisabled:M,onNextPageClick:Z,isNextPageDisabled:k,startRange:E,endRange:N,pageIndex:A,setTotalPages:P,resetPageIndexToDefault:V}=(0,d.oi)();(0,c.useEffect)(()=>{V()},[t,i,V,m,g]);let{isFetching:S,isLoading:F,data:z}=(0,u.z8)({staged_resource_urn:t,page:A,size:j,child_diff_status:g,diff_status:m,search:i}),$=(0,w.G)(null==z?void 0:z.items[0]),{columns:U}=L({resourceType:$,changeTypeOverride:x}),{items:G,total:q,pages:W}=(0,c.useMemo)(()=>null!=z?z:I,[z]);(0,c.useEffect)(()=>{P(W)},[W,P]);let B=(0,c.useMemo)(()=>U,[U]),{navigateToDetectionResults:J}=(0,D.Z)(),K=(0,l.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),getRowId:_.Z,columns:B,manualPagination:!0,data:G,columnResizeMode:"onChange"});return F?(0,s.jsx)(d.I4,{rowHeight:36,numRows:36}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A5g,{items:a.map(e=>({key:e.key,label:e.label})),activeKey:h,onChange:e=>p(e)}),(0,s.jsx)(d.Q$,{children:(0,s.jsx)(o.kCb,{direction:"row",alignItems:"center",justifyContent:"space-between",width:"full",children:(0,s.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,s.jsx)(o.xuv,{flexShrink:0,children:(0,s.jsx)(O.f,{value:i,onChange:r})}),(0,s.jsx)(T.Z,{})]})})}),(0,s.jsx)(d.ZK,{tableInstance:K,onRowClick:e=>J({resourceUrn:e.urn,filterTab:h}),getRowIsClickable:e=>$!==v.D$.FIELD||(0,C.Z)(e),emptyTableNotice:(0,s.jsx)(H,{})}),(0,s.jsx)(d.s8,{totalRows:q||0,pageSizes:f,setPageSize:y,onPreviousPageClick:b,isPreviousPageDisabled:M||S,onNextPageClick:Z,isNextPageDisabled:k||S,startRange:E,endRange:N})]})}},54409:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var r=i(24246),a=i(27824),s=i(812),l=i(14047),n=i(54682),o=i(31883);let c=(0,a.IUT)({displayName:"MonitorOffIcon",viewBox:"0 0 12 12",path:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.47125 1H5.85H6.15H6.51188L6.58875 1.36914L7.52062 5.83268L6.42408 4.98635L6.03375 3.11719L5.8038 4.50761L4.99323 3.882L5.40562 1.38867L5.47125 1ZM4.80795 5.0022L4.67675 5.79545L5.48735 6.42109L5.61854 5.62783L4.80795 5.0022ZM6.73856 6.49227L6.96125 7.55866L8.42407 8.6877L8.69498 8.00228L7.94864 7.42624L7.88625 7.58398L7.83501 7.33853L6.73856 6.49227ZM8.33138 6.45844L9.07755 7.03434L9.30188 6.4668H11.55H12V5.5293H11.55H9H8.69812L8.58375 5.82031L8.33138 6.45844ZM7.27551 9.06443L7.35399 9.125H7.28813L7.27551 9.06443ZM4.49147 6.91566L5.30209 7.54131L4.79437 10.6113L4.72875 11H4.35H4.05H3.69563L3.61313 10.6406L2.64563 6.46875H0.45H0V5.53125H0.45H2.69777L3.49646 6.1477L4.15125 8.97266L4.49147 6.91566Z",fill:"currentColor"}),(0,r.jsx)("g",{clipPath:"url(#clip0_341_3102)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6755 10.4168L0.164222 2.304L0.775218 1.51237L11.2865 9.62517L10.6755 10.4168Z",fill:"currentColor"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_341_3102",children:(0,r.jsx)("rect",{width:"11.5",height:"9",fill:"white",transform:"translate(0 1.5)"})})})]})}),d=(0,a.IUT)({displayName:"MonitorOnIcon",viewBox:"0 0 12 10",path:(0,r.jsx)("path",{d:"M5.47125 0H5.85H6.15H6.51188L6.58875 0.369141L7.88625 6.58398L8.58375 4.82031L8.69812 4.5293H9H11.55H12V5.4668H11.55H9.30188L8.36625 7.83398L8.25188 8.125H7.95H7.65H7.28813L7.21125 7.75586L6.03375 2.11719L4.79437 9.61133L4.72875 10H4.35H4.05H3.69563L3.61313 9.64062L2.64563 5.46875H0.45H0V4.53125H0.45H3H3.35438L3.43688 4.89062L4.15125 7.97266L5.40562 0.388672L5.47125 0Z",fill:"currentColor"})});var u=i(79494),h=i(70675),p=i(7940),m=e=>{let{resource:t,ignoreChildActions:i=!1}=e,m=(0,p.G)(t),[g,{isLoading:x}]=(0,h.v8)(),[f,{isLoading:v}]=(0,h.vi)(),[j,{isLoading:L}]=(0,h.Tl)(),{successAlert:y,errorAlert:b}=(0,l.V)(),R=async()=>{let e=await g({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id});(0,o.D4)(e)?b((0,s.e$)(e.error,"Failed to confirm resource")):y("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(t.name||"The resource"," is now being monitored."))},D=async()=>{let e=await j({staged_resource_urn:t.urn});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to un-mute resource"):y("".concat(t.name||"The resource"," has been un-muted and is now being monitored."))},T=async()=>{let e=await g({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to un-mute resource"):y("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(t.name||"The resource"," is now being monitored."))},w=async()=>{let e=await f({staged_resource_urn:t.urn});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to mute resource"):y("Ignored data will not be monitored for changes or added to Fides datasets.","".concat(t.name||"Resource"," ignored"))},_=x||v||L,{diff_status:C,child_diff_statuses:O}=t,I=m===n.D$.SCHEMA,H=m===n.D$.FIELD,M=O&&(O[n.LL.CLASSIFICATION_ADDITION]||O[n.LL.CLASSIFICATION_UPDATE]),Z=I&&void 0===C||!H&&C===n.LL.ADDITION||M,k=C!==n.LL.MUTED,E=C===n.LL.MUTED&&!H,N=C===n.LL.MUTED&&H,A=O&&(O[n.LL.ADDITION]||O[n.LL.REMOVAL]),P=C===n.LL.MONITORED&&!i&&A&&!M;return(0,r.jsxs)(a.Ugi,{children:[(Z||P)&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:R,disabled:_,loading:x}),N&&(0,r.jsx)(u.Z,{title:"Un-Mute",icon:(0,r.jsx)(d,{}),onClick:D,disabled:_,loading:x}),E&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:T,disabled:_,loading:x}),k&&(0,r.jsx)(u.Z,{title:"Ignore",icon:(0,r.jsx)(c,{}),onClick:w,disabled:_,loading:v})]})}},79947:function(e,t,i){"use strict";var r=i(24246),a=i(27824);t.Z=e=>{let{type:t}=e;return(0,r.jsx)(a.kCb,{align:"center",h:"full",children:!!t&&(0,r.jsx)(a.j8w,{children:t})})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=i(19043)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5574],{77213:function(e,i,t){t.d(i,{Z:function(){return h}});var r=t(24246),n=t(27824),s=t(88038),o=t.n(s),l=t(86677);t(27378);var d=t(25980),a=t(90867),c=t(77830),x=()=>{let e=(0,l.useRouter)();return(0,r.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(n.xuv,{children:[(0,r.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(n.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,r.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:i,title:t,padded:s=!0,mainProps:c}=e,h=(0,d.hz)(),u=(0,l.useRouter)(),p="/privacy-requests"===u.pathname||"/datastore-connection"===u.pathname,m=!(h.flags.privacyRequestsConfiguration&&p),{data:g}=(0,a.JE)(void 0,{skip:m}),{data:j}=(0,a.PW)(void 0,{skip:m}),f=h.flags.privacyRequestsConfiguration&&(!g||!j)&&p;return(0,r.jsxs)(n.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,r.jsxs)(o(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(n.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[f?(0,r.jsx)(x,{}):null,i]})]})}},58754:function(e,i,t){var r=t(24246),n=t(27824),s=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:o=!0,children:l,rightContent:d,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 i?(0,r.jsx)(n.lQT,{className:t||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,d&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:d})]}),!!t&&(0,r.jsx)(s.m,{className:l?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),l]})}},84306:function(e,i,t){t.d(i,{V:function(){return s}});var r=t(24246),n=t(27824);let s=()=>{let e=(0,n.pmc)();return{errorAlert:(i,t,s)=>{let o={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[t&&(0,r.jsx)(n.CdC,{children:t}),(0,r.jsx)(n.XaZ,{children:i})]}),(0,r.jsx)(n.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,o):e(o)},successAlert:(i,t,s)=>{let o={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[t&&(0,r.jsx)(n.CdC,{children:t}),(0,r.jsx)(n.XaZ,{children:i})]}),(0,r.jsx)(n.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,o):e(o)}}}},70788:function(e,i,t){t.d(i,{m:function(){return a}});var r=t(24246),n=t(27824),s=t(79894),o=t.n(s),l=t(27378);let{Text:d}=n.AntTypography,a=e=>{let{items:i,...t}=e,s=(0,l.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let s=t===i.length-1,l={...e},a=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,r.jsx)(d,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:l.title})),a)?l.title=(0,r.jsx)(n.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,r.jsx)(o(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[i]);return(0,r.jsx)(n.zrq,{items:s,...t})}},39715:function(e,i,t){var r=t(24246),n=t(27824);t(27378),i.Z=e=>{let{isEmptyState:i,yamlError:t}=e;return(0,r.jsx)(n.Rg9,{in:!0,children:(0,r.jsxs)(n.xuv,{w:"fit-content",bg:"white",p:3,borderRadius:3,children:[(0,r.jsxs)(n.Ugi,{children:[(0,r.jsx)(n.X6q,{as:"h5",color:"gray.700",size:"xs",children:"YAML"}),(0,r.jsx)(n.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,r.jsx)(n.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,r.jsxs)(n.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,r.jsx)(n.f9v,{}),i&&(0,r.jsxs)(n.xuv,{children:[(0,r.jsx)(n.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,r.jsx)(n.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:"Yaml system is required"})]}),t&&(0,r.jsxs)(n.xuv,{children:[(0,r.jsx)(n.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,r.jsx)(n.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:t.message}),(0,r.jsx)(n.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:t.reason}),(0,r.jsxs)(n.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:["Ln ",(0,r.jsx)("b",{children:t.mark.line}),", Col"," ",(0,r.jsx)("b",{children:t.mark.column}),", Pos"," ",(0,r.jsx)("b",{children:t.mark.position})]})]})]})})]})})}},41207:function(e,i,t){t.d(i,{F:function(){return o},M:function(){return s}});var r=t(76649),n=t(65218);let s=t.n(n)()(()=>t.e(7088).then(t.bind(t,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),o=e=>(0,r.Ln)({name:"string"},e)&&"YAMLException"===e.name}}]);