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([[2096],{78859:function(e,t,o){var a=o(71928),n=o(76747),l=o(42383),i=o(11611),s=o(37948);e.exports=function(e,t,o,r){if(!i(e))return e;t=n(t,e);for(var d=-1,c=t.length,u=c-1,f=e;null!=f&&++d<c;){var m=s(t[d]),h=o;if("__proto__"===m||"constructor"===m||"prototype"===m)break;if(d!=u){var p=f[m];void 0===(h=r?r(p,m,f):void 0)&&(h=i(p)?p:l(t[d+1])?[]:{})}a(f,m,h),f=f[m]}return e}},80396:function(e,t,o){var a=o(79867),n=o(78859);e.exports=function(e,t,o,l){return n(e,t,o(a(e,t)),l)}},62079:function(e,t,o){var a=o(31137);e.exports=function(e){return"function"==typeof e?e:a}},30454:function(e,t,o){var a=o(40699);e.exports=function(e){return a(e,5)}},47215:function(e,t,o){var a=o(78859);e.exports=function(e,t,o){return null==e?e:a(e,t,o)}},90271:function(e,t,o){var a=o(80396),n=o(62079);e.exports=function(e,t,o){return null==e?e:a(e,t,n(o))}},16383:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset/[datasetId]/[collectionName]/[...subfieldNames]",function(){return o(26052)}])},12627:function(e,t,o){"use strict";var a=o(24246),n=o(79283),l=o(34929);t.Z=e=>{let{selectedTaxonomies:t,showDisabled:o=!1,...i}=e,{getDataCategoryDisplayNameProps:s,getDataCategories:r}=(0,l.Z)(),d=(o?r():r().filter(e=>e.active)).filter(e=>!t.includes(e.fides_key)).map(e=>{let{name:t,primaryName:o}=s(e.fides_key);return{value:e.fides_key,name:t,primaryName:o,description:e.description||""}});return(0,a.jsx)(n.l,{options:d,...i})}},66112:function(e,t,o){"use strict";var a=o(24246),n=o(27824),l=o(27378),i=o(12627),s=o(34929),r=o(26183);t.Z=e=>{let{selectedTaxonomies:t,onAddTaxonomy:o,onRemoveTaxonomy:d}=e,[c,u]=(0,l.useState)(!1),{getDataCategoryDisplayName:f}=(0,s.Z)();return(0,a.jsxs)(r.Z,{children:[t.map(e=>(0,a.jsx)(n.j8w,{"data-testid":"classification-".concat(e),color:"white",closable:!0,onClose:()=>d(e),closeButtonLabel:"Remove category",children:f(e)},e)),(0,a.jsx)(n.j8w,{onClick:()=>u(!0),"data-testid":"add-category-btn",addable:!0,"aria-label":"Add category"}),c&&(0,a.jsx)(n.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,a.jsx)(i.Z,{selectedTaxonomies:t,onChange:e=>{u(!1),o(e)},onBlur:()=>u(!1),open:c})})]})}},76252:function(e,t,o){"use strict";var a=o(24246),n=o(27824),l=o(30454),i=o.n(l),s=o(47215),r=o.n(s),d=o(90271),c=o.n(d),u=o(79806),f=o(20386),m=o(63927),h=o(69435);t.Z=e=>{let{field:t,isOpen:o,onClose:l,dataset:s,collectionName:d,subfields:p}=e,[v]=(0,f.TG)(),{isOpen:x,onOpen:g,onClose:b}=(0,n.qY0)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.ZP,{isOpen:o,onClose:l,description:"Fields are an array of objects that describe the collection's fields. Provide additional context to this field by filling out the fields below.",header:(0,a.jsx)(u.zR,{title:"Field Name: ".concat(null==t?void 0:t.name)}),footer:(0,a.jsx)(u.Gn,{onClose:l,onDelete:g,formId:m.e}),children:(0,a.jsx)(m.Z,{values:t,onSubmit:e=>{let o=(0,h.Fk)({dataset:s,collectionName:d,subfields:p?[...p,(null==t?void 0:t.name)||""]:[(null==t?void 0:t.name)||""]}),a={...t,...e},n=i()(s);r()(n,o,a),v(n),l()},dataType:"field"})}),(0,a.jsx)(n.cVQ,{isOpen:x,onClose:b,onConfirm:()=>{let e=(0,h.Fk)({dataset:s,collectionName:d,subfields:p}),o=i()(s);c()(o,e,e=>({...e,fields:e.fields.filter(e=>e.name!==(null==t?void 0:t.name))})),v(o),l(),b()},title:"Delete Field",message:(0,a.jsxs)(n.xvT,{children:["You are about to permanently delete the field named"," ",(0,a.jsx)(n.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name})," ","from this dataset. Are you sure you would like to continue?"]})})]})}},26052:function(e,t,o){"use strict";o.r(t);var a=o(24246),n=o(92222),l=o(59003),i=o(27824),s=o(30454),r=o.n(s),d=o(47215),c=o.n(d),u=o(86677),f=o(27378),m=o(77213),h=o(77830),p=o(58754),v=o(47935),x=o(66112),g=o(69828),b=o(41966),j=o(76252),C=o(69435);let w=(0,n.Cl)(),y=()=>(0,a.jsx)(i.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,a.jsx)(i.gCW,{children:(0,a.jsx)(i.xvT,{fontSize:"md",fontWeight:"600",children:"No fields found."})})});t.default=()=>{let e=(0,u.useRouter)(),[t]=(0,b.TG)(),o=decodeURIComponent(e.query.datasetId),s=decodeURIComponent(e.query.collectionName),d=e.query.subfieldNames.map(decodeURIComponent),{isLoading:_,data:R}=(0,b.oM)(o),k=(0,f.useMemo)(()=>(null==R?void 0:R.collections)||[],[R]).find(e=>e.name===s),N=(0,f.useMemo)(()=>(null==k?void 0:k.fields)||[],[k]),T=(0,f.useMemo)(()=>{let e=N;return d.forEach(t=>{let o=e.find(e=>e.name===t);e=(null==o?void 0:o.fields)||[]}),e},[N,d]),[Z,F]=(0,f.useState)(),I=(0,f.useCallback)(e=>{let{dataCategory:o,field:a}=e,n=a.data_categories||[],l=(0,C.Fk)({dataset:R,collectionName:s,subfields:[...d,a.name]}),i=r()(R);c()(i,"".concat(l,".data_categories"),[...n,o]),t(i)},[R,t,s,d]),M=(0,f.useCallback)(e=>{let{dataCategory:o,field:a}=e,n=a.data_categories||[],l=(0,C.Fk)({dataset:R,collectionName:s,subfields:[...d,null==a?void 0:a.name]}),i=r()(R);c()(i,"".concat(l,".data_categories"),n.filter(e=>e!==o)),t(i)},[R,t,s,d]),z=(0,f.useCallback)(t=>{let a=[...d.map(encodeURIComponent),t.name];e.push({pathname:h.y1,query:{datasetId:o,collectionName:s,subfieldNames:a}})},[o,e,s,d]),S=(0,f.useMemo)(()=>[w.accessor(e=>e.name,{id:"name",cell:e=>{var t;let o=e.row.original.fields&&(null===(t=e.row.original.fields)||void 0===t?void 0:t.length)>0;return(0,a.jsx)(v.G3,{fontWeight:o?"semibold":"normal",value:e.getValue()})},header:e=>(0,a.jsx)(v.Rr,{value:"Field Name",...e}),size:180}),w.accessor(e=>{var t;return null===(t=e.fides_meta)||void 0===t?void 0:t.data_type},{id:"type",cell:e=>e.getValue()?(0,a.jsx)(v.A4,{value:e.getValue()}):(0,a.jsx)(v.G3,{value:void 0}),header:e=>(0,a.jsx)(v.Rr,{value:"Type",...e}),size:80}),w.accessor(e=>e.description,{id:"description",cell:e=>(0,a.jsx)(v.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,a.jsx)(v.Rr,{value:"Description",...e}),size:300,meta:{showHeaderMenu:!0}}),w.accessor(e=>e.data_categories,{id:"data_categories",cell:e=>{var t;let o=e.row.original;return!(e.row.original.fields&&(null===(t=e.row.original.fields)||void 0===t?void 0:t.length)>0)&&(0,a.jsx)(x.Z,{selectedTaxonomies:e.getValue()||[],onAddTaxonomy:e=>I({dataCategory:e,field:o}),onRemoveTaxonomy:e=>M({dataCategory:e,field:o})})},header:e=>(0,a.jsx)(v.Rr,{value:"Data categories",...e}),size:300,meta:{disableRowClick:!0}}),w.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e,o=t.original;return(0,a.jsx)(i.Ugi,{spacing:0,"data-testid":"field-".concat(o.name),children:(0,a.jsx)(i.wpx,{size:"small",icon:(0,a.jsx)(i.dY8,{}),onClick:()=>{D(o),A(!0)},children:"Edit"})})},meta:{disableRowClick:!0}})],[I,M]),q=(0,f.useMemo)(()=>Z?T.filter(e=>e.name.toLowerCase().includes(Z.toLowerCase())):T,[T,Z]),E=(0,l.b7)({getCoreRowModel:(0,n.sC)(),getFilteredRowModel:(0,n.vL)(),getSortedRowModel:(0,n.tj)(),columns:S,data:q,columnResizeMode:"onChange"}),[O,A]=(0,f.useState)(!1),[G,D]=(0,f.useState)(),U=(0,f.useMemo)(()=>{let e=[{title:"All datasets",href:h.$m},{title:o,href:{pathname:h.o5,query:{datasetId:o}},icon:g.Y[1]},{title:s,icon:g.Y[2],href:{pathname:h.RF,query:{datasetId:o,collectionName:s}}}];return d.forEach((t,a)=>{e.push({title:t,href:a<d.length-1?{pathname:h.y1,query:{datasetId:o,collectionName:s,subfieldNames:d.slice(0,a+1).map(encodeURIComponent)}}:void 0,icon:g.Y[3]})}),e},[o,s,d]);return(0,a.jsxs)(m.Z,{title:"Dataset - ".concat(o),children:[(0,a.jsx)(p.Z,{heading:"Datasets",breadcrumbItems:U}),_?(0,a.jsx)(v.I4,{rowHeight:36,numRows:15}):(0,a.jsxs)(i.xuv,{"data-testid":"fields-table",children:[(0,a.jsx)(v.Q$,{children:(0,a.jsx)(v.HO,{globalFilter:Z,setGlobalFilter:F,placeholder:"Search",testid:"fields-search"})}),(0,a.jsx)(v.ZK,{tableInstance:E,emptyTableNotice:(0,a.jsx)(y,{}),onRowClick:z,getRowIsClickable:e=>{var t;return!!(e.fields&&(null===(t=e.fields)||void 0===t?void 0:t.length)>0)}}),(0,a.jsx)(j.Z,{isOpen:O,onClose:()=>{A(!1),D(void 0)},field:G,dataset:R,collectionName:s,subfields:d})]})]})}}},function(e){e.O(0,[8765,9278,5163,699,409,9226,2888,9774,179],function(){return e(e.s=16383)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6556],{78859:function(e,t,o){var n=o(71928),i=o(76747),l=o(42383),a=o(11611),s=o(37948);e.exports=function(e,t,o,r){if(!a(e))return e;t=i(t,e);for(var d=-1,c=t.length,u=c-1,f=e;null!=f&&++d<c;){var m=s(t[d]),x=o;if("__proto__"===m||"constructor"===m||"prototype"===m)break;if(d!=u){var v=f[m];void 0===(x=r?r(v,m,f):void 0)&&(x=a(v)?v:l(t[d+1])?[]:{})}n(f,m,x),f=f[m]}return e}},80396:function(e,t,o){var n=o(79867),i=o(78859);e.exports=function(e,t,o,l){return i(e,t,o(n(e,t)),l)}},62079:function(e,t,o){var n=o(31137);e.exports=function(e){return"function"==typeof e?e:n}},30454:function(e,t,o){var n=o(40699);e.exports=function(e){return n(e,5)}},47215:function(e,t,o){var n=o(78859);e.exports=function(e,t,o){return null==e?e:n(e,t,o)}},90271:function(e,t,o){var n=o(80396),i=o(62079);e.exports=function(e,t,o){return null==e?e:n(e,t,i(o))}},59972:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset/[datasetId]/[collectionName]",function(){return o(47355)}])},12627:function(e,t,o){"use strict";var n=o(24246),i=o(79283),l=o(34929);t.Z=e=>{let{selectedTaxonomies:t,showDisabled:o=!1,...a}=e,{getDataCategoryDisplayNameProps:s,getDataCategories:r}=(0,l.Z)(),d=(o?r():r().filter(e=>e.active)).filter(e=>!t.includes(e.fides_key)).map(e=>{let{name:t,primaryName:o}=s(e.fides_key);return{value:e.fides_key,name:t,primaryName:o,description:e.description||""}});return(0,n.jsx)(i.l,{options:d,...a})}},66112:function(e,t,o){"use strict";var n=o(24246),i=o(27824),l=o(27378),a=o(12627),s=o(34929),r=o(26183);t.Z=e=>{let{selectedTaxonomies:t,onAddTaxonomy:o,onRemoveTaxonomy:d}=e,[c,u]=(0,l.useState)(!1),{getDataCategoryDisplayName:f}=(0,s.Z)();return(0,n.jsxs)(r.Z,{children:[t.map(e=>(0,n.jsx)(i.j8w,{"data-testid":"classification-".concat(e),color:"white",closable:!0,onClose:()=>d(e),closeButtonLabel:"Remove category",children:f(e)},e)),(0,n.jsx)(i.j8w,{onClick:()=>u(!0),"data-testid":"add-category-btn",addable:!0,"aria-label":"Add category"}),c&&(0,n.jsx)(i.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,n.jsx)(a.Z,{selectedTaxonomies:t,onChange:e=>{u(!1),o(e)},onBlur:()=>u(!1),open:c})})]})}},76252:function(e,t,o){"use strict";var n=o(24246),i=o(27824),l=o(30454),a=o.n(l),s=o(47215),r=o.n(s),d=o(90271),c=o.n(d),u=o(79806),f=o(20386),m=o(63927),x=o(69435);t.Z=e=>{let{field:t,isOpen:o,onClose:l,dataset:s,collectionName:d,subfields:v}=e,[p]=(0,f.TG)(),{isOpen:h,onOpen:g,onClose:j}=(0,i.qY0)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.ZP,{isOpen:o,onClose:l,description:"Fields are an array of objects that describe the collection's fields. Provide additional context to this field by filling out the fields below.",header:(0,n.jsx)(u.zR,{title:"Field Name: ".concat(null==t?void 0:t.name)}),footer:(0,n.jsx)(u.Gn,{onClose:l,onDelete:g,formId:m.e}),children:(0,n.jsx)(m.Z,{values:t,onSubmit:e=>{let o=(0,x.Fk)({dataset:s,collectionName:d,subfields:v?[...v,(null==t?void 0:t.name)||""]:[(null==t?void 0:t.name)||""]}),n={...t,...e},i=a()(s);r()(i,o,n),p(i),l()},dataType:"field"})}),(0,n.jsx)(i.cVQ,{isOpen:h,onClose:j,onConfirm:()=>{let e=(0,x.Fk)({dataset:s,collectionName:d,subfields:v}),o=a()(s);c()(o,e,e=>({...e,fields:e.fields.filter(e=>e.name!==(null==t?void 0:t.name))})),p(o),l(),j()},title:"Delete Field",message:(0,n.jsxs)(i.xvT,{children:["You are about to permanently delete the field named"," ",(0,n.jsx)(i.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name})," ","from this dataset. Are you sure you would like to continue?"]})})]})}},47355:function(e,t,o){"use strict";o.r(t);var n=o(24246),i=o(92222),l=o(59003),a=o(27824),s=o(86677),r=o(27378),d=o(77213),c=o(77830),u=o(58754),f=o(47935),m=o(66112),x=o(69828),v=o(41966),p=o(76252),h=o(69435);let g=(0,i.Cl)(),j=()=>(0,n.jsx)(a.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,n.jsx)(a.gCW,{children:(0,n.jsx)(a.xvT,{fontSize:"md",fontWeight:"600",children:"No fields found."})})});t.default=()=>{let e=(0,s.useRouter)(),[t]=(0,v.TG)(),o=decodeURIComponent(e.query.datasetId),b=decodeURIComponent(e.query.collectionName),{isLoading:C,data:w}=(0,v.oM)(o),_=(0,r.useMemo)(()=>(null==w?void 0:w.collections)||[],[w]),y=_.find(e=>e.name===b),R=(0,r.useMemo)(()=>(null==y?void 0:y.fields)||[],[y]),[k,N]=(0,r.useState)(),I=(0,r.useCallback)(e=>{let{dataCategory:o,field:n}=e,i=n.data_categories||[],l={...n,data_categories:[...i,o]},a=_.indexOf(y),s=y.fields.indexOf(n);t((0,h._n)(w,l,a,s))},[y,_,w,t]),T=(0,r.useCallback)(e=>{var o;let{dataCategory:n,field:i}=e,l={...i,data_categories:null===(o=i.data_categories)||void 0===o?void 0:o.filter(e=>e!==n)},a=_.indexOf(y),s=y.fields.indexOf(i);t((0,h._n)(w,l,a,s))},[y,_,w,t]),Z=(0,r.useCallback)(t=>{e.push({pathname:c.y1,query:{datasetId:encodeURIComponent(o),collectionName:encodeURIComponent(b),subfieldNames:encodeURIComponent(t.name)}})},[o,e,b]),O=(0,r.useMemo)(()=>[g.accessor(e=>e.name,{id:"name",cell:e=>{var t;let o=e.row.original.fields&&(null===(t=e.row.original.fields)||void 0===t?void 0:t.length)>0;return(0,n.jsx)(f.G3,{fontWeight:o?"semibold":"normal",value:e.getValue()})},header:e=>(0,n.jsx)(f.Rr,{value:"Field Name",...e}),size:180}),g.accessor(e=>{var t;return null===(t=e.fides_meta)||void 0===t?void 0:t.data_type},{id:"type",cell:e=>e.getValue()?(0,n.jsx)(f.A4,{value:e.getValue()}):(0,n.jsx)(f.G3,{value:void 0}),header:e=>(0,n.jsx)(f.Rr,{value:"Type",...e}),size:80}),g.accessor(e=>e.description,{id:"description",cell:e=>(0,n.jsx)(f.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,n.jsx)(f.Rr,{value:"Description",...e}),size:300,meta:{showHeaderMenu:!0}}),g.accessor(e=>e.data_categories,{id:"data_categories",cell:e=>{var t;let o=e.row.original;return!(e.row.original.fields&&(null===(t=e.row.original.fields)||void 0===t?void 0:t.length)>0)&&(0,n.jsx)(m.Z,{selectedTaxonomies:e.getValue()||[],onAddTaxonomy:e=>I({dataCategory:e,field:o}),onRemoveTaxonomy:e=>T({dataCategory:e,field:o})})},header:e=>(0,n.jsx)(f.Rr,{value:"Data categories",...e}),size:300,meta:{disableRowClick:!0}}),g.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e,o=t.original;return(0,n.jsx)(a.Ugi,{spacing:0,"data-testid":"field-".concat(o.name),children:(0,n.jsx)(a.wpx,{size:"small",icon:(0,n.jsx)(a.dY8,{}),onClick:()=>{G(o),S(!0)},children:"Edit"})})},meta:{disableRowClick:!0}})],[I,T]),M=(0,r.useMemo)(()=>k?R.filter(e=>e.name.toLowerCase().includes(k.toLowerCase())):R,[R,k]),F=(0,l.b7)({getCoreRowModel:(0,i.sC)(),getFilteredRowModel:(0,i.vL)(),getSortedRowModel:(0,i.tj)(),columns:O,data:M,columnResizeMode:"onChange"}),[z,S]=(0,r.useState)(!1),[A,G]=(0,r.useState)(),D=(0,r.useMemo)(()=>[{title:"All datasets",href:c.$m},{title:o,href:{pathname:c.o5,query:{datasetId:o}},icon:x.Y[1]},{title:b,icon:x.Y[2]}],[o,b]);return(0,n.jsxs)(d.Z,{title:"Dataset - ".concat(o),children:[(0,n.jsx)(u.Z,{heading:"Datasets",breadcrumbItems:D}),C?(0,n.jsx)(f.I4,{rowHeight:36,numRows:15}):(0,n.jsxs)(a.xuv,{"data-testid":"fields-table",children:[(0,n.jsx)(f.Q$,{children:(0,n.jsx)(f.HO,{globalFilter:k,setGlobalFilter:N,placeholder:"Search",testid:"fields-search"})}),(0,n.jsx)(f.ZK,{tableInstance:F,emptyTableNotice:(0,n.jsx)(j,{}),onRowClick:Z,getRowIsClickable:e=>{var t;return!!(e.fields&&(null===(t=e.fields)||void 0===t?void 0:t.length)>0)}}),(0,n.jsx)(p.Z,{isOpen:z,onClose:()=>{S(!1),G(void 0)},field:A,dataset:w,collectionName:b})]})]})}}},function(e){e.O(0,[8765,9278,5163,699,409,9226,2888,9774,179],function(){return e(e.s=59972)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9340],{33187:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset/[datasetId]",function(){return i(1016)}])},58754:function(e,t,i){"use strict";var n=i(24246),o=i(27824),l=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:s=!0,children:a,rightContent:c,style:r,...d}=e;return(0,n.jsxs)("div",{...d,style:s?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...r}:{paddingBottom:"24px",...r},children:[(0,n.jsxs)(o.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(o.lQT,{className:i||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,c&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:c})]}),!!i&&(0,n.jsx)(l.m,{className:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return r}});var n=i(24246),o=i(27824),l=i(79894),s=i.n(l),a=i(27378);let{Text:c}=o.AntTypography,r=e=>{let{items:t,...i}=e,l=(0,a.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let l=i===t.length-1,a={...e},r=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,n.jsx)(c,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:a.title})),r)?a.title=(0,n.jsx)(o.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,n.jsx)(s(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,n.jsx)(o.zrq,{items:l,...i})}},1016:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return w}});var n=i(24246),o=i(92222),l=i(59003),s=i(27824),a=i(86677),c=i(27378),r=i(77213),d=i(77830),u=i(58754),m=i(47935),h=i(69828),p=i(41966),x=i(46628),g=i(79806),f=i(20386),j=i(63927),b=i(69435),C=e=>{let{dataset:t,collection:i,isOpen:o,onClose:l}=e,a=(0,c.useMemo)(()=>null==t?void 0:t.collections.indexOf(i),[]),[r]=(0,f.TG)(),d=(0,s.pmc)(),{isOpen:u,onOpen:m,onClose:h}=(0,s.qY0)(),p=async e=>{let n={...i,...e},o=(0,b.jC)(t,n,a);try{await r(o),d((0,x.t5)("Successfully modified collection"))}catch(e){d((0,x.Vo)(e))}l()},C=async()=>{if(t&&void 0!==a){let e=(0,b.qe)(t,a);try{await r(e),d((0,x.t5)("Successfully deleted collection"))}catch(e){d((0,x.Vo)(e))}l(),h()}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.ZP,{isOpen:o,onClose:l,description:"Collections are an array of objects that describe the Dataset's collections. Provide additional context to this collection by filling out the fields below.",header:(0,n.jsx)(g.zR,{title:"Collection Name: ".concat(null==i?void 0:i.name)}),footer:(0,n.jsx)(g.Gn,{onClose:l,onDelete:m,formId:j.e}),children:(0,n.jsx)(j.Z,{values:i,onSubmit:p,dataType:"collection",showDataCategories:!1})}),(0,n.jsx)(s.cVQ,{isOpen:u,onClose:h,onConfirm:C,title:"Delete Collection",message:(0,n.jsxs)(s.xvT,{children:["You are about to permanently delete the collection named"," ",(0,n.jsx)(s.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==i?void 0:i.name})," ","from this dataset. Are you sure you would like to continue?"]})})]})};let v=(0,o.Cl)(),y=()=>(0,n.jsx)(s.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,n.jsx)(s.gCW,{children:(0,n.jsx)(s.xvT,{fontSize:"md",fontWeight:"600",children:"No collections found."})})});var w=()=>{let e=(0,a.useRouter)(),t=decodeURIComponent(e.query.datasetId),{isLoading:i,data:x}=(0,p.oM)(t),g=(0,c.useMemo)(()=>(null==x?void 0:x.collections)||[],[x]),[f,j]=(0,c.useState)(!1),[b,w]=(0,c.useState)(),[R,k]=(0,c.useState)(),N=(0,c.useMemo)(()=>[v.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(m.G3,{value:e.getValue(),fontWeight:"semibold"}),header:e=>(0,n.jsx)(m.Rr,{value:"Collection Name",...e}),size:180}),v.accessor(e=>e.description,{id:"description",cell:e=>(0,n.jsx)(m.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,n.jsx)(m.Rr,{value:"Description",...e}),size:300,meta:{showHeaderMenu:!0}}),v.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e,i=t.original;return(0,n.jsx)(s.Ugi,{spacing:0,"data-testid":"collection-".concat(i.name),children:(0,n.jsx)(s.wpx,{size:"small",icon:(0,n.jsx)(s.dY8,{}),onClick:()=>{w(i),j(!0)},children:"Edit"})})},meta:{disableRowClick:!0}})],[]),I=(0,c.useMemo)(()=>R?g.filter(e=>e.name.toLowerCase().includes(R.toLowerCase())):g,[g,R]),M=(0,l.b7)({getCoreRowModel:(0,o.sC)(),getFilteredRowModel:(0,o.vL)(),getSortedRowModel:(0,o.tj)(),columns:N,data:I,columnResizeMode:"onChange"}),T=(0,c.useMemo)(()=>[{title:"All datasets",href:d.$m},{title:t,icon:h.Y[1]}],[t]);return(0,n.jsxs)(r.Z,{title:"Dataset - ".concat(t),children:[(0,n.jsx)(u.Z,{heading:"Datasets",breadcrumbItems:T}),i?(0,n.jsx)(m.I4,{rowHeight:36,numRows:15}):(0,n.jsxs)(s.xuv,{"data-testid":"collections-table",children:[(0,n.jsx)(m.Q$,{children:(0,n.jsx)(m.HO,{globalFilter:R,setGlobalFilter:k,placeholder:"Search",testid:"collections-search"})}),(0,n.jsx)(m.ZK,{tableInstance:M,emptyTableNotice:(0,n.jsx)(y,{}),onRowClick:i=>{e.push({pathname:d.RF,query:{datasetId:encodeURIComponent(t),collectionName:encodeURIComponent(i.name)}})}})]}),x&&b&&(0,n.jsx)(C,{dataset:x,collection:b,isOpen:f,onClose:()=>j(!1)})]})}}},function(e){e.O(0,[9729,9226,2888,9774,179],function(){return e(e.s=33187)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8538],{73846:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset/new",function(){return a(17294)}])},14047:function(e,t,a){"use strict";a.d(t,{H:function(){return n},V:function(){return r.V}});var r=a(84306),s=a(812);let n=()=>{let{errorAlert:e}=(0,r.V)();return{handleError:t=>{let a="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?a=t.data.detail:(0,s.tB)(t)&&(a=t.data.detail[0].msg),e(a)}}}},17294:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return T}});var r=a(24246),s=a(27824),n=a(27378),l=a(77213),i=a(77830),o=a(58754),u=a(34090),d=a(86677),c=a(16125),f=a(55484),h=a(25980),y=a(40324),p=a(812),m=a(58452),g=a(46628),_=a(83265),b=a(32885),x=a(54682),j=a(20386);let v=e=>!("system_type"in e),w={url:"",classify:!1,classifyConfirmed:!1},C=f.Ry().shape({url:f.Z_().required().label("Database URL"),classify:f.O7(),classifyConfirmed:f.O7().when(["url","classify"],{is:(e,t)=>e&&t,then:()=>f.O7().equals([!0])})});var k=()=>{let[e,{isLoading:t}]=(0,j.pR)(),[a,{isLoading:n}]=(0,j.IR)(),[l,{isLoading:o}]=(0,b.Du)(),f=t||n||o,k=(0,s.pmc)(),O=(0,d.useRouter)(),D=(0,h.hz)(),A=(0,c.I0)(),E=async t=>{var a;let r=await e({organization_key:_.Av,generate:{config:{connection_string:t.url},target:x.GC.DB,type:x.j.DATASETS}});if((0,p.D4)(r))return{error:(0,p.e$)(r.error)};let s=(null!==(a=r.data.generate_results)&&void 0!==a?a:[]).filter(v);return s&&s.length>0?{datasets:s}:{error:"Unable to generate a dataset with this connection."}},S=async e=>{let t=await a(e);return(0,p.D4)(t)?{error:(0,p.e$)(t.error)}:{dataset:t.data}},T=async e=>{let{values:t,datasets:a}=e,r=await l({dataset_schemas:a.map(e=>{let{name:t,fides_key:a}=e;return{fides_key:a,name:t}}),schema_config:{organization_key:_.Av,generate:{config:{connection_string:t.url},target:x.GC.DB,type:x.j.DATASETS}}});return(0,p.D4)(r)?{error:(0,p.e$)(r.error)}:{classifyInstances:r.data.classify_instances}},P=async e=>{var t;let a=await E(e);if("error"in a){k((0,g.Vo)(a.error));return}let r=await Promise.all(a.datasets.map(e=>S(e))),s=null!==(t=r.find(e=>"error"in e))&&void 0!==t?t:r[0];if("error"in s){k((0,g.Vo)(s.error));return}if(!e.classify){k((0,g.t5)("Generated ".concat(s.dataset.name," dataset"))),O.push({pathname:i.o5,query:{datasetId:s.dataset.fides_key}});return}let n=await T({values:e,datasets:a.datasets});if("error"in n){k((0,g.Vo)(n.error));return}k((0,g.t5)("Generate and classify are now in progress")),A((0,j.Zl)(s.dataset.fides_key)),O.push("/dataset")};return(0,r.jsx)(u.J9,{initialValues:{...w,classify:D.plus},validationSchema:C,onSubmit:P,validateOnChange:!1,validateOnBlur:!1,children:e=>{let{isSubmitting:t,errors:a,values:n,submitForm:l,resetForm:i,setFieldValue:o}=e;return(0,r.jsxs)(u.l0,{children:[(0,r.jsxs)(s.gCW,{spacing:8,align:"left",children:[(0,r.jsx)(s.xvT,{size:"sm",color:"gray.700",children:"Connect to a database using the connection URL. You may have received this URL from a colleague or your Ethyca developer support engineer."}),(0,r.jsx)(s.xuv,{children:(0,r.jsx)(y.j0,{name:"url",label:"Database URL"})}),D.plus?(0,r.jsx)(y.w8,{name:"classify",label:"Classify dataset",tooltip:"Use Fides Classify to suggest labels based on your data."}):null,(0,r.jsx)(s.xuv,{children:(0,r.jsx)(s.wpx,{type:"primary",htmlType:"submit",loading:t||f,disabled:t||f,"data-testid":"create-dataset-btn",children:"Generate dataset"})})]}),(0,r.jsx)(m.Z,{title:"Generate and classify this dataset",message:"You have chosen to generate and classify this dataset. This process may take several minutes. In the meantime you can continue using Fides. You will receive a notification when the process is complete.",isOpen:void 0!==a.classifyConfirmed,onClose:()=>{i({values:{...n,classifyConfirmed:!1}})},onConfirm:()=>{o("classifyConfirmed",!0),setTimeout(()=>{l()},0)}})]})}})},O=a(66527),D=a(14047),A=a(41207),E=a(39715),S=()=>{let[e]=(0,j.IR)(),[t,a]=(0,n.useState)(!0),[l,o]=(0,n.useState)(!1),[u,c]=(0,n.useState)(!1),f=(0,n.useRef)(null),h=(0,d.useRouter)(),y=(0,s.pmc)(),{errorAlert:m}=(0,D.V)(),[_,b]=(0,n.useState)(void 0),x=e=>{O.ZP.load(e,{json:!0}),b(void 0)},v=async t=>{let a;return"object"==typeof t&&null!=t&&"dataset"in t&&Array.isArray(t.dataset)?[a]=t.dataset:Array.isArray(t)?[a]=t:a=t,e(a)},w=e=>{y((0,g.t5)("Successfully loaded new dataset YAML")),(0,j.Zl)(e.fides_key),h.push({pathname:i.o5,query:{datasetId:e.fides_key}})},C=async()=>{o(!0);let e=f.current.getValue(),t=O.ZP.load(e,{json:!0}),a=await v(t);(0,p.D4)(a)?y((0,g.Vo)((0,p.e$)(a.error))):"data"in a&&w(a.data),o(!1)};return(0,r.jsxs)(s.kCb,{gap:"97px",children:[(0,r.jsxs)(s.xuv,{w:"75%",children:[(0,r.jsx)(s.xuv,{color:"gray.700",fontSize:"14px",mb:4,children:"Get started creating your first dataset by pasting your dataset yaml below! You may have received this yaml from a colleague or your Ethyca developer support engineer."}),(0,r.jsxs)(s.gCW,{align:"stretch",children:[(0,r.jsx)(s.izJ,{color:"gray.100"}),(0,r.jsx)(A.M,{defaultLanguage:"yaml",height:"calc(100vh - 515px)",onChange:e=>{try{c(!0),x(e),a(!!(!e||""===e.trim()))}catch(e){(0,A.F)(e)?b(e):m("Could not parse the supplied YAML")}},onMount:e=>{f.current=e,f.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0}},theme:"light"}),(0,r.jsx)(s.izJ,{color:"gray.100"}),(0,r.jsx)(s.wpx,{type:"primary",disabled:t||!!_||l,loading:l,onClick:C,htmlType:"submit",className:"mt-6 w-fit",children:"Create dataset"})]})]}),(0,r.jsx)(s.xuv,{children:u&&(t||_)&&(0,r.jsx)(E.Z,{isEmptyState:t,yamlError:_})})]})},T=()=>{let[e,t]=(0,n.useState)(null);return(0,r.jsxs)(l.Z,{title:"Create New Dataset",children:[(0,r.jsx)(o.Z,{heading:"Datasets",breadcrumbItems:[{title:"All datasets",href:i.$m},{title:"Create new"}]}),(0,r.jsxs)(s.Kqy,{spacing:8,children:[(0,r.jsxs)(s.xuv,{children:[(0,r.jsx)(s.wpx,{onClick:()=>t("yaml"),"data-testid":"upload-yaml-btn",className:"mr-2",children:"Upload a Dataset YAML"}),(0,r.jsx)(s.wpx,{onClick:()=>t("database"),ghost:"database"===e,className:"mr-2","data-testid":"connect-db-btn",children:"Connect to a database"})]}),"database"===e&&(0,r.jsx)(s.xuv,{w:{base:"100%",lg:"50%"},children:(0,r.jsx)(k,{})}),"yaml"===e&&(0,r.jsx)(s.xuv,{w:{base:"100%"},children:(0,r.jsx)(S,{})})]})]})}},76737:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var a in t)Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}(t,{default:function(){return i},noSSR:function(){return l}});let r=a(51538);a(24246),a(27378);let s=r._(a(21887));function n(e){return{default:(null==e?void 0:e.default)||e}}function l(e,t){return delete t.webpack,delete t.modules,e(t)}function i(e,t){let a=s.default,r={loading:e=>{let{error:t,isLoading:a,pastDelay:r}=e;return null}};e instanceof Promise?r.loader=()=>e:"function"==typeof e?r.loader=e:"object"==typeof e&&(r={...r,...e});let i=(r={...r,...t}).loader;return(r.loadableGenerated&&(r={...r,...r.loadableGenerated},delete r.loadableGenerated),"boolean"!=typeof r.ssr||r.ssr)?a({...r,loader:()=>null!=i?i().then(n):Promise.resolve(n(()=>null))}):(delete r.webpack,delete r.modules,l(a,r))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28438:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return r}});let r=a(51538)._(a(27378)).default.createContext(null)},21887:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let r=a(51538)._(a(27378)),s=a(28438),n=[],l=[],i=!1;function o(e){let t=e(),a={loading:!0,loaded:null,error:null};return a.promise=t.then(e=>(a.loading=!1,a.loaded=e,e)).catch(e=>{throw a.loading=!1,a.error=e,e}),a}class u{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function d(e){return function(e,t){let a=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),n=null;function o(){if(!n){let t=new u(e,a);n={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return n.promise()}if(!i){let e=a.webpack?a.webpack():a.modules;e&&l.push(t=>{for(let a of e)if(t.includes(a))return o()})}function d(e,t){!function(){o();let e=r.default.useContext(s.LoadableContext);e&&Array.isArray(a.modules)&&a.modules.forEach(t=>{e(t)})}();let l=r.default.useSyncExternalStore(n.subscribe,n.getCurrentValue,n.getCurrentValue);return r.default.useImperativeHandle(t,()=>({retry:n.retry}),[]),r.default.useMemo(()=>{var t;return l.loading||l.error?r.default.createElement(a.loading,{isLoading:l.loading,pastDelay:l.pastDelay,timedOut:l.timedOut,error:l.error,retry:n.retry}):l.loaded?r.default.createElement((t=l.loaded)&&t.default?t.default:t,e):null},[e,l])}return d.preload=()=>o(),d.displayName="LoadableComponent",r.default.forwardRef(d)}(o,e)}function c(e,t){let a=[];for(;e.length;){let r=e.pop();a.push(r(t))}return Promise.all(a).then(()=>{if(e.length)return c(e,t)})}d.preloadAll=()=>new Promise((e,t)=>{c(n).then(e,t)}),d.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let a=()=>(i=!0,t());c(l,e).then(a,a)})),window.__NEXT_PRELOADREADY=d.preloadReady;let f=d},65218:function(e,t,a){e.exports=a(76737)}},function(e){e.O(0,[6527,5574,2888,9774,179],function(){return e(e.s=73846)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8473],{64902:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset",function(){return a(91949)}])},79806:function(e,t,a){"use strict";a.d(t,{Gn:function(){return r},zR:function(){return n}});var s=a(24246),l=a(27824),i=a(56358);let n=e=>{let{title:t}=e;return(0,s.jsx)(l.OXI,{py:0,display:"flex",alignItems:"flex-start",children:(0,s.jsx)(l.xvT,{mr:"2",color:"gray.700",fontSize:"lg",lineHeight:1.8,children:t})})},r=e=>{let{onDelete:t,onEditYaml:a,formId:n,isSaving:r}=e;return(0,s.jsxs)(l.zeN,{justifyContent:"space-between",children:[t?(0,s.jsx)(l.wpx,{"aria-label":"delete",icon:(0,s.jsx)(i.q,{fontSize:"small"}),onClick:t,"data-testid":"delete-btn"}):null,(0,s.jsxs)("div",{className:"flex gap-2",children:[a&&(0,s.jsx)(l.wpx,{onClick:a,"data-testid":"edit-yaml-btn",children:"Edit YAML"}),(0,s.jsx)(l.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:n,loading:r,children:"Save"})]})]})};t.ZP=e=>{let{header:t,description:a,isOpen:i,onClose:n,children:r,footer:o}=e;return(0,s.jsxs)(l.dys,{placement:"right",isOpen:i,onClose:n,size:"md",children:[(0,s.jsx)(l.P1B,{}),(0,s.jsxs)(l.scA,{"data-testid":"edit-drawer-content",py:2,children:[(0,s.jsxs)(l.xuv,{display:"flex",justifyContent:"space-between",alignItems:"top",mr:2,py:2,gap:2,children:[(0,s.jsx)(l.xuv,{flex:1,minH:8,children:t}),(0,s.jsx)(l.xuv,{display:"flex",justifyContent:"flex-end",mr:2,children:(0,s.jsx)(l.wpx,{"aria-label":"Close editor",onClick:n,"data-testid":"close-drawer-btn",icon:(0,s.jsx)(l.Two,{fontSize:"smaller"})})})]}),(0,s.jsxs)(l.Ng0,{pt:1,children:[a?(0,s.jsx)(l.xvT,{fontSize:"sm",mb:4,color:"gray.600",children:a}):null,r]}),o]})]})}},56358:function(e,t,a){"use strict";a.d(t,{q:function(){return l}});var s=a(24246);let l=(0,a(27824).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,s.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},8133:function(e,t,a){"use strict";var s=a(24246),l=a(27824);t.Z=e=>{let{title:t,children:a,isOpen:i,onClose:n,modalContentProps:r,showCloseButton:o=!1,footer:d,...u}=e;return(0,s.jsxs)(l.u_l,{isOpen:i,onClose:n,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...u,children:[(0,s.jsx)(l.ZAr,{}),(0,s.jsxs)(l.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...r,children:[o&&(0,s.jsx)(l.olH,{}),(0,s.jsx)(l.xBx,{p:0,children:(0,s.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,s.jsx)(l.X6q,{as:"h3",size:"sm",children:t})})}),(0,s.jsx)(l.fef,{pb:4,overflow:"auto",children:a}),d&&(0,s.jsx)(l.mzw,{children:d})]})]})}},56026:function(e,t,a){"use strict";a.d(t,{QL:function(){return i},du:function(){return l},tz:function(){return s}});let s={name:{tooltip:"A UI-friendly label for the Dataset."},description:{tooltip:"A human-readable description of the Dataset."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to all collections in the Dataset."}},l={description:{tooltip:"A human-readable description of the collection."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to all fields in the collection."}},i={description:{tooltip:"A human-readable description of the field."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to this field."}}},91949:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return N}});var s=a(24246),l=a(92222),i=a(59003),n=a(27824),r=a(79894),o=a.n(r),d=a(86677),u=a(27378),c=a(16125),p=a(32885),f=a(54682);let h=e=>{let{resourceType:t,fidesKeys:a,skip:s}=e,[l,i]=(0,u.useState)(!0),n=(0,p.Wm)({resource_type:t,fides_keys:a},{skip:s,pollingInterval:l?3e3:void 0}),r=!!n.data&&n.data.every(e=>e.status===f.Wg.COMPLETE||e.status===f.Wg.FAILED||e.status===f.Wg.REVIEWED);return(0,u.useEffect)(()=>{r&&i(!1)},[r]),{...n,isClassificationFinished:r}};var m=a(25980),x=a(77213),y=a(77830),g=a(58754),b=a(47935),j=a(20386),C=a(79806),_=a(812),v=a(46628),w=a(8133),k=a(84306),S=a(66527),O=a(41207),z=a(39715),D=a(41966),P=e=>{let{data:t=[],isSubmitting:a=!1,onCancel:l,onSubmit:i,disabled:r,isLoading:o,onChange:d}=e,c=(0,u.useRef)(null),{errorAlert:p}=(0,k.V)(),f=t.length>0?S.ZP.dump(t):void 0,[h,m]=(0,u.useState)(void 0),[x,y]=(0,u.useState)(!1),[g,b]=(0,u.useState)(!f),{data:j}=(0,D.LH)({minimal:!0}),[C,_]=(0,u.useState)([]),v=e=>{S.ZP.load(e,{json:!0}),m(void 0)},w=()=>{if(j&&j.length){let e=c.current.getValue();_(j.filter(t=>e.includes("fides_key: ".concat(t.fides_key,"\n"))).map(e=>e.fides_key))}},P=r||g||!x||!!h||a;return(0,s.jsxs)(n.kCb,{gap:"97px",children:[(0,s.jsxs)(n.gCW,{align:"stretch",w:"800px",children:[(0,s.jsx)(O.M,{defaultLanguage:"yaml",defaultValue:f,height:"calc(100vh - 526px)",onChange:e=>{try{y(!0),v(e),b(!e||""===e.trim());let t=S.ZP.load(e||"",{json:!0});Array.isArray(t)?d(t[0]):d(t),w()}catch(e){(0,O.F)(e)?m(e):p("Could not parse the supplied YAML")}},onMount:(e,t)=>{c.current=e,c.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!1},readOnly:r},theme:"light"}),C.length>0?(0,s.jsxs)(n.xvT,{children:["You are about to overwrite the dataset",C.length>1?"s":""," ",C.map((e,t)=>{let a=t===C.length-1;return(0,s.jsxs)(u.Fragment,{children:[(0,s.jsx)(n.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),a?".":", "]},e)})]}):null,(0,s.jsx)(n.mzw,{children:(0,s.jsxs)("div",{className:"flex w-full justify-end gap-4",children:[l&&(0,s.jsx)(n.wpx,{onClick:l,"data-testid":"cancel-btn",disabled:o,children:"Cancel"}),(0,s.jsx)(n.wpx,{type:"primary",onClick:()=>{null==i||i(),null==l||l()},"data-testid":"continue-btn",disabled:P,loading:a||o,children:"Confirm"})]})})]}),x&&(g||h)&&(0,s.jsx)(z.Z,{isEmptyState:g,yamlError:h})]})},E=e=>{let{isOpen:t,onClose:a,title:l,isLoading:i,returnFocusOnClose:r,isDatasetSelected:o,dataset:d,onChange:u,onSubmit:c}=e;return(0,s.jsx)(w.Z,{isOpen:t,onClose:a,size:"3xl",returnFocusOnClose:null==r||r,isCentered:!0,title:null!=l?l:"Edit Dataset",children:(0,s.jsx)(n.xuv,{"data-testid":"yaml-editor-section",children:(0,s.jsx)(P,{data:d?[d]:[],onSubmit:c,isSubmitting:!1,disabled:o,onChange:u,isLoading:i,onCancel:a})})})},T=a(34090),A=a(40324),R=a(56026);let V="edit-field-drawer";var M=e=>{var t,a;let{values:l,onSubmit:i}=e,r={name:null!==(t=l.name)&&void 0!==t?t:"",description:null!==(a=l.description)&&void 0!==a?a:"",data_categories:l.data_categories};return(0,s.jsx)(T.J9,{initialValues:r,onSubmit:e=>{i({...e,data_categories:l.data_categories||[]})},children:(0,s.jsx)(T.l0,{id:V,children:(0,s.jsxs)(n.Kqy,{spacing:"3",children:[(0,s.jsx)(A.j0,{name:"name",label:"Name",tooltip:R.tz.name.tooltip,"data-testid":"name-input",variant:"block"}),(0,s.jsx)(A.j0,{name:"description",label:"Description",tooltip:R.tz.description.tooltip,"data-testid":"description-input",variant:"block"})]})})})},H=e=>{let{dataset:t,isOpen:a,onClose:l}=e,[i,{isLoading:r}]=(0,j.TG)(),[o]=(0,j.QY)(),c=(0,d.useRouter)(),p=(0,n.pmc)(),{isOpen:f,onOpen:h,onClose:m}=(0,n.qY0)(),{isOpen:x,onOpen:y,onClose:g}=(0,n.qY0)(),[b,w]=(0,u.useState)(void 0),k=async e=>{let a={...t,...e};try{let e=await i(a);(0,_.D4)(e)?p((0,v.Vo)((0,_.e$)(e.error))):p((0,v.t5)("Successfully modified dataset"))}catch(e){p((0,v.Vo)(e))}l()},S=async()=>{let{fides_key:e}=t,a=await o(e);(0,_.D4)(a)?p((0,v.Vo)((0,_.e$)(a.error))):p((0,v.t5)("Successfully deleted dataset")),(0,j.Zl)(void 0),c.push("/dataset"),l(),m()};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(C.ZP,{isOpen:a,onClose:l,description:"A Dataset takes a database schema (tables and columns) and adds Fides privacy categorizations. Provide additional context to this dataset by filling out the fields below.",header:(0,s.jsx)(C.zR,{title:"Edit: ".concat(null==t?void 0:t.name)}),footer:(0,s.jsx)(C.Gn,{onClose:l,onDelete:h,onEditYaml:()=>y(),formId:V}),children:[(0,s.jsx)(E,{isOpen:x,onClose:g,onChange:w,onSubmit:()=>k(b),title:"Edit dataset YAML",isLoading:r,isDatasetSelected:!1,dataset:t}),(0,s.jsx)(M,{values:t,onSubmit:k})]}),(0,s.jsx)(n.cVQ,{isOpen:f,onClose:m,onConfirm:S,title:"Delete Dataset",message:(0,s.jsxs)(n.xvT,{children:["You are about to permanently delete the dataset named"," ",(0,s.jsx)(n.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name}),". Are you sure you would like to continue?"]})})]})};let L=(0,l.Cl)(),Z={items:[],total:0,page:1,size:25,pages:1},I=()=>(0,s.jsx)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,s.jsxs)(n.gCW,{children:[(0,s.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No datasets found."}),(0,s.jsx)(n.xvT,{fontSize:"sm",children:'Click "Create new dataset" to add your first dataset to Fides.'})]})});var N=()=>{let e=(0,c.I0)(),t=(0,d.useRouter)(),[a,r]=(0,u.useState)(!1),[p,C]=(0,u.useState)(),{PAGE_SIZES:_,pageSize:v,setPageSize:w,onPreviousPageClick:k,isPreviousPageDisabled:S,onNextPageClick:O,isNextPageDisabled:z,startRange:D,endRange:P,pageIndex:E,setTotalPages:T,resetPageIndexToDefault:A}=(0,b.oi)(),[R,V]=(0,u.useState)(),M=(0,u.useCallback)(e=>{A(),V(e)},[A,V]),{data:N,isLoading:F,isFetching:W}=(0,j.rt)({page:E,size:v,search:R,exclude_saas_datasets:!0}),{items:Y,total:G,pages:q}=(0,u.useMemo)(()=>null!=N?N:Z,[N]);(0,u.useEffect)(()=>{T(q)},[q,T]);let B=(0,u.useCallback)(a=>{e((0,j.Zl)(a.fides_key)),t.push({pathname:y.o5,query:{datasetId:encodeURIComponent(a.fides_key)}})},[e,t]),X=(0,m.hz)();h({resourceType:f.j.DATASETS,skip:!X.plus});let Q=(0,u.useMemo)(()=>[L.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(b.G3,{value:e.getValue(),fontWeight:"semibold"}),header:e=>(0,s.jsx)(b.Rr,{value:"Dataset Name",...e}),size:180}),L.accessor(e=>e.fides_key,{id:"fides_key",cell:e=>(0,s.jsx)(b.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(b.Rr,{value:"Fides Key",...e}),size:150}),L.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(b.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(b.Rr,{value:"Description",...e}),size:300,meta:{showHeaderMenu:!0}}),L.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e,a=t.original;return(0,s.jsx)(n.Ugi,{spacing:0,"data-testid":"dataset-".concat(a.fides_key),children:(0,s.jsx)(n.wpx,{size:"small",icon:(0,s.jsx)(n.dY8,{}),onClick:()=>{C(a),r(!0)},children:"Edit"})})},meta:{disableRowClick:!0}})].filter(Boolean),[]),U=(0,i.b7)({getCoreRowModel:(0,l.sC)(),getFilteredRowModel:(0,l.vL)(),getSortedRowModel:(0,l.tj)(),columns:Q,data:Y,columnResizeMode:"onChange"});return(0,s.jsx)(x.Z,{title:"Datasets",children:(0,s.jsxs)(n.xuv,{"data-testid":"system-management",children:[(0,s.jsx)(g.Z,{heading:"Datasets",breadcrumbItems:[{title:"All datasets"}],rightContent:(0,s.jsx)(o(),{href:"/dataset/new",passHref:!0,legacyBehavior:!0,children:(0,s.jsx)(n.wpx,{"data-testid":"create-dataset-btn",children:"+ Add dataset"})})}),F?(0,s.jsx)(b.I4,{rowHeight:36,numRows:15}):(0,s.jsxs)(n.xuv,{"data-testid":"dataset-table",children:[(0,s.jsx)(b.Q$,{children:(0,s.jsx)(b.HO,{globalFilter:R,setGlobalFilter:M,placeholder:"Search",testid:"dataset-search"})}),(0,s.jsx)(b.ZK,{tableInstance:U,emptyTableNotice:(0,s.jsx)(I,{}),onRowClick:B})]}),(0,s.jsx)(b.s8,{totalRows:G||0,pageSizes:_,setPageSize:w,onPreviousPageClick:k,isPreviousPageDisabled:S||W,onNextPageClick:O,isNextPageDisabled:z||W,startRange:D,endRange:P}),(0,s.jsx)(H,{dataset:p,isOpen:a,onClose:()=>{C(void 0),r(!1)}})]})})}},76737:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var a in t)Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}(t,{default:function(){return r},noSSR:function(){return n}});let s=a(51538);a(24246),a(27378);let l=s._(a(21887));function i(e){return{default:(null==e?void 0:e.default)||e}}function n(e,t){return delete t.webpack,delete t.modules,e(t)}function r(e,t){let a=l.default,s={loading:e=>{let{error:t,isLoading:a,pastDelay:s}=e;return null}};e instanceof Promise?s.loader=()=>e:"function"==typeof e?s.loader=e:"object"==typeof e&&(s={...s,...e});let r=(s={...s,...t}).loader;return(s.loadableGenerated&&(s={...s,...s.loadableGenerated},delete s.loadableGenerated),"boolean"!=typeof s.ssr||s.ssr)?a({...s,loader:()=>null!=r?r().then(i):Promise.resolve(i(()=>null))}):(delete s.webpack,delete s.modules,n(a,s))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28438:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return s}});let s=a(51538)._(a(27378)).default.createContext(null)},21887:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});let s=a(51538)._(a(27378)),l=a(28438),i=[],n=[],r=!1;function o(e){let t=e(),a={loading:!0,loaded:null,error:null};return a.promise=t.then(e=>(a.loading=!1,a.loaded=e,e)).catch(e=>{throw a.loading=!1,a.error=e,e}),a}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let a=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),i=null;function o(){if(!i){let t=new d(e,a);i={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return i.promise()}if(!r){let e=a.webpack?a.webpack():a.modules;e&&n.push(t=>{for(let a of e)if(t.includes(a))return o()})}function u(e,t){!function(){o();let e=s.default.useContext(l.LoadableContext);e&&Array.isArray(a.modules)&&a.modules.forEach(t=>{e(t)})}();let n=s.default.useSyncExternalStore(i.subscribe,i.getCurrentValue,i.getCurrentValue);return s.default.useImperativeHandle(t,()=>({retry:i.retry}),[]),s.default.useMemo(()=>{var t;return n.loading||n.error?s.default.createElement(a.loading,{isLoading:n.loading,pastDelay:n.pastDelay,timedOut:n.timedOut,error:n.error,retry:i.retry}):n.loaded?s.default.createElement((t=n.loaded)&&t.default?t.default:t,e):null},[e,n])}return u.preload=()=>o(),u.displayName="LoadableComponent",s.default.forwardRef(u)}(o,e)}function c(e,t){let a=[];for(;e.length;){let s=e.pop();a.push(s(t))}return Promise.all(a).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(i).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let a=()=>(r=!0,t());c(n,e).then(a,a)})),window.__NEXT_PRELOADREADY=u.preloadReady;let p=u},65218:function(e,t,a){e.exports=a(76737)}},function(e){e.O(0,[6527,5574,2888,9774,179],function(){return e(e.s=64902)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1850],{75733:function(e){e.exports=function(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(r);++i<r;)s[i]=e[i+t];return s}},74833:function(e,t,n){var i=n(56127),r=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(r,""):e}},42383:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<n}},57535:function(e,t,n){var i=n(85638),r=n(80068),s=n(42383),o=n(11611);e.exports=function(e,t,n){if(!o(n))return!1;var l=typeof t;return("number"==l?!!(r(n)&&s(t,n.length)):"string"==l&&t in n)&&i(n[t],e)}},56127:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},92875:function(e,t,n){var i=n(75733),r=n(57535),s=n(47991),o=Math.ceil,l=Math.max;e.exports=function(e,t,n){t=(n?r(e,t,n):void 0===t)?1:l(s(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var c=0,d=0,u=Array(o(a/t));c<a;)u[d++]=i(e,c,c+=t);return u}},85638:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},80068:function(e,t,n){var i=n(28338),r=n(84194);e.exports=function(e){return null!=e&&r(e.length)&&!i(e)}},28338:function(e,t,n){var i=n(99736),r=n(11611);e.exports=function(e){if(!r(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},84194:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},55193:function(e,t,n){var i=n(99736),r=n(92360);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==i(e)}},94919:function(e,t,n){var i=n(91936),r=1/0;e.exports=function(e){return e?(e=i(e))===r||e===-r?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,n){var i=n(94919);e.exports=function(e){var t=i(e),n=t%1;return t==t?n?t-n:t:0}},91936:function(e,t,n){var i=n(74833),r=n(11611),s=n(55193),o=0/0,l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return o;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=a.test(e);return n||c.test(e)?d(e.slice(2),n?2:8):l.test(e)?o:+e}},98720:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/datastore-connection",function(){return n(22285)}])},77867:function(e,t,n){"use strict";var i=n(24246),r=n(27824);t.Z=e=>{let{connected:t,...n}=e,s="red.500";return null==t?s="gray.300":t&&(s="green.500"),(0,i.jsx)(r.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:s,...n})}},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var i=n(24246),r=n(27824),s=n(88038),o=n.n(s),l=n(86677);n(27378);var a=n(25980),c=n(90867),d=n(77830),u=()=>{let e=(0,l.useRouter)();return(0,i.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,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},x=e=>{let{children:t,title:n,padded:s=!0,mainProps:d}=e,x=(0,a.hz)(),h=(0,l.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,f=!(x.flags.privacyRequestsConfiguration&&p),{data:m}=(0,c.JE)(void 0,{skip:f}),{data:g}=(0,c.PW)(void 0,{skip:f}),j=x.flags.privacyRequestsConfiguration&&(!m||!g)&&p;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(o(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.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",...d,children:[j?(0,i.jsx)(u,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(27824),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:o=!0,children:l,rightContent:a,style:c,...d}=e;return(0,i.jsxs)("div",{...d,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 t?(0,i.jsx)(r.lQT,{className:n||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,a&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!n&&(0,i.jsx)(s.m,{className:l?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),l]})}},96718:function(e,t,n){"use strict";n.d(t,{z:function(){return s}});var i=n(24246),r=n(27824);let s=e=>{let{...t}=e,n="multiple"===t.mode;return(0,i.jsx)(r.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,dropdownStyle:n?void 0:{width:"auto",minWidth:"200px"},className:"w-auto","data-testid":"filter-select",...t})}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var i=n(24246),r=n(27824),s=n(79894),o=n.n(s),l=n(27378);let{Text:a}=r.AntTypography,c=e=>{let{items:t,...n}=e,s=(0,l.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,l={...e},c=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,i.jsx)(a,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:l.title})),c)?l.title=(0,i.jsx)(r.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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,i.jsx)(o(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,i.jsx)(r.zrq,{items:s,...n})}},41337:function(e,t,n){"use strict";var i=n(24246),r=n(27824);n(27378);var s=n(88337),o=n(16394),l=n(14746);let a=l.Ny+l.iW.get(s.R.WEBSITE),c=e=>void 0!==e.connection_type,d=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===s.R.WEBSITE,x=e=>(null==e?void 0:e.connection_type)===s.R.SAAS;t.Z=e=>{let{data:t,...n}=e;return(0,i.jsx)(r.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{var e,n;let i;if(d(t)&&t.encoded_icon)return"data:image/svg+xml;base64,".concat(t.encoded_icon);if(u(t)){let n=null===(e=t.secrets)||void 0===e?void 0:e.url;if(!n)return a;let i=(0,o.ge)(n);return(0,o.tl)(i,100)}if(c(t)){if(x(t)&&(null===(n=t.saas_config)||void 0===n?void 0:n.type)){let e=t.saas_config.type,n=l.LN.get(e);return n?l.Ny+n:l.Ny+l.iW.get(s.R.SAAS)}i=[...l.iW].find(e=>{let[n]=e;return t.connection_type.toString()===n.toString()})}else if(d(t)){let{identifier:e}=t;i=[...l.iW].find(t=>{let[n]=t;return n.toLowerCase()===e.toLowerCase()})}return i?l.Ny+i[1]:l.VD})(),fallbackSrc:u(t)?a:l.VD,alt:(()=>{if(c(t)){var e;return null!==(e=t.name)&&void 0!==e?e:t.key}return d(t)?t.human_readable:t})(),...n})}},1226:function(e,t,n){"use strict";var i=n(24246);n(27378);var r=n(77213);t.Z=e=>{let{children:t}=e;return(0,i.jsx)(r.Z,{title:"Connections",children:t})}},15872:function(e,t,n){"use strict";var i=n(24246),r=n(27824),s=n(86677);n(27378);var o=n(77830),l=n(14207);t.Z=e=>{let{connection_key:t,showMenu:n}=e,{isOpen:a,onOpen:c,onClose:d}=(0,r.qY0)(),[u,x]=(0,l.R5)(),h=(0,s.useRouter)(),p=()=>{x.isLoading||d()};return(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsx)(r.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:c,children:(0,i.jsx)(r.xvT,{fontSize:"sm",children:"Delete"})}),!n&&(0,i.jsx)(r.wpx,{onClick:c,children:"Delete integration"}),(0,i.jsxs)(r.u_l,{isCentered:!0,isOpen:a,onClose:p,children:[(0,i.jsx)(r.ZAr,{}),(0,i.jsxs)(r.hzk,{children:[(0,i.jsx)(r.xBx,{children:"Delete integration"}),(0,i.jsx)(r.olH,{}),(0,i.jsx)(r.fef,{pb:6,children:(0,i.jsx)(r.Kqy,{direction:"column",spacing:"15px",children:(0,i.jsx)(r.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,i.jsxs)(r.mzw,{className:"flex gap-4",children:[(0,i.jsx)(r.wpx,{onClick:p,className:"w-1/2",children:"Cancel"}),(0,i.jsx)(r.wpx,{onClick:()=>{t&&(u(t),n||h.push(o.KH))},loading:x.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})}},73183:function(e,t,n){"use strict";var i=n(24246),r=n(27824);n(27378);var s=n(14207);t.Z=e=>{let{connection_key:t,disabled:n,name:o,access_type:l,connection_type:a,isSwitch:c}=e,{isOpen:d,onOpen:u,onClose:x}=(0,r.qY0)(),[h,p]=(0,s.XX)(),f=async()=>{await h({key:t,name:o,disabled:!n,access:l,connection_type:a}),x()},m=()=>{p.isLoading||x()};return(0,i.jsxs)(i.Fragment,{children:[c?(0,i.jsxs)(r.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,i.jsx)(r.xvT,{fontSize:"sm",children:"Enable integration"}),(0,i.jsx)(r.rAg,{className:"ml-2",checked:!n,onChange:()=>u()})]}):(0,i.jsx)(r.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:u,children:(0,i.jsx)(r.xvT,{fontSize:"sm",children:n?"Enable":"Disable"})}),(0,i.jsxs)(r.u_l,{isCentered:!0,isOpen:d,onClose:m,children:[(0,i.jsx)(r.ZAr,{}),(0,i.jsxs)(r.hzk,{children:[(0,i.jsxs)(r.xBx,{children:[n?"Enable":"Disable"," Connection"]}),(0,i.jsx)(r.olH,{}),(0,i.jsx)(r.fef,{pb:6,children:(0,i.jsx)(r.Kqy,{direction:"column",spacing:"15px",children:(0,i.jsxs)(r.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[n?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,i.jsxs)(r.mzw,{className:"flex gap-4",children:[(0,i.jsx)(r.wpx,{onClick:m,className:"w-1/2",children:"Cancel"}),(0,i.jsxs)(r.wpx,{onClick:f,loading:p.isLoading,className:"w-1/2",children:[n?"Enable":"Disable"," Connection"]})]})]})]})]})}},8627:function(e,t,n){"use strict";n.d(t,{s:function(){return l}});var i=n(24246),r=n(27824),s=n(77867),o=n(16394);let l=e=>{let{succeeded:t,timestamp:n}=e,l=n?(0,o.p6)(n):"";return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.Z,{connected:t}),(0,i.jsx)(r.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:n?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},22285:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return V}});var i=n(24246),r=n(16394),s=n(27824),o=n(27378),l=n(16134),a=n(20682),c=n(16125),d=n(14207),u=n(96718),x=()=>{let{connectionOptions:e}=(0,l.C)(a.ZZ),{connection_type:t}=(0,l.C)(d.dR),n=(0,o.useCallback)(()=>{let n=new Map;return e.forEach(e=>{let i=!1;(null==t?void 0:t.includes(e.identifier))&&(i=!0),n.set(e.human_readable,i)}),n},[e,t]),r=[...(0,o.useMemo)(()=>n(),[n])].map(e=>{let[t]=e;return{value:t,label:t}}),s=(0,l.T)();return(0,i.jsx)(u.z,{mode:"multiple",placeholder:"Connection Type",options:r,onChange:t=>{let n=e.filter(e=>t.includes(e.human_readable));s((0,d.Iw)(n.map(e=>e.identifier)))},defaultValue:(null==t?void 0:t.length)?t:[],className:"w-60","data-testid":"connection-type-filter"})},h=n(14746),p=()=>{let{disabled_status:e}=(0,c.v9)(d.dR),t=()=>{let e=new Map;return Object.values(h.QI).sort().forEach(t=>{e.set((0,r.kC)(t),{value:t})}),e},n=[...(0,o.useMemo)(()=>t(),[])].map(e=>{let[t,n]=e;return{value:n.value,label:t}}),s=(0,c.I0)();return(0,i.jsx)(u.z,{placeholder:"Status",options:n,onChange:e=>{s((0,d.Ru)(e||""))},defaultValue:(null==e?void 0:e.toString())||void 0,"data-testid":"disabled-status-filter"})},f=n(26788),m=()=>{let{system_type:e}=(0,c.v9)(d.dR),t=new Map(f.yI);t.delete("Show all");let n=[...t].map(e=>{let[t,n]=e;return{value:n.value,label:t}}),r=(0,l.T)();return(0,i.jsx)(u.z,{placeholder:"System Type",options:n,onChange:e=>{r((0,d.zq)(e||""))},defaultValue:(null==e?void 0:e.toString())||void 0,"data-testid":"system-type-filter"})},g=()=>{let{test_status:e}=(0,c.v9)(d.dR),t=()=>{let e=new Map;return Object.values(h.i0).sort().forEach(t=>{e.set((0,r.kC)(t),{value:t})}),e},n=[...(0,o.useMemo)(()=>t(),[])].map(e=>{let[t,n]=e;return{value:n.value,label:t}}),s=(0,c.I0)();return(0,i.jsx)(u.z,{placeholder:"Testing Status",options:n,onChange:e=>{s((0,d.Ri)(e||""))},defaultValue:(null==e?void 0:e.toString())||void 0,"data-testid":"testing-status-filter"})};let j=()=>{let e=(0,c.v9)(d.dR),t=(0,c.I0)();return{handleSearchChange:e=>t((0,d.qP)(e.target.value)),...e}};var v=()=>{let{handleSearchChange:e,search:t}=j();return(0,i.jsxs)(s.kCb,{minWidth:"fit-content",alignItems:"center",gap:"4",mb:6,flexWrap:"wrap",children:[(0,i.jsxs)(s.BZy,{size:"sm",minWidth:"308px",children:[(0,i.jsx)(s.Z8_,{pointerEvents:"none",children:(0,i.jsx)(s.PTu,{color:"gray.300",w:"17px",h:"17px"})}),(0,i.jsx)(s.IIB,{autoComplete:"off",autoFocus:!0,type:"search",minWidth:200,placeholder:"Search connection name or description",size:"sm",borderRadius:"md",value:t,name:"search",onChange:e})]}),(0,i.jsx)(x,{}),(0,i.jsx)(m,{}),(0,i.jsx)(g,{}),(0,i.jsx)(p,{})]})},y=e=>{let{page:t,size:n,total:r,handleNextPage:o,handlePreviousPage:l}=e,a=(t-1)*n+1,c=Math.min(r,t*n);return(0,i.jsxs)(s.kCb,{justifyContent:"space-between",mt:6,children:[(0,i.jsx)(s.xvT,{fontSize:"xs",color:"gray.600",children:r>0?(0,i.jsxs)(i.Fragment,{children:["Showing ",Number.isNaN(a)?0:a," to"," ",Number.isNaN(c)?0:c," of"," ",Number.isNaN(r)?0:r," results"]}):"0 results"}),(0,i.jsxs)("div",{children:[(0,i.jsx)(s.wpx,{disabled:t<=1,onClick:l,className:"mr-2",children:"Previous"}),(0,i.jsx)(s.wpx,{disabled:t*n>=r,onClick:o,children:"Next"})]})]})},b=n(92875),C=n.n(b),w=n(40542),_=n.n(w),k=n(79894),N=n.n(k),S=n(77830),z=n(15872),T=n(73183),R=e=>{let{connection_key:t,disabled:n,connection_type:r,access_type:o,name:l}=e;return(0,i.jsxs)(s.v2r,{children:[(0,i.jsx)(s.j2t,{as:s.zxk,size:"xs",bg:"white","data-testid":"connection-menu-btn",children:(0,i.jsx)(s.nXP,{color:"gray.700",w:18,h:18})}),(0,i.jsx)(s.h_i,{children:(0,i.jsxs)(s.qyq,{fontSize:"sm",shadow:"xl","data-testid":"connection-menu-".concat(l),children:[(0,i.jsx)(s.sNh,{as:N(),href:"".concat(S.JR,"/").concat(encodeURIComponent(t)),_focus:{color:"complimentary.500",bg:"gray.100"},"data-testid":"configure-btn",children:"Configure"}),(0,i.jsx)(T.Z,{connection_key:t,disabled:n,connection_type:r,access_type:o,name:l,isSwitch:!1}),(0,i.jsx)(z.Z,{showMenu:!0,connection_key:t})]})})]})},Z=e=>{let{disabled:t}=e;return(0,i.jsx)(s.j8w,{color:t?"marble":"success",className:"mr-1 text-center",children:t?"DISABLED":"ACTIVE"})},E=n(41337),I=n(8627),W=e=>{var t;let{connectionData:n}=e,[c,u]=(0,d.h2)(),{connectionOptions:x}=(0,l.C)(a.ZZ),h=(0,o.useMemo)(()=>x.find(e=>e.identifier===n.connection_type||n.saas_config&&e.identifier===n.saas_config.type)||"ethyca",[n,x]);return(0,i.jsxs)(s.xuv,{width:"100%",height:136,p:"18px 16px 16px 16px","data-testid":"connection-grid-item-".concat(n.name),children:[(0,i.jsxs)(s.kCb,{justifyContent:"center",alignItems:"center",children:[(0,i.jsx)(E.Z,{data:h}),(0,i.jsx)(s.xvT,{color:"gray.900",fontSize:"md",fontWeight:"medium",m:"8px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",children:n.name}),(0,i.jsx)(s.LZC,{}),(0,i.jsx)(Z,{disabled:!!n.disabled}),(0,i.jsx)(R,{connection_key:n.key,disabled:!!n.disabled,name:null!==(t=n.name)&&void 0!==t?t:n.key,connection_type:n.connection_type,access_type:n.access})]}),(0,i.jsx)(s.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:n.description?n.description:(0,i.jsx)("br",{})}),(0,i.jsxs)(s.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:["Edited on ",(0,r.p6)(n.updated_at)]}),(0,i.jsxs)(s.kCb,{mt:"0px",justifyContent:"center",alignItems:"center",children:[(0,i.jsx)(I.s,{succeeded:n.last_test_succeeded,timestamp:n.last_test_timestamp||""}),(0,i.jsx)(s.LZC,{}),(0,i.jsx)(s.wpx,{size:"small",onClick:()=>{c(n.key)},loading:u.isLoading||u.isFetching,children:"Test"})]})]})};let A=()=>{let e=(0,c.I0)(),t=(0,l.C)(d.dR);return{...t,handleNextPage:()=>{e((0,d.YA)(t.page+1))},handlePreviousPage:()=>{e((0,d.YA)(t.page-1))}}};var P=e=>{let{items:t=[],total:n=0}=e,{page:r,size:o,handleNextPage:l,handlePreviousPage:a}=A(),c=C()(t,3);return(0,i.jsxs)(i.Fragment,{children:[c.map((e,t,n)=>{let{length:r}=n;return(0,i.jsx)(s.xuv,{className:_()["grid-row"],borderBottomWidth:r>1&&t===r-1&&3===e.length?"0.5px":void 0,"data-testid":"connection-grid",children:(0,i.jsx)(s.MIq,{columns:3,children:e.map(e=>(0,i.jsx)(s.xuv,{className:_()["grid-item"],children:(0,i.jsx)(W,{connectionData:e})},e.key))})},JSON.stringify(e))}),(0,i.jsx)(y,{page:r,size:o,total:n,handleNextPage:l,handlePreviousPage:a})]})},q=e=>{let{hasFilters:t}=e;return(0,i.jsxs)(s.kCb,{bg:"gray.50",width:"100%",height:"340px",justifyContent:"center",alignItems:"center",flexDirection:"column","data-testid":"connections-empty-state",children:[(0,i.jsx)(s.xvT,{color:"black",fontSize:"x-large",lineHeight:"32px",fontWeight:"600",mb:"7px",children:t?"No connections found":"All of your connections have been linked!"}),(0,i.jsx)(s.xvT,{color:"gray.600",fontSize:"sm",lineHeight:"20px",mb:"11px",children:t?"Modify your search parameters":"You are ready to upgrade Fides"})]})},D=n(25980),F=n(58754),M=n(86677),L=()=>{let e=(0,M.useRouter)();return(0,i.jsx)(s.wpx,{onClick:()=>e.push(f.Ss[1].href),type:"primary",children:"Create new connection"})},B=()=>{let e=(0,D.hz)();return(0,i.jsx)(F.Z,{heading:"Unlinked Connections",rightContent:e.flags.standaloneConnections&&(0,i.jsx)(L,{}),children:(0,i.jsx)(s.xuv,{maxWidth:"450px",children:(0,i.jsxs)(s.xvT,{fontSize:"sm",children:["Connections are now created in the"," ",(0,i.jsx)(s.rUS,{color:"complimentary.500",href:S.xo,children:"system configuration"})," ","section. You can link existing connections to a new or existing system."]})})})},O=()=>{var e;let t=(0,o.useRef)(!1),n=(0,l.T)(),{connectionOptions:c}=(0,l.C)(a.ZZ),u=(0,l.C)(d.dR),[x,h]=(0,o.useState)(u),p=(0,o.useRef)((0,r.Ds)(e=>h(e),250)),{data:f}=(0,a.$I)({search:""},{skip:c.length>0}),{data:m,isFetching:g,isLoading:j,isSuccess:y}=(0,d.AZ)(x),b=(null==m?void 0:null===(e=m.items)||void 0===e?void 0:e.length)>0,C=!!u.search||!!u.connection_type||!!u.system_type||!!u.disabled_status||!!u.test_status;return(0,o.useEffect)(()=>{n((0,d.um)(!0))},[n]),(0,o.useEffect)(()=>(t.current=!0,0===c.length&&(null==f?void 0:f.items)&&n((0,a.fP)(f.items)),p.current(u),()=>{t.current=!1}),[c.length,null==f?void 0:f.items,n,u]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(B,{}),t.current&&(0,i.jsx)(v,{}),(g||j)&&(0,i.jsx)(s.M5Y,{children:(0,i.jsx)(s.$jN,{})}),t.current&&y&&(b?(0,i.jsx)(P,{items:null==m?void 0:m.items,total:null==m?void 0:m.total}):(0,i.jsx)(q,{hasFilters:C}))]})},H=n(1226),V=()=>(0,i.jsx)(H.Z,{children:(0,i.jsx)(O,{})})},40542:function(e){e.exports={"grid-row":"ConnectionGrid_grid-row__Cv_Zf","grid-item":"ConnectionGrid_grid-item__xP7eK"}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=98720)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[710],{66726:function(e,t,n){var i=n(11611),a=n(82846),l=n(91936),o=Math.max,r=Math.min;e.exports=function(e,t,n){var s,c,d,u,p,m,x=0,h=!1,v=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function g(t){var n=s,i=c;return s=c=void 0,x=t,u=e.apply(i,n)}function y(e){var n=e-m,i=e-x;return void 0===m||n>=t||n<0||v&&i>=d}function j(){var e,n,i,l=a();if(y(l))return w(l);p=setTimeout(j,(e=l-m,n=l-x,i=t-e,v?r(i,d-n):i))}function w(e){return(p=void 0,f&&s)?g(e):(s=c=void 0,u)}function C(){var e,n=a(),i=y(n);if(s=arguments,c=this,m=n,i){if(void 0===p)return x=e=m,p=setTimeout(j,t),h?g(e):u;if(v)return clearTimeout(p),p=setTimeout(j,t),g(m)}return void 0===p&&(p=setTimeout(j,t)),u}return t=l(t)||0,i(n)&&(h=!!n.leading,d=(v="maxWait"in n)?o(l(n.maxWait)||0,t):d,f="trailing"in n?!!n.trailing:f),C.cancel=function(){void 0!==p&&clearTimeout(p),x=0,s=m=c=p=void 0},C.flush=function(){return void 0===p?u:w(a())},C}},82846:function(e,t,n){var i=n(77400);e.exports=function(){return i.Date.now()}},9387:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations",function(){return n(31912)}])},30952:function(e,t,n){"use strict";n.d(t,{f:function(){return s}});var i=n(24246),a=n(66726),l=n.n(a),o=n(27378),r=n(26917);let s=e=>{let{value:t,onChange:n,placeholder:a,...s}=e,[c,d]=(0,o.useState)(t),u=l()(n,500),p=(0,o.useCallback)(e=>{d(e),u(e)},[]);return(0,i.jsx)(r.Z,{value:c,onChange:p,onClear:()=>{d(""),n("")},placeholder:a,...s})}},31912:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E}});var i,a,l,o,r=n(24246),s=n(27824),c=n(86677),d=n(27378),u=n(30952),p=n(18225),m=n(77213),x=n(77830),h=n(58754),v=n(16394),f=n(41337),g=n(14207),y=n(8133),j=n(52352),w=n(15987),C=n(75595),b=e=>{let{integrationType:t,onConfigure:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.Z,{integration:null==t?void 0:t.placeholder,onConfigureClick:n}),null==t?void 0:t.overview]})},k=n(25980),_=e=>{let t=(0,d.useRef)(null);return(0,d.useEffect)(()=>{let n=n=>{!t.current||t.current.contains(n.target)||n.target.closest('button, [role="button"], a, input, select, textarea')||e()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e]),t},S=e=>{var t;let{integration:n,selected:i=!1,onClick:a,onDetailsClick:l,onUnfocus:o}=e,c=(0,j.ZP)(null==n?void 0:n.connection_type,null==n?void 0:null===(t=n.saas_config)||void 0===t?void 0:t.type),d=_(()=>{i&&o&&o()});return(0,r.jsxs)(s.xuv,{ref:d,borderWidth:1,borderColor:i?"black":"gray.200",backgroundColor:i?"gray.50":"transparent",boxShadow:i?"md":"none",borderRadius:"lg",overflow:"hidden",padding:"12px",cursor:"pointer",onClick:a,"data-testid":"integration-info-".concat(null==n?void 0:n.key),children:[(0,r.jsxs)(s.kCb,{justifyContent:"space-between",alignItems:"flex-start",children:[(0,r.jsxs)(s.kCb,{flexGrow:1,children:[(0,r.jsx)(f.Z,{data:null!=n?n:"",boxSize:"40px"}),(0,r.jsxs)(s.kCb,{direction:"column",flexGrow:1,marginLeft:"12px",marginRight:"12px",children:[(0,r.jsx)(s.xvT,{color:"gray.700",fontWeight:"semibold",fontSize:"sm",children:(null==n?void 0:n.name)||"(No name)"}),(0,r.jsx)(s.xvT,{color:"gray.600",fontSize:"xs",mt:1,children:c.category})]})]}),l&&(0,r.jsx)(s.wpx,{size:"small",onClick:e=>{e.stopPropagation(),l()},type:"default",className:"px-2 py-1 text-xs","data-testid":"details-btn-".concat(null==n?void 0:n.key),children:"Details"})]}),(0,r.jsxs)(s.Eq9,{marginTop:"12px",spacing:1,children:[c.tags.slice(0,3).map(e=>(0,r.jsx)(s.j8w,{children:e},e)),c.tags.length>3&&(0,r.jsxs)(s.j8w,{color:"corinth",children:["+",c.tags.length-3]})]})]})};(i=l||(l={})).ALL="All",i.DATA_CATALOG="Data Catalog",i.DATA_WAREHOUSE="Data Warehouse",i.DATABASE="Database",i.IDENTITY_PROVIDER="Identity Provider",i.WEBSITE="Website",i.CRM="CRM",i.MANUAL="Manual";var T=e=>{let{selectedIntegration:t,onSelectIntegration:n,onDetailClick:i}=e,[a,o]=(0,d.useState)(""),[c,u]=(0,d.useState)("All"),[m,x]=(0,d.useState)(!1),{flags:{oktaMonitor:h}}=(0,k.Vb)(),v=(0,d.useMemo)(()=>Object.values(l).filter(e=>"Identity Provider"!==e||h),[h]),f=(0,d.useMemo)(()=>{let e=j.FO;if("All"!==c&&(e=e.filter(e=>e.category===c)),a.trim()){let t=a.toLowerCase();e=e.filter(e=>(e.placeholder.name||"").toLowerCase().includes(t))}return e.filter(e=>!!h||"okta"!==e.placeholder.connection_type)},[a,c,h]),g=v.map(e=>({label:e,value:e}));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-4 mt-3 flex items-center justify-between gap-4",children:[(0,r.jsx)(s.uFc,{placeholder:"Search by name...",value:a,onChange:e=>o(e.target.value),className:"w-64",allowClear:!0}),(0,r.jsx)(s.WPr,{value:c,onChange:e=>{x(!0),u(e),setTimeout(()=>x(!1),100)},options:g,className:"w-48",placeholder:"Select category","data-testid":"category-filter-select"})]}),m?(0,r.jsx)(p.Z,{}):(0,r.jsx)("div",{className:"grid grid-cols-3 gap-6",children:f.map(e=>(0,r.jsx)("div",{children:(0,r.jsx)(S,{integration:e.placeholder,selected:(null==t?void 0:t.placeholder.key)===e.placeholder.key,onClick:()=>{n((null==t?void 0:t.placeholder.key)===e.placeholder.key?void 0:e)},onDetailsClick:()=>i(e),onUnfocus:()=>n(void 0)})},e.placeholder.key))})]})},N=n(64176);(a=o||(o={})).LIST_VIEW="list-view",a.DETAIL="detail",a.FORM="form";var A=e=>{var t,n,i;let{isOpen:a,onClose:l}=e,[o,c]=(0,d.useState)("list-view"),[u,p]=(0,d.useState)(null),[m,x]=(0,d.useState)(),[h,v]=(0,d.useState)(null),f=(0,N.Z)(null==m?void 0:m.placeholder.connection_type,null==m?void 0:null===(n=m.placeholder)||void 0===n?void 0:null===(t=n.saas_config)||void 0===t?void 0:t.type),{description:g}=(0,j.ZP)(null==m?void 0:m.placeholder.connection_type,null==m?void 0:null===(i=m.placeholder.saas_config)||void 0===i?void 0:i.type),C=()=>{c("list-view"),p(null),x(void 0),v(null),l()},k=()=>{p("detail"),c("form")},_=m&&"list-view"!==o?"".concat(m.placeholder.name," Integration"):"Add integration",S="list-view"===o?(0,r.jsxs)("div",{className:"flex w-full justify-between",children:[(0,r.jsx)(s.wpx,{onClick:C,children:"Cancel"}),(0,r.jsx)(s.wpx,{type:"primary",onClick:()=>{"list-view"===o&&m&&(p("list-view"),c("form"))},disabled:!m,children:"Next"})]}):"detail"===o?(0,r.jsxs)("div",{className:"flex w-full justify-between",children:[(0,r.jsx)(s.wpx,{onClick:()=>c("list-view"),children:"Back"}),(0,r.jsx)(s.wpx,{onClick:k,type:"primary","data-testid":"configure-modal-btn",children:"Next"})]}):"form"===o?(0,r.jsxs)("div",{className:"flex w-full justify-between",children:[(0,r.jsx)(s.wpx,{onClick:()=>{u&&(c(u),p(null))},children:"Back"}),(0,r.jsx)(s.wpx,{type:"primary",onClick:()=>{h&&h.submitForm&&h.submitForm()},disabled:!h||!h.isValid||!h.dirty,loading:null==h?void 0:h.loading,"data-testid":"save-btn",children:"Save"})]}):null;return(0,r.jsxs)(y.Z,{isOpen:a,onClose:C,title:_,scrollBehavior:"inside",showCloseButton:!0,modalContentProps:{height:"700px",maxWidth:"1010px"},footer:S,children:["list-view"===o&&(0,r.jsx)(T,{selectedIntegration:m,onSelectIntegration:e=>{x(e)},onDetailClick:e=>{c("detail"),x(e)}}),"detail"===o&&(0,r.jsx)(b,{integrationType:m,onConfigure:k}),"form"===o&&(0,r.jsx)(w.Z,{connectionOption:f,onCancel:C,description:g,onFormStateChange:v})]})},I=n(40774),E=()=>{let[e,t]=(0,d.useState)(1),[n,i]=(0,d.useState)(50),[a,l]=(0,d.useState)(""),o=(0,c.useRouter)(),y=(0,d.useCallback)(a=>{(null==a?void 0:a.current)!==e&&t(a.current),(null==a?void 0:a.pageSize)&&a.pageSize!==n&&i(a.pageSize)},[e,n]),{data:w,isLoading:C}=(0,g.AZ)({connection_type:j.jq,size:n,page:e,search:a.trim()||void 0}),{items:b}=null!=w?w:{},{onOpen:k,isOpen:_,onClose:S}=(0,s.qY0)(),T=(0,d.useMemo)(()=>{var e;return null!==(e=null==b?void 0:b.map(e=>{var t;return{...e,integrationTypeInfo:(0,j.ZP)(e.connection_type,null===(t=e.saas_config)||void 0===t?void 0:t.type)}}))&&void 0!==e?e:[]},[b]),N=e=>{o.push("".concat(x.KH,"/").concat(e.key))},E=[{title:"Name",dataIndex:"name",key:"name",width:250,render:(e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(f.Z,{data:t,boxSize:"20px"}),(0,r.jsx)(s.AntTypography.Text,{ellipsis:{tooltip:e||"(No name)"},className:"font-semibold",children:e||"(No name)"})]})},{title:"Type",dataIndex:"connection_type",key:"connection_type",width:150,render:e=>{var t,n;return(0,j.ZP)(e,null==b?void 0:null===(n=b.find(t=>t.connection_type===e))||void 0===n?void 0:null===(t=n.saas_config)||void 0===t?void 0:t.type).placeholder.name||e}},{title:"Capabilities",dataIndex:["integrationTypeInfo","tags"],key:"capabilities",width:300,render:e=>(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:e.map(e=>(0,r.jsx)(s.j8w,{children:e},e))})},{title:"Connection Status",key:"connection_status",width:150,render:(e,t)=>{let{status:n,color:i}=null===t.last_test_timestamp||void 0===t.last_test_timestamp?{status:"Untested",color:"default"}:!0===t.last_test_succeeded?{status:"Healthy",color:"success"}:!1===t.last_test_succeeded?{status:"Failed",color:"error"}:{status:"Untested",color:"default"},a=t.last_test_timestamp?"Last connection: ".concat((0,v.p6)(t.last_test_timestamp)):"The connection has not been tested";return(0,r.jsx)(s.esZ,{title:a,children:(0,r.jsx)(s.j8w,{color:i,children:n})})}},{title:"Actions",key:"actions",width:100,render:(e,t)=>(0,r.jsx)(s.wpx,{onClick:()=>N(t),"data-testid":"manage-btn-".concat(t.key),size:"small",children:"Manage"})}],Z={current:e,pageSize:n,total:T.length,showQuickJumper:!1,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," integrations"),pageSizeOptions:["10","25","50","100"]},D={emptyText:a.trim()?"No integrations match your search":(0,r.jsx)("div",{"data-testid":"empty-state",children:'You have not configured any integrations. Click "Add Integration" to connect and configure systems now.'})};return(0,r.jsxs)(m.Z,{title:"Integrations",children:[(0,r.jsx)(h.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations"}],rightContent:(0,r.jsx)(s.wpx,{onClick:k,"data-testid":"add-integration-btn",type:"primary",children:"Add integration"})}),(0,r.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-4",children:[(0,r.jsx)(u.f,{placeholder:"Search by name...",value:a,onChange:e=>{l(e),t(1)},className:"max-w-sm"}),(0,r.jsx)(I.Z,{})]}),C?(0,r.jsx)(p.Z,{}):(0,r.jsx)(s.V5H,{columns:E,dataSource:T,rowKey:"key",pagination:Z,loading:C,size:"small",locale:D,bordered:!0,onRow:e=>({onClick:()=>N(e),"data-testid":"integration-info-".concat(e.key)}),rowClassName:"cursor-pointer",onChange:y,"data-testid":"integrations-table"}),(0,r.jsx)(A,{isOpen:_,onClose:S})]})}}},function(e){e.O(0,[8765,9278,5163,699,3662,1316,6662,2888,9774,179],function(){return e(e.s=9387)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2815],{24081:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/messaging",function(){return s(18504)}])},35287:function(e,t,s){"use strict";var i=s(24246),n=s(27824),a=s(88038),r=s.n(a);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:a}=e;return(0,i.jsxs)(n.kCb,{"data-testid":s,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsx)(n.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...a,children:t})]})}},87361:function(e,t,s){"use strict";var i=s(24246),n=s(27824);t.Z=e=>{let{title:t,text:s,onClose:a}=e;return(0,i.jsxs)(n.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderRadius:"md",justifyContent:"space-between",py:4,pr:6,pl:3,"data-testid":"empty-state",gap:2,position:"relative",children:[a&&(0,i.jsx)(n.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:a}),(0,i.jsx)(n.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,i.jsxs)(n.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,i.jsx)(n.X6q,{fontSize:"md",children:t}),(0,i.jsx)(n.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:s})]})]})}},58754:function(e,t,s){"use strict";var i=s(24246),n=s(27824),a=s(70788);t.Z=e=>{let{heading:t,breadcrumbItems:s,isSticky:r=!0,children:l,rightContent:o,style:c,...d}=e;return(0,i.jsxs)("div",{...d,style:r?{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)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(n.lQT,{className:s||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!s&&(0,i.jsx)(a.m,{className:l?"pb-4":void 0,items:s,"data-testid":"page-breadcrumb"}),l]})}},70788:function(e,t,s){"use strict";s.d(t,{m:function(){return c}});var i=s(24246),n=s(27824),a=s(79894),r=s.n(a),l=s(27378);let{Text:o}=n.AntTypography,c=e=>{let{items:t,...s}=e,a=(0,l.useMemo)(()=>null==t?void 0:t.map((e,s)=>{let a=s===t.length-1,l={...e},c=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,i.jsx)(o,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,children:l.title})),c)?l.title=(0,i.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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,i.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,i.jsx)(n.zrq,{items:a,...s})}},67810:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}}),(i=n||(n={})).PRIVACY_REQUEST_REVIEW_APPROVE="privacy_request_review_approve",i.PRIVACY_REQUEST_REVIEW_DENY="privacy_request_review_deny",i.PRIVACY_REQUEST_RECEIPT="privacy_request_receipt",i.PRIVACY_REQUEST_COMPLETE_ACCESS="privacy_request_complete_access",i.PRIVACY_REQUEST_COMPLETE_DELETION="privacy_request_complete_deletion",i.SUBJECT_IDENTITY_VERIFICATION="subject_identity_verification";var i,n,a={[n.PRIVACY_REQUEST_COMPLETE_ACCESS]:"Access request completed",[n.PRIVACY_REQUEST_COMPLETE_DELETION]:"Erasure request completed",[n.PRIVACY_REQUEST_RECEIPT]:"Privacy request received",[n.PRIVACY_REQUEST_REVIEW_APPROVE]:"Privacy request approved",[n.PRIVACY_REQUEST_REVIEW_DENY]:"Privacy request denied",[n.SUBJECT_IDENTITY_VERIFICATION]:"Subject identity verification"}},5058:function(e,t,s){"use strict";s.d(t,{Vw:function(){return a},ms:function(){return i},pS:function(){return n},vm:function(){return r}});let{useGetSummaryMessagingTemplatesQuery:i,usePutMessagingTemplateByIdMutation:n,useCreateMessagingTemplateByTypeMutation:a,usePatchMessagingTemplateByIdMutation:r}=s(78780).u.injectEndpoints({endpoints:e=>({getSummaryMessagingTemplates:e.query({query:e=>({method:"GET",url:"plus/messaging/templates/summary",params:e}),providesTags:()=>["Property-Specific Messaging Templates"]}),putMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:s}=e;return{url:"plus/messaging/templates/".concat(t),method:"PUT",body:s}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),patchMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:s}=e;return{url:"plus/messaging/templates/".concat(t),method:"PATCH",body:s}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),createMessagingTemplateByType:e.mutation({query:e=>{let{templateType:t,template:s}=e;return{url:"plus/messaging/templates/".concat(t),method:"POST",body:s}},invalidatesTags:()=>["Property-Specific Messaging Templates"]})})})},18504:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return N}});var i=s(24246),n=s(92222),a=s(59003),r=s(27824),l=s(95099),o=s.n(l),c=s(86677),d=s(27378),p=s(35287),u=s(71795),m=s(87361),g=s(46238),x=s(77830),h=s(58754),f=s(47935),j=s(42904),y=s(7426),v=s(67810),_=e=>{let{isOpen:t,onClose:s,onAccept:n}=e,[a,l]=(0,d.useState)(void 0),o=Object.keys(v.Z).map(e=>({value:e,label:v.Z[e]}));return(0,i.jsxs)(r.u_l,{isOpen:t,onClose:s,size:"2xl",isCentered:!0,children:[(0,i.jsx)(r.ZAr,{}),(0,i.jsxs)(r.hzk,{"data-testid":"add-messaging-template-modal",children:[(0,i.jsx)(r.xBx,{borderBottomWidth:1,fontWeight:"bold",children:"Select message template"}),(0,i.jsxs)(r.fef,{children:[(0,i.jsx)(r.xvT,{color:"gray.700",fontWeight:"medium",fontSize:"sm",marginBottom:3,marginTop:1,children:"Add a new email message by selecting a template below and clicking accept."}),(0,i.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"medium",marginBottom:2,children:"Choose template:"}),(0,i.jsx)(r.xuv,{"data-testid":"template-type-selector",children:(0,i.jsx)(r.WPr,{options:o,onChange:e=>{l(e)},className:"w-full"})})]}),(0,i.jsx)(r.mzw,{justifyContent:"flex-start",children:(0,i.jsxs)("div",{className:"flex w-full gap-4",children:[(0,i.jsx)(r.wpx,{onClick:s,"data-testid":"cancel-btn",className:"grow",children:"Cancel"}),(0,i.jsx)(r.wpx,{onClick:()=>n(a),type:"primary","data-testid":"confirm-btn",disabled:!a,className:"grow",children:"Next"})]})})]})]})},E=s(5058),b=s(812),C=s(46628),T=s(31883),w=()=>{let e=(0,r.pmc)(),[t]=(0,E.vm)();return{toggleIsTemplateEnabled:(0,d.useCallback)(async s=>{let{isEnabled:i,templateId:n}=s,a=await t({templateId:n,template:{is_enabled:i}});if((0,T.D4)(a)){e((0,C.Vo)((0,b.e$)(a.error)));return}e((0,C.t5)("Messaging template ".concat(i?"enabled":"disabled")))},[t,e])}},R=s(64826);let P=(0,n.Cl)(),I={items:[],total:0,page:1,size:50,pages:1},S=()=>(0,i.jsx)(r.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,i.jsxs)(r.gCW,{children:[(0,i.jsx)(r.xvT,{fontSize:"md",fontWeight:"600",children:"It looks like it’s your first time here!"}),(0,i.jsxs)(r.xvT,{fontSize:"sm",children:["Add new email templates with the ",'"Add message +"'," button.",(0,i.jsx)("br",{})]})]})}),k=()=>{let{isLoading:e,data:t}=(0,R.gz)({page:1,size:100}),s=null==t?void 0:t.items.filter(e=>!e.messaging_templates||0===e.messaging_templates.length),n=!!(!e&&(null==s?void 0:s.length)),a="missing-messages-notice-".concat(null==s?void 0:s.map(e=>e.id).join("-")),[l,o]=(0,u._)("notices.dismissedMessageNoticeId",""),c=a===l;return n&&!c?(0,i.jsx)(r.xuv,{mb:6,"data-testid":"notice-properties-without-messaging-templates",children:(0,i.jsx)(m.Z,{title:"Not all properties have messages configured.",text:(0,i.jsxs)(r.xvT,{as:"span",children:["You have properties that do not have messages configured. Users who submit privacy requests for these properties may not receive the necessary emails regarding their requests."," ",(0,i.jsx)(r.xuv,{as:"span",children:(0,i.jsx)(g.b,{label:null==s?void 0:s.map(e=>e.name).join(", ")})})]}),onClose:()=>{o(a)}})}):null},A=()=>{let{data:e}=(0,y.tB)({api_set:!1});return(null==e?void 0:e.notifications.enable_property_specific_messaging)?null:(0,i.jsx)(r.xuv,{mb:6,"data-testid":"notice-properties-without-messaging-templates",children:(0,i.jsx)(m.Z,{title:"Basic messaging enabled",text:(0,i.jsxs)(r.xvT,{as:"span",children:["In basic messaging mode, you can edit the content of your messages from this screen. Please note that in basic messaging, the “Enable” toggle does not apply. Fides also supports property specific messaging mode. Read our"," ",(0,i.jsx)(r.rUS,{href:"https://fid.es/property-specific-messaging",target:"_blank",rel:"nofollow",textDecoration:"underline",children:"docs"})," ","for more information about property specific mode or contact"," ",(0,i.jsx)(r.rUS,{href:"mailto:support@ethyca.com",textDecoration:"underline",children:"Ethyca support"})," ","to enable this mode on your Fides instance."]})})})};var N=()=>{let e=(0,c.useRouter)(),{toggleIsTemplateEnabled:t}=w(),{PAGE_SIZES:s,pageSize:l,setPageSize:u,onPreviousPageClick:m,isPreviousPageDisabled:g,onNextPageClick:y,isNextPageDisabled:b,startRange:C,endRange:T,pageIndex:R,setTotalPages:N}=(0,f.oi)(),{data:M,isLoading:z,isFetching:V}=(0,E.ms)({page:R,size:l}),{items:q,total:U,pages:O}=(0,d.useMemo)(()=>null!=M?M:I,[M]);(0,d.useEffect)(()=>{N(O)},[O,N]);let[W,B]=(0,d.useState)(!1),Y=(0,d.useMemo)(()=>[P.accessor(e=>e.type,{id:"message",cell:e=>(0,i.jsx)(f.G3,{value:v.Z[e.getValue()]}),header:e=>(0,i.jsx)(f.Rr,{value:"Message",...e}),size:150}),P.accessor(e=>(e.properties||[]).map(e=>e.name),{id:"properties",cell:e=>(0,i.jsx)(f.WP,{suffix:"properties",value:e.getValue(),...e}),header:e=>(0,i.jsx)(f.Rr,{value:"Properties",...e}),meta:{showHeaderMenu:!0},size:250}),P.accessor(e=>e.is_enabled,{id:"is_enabled",cell:e=>(0,i.jsx)(r.kCb,{align:"center",justifyContent:"flex-start",w:"full",h:"full",children:(0,i.jsx)(r.rAg,{checked:e.getValue(),onChange:s=>{t({isEnabled:s,templateId:e.row.original.id})}})}),header:e=>(0,i.jsx)(f.Rr,{value:"Enable",...e}),size:200,meta:{disableRowClick:!0}})],[t]),D=(0,d.useMemo)(()=>o()(q,"id"),[q]),Z=(0,a.b7)({getCoreRowModel:(0,n.sC)(),getFilteredRowModel:(0,n.vL)(),getSortedRowModel:(0,n.tj)(),columns:Y,data:D,columnResizeMode:"onChange"});return(0,i.jsxs)(p.Z,{title:"Messaging",children:[(0,i.jsx)(h.Z,{heading:"Messaging"}),(0,i.jsx)(A,{}),(0,i.jsx)(k,{}),(0,i.jsx)(f.Q$,{children:(0,i.jsx)(r.Ugi,{alignItems:"center",spacing:4,marginLeft:"auto",children:(0,i.jsx)(r.wpx,{type:"primary","data-testid":"add-message-btn",onClick:()=>B(!0),children:"Add message +"})})}),z?(0,i.jsx)(f.I4,{rowHeight:36,numRows:15}):(0,i.jsx)(f.ZK,{tableInstance:Z,onRowClick:t=>{e.push({pathname:x.ax,query:{id:t.id}})},emptyTableNotice:(0,i.jsx)(S,{})}),(0,i.jsx)(j.s8,{totalRows:U||0,pageSizes:s,setPageSize:u,onPreviousPageClick:m,isPreviousPageDisabled:g||V,onNextPageClick:y,isNextPageDisabled:b||V,startRange:C,endRange:T}),(0,i.jsx)(_,{isOpen:W,onClose:()=>B(!1),onAccept:t=>{e.push({pathname:x.sM,query:{templateType:t}})}})]})}},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}},function(e){e.O(0,[8765,9278,346,2888,9774,179],function(){return e(e.s=24081)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1921],{76985:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/ant-components",function(){return s(47002)}])},58754:function(e,l,s){"use strict";var i=s(24246),a=s(27824),n=s(70788);l.Z=e=>{let{heading:l,breadcrumbItems:s,isSticky:r=!0,children:t,rightContent:c,style:d,...o}=e;return(0,i.jsxs)("div",{...o,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,i.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof l?(0,i.jsx)(a.lQT,{className:s||t?"pb-4":void 0,level:1,"data-testid":"page-heading",children:l}):l,c&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:c})]}),!!s&&(0,i.jsx)(n.m,{className:t?"pb-4":void 0,items:s,"data-testid":"page-breadcrumb"}),t]})}},70788:function(e,l,s){"use strict";s.d(l,{m:function(){return d}});var i=s(24246),a=s(27824),n=s(79894),r=s.n(n),t=s(27378);let{Text:c}=a.AntTypography,d=e=>{let{items:l,...s}=e,n=(0,t.useMemo)(()=>null==l?void 0:l.map((e,s)=>{let n=s===l.length-1,t={...e},d=t.onClick&&!t.href;return("string"==typeof t.title&&(t.title=(0,i.jsx)(c,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,children:t.title})),d)?t.title=(0,i.jsx)(a.wpx,{type:"text",size:"small",icon:t.icon,onClick:t.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:t.title}):(t.icon&&(t.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:t.icon}),t.title]})),t.href&&t.title&&(t.title=(0,i.jsx)(r(),{href:t.href,className:"ant-breadcrumb-link",children:t.title}),delete t.href)),t}),[l]);return(0,i.jsx)(a.zrq,{items:n,...s})}},47002:function(e,l,s){"use strict";s.r(l);var i=s(24246),a=s(27824),n=s(46238),r=s(58754);let{Content:t}=a.AntLayout,{Link:c,Paragraph:d,Text:o,Title:h}=a.AntTypography,u=[];for(let e=10;e<36;e+=1)u.push({label:e.toString(36)+e,value:e.toString(36)+e});l.default=()=>(0,i.jsx)(a.AntLayout,{children:(0,i.jsxs)(t,{className:"overflow-auto px-10 py-6",children:[(0,i.jsx)(r.Z,{heading:"Ant Design Proof of Concept"}),(0,i.jsxs)(a.bue,{gutter:16,className:"mt-6",children:[(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Button",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.wpx,{type:"primary",children:"Primary Button"}),(0,i.jsx)(a.wpx,{children:"Default Button"}),(0,i.jsx)(a.wpx,{type:"dashed",children:"Dashed Button"}),(0,i.jsx)(a.wpx,{type:"text",children:"Text Button"}),(0,i.jsx)(a.wpx,{type:"link",children:"Link Button"}),(0,i.jsx)(a.wpx,{type:"primary",loading:!0,children:"Loading Button"}),(0,i.jsx)(a.wpx,{type:"primary",disabled:!0,children:"Disabled Button"})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Switch",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.rAg,{defaultChecked:!0}),(0,i.jsx)(a.rAg,{size:"small",defaultChecked:!0}),(0,i.jsx)(a.rAg,{loading:!0,defaultChecked:!0})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Select",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.WPr,{defaultValue:"lucy",className:"w-32",options:[{value:"jack",label:"Jack"},{value:"lucy",label:"Lucy"},{value:"Yiminghe",label:"yiminghe"},{value:"disabled",label:"Disabled",disabled:!0}]}),(0,i.jsx)(a.WPr,{defaultValue:"lucy",className:"w-32",disabled:!0,options:[{value:"lucy",label:"Lucy"}]}),(0,i.jsx)(a.WPr,{defaultValue:"lucy",className:"w-32",loading:!0,options:[{value:"lucy",label:"Lucy"}]}),(0,i.jsx)(a.WPr,{defaultValue:"lucy",className:"w-32",allowClear:!0,options:[{value:"lucy",label:"Lucy"}]}),(0,i.jsx)(a.WPr,{mode:"multiple",allowClear:!0,className:"w-full",placeholder:"Please select",defaultValue:["a10","c12"],options:u}),(0,i.jsx)(a.WPr,{mode:"multiple",disabled:!0,className:"w-full",placeholder:"Please select",defaultValue:["a10","c12"],options:u})]})})})]}),(0,i.jsx)("br",{}),(0,i.jsxs)(a.bue,{gutter:16,children:[(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Checkbox",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.E_O,{children:"Checkbox"}),(0,i.jsx)(a.E_O,{defaultChecked:!0,children:"Checkbox"}),(0,i.jsx)(a.E_O,{disabled:!0,children:"Disabled"}),(0,i.jsx)(a.E_O,{indeterminate:!0,children:"Indeterminate"}),(0,i.jsx)(a.E_O.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange",disabled:!0}],defaultValue:["Apple"]})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Radio",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.y02,{children:"Radio"}),(0,i.jsx)(a.y02,{defaultChecked:!0,children:"Radio"}),(0,i.jsx)(a.y02,{disabled:!0,children:"Disabled"}),(0,i.jsx)(a.y02.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange",disabled:!0}],defaultValue:"Apple"}),(0,i.jsx)(a.y02.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange"}],defaultValue:"Apple",optionType:"button"}),(0,i.jsx)(a.y02.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange"}],defaultValue:"Apple",optionType:"button",buttonStyle:"solid"})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Input",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",size:"middle",children:[(0,i.jsx)(a.vyj.Compact,{children:(0,i.jsx)(a.uFc,{defaultValue:"26888888"})}),(0,i.jsxs)(a.vyj.Compact,{children:[(0,i.jsx)(a.uFc,{className:"w-1/5",defaultValue:"0571"}),(0,i.jsx)(a.uFc,{className:"w-4/5",defaultValue:"26888888"})]}),(0,i.jsx)(a.vyj.Compact,{children:(0,i.jsx)(a.uFc.Search,{addonBefore:"https://",placeholder:"input search text",allowClear:!0})}),(0,i.jsxs)(a.vyj.Compact,{className:"w-full",children:[(0,i.jsx)(a.uFc,{defaultValue:"Combine input and button"}),(0,i.jsx)(a.wpx,{type:"primary",children:"Submit"})]}),(0,i.jsxs)(a.vyj.Compact,{children:[(0,i.jsx)(a.WPr,{defaultValue:"Zhejiang",options:u}),(0,i.jsx)(a.uFc,{defaultValue:"Xihu District, Hangzhou"})]})]})})})]}),(0,i.jsx)("br",{}),(0,i.jsxs)(a.bue,{gutter:16,children:[(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Tooltip",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.esZ,{title:"I'm a tooltip",children:"Hover or focus this text"}),(0,i.jsx)(n.b,{label:"Tooltip will show on mouse enter or focus."}),(0,i.jsx)(a.esZ,{title:"Focus styles don't change for naturally focusable elements like buttons",children:(0,i.jsx)(a.wpx,{children:"Button with tooltip"})})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Alert",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.DUx,{message:"Success Tips",type:"success",showIcon:!0}),(0,i.jsx)(a.DUx,{message:"Informational Notes",type:"info",showIcon:!0}),(0,i.jsx)(a.DUx,{message:"Warning",type:"warning",showIcon:!0,closable:!0}),(0,i.jsx)(a.DUx,{message:"Error",type:"error",showIcon:!0})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Tag",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.jqI,{wrap:!0,gap:"small",children:[(0,i.jsx)(a.j8w,{color:"default",children:"default"}),(0,i.jsx)(a.j8w,{color:"corinth",children:"corinth"}),(0,i.jsx)(a.j8w,{color:"minos",children:"minos"}),(0,i.jsx)(a.j8w,{color:"terracotta",children:"terracotta"}),(0,i.jsx)(a.j8w,{color:"olive",children:"olive"}),(0,i.jsx)(a.j8w,{color:"marble",children:"marble"}),(0,i.jsx)(a.j8w,{color:"sandstone",children:"sandstone"}),(0,i.jsx)(a.j8w,{color:"nectar",children:"nectar"}),(0,i.jsx)(a.j8w,{color:"error",children:"error"}),(0,i.jsx)(a.j8w,{color:"warning",children:"warning"}),(0,i.jsx)(a.j8w,{color:"caution",children:"caution"}),(0,i.jsx)(a.j8w,{color:"success",children:"success"}),(0,i.jsx)(a.j8w,{color:"info",children:"info"}),(0,i.jsx)(a.j8w,{color:"alert",children:"alert"}),(0,i.jsx)(a.j8w,{color:"white",children:"white"}),(0,i.jsx)(a.j8w,{closable:!0,onClose:()=>console.log("closed"),children:"Closable Tag"}),(0,i.jsx)(a.j8w,{onClick:()=>console.log("clicked"),addable:!0}),(0,i.jsx)(a.j8w,{onClick:()=>console.log("clicked"),addable:!0,children:"Add More"}),(0,i.jsxs)(a.j8w,{hasSparkle:!0,onClick:()=>console.log("clicked"),children:["Data Use",(0,i.jsx)(a.PJP.I8b,{})]}),(0,i.jsx)(a.j8w,{hasSparkle:!0,onClick:()=>console.log("clicked"),closable:!0,onClose:()=>console.log("closed"),children:"Data Category"})]})})})]}),(0,i.jsx)("br",{}),(0,i.jsxs)(a.bue,{gutter:16,children:[(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Typography Headings",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(h,{level:1,children:"H1 default"}),(0,i.jsx)(h,{level:1,headingSize:2,children:"H1 sized as H2"}),(0,i.jsx)(h,{level:1,headingSize:3,children:"H1 sized as H3"}),(0,i.jsx)(a.htM,{style:{margin:0}}),(0,i.jsx)(h,{level:2,children:"H2 default"}),(0,i.jsx)(h,{level:2,headingSize:1,children:"H2 sized as H1"}),(0,i.jsx)(h,{level:2,headingSize:3,children:"H2 sized as H3"}),(0,i.jsx)(a.htM,{style:{margin:0}}),(0,i.jsx)(h,{level:3,children:"H3 default"}),(0,i.jsx)(h,{level:3,headingSize:1,children:"H3 sized as H1"}),(0,i.jsx)(h,{level:3,headingSize:2,children:"H3 sized as H2"})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Typography Paragraphs",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.AntTypography,{children:[(0,i.jsx)(d,{children:"This paragraph has a bottom margin. Imperdiet ex curae laoreet turpis adipiscing pulvinar erat conubia rhoncus, faucibus dictum porta integer tincidunt iaculis pharetra. Dis praesent egestas curae tortor primis volutpat metus ridiculus sit rutrum vitae ac aenean, nisi dolor a per molestie etiam ad tristique magnis fames laoreet."}),(0,i.jsx)(d,{children:"This paragraph has no bottom margin. Imperdiet ex curae laoreet turpis adipiscing pulvinar erat conubia rhoncus, faucibus dictum porta integer tincidunt iaculis pharetra."}),(0,i.jsx)(d,{type:"secondary",children:"This paragraph uses secondary color. laoreet turpis adipiscing pulvinar erat conubia rhoncus, faucibus dictum porta integer tincidunt iaculis pharetra."})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Typography Text & Link",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(o,{children:"Ant Design (default)"}),(0,i.jsx)(o,{size:"sm",children:"Ant Design (small)"}),(0,i.jsx)(o,{size:"lg",children:"Ant Design (large)"}),(0,i.jsx)(o,{type:"secondary",children:"Ant Design (secondary)"}),(0,i.jsx)(o,{type:"success",children:"Ant Design (success)"}),(0,i.jsx)(o,{type:"warning",children:"Ant Design (warning)"}),(0,i.jsx)(o,{type:"danger",children:"Ant Design (danger)"}),(0,i.jsx)(o,{disabled:!0,children:"Ant Design (disabled)"}),(0,i.jsx)(o,{mark:!0,children:"Ant Design (mark)"}),(0,i.jsx)(o,{code:!0,children:"Ant Design (code)"}),(0,i.jsx)(o,{keyboard:!0,children:"Ant Design (keyboard)"}),(0,i.jsx)(o,{underline:!0,children:"Ant Design (underline)"}),(0,i.jsx)(o,{delete:!0,children:"Ant Design (delete)"}),(0,i.jsx)(o,{strong:!0,children:"Ant Design (strong)"}),(0,i.jsx)(o,{italic:!0,children:"Ant Design (italic)"}),(0,i.jsx)(c,{href:"https://ant.design",target:"_blank",children:"Ant Design (Link)"})]})})})]})]})})}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=76985)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3564],{22657:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/table-migration",function(){return t(26161)}])},6675:function(e,s,t){"use strict";t.d(s,{ZS:function(){return i},a4:function(){return l}});var n=t(3228);let a=t(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:l}=a,r={purposes:{},special_purposes:{}},i=(0,n.P1)(a.endpoints.getPurposes.select(),e=>{let{data:s}=e;return s||r})},48347:function(e,s,t){"use strict";t.d(s,{W:function(){return o},m:function(){return c}});var n=t(24246),a=t(27824),l=t(32885);let{Text:r,Title:i}=a.AntTypography,o=()=>{let{isOpen:e,onOpen:s,onClose:t}=(0,a.qY0)();return{isOpen:e,onOpen:s,onClose:t}},c=e=>{let{isOpen:s,onClose:t,fidesKey:o}=e,{data:c,isLoading:u}=(0,l.ho)(o),d=(e,s)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i,{level:5,children:e}),(null==s?void 0:s.length)?(0,n.jsx)("div",{children:(0,n.jsx)(a.vyj,{size:[0,2],wrap:!0,children:null==s?void 0:s.map(e=>(0,n.jsx)(a.j8w,{children:e},e))})}):(0,n.jsxs)(r,{italic:!0,children:["no known ",e.toLowerCase()]})]});return(0,n.jsxs)(a.u_l,{isOpen:s,onClose:t,size:"xxl",returnFocusOnClose:!1,isCentered:!0,children:[(0,n.jsx)(a.ZAr,{}),(0,n.jsxs)(a.hzk,{maxWidth:"800px",children:[(0,n.jsx)(a.xBx,{children:c?null==c?void 0:c.name:"Vendor"}),(0,n.jsx)(a.fef,{children:u?(0,n.jsx)(a.jqI,{className:"h-80 w-full",align:"center",justify:"center",children:(0,n.jsx)(a.$jN,{})}):!!c&&(0,n.jsxs)(a.AntTypography,{children:[(0,n.jsx)(i,{level:5,children:"Purposes"}),Object.entries(c.purposes||{}).length>0?(0,n.jsx)(a.UQy,{allowMultiple:!0,children:Object.entries(c.purposes).map((e,s)=>{let[t]=e;return(0,n.jsx)(a.Qdk,{children:e=>{let{isExpanded:s}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.KFZ,{backgroundColor:s?"gray.50":"unset",children:[(0,n.jsx)(a.xuv,{flex:"1",textAlign:"left",children:t}),(0,n.jsx)(a.XEm,{})]}),(0,n.jsxs)(a.Hk3,{backgroundColor:"gray.50",children:[(0,n.jsx)(a.jqI,{className:"my-4",vertical:!0,children:d("Data uses",c.purposes[t].data_uses)}),(0,n.jsx)(a.jqI,{className:"my-4",vertical:!0,children:d("Legal basis",c.purposes[t].legal_bases)})]})]})}},s)})}):(0,n.jsx)(r,{italic:!0,children:"no known purposes"}),(0,n.jsx)("div",{className:"my-4",children:d("Features",c.features)}),(0,n.jsx)("div",{className:"my-4",children:d("Data categories",c.data_categories)})]})}),(0,n.jsxs)(a.mzw,{children:[(0,n.jsx)(a.wpx,{size:"small",onClick:t,children:"Close"}),(0,n.jsx)(a.LZC,{})]})]})]})}},26161:function(e,s,t){"use strict";t.r(s),t.d(s,{TableMigrationPOC:function(){return y}});var n=t(24246),a=t(25980),l=t(27824),r=t(86677),i=t(27378),o=t(16134),c=t(77830),u=t(6675),d=t(23923),p=t(48347),x=t(28079),j=t(32885);let{Content:h}=l.AntLayout,{Title:m,Paragraph:g}=l.AntTypography,f=[{text:"Advertising",value:"advertising"},{text:"Analytics",value:"analytics"},{text:"Functional",value:"functional"},{text:"Essential",value:"essential"}],_=[{text:"Consent",value:"Consent"},{text:"Legitimate Interest",value:"Legitimate interests"}],y=()=>{let{tcf:e,dictionaryService:s}=(0,a.hz)(),t=(0,r.useRouter)(),[y,C]=(0,i.useState)(""),[v,b]=(0,i.useState)(""),[k,w]=(0,i.useState)(25),[I,T]=(0,i.useState)(1),[N,S]=(0,i.useState)(),[O,A]=(0,i.useState)({});(0,x.fd)();let z=(0,o.C)(x.U3);(0,u.a4)();let E=(0,o.C)(u.ZS),P=(0,i.useMemo)(()=>[...Object.entries(E.purposes).map(e=>{let[s,t]=e;return{text:t.name,value:s}}),...Object.entries(E.special_purposes).map(e=>{let[s,t]=e;return{text:t.name,value:s}})],[E]),F=(0,i.useMemo)(()=>z.map(e=>({text:e.name||e.fides_key,value:e.fides_key})),[z]),{isOpen:L,onOpen:V,onClose:q}=(0,p.W)(),U=(()=>{let e=(O.data_uses||[]).map(e=>"data_uses=".concat(encodeURIComponent(e))).join("&");return{dataUses:e,legalBasis:(O.legal_bases||[]).map(e=>"legal_bases=".concat(encodeURIComponent(e))).join("&"),purposes:(O.tcf_purpose||[]).map(e=>"purposes=".concat(encodeURIComponent(e))).join("&"),specialPurposes:"",consentCategories:(O.consent_categories||[]).map(e=>"consent_category=".concat(encodeURIComponent(e))).join("&")}})(),{data:M,isLoading:R}=(0,j.de)({pageIndex:I,pageSize:k,search:v,...U}),Z=(null==M?void 0:M.total)||0,D=(null==M?void 0:M.items)||[];(0,i.useEffect)(()=>{let e=setTimeout(()=>{b(y),1!==I&&T(1)},300);return()=>clearTimeout(e)},[y]);let B=(0,i.useCallback)(e=>{C(e.target.value)},[]),K=e=>{S(e.fides_key),V()},W=[{title:"Vendor",dataIndex:"name",key:"name",filteredValue:O.name||null},...e?[{title:"TCF purpose",dataIndex:"data_uses",key:"tcf_purpose",render:e=>(0,n.jsxs)(l.j8w,{children:[e," ",1===e?"purpose":"purposes"]}),filters:P,filteredValue:O.tcf_purpose||null},{title:"Data use",dataIndex:"data_uses",key:"data_uses",render:e=>(0,n.jsxs)(l.j8w,{children:[e," ",1===e?"data use":"data uses"]}),filters:F,filteredValue:O.data_uses||null},{title:"Legal basis",dataIndex:"legal_bases",key:"legal_bases",render:e=>(0,n.jsxs)(l.j8w,{children:[e," ",1===e?"basis":"bases"]}),filters:_,filteredValue:O.legal_bases||null}]:[{title:"Categories",dataIndex:"consent_categories",key:"consent_categories",render:e=>(0,n.jsxs)(l.j8w,{children:[e," ",1===e?"category":"categories"]}),filters:f,filteredValue:O.consent_categories||null},{title:"Cookies",dataIndex:"cookies",key:"cookies",render:e=>(0,n.jsxs)(l.j8w,{children:[e," ",1===e?"cookie":"cookies"]})}]];return(0,n.jsxs)(h,{className:"overflow-auto px-10 py-6",children:[(0,n.jsx)(l.bue,{children:(0,n.jsx)(m,{children:"Table Migration POC"})}),(0,n.jsx)(g,{className:"mb-6",children:"This is a demonstration of migrating the ConsentManagementTable from TanStack Table to Ant Design Table with built-in filtering."}),L&&N?(0,n.jsx)(p.m,{isOpen:L,fidesKey:N,onClose:q}):null,(0,n.jsxs)(l.jqI,{justify:"space-between",align:"center",className:"mb-4",children:[(0,n.jsx)(l.uFc.Search,{placeholder:"Search",onSearch:e=>{C(e)},style:{width:300},value:y,onChange:B}),(0,n.jsxs)(l.vyj,{size:8,children:[(0,n.jsx)(d.Z,{buttonLabel:"Add vendors",onButtonClick:s?()=>{t.push(c.Gg)}:void 0}),(0,n.jsx)(l.wpx,{onClick:()=>{A({})},children:"Clear filters"})]})]}),(0,n.jsx)(l.V5H,{dataSource:D,columns:W,loading:R,rowKey:"id",pagination:{current:I,pageSize:k,total:Z},onChange:(e,s)=>{T(e.current),w(e.pageSize),A(s)},onRow:e=>({onClick:()=>K(e),style:{cursor:"pointer"}}),size:"small"})]})};s.default=y}},function(e){e.O(0,[401,3923,2888,9774,179],function(){return e(e.s=22657)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9650],{6554:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/[id]",function(){return i(8063)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var s=i(24246),n=i(27824),a=i(88038),l=i.n(a),r=i(86677);i(27378);var o=i(25980),c=i(90867),d=i(77830),u=()=>{let e=(0,r.useRouter)();return(0,s.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(n.xuv,{children:[(0,s.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(n.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,s.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:a=!0,mainProps:d}=e,m=(0,o.hz)(),p=(0,r.useRouter)(),h="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,x=!(m.flags.privacyRequestsConfiguration&&h),{data:g}=(0,c.JE)(void 0,{skip:x}),{data:j}=(0,c.PW)(void 0,{skip:x}),v=m.flags.privacyRequestsConfiguration&&(!g||!j)&&h;return(0,s.jsxs)(n.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(l(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(n.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[v?(0,s.jsx)(u,{}):null,t]})]})}},8063:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return eB}});var s,n,a,l,r=i(24246),o=i(27824),c=i(86677),d=i(77213),u=i(77830),m=i(58754),p=i(99716),h=i(27378),x=i(54682),g=i(19904);(s=a||(a={})).IN_PROCESSING="in_processing",s.PENDING="pending",s.COMPLETE="complete",s.ERROR="error",s.PAUSED="paused",s.AWAITING_PROCESSING="awaiting_processing",s.RETRYING="retrying",s.SKIPPED="skipped";let j={in_processing:"In processing",pending:"Pending",complete:"Complete",error:"Error",paused:"Paused",awaiting_processing:"Awaiting input",retrying:"Retrying",skipped:"Skipped"},v={error:"error",skipped:"warning",awaiting_processing:"minos",in_processing:void 0,pending:void 0,complete:void 0,paused:void 0,retrying:void 0};(n=l||(l={})).REQUEST_UPDATE="Request update",n.INTERNAL_COMMENT="Internal comment",n.MANUAL_TASK="Manual task";let y={"Request update":"sandstone","Internal comment":"marble","Manual task":"nectar"};var f=i(90005),_=i.n(f),b=i(16394),T=i(38450),w=i.n(T);let E=e=>{let{attachments:t}=e;if(!t.length)return null;if(1===t.length){let e=t[0];return(0,r.jsx)("div",{className:"flex flex-wrap gap-2 text-sm text-gray-600","data-testid":"activity-timeline-attachments",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(o.PJP.PgN,{className:"mr-1 size-4"}),(0,r.jsx)(o.AntTypography.Text,{ellipsis:{tooltip:!0},className:"!max-w-[200px]",children:e.file_name})]})})}let i=(0,r.jsx)("ul",{className:"list-disc pl-4",children:t.map(e=>(0,r.jsx)("li",{children:e.file_name},e.id))});return(0,r.jsx)("div",{className:"flex flex-wrap gap-2 text-sm text-gray-600","data-testid":"activity-timeline-attachments",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(o.PJP.PgN,{className:"mr-1 size-4"}),(0,r.jsx)(o.esZ,{title:i,children:(0,r.jsxs)(o.AntTypography.Text,{ellipsis:!0,className:"!max-w-[200px]",children:[t.length," attachments"]})})]})})};var R=e=>{let{item:t}=e,{author:i,title:s,date:n,type:a,onClick:c,isError:d,isAwaitingInput:u,description:m,attachments:p,showViewLog:h}=t,x=(0,b.p6)(n),g=!!c,j=p&&p.length>0,v=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:w().header,children:[(0,r.jsxs)("span",{className:w().author,"data-testid":"activity-timeline-author",children:[i,":"]}),s&&(0,r.jsxs)(o.AntTypography.Text,{className:_()(w().title,{[w()["title--error"]]:d,[w()["title--awaiting-input"]]:u}),ellipsis:{tooltip:!0},"data-testid":"activity-timeline-title",children:[s,d&&" failed"]}),(0,r.jsx)("div",{className:"hidden xl:block",children:(0,r.jsx)(o.AntTypography.Text,{className:w().timestamp,"data-testid":"activity-timeline-timestamp",children:x})}),(0,r.jsx)("div",{className:"xl:hidden",children:(0,r.jsx)(o.esZ,{title:x,children:(0,r.jsx)(o.PJP.qpU,{"data-testid":"activity-timeline-timestamp-icon"})})}),(0,r.jsx)(o.j8w,{className:w().type,color:y[a],"data-testid":"activity-timeline-type",children:a}),h&&(0,r.jsx)("span",{className:w().viewLogs,"data-testid":"activity-timeline-view-logs",children:"View Log"})]}),(m||j)&&(0,r.jsxs)("div",{className:"mt-2 flex justify-between pl-2.5 align-top",children:[(0,r.jsx)(o.AntTypography.Paragraph,{className:"!mb-0 whitespace-pre-wrap","data-testid":"activity-timeline-description",children:m||""}),j&&(0,r.jsx)(E,{attachments:p})]})]}),f={className:_()(w().itemButton,{[w()["itemButton--error"]]:d,[w()["itemButton--awaiting-input"]]:u,[w()["itemButton--clickable"]]:g,[w()["itemButton--comment"]]:a===l.INTERNAL_COMMENT,[w()["itemButton--manual-task"]]:a===l.MANUAL_TASK}),"data-testid":"activity-timeline-item"};return g?(0,r.jsx)("button",{type:"button",onClick:c,...f,children:v}):(0,r.jsx)("div",{...f,children:v})},A=i(25980),k=i(54427),C=i(78780);let{useGetCommentsQuery:S,useCreateCommentMutation:q,useGetCommentDetailsQuery:N,useLazyGetCommentDetailsQuery:P}=C.u.injectEndpoints({endpoints:e=>({getComments:e.query({query:e=>{let{privacy_request_id:t,page:i=1,size:s}=e;return{url:"plus/privacy-request/".concat(t,"/comment"),method:"GET",params:{page:i,size:s}}},providesTags:["Privacy Request Comments"]}),createComment:e.mutation({query:e=>{let{privacy_request_id:t,comment_text:i,comment_type:s}=e,n=new FormData;return n.append("comment_text",i),n.append("comment_type",s),{url:"plus/privacy-request/".concat(t,"/comment"),method:"POST",body:n,formData:!0}},invalidatesTags:["Privacy Request Comments","Request"]}),getCommentDetails:e.query({query:e=>{let{privacy_request_id:t,comment_id:i}=e;return{url:"plus/privacy-request/".concat(t,"/comment/").concat(i),method:"GET"}}})})}),{reducer:I}=(0,k.oM)({name:"privacyRequestComments",initialState:{},reducers:{}}),O=e=>{let{plus:t}=(0,A.hz)(),{data:i,isLoading:s,error:n}=S({privacy_request_id:e,size:100},{skip:!t});return(0,h.useEffect)(()=>{n&&o.Pg3.error("Failed to fetch the request comments")},[n]),{commentItems:(null==i?void 0:i.items)?i.items.map(e=>({author:e.user_first_name&&e.user_last_name?"".concat(e.user_first_name," ").concat(e.user_last_name):e.username||"Unknown",date:new Date(e.created_at),type:l.INTERNAL_COMMENT,showViewLog:!1,description:e.comment_text,isError:!1,isSkipped:!1,isAwaitingInput:!1,id:"comment-".concat(e.id)})):[],isLoading:s}},D=e=>{let t=!e;return{eventItems:e?Object.entries(e).map(e=>{let[t,i]=e,s=i.some(e=>e.status===a.ERROR),n=i.some(e=>e.status===a.SKIPPED),r=i.some(e=>e.status===a.AWAITING_PROCESSING);return{author:"Fides",title:t,date:new Date(i[0].updated_at),type:l.REQUEST_UPDATE,showViewLog:s||n||r,onClick:()=>{},isError:s,isSkipped:n,isAwaitingInput:r,id:"request-".concat(t)}}):[],isLoading:t}};var U=i(91317),M=i(45116);let z=e=>{let{plus:t}=(0,A.hz)(),{data:i,isLoading:s,error:n}=(0,M.Ym)({page:1,size:100,privacyRequestId:e,status:void 0,includeFullSubmissionDetails:!0},{skip:!t});return(0,h.useEffect)(()=>{n&&o.Pg3.error("Failed to fetch manual tasks")},[n]),{manualTaskItems:i?i.items.filter(e=>e.status===x.OS.COMPLETED||e.status===x.OS.SKIPPED).map(e=>{var t,i;let s=e.submission_user?(0,b.gJ)(e.submission_user):"Unknown User";(0,U.PN)(null===(t=e.submission_user)||void 0===t?void 0:t.id)&&(s=(null===(i=e.submission_user)||void 0===i?void 0:i.id)||"Unknown User");let n=e.status===x.OS.SKIPPED,a="Task ".concat(n?"skipped":"completed"," - ").concat(e.name),r=e.comments&&e.comments.length>0?e.comments[e.comments.length-1].comment_text:void 0,o=e.attachments||[];return{author:s,title:a,date:new Date(e.updated_at),type:l.MANUAL_TASK,showViewLog:!1,description:r,isError:!1,isSkipped:n,isAwaitingInput:!1,id:"manual-task-".concat(e.manual_field_id),attachments:o}}):[],taskCommentIds:(0,h.useMemo)(()=>{let e=new Set;return(null==i?void 0:i.items)&&i.items.filter(e=>e.status===x.OS.COMPLETED||e.status===x.OS.SKIPPED).forEach(t=>{var i;null===(i=t.comments)||void 0===i||i.forEach(t=>{e.add(t.id)})}),e},[i]),isLoading:s}};var L=i(88340),W=e=>{let{errorMessage:t,status:i=a.ERROR}=e;return(0,r.jsxs)(o.xuv,{height:"100%",id:"outer",children:[(0,r.jsxs)(o.kCb,{alignItems:"center",children:[(0,r.jsx)(o.xvT,{size:"sm",color:"gray.700",fontWeight:"medium",marginRight:"8px",lineHeight:"20px",children:"Status"}),(0,r.jsx)(o.j8w,{color:v[i],children:j[i]}),(0,r.jsx)(o.xuv,{padding:"0px",marginBottom:"3px",children:(0,r.jsx)(L.Z,{copyText:t})})]}),(0,r.jsx)(o.izJ,{marginTop:"4px",marginBottom:"6px"}),(0,r.jsx)(o.xuv,{id:"errorWrapper",overflow:"auto",height:"100%",children:(0,r.jsx)(o.xvT,{children:t})})]})},B=i(3124),F=i.n(B);let Z=e=>{switch(e){case x.Us.ACCESS:return"Data Retrieval";case x.Us.ERASURE:return"Data Deletion";case x.Us.CONSENT:return"Consent";case x.Us.UPDATE:return"Data Update";default:return e}},J=e=>{if(e.status!==a.COMPLETE||!e.collection_name)return"-";let t=(e.message||"").match(/(?:retrieved|masked|processed)\s+(\d+)\s+records?$/i);return t?parseInt(t[1],10).toLocaleString():"-"},G=(e,t)=>{let i=e.filter(e=>e.action_type===t&&e.status===a.COMPLETE&&e.collection_name).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()),s={};i.forEach(e=>{let t=e.collection_name||"unknown";s[t]||(s[t]=e)});let n=0,l=!1,r=/(?:retrieved|masked|processed)\s+(\d+)\s+records?$/i;return Object.values(s).forEach(e=>{if(e.message){let t=e.message.match(r);if(t){l=!0;let e=parseInt(t[1],10);n+=e}}}),l?n:null},K=(e,t,i)=>{if("finished"===e.status&&!e.collection_name&&i){let e=G(t,i);return null!==e?e.toLocaleString():"-"}return J(e)};var H=e=>{var t,i,s;let{eventLogs:n,allEventLogs:l,onDetailPanel:c,privacyRequest:d}=e,u=(null==n?void 0:n.some(e=>e.collection_name))||(null==n?void 0:n.some(e=>"finished"===e.status&&!e.collection_name))||!1,m=null==n?void 0:n.every(e=>"finished"===e.status&&!e.collection_name),p=null==d?void 0:null===(s=d.policy)||void 0===s?void 0:null===(i=s.rules)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.action_type,h=e=>e?Z(e):p?Z(p):"-",x=null==n?void 0:n.map(e=>(0,r.jsxs)(o.Tr,{backgroundColor:e.status===a.ERROR||e.status===a.SKIPPED&&e.message||e.status===a.AWAITING_PROCESSING?F().FIDESUI_NEUTRAL_50:"unset",onClick:()=>{(e.status===a.ERROR||e.status===a.SKIPPED&&e.message||e.status===a.AWAITING_PROCESSING)&&c(e.message,e.status)},style:{cursor:e.message?"pointer":"unset"},_hover:{backgroundColor:F().FIDESUI_NEUTRAL_50},children:[(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:(0,b.p6)(e.updated_at)})}),(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:h(e.action_type)})}),u&&!m&&(0,r.jsx)(o.Td,{children:j[e.status]?(0,r.jsx)(o.j8w,{color:v[e.status],children:j[e.status]}):(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.status})}),u&&(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:K(e,l||n,p)})}),u&&!m&&(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"finished"===e.status?"Request completed":e.collection_name})})]},e.updated_at));return(0,r.jsx)(o.xuv,{width:"100%",paddingTop:"0px",height:"100%",children:(0,r.jsx)(o.xJi,{id:"tableContainer",height:"100%",style:{overflowY:"auto"},children:(0,r.jsxs)(o.iA_,{size:"sm",id:"table",position:"relative",children:[(0,r.jsx)(o.hrZ,{id:"tableHeader",position:"sticky",top:"0px",backgroundColor:"white",zIndex:10,children:(0,r.jsxs)(o.Tr,{children:[(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Time"})}),(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Action Type"})}),u&&!m&&(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Status"})}),u&&(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Records"})}),u&&!m&&(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Collection"})})]})}),(0,r.jsx)(o.p3B,{id:"tableBody",children:x})]})})})},V=e=>{let{isOpen:t,onClose:i,currentLogs:s,allEventLogs:n,isViewingError:l,errorMessage:c,currentStatus:d=a.ERROR,onCloseErrorPanel:u,onOpenErrorPanel:m,privacyRequest:p}=e;return(0,r.jsxs)(o.dys,{isOpen:t,placement:"right",onClose:i,size:"full",autoFocus:!1,"data-testid":"log-drawer",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{style:{width:"50%"},"data-testid":"log-drawer",children:[(0,r.jsx)(o.OXI,{style:{paddingBottom:"0px"},children:(0,r.jsxs)(o.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:[(0,r.jsxs)(o.kCb,{alignItems:"center",children:[l&&(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.Rpv,{}),"aria-label":"Close error logs",size:"small",onClick:u}),(0,r.jsx)(o.xvT,{color:"gray.900",fontSize:"md",lineHeight:"6",fontWeight:"medium",ml:1,children:l?"Event detail":"Event log"})]}),(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.LGN,{width:"17px"}),"aria-label":"Stop viewing error message",size:"small",onClick:i,"data-testid":"log-drawer-close"})]})}),(0,r.jsxs)(o.Ng0,{id:"drawerBody",overflow:"hidden",children:[s&&!l?(0,r.jsx)(H,{eventLogs:s,allEventLogs:n,onDetailPanel:m,privacyRequest:p}):null,l?(0,r.jsx)(W,{errorMessage:c,status:d}):null]})]})]})},Y=e=>{let{subjectRequest:t}=e,{isOpen:i,onOpen:s,onClose:n}=(0,o.qY0)(),[c,d]=(0,h.useState)([]),[u,m]=(0,h.useState)(""),[p,x]=(0,h.useState)(!1),[g,j]=(0,h.useState)(""),[v,y]=(0,h.useState)(a.ERROR),{results:f,id:_}=t,{commentItems:b,isLoading:T}=O(_),{eventItems:E,isLoading:A}=D(f),{manualTaskItems:k,taskCommentIds:C,isLoading:S}=z(_);(0,h.useEffect)(()=>{u&&f&&f[u]&&d(f[u])},[f,u]);let q=()=>{x(!1)},N=(0,h.useCallback)((e,t)=>{m(e),d(t),s()},[s]),P=(0,h.useMemo)(()=>f?Object.values(f).flat():[],[f]),I=(0,h.useMemo)(()=>b.filter(e=>{let t=e.id.replace("comment-","");return!C.has(t)}),[b,C]),U=(0,h.useMemo)(()=>{let e=E.map(e=>{if("Request update"===e.type&&e.title&&f){let t=e.title;if(f[t])return{...e,onClick:()=>N(t,f[t])}}return e});return[{author:"Fides",title:"Access request received",date:new Date(t.created_at),type:l.REQUEST_UPDATE,showViewLog:!1,isError:!1,isSkipped:!1,isAwaitingInput:!1,id:"initial-request"},...e,...I,...k].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())},[E,I,k,f,N,t.created_at]);return(0,r.jsxs)(o.xuv,{width:"100%",children:[(0,r.jsx)(o.krs,{className:"!border-none",bordered:!1,split:!1,"data-testid":"activity-timeline-list",children:(0,r.jsx)("ul",{className:"!list-none",children:T||A||S?(0,r.jsx)("div",{className:w().itemButton,"data-testid":"timeline-skeleton",children:(0,r.jsx)(o.N_L,{paragraph:{rows:2},active:!0})}):U.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(R,{item:e})},e.id))})}),(0,r.jsx)(V,{isOpen:i,onClose:()=>{p&&q(),m(""),n()},currentLogs:c,allEventLogs:P,isViewingError:p,errorMessage:g,currentStatus:v,onOpenErrorPanel:(e,t)=>{j(e),t&&y(t),x(!0)},onCloseErrorPanel:q,privacyRequest:t})]})},Q=i(66187);let $=e=>{let{privacyRequestId:t,onCancel:i}=e,[s,n]=(0,h.useState)(""),a=(0,h.useRef)(null),[l,{isLoading:c}]=q();(0,h.useEffect)(()=>{a.current&&a.current.focus()},[]);let d=async()=>{if(s.trim())try{await l({privacy_request_id:t,comment_text:s,comment_type:Q.i.NOTE}).unwrap(),n(""),i()}catch(e){console.error("Failed to add comment:",e),o.Pg3.error({content:"Failed to add comment",duration:5})}},u=[{key:"internal",label:"Internal comment",children:(0,r.jsx)(o.uFc.TextArea,{ref:a,value:s,onChange:e=>n(e.target.value),rows:3,className:"mb-3 h-[150px] w-full !resize-none","data-testid":"comment-input"})}];return(0,r.jsxs)("div",{children:[(0,r.jsx)(o.A5g,{items:u}),(0,r.jsxs)(o.jqI,{justify:"flex-end",className:"gap-2",children:[(0,r.jsx)(o.wpx,{onClick:i,"data-testid":"cancel-comment-button",children:"Cancel"}),(0,r.jsx)(o.wpx,{onClick:d,loading:c,disabled:!s.trim(),type:"primary",htmlType:"button","data-testid":"submit-comment-button",children:"Save"})]})]})};var X=e=>{let{subjectRequest:t}=e,[i,s]=(0,h.useState)(!1);return(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)(Y,{subjectRequest:t}),i?(0,r.jsx)($,{privacyRequestId:t.id,onCancel:()=>s(!1)}):(0,r.jsx)(g.ZP,{scopes:[x.Sh.COMMENT_CREATE],children:(0,r.jsx)(o.jqI,{justify:"flex-start",className:"mt-2",children:(0,r.jsxs)(o.wpx,{type:"default",onClick:()=>s(!0),className:"flex items-center","data-testid":"add-comment-button",children:["Add comment ",(0,r.jsx)("span",{className:"ml-1",children:"+"})]})})})]})},ee=i(14207),et=i(46238),ei=i(72281),es=i(14047),en=i(90867),ea=i(16134);let el=e=>Array.from(new Set(e.filter(e=>Object.values(x.Us).includes(e.action_type)).map(e=>e.action_type)));var er=e=>{let{rules:t}=e,i=el(t).map(e=>(0,b.kC)(e)).map(e=>e);return(0,r.jsx)(o.AntTypography.Text,{children:i.join(" - ")})},eo=i(34090),ec=i(55484),ed=e=>{let{connectorName:t,data:i,isSubmitting:s=!1,onSaveClick:n}=e,{isOpen:a,onOpen:l,onClose:c}=(0,o.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{n({connection_key:i.connection_key,privacy_request_id:i.privacy_request_id,body:{...e}}),c()};return(0,r.jsxs)(r.Fragment,{children:[(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",children:"Review"}),!(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",type:"primary",children:"Begin manual input"}),(0,r.jsx)(eo.J9,{enableReinitialize:!0,initialValues:{...i.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:ec.Ry().shape({}),children:e=>(0,r.jsxs)(o.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{children:[(0,r.jsx)(o.cCv,{}),(0,r.jsxs)(o.OXI,{color:"gray.900",children:[(0,r.jsx)(o.xvT,{fontSize:"xl",mb:8,children:t}),(0,r.jsx)(o.izJ,{}),(0,r.jsx)(o.xvT,{fontSize:"md",mt:"4",children:"Manual access"}),(0,r.jsx)(o.xuv,{mt:"8px",children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please complete the following PII fields that have been collected for the selected subject."})})]}),(0,r.jsx)(o.Ng0,{children:(0,r.jsx)(eo.l0,{id:"manual-detail-form",noValidate:!0,children:(0,r.jsx)(o.gCW,{align:"stretch",gap:"16px",children:Object.entries(i.fields).map((e,t)=>{let[i]=e;return(0,r.jsx)(o.Ugi,{children:(0,r.jsx)(eo.gN,{id:i,name:i,children:e=>{let{field:s}=e;return(0,r.jsxs)(o.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,r.jsx)(o.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:i,w:"50%",children:i}),(0,r.jsx)(o.IIB,{...s,autoComplete:"off",color:"gray.700",placeholder:"Please enter ".concat(i),ref:0===t?d:void 0,size:"sm"})]})}})},i)})})})}),(0,r.jsx)(o.zeN,{justifyContent:"flex-start",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(o.wpx,{onClick:c,children:"Cancel"}),(0,r.jsx)(o.wpx,{form:"manual-detail-form",loading:s,htmlType:"submit",children:"Save"})]})})]})]})})]})},eu=e=>{let{connectorName:t,data:i,isSubmitting:s=!1,onSaveClick:n}=e,{isOpen:a,onOpen:l,onClose:c}=(0,o.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{n({connection_key:i.connection_key,privacy_request_id:i.privacy_request_id,body:{...e}}),c()};return(0,r.jsxs)(r.Fragment,{children:[(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",children:"Review"}),!(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",type:"primary",children:"Begin manual input"}),(0,r.jsx)(eo.J9,{enableReinitialize:!0,initialValues:{...i.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:ec.Ry().shape({}),children:e=>(0,r.jsxs)(o.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{children:[(0,r.jsx)(o.cCv,{}),(0,r.jsxs)(o.OXI,{color:"gray.900",children:[(0,r.jsx)(o.xvT,{fontSize:"xl",mb:8,children:t}),(0,r.jsx)(o.izJ,{}),(0,r.jsx)(o.xvT,{fontSize:"md",mt:"4",children:"Manual erasure"}),(0,r.jsx)(o.xuv,{mt:"8px",children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please delete the following PII fields associated with the selected subject if they are available. Once deleted, check the box to confirm the deletion."})})]}),(0,r.jsx)(o.Ng0,{children:(0,r.jsx)(eo.l0,{id:"manual-detail-form",noValidate:!0,children:(0,r.jsx)(o.gCW,{align:"stretch",gap:"16px",children:Object.entries(i.fields).map(e=>{let[t]=e;return(0,r.jsx)(o.Ugi,{children:(0,r.jsx)(eo.gN,{id:t,name:t,children:e=>{let{field:i}=e;return(0,r.jsxs)(o.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,r.jsx)(o.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:t,w:"50%",children:t}),(0,r.jsx)(o.XZJ,{...i,isChecked:!!i.value,onChange:i.onChange,name:t,id:t})]})}})},t)})})})}),(0,r.jsx)(o.zeN,{justifyContent:"flex-start",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(o.wpx,{onClick:c,children:"Cancel"}),(0,r.jsx)(o.wpx,{form:"manual-detail-form",loading:s,htmlType:"submit",children:"Save"})]})})]})]})})]})};let em=(e,t,i)=>e.includes(x.Us.ACCESS)?{ProcessingDetailComponent:ed,uploadMutation:t,getUploadedWebhookDataEndpoint:en.$I.endpoints.getUploadedManualAccessWebhookData}:e.includes(x.Us.ERASURE)?{ProcessingDetailComponent:eu,uploadMutation:i,getUploadedWebhookDataEndpoint:en.$I.endpoints.getUploadedManualErasureWebhookData}:null;var ep=e=>{let{subjectRequest:t,onComplete:i}=e,s=(0,ea.T)(),{errorAlert:n,successAlert:a}=(0,es.V)(),{handleError:l}=(0,es.H)(),[c,d]=(0,h.useState)([]),[u,m]=(0,h.useState)(!1),[p,g]=(0,h.useState)(!1),{data:j,isFetching:v,isLoading:y,isSuccess:f}=(0,ee.W6)(),[_]=(0,en.w3)(),b=el(t.policy.rules),[T]=(0,en.nL)(),[w]=(0,en.UR)(),{ProcessingDetailComponent:E,uploadMutation:R,getUploadedWebhookDataEndpoint:A}=em(b,T,w),k=async()=>{try{m(!0),await _(t.id).unwrap(),a("Manual request has been received. Request now processing."),i()}catch(e){l(e)}finally{m(!1)}},C=async e=>{try{g(!0),await R(e).unwrap();let t={connection_key:e.connection_key,fields:{}};Object.entries(e.body).forEach(e=>{let[i,s]=e;t.fields[i]=s||""});let i=c.map(e=>e.connection_key===t.connection_key?{...e,checked:!0,fields:{...t.fields}}:e);d(i),a("Manual input successfully saved!")}catch(e){l(e)}finally{g(!1)}};return((0,h.useEffect)(()=>(f&&j.length>0&&0===c.length&&(()=>{if(c.length>0)return;let e=[],i=null==j?void 0:j.map(e=>e.connection_config.key);null==i||i.every(i=>e.push(s(A.initiate({connection_key:i,privacy_request_id:t.id})))),Promise.allSettled(e).then(e=>{let t=[];e.forEach((e,i)=>{if("fulfilled"===e.status&&e.value.isSuccess&&e.value.data){let i={checked:e.value.data.checked,fields:{},connection_key:e.value.originalArgs.connection_key,privacy_request_id:e.value.originalArgs.privacy_request_id};Object.entries(e.value.data.fields).forEach(e=>{let[t,s]=e;i.fields[t]=s||""}),t.push(i)}else n("An error occurred while loading manual input data for ".concat(j[i].connection_config.name))}),d(t)})})(),()=>{}),[j,c.length,s,n,f,t.id,A]),b.includes(x.Us.ACCESS)||b.includes(x.Us.ERASURE))?(0,r.jsxs)(o.gCW,{align:"stretch",spacing:8,children:[(0,r.jsx)(o.xuv,{children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",children:"The following table details the integrations that require manual input from you."})}),(0,r.jsxs)(o.xuv,{children:[(v||y)&&(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.$jN,{})}),f&&j?(0,r.jsx)(o.xJi,{children:(0,r.jsxs)(o.iA_,{size:"sm",variant:"unstyled",children:[(0,r.jsx)(o.hrZ,{children:(0,r.jsxs)(o.Tr,{children:[(0,r.jsx)(o.Th,{fontSize:"sm",fontWeight:"semibold",pl:"0",textTransform:"none",children:"Integration Identifier"}),(0,r.jsx)(o.Th,{})]})}),(0,r.jsxs)(o.p3B,{children:[j.length>0&&j.map(e=>(0,r.jsxs)(o.Tr,{display:"block",children:[(0,r.jsx)(o.Td,{pl:"0",children:e.connection_config.key}),(0,r.jsx)(o.Td,{children:c.length>0?(0,r.jsx)(E,{connectorName:e.connection_config.name,data:c.find(t=>t.connection_key===e.connection_config.key),isSubmitting:p,onSaveClick:C}):null})]},e.id)),0===j.length&&(0,r.jsx)(o.Tr,{children:(0,r.jsx)(o.Td,{colSpan:3,pl:"0",children:(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.xvT,{children:"You don‘t have any Manual Process connections set up yet."})})})})]}),c.length>0&&c.every(e=>e.checked)?(0,r.jsx)(o.$RU,{children:(0,r.jsx)(o.Tr,{children:(0,r.jsx)(o.Th,{pl:"0px",children:(0,r.jsx)(o.wpx,{type:"primary",loading:u,onClick:k,className:"mt-2",children:"Complete DSR"})})})}):null]})}):null]})]}):null},eh=e=>{let{subjectRequest:t,onComplete:i}=e,s=(0,c.useRouter)(),{data:n}=(0,ee.AZ)({}),a=(0,h.useMemo)(()=>{var e;return(null==n?void 0:null===(e=n.items)||void 0===e?void 0:e.filter(e=>e.connection_type===x.Rj.MANUAL_TASK))||[]},[n]),{data:l}=(0,ee.W6)(),d=(l||[]).length>0,{data:m}=(0,M.Ym)({page:1,size:100,privacyRequestId:t.id}),p=(null==m?void 0:m.items)||[],g=p.length,j=p.filter(e=>e.status===x.OS.NEW).length,v=a.length>0;return v||d?(0,r.jsxs)(o.Kqy,{spacing:6,children:[v&&(0,r.jsxs)(o.xuv,{children:[(0,r.jsx)(o.AntTypography.Title,{level:4,style:{marginBottom:12},children:"Manual tasks"}),(0,r.jsxs)(o.Kqy,{spacing:2,children:[(0,r.jsxs)(o.AntTypography.Text,{children:[(0,r.jsx)("strong",{children:g})," task",1!==g?"s":""," ","linked to this privacy request"]}),(0,r.jsxs)(o.AntTypography.Text,{children:[(0,r.jsx)("strong",{children:j})," pending task",1!==j?"s":""]}),g>0&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(o.wpx,{type:"primary",onClick:()=>{s.push({pathname:u.Jw,query:{privacy_request_id:t.id,tab:ei.G.MANUAL_TASK}})},children:"View all tasks for this request →"})})]})]}),d&&(0,r.jsxs)(o.xuv,{children:[(0,r.jsxs)(o.kCb,{alignItems:"center",style:{marginBottom:12},children:[(0,r.jsx)(o.AntTypography.Title,{level:4,style:{margin:0,marginRight:8},children:"Manual steps (legacy)"}),(0,r.jsx)(et.b,{label:"This is the legacy manual steps feature. The new manual tasks feature provides more advanced capabilities and better user experience."})]}),(0,r.jsx)(ep,{subjectRequest:t,onComplete:i||(()=>{})})]})]}):(0,r.jsx)(o.xuv,{p:4,children:(0,r.jsx)(o.AntTypography.Text,{type:"secondary",children:"No manual tasks or legacy manual steps configured for this request."})})},ex=i(59969);let eg={approved:{color:"success",label:"Approved"},complete:{color:"success",label:"Completed"},awaiting_email_send:{color:"marble",label:"Awaiting Email Send"},denied:{color:"warning",label:"Denied"},canceled:{color:"marble",label:"Canceled"},error:{color:"error",label:"Error"},in_processing:{color:"caution",label:"In Progress"},paused:{color:"marble",label:"Paused"},pending:{color:"info",label:"New"},identity_unverified:{color:"marble",label:"Unverified"},requires_input:{color:"minos",label:"Requires Input"},requires_manual_finalization:{color:"minos",label:"Requires Finalization"}};var ej=e=>{let{status:t}=e;return(0,r.jsx)(o.j8w,{color:eg[t].color,className:"justify-center","data-testid":"request-status-badge",children:eg[t].label})},ev=i(18225),ey=i(812),ef=i(7842);let{useGetAttachmentsQuery:e_,useUploadAttachmentMutation:eb,useGetAttachmentDetailsQuery:eT,useLazyGetAttachmentDetailsQuery:ew}=C.u.injectEndpoints({endpoints:e=>({getAttachments:e.query({query:e=>{let{privacy_request_id:t,page:i=1,size:s}=e;return{url:"plus/privacy-request/".concat(t,"/attachment"),method:"GET",params:{page:i,size:s}}},providesTags:["Privacy Request Attachments"]}),uploadAttachment:e.mutation({query:e=>{let{privacy_request_id:t,attachment_type:i,attachment_file:s}=e,n=new FormData;return n.append("attachment_type",i),n.append("attachment_file",s),{url:"plus/privacy-request/".concat(t,"/attachment"),method:"POST",body:n,params:{}}},invalidatesTags:["Privacy Request Attachments"]}),getAttachmentDetails:e.query({query:e=>{let{privacy_request_id:t,attachment_id:i}=e;return{url:"plus/privacy-request/".concat(t,"/attachment/").concat(i),method:"GET"}}})})}),{reducer:eE}=(0,k.oM)({name:"privacyRequestAttachments",initialState:{},reducers:{}}),eR=e=>{var t;let{file:i}=e,[s,n]=(0,h.useState)(!1),[a]=ew(),l=async()=>{var e,t,s;if((null===(e=i.customData)||void 0===e?void 0:e.attachment_id)&&(null===(t=i.customData)||void 0===t?void 0:t.privacy_request_id)){n(!0);try{let e=await a({privacy_request_id:i.customData.privacy_request_id,attachment_id:i.customData.attachment_id}),t=null===(s=e.data)||void 0===s?void 0:s.retrieved_attachment_url,n=null==t?void 0:t.startsWith("http");t&&n?window.open(t,"_blank"):t&&!n?o.Pg3.info("Download is not available when using local storage methods."):o.Pg3.error("No download URL available for ".concat(i.name))}catch(e){o.Pg3.error("Failed to fetch attachment download URL")}finally{n(!1)}}},c=(null===(t=i.customData)||void 0===t?void 0:t.attachment_type)===x.sf.INCLUDE_WITH_ACCESS_PACKAGE;return(0,r.jsxs)(o.jqI,{align:"center",gap:8,children:[(0,r.jsx)(o.PJP.PgN,{className:"shrink-0"}),(0,r.jsx)(o.lKn,{ellipsis:{tooltip:i.name},className:"grow",children:i.name}),c&&(0,r.jsx)(o.esZ,{title:"This attachment will be included in the access package.",children:(0,r.jsx)(o.PJP.wvC,{className:"shrink-0",title:"User icon"})}),(0,r.jsx)(o.wpx,{type:"text",icon:(0,r.jsx)(o.PJP.UWx,{}),onClick:l,loading:s,className:"shrink-0"})]})},eA=(e,t)=>(0,r.jsx)(eR,{file:t});var ek=e=>{let{subjectRequest:t}=e,[i,s]=(0,h.useState)(!1),n=(0,g.Tg)([x.Sh.ATTACHMENT_READ]),a=(0,g.Tg)([x.Sh.ATTACHMENT_CREATE]),[l]=eb(),{data:c,isLoading:d,error:u}=(0,en.PW)(),{data:m,isLoading:p}=e_({privacy_request_id:t.id}),{refetch:j}=e_({privacy_request_id:t.id}),v=(null==m?void 0:m.items.map(e=>({uid:e.id,name:e.file_name,status:"done",customData:{attachment_id:e.id,privacy_request_id:t.id,attachment_type:e.attachment_type}})))||[],y=(0,h.useCallback)(()=>(0,r.jsx)(o.PJP.PgN,{}),[]);if(!n)return null;let f=a&&(null==c?void 0:c.key),_=[".pdf",".doc",".docx",".xls",".xlsx",".txt",".csv",".jpg",".jpeg",".png",".zip"];return(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(o.lQT,{level:3,children:"Attachments"})}),d||p?(0,r.jsx)(ev.Z,{size:"md",alignment:"start"}):(0,r.jsx)(o.pMK,{name:"attachment_file",fileList:v,iconRender:y,showUploadList:{showRemoveIcon:!1,showDownloadIcon:!1},itemRender:eA,accept:_.join(","),customRequest:async e=>{let{file:i,onSuccess:n,onError:a}=e,r=i.name;try{s(!0),await l({privacy_request_id:t.id,attachment_file:i,attachment_type:ef.s.INTERNAL_USE_ONLY}).unwrap(),o.Pg3.success("".concat(r," file uploaded successfully")),j(),null==n||n(i)}catch(e){o.Pg3.error("".concat(r," file upload failed.")),null==a||a(e)}finally{s(!1)}},disabled:!f,children:a&&(0,r.jsx)(o.esZ,{title:u&&"Add attachment not available: ".concat((0,ey.e$)(u)),placement:"top",children:(0,r.jsxs)(o.jqI,{align:"center",gap:12,className:"mb-4",children:[(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.PJP.mm_,{}),iconPosition:"end",disabled:!f||i,loading:i,children:i?"Uploading":"Add"}),(0,r.jsx)(et.b,{label:"Uploaded attachments are for internal use and won't be send as part of the request package.\n Accepted filetypes: ".concat(_.join(", ")),placement:"top"})]})})})]})})},eC=i(15709),eS=i.n(eC),eq=e=>{let{label:t,children:i}=e;return(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"shrink-0 grow-0 basis-1/2 pr-2 ".concat(eS().label),children:(0,r.jsxs)(o.AntTypography.Text,{children:[t,":"]})}),(0,r.jsx)("div",{className:"min-w-0 shrink grow ".concat(eS().value),"data-testid":"request-detail-value-".concat(t),children:i})]})},eN=e=>{let{subjectRequest:t}=e,{custom_privacy_request_fields:i}=t;return(0,r.jsx)("div",{className:"flex flex-col gap-2",children:i&&Object.keys(i).length>0&&Object.entries(i).filter(e=>{let[,t]=e;return t.value}).map(e=>{let[t,i]=e;return(0,r.jsx)(eq,{label:i.label,children:(0,r.jsx)(o.AntTypography.Text,{children:Array.isArray(i.value)?i.value.join(", "):i.value})},t)})})},eP=e=>{let{subjectRequest:t}=e,{plus:i}=(0,A.hz)(),{id:s,status:n,policy:a,identity:l,identity_verified_at:c}=t;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(o.AntTypography.Title,{level:2,children:"Request details"})}),(0,r.jsxs)(o.jqI,{vertical:!0,gap:12,className:"mb-6",children:[(0,r.jsx)(eq,{label:"Status",children:(0,r.jsx)(ej,{status:n})}),(0,r.jsx)(eq,{label:"Time remaining",children:(0,r.jsx)(ex.Z,{daysLeft:t.days_left,includeText:!0,status:t.status})}),(0,r.jsx)(eq,{label:"Request type",children:(0,r.jsx)(er,{rules:a.rules})}),(0,r.jsx)(eq,{label:"Source",children:i&&(0,r.jsx)(o.AntTypography.Text,{children:t.source||"-"})}),Object.entries(l).filter(e=>{let[,{value:t}]=e;return null!==t}).map(e=>{let[t,{value:i="",label:s}]=e,n="".concat(i).concat(c?"":" (Unverified)");return(0,r.jsx)(eq,{label:"Subject ".concat(s.toLocaleLowerCase()),children:(0,r.jsx)(o.esZ,{title:n,trigger:"click",children:(0,r.jsx)(o.AntTypography.Text,{ellipsis:!0,children:n})})},t)}),(0,r.jsx)(eN,{subjectRequest:t})]}),(0,r.jsxs)(o.PPS,{layout:"vertical",children:[(0,r.jsx)(o.PPS.Item,{label:"Request ID:",className:"mb-4",children:(0,r.jsx)(o.jqI,{gap:1,children:(0,r.jsxs)(o.vyj.Compact,{style:{width:"100%"},children:[(0,r.jsx)(o.uFc,{readOnly:!0,value:s,"data-testid":"request-detail-value-id"}),(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(L.Z,{copyText:s})})]})})}),(0,r.jsx)(o.PPS.Item,{label:"Policy key:",className:"mb-4",children:(0,r.jsx)(o.uFc,{readOnly:!0,value:t.policy.key,"data-testid":"request-detail-value-policy"})})]}),(0,r.jsx)(ek,{subjectRequest:t})]})},eI=e=>{var t;let{data:i}=e,s=(0,h.useMemo)(()=>({id:i.id,verbose:!0}),[i.id]),{data:n}=(0,p.QA)(s,{pollingInterval:i.status===x.q2.APPROVED||i.status===x.q2.IN_PROCESSING?2e3:0,skip:!i.id}),a=null!==(t=null==n?void 0:n.items[0])&&void 0!==t?t:i,l=a.status===x.q2.REQUIRES_INPUT,[c,d]=(0,h.useState)("activity"),u=(0,h.useMemo)(()=>[{key:"activity",label:"Activity",children:(0,r.jsx)(X,{subjectRequest:a})},{key:"manual-tasks",label:"Manual tasks",children:(0,r.jsx)(eh,{subjectRequest:a,onComplete:()=>d("activity")}),disabled:!l}],[l,a]);return(0,r.jsxs)("div",{className:"flex gap-8",children:[(0,r.jsx)("div",{className:"w-0 grow",children:(0,r.jsx)(o.A5g,{items:u,activeKey:c,onChange:d})}),(0,r.jsx)("div",{className:"w-1/3 2xl:w-[432px]","data-testid":"privacy-request-details",children:(0,r.jsx)(eP,{subjectRequest:a})})]})},eO=i(57526),eD=i(66548),eU=i(45489),eM=e=>{let{privacyRequest:t,action:i}=e,{handleApproveRequest:s,handleDenyRequest:n}=(0,eU.Z)({subjectRequest:t}),a=t.status===x.q2.PENDING,l=(0,o.qY0)(),r=async e=>{let{reason:t}=e,a=o.Pg3.loading({content:"approve"===i?"Approving request...":"Denying request..."});"deny"===i&&await n(t),"approve"===i&&await s(),a()};return{showAction:a,closeModal:l.onClose,performAction:r,openConfirmationModal:l.onOpen,isModalOpen:l.isOpen}},ez=e=>{var t,i,s;let{privacyRequest:n}=e,a=null===(i=(0,A.hz)())||void 0===i?void 0:null===(t=i.flags)||void 0===t?void 0:t.downloadAccessRequestResults,l=n.status===x.q2.COMPLETE,r=el(n.policy.rules).includes(x.Us.ACCESS),o=(0,g.Tg)([x.Sh.PRIVACY_REQUEST_ACCESS_RESULTS_READ]),{data:c,isLoading:d,isError:u,error:m}=(0,en.br)({privacy_request_id:n.id}),p=null!==(s=null==c?void 0:c.access_result_urls[0])&&void 0!==s?s:"",h=!!p&&"your local fides_uploads folder"!==p,j=null;return u?j=(0,ey.e$)(m,"Unable to resolve download URL"):h||(j="Requests stored locally cannot be downloaded"),{showDownloadResults:a&&o&&r&&l,downloadResults:()=>{let e=document.createElement("a");e.href=p,e.target="_blank",e.rel="noopener noreferrer",e.click(),e.remove()},infoTooltip:j,isLoading:d,isDisabled:!h}},eL=e=>{let{privacyRequest:t}=e,{errorAlert:i,successAlert:s}=(0,es.V)(),n=t.status===x.q2.ERROR,[a]=(0,en.Fq)();return{reprocessPrivacyRequest:async()=>{if(!t)return;let e=o.Pg3.loading("Reprocessing privacy request...",0),n=await a(t);"error"in n?i((0,ey.e$)(n.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):s("Privacy request is now being reprocessed."),e()},showReprocess:n}},eW=e=>{let{privacyRequest:t}=e,{showDownloadResults:i,downloadResults:s,infoTooltip:n,isDisabled:a}=ez({privacyRequest:t}),{isModalOpen:l,closeModal:c,performAction:d,openConfirmationModal:u,showAction:m}=eM({privacyRequest:t,action:"approve"}),{isModalOpen:p,closeModal:g,performAction:j,openConfirmationModal:v,showAction:y}=eM({privacyRequest:t,action:"deny"}),{reprocessPrivacyRequest:f,showReprocess:_}=eL({privacyRequest:t}),{handleFinalizeRequest:b,finalizeRequestResult:T}=(0,eU.Z)({subjectRequest:t}),w=(0,h.useMemo)(()=>{let e=[];return e.push({key:"approve",label:(0,r.jsx)("span",{"data-testid":"privacy-request-approve-btn",children:"Approve"}),onClick:u,disabled:!m}),e.push({key:"deny",label:(0,r.jsx)("span",{"data-testid":"privacy-request-deny-btn",children:"Deny"}),onClick:v,disabled:!y}),e.push({key:"reprocess",label:(0,r.jsx)("span",{"data-testid":"privacy-request-action-reprocess",children:"Reprocess"}),onClick:f,disabled:!_}),t.status===x.q2.REQUIRES_MANUAL_FINALIZATION&&e.push({key:"finalize",label:(0,r.jsx)("span",{"data-testid":"privacy-request-action-finalize",children:"Finalize"}),onClick:b,disabled:T.isLoading}),i&&e.push({key:"download",label:(0,r.jsx)(o.esZ,{title:a?n:null,placement:"bottom",children:(0,r.jsx)("span",{"data-testid":"download-results-btn",children:"Download request results"})}),onClick:s,disabled:a}),e},[i,s,n,a,m,y,u,v,_,f,t.status,b,T.isLoading]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.S0p,{menu:{items:w},trigger:["click"],overlayStyle:{minWidth:"160px"},children:(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.PJP.pO,{}),"data-testid":"privacy-request-actions-dropdown-btn",iconPosition:"end",type:"primary",disabled:!w.length,size:"large",children:"Actions"})}),(0,r.jsx)(eO.Z,{isOpen:l,isLoading:!1,onClose:c,onApproveRequest:()=>d({reason:""}),subjectRequest:t}),(0,r.jsx)(eD.Z,{isOpen:p,onClose:g,onDenyRequest:e=>j({reason:e})})]})},eB=()=>{let e=(0,c.useRouter)().query.id,{data:t,isLoading:i}=(0,p.QA)({id:e,verbose:!0},{skip:!e}),s=(null==t?void 0:t.items[0])||null;return(0,r.jsxs)(d.Z,{title:"Privacy Request - ".concat(e),children:[(0,r.jsx)(m.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:u.Jw},{title:"Request details"}],rightContent:!!s&&(0,r.jsx)(eW,{privacyRequest:s})}),i&&(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.$jN,{})}),!i&&!s&&(0,r.jsx)(o.xvT,{children:"404 no privacy request found"}),!i&&s&&(0,r.jsx)(eI,{data:s})]})}},15709:function(e){e.exports={value:"RequestDetailsRow_value__WMXn3",label:"RequestDetailsRow_label__dn3CQ"}},38450:function(e){e.exports={container:"ActivityTimelineEntry_container__tCva0","container--open":"ActivityTimelineEntry_container--open__1d9mA",itemButton:"ActivityTimelineEntry_itemButton__MlmWS","itemButton--error":"ActivityTimelineEntry_itemButton--error__UizD2","itemButton--comment":"ActivityTimelineEntry_itemButton--comment__g98SH","itemButton--awaiting-input":"ActivityTimelineEntry_itemButton--awaiting-input__6lB5t",header:"ActivityTimelineEntry_header__GYibj",title:"ActivityTimelineEntry_title__rm_g0","title--error":"ActivityTimelineEntry_title--error__fOi0s","title--awaiting-input":"ActivityTimelineEntry_title--awaiting-input__3sPAo",timestamp:"ActivityTimelineEntry_timestamp__uMEMT",viewLogs:"ActivityTimelineEntry_viewLogs___T4jN",logs:"ActivityTimelineEntry_logs__T7R0J","logs--open":"ActivityTimelineEntry_logs--open__o_9Io"}}},function(e){e.O(0,[203,2888,9774,179],function(){return e(e.s=6554)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{13687:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/messaging",function(){return t(61463)}])},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return m}});var s=t(24246),n=t(27824),l=t(88038),r=t.n(l),a=t(86677);t(27378);var o=t(25980),c=t(90867),d=t(77830),u=()=>{let e=(0,a.useRouter)();return(0,s.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(n.xuv,{children:[(0,s.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(n.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,s.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:i,title:t,padded:l=!0,mainProps:d}=e,m=(0,o.hz)(),p=(0,a.useRouter)(),x="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(m.flags.privacyRequestsConfiguration&&x),{data:j}=(0,c.JE)(void 0,{skip:h}),{data:g}=(0,c.PW)(void 0,{skip:h}),y=m.flags.privacyRequestsConfiguration&&(!j||!g)&&x;return(0,s.jsxs)(n.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,s.jsxs)(r(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(n.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[y?(0,s.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var s=t(24246),n=t(27824),l=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:r=!0,children:a,rightContent:o,style:c,...d}=e;return(0,s.jsxs)("div",{...d,style:r?{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,s.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof i?(0,s.jsx)(n.lQT,{className:t||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!t&&(0,s.jsx)(l.m,{className:a?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),a]})}},14047:function(e,i,t){"use strict";t.d(i,{H:function(){return l},V:function(){return s.V}});var s=t(84306),n=t(812);let l=()=>{let{errorAlert:e}=(0,s.V)();return{handleError:i=>{let t="An unexpected error occurred. Please try again.";(0,n.Ot)(i)?t=i.data.detail:(0,n.tB)(i)&&(t=i.data.detail[0].msg),e(t)}}}},84306:function(e,i,t){"use strict";t.d(i,{V:function(){return l}});var s=t(24246),n=t(27824);let l=()=>{let e=(0,n.pmc)();return{errorAlert:(i,t,l)=>{let r={...l,position:(null==l?void 0:l.position)||"top",render:e=>{let{onClose:l}=e;return(0,s.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(n.zMQ,{}),(0,s.jsxs)(n.xuv,{children:[t&&(0,s.jsx)(n.CdC,{children:t}),(0,s.jsx)(n.XaZ,{children:i})]}),(0,s.jsx)(n.PZ7,{onClick:l,position:"relative",right:0,size:"sm",top:-1})]})}};(null==l?void 0:l.id)&&e.isActive(l.id)?e.update(l.id,r):e(r)},successAlert:(i,t,l)=>{let r={...l,position:(null==l?void 0:l.position)||"top",render:e=>{let{onClose:l}=e;return(0,s.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(n.zMQ,{}),(0,s.jsxs)(n.xuv,{children:[t&&(0,s.jsx)(n.CdC,{children:t}),(0,s.jsx)(n.XaZ,{children:i})]}),(0,s.jsx)(n.PZ7,{onClick:l,position:"relative",right:0,size:"sm",top:-1})]})}};(null==l?void 0:l.id)&&e.isActive(l.id)?e.update(l.id,r):e(r)}}}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return c}});var s=t(24246),n=t(27824),l=t(79894),r=t.n(l),a=t(27378);let{Text:o}=n.AntTypography,c=e=>{let{items:i,...t}=e,l=(0,a.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let l=t===i.length-1,a={...e},c=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:a.title})),c)?a.title=(0,s.jsx)(n.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,s.jsx)(r(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[i]);return(0,s.jsx)(n.zrq,{items:l,...t})}},71784:function(e,i,t){"use strict";t.d(i,{DE:function(){return o},I3:function(){return n},kN:function(){return r},qX:function(){return a},rE:function(){return l}});var s=t(54682);let n=[...new Map([[s.q2.APPROVED,"Approved"],[s.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[s.q2.CANCELED,"Canceled"],[s.q2.COMPLETE,"Completed"],[s.q2.DENIED,"Denied"],[s.q2.ERROR,"Error"],[s.q2.IN_PROCESSING,"In progress"],[s.q2.PENDING,"New"],[s.q2.PAUSED,"Paused"],[s.q2.IDENTITY_UNVERIFIED,"Unverified"],[s.q2.REQUIRES_INPUT,"Requires input"],[s.q2.REQUIRES_MANUAL_FINALIZATION,"Requires finalization"]])].map(e=>{let[i,t]=e;return{label:t,value:i}}),l=new Map([[s.Us.ACCESS,"Access"],[s.Us.ERASURE,"Erasure"],[s.Us.CONSENT,"Consent"],[s.Us.UPDATE,"Update"]]),r=[...l].map(e=>{let[i,t]=e;return{label:t,value:i}}),a={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3",gcs:"gcs"}},61463:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return _}});var s=t(24246),n=t(27824),l=t(27378),r=t(812),a=t(14047),o=t(77213),c=t(77830),d=t(58754),u=t(7426),m=t(71784),p=t(90867),x=t(34090),h=t(40324),j=e=>{let{messagingDetails:i}=e,{successAlert:t}=(0,a.V)(),{handleError:l}=(0,a.H)(),[o]=(0,p.SU)(),c=i.service_type===m.qX.twilio_email||i.service_type===m.qX.mailgun,d=i.service_type===m.qX.twilio_text,u=async e=>{if(c){let i=await o({email:e.email});(0,r.D4)(i)?l(i.error):t("Test message successfully sent.")}if(d){let i=await o({phone_number:e.phone});(0,r.D4)(i)?l(i.error):t("Test message successfully sent.")}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{mt:10}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,mb:5,children:"Test connection"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{email:"",phone:""},onSubmit:u,children:e=>{let{isSubmitting:i,resetForm:t}=e;return(0,s.jsxs)(x.l0,{children:[c?(0,s.jsx)(h.j0,{name:"email",label:"Email",placeholder:"youremail@domain.com",isRequired:!0}):null,d?(0,s.jsx)(h.j0,{name:"phone",label:"Phone",placeholder:"+10000000000",isRequired:!0}):null,(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]})},g=()=>{var e;let{successAlert:i}=(0,a.V)(),[t,o]=(0,l.useState)(""),{handleError:c}=(0,a.H)(),{data:d}=(0,p.S3)({type:m.qX.mailgun}),[u]=(0,p.h9)(),[g]=(0,p.iI)(),y=async e=>{let t=await u({service_type:m.qX.mailgun,details:{is_eu_domain:"false",domain:e.domain}});(0,r.D4)(t)?c(t.error):(i("Mailgun email successfully updated. You can now enter your security key."),o("apiKey"))},v=async e=>{let t=await g({details:{mailgun_api_key:e.api_key},service_type:m.qX.mailgun});(0,r.D4)(t)?c(t.error):(i("Mailgun security key successfully updated."),o("testConnection"))},f={domain:null!==(e=null==d?void 0:d.details.domain)&&void 0!==e?e:""};return(0,s.jsxs)(n.xuv,{children:[(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Mailgun messaging configuration"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:f,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(n.Kqy,{mt:5,spacing:5,children:(0,s.jsx)(h.j0,{name:"domain",label:"Domain",placeholder:"Enter domain","data-testid":"option-twilio-domain",isRequired:!0})}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:t,className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{htmlType:"submit",disabled:i,type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"apiKey"===t||"testConnection"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{mt:10}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:t,className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===t?(0,s.jsx)(j,{messagingDetails:d||{service_type:m.qX.mailgun}}):null]})},y=()=>{var e;let[i,t]=(0,l.useState)(""),{successAlert:o}=(0,a.V)(),{handleError:c}=(0,a.H)(),{data:d}=(0,p.S3)({type:m.qX.twilio_email}),[u]=(0,p.h9)(),[g]=(0,p.iI)(),y=async e=>{let i=await u({service_type:m.qX.twilio_email,details:{twilio_email_from:e.email}});(0,r.D4)(i)?c(i.error):(o("Twilio email successfully updated. You can now enter your security key."),t("configureTwilioEmailSecrets"))},v=async e=>{let i=await g({details:{twilio_api_key:e.api_key},service_type:m.qX.twilio_email});(0,r.D4)(i)?c(i.error):(o("Twilio email secrets successfully updated."),t("testConnection"))},f={email:null!==(e=null==d?void 0:d.details.twilio_email_from)&&void 0!==e?e:""};return(0,s.jsxs)(n.xuv,{children:[(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio Email messaging configuration"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:f,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(n.Kqy,{mt:5,spacing:5,children:(0,s.jsx)(h.j0,{name:"email",label:"Email",placeholder:"Enter email",isRequired:!0})}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"configureTwilioEmailSecrets"===i||"testConnection"===i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{mt:10}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(n.Kqy,{mt:5,spacing:5,children:(0,s.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0})}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===i?(0,s.jsx)(j,{messagingDetails:d||{service_type:m.qX.twilio_email}}):null]})},v=()=>{let{successAlert:e}=(0,a.V)(),{handleError:i}=(0,a.H)(),[t,o]=(0,l.useState)(""),{data:c}=(0,p.S3)({type:"twilio_text"}),[d]=(0,p.iI)(),u=async t=>{let s=await d({details:{twilio_account_sid:t.account_sid,twilio_auth_token:t.auth_token,twilio_messaging_service_sid:t.messaging_service_sid,twilio_sender_phone_number:t.phone},service_type:m.qX.twilio_text});(0,r.D4)(s)?i(s.error):(e("Twilio text secrets successfully updated."),o("testConnection"))};return(0,s.jsxs)(n.xuv,{children:[(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio SMS messaging configuration"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{account_sid:"",auth_token:"",messaging_service_sid:"",phone:""},onSubmit:u,enableReinitialize:!0,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsxs)(n.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(h.j0,{name:"account_sid",label:"Account SID",placeholder:"Enter account SID",isRequired:!0}),(0,s.jsx)(h.j0,{name:"auth_token",label:"Auth token",placeholder:"Enter auth token",type:"password",isRequired:!0}),(0,s.jsx)(h.j0,{name:"messaging_service_sid",label:"Messaging Service SID",placeholder:"Enter messaging service SID"}),(0,s.jsx)(h.j0,{name:"phone",label:"Phone Number",placeholder:"Enter phone number"})]}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"testConnection"===t?(0,s.jsx)(j,{messagingDetails:c||{service_type:m.qX.twilio_text}}):null]})},f=()=>{let{successAlert:e}=(0,a.V)(),{handleError:i}=(0,a.H)(),[t,x]=(0,l.useState)(""),[h]=(0,p.h9)(),[j]=(0,u.L)(),{data:f}=(0,p.JE)();(0,l.useEffect)(()=>{f&&x(null==f?void 0:f.service_type)},[f]);let _=async t=>{let{value:s}=t.target,n=await j({notifications:{notification_service_type:s,send_request_completion_notification:!0,send_request_receipt_notification:!0,send_request_review_notification:!0},execution:{subject_identity_verification_required:!0}});if((0,r.D4)(n))i(n.error);else if(s!==m.qX.twilio_text)x(s);else{let t=await h({service_type:m.qX.twilio_text});(0,r.D4)(t)?i(t.error):(e("Messaging provider saved successfully."),x(s))}};return(0,s.jsxs)(o.Z,{title:"Configure Privacy Requests - Messaging",children:[(0,s.jsx)(d.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Configure requests",href:c.fz},{title:"Messaging"}]}),(0,s.jsx)(n.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure your messaging provider"}),(0,s.jsxs)(n.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,s.jsxs)(n.xuv,{children:["Fides requires a messsaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,s.jsx)(n.xvT,{as:"span",color:"complimentary.500",children:"documentation"})," ","to setup a messaging service that Fides supports. Ensure you have completed the setup for the preferred messaging provider and have the details handy prior to the following steps."]}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose service type to configure"}),(0,s.jsx)(n.y02.Group,{onChange:_,value:t,"data-testid":"privacy-requests-messaging-provider-selection",className:"p-3",children:(0,s.jsxs)(n.jqI,{children:[(0,s.jsx)(n.y02,{value:m.qX.mailgun,"data-testid":"option-mailgun",children:"Mailgun Email"},m.qX.mailgun),(0,s.jsx)(n.y02,{value:m.qX.twilio_email,"data-testid":"option-twilio-email",children:"Twilio Email"},m.qX.twilio_email),(0,s.jsx)(n.y02,{value:m.qX.twilio_text,"data-testid":"option-twilio-sms",children:"Twilio SMS"},m.qX.twilio_text)]})}),t===m.qX.mailgun?(0,s.jsx)(g,{}):null,t===m.qX.twilio_email?(0,s.jsx)(y,{}):null,t===m.qX.twilio_text?(0,s.jsx)(v,{}):null]})]})},_=()=>(0,s.jsx)(f,{})}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=13687)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return i(64665)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var s=i(24246),a=i(27824),r=i(88038),l=i.n(r),n=i(86677);i(27378);var o=i(25980),d=i(90867),c=i(77830),u=()=>{let e=(0,n.useRouter)();return(0,s.jsx)(a.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(a.xuv,{children:[(0,s.jsxs)(a.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(a.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(a.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,s.jsxs)(a.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:c}=e,m=(0,o.hz)(),h=(0,n.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(m.flags.privacyRequestsConfiguration&&p),{data:j}=(0,d.JE)(void 0,{skip:x}),{data:v}=(0,d.PW)(void 0,{skip:x}),_=m.flags.privacyRequestsConfiguration&&(!j||!v)&&p;return(0,s.jsxs)(a.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(l(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(a.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[_?(0,s.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var s=i(24246),a=i(27824),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:n,rightContent:o,style:d,...c}=e;return(0,s.jsxs)("div",{...c,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,s.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(a.lQT,{className:i||n?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,s.jsx)(r.m,{className:n?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),n]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return d}});var s=i(24246),a=i(27824),r=i(34090),l=i(27378),n=i(46238),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:m="inline",helperText:h,...p}=e,[x,j,{setValue:v}]=(0,r.U$)(t),_=!!(j.touched&&j.error),[g,f]=(0,l.useState)("");x.value||"tags"!==p.mode&&"multiple"!==p.mode||(x.value=[]),"tags"===p.mode&&"string"==typeof x.value&&(x.value=[x.value]);let y="tags"===p.mode?(e,t)=>e?e.value!==g||x.value.includes(g)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:p.optionRender||void 0,b=e=>{f(e),p.onSearch&&p.onSearch(e)},k=(e,t)=>{v(e),p.onChange&&p.onChange(e,t)};return"inline"===m?(0,s.jsx)(a.NIc,{isInvalid:_,isRequired:u,children:(0,s.jsxs)(a.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,s.jsx)(o.__,{htmlFor:p.id||t,...d,children:i}):null,(0,s.jsxs)(a.jqI,{align:"center",children:[(0,s.jsxs)(a.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,s.jsx)(a.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:y,onSearch:"tags"===p.mode?b:void 0,onChange:k,value:x.value||void 0,status:_?"error":void 0}),h&&(0,s.jsx)(a.Q6r,{children:h}),(0,s.jsx)(o.Bc,{isInvalid:_,message:j.error,fieldName:x.name})]}),(0,s.jsx)(n.b,{label:c,className:_?"mt-2 self-start":void 0})]})]})}):(0,s.jsx)(a.NIc,{isInvalid:_,isRequired:u,children:(0,s.jsxs)(a.gCW,{alignItems:"start",children:[(0,s.jsxs)(a.jqI,{align:"center",children:[i?(0,s.jsx)(o.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,(0,s.jsx)(n.b,{label:c})]}),(0,s.jsx)(a.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:y,onSearch:"tags"===p.mode?b:void 0,onChange:k,value:x.value||void 0,status:_?"error":void 0}),h&&(0,s.jsx)(a.Q6r,{style:{marginTop:0},children:h}),(0,s.jsx)(o.Bc,{isInvalid:_,message:j.error,fieldName:x.name})]})})}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return s.V}});var s=i(84306),a=i(812);let r=()=>{let{errorAlert:e}=(0,s.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)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var s=i(24246),a=i(27824);let r=()=>{let e=(0,a.pmc)();return{errorAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(a.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(a.zMQ,{}),(0,s.jsxs)(a.xuv,{children:[i&&(0,s.jsx)(a.CdC,{children:i}),(0,s.jsx)(a.XaZ,{children:t})]}),(0,s.jsx)(a.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)},successAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(a.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(a.zMQ,{}),(0,s.jsxs)(a.xuv,{children:[i&&(0,s.jsx)(a.CdC,{children:i}),(0,s.jsx)(a.XaZ,{children:t})]}),(0,s.jsx)(a.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var s=i(24246),a=i(27824),r=i(79894),l=i.n(r),n=i(27378);let{Text:o}=a.AntTypography,d=e=>{let{items:t,...i}=e,r=(0,n.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,n={...e},d=n.onClick&&!n.href;return("string"==typeof n.title&&(n.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:n.title})),d)?n.title=(0,s.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:n.icon}),n.title]})),n.href&&n.title&&(n.title=(0,s.jsx)(l(),{href:n.href,className:"ant-breadcrumb-link",children:n.title}),delete n.href)),n}),[t]);return(0,s.jsx)(a.zrq,{items:r,...i})}},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return a},kN:function(){return l},qX:function(){return n},rE:function(){return r}});var s=i(54682);let a=[...new Map([[s.q2.APPROVED,"Approved"],[s.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[s.q2.CANCELED,"Canceled"],[s.q2.COMPLETE,"Completed"],[s.q2.DENIED,"Denied"],[s.q2.ERROR,"Error"],[s.q2.IN_PROCESSING,"In progress"],[s.q2.PENDING,"New"],[s.q2.PAUSED,"Paused"],[s.q2.IDENTITY_UNVERIFIED,"Unverified"],[s.q2.REQUIRES_INPUT,"Requires input"],[s.q2.REQUIRES_MANUAL_FINALIZATION,"Requires finalization"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[s.Us.ACCESS,"Access"],[s.Us.ERASURE,"Erasure"],[s.Us.CONSENT,"Consent"],[s.Us.UPDATE,"Update"]]),l=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),n={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3",gcs:"gcs"}},64665:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return f}});var s=i(24246),a=i(27824),r=i(27378),l=i(812),n=i(14047),o=i(77213),d=i(77830),c=i(58754),u=i(7426),m=i(71784),h=i(90867),p=i(34090),x=i(97181),j=i(40324),v=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[v,_]=(0,r.useState)(""),[g]=(0,h.gC)(),[f]=(0,h.cf)(),{handleError:y}=(0,n.H)(),{successAlert:b}=(0,n.V)(),k={type:m.DE.gcs,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},C=async e=>{let t=await g({type:m.DE.gcs,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,l.D4)(t)?y(t.error):(_(e.auth_method),b("Google Cloud Storage credentials successfully updated."))},q=async e=>{let t=e.private_key.trim();t.includes("\\n")&&(t=t.replace(/\\n/g,"\n"));let i=await f({details:{type:e.type,project_id:e.project_id,private_key_id:e.private_key_id,private_key:t,client_email:e.client_email,client_id:e.client_id,auth_uri:e.auth_uri,token_uri:e.token_uri,auth_provider_x509_cert_url:e.auth_provider_x509_cert_url,client_x509_cert_url:e.client_x509_cert_url,universe_domain:e.universe_domain},type:m.DE.gcs});(0,l.D4)(i)?y(i.error):b("Google Cloud Storage secrets successfully updated.")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Google Cloud Storage configuration"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:k,onSubmit:C,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(x.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(x.d,{name:"auth_method",label:"Auth method",options:[{label:"Service Account Keys",value:"service_account_keys"},{label:"Application Default Credentials",value:"adc"}],"data-testid":"auth_method",isRequired:!0}),(0,s.jsx)(j.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"service_account_keys"===v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.izJ,{mt:5}),(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:{type:"",project_id:"",private_key_id:"",private_key:"",client_email:"",client_id:"",auth_uri:"",token_uri:"",auth_provider_x509_cert_url:"",client_x509_cert_url:"",universe_domain:""},onSubmit:q,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(j.j0,{name:"type",label:"Type"}),(0,s.jsx)(j.j0,{name:"project_id",label:"Project ID"}),(0,s.jsx)(j.j0,{name:"private_key_id",label:"Private key ID",type:"password"}),(0,s.jsx)(j.j0,{name:"private_key",label:"Private key",type:"password"}),(0,s.jsx)(j.j0,{name:"client_email",label:"Client email"}),(0,s.jsx)(j.j0,{name:"client_id",label:"Client ID"}),(0,s.jsx)(j.j0,{name:"auth_uri",label:"Auth URI"}),(0,s.jsx)(j.j0,{name:"token_uri",label:"Token URI"}),(0,s.jsx)(j.j0,{name:"auth_provider_x509_cert_url",label:"Auth provider x509 cert URL"}),(0,s.jsx)(j.j0,{name:"client_x509_cert_url",label:"Client x509 cert URL"}),(0,s.jsx)(j.j0,{name:"universe_domain",label:"Universe domain"})]}),(0,s.jsxs)(a.xuv,{mt:10,children:[(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]})]})},_=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[v,_]=(0,r.useState)(""),[g]=(0,h.gC)(),[f]=(0,h.cf)(),{handleError:y}=(0,n.H)(),{successAlert:b}=(0,n.V)(),k={type:m.DE.s3,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},C=async e=>{let t=await g({type:m.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,l.D4)(t)?y(t.error):(_(e.auth_method),b("S3 storage credentials successfully updated."))},q=async e=>{let t=await f({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:m.DE.s3});(0,l.D4)(t)?y(t.error):b("S3 storage secrets successfully updated.")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"S3 storage configuration"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:k,onSubmit:C,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(x.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(x.d,{name:"auth_method",label:"Auth method",options:[{label:"secret_keys",value:"secret_keys"},{label:"automatic",value:"automatic"}],"data-testid":"auth_method",isRequired:!0}),(0,s.jsx)(j.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"secret_keys"===v?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.izJ,{mt:5}),(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:q,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(j.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,s.jsx)(j.j0,{name:"aws_secret_access_key",label:"AWS secret access key",type:"password"})]}),(0,s.jsxs)(a.xuv,{mt:10,children:[(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null]})},g=()=>{let{successAlert:e}=(0,n.V)(),{handleError:t}=(0,n.H)(),[i,p]=(0,r.useState)(""),{data:x}=(0,h.PW)(),{data:j}=(0,h.Au)({type:i}),[g,{isLoading:f}]=(0,h.gC)(),[y]=(0,u.L)();(0,r.useEffect)(()=>{x&&p(x.type)},[x]);let b=async i=>{let{value:s}=i.target;if(s===m.DE.local){let i=await g({type:s,details:{},format:"json"});(0,l.D4)(i)?t(i.error):e("Configured storage details successfully.")}let a=await y({storage:{active_default_storage_type:s}});(0,l.D4)(a)?t(a.error):p(s)},k={s3:_,gcs:v}[i];return(0,s.jsxs)(o.Z,{title:"Configure Privacy Requests - Storage",children:[(0,s.jsx)(c.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:d.Jw},{title:"Configure requests",href:d.fz},{title:"Storage"}]}),(0,s.jsx)(a.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure storage"}),(0,s.jsxs)(a.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,s.jsx)(a.xuv,{mb:5,children:"Fides requires a storage destination to store and share the results of privacy requests. For a production setup, it is highly recommended to have S3 as a storage destination. Ensure you have completed the setup for the storage destination and have the details handy prior to the following steps."}),(0,s.jsxs)(a.xuv,{children:["To configure a Storage destination, first choose a method to store your results. Fides currently supports"," ",(0,s.jsx)(a.xvT,{as:"span",color:"complimentary.500",children:"Local"}),", ",(0,s.jsx)(a.xvT,{as:"span",color:"complimentary.500",children:"S3"})," ","and"," ",(0,s.jsx)(a.xvT,{as:"span",color:"complimentary.500",children:"GCS"})," ","storage methods."]}),(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose storage type to configure"}),(0,s.jsx)(a.y02.Group,{disabled:f,onChange:b,value:i,"data-testid":"privacy-requests-storage-selection",className:"p-3",children:(0,s.jsxs)(a.jqI,{children:[(0,s.jsx)(a.y02,{value:"local","data-testid":"option-local",children:"Local"},"local"),(0,s.jsx)(a.y02,{value:"s3","data-testid":"option-s3",children:"S3"},"s3"),(0,s.jsx)(a.y02,{value:"gcs","data-testid":"option-gcs",children:"GCS"},"gcs")]})}),k&&j&&(0,s.jsx)(k,{storageDetails:j})]})]})},f=()=>(0,s.jsx)(g,{})}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1242],{29221:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure",function(){return r(57916)}])},77213:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var i=r(24246),s=r(27824),n=r(88038),o=r.n(n),a=r(86677);r(27378);var d=r(25980),c=r(90867),l=r(77830),u=()=>{let e=(0,a.useRouter)();return(0,i.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(s.wpx,{onClick:()=>{e.push(l.fz)},children:"Configure"})]}),(0,i.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:r,padded:n=!0,mainProps:l}=e,p=(0,d.hz)(),g=(0,a.useRouter)(),h="/privacy-requests"===g.pathname||"/datastore-connection"===g.pathname,m=!(p.flags.privacyRequestsConfiguration&&h),{data:x}=(0,c.JE)(void 0,{skip:m}),{data:f}=(0,c.PW)(void 0,{skip:m}),y=p.flags.privacyRequestsConfiguration&&(!x||!f)&&h;return(0,i.jsxs)(s.kCb,{"data-testid":r,direction:"column",h:"100vh",children:[(0,i.jsxs)(o(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",r]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(s.kCb,{as:"main",direction:"column",py:n?6:0,px:n?10:0,h:n?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...l,children:[y?(0,i.jsx)(u,{}):null,t]})]})}},58754:function(e,t,r){"use strict";var i=r(24246),s=r(27824),n=r(70788);t.Z=e=>{let{heading:t,breadcrumbItems:r,isSticky:o=!0,children:a,rightContent:d,style:c,...l}=e;return(0,i.jsxs)("div",{...l,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)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(s.lQT,{className:r||a?"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})]}),!!r&&(0,i.jsx)(n.m,{className:a?"pb-4":void 0,items:r,"data-testid":"page-breadcrumb"}),a]})}},70788:function(e,t,r){"use strict";r.d(t,{m:function(){return c}});var i=r(24246),s=r(27824),n=r(79894),o=r.n(n),a=r(27378);let{Text:d}=s.AntTypography,c=e=>{let{items:t,...r}=e,n=(0,a.useMemo)(()=>null==t?void 0:t.map((e,r)=>{let n=r===t.length-1,a={...e},c=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,i.jsx)(d,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,children:a.title})),c)?a.title=(0,i.jsx)(s.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,i.jsx)(o(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,i.jsx)(s.zrq,{items:n,...r})}},57916:function(e,t,r){"use strict";r.r(t);var i=r(24246),s=r(27824),n=r(79894),o=r.n(n),a=r(77213),d=r(77830),c=r(58754);let{Text:l}=s.AntTypography;t.default=()=>(0,i.jsxs)(a.Z,{title:"Configure Privacy Requests",children:[(0,i.jsx)(c.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:d.Jw},{title:"Configure requests"}]}),(0,i.jsx)(l,{strong:!0,children:"Configure your privacy requests:"}),(0,i.jsxs)(s.xuv,{display:"flex",alignItems:"center",my:5,"data-testid":"privacy-requests-configure",children:[(0,i.jsxs)(s.fGe,{p:"5",borderWidth:"1px",rounded:"md",borderColor:"gray.300",_hover:{borderColor:"complimentary.500",cursor:"pointer"},mr:5,minHeight:"100%",children:[(0,i.jsx)(s.X6q,{mb:2,size:"sm",children:(0,i.jsx)(s.AB5,{as:o(),href:"/privacy-requests/configure/messaging",children:"Configure messaging provider"})}),"Fides supports email (Mailgun & Twilio) and SMS (Twilio) server configurations for sending processing notices to privacy request subjects. Configure your settings here."]}),(0,i.jsxs)(s.fGe,{p:"5",borderWidth:"1px",rounded:"md",borderColor:"gray.300",_hover:{borderColor:"complimentary.500",cursor:"pointer"},minHeight:"100%",children:[(0,i.jsx)(s.X6q,{mb:2,size:"sm",children:(0,i.jsx)(s.AB5,{as:o(),href:"/privacy-requests/configure/storage",children:"Configure storage"})}),"The data produced by an access request will need to be uploaded to a storage destination (e.g. an S3 bucket) in order to be returned to the user. At least one storage destination must be configured to process access requests. Configure your settings here."]})]})]})}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=29221)}),_N_E=e.O()}]);