ethyca-fides 2.71.2b0__py2.py3-none-any.whl → 2.72.0rc1__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 (307) hide show
  1. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc1.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc1.dist-info}/RECORD +257 -241
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/4bfbeff34611_add_polling_status.py +45 -12
  5. fides/api/api/v1/endpoints/connection_endpoints.py +38 -45
  6. fides/api/api/v1/endpoints/saas_config_endpoints.py +60 -48
  7. fides/api/api/v1/endpoints/system.py +11 -43
  8. fides/api/api/v1/endpoints/user_endpoints.py +8 -1
  9. fides/api/app_setup.py +1 -3
  10. fides/api/common_exceptions.py +4 -0
  11. fides/api/email_templates/get_email_template.py +3 -0
  12. fides/api/email_templates/template_names.py +1 -0
  13. fides/api/email_templates/templates/manual_task_digest.html +316 -0
  14. fides/api/models/detection_discovery/monitor_task.py +1 -0
  15. fides/api/models/digest/digest_execution.py +11 -1
  16. fides/api/models/event_audit.py +9 -0
  17. fides/api/models/messaging_template.py +7 -0
  18. fides/api/schemas/connection_configuration/connection_config.py +1 -30
  19. fides/api/schemas/messaging/messaging.py +15 -0
  20. fides/api/service/connectors/saas/connector_registry_service.py +1 -138
  21. fides/api/service/deps.py +8 -0
  22. fides/api/service/messaging/message_dispatch_service.py +38 -1
  23. fides/api/tasks/__init__.py +0 -1
  24. fides/api/util/connection_util.py +99 -215
  25. fides/api/util/event_audit_util.py +230 -0
  26. fides/api/util/masking_util.py +31 -0
  27. fides/api/util/saas_config_updater.py +66 -0
  28. fides/service/connection/__init__.py +0 -0
  29. fides/service/connection/connection_service.py +651 -0
  30. fides/service/event_audit_service.py +16 -22
  31. fides/ui-build/static/admin/404.html +1 -1
  32. fides/ui-build/static/admin/_next/static/ODdLh9UEeAsudRtjifMM5/_buildManifest.js +1 -0
  33. fides/ui-build/static/admin/_next/static/chunks/{1437-fb699e9d69c3e325.js → 1437-4604a69888906ec0.js} +1 -1
  34. fides/ui-build/static/admin/_next/static/chunks/155-bf4e3ffb18f29226.js +1 -0
  35. fides/ui-build/static/admin/_next/static/chunks/{1817-10b392e1dd9c4673.js → 1817-6a6b4aea9d242c5b.js} +1 -1
  36. fides/ui-build/static/admin/_next/static/chunks/{2040-01d5edb1802d3482.js → 2040-8eead9d29546a50f.js} +1 -1
  37. fides/ui-build/static/admin/_next/static/chunks/{2397-40506a386a3a469a.js → 2397-92f628c53688925b.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/2921-9b596ba7f5267afc.js +1 -0
  39. fides/ui-build/static/admin/_next/static/chunks/3377-80612c111e047cb6.js +1 -0
  40. fides/ui-build/static/admin/_next/static/chunks/{3696-259be222ea12392a.js → 3696-e4abb6a922b954a2.js} +1 -1
  41. fides/ui-build/static/admin/_next/static/chunks/3700-1f9f6e5ebfa3ab0a.js +1 -0
  42. fides/ui-build/static/admin/_next/static/chunks/401-c2f1e4ea077f1f26.js +1 -0
  43. fides/ui-build/static/admin/_next/static/chunks/4496-dd1ef427be497620.js +1 -0
  44. fides/ui-build/static/admin/_next/static/chunks/5185-bf5655b5d697b714.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/{5258-2d28b2c64acf5de3.js → 5258-63325c03319e87dc.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/{5279-21929b12c927b022.js → 5279-fcac4a8575f41ecc.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/5643-7800464c8df7a78e.js +1 -0
  48. fides/ui-build/static/admin/_next/static/chunks/{5783-55c0387508e50f3e.js → 5783-7deeb7de5d2db4c4.js} +1 -1
  49. fides/ui-build/static/admin/_next/static/chunks/6277-0ab2a15c37b83b8d.js +1 -0
  50. fides/ui-build/static/admin/_next/static/chunks/{6315-2d4e86a32fc40458.js → 6315-d0b886d849c2e5e3.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/{6853-cb15625a713b3ef9.js → 6853-6d64d627df6f8194.js} +1 -1
  52. fides/ui-build/static/admin/_next/static/chunks/6954-8b106311a3be35f4.js +1 -0
  53. fides/ui-build/static/admin/_next/static/chunks/7245-53a20677c49b41c8.js +1 -0
  54. fides/ui-build/static/admin/_next/static/chunks/{7476-f25fce73eeb1f9c6.js → 7476-08717f00da5f89ab.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/{7488-df17b592fbeaa1eb.js → 7488-bad160a2bfd89871.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/7630-775c578fa8109b0f.js +1 -0
  57. fides/ui-build/static/admin/_next/static/chunks/{8011-56031d82d5428981.js → 8011-c23d609ed3f0efa5.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/8212-67ac884660ddb63a.js +1 -0
  59. fides/ui-build/static/admin/_next/static/chunks/{8373-7f940f5ac9c38b1f.js → 8373-43b6df89a2085d6b.js} +1 -1
  60. fides/ui-build/static/admin/_next/static/chunks/{9046-31b16a7e872c22be.js → 9046-28fe0723e3b6584f.js} +1 -1
  61. fides/ui-build/static/admin/_next/static/chunks/9070-6d3aaaf5aa5913ba.js +1 -0
  62. fides/ui-build/static/admin/_next/static/chunks/{9330-cea1bf40f5d27e53.js → 9330-6eb11127296c54c2.js} +1 -1
  63. fides/ui-build/static/admin/_next/static/chunks/{9682-2754256aeae141bb.js → 9682-65d253d54f84f6f2.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/chunks/{9899-15530c468d5656a1.js → 9899-63998972698a49fb.js} +1 -1
  65. fides/ui-build/static/admin/_next/static/chunks/9965-4709f43bf62af9a9.js +1 -0
  66. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-9e869a44215709ed.js → _app-4f697016cf2fb1bb.js} +43 -43
  67. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-e2a5c951347195e3.js +1 -0
  68. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-0058fe05f2d23d1a.js +1 -0
  69. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-b6b2d50d894cefa5.js +1 -0
  70. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-a7fe3925771bb6c3.js +1 -0
  71. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-e9ec351281c54822.js +1 -0
  72. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-69b429a9d30ebaf1.js → projects-3c935e93208d2bdd.js} +1 -1
  73. fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-a53ef0161235ee47.js → data-catalog-79d06a04698c47c0.js} +1 -1
  74. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-e50e9c8e11412b2a.js +1 -0
  75. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/data-explorer-dd93cffd6744837d.js +1 -0
  76. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-ace848575e688200.js → [monitorId]-878aa4ab0746df5b.js} +1 -1
  77. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-53ca31c50c43007f.js → action-center-a2e9c0bfa67c633d.js} +1 -1
  78. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-f87e4a0f664f4cde.js → activity-70ca690b253a118e.js} +1 -1
  79. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-db54d01fd8f6df50.js → new-5c20080cdb053b1d.js} +1 -1
  80. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-55d312af5228e098.js → dataset-96355a68e8c28fe8.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-488beba62e832660.js → [id]-448729ee9d1d78c3.js} +1 -1
  82. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-4aad5495f9bf81ce.js → new-42c720ec5c941573.js} +1 -1
  83. fides/ui-build/static/admin/_next/static/chunks/pages/{index-8a2ba955d92d52ee.js → index-ca794e85c16cba67.js} +1 -1
  84. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-2f1dc17eba11fb4e.js +1 -0
  85. fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-f69b04d3b4cf43b1.js → integrations-bbec0140433a199b.js} +1 -1
  86. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/[id]-058125922d1eaeec.js +1 -0
  87. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/new-7a5f76708c79f714.js +1 -0
  88. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests-4b5feea248275c28.js +1 -0
  89. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/[key]-d08f3a7cd2d011ec.js +1 -0
  90. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/new-cb2c7fbc26886052.js +1 -0
  91. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers-37eb88a387fca86f.js +1 -0
  92. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/[id]-a6ae72abe59ff830.js +1 -0
  93. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/add-template-a3e4b5b575b31be1.js +1 -0
  94. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates-74585f6d9ff1245f.js +1 -0
  95. fides/ui-build/static/admin/_next/static/chunks/pages/notifications-9644c0f088a01fea.js +1 -0
  96. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-39b5586d9c8b64aa.js +1 -0
  97. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-5163f3213377bd35.js +1 -0
  98. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-0b1547cd9b114c6b.js +1 -0
  99. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-da562cba4cffd6bb.js +1 -0
  100. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-3a587676869d2ef6.js +1 -0
  101. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-defc3b917306a6d8.js +1 -0
  102. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-b46f432b51421fae.js → table-migration-11a70bcfa672ce8f.js} +1 -1
  103. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-787621468b5a7619.js +1 -0
  104. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-de681c2d022c9e0d.js → storage-24a8c2ab57625556.js} +1 -1
  105. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-da634187d8201ab3.js +1 -0
  106. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-e410d13a2b35cff4.js +1 -0
  107. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-aec1bf8a409ec75f.js +1 -0
  108. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-4c20c08ca7ea8cff.js +1 -0
  109. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-ea9baf24de35d3b1.js → custom-fields-8e4a76376927afd5.js} +1 -1
  110. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-2e88cc7a6074a28b.js +1 -0
  111. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-33448bf0a1d53870.js → locations-20789aa0c84d544e.js} +1 -1
  112. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-3c315036f1fc9f90.js → organization-f84a13eb9688cb5f.js} +1 -1
  113. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-5be9ce7a745ce908.js +1 -0
  114. fides/ui-build/static/admin/_next/static/chunks/pages/systems-86f5557384124f79.js +1 -0
  115. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-2589729c47976357.js +1 -0
  116. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-726fbc0a34ffba1f.js → [id]-6217433a26599521.js} +1 -1
  117. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-df9b75ab01c1a2ea.js → user-management-b6c4bf35c003965d.js} +1 -1
  118. fides/ui-build/static/admin/_next/static/css/de09ed8a0adf1ca2.css +1 -0
  119. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  120. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  121. fides/ui-build/static/admin/add-systems.html +1 -1
  122. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  123. fides/ui-build/static/admin/consent/configure.html +1 -1
  124. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  125. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  126. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  127. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  128. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  129. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  130. fides/ui-build/static/admin/consent/properties.html +1 -1
  131. fides/ui-build/static/admin/consent/reporting.html +1 -1
  132. fides/ui-build/static/admin/consent.html +1 -1
  133. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  134. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  135. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  136. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  137. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  138. fides/ui-build/static/admin/data-catalog.html +1 -1
  139. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  140. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/data-explorer.html +1 -1
  141. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  142. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  143. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  144. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  145. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  146. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  147. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  148. fides/ui-build/static/admin/datamap.html +1 -1
  149. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  150. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  151. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  152. fides/ui-build/static/admin/dataset/new.html +1 -1
  153. fides/ui-build/static/admin/dataset.html +1 -1
  154. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  155. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  156. fides/ui-build/static/admin/datastore-connection.html +1 -1
  157. fides/ui-build/static/admin/index.html +1 -1
  158. fides/ui-build/static/admin/integrations/[id].html +1 -1
  159. fides/ui-build/static/admin/integrations.html +1 -1
  160. fides/ui-build/static/admin/login/[provider].html +1 -1
  161. fides/ui-build/static/admin/login.html +1 -1
  162. fides/ui-build/static/admin/notifications/digests/[id].html +1 -0
  163. fides/ui-build/static/admin/notifications/digests/new.html +1 -0
  164. fides/ui-build/static/admin/notifications/digests.html +1 -0
  165. fides/ui-build/static/admin/notifications/providers/[key].html +1 -0
  166. fides/ui-build/static/admin/notifications/providers/new.html +1 -0
  167. fides/ui-build/static/admin/notifications/providers.html +1 -0
  168. fides/ui-build/static/admin/notifications/templates/[id].html +1 -0
  169. fides/ui-build/static/admin/notifications/templates/add-template.html +1 -0
  170. fides/ui-build/static/admin/notifications/templates.html +1 -0
  171. fides/ui-build/static/admin/notifications.html +1 -0
  172. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  173. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  174. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  175. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  176. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  177. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  178. fides/ui-build/static/admin/poc/forms.html +1 -1
  179. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  180. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  181. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  182. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  183. fides/ui-build/static/admin/privacy-requests.html +1 -1
  184. fides/ui-build/static/admin/properties/[id].html +1 -1
  185. fides/ui-build/static/admin/properties/add-property.html +1 -1
  186. fides/ui-build/static/admin/properties.html +1 -1
  187. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  188. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  189. fides/ui-build/static/admin/settings/about.html +1 -1
  190. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  191. fides/ui-build/static/admin/settings/consent.html +1 -1
  192. fides/ui-build/static/admin/settings/custom-fields/[id].html +1 -1
  193. fides/ui-build/static/admin/settings/custom-fields/new.html +1 -1
  194. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  195. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  196. fides/ui-build/static/admin/settings/domains.html +1 -1
  197. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  198. fides/ui-build/static/admin/settings/locations.html +1 -1
  199. fides/ui-build/static/admin/settings/organization.html +1 -1
  200. fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
  201. fides/ui-build/static/admin/settings/regulations.html +1 -1
  202. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  203. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  204. fides/ui-build/static/admin/systems.html +1 -1
  205. fides/ui-build/static/admin/taxonomy.html +1 -1
  206. fides/ui-build/static/admin/user-management/new.html +1 -1
  207. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  208. fides/ui-build/static/admin/user-management.html +1 -1
  209. fides/ui-build/static/admin/_next/static/chunks/155-3d03f101c662c054.js +0 -1
  210. fides/ui-build/static/admin/_next/static/chunks/2921-edfdffa353a611e4.js +0 -1
  211. fides/ui-build/static/admin/_next/static/chunks/3377-4c129258b4c4ea28.js +0 -1
  212. fides/ui-build/static/admin/_next/static/chunks/3700-42976bfaad3b91c9.js +0 -1
  213. fides/ui-build/static/admin/_next/static/chunks/401-5270e3e23b08ab2b.js +0 -1
  214. fides/ui-build/static/admin/_next/static/chunks/5185-325e5435a0c7dcb7.js +0 -1
  215. fides/ui-build/static/admin/_next/static/chunks/5643-7583c1f8dbd83273.js +0 -1
  216. fides/ui-build/static/admin/_next/static/chunks/6277-ca31d48a33202761.js +0 -1
  217. fides/ui-build/static/admin/_next/static/chunks/6954-08b59d28d7a2a43b.js +0 -1
  218. fides/ui-build/static/admin/_next/static/chunks/7245-895bb7c6a6c797bc.js +0 -1
  219. fides/ui-build/static/admin/_next/static/chunks/7630-71582de0e818e28f.js +0 -1
  220. fides/ui-build/static/admin/_next/static/chunks/9070-13f237db78da586d.js +0 -1
  221. fides/ui-build/static/admin/_next/static/chunks/9965-54037b6c8f36d14b.js +0 -1
  222. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-1c9cef80deccb15d.js +0 -1
  223. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-4adeec3bcec05f7b.js +0 -1
  224. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-4254abef7bb52edd.js +0 -1
  225. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-8e76cbfaf71fdcb9.js +0 -1
  226. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-93730a4316c0d980.js +0 -1
  227. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-f85f4f8fcf1bfbdb.js +0 -1
  228. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/data-explorer-3619e454763dba09.js +0 -1
  229. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-4580f70eb41b6a7d.js +0 -1
  230. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/[id]-d6eed2dc5d27f625.js +0 -1
  231. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/add-template-c7b43fa365f4be10.js +0 -1
  232. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-c7ba755c2e0e2377.js +0 -1
  233. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-f14bfd5890a0e939.js +0 -1
  234. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-e4274a4d5d23eea9.js +0 -1
  235. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-f5bce1ceb0502f04.js +0 -1
  236. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-90b4ea9f9deca6e2.js +0 -1
  237. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-d6043ae8dae6ef7d.js +0 -1
  238. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-520ba5ae02f47bda.js +0 -1
  239. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-fe4ed3ad75151e36.js +0 -1
  240. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-cd8ba2eef9085377.js +0 -1
  241. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-764b6ce8e030d4a1.js +0 -1
  242. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-da78452b3c41b29e.js +0 -1
  243. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-6442e761ecb5c65a.js +0 -1
  244. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-6f61d886aa6f5ce7.js +0 -1
  245. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/[key]-4a18d8135c0dbf2a.js +0 -1
  246. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/new-41957281b8ec26b1.js +0 -1
  247. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers-776258bad0941a7d.js +0 -1
  248. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-8067e12227210f48.js +0 -1
  249. fides/ui-build/static/admin/_next/static/chunks/pages/systems-277ea1f34c3714cf.js +0 -1
  250. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-cecea5832cb1f3b0.js +0 -1
  251. fides/ui-build/static/admin/_next/static/css/372d6a236c84613f.css +0 -1
  252. fides/ui-build/static/admin/_next/static/zmEQMSpOBih8kmA1t-EWO/_buildManifest.js +0 -1
  253. fides/ui-build/static/admin/messaging/[id].html +0 -1
  254. fides/ui-build/static/admin/messaging/add-template.html +0 -1
  255. fides/ui-build/static/admin/messaging.html +0 -1
  256. fides/ui-build/static/admin/settings/messaging-providers/[key].html +0 -1
  257. fides/ui-build/static/admin/settings/messaging-providers/new.html +0 -1
  258. fides/ui-build/static/admin/settings/messaging-providers.html +0 -1
  259. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc1.dist-info}/WHEEL +0 -0
  260. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc1.dist-info}/entry_points.txt +0 -0
  261. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc1.dist-info}/licenses/LICENSE +0 -0
  262. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc1.dist-info}/top_level.txt +0 -0
  263. /fides/ui-build/static/admin/_next/static/{zmEQMSpOBih8kmA1t-EWO → ODdLh9UEeAsudRtjifMM5}/_ssgManifest.js +0 -0
  264. /fides/ui-build/static/admin/_next/static/chunks/{1099-27b2d4e59a569b38.js → 1099-d1b22e891705eaf8.js} +0 -0
  265. /fides/ui-build/static/admin/_next/static/chunks/{1115-8fb5000847f73ec7.js → 1115-584dac093cef6cc3.js} +0 -0
  266. /fides/ui-build/static/admin/_next/static/chunks/{3772-aa7beafe5df5e656.js → 3772-b945c6839e43c753.js} +0 -0
  267. /fides/ui-build/static/admin/_next/static/chunks/{3923-fa1d71afc7dc9e6e.js → 3923-c1e41661ebf57178.js} +0 -0
  268. /fides/ui-build/static/admin/_next/static/chunks/{4817-5f9b9c9bafe888f1.js → 4817-066598cef25d7e88.js} +0 -0
  269. /fides/ui-build/static/admin/_next/static/chunks/{549-c3b4c51f45a84a52.js → 549-3e3b8d01bc984f96.js} +0 -0
  270. /fides/ui-build/static/admin/_next/static/chunks/{7773-98d34d188ae0a694.js → 7773-24899908bf8ff659.js} +0 -0
  271. /fides/ui-build/static/admin/_next/static/chunks/{796-7944f684f8945506.js → 796-6fe49d134f660156.js} +0 -0
  272. /fides/ui-build/static/admin/_next/static/chunks/{9826-e71887e2c4283249.js → 9826-1f42934a2863992e.js} +0 -0
  273. /fides/ui-build/static/admin/_next/static/chunks/pages/{404-2014144a1a0fa64f.js → 404-962d132471cd41ba.js} +0 -0
  274. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-4f3ba02774f27795.js → manual-055d058d16c02957.js} +0 -0
  275. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-f7bdc2da53137ffd.js → add-vendors-7c829e58485fc821.js} +0 -0
  276. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-a27b220fe76bdc8e.js → configure-5c58b69dd473cc06.js} +0 -0
  277. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-542fd4a4322122f1.js → [id]-58460ac9c1dface5.js} +0 -0
  278. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-d31d1c233e94dc1f.js → [id]-25ce8366e689363b.js} +0 -0
  279. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-2ea057e6217993f9.js → new-faa457089616711a.js} +0 -0
  280. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-eb557180eded0abd.js → properties-45a2901a35edc8f7.js} +0 -0
  281. /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-c64589e53338e59a.js → consent-a7a4e419e4086033.js} +0 -0
  282. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-d3d1841bc8105e56.js → [resourceUrn]-3b59925f6c9a13a9.js} +0 -0
  283. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-8cd4d1d6ba000333.js → [projectUrn]-ffb6e0fe6712342e.js} +0 -0
  284. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-791c522ad1d9a2ce.js → [resourceUrn]-8d7d9152e215c3b6.js} +0 -0
  285. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-8c7103ebf01d6e6a.js → resources-96be972a983616e3.js} +0 -0
  286. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-699762cb8a66237e.js → [resourceUrn]-260f5deb68966b70.js} +0 -0
  287. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-d970d0b82db36c88.js → detection-d735dab3d9f3adc5.js} +0 -0
  288. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-a6343038a447699c.js → [resourceUrn]-c7f055275a2c503f.js} +0 -0
  289. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-ce82ba79f9bf825c.js → discovery-b1cfd55c7e127865.js} +0 -0
  290. /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-ae7a4c1c4eabc0d4.js → datamap-18f255a8bbeecaa4.js} +0 -0
  291. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-179e5d09ccff50c1.js → [...subfieldNames]-e04a4e16ccf32aef.js} +0 -0
  292. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-59466e5e238c59d0.js → [collectionName]-a40c4febe16a0a6d.js} +0 -0
  293. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-36d90c8c39fb0d1c.js → [datasetId]-f500a77eefb057e7.js} +0 -0
  294. /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-496ec7ecca8259dc.js → datastore-connection-a8fc95a46de38b35.js} +0 -0
  295. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-04ebf2fb6fc4358a.js → configure-1926359bdf5d6c30.js} +0 -0
  296. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-f75a407d78857ab3.js → [id]-47118b9976ad7212.js} +0 -0
  297. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-975ff605e1dbc09c.js → add-property-2e6b0d8b409ba1fd.js} +0 -0
  298. /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-e7fdf3a9a3e8c267.js → properties-32486c25255c9cb1.js} +0 -0
  299. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/{[id]-bd1042a0e9be6aff.js → [id]-a270325109398f48.js} +0 -0
  300. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/{new-469ad83c8cfa1290.js → new-2e0c8e249f286427.js} +0 -0
  301. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-44d06e280990854d.js → domain-records-e3dcef1ec8cf8b9e.js} +0 -0
  302. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-11148b182370fd83.js → email-templates-7469d2f85396c693.js} +0 -0
  303. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{privacy-requests-00917525c9245a90.js → privacy-requests-b72df6f3d460125f.js} +0 -0
  304. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-5d924b2f1f926b88.js → regulations-aa02bc818e089c49.js} +0 -0
  305. /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-1a902922759cae76.js → [id]-2fc7c0d3988427b3.js} +0 -0
  306. /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-629c88e90699369b.js → new-e399005c3bb4db1b.js} +0 -0
  307. /fides/ui-build/static/admin/_next/static/chunks/{webpack-118fb4723d13c14f.js → webpack-8eac1ea5c825c8b4.js} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6781],{42944:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/notifications/templates",function(){return s(46632)}])},35287:function(e,t,s){"use strict";var i=s(24246),a=s(20595),n=s(88038),r=s.n(n);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:n}=e;return(0,i.jsxs)(a.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)(a.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...n,children:t})]})}},87361:function(e,t,s){"use strict";var i=s(24246),a=s(20595);t.Z=e=>{let{title:t,text:s,onClose:n}=e;return(0,i.jsxs)(a.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:[n&&(0,i.jsx)(a.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:n}),(0,i.jsx)(a.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,i.jsxs)(a.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,i.jsx)(a.X6q,{fontSize:"md",children:t}),(0,i.jsx)(a.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:s})]})]})}},129:function(e,t,s){"use strict";var i=s(24246),a=s(20595),n=s(86677),r=s(16134),l=s(25980),o=s(77830),c=s(39449),d=s(31793);t.Z=()=>{let e=(0,n.useRouter)(),t=e.pathname,{plus:s}=(0,l.hz)(),p="providers";t.startsWith(o.AD)?p="providers":t.startsWith(o.Wi)?p="templates":t.startsWith(o.DN)&&(p="digests");let u=[{key:"templates",label:"Templates",requiresPlus:!0,scopes:[c.Sh.MESSAGING_TEMPLATE_UPDATE],path:o.Wi},{key:"digests",label:"Digests",requiresPlus:!0,scopes:[c.Sh.DIGEST_CONFIG_READ],path:o.DN},{key:"providers",label:"Providers",requiresPlus:!1,scopes:[c.Sh.MESSAGING_CREATE_OR_UPDATE],path:o.AD}];s||(u=u.filter(e=>!e.requiresPlus));let m=(0,r.C)(d.uu);u=u.filter(e=>e.scopes.some(e=>m.includes(e)));let g=t=>{let s=u.find(e=>e.key===t);s&&e.push(s.path)};return(0,i.jsx)("div",{className:"mb-6",children:(0,i.jsx)(a.Niu,{mode:"horizontal",selectedKeys:[p],onClick:e=>{let{key:t}=e;return g(t)},items:u})})}},58754:function(e,t,s){"use strict";var i=s(24246),a=s(20595),n=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)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(a.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)(n.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),a=s(20595),n=s(79894),r=s.n(n),l=s(27378);let{Text:o}=a.AntTypography,c=e=>{let{items:t,...s}=e,n=(0,l.useMemo)(()=>null==t?void 0:t.map((e,s)=>{let n=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:n?void 0:400},ellipsis:!n,id:n?"breadcrumb-current-page":void 0,children:l.title})),c)?l.title=(0,i.jsx)(a.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)(a.zrq,{items:n,...s})}},67810:function(e,t,s){"use strict";s.d(t,{Z:function(){return n}}),(i=a||(a={})).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",i.MANUAL_TASK_DIGEST="manual_task_digest";var i,a,n={[a.PRIVACY_REQUEST_COMPLETE_ACCESS]:"Access request completed",[a.PRIVACY_REQUEST_COMPLETE_DELETION]:"Erasure request completed",[a.PRIVACY_REQUEST_RECEIPT]:"Privacy request received",[a.PRIVACY_REQUEST_REVIEW_APPROVE]:"Privacy request approved",[a.PRIVACY_REQUEST_REVIEW_DENY]:"Privacy request denied",[a.SUBJECT_IDENTITY_VERIFICATION]:"Subject identity verification",[a.MANUAL_TASK_DIGEST]:"Manual task digest"}},5058:function(e,t,s){"use strict";s.d(t,{Vw:function(){return n},ms:function(){return i},pS:function(){return a},vm:function(){return r}});let{useGetSummaryMessagingTemplatesQuery:i,usePutMessagingTemplateByIdMutation:a,useCreateMessagingTemplateByTypeMutation:n,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"]})})})},46632:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return M}});var i=s(24246),a=s(92222),n=s(59003),r=s(20595),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),h=s(77830),x=s(129),f=s(58754),j=s(47935),_=s(42904),E=s(7426),v=s(67810),y=e=>{let{isOpen:t,onClose:s,onAccept:a}=e,[n,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","aria-label":"Select a template"})})]}),(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:()=>a(n),type:"primary","data-testid":"confirm-btn",disabled:!n,className:"grow",children:"Next"})]})})]})]})},b=s(5058),T=s(812),C=s(46628),S=s(31883),P=()=>{let e=(0,r.pmc)(),[t]=(0,b.vm)();return{toggleIsTemplateEnabled:(0,d.useCallback)(async s=>{let{isEnabled:i,templateId:a}=s,n=await t({templateId:a,template:{is_enabled:i}});if((0,S.D4)(n)){e((0,C.Vo)((0,T.e$)(n.error)));return}e((0,C.t5)("Messaging template ".concat(i?"enabled":"disabled")))},[t,e])}},R=s(64826);let w=(0,a.Cl)(),I={items:[],total:0,page:1,size:50,pages:1},A=()=>(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),a=!!(!e&&(null==s?void 0:s.length)),n="missing-messages-notice-".concat(null==s?void 0:s.map(e=>e.id).join("-")),[l,o]=(0,u._)("notices.dismissedMessageNoticeId",""),c=n===l;return a&&!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(n)}})}):null},N=()=>{let{data:e}=(0,E.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 M=()=>{let e=(0,c.useRouter)(),{toggleIsTemplateEnabled:t}=P(),{PAGE_SIZES:s,pageSize:l,setPageSize:u,onPreviousPageClick:m,isPreviousPageDisabled:g,onNextPageClick:E,isNextPageDisabled:T,startRange:C,endRange:S,pageIndex:R,setTotalPages:M}=(0,j.oi)(),{data:q,isLoading:z,isFetching:D}=(0,b.ms)({page:R,size:l}),{items:U,total:V,pages:W}=(0,d.useMemo)(()=>null!=q?q:I,[q]);(0,d.useEffect)(()=>{M(W)},[W,M]);let[O,B]=(0,d.useState)(!1),Y=(0,d.useMemo)(()=>[w.accessor(e=>e.type,{id:"message",cell:e=>(0,i.jsx)(j.G3,{value:v.Z[e.getValue()]}),header:e=>(0,i.jsx)(j.Rr,{value:"Message",...e}),size:150}),w.accessor(e=>(e.properties||[]).map(e=>e.name),{id:"properties",cell:e=>(0,i.jsx)(j.WP,{suffix:"properties",value:e.getValue(),...e}),header:e=>(0,i.jsx)(j.Rr,{value:"Properties",...e}),meta:{showHeaderMenu:!0},size:250}),w.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)(j.Rr,{value:"Enable",...e}),size:200,meta:{disableRowClick:!0}})],[t]),Z=(0,d.useMemo)(()=>o()(U,"id"),[U]),L=(0,n.b7)({getCoreRowModel:(0,a.sC)(),getFilteredRowModel:(0,a.vL)(),getSortedRowModel:(0,a.tj)(),columns:Y,data:Z,columnResizeMode:"onChange"});return(0,i.jsxs)(p.Z,{title:"Notifications",children:[(0,i.jsx)(f.Z,{heading:"Notifications"}),(0,i.jsx)(x.Z,{}),(0,i.jsx)(N,{}),(0,i.jsx)(k,{}),(0,i.jsx)(j.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)(j.I4,{rowHeight:36,numRows:15}):(0,i.jsx)(j.ZK,{tableInstance:L,onRowClick:t=>{e.push({pathname:h.mf,query:{id:t.id}})},emptyTableNotice:(0,i.jsx)(A,{})}),(0,i.jsx)(_.s8,{totalRows:V||0,pageSizes:s,setPageSize:u,onPreviousPageClick:m,isPreviousPageDisabled:g||D,onNextPageClick:E,isNextPageDisabled:T||D,startRange:C,endRange:S}),(0,i.jsx)(y,{isOpen:O,onClose:()=>B(!1),onAccept:t=>{e.push({pathname:h.fO,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=42944)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8769],{33274:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/notifications",function(){return i(77061)}])},77213:function(e,n,i){"use strict";i.d(n,{Z:function(){return f}});var t=i(24246),s=i(20595),r=i(88038),a=i.n(r),o=i(86677);i(27378);var g=i(25980),u=i(90867),c=i(42478),d=i(77830),l=()=>{let e=(0,o.useRouter)();return(0,t.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,t.jsxs)(s.xuv,{children:[(0,t.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,t.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,t.jsx)(s.wpx,{onClick:()=>{e.push(d.AD)},children:"Configure"})]}),(0,t.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},f=e=>{let{children:n,title:i,padded:r=!0,mainProps:d}=e,f=(0,g.hz)(),m=(0,o.useRouter)(),y="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,C=!(f.flags.messagingConfiguration&&y),{data:h}=(0,c.JE)(void 0,{skip:C}),{data:v}=(0,u.PW)(void 0,{skip:C}),p=f.flags.messagingConfiguration&&(!h||!v)&&y;return(0,t.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,t.jsxs)(a(),{children:[(0,t.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,t.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,t.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,t.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[p?(0,t.jsx)(l,{}):null,n]})]})}},42478:function(e,n,i){"use strict";i.d(n,{FU:function(){return u},JE:function(){return s},Ki:function(){return d},SU:function(){return l},W:function(){return f},h9:function(){return r},jc:function(){return t},qt:function(){return g},sn:function(){return c}});let{useGetEmailInviteStatusQuery:t,useGetActiveMessagingProviderQuery:s,useCreateMessagingConfigurationMutation:r,useCreateMessagingConfigurationSecretsMutation:a,useGetMessagingConfigurationDetailsQuery:o,useGetMessagingConfigurationsQuery:g,useGetMessagingConfigurationByKeyQuery:u,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:d,useCreateTestConnectionMessageMutation:l,useDeleteMessagingConfigurationByKeyMutation:f}=i(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,n,i,t)=>{let s=await t({url:"messaging/default/active"});return s.error&&404===s.error.status?{data:null}:s},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},77061:function(e,n,i){"use strict";i.r(n);var t=i(24246),s=i(20595),r=i(86677),a=i(27378),o=i(25980),g=i(77213),u=i(77830);n.default=()=>{let e=(0,r.useRouter)(),{plus:n}=(0,o.hz)();return(0,a.useEffect)(()=>{let i=n?u.Wi:u.AD;e.push(i)},[e,n]),(0,t.jsx)(g.Z,{title:"Notifications",children:(0,t.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,t.jsx)(s.$jN,{})})})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=33274)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1921],{76985:function(e,l,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/ant-components",function(){return a(47002)}])},58754:function(e,l,a){"use strict";var s=a(24246),i=a(20595),n=a(70788);l.Z=e=>{let{heading:l,breadcrumbItems:a,isSticky:t=!0,children:r,rightContent:c,style:d,...o}=e;return(0,s.jsxs)("div",{...o,style:t?{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)(i.jqI,{justify:"space-between",children:["string"==typeof l?(0,s.jsx)(i.lQT,{className:a||r?"pb-4":void 0,level:1,"data-testid":"page-heading",children:l}):l,c&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:c})]}),!!a&&(0,s.jsx)(n.m,{className:r?"pb-4":void 0,items:a,"data-testid":"page-breadcrumb"}),r]})}},70788:function(e,l,a){"use strict";a.d(l,{m:function(){return d}});var s=a(24246),i=a(20595),n=a(79894),t=a.n(n),r=a(27378);let{Text:c}=i.AntTypography,d=e=>{let{items:l,...a}=e,n=(0,r.useMemo)(()=>null==l?void 0:l.map((e,a)=>{let n=a===l.length-1,r={...e},d=r.onClick&&!r.href;return("string"==typeof r.title&&(r.title=(0,s.jsx)(c,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,id:n?"breadcrumb-current-page":void 0,children:r.title})),d)?r.title=(0,s.jsx)(i.wpx,{type:"text",size:"small",icon:r.icon,onClick:r.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:r.title}):(r.icon&&(r.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:r.icon}),r.title]})),r.href&&r.title&&(r.title=(0,s.jsx)(t(),{href:r.href,className:"ant-breadcrumb-link",children:r.title}),delete r.href)),r}),[l]);return(0,s.jsx)(i.zrq,{items:n,...a})}},47002:function(e,l,a){"use strict";a.r(l);var s=a(24246),i=a(20595),n=a(46238),t=a(58754);let{Content:r}=i.AntLayout,{Link:c,Paragraph:d,Text:o,Title:u}=i.AntTypography,h=[];for(let e=10;e<36;e+=1)h.push({label:e.toString(36)+e,value:e.toString(36)+e});l.default=()=>(0,s.jsx)(i.AntLayout,{children:(0,s.jsxs)(r,{className:"overflow-auto px-10 py-6",children:[(0,s.jsx)(t.Z,{heading:"Ant Design Proof of Concept"}),(0,s.jsxs)(i.bue,{gutter:16,className:"mt-6",children:[(0,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Button",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.vyj,{direction:"vertical",children:[(0,s.jsx)(i.wpx,{type:"primary",children:"Primary Button"}),(0,s.jsx)(i.wpx,{children:"Default Button"}),(0,s.jsx)(i.wpx,{type:"dashed",children:"Dashed Button"}),(0,s.jsx)(i.wpx,{type:"text",children:"Text Button"}),(0,s.jsx)(i.wpx,{type:"link",children:"Link Button"}),(0,s.jsx)(i.wpx,{type:"primary",loading:!0,children:"Loading Button"}),(0,s.jsx)(i.wpx,{type:"primary",disabled:!0,children:"Disabled Button"})]})})}),(0,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Switch",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.vyj,{direction:"vertical",children:[(0,s.jsx)(i.rAg,{defaultChecked:!0}),(0,s.jsx)(i.rAg,{size:"small",defaultChecked:!0}),(0,s.jsx)(i.rAg,{loading:!0,defaultChecked:!0})]})})}),(0,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Select",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.vyj,{direction:"vertical",children:[(0,s.jsx)(i.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}],"aria-label":"Select"}),(0,s.jsx)(i.WPr,{defaultValue:"lucy",className:"w-32",disabled:!0,options:[{value:"lucy",label:"Lucy"}],"aria-label":"Select"}),(0,s.jsx)(i.WPr,{defaultValue:"lucy",className:"w-32",loading:!0,options:[{value:"lucy",label:"Lucy"}],"aria-label":"Select"}),(0,s.jsx)(i.WPr,{defaultValue:"lucy",className:"w-32",allowClear:!0,options:[{value:"lucy",label:"Lucy"}],"aria-label":"Select"}),(0,s.jsx)(i.WPr,{mode:"multiple",allowClear:!0,className:"w-full",placeholder:"Please select","aria-label":"Select",defaultValue:["a10","c12"],options:h}),(0,s.jsx)(i.WPr,{mode:"multiple",disabled:!0,className:"w-full",placeholder:"Please select","aria-label":"Select",defaultValue:["a10","c12"],options:h})]})})})]}),(0,s.jsx)("br",{}),(0,s.jsxs)(i.bue,{gutter:16,children:[(0,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Checkbox",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.vyj,{direction:"vertical",children:[(0,s.jsx)(i.E_O,{children:"Checkbox"}),(0,s.jsx)(i.E_O,{defaultChecked:!0,children:"Checkbox"}),(0,s.jsx)(i.E_O,{disabled:!0,children:"Disabled"}),(0,s.jsx)(i.E_O,{indeterminate:!0,children:"Indeterminate"}),(0,s.jsx)(i.E_O.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange",disabled:!0}],defaultValue:["Apple"]})]})})}),(0,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Radio",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.vyj,{direction:"vertical",children:[(0,s.jsx)(i.y02,{children:"Radio"}),(0,s.jsx)(i.y02,{defaultChecked:!0,children:"Radio"}),(0,s.jsx)(i.y02,{disabled:!0,children:"Disabled"}),(0,s.jsx)(i.y02.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange",disabled:!0}],defaultValue:"Apple"}),(0,s.jsx)(i.y02.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange"}],defaultValue:"Apple",optionType:"button"}),(0,s.jsx)(i.y02.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange"}],defaultValue:"Apple",optionType:"button",buttonStyle:"solid"})]})})}),(0,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Input",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.vyj,{direction:"vertical",size:"middle",children:[(0,s.jsx)(i.vyj.Compact,{children:(0,s.jsx)(i.AntInput,{defaultValue:"26888888","aria-label":"Input"})}),(0,s.jsxs)(i.vyj.Compact,{children:[(0,s.jsx)(i.AntInput,{className:"w-1/5",defaultValue:"0571","aria-label":"Input"}),(0,s.jsx)(i.AntInput,{className:"w-4/5",defaultValue:"26888888","aria-label":"Input"})]}),(0,s.jsx)(i.vyj.Compact,{children:(0,s.jsx)(i.AntInput.Search,{addonBefore:"https://",placeholder:"input search text",allowClear:!0,"aria-label":"Input"})}),(0,s.jsxs)(i.vyj.Compact,{className:"w-full",children:[(0,s.jsx)(i.AntInput,{defaultValue:"Combine input and button","aria-label":"Input"}),(0,s.jsx)(i.wpx,{type:"primary",children:"Submit"})]}),(0,s.jsxs)(i.vyj.Compact,{children:[(0,s.jsx)(i.WPr,{defaultValue:"Zhejiang",options:h,"aria-label":"Select"}),(0,s.jsx)(i.AntInput,{defaultValue:"Xihu District, Hangzhou","aria-label":"Input"})]})]})})})]}),(0,s.jsx)("br",{}),(0,s.jsxs)(i.bue,{gutter:16,children:[(0,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Tooltip",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.vyj,{direction:"vertical",children:[(0,s.jsx)(i.esZ,{title:"I'm a tooltip",children:"Hover or focus this text"}),(0,s.jsx)(n.b,{label:"Tooltip will show on mouse enter or focus."}),(0,s.jsx)(i.esZ,{title:"Focus styles don't change for naturally focusable elements like buttons",children:(0,s.jsx)(i.wpx,{children:"Button with tooltip"})})]})})}),(0,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Alert",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.vyj,{direction:"vertical",children:[(0,s.jsx)(i.DUx,{message:"Success Tips",type:"success",showIcon:!0}),(0,s.jsx)(i.DUx,{message:"Informational Notes",type:"info",showIcon:!0}),(0,s.jsx)(i.DUx,{message:"Warning",type:"warning",showIcon:!0,closable:!0}),(0,s.jsx)(i.DUx,{message:"Error",type:"error",showIcon:!0})]})})}),(0,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Tag",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.jqI,{wrap:!0,gap:"small",children:[(0,s.jsx)(i.j8w,{color:"default",children:"default"}),(0,s.jsx)(i.j8w,{color:"corinth",children:"corinth"}),(0,s.jsx)(i.j8w,{color:"minos",children:"minos"}),(0,s.jsx)(i.j8w,{color:"terracotta",children:"terracotta"}),(0,s.jsx)(i.j8w,{color:"olive",children:"olive"}),(0,s.jsx)(i.j8w,{color:"marble",children:"marble"}),(0,s.jsx)(i.j8w,{color:"sandstone",children:"sandstone"}),(0,s.jsx)(i.j8w,{color:"nectar",children:"nectar"}),(0,s.jsx)(i.j8w,{color:"error",children:"error"}),(0,s.jsx)(i.j8w,{color:"warning",children:"warning"}),(0,s.jsx)(i.j8w,{color:"caution",children:"caution"}),(0,s.jsx)(i.j8w,{color:"success",children:"success"}),(0,s.jsx)(i.j8w,{color:"info",children:"info"}),(0,s.jsx)(i.j8w,{color:"alert",children:"alert"}),(0,s.jsx)(i.j8w,{color:"white",children:"white"}),(0,s.jsx)(i.j8w,{closable:!0,onClose:()=>console.log("closed"),children:"Closable Tag"}),(0,s.jsx)(i.j8w,{onClick:()=>console.log("clicked"),addable:!0}),(0,s.jsx)(i.j8w,{onClick:()=>console.log("clicked"),addable:!0,children:"Add More"}),(0,s.jsxs)(i.j8w,{hasSparkle:!0,onClick:()=>console.log("clicked"),children:["Data Use",(0,s.jsx)(i.PJP.I8b,{})]}),(0,s.jsx)(i.j8w,{hasSparkle:!0,onClick:()=>console.log("clicked"),closable:!0,onClose:()=>console.log("closed"),children:"Data Category"})]})})})]}),(0,s.jsx)("br",{}),(0,s.jsxs)(i.bue,{gutter:16,children:[(0,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Typography Headings",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.vyj,{direction:"vertical",children:[(0,s.jsx)(u,{level:1,children:"H1 default"}),(0,s.jsx)(u,{level:1,headingSize:2,children:"H1 sized as H2"}),(0,s.jsx)(u,{level:1,headingSize:3,children:"H1 sized as H3"}),(0,s.jsx)(i.htM,{style:{margin:0}}),(0,s.jsx)(u,{level:2,children:"H2 default"}),(0,s.jsx)(u,{level:2,headingSize:1,children:"H2 sized as H1"}),(0,s.jsx)(u,{level:2,headingSize:3,children:"H2 sized as H3"}),(0,s.jsx)(i.htM,{style:{margin:0}}),(0,s.jsx)(u,{level:3,children:"H3 default"}),(0,s.jsx)(u,{level:3,headingSize:1,children:"H3 sized as H1"}),(0,s.jsx)(u,{level:3,headingSize:2,children:"H3 sized as H2"})]})})}),(0,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Typography Paragraphs",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.AntTypography,{children:[(0,s.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,s.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,s.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,s.jsx)(i.JGx,{span:8,children:(0,s.jsx)(i.V4A,{title:"Typography Text & Link",variant:"borderless",className:"h-full",children:(0,s.jsxs)(i.vyj,{direction:"vertical",children:[(0,s.jsx)(o,{children:"Ant Design (default)"}),(0,s.jsx)(o,{size:"sm",children:"Ant Design (small)"}),(0,s.jsx)(o,{size:"lg",children:"Ant Design (large)"}),(0,s.jsx)(o,{type:"secondary",children:"Ant Design (secondary)"}),(0,s.jsx)(o,{type:"success",children:"Ant Design (success)"}),(0,s.jsx)(o,{type:"warning",children:"Ant Design (warning)"}),(0,s.jsx)(o,{type:"danger",children:"Ant Design (danger)"}),(0,s.jsx)(o,{disabled:!0,children:"Ant Design (disabled)"}),(0,s.jsx)(o,{mark:!0,children:"Ant Design (mark)"}),(0,s.jsx)(o,{code:!0,children:"Ant Design (code)"}),(0,s.jsx)(o,{keyboard:!0,children:"Ant Design (keyboard)"}),(0,s.jsx)(o,{underline:!0,children:"Ant Design (underline)"}),(0,s.jsx)(o,{delete:!0,children:"Ant Design (delete)"}),(0,s.jsx)(o,{strong:!0,children:"Ant Design (strong)"}),(0,s.jsx)(o,{italic:!0,children:"Ant Design (italic)"}),(0,s.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()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5970],{6920:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/form-experiments/AntForm",function(){return n(33396)}])},95813:function(e,l,n){"use strict";n.d(l,{S:function(){return a}});let a={input:"default text",radio:"2",checkbox:!0,switch:!0,select:"2",multiselect:["2"],tags:["1"],date:"",number:12}},33396:function(e,l,n){"use strict";n.r(l),n.d(l,{AntFormPOC:function(){return u}});var a=n(24246),t=n(20595),r=n(3124),s=n.n(r),c=n(27378),i=n(95813);let{Title:o}=t.AntTypography,u=()=>{let[e]=t.PPS.useForm(),[l,n]=(0,c.useState)(i.S);return(0,a.jsxs)(t.bue,{children:[(0,a.jsxs)(t.JGx,{span:12,children:[(0,a.jsx)(o,{level:2,children:"Pure Ant"}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)(t.j8w,{color:"green",children:"functional"}),(0,a.jsx)(t.j8w,{color:"green",children:"low effort"})]}),(0,a.jsxs)(t.PPS,{initialValues:{...i.S},form:e,layout:"vertical",onValuesChange:(e,l)=>{n(l)},children:[(0,a.jsx)(t.PPS.Item,{label:"Input",name:"input",children:(0,a.jsx)(t.AntInput,{"aria-label":"Input"})}),(0,a.jsx)(t.PPS.Item,{name:"radio",children:(0,a.jsxs)(t.y02.Group,{name:"radio",children:[(0,a.jsx)(t.y02,{value:"1",children:"Radio 1"}),(0,a.jsx)(t.y02,{value:"2",children:"Radio 2"})]})}),(0,a.jsx)(t.PPS.Item,{name:"checkbox",valuePropName:"checked",children:(0,a.jsx)(t.E_O,{children:"Checkbox"})}),(0,a.jsx)(t.PPS.Item,{label:"Switch",name:"switch",valuePropName:"checked",children:(0,a.jsx)(t.rAg,{})}),(0,a.jsx)(t.PPS.Item,{label:"Select",name:"select",children:(0,a.jsx)(t.WPr,{allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}],"aria-label":"Select"})}),(0,a.jsx)(t.PPS.Item,{label:"Multiselect",name:"multiselect",children:(0,a.jsx)(t.WPr,{mode:"multiple",allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}],"aria-label":"Select"})}),(0,a.jsx)(t.PPS.Item,{label:"Tags",name:"tags",children:(0,a.jsx)(t.WPr,{mode:"tags",allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}],"aria-label":"Select"})}),(0,a.jsx)(t.PPS.Item,{label:"Date",name:"date",children:(0,a.jsx)(t.cv2,{})}),(0,a.jsx)(t.PPS.Item,{label:"Number",name:"number",children:(0,a.jsx)(t.W7D,{"aria-label":"InputNumber"})})]})]}),(0,a.jsxs)(t.JGx,{span:8,offset:4,children:[(0,a.jsx)(o,{level:4,children:"Controlled Values"}),(0,a.jsx)(t.V4A,{style:{backgroundColor:s().FIDESUI_MINOS,color:s().FIDESUI_CORINTH},children:(0,a.jsx)("pre",{children:(0,a.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e.toString(),": ").concat(l[e],"\n")),"}"]})})})]})]})};l.default=u}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=6920)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[840],{71850:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/form-experiments/FormikAntFormItem",function(){return t(35716)}])},95813:function(e,l,t){"use strict";t.d(l,{S:function(){return n}});let n={input:"default text",radio:"2",checkbox:!0,switch:!0,select:"2",multiselect:["2"],tags:["1"],date:"",number:12}},35716:function(e,l,t){"use strict";t.r(l),t.d(l,{FormikAntFormItemPOC:function(){return u}});var n=t(24246),a=t(20595),c=t(3124),o=t.n(c),r=t(34090),s=t(95813);let{Title:i}=a.AntTypography,u=()=>(0,n.jsx)(r.J9,{initialValues:{...s.S},onSubmit:console.log,children:e=>{let{values:l,setFieldValue:t}=e;return(0,n.jsxs)(a.bue,{children:[(0,n.jsxs)(a.JGx,{span:12,children:[(0,n.jsx)(i,{level:2,children:"<Formik> + Controlled + Ant's <Form.Item>"}),(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)(a.j8w,{color:"green",children:"functional"}),(0,n.jsx)(a.j8w,{color:"orange",children:"mid effort"})]}),(0,n.jsx)(r.l0,{children:(0,n.jsxs)(a.jqI,{vertical:!0,children:[(0,n.jsx)(a.PPS.Item,{label:"Input",name:"input",layout:"vertical",children:(0,n.jsx)(a.AntInput,{onChange:e=>t("input",e.target.value),defaultValue:l.input})}),(0,n.jsxs)(a.y02.Group,{name:"radio",onChange:e=>t("radio",e.target.value),defaultValue:l.radio,children:[(0,n.jsx)(a.y02,{value:"1",children:"Radio 1"}),(0,n.jsx)(a.y02,{value:"2",children:"Radio 2"})]}),(0,n.jsx)(a.PPS.Item,{name:"checkbox",children:(0,n.jsx)(a.E_O,{onChange:e=>t("checkbox",e.target.checked),defaultChecked:l.checkbox,children:"Checkbox"})}),(0,n.jsx)(a.PPS.Item,{label:"Switch",name:"switch",layout:"vertical",children:(0,n.jsx)(a.rAg,{onChange:e=>t("switch",e),defaultChecked:l.switch})}),(0,n.jsx)(a.PPS.Item,{label:"Select",name:"select",layout:"vertical",children:(0,n.jsx)(a.WPr,{allowClear:!0,className:"w-full",defaultValue:l.select,onChange:e=>t("select",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,n.jsx)(a.PPS.Item,{label:"Multiselect",name:"multiselect",layout:"vertical",children:(0,n.jsx)(a.WPr,{mode:"multiple",allowClear:!0,className:"w-full",defaultValue:l.multiselect,onChange:e=>t("multiselect",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,n.jsx)(a.PPS.Item,{label:"Tags",name:"tags",layout:"vertical",children:(0,n.jsx)(a.WPr,{mode:"tags",allowClear:!0,className:"w-full",defaultValue:l.tags,onChange:e=>t("tags",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,n.jsx)(a.PPS.Item,{label:"Date",name:"date",layout:"vertical",children:(0,n.jsx)(a.cv2,{onChange:e=>t("date",e.toISOString())})}),(0,n.jsx)(a.PPS.Item,{label:"Number",name:"number",layout:"vertical",children:(0,n.jsx)(a.W7D,{defaultValue:l.number,onChange:e=>t("number",e)})})]})})]}),(0,n.jsxs)(a.JGx,{span:8,offset:4,children:[(0,n.jsx)(i,{level:4,children:"Controlled Values"}),(0,n.jsx)(a.V4A,{style:{backgroundColor:o().FIDESUI_MINOS,color:o().FIDESUI_CORINTH},children:(0,n.jsx)("pre",{children:(0,n.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e,": ").concat(l[e],"\n")),"}"]})})})]})]})}});l.default=u}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=71850)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[611],{84093:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/form-experiments/FormikControlled",function(){return n(15957)}])},95813:function(e,l,n){"use strict";n.d(l,{S:function(){return i}});let i={input:"default text",radio:"2",checkbox:!0,switch:!0,select:"2",multiselect:["2"],tags:["1"],date:"",number:12}},15957:function(e,l,n){"use strict";n.r(l),n.d(l,{FormikControlledPOC:function(){return o}});var i=n(24246),t=n(20595),s=n(3124),r=n.n(s),c=n(34090),d=n(95813);let{Title:a}=t.AntTypography,o=()=>(0,i.jsx)(c.J9,{initialValues:{...d.S},onSubmit:console.log,children:e=>{let{values:l,setFieldValue:n}=e;return(0,i.jsxs)(t.bue,{children:[(0,i.jsxs)(t.JGx,{span:12,children:[(0,i.jsx)(a,{level:2,children:"<Formik> + Controlled"}),(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)(t.j8w,{color:"green",children:"functional"}),(0,i.jsx)(t.j8w,{color:"red",children:"high effort"})]}),(0,i.jsx)(c.l0,{children:(0,i.jsxs)(t.jqI,{vertical:!0,gap:16,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"input",children:"Input"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.AntInput,{id:"input",onChange:e=>n("input",e.target.value),defaultValue:l.input})})]}),(0,i.jsx)("div",{children:(0,i.jsxs)(t.y02.Group,{name:"radio",onChange:e=>n("radio",e.target.value),defaultValue:l.radio,children:[(0,i.jsx)(t.y02,{value:"1",children:"Radio 1"}),(0,i.jsx)(t.y02,{value:"2",children:"Radio 2"})]})}),(0,i.jsx)("div",{children:(0,i.jsx)(t.E_O,{onChange:e=>n("checkbox",e.target.checked),defaultChecked:l.checkbox,children:"Checkbox"})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"switch",children:"Switch"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.rAg,{id:"switch",onChange:e=>n("switch",e),defaultChecked:l.switch})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"select",children:"Select"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.WPr,{allowClear:!0,id:"select",defaultValue:l.select,onChange:e=>n("select",e),className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"multiselect",children:"Multiselect"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.WPr,{mode:"multiple",allowClear:!0,id:"multiselect",defaultValue:l.multiselect,onChange:e=>n("multiselect",e),className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"tags",children:"Tags"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.WPr,{mode:"tags",allowClear:!0,id:"tags",defaultValue:l.tags,onChange:e=>n("tags",e),className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"date",children:"Date"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.cv2,{id:"date",onChange:e=>n("date",e.toISOString())})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"number",children:"Number"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.W7D,{id:"number",defaultValue:l.number,onChange:e=>n("number",e)})})]})]})})]}),(0,i.jsxs)(t.JGx,{span:8,offset:4,children:[(0,i.jsx)(a,{level:4,children:"Controlled Values"}),(0,i.jsx)(t.V4A,{style:{backgroundColor:r().FIDESUI_MINOS,color:r().FIDESUI_CORINTH},children:(0,i.jsx)("pre",{children:(0,i.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e,": ").concat(l[e],"\n")),"}"]})})})]})]})}});l.default=o}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=84093)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4266],{93102:function(e,l,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/form-experiments/FormikField",function(){return i(82252)}])},95813:function(e,l,i){"use strict";i.d(l,{S:function(){return n}});let n={input:"default text",radio:"2",checkbox:!0,switch:!0,select:"2",multiselect:["2"],tags:["1"],date:"",number:12}},82252:function(e,l,i){"use strict";i.r(l),i.d(l,{FormikFieldPOC:function(){return h}});var n=i(24246),s=i(20595),r=i(3124),t=i.n(r),o=i(34090),d=i(95813);let{Text:a,Title:c}=s.AntTypography,h=()=>(0,n.jsx)(o.J9,{initialValues:{...d.S},onSubmit:console.log,children:e=>{let{values:l}=e;return(0,n.jsxs)(s.bue,{children:[(0,n.jsxs)(s.JGx,{span:12,children:[(0,n.jsx)(c,{level:2,children:"<Formik> + <Field>"}),(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)(s.j8w,{color:"red",children:"non functional"}),(0,n.jsx)(s.j8w,{color:"red",children:"high effort"})]}),(0,n.jsx)(o.l0,{children:(0,n.jsxs)(s.jqI,{vertical:!0,gap:16,children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"input",children:"Input"}),(0,n.jsx)("div",{children:(0,n.jsx)(o.gN,{as:s.AntInput,id:"input",name:"input",type:"text"})})]}),(0,n.jsx)("div",{children:(0,n.jsxs)(o.gN,{as:s.y02.Group,name:"radio",children:[(0,n.jsx)(s.y02,{value:"1",children:"Radio 1"}),(0,n.jsx)(s.y02,{value:"2",children:"Radio 2"})]})}),(0,n.jsxs)("div",{children:[(0,n.jsx)(o.gN,{as:s.E_O,defaultChecked:l.checkbox,name:"checkbox",children:"Checkbox"}),(0,n.jsx)(a,{type:"warning",children:"Requires additional logic to handle default state"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"switch",children:"Switch"}),(0,n.jsx)("div",{children:(0,n.jsx)(o.gN,{as:s.rAg,id:"switch",name:"switch"})}),(0,n.jsxs)(a,{type:"danger",children:["Ant Switch's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"select",children:"Select"}),(0,n.jsx)("div",{children:(0,n.jsx)(o.gN,{as:s.WPr,allowClear:!0,id:"select",name:"select",className:"w-full",status:"error",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,n.jsxs)(a,{type:"danger",children:["Ant Select's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"multiselect",children:"Multiselect"}),(0,n.jsx)("div",{children:(0,n.jsx)(o.gN,{as:s.WPr,mode:"multiple",allowClear:!0,id:"multiselect",name:"multiselect",className:"w-full",status:"error",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,n.jsxs)(a,{type:"danger",children:["Ant Select's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"multiselect",children:"Tags"}),(0,n.jsx)("div",{children:(0,n.jsx)(o.gN,{as:s.WPr,mode:"tags",allowClear:!0,id:"tags",name:"tags",className:"w-full",status:"error",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,n.jsxs)(a,{type:"danger",children:["Ant Select's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"date",children:"Date"}),(0,n.jsx)("div",{children:(0,n.jsx)(o.gN,{as:s.cv2,id:"date",name:"date",status:"error"})}),(0,n.jsxs)(a,{type:"danger",children:["Ant DatePicker's onChange is different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"number",children:"Number"}),(0,n.jsx)("div",{children:(0,n.jsx)(o.gN,{as:s.W7D,id:"number",name:"number",status:"error"})}),(0,n.jsxs)(a,{type:"danger",children:["Ant InputNumber's onChange is different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]})]})})]}),(0,n.jsxs)(s.JGx,{span:8,offset:4,children:[(0,n.jsx)(c,{level:4,children:"Controlled Values"}),(0,n.jsx)(s.V4A,{style:{backgroundColor:t().FIDESUI_MINOS,color:t().FIDESUI_CORINTH},children:(0,n.jsx)("pre",{children:(0,n.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e,": ").concat(l[e],"\n")),"}"]})})})]})]})}});l.default=h}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=93102)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3316],{36136:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/forms",function(){return n(71252)}])},33396:function(e,l,n){"use strict";n.r(l),n.d(l,{AntFormPOC:function(){return d}});var i=n(24246),t=n(20595),r=n(3124),s=n.n(r),a=n(27378),o=n(95813);let{Title:c}=t.AntTypography,d=()=>{let[e]=t.PPS.useForm(),[l,n]=(0,a.useState)(o.S);return(0,i.jsxs)(t.bue,{children:[(0,i.jsxs)(t.JGx,{span:12,children:[(0,i.jsx)(c,{level:2,children:"Pure Ant"}),(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)(t.j8w,{color:"green",children:"functional"}),(0,i.jsx)(t.j8w,{color:"green",children:"low effort"})]}),(0,i.jsxs)(t.PPS,{initialValues:{...o.S},form:e,layout:"vertical",onValuesChange:(e,l)=>{n(l)},children:[(0,i.jsx)(t.PPS.Item,{label:"Input",name:"input",children:(0,i.jsx)(t.AntInput,{"aria-label":"Input"})}),(0,i.jsx)(t.PPS.Item,{name:"radio",children:(0,i.jsxs)(t.y02.Group,{name:"radio",children:[(0,i.jsx)(t.y02,{value:"1",children:"Radio 1"}),(0,i.jsx)(t.y02,{value:"2",children:"Radio 2"})]})}),(0,i.jsx)(t.PPS.Item,{name:"checkbox",valuePropName:"checked",children:(0,i.jsx)(t.E_O,{children:"Checkbox"})}),(0,i.jsx)(t.PPS.Item,{label:"Switch",name:"switch",valuePropName:"checked",children:(0,i.jsx)(t.rAg,{})}),(0,i.jsx)(t.PPS.Item,{label:"Select",name:"select",children:(0,i.jsx)(t.WPr,{allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}],"aria-label":"Select"})}),(0,i.jsx)(t.PPS.Item,{label:"Multiselect",name:"multiselect",children:(0,i.jsx)(t.WPr,{mode:"multiple",allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}],"aria-label":"Select"})}),(0,i.jsx)(t.PPS.Item,{label:"Tags",name:"tags",children:(0,i.jsx)(t.WPr,{mode:"tags",allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}],"aria-label":"Select"})}),(0,i.jsx)(t.PPS.Item,{label:"Date",name:"date",children:(0,i.jsx)(t.cv2,{})}),(0,i.jsx)(t.PPS.Item,{label:"Number",name:"number",children:(0,i.jsx)(t.W7D,{"aria-label":"InputNumber"})})]})]}),(0,i.jsxs)(t.JGx,{span:8,offset:4,children:[(0,i.jsx)(c,{level:4,children:"Controlled Values"}),(0,i.jsx)(t.V4A,{style:{backgroundColor:s().FIDESUI_MINOS,color:s().FIDESUI_CORINTH},children:(0,i.jsx)("pre",{children:(0,i.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e.toString(),": ").concat(l[e],"\n")),"}"]})})})]})]})};l.default=d},35716:function(e,l,n){"use strict";n.r(l),n.d(l,{FormikAntFormItemPOC:function(){return d}});var i=n(24246),t=n(20595),r=n(3124),s=n.n(r),a=n(34090),o=n(95813);let{Title:c}=t.AntTypography,d=()=>(0,i.jsx)(a.J9,{initialValues:{...o.S},onSubmit:console.log,children:e=>{let{values:l,setFieldValue:n}=e;return(0,i.jsxs)(t.bue,{children:[(0,i.jsxs)(t.JGx,{span:12,children:[(0,i.jsx)(c,{level:2,children:"<Formik> + Controlled + Ant's <Form.Item>"}),(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)(t.j8w,{color:"green",children:"functional"}),(0,i.jsx)(t.j8w,{color:"orange",children:"mid effort"})]}),(0,i.jsx)(a.l0,{children:(0,i.jsxs)(t.jqI,{vertical:!0,children:[(0,i.jsx)(t.PPS.Item,{label:"Input",name:"input",layout:"vertical",children:(0,i.jsx)(t.AntInput,{onChange:e=>n("input",e.target.value),defaultValue:l.input})}),(0,i.jsxs)(t.y02.Group,{name:"radio",onChange:e=>n("radio",e.target.value),defaultValue:l.radio,children:[(0,i.jsx)(t.y02,{value:"1",children:"Radio 1"}),(0,i.jsx)(t.y02,{value:"2",children:"Radio 2"})]}),(0,i.jsx)(t.PPS.Item,{name:"checkbox",children:(0,i.jsx)(t.E_O,{onChange:e=>n("checkbox",e.target.checked),defaultChecked:l.checkbox,children:"Checkbox"})}),(0,i.jsx)(t.PPS.Item,{label:"Switch",name:"switch",layout:"vertical",children:(0,i.jsx)(t.rAg,{onChange:e=>n("switch",e),defaultChecked:l.switch})}),(0,i.jsx)(t.PPS.Item,{label:"Select",name:"select",layout:"vertical",children:(0,i.jsx)(t.WPr,{allowClear:!0,className:"w-full",defaultValue:l.select,onChange:e=>n("select",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsx)(t.PPS.Item,{label:"Multiselect",name:"multiselect",layout:"vertical",children:(0,i.jsx)(t.WPr,{mode:"multiple",allowClear:!0,className:"w-full",defaultValue:l.multiselect,onChange:e=>n("multiselect",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsx)(t.PPS.Item,{label:"Tags",name:"tags",layout:"vertical",children:(0,i.jsx)(t.WPr,{mode:"tags",allowClear:!0,className:"w-full",defaultValue:l.tags,onChange:e=>n("tags",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsx)(t.PPS.Item,{label:"Date",name:"date",layout:"vertical",children:(0,i.jsx)(t.cv2,{onChange:e=>n("date",e.toISOString())})}),(0,i.jsx)(t.PPS.Item,{label:"Number",name:"number",layout:"vertical",children:(0,i.jsx)(t.W7D,{defaultValue:l.number,onChange:e=>n("number",e)})})]})})]}),(0,i.jsxs)(t.JGx,{span:8,offset:4,children:[(0,i.jsx)(c,{level:4,children:"Controlled Values"}),(0,i.jsx)(t.V4A,{style:{backgroundColor:s().FIDESUI_MINOS,color:s().FIDESUI_CORINTH},children:(0,i.jsx)("pre",{children:(0,i.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e,": ").concat(l[e],"\n")),"}"]})})})]})]})}});l.default=d},15957:function(e,l,n){"use strict";n.r(l),n.d(l,{FormikControlledPOC:function(){return d}});var i=n(24246),t=n(20595),r=n(3124),s=n.n(r),a=n(34090),o=n(95813);let{Title:c}=t.AntTypography,d=()=>(0,i.jsx)(a.J9,{initialValues:{...o.S},onSubmit:console.log,children:e=>{let{values:l,setFieldValue:n}=e;return(0,i.jsxs)(t.bue,{children:[(0,i.jsxs)(t.JGx,{span:12,children:[(0,i.jsx)(c,{level:2,children:"<Formik> + Controlled"}),(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)(t.j8w,{color:"green",children:"functional"}),(0,i.jsx)(t.j8w,{color:"red",children:"high effort"})]}),(0,i.jsx)(a.l0,{children:(0,i.jsxs)(t.jqI,{vertical:!0,gap:16,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"input",children:"Input"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.AntInput,{id:"input",onChange:e=>n("input",e.target.value),defaultValue:l.input})})]}),(0,i.jsx)("div",{children:(0,i.jsxs)(t.y02.Group,{name:"radio",onChange:e=>n("radio",e.target.value),defaultValue:l.radio,children:[(0,i.jsx)(t.y02,{value:"1",children:"Radio 1"}),(0,i.jsx)(t.y02,{value:"2",children:"Radio 2"})]})}),(0,i.jsx)("div",{children:(0,i.jsx)(t.E_O,{onChange:e=>n("checkbox",e.target.checked),defaultChecked:l.checkbox,children:"Checkbox"})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"switch",children:"Switch"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.rAg,{id:"switch",onChange:e=>n("switch",e),defaultChecked:l.switch})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"select",children:"Select"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.WPr,{allowClear:!0,id:"select",defaultValue:l.select,onChange:e=>n("select",e),className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"multiselect",children:"Multiselect"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.WPr,{mode:"multiple",allowClear:!0,id:"multiselect",defaultValue:l.multiselect,onChange:e=>n("multiselect",e),className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"tags",children:"Tags"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.WPr,{mode:"tags",allowClear:!0,id:"tags",defaultValue:l.tags,onChange:e=>n("tags",e),className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"date",children:"Date"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.cv2,{id:"date",onChange:e=>n("date",e.toISOString())})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"number",children:"Number"}),(0,i.jsx)("div",{children:(0,i.jsx)(t.W7D,{id:"number",defaultValue:l.number,onChange:e=>n("number",e)})})]})]})})]}),(0,i.jsxs)(t.JGx,{span:8,offset:4,children:[(0,i.jsx)(c,{level:4,children:"Controlled Values"}),(0,i.jsx)(t.V4A,{style:{backgroundColor:s().FIDESUI_MINOS,color:s().FIDESUI_CORINTH},children:(0,i.jsx)("pre",{children:(0,i.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e,": ").concat(l[e],"\n")),"}"]})})})]})]})}});l.default=d},82252:function(e,l,n){"use strict";n.r(l),n.d(l,{FormikFieldPOC:function(){return h}});var i=n(24246),t=n(20595),r=n(3124),s=n.n(r),a=n(34090),o=n(95813);let{Text:c,Title:d}=t.AntTypography,h=()=>(0,i.jsx)(a.J9,{initialValues:{...o.S},onSubmit:console.log,children:e=>{let{values:l}=e;return(0,i.jsxs)(t.bue,{children:[(0,i.jsxs)(t.JGx,{span:12,children:[(0,i.jsx)(d,{level:2,children:"<Formik> + <Field>"}),(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)(t.j8w,{color:"red",children:"non functional"}),(0,i.jsx)(t.j8w,{color:"red",children:"high effort"})]}),(0,i.jsx)(a.l0,{children:(0,i.jsxs)(t.jqI,{vertical:!0,gap:16,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"input",children:"Input"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:t.AntInput,id:"input",name:"input",type:"text"})})]}),(0,i.jsx)("div",{children:(0,i.jsxs)(a.gN,{as:t.y02.Group,name:"radio",children:[(0,i.jsx)(t.y02,{value:"1",children:"Radio 1"}),(0,i.jsx)(t.y02,{value:"2",children:"Radio 2"})]})}),(0,i.jsxs)("div",{children:[(0,i.jsx)(a.gN,{as:t.E_O,defaultChecked:l.checkbox,name:"checkbox",children:"Checkbox"}),(0,i.jsx)(c,{type:"warning",children:"Requires additional logic to handle default state"})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"switch",children:"Switch"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:t.rAg,id:"switch",name:"switch"})}),(0,i.jsxs)(c,{type:"danger",children:["Ant Switch's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"select",children:"Select"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:t.WPr,allowClear:!0,id:"select",name:"select",className:"w-full",status:"error",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsxs)(c,{type:"danger",children:["Ant Select's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"multiselect",children:"Multiselect"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:t.WPr,mode:"multiple",allowClear:!0,id:"multiselect",name:"multiselect",className:"w-full",status:"error",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsxs)(c,{type:"danger",children:["Ant Select's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"multiselect",children:"Tags"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:t.WPr,mode:"tags",allowClear:!0,id:"tags",name:"tags",className:"w-full",status:"error",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsxs)(c,{type:"danger",children:["Ant Select's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"date",children:"Date"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:t.cv2,id:"date",name:"date",status:"error"})}),(0,i.jsxs)(c,{type:"danger",children:["Ant DatePicker's onChange is different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"number",children:"Number"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:t.W7D,id:"number",name:"number",status:"error"})}),(0,i.jsxs)(c,{type:"danger",children:["Ant InputNumber's onChange is different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]})]})})]}),(0,i.jsxs)(t.JGx,{span:8,offset:4,children:[(0,i.jsx)(d,{level:4,children:"Controlled Values"}),(0,i.jsx)(t.V4A,{style:{backgroundColor:s().FIDESUI_MINOS,color:s().FIDESUI_CORINTH},children:(0,i.jsx)("pre",{children:(0,i.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e,": ").concat(l[e],"\n")),"}"]})})})]})]})}});l.default=h},71252:function(e,l,n){"use strict";n.r(l),n.d(l,{FormsPOC:function(){return x}});var i=n(24246),t=n(20595),r=n(33396),s=n(35716),a=n(15957),o=n(82252),c=n(12921);let{Content:d}=t.AntLayout,{Title:h}=t.AntTypography,u=[{key:"1",label:"Formik + Controlled",children:(0,i.jsx)(a.FormikControlledPOC,{})},{key:"2",label:"Formik + Field",children:(0,i.jsx)(o.FormikFieldPOC,{})},{key:"3",label:"Formik + {...field}",children:(0,i.jsx)(c.FormikSpreadFieldPOC,{})},{key:"4",label:"Formik + Ant's Form.Item",children:(0,i.jsx)(s.FormikAntFormItemPOC,{})},{key:"5",label:"Ant Form",children:(0,i.jsx)(r.AntFormPOC,{})}],x=()=>(0,i.jsxs)(d,{className:"overflow-auto px-10 py-6",children:[(0,i.jsx)(t.bue,{children:(0,i.jsx)(h,{children:"Forms POC"})}),(0,i.jsx)(t.A5g,{defaultActiveKey:"1",items:u})]});l.default=x}},function(e){e.O(0,[2921,2888,9774,179],function(){return e(e.s=36136)}),_N_E=e.O()}]);
@@ -1 +1 @@
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(20595),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 C}});var n=t(24246),a=t(25980),l=t(20595),r=t(86677),i=t(27378),o=t(16134),c=t(77830),u=t(6675),d=t(32735),p=t(23923),x=t(48347),j=t(28079),h=t(32885);let{Content:g}=l.AntLayout,{Title:m,Paragraph:f}=l.AntTypography,_=[{text:"Advertising",value:"advertising"},{text:"Analytics",value:"analytics"},{text:"Functional",value:"functional"},{text:"Essential",value:"essential"}],y=[{text:"Consent",value:"Consent"},{text:"Legitimate Interest",value:"Legitimate interests"}],C=()=>{let{tcf:e,dictionaryService:s}=(0,a.hz)(),t=(0,r.useRouter)(),[C,v]=(0,i.useState)(""),[b,k]=(0,i.useState)(""),[w,I]=(0,i.useState)(25),[S,T]=(0,i.useState)(1),[N,O]=(0,i.useState)(),[z,A]=(0,i.useState)({});(0,j.fd)();let E=(0,o.C)(j.U3);(0,u.a4)();let P=(0,o.C)(u.ZS),V=(0,i.useMemo)(()=>[...Object.entries(P.purposes).map(e=>{let[s,t]=e;return{text:t.name,value:s}}),...Object.entries(P.special_purposes).map(e=>{let[s,t]=e;return{text:t.name,value:s}})],[P]),F=(0,i.useMemo)(()=>E.map(e=>({text:e.name||e.fides_key,value:e.fides_key})),[E]),{isOpen:L,onOpen:q,onClose:U}=(0,x.W)(),Z=(()=>{let e=(z.data_uses||[]).map(e=>"data_uses=".concat(encodeURIComponent(e))).join("&");return{dataUses:e,legalBasis:(z.legal_bases||[]).map(e=>"legal_bases=".concat(encodeURIComponent(e))).join("&"),purposes:(z.tcf_purpose||[]).map(e=>"purposes=".concat(encodeURIComponent(e))).join("&"),specialPurposes:"",consentCategories:(z.consent_categories||[]).map(e=>"consent_category=".concat(encodeURIComponent(e))).join("&")}})(),{data:M,isLoading:R}=(0,h.de)({pageIndex:S,pageSize:w,search:b,...Z}),D=(null==M?void 0:M.total)||0,B=(null==M?void 0:M.items)||[];(0,i.useEffect)(()=>{let e=setTimeout(()=>{k(C),1!==S&&T(1)},300);return()=>clearTimeout(e)},[C]);let K=(0,i.useCallback)(e=>{v(e.target.value)},[]),W=e=>{O(e.fides_key),q()},X=[{title:"Vendor",dataIndex:"name",key:"name",filteredValue:z.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:V,filteredValue:z.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:z.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:y,filteredValue:z.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:_,filteredValue:z.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)(g,{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)(f,{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)(x.m,{isOpen:L,fidesKey:N,onClose:U}):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=>{v(e)},style:{width:300},value:C,onChange:K}),(0,n.jsxs)(l.vyj,{size:8,children:[(0,n.jsx)(p.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:B,columns:X,loading:R,rowKey:"id",pagination:{current:S,pageSize:w,pageSizeOptions:d.VZ,total:D},onChange:(e,s)=>{T(e.current),I(e.pageSize),A(s)},onRow:e=>({onClick:()=>W(e),style:{cursor:"pointer"}}),size:"small"})]})};s.default=C}},function(e){e.O(0,[401,3923,2888,9774,179],function(){return e(e.s=22657)}),_N_E=e.O()}]);
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 u}});var n=t(24246),a=t(20595),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}},u=e=>{let{isOpen:s,onClose:t,fidesKey:o}=e,{data:u,isLoading:c}=(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:u?null==u?void 0:u.name:"Vendor"}),(0,n.jsx)(a.fef,{children:c?(0,n.jsx)(a.jqI,{className:"h-80 w-full",align:"center",justify:"center",children:(0,n.jsx)(a.$jN,{})}):!!u&&(0,n.jsxs)(a.AntTypography,{children:[(0,n.jsx)(i,{level:5,children:"Purposes"}),Object.entries(u.purposes||{}).length>0?(0,n.jsx)(a.UQy,{allowMultiple:!0,children:Object.entries(u.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",u.purposes[t].data_uses)}),(0,n.jsx)(a.jqI,{className:"my-4",vertical:!0,children:d("Legal basis",u.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",u.features)}),(0,n.jsx)("div",{className:"my-4",children:d("Data categories",u.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 C}});var n=t(24246),a=t(25980),l=t(20595),r=t(86677),i=t(27378),o=t(16134),u=t(77830),c=t(6675),d=t(32735),p=t(23923),x=t(48347),j=t(28079),h=t(32885);let{Content:g}=l.AntLayout,{Title:m,Paragraph:f}=l.AntTypography,_=[{text:"Advertising",value:"advertising"},{text:"Analytics",value:"analytics"},{text:"Functional",value:"functional"},{text:"Essential",value:"essential"}],y=[{text:"Consent",value:"Consent"},{text:"Legitimate Interest",value:"Legitimate interests"}],C=()=>{let{tcf:e,dictionaryService:s}=(0,a.hz)(),t=(0,r.useRouter)(),[C,v]=(0,i.useState)(""),[b,k]=(0,i.useState)(""),[w,I]=(0,i.useState)(25),[S,T]=(0,i.useState)(1),[N,O]=(0,i.useState)(),[A,z]=(0,i.useState)({});(0,j.fd)();let E=(0,o.C)(j.U3);(0,c.a4)();let P=(0,o.C)(c.ZS),V=(0,i.useMemo)(()=>[...Object.entries(P.purposes).map(e=>{let[s,t]=e;return{text:t.name,value:s}}),...Object.entries(P.special_purposes).map(e=>{let[s,t]=e;return{text:t.name,value:s}})],[P]),L=(0,i.useMemo)(()=>E.map(e=>({text:e.name||e.fides_key,value:e.fides_key})),[E]),{isOpen:q,onOpen:F,onClose:U}=(0,x.W)(),Z=(()=>{let e=(A.data_uses||[]).map(e=>"data_uses=".concat(encodeURIComponent(e))).join("&");return{dataUses:e,legalBasis:(A.legal_bases||[]).map(e=>"legal_bases=".concat(encodeURIComponent(e))).join("&"),purposes:(A.tcf_purpose||[]).map(e=>"purposes=".concat(encodeURIComponent(e))).join("&"),specialPurposes:"",consentCategories:(A.consent_categories||[]).map(e=>"consent_category=".concat(encodeURIComponent(e))).join("&")}})(),{data:M,isLoading:R}=(0,h.de)({pageIndex:S,pageSize:w,search:b,...Z}),D=(null==M?void 0:M.total)||0,B=(null==M?void 0:M.items)||[];(0,i.useEffect)(()=>{let e=setTimeout(()=>{k(C),1!==S&&T(1)},300);return()=>clearTimeout(e)},[C]);let K=(0,i.useCallback)(e=>{v(e.target.value)},[]),W=e=>{O(e.fides_key),F()},X=[{title:"Vendor",dataIndex:"name",key:"name",filteredValue:A.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:V,filteredValue:A.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:L,filteredValue:A.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:y,filteredValue:A.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:_,filteredValue:A.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)(g,{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)(f,{className:"mb-6",children:"This is a demonstration of migrating the ConsentManagementTable from TanStack Table to Ant Design Table with built-in filtering."}),q&&N?(0,n.jsx)(x.m,{isOpen:q,fidesKey:N,onClose:U}):null,(0,n.jsxs)(l.jqI,{justify:"space-between",align:"center",className:"mb-4",children:[(0,n.jsx)(l.AntInput.Search,{placeholder:"Search",onSearch:e=>{v(e)},style:{width:300},value:C,onChange:K}),(0,n.jsxs)(l.vyj,{size:8,children:[(0,n.jsx)(p.Z,{buttonLabel:"Add vendors",onButtonClick:s?()=>{t.push(u.Gg)}:void 0}),(0,n.jsx)(l.wpx,{onClick:()=>{z({})},children:"Clear filters"})]})]}),(0,n.jsx)(l.V5H,{dataSource:B,columns:X,loading:R,rowKey:"id",pagination:{current:S,pageSize:w,pageSizeOptions:d.VZ,total:D},onChange:(e,s)=>{T(e.current),I(e.pageSize),z(s)},onRow:e=>({onClick:()=>W(e),style:{cursor:"pointer"}}),size:"small"})]})};s.default=C}},function(e){e.O(0,[401,3923,2888,9774,179],function(){return e(e.s=22657)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
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(50107)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var n=i(24246),s=i(20595),l=i(88038),a=i.n(l),r=i(86677);i(27378);var o=i(25980),c=i(90867),d=i(42478),u=i(77830),m=()=>{let e=(0,r.useRouter)();return(0,n.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(s.xuv,{children:[(0,n.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(s.wpx,{onClick:()=>{e.push(u.AD)},children:"Configure"})]}),(0,n.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:i,padded:l=!0,mainProps:u}=e,p=(0,o.hz)(),h=(0,r.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,g=!(p.flags.messagingConfiguration&&x),{data:v}=(0,d.JE)(void 0,{skip:g}),{data:j}=(0,c.PW)(void 0,{skip:g}),y=p.flags.messagingConfiguration&&(!v||!j)&&x;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(a(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,n.jsx)(m,{}):null,t]})]})}},50107:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return eH}});var n,s,l,a,r=i(24246),o=i(20595),c=i(86677),d=i(77213),u=i(77830),m=i(58754),p=i(99716),h=i(27378),x=i(39449),g=i(19904);(n=l||(l={})).IN_PROCESSING="in_processing",n.PENDING="pending",n.COMPLETE="complete",n.ERROR="error",n.PAUSED="paused",n.AWAITING_PROCESSING="awaiting_processing",n.RETRYING="retrying",n.SKIPPED="skipped",n.POLLING="polling";let v={in_processing:"In processing",pending:"Pending",complete:"Complete",error:"Error",paused:"Paused",awaiting_processing:"Awaiting input",retrying:"Retrying",skipped:"Skipped",polling:"Awaiting polling"},j={error:"error",skipped:"warning",awaiting_processing:"minos",in_processing:void 0,pending:void 0,complete:void 0,paused:void 0,retrying:void 0,polling:"warning"};(s=a||(a={})).REQUEST_UPDATE="Request update",s.INTERNAL_COMMENT="Internal comment",s.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 A=e=>{let{item:t}=e,{author:i,title:n,date:s,type:l,onClick:c,isError:d,isAwaitingInput:u,isPolling:m,description:p,attachments:h,showViewLog:x}=t,g=(0,b.p6)(s),v=!!c,j=h&&h.length>0,f=(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,":"]}),n&&(0,r.jsxs)(o.AntTypography.Text,{className:_()(w().title,{[w()["title--error"]]:d,[w()["title--awaiting-input"]]:u,[w()["title--polling"]]:m}),ellipsis:{tooltip:!0},"data-testid":"activity-timeline-title",children:[n,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:g})}),(0,r.jsx)("div",{className:"xl:hidden",children:(0,r.jsx)(o.esZ,{title:g,children:(0,r.jsx)(o.PJP.qpU,{"data-testid":"activity-timeline-timestamp-icon"})})}),(0,r.jsx)(o.j8w,{className:w().type,color:y[l],"data-testid":"activity-timeline-type",children:l}),x&&(0,r.jsx)("span",{className:w().viewLogs,"data-testid":"activity-timeline-view-logs",children:"View Log"})]}),(p||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:p||""}),j&&(0,r.jsx)(E,{attachments:h})]})]}),T={className:_()(w().itemButton,{[w()["itemButton--error"]]:d,[w()["itemButton--awaiting-input"]]:u,[w()["itemButton--polling"]]:m,[w()["itemButton--clickable"]]:v,[w()["itemButton--comment"]]:l===a.INTERNAL_COMMENT,[w()["itemButton--manual-task"]]:l===a.MANUAL_TASK}),"data-testid":"activity-timeline-item"};return v?(0,r.jsx)("button",{type:"button",onClick:c,...T,children:f}):(0,r.jsx)("div",{...T,children:f})},R=i(25980),C=i(54427),k=i(78780);let{useGetCommentsQuery:q,useCreateCommentMutation:S,useGetCommentDetailsQuery:N,useLazyGetCommentDetailsQuery:P}=k.u.injectEndpoints({endpoints:e=>({getComments:e.query({query:e=>{let{privacy_request_id:t,page:i=1,size:n}=e;return{url:"plus/privacy-request/".concat(t,"/comment"),method:"GET",params:{page:i,size:n}}},providesTags:["Privacy Request Comments"]}),createComment:e.mutation({query:e=>{let{privacy_request_id:t,comment_text:i,comment_type:n}=e,s=new FormData;return s.append("comment_text",i),s.append("comment_type",n),{url:"plus/privacy-request/".concat(t,"/comment"),method:"POST",body:s,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,C.oM)({name:"privacyRequestComments",initialState:{},reducers:{}}),O=e=>{let{plus:t}=(0,R.hz)(),{data:i,isLoading:n,error:s}=q({privacy_request_id:e,size:100},{skip:!t});return(0,h.useEffect)(()=>{s&&o.Pg3.error("Failed to fetch the request comments")},[s]),{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:a.INTERNAL_COMMENT,showViewLog:!1,description:e.comment_text,isError:!1,isSkipped:!1,isAwaitingInput:!1,isPolling:!1,id:"comment-".concat(e.id)})):[],isLoading:n}},D=(e,t)=>{if(0===e.length)return!1;let i=Array.from(e).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime());if(!i[0].collection_name)return i[0].status===t;let n={};return i.forEach(e=>{e.collection_name&&!n[e.collection_name]&&(n[e.collection_name]=e)}),Object.values(n).some(e=>e.status===t)},M=e=>D(e,l.ERROR),U=e=>D(e,l.SKIPPED),L=e=>D(e,l.AWAITING_PROCESSING),z=e=>D(e,l.POLLING),W=e=>{let t=!e;return{eventItems:e?Object.entries(e).map(e=>{let[t,i]=e,n=M(i),s=U(i),l=L(i),r=z(i);return{author:"Fides",title:t,date:new Date(i[0].updated_at),type:a.REQUEST_UPDATE,showViewLog:n||s||l||r,onClick:()=>{},isError:n,isSkipped:s,isAwaitingInput:l,isPolling:r,id:"request-".concat(t)}}):[],isLoading:t}};var B=i(91317),F=i(45116);let G=e=>{let{plus:t}=(0,R.hz)(),{data:i,isLoading:n,error:s}=(0,F.Ym)({page:1,size:100,privacyRequestId:e,status:void 0,includeFullSubmissionDetails:!0},{skip:!t});return(0,h.useEffect)(()=>{s&&o.Pg3.error("Failed to fetch manual tasks")},[s]),{manualTaskItems:i?i.items.filter(e=>e.status===x.OS.COMPLETED||e.status===x.OS.SKIPPED).map(e=>{var t,i;let n=e.submission_user?(0,b.gJ)(e.submission_user):"Unknown User";(0,B.PN)(null===(t=e.submission_user)||void 0===t?void 0:t.id)&&(n=(null===(i=e.submission_user)||void 0===i?void 0:i.id)||"Unknown User");let s=e.status===x.OS.SKIPPED,l="Task ".concat(s?"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:n,title:l,date:new Date(e.updated_at),type:a.MANUAL_TASK,showViewLog:!1,description:r,isError:!1,isSkipped:s,isAwaitingInput:!1,isPolling:!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:n}};var Z=i(88340),J=e=>{let{errorMessage:t,status:i=l.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:j[i],children:v[i]}),(0,r.jsx)(o.xuv,{padding:"0px",marginBottom:"3px",children:(0,r.jsx)(Z.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})})]})},K=i(3124),H=i.n(K);let Y=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}},V=e=>{if(e.status!==l.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():"-"},Q=(e,t)=>{let i=e.filter(e=>e.action_type===t&&e.status===l.COMPLETE&&e.collection_name).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()),n={};i.forEach(e=>{let t=e.collection_name||"unknown";n[t]||(n[t]=e)});let s=0,a=!1,r=/(?:retrieved|masked|processed)\s+(\d+)\s+records?$/i;return Object.values(n).forEach(e=>{if(e.message){let t=e.message.match(r);if(t){a=!0;let e=parseInt(t[1],10);s+=e}}}),a?s:null},$=(e,t,i)=>{if("finished"===e.status&&!e.collection_name&&i){let e=Q(t,i);return null!==e?e.toLocaleString():"-"}return V(e)};var X=e=>{var t,i,n;let{eventLogs:s,allEventLogs:a,onDetailPanel:c,privacyRequest:d}=e,u=(null==s?void 0:s.some(e=>e.collection_name))||(null==s?void 0:s.some(e=>"finished"===e.status&&!e.collection_name))||!1,m=null==s?void 0:s.every(e=>"finished"===e.status&&!e.collection_name),p=null==d?void 0:null===(n=d.policy)||void 0===n?void 0:null===(i=n.rules)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.action_type,h=e=>e?Y(e):p?Y(p):"-",x=null==s?void 0:s.map(e=>(0,r.jsxs)(o.Tr,{backgroundColor:e.status===l.ERROR||e.status===l.SKIPPED&&e.message||e.status===l.AWAITING_PROCESSING||e.status===l.POLLING?H().FIDESUI_NEUTRAL_50:"unset",onClick:()=>{(e.status===l.ERROR||e.status===l.SKIPPED&&e.message||e.status===l.AWAITING_PROCESSING||e.status===l.POLLING)&&c(e.message,e.status)},style:{cursor:e.message?"pointer":"unset"},_hover:{backgroundColor:H().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)})}),(0,r.jsx)(o.Td,{children:v[e.status]?(0,r.jsx)(o.j8w,{color:j[e.status],children:v[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:$(e,a||s,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"})}),(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})]})})})},ee=e=>{let{isOpen:t,onClose:i,currentLogs:n,allEventLogs:s,isViewingError:a,errorMessage:c,currentStatus:d=l.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:[a&&(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:a?"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:[n&&!a?(0,r.jsx)(X,{eventLogs:n,allEventLogs:s,onDetailPanel:m,privacyRequest:p}):null,a?(0,r.jsx)(J,{errorMessage:c,status:d}):null]})]})]})},et=e=>{let{subjectRequest:t}=e,{isOpen:i,onOpen:n,onClose:s}=(0,o.qY0)(),[c,d]=(0,h.useState)([]),[u,m]=(0,h.useState)(""),[p,x]=(0,h.useState)(!1),[g,v]=(0,h.useState)(""),[j,y]=(0,h.useState)(l.ERROR),{results:f,id:_}=t,{commentItems:b,isLoading:T}=O(_),{eventItems:E,isLoading:R}=W(f),{manualTaskItems:C,taskCommentIds:k,isLoading:q}=G(_);(0,h.useEffect)(()=>{u&&f&&f[u]&&d(f[u])},[f,u]);let S=()=>{x(!1)},N=(0,h.useCallback)((e,t)=>{m(e),d(t),n()},[n]),P=(0,h.useMemo)(()=>f?Object.values(f).flat():[],[f]),I=(0,h.useMemo)(()=>b.filter(e=>{let t=e.id.replace("comment-","");return!k.has(t)}),[b,k]),D=(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:a.REQUEST_UPDATE,showViewLog:!1,isError:!1,isSkipped:!1,isAwaitingInput:!1,isPolling:!1,id:"initial-request"},...e,...I,...C].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())},[E,I,C,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||R||q?(0,r.jsx)("div",{className:w().itemButton,"data-testid":"timeline-skeleton",children:(0,r.jsx)(o.N_L,{paragraph:{rows:2},active:!0})}):D.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(A,{item:e})},e.id))})}),(0,r.jsx)(ee,{isOpen:i,onClose:()=>{p&&S(),m(""),s()},currentLogs:c,allEventLogs:P,isViewingError:p,errorMessage:g,currentStatus:j,onOpenErrorPanel:(e,t)=>{v(e),t&&y(t),x(!0)},onCloseErrorPanel:S,privacyRequest:t})]})},ei=i(66187);let en=e=>{let{privacyRequestId:t,onCancel:i}=e,[n,s]=(0,h.useState)(""),l=(0,h.useRef)(null),[a,{isLoading:c}]=S();(0,h.useEffect)(()=>{l.current&&l.current.focus()},[]);let d=async()=>{if(n.trim())try{await a({privacy_request_id:t,comment_text:n,comment_type:ei.i.NOTE}).unwrap(),s(""),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.AntInput.TextArea,{ref:l,value:n,onChange:e=>s(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:!n.trim(),type:"primary",htmlType:"button","data-testid":"submit-comment-button",children:"Save"})]})]})};var es=e=>{let{subjectRequest:t}=e,[i,n]=(0,h.useState)(!1);return(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)(et,{subjectRequest:t}),i?(0,r.jsx)(en,{privacyRequestId:t.id,onCancel:()=>n(!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:()=>n(!0),className:"flex items-center","data-testid":"add-comment-button",children:["Add comment ",(0,r.jsx)("span",{className:"ml-1",children:"+"})]})})})]})},el=i(14207),ea=i(46238),er=i(72281),eo=i(17245),ec=i(90867),ed=i(16134);let eu=e=>Array.from(new Set(e.filter(e=>Object.values(x.Us).includes(e.action_type)).map(e=>e.action_type)));var em=e=>{let{rules:t}=e,i=eu(t).map(e=>(0,b.kC)(e)).map(e=>e);return(0,r.jsx)(o.AntTypography.Text,{children:i.join(" - ")})},ep=i(34090),eh=i(55484),ex=e=>{let{connectorName:t,data:i,isSubmitting:n=!1,onSaveClick:s}=e,{isOpen:l,onOpen:a,onClose:c}=(0,o.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({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:a,size:"small",children:"Review"}),!(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:a,size:"small",type:"primary",children:"Begin manual input"}),(0,r.jsx)(ep.J9,{enableReinitialize:!0,initialValues:{...i.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:eh.Ry().shape({}),children:e=>(0,r.jsxs)(o.dys,{isOpen:l,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)(ep.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)(ep.gN,{id:i,name:i,children:e=>{let{field:n}=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,{...n,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:n,htmlType:"submit",children:"Save"})]})})]})]})})]})},eg=e=>{let{connectorName:t,data:i,isSubmitting:n=!1,onSaveClick:s}=e,{isOpen:l,onOpen:a,onClose:c}=(0,o.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({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:a,size:"small",children:"Review"}),!(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:a,size:"small",type:"primary",children:"Begin manual input"}),(0,r.jsx)(ep.J9,{enableReinitialize:!0,initialValues:{...i.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:eh.Ry().shape({}),children:e=>(0,r.jsxs)(o.dys,{isOpen:l,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)(ep.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)(ep.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:n,htmlType:"submit",children:"Save"})]})})]})]})})]})};let ev=(e,t,i)=>e.includes(x.Us.ACCESS)?{ProcessingDetailComponent:ex,uploadMutation:t,getUploadedWebhookDataEndpoint:ec.$I.endpoints.getUploadedManualAccessWebhookData}:e.includes(x.Us.ERASURE)?{ProcessingDetailComponent:eg,uploadMutation:i,getUploadedWebhookDataEndpoint:ec.$I.endpoints.getUploadedManualErasureWebhookData}:null;var ej=e=>{let{subjectRequest:t,onComplete:i}=e,n=(0,ed.T)(),{errorAlert:s,successAlert:l}=(0,eo.VY)(),{handleError:a}=(0,eo.HK)(),[c,d]=(0,h.useState)([]),[u,m]=(0,h.useState)(!1),[p,g]=(0,h.useState)(!1),{data:v,isFetching:j,isLoading:y,isSuccess:f}=(0,el.W6)(),[_]=(0,ec.w3)(),b=eu(t.policy.rules),[T]=(0,ec.nL)(),[w]=(0,ec.UR)(),{ProcessingDetailComponent:E,uploadMutation:A,getUploadedWebhookDataEndpoint:R}=ev(b,T,w),C=async()=>{try{m(!0),await _(t.id).unwrap(),l("Manual request has been received. Request now processing."),i()}catch(e){a(e)}finally{m(!1)}},k=async e=>{try{g(!0),await A(e).unwrap();let t={connection_key:e.connection_key,fields:{}};Object.entries(e.body).forEach(e=>{let[i,n]=e;t.fields[i]=n||""});let i=c.map(e=>e.connection_key===t.connection_key?{...e,checked:!0,fields:{...t.fields}}:e);d(i),l("Manual input successfully saved!")}catch(e){a(e)}finally{g(!1)}};return((0,h.useEffect)(()=>(f&&v.length>0&&0===c.length&&(()=>{if(c.length>0)return;let e=[],i=null==v?void 0:v.map(e=>e.connection_config.key);null==i||i.every(i=>e.push(n(R.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,n]=e;i.fields[t]=n||""}),t.push(i)}else s("An error occurred while loading manual input data for ".concat(v[i].connection_config.name))}),d(t)})})(),()=>{}),[v,c.length,n,s,f,t.id,R]),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:[(j||y)&&(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.$jN,{})}),f&&v?(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:[v.length>0&&v.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:k}):null})]},e.id)),0===v.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:C,className:"mt-2",children:"Complete DSR"})})})}):null]})}):null]})]}):null},ey=e=>{let{subjectRequest:t,onComplete:i}=e,n=(0,c.useRouter)(),{data:s}=(0,el.AZ)({}),l=(0,h.useMemo)(()=>{var e;return(null==s?void 0:null===(e=s.items)||void 0===e?void 0:e.filter(e=>e.connection_type===x.Rj.MANUAL_TASK))||[]},[s]),{data:a}=(0,el.W6)(),d=(a||[]).length>0,{data:m}=(0,F.Ym)({page:1,size:100,privacyRequestId:t.id}),p=(null==m?void 0:m.items)||[],g=p.length,v=p.filter(e=>e.status===x.OS.NEW).length,j=l.length>0,y=p.length>0,f=j||y;return f||d?(0,r.jsxs)(o.Kqy,{spacing:6,children:[f&&(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:v})," pending task",1!==v?"s":""]}),g>0&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(o.wpx,{type:"primary",onClick:()=>{n.push({pathname:u.Jw,query:{privacy_request_id:t.id,tab:er.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)(ea.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)(ej,{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."})})},ef=i(59969);let e_={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 eb=e=>{let{status:t}=e;return(0,r.jsx)(o.j8w,{color:e_[t].color,className:"justify-center","data-testid":"request-status-badge",children:e_[t].label})},eT=i(18225),ew=i(812),eE=i(7842);let{useGetAttachmentsQuery:eA,useUploadAttachmentMutation:eR,useGetAttachmentDetailsQuery:eC,useLazyGetAttachmentDetailsQuery:ek}=k.u.injectEndpoints({endpoints:e=>({getAttachments:e.query({query:e=>{let{privacy_request_id:t,page:i=1,size:n}=e;return{url:"plus/privacy-request/".concat(t,"/attachment"),method:"GET",params:{page:i,size:n}}},providesTags:["Privacy Request Attachments"]}),uploadAttachment:e.mutation({query:e=>{let{privacy_request_id:t,attachment_type:i,attachment_file:n}=e,s=new FormData;return s.append("attachment_type",i),s.append("attachment_file",n),{url:"plus/privacy-request/".concat(t,"/attachment"),method:"POST",body:s,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:eq}=(0,C.oM)({name:"privacyRequestAttachments",initialState:{},reducers:{}}),eS=e=>{var t;let{file:i}=e,[n,s]=(0,h.useState)(!1),[l]=ek(),a=async()=>{var e,t,n;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)){s(!0);try{let e=await l({privacy_request_id:i.customData.privacy_request_id,attachment_id:i.customData.attachment_id}),t=null===(n=e.data)||void 0===n?void 0:n.retrieved_attachment_url,s=null==t?void 0:t.startsWith("http");t&&s?window.open(t,"_blank"):t&&!s?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{s(!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","aria-label":"Download attachment",icon:(0,r.jsx)(o.PJP.UWx,{}),onClick:a,loading:n,className:"shrink-0"})]})},eN=(e,t)=>(0,r.jsx)(eS,{file:t});var eP=e=>{let{subjectRequest:t}=e,[i,n]=(0,h.useState)(!1),s=(0,g.Tg)([x.Sh.ATTACHMENT_READ]),l=(0,g.Tg)([x.Sh.ATTACHMENT_CREATE]),[a]=eR(),{data:c,isLoading:d,error:u}=(0,ec.PW)(),{data:m,isLoading:p}=eA({privacy_request_id:t.id}),{refetch:v}=eA({privacy_request_id:t.id}),j=(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(!s)return null;let f=l&&(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)(eT.Z,{size:"md",alignment:"start"}):(0,r.jsx)(o.pMK,{name:"attachment_file",fileList:j,iconRender:y,showUploadList:{showRemoveIcon:!1,showDownloadIcon:!1},itemRender:eN,accept:_.join(","),customRequest:async e=>{let{file:i,onSuccess:s,onError:l}=e,r=i.name;try{n(!0),await a({privacy_request_id:t.id,attachment_file:i,attachment_type:eE.s.INTERNAL_USE_ONLY}).unwrap(),o.Pg3.success("".concat(r," file uploaded successfully")),v(),null==s||s(i)}catch(e){o.Pg3.error("".concat(r," file upload failed.")),null==l||l(e)}finally{n(!1)}},disabled:!f,children:l&&(0,r.jsx)(o.esZ,{title:u&&"Add attachment not available: ".concat((0,ew.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)(ea.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"})]})})})]})})},eI=i(15709),eO=i.n(eI),eD=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(eO().label),children:(0,r.jsxs)(o.AntTypography.Text,{children:[t,":"]})}),(0,r.jsx)("div",{className:"min-w-0 shrink grow ".concat(eO().value),"data-testid":"request-detail-value-".concat(t),children:i})]})},eM=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)(eD,{label:i.label,children:(0,r.jsx)(o.AntTypography.Text,{children:Array.isArray(i.value)?i.value.join(", "):i.value})},t)})})},eU=e=>{var t,i;let{subjectRequest:n}=e,{plus:s}=(0,R.hz)(),{id:l,status:a,policy:c,identity:d,identity_verified_at:u}=n;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)(eD,{label:"Status",children:(0,r.jsx)(eb,{status:a})}),(0,r.jsx)(eD,{label:"Time remaining",children:(0,r.jsx)(ef.Z,{daysLeft:n.days_left,includeText:!0,status:n.status})}),(0,r.jsx)(eD,{label:"Request type",children:(0,r.jsx)(em,{rules:c.rules})}),(0,r.jsx)(eD,{label:"Source",children:s&&(0,r.jsx)(o.AntTypography.Text,{children:n.source||"-"})}),n.submitted_by&&(0,r.jsx)(eD,{label:"Created by",children:(0,r.jsx)(o.AntTypography.Text,{children:(null===(t=n.submitter)||void 0===t?void 0:t.username)||"-"})}),(0,r.jsx)(eD,{label:"Reviewed by",children:(0,r.jsx)(o.AntTypography.Text,{children:(null===(i=n.reviewer)||void 0===i?void 0:i.username)||"-"})}),Object.entries(d).filter(e=>{let[,{value:t}]=e;return null!==t}).map(e=>{let[t,{value:i="",label:n}]=e,s="".concat(i).concat(u?"":" (Unverified)");return(0,r.jsx)(eD,{label:"Subject ".concat(n.toLocaleLowerCase()),children:(0,r.jsx)(o.esZ,{title:s,trigger:"click",children:(0,r.jsx)(o.AntTypography.Text,{ellipsis:!0,children:s})})},t)}),(0,r.jsx)(eM,{subjectRequest:n})]}),(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.AntInput,{readOnly:!0,value:l,"data-testid":"request-detail-value-id"}),(0,r.jsx)(o.wpx,{"aria-label":"Copy request ID",icon:(0,r.jsx)(Z.Z,{copyText:l})})]})})}),(0,r.jsx)(o.PPS.Item,{label:"Policy key:",className:"mb-4",children:(0,r.jsx)(o.AntInput,{readOnly:!0,value:n.policy.key,"data-testid":"request-detail-value-policy"})})]}),(0,r.jsx)(eP,{subjectRequest:n})]})};let eL=[x.q2.COMPLETE,x.q2.CANCELED,x.q2.DENIED,x.q2.ERROR];var ez=e=>{var t;let{data:i}=e,n=(0,h.useMemo)(()=>({id:i.id,verbose:!0}),[i.id]),{data:s}=(0,p.QA)(n,{pollingInterval:eL.includes(i.status)?0:2e3,skip:!i.id}),l=null!==(t=null==s?void 0:s.items[0])&&void 0!==t?t:i,a=l.status===x.q2.REQUIRES_INPUT,[c,d]=(0,h.useState)("activity"),u=(0,h.useMemo)(()=>[{key:"activity",label:"Activity",children:(0,r.jsx)(es,{subjectRequest:l})},{key:"manual-tasks",label:"Manual tasks",children:(0,r.jsx)(ey,{subjectRequest:l,onComplete:()=>d("activity")}),disabled:!a}],[a,l]);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)(eU,{subjectRequest:l})})]})},eW=i(57526),eB=i(66548),eF=i(45489),eG=e=>{let{privacyRequest:t,action:i}=e,{handleApproveRequest:n,handleDenyRequest:s}=(0,eF.Z)({subjectRequest:t}),l=t.status===x.q2.PENDING,a=(0,o.qY0)(),r=async e=>{let{reason:t}=e,l=o.Pg3.loading({content:"approve"===i?"Approving request...":"Denying request..."});"deny"===i&&await s(t),"approve"===i&&await n(),l()};return{showAction:l,closeModal:a.onClose,performAction:r,openConfirmationModal:a.onOpen,isModalOpen:a.isOpen}},eZ=e=>{var t,i,n;let{privacyRequest:s}=e,l=null===(i=(0,R.hz)())||void 0===i?void 0:null===(t=i.flags)||void 0===t?void 0:t.downloadAccessRequestResults,a=s.status===x.q2.COMPLETE,r=eu(s.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,ec.br)({privacy_request_id:s.id},{skip:!a}),p=null!==(n=null==c?void 0:c.access_result_urls[0])&&void 0!==n?n:"",h=!!p&&"your local fides_uploads folder"!==p,v=null;return u?v=(0,ew.e$)(m,"Unable to resolve download URL"):h||(v="Requests stored locally cannot be downloaded"),{showDownloadResults:l&&o&&r&&a,downloadResults:()=>{let e=document.createElement("a");e.href=p,e.target="_blank",e.rel="noopener noreferrer",e.click(),e.remove()},infoTooltip:v,isLoading:d,isDisabled:!h}},eJ=e=>{let{privacyRequest:t}=e,{errorAlert:i,successAlert:n}=(0,eo.VY)(),s=t.status===x.q2.ERROR,[l]=(0,ec.Fq)();return{reprocessPrivacyRequest:async()=>{if(!t)return;let e=o.Pg3.loading("Reprocessing privacy request...",0),s=await l(t);"error"in s?i((0,ew.e$)(s.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):n("Privacy request is now being reprocessed."),e()},showReprocess:s}},eK=e=>{let{privacyRequest:t}=e,{showDownloadResults:i,downloadResults:n,infoTooltip:s,isDisabled:l}=eZ({privacyRequest:t}),{isModalOpen:a,closeModal:c,performAction:d,openConfirmationModal:u,showAction:m}=eG({privacyRequest:t,action:"approve"}),{isModalOpen:p,closeModal:g,performAction:v,openConfirmationModal:j,showAction:y}=eG({privacyRequest:t,action:"deny"}),{reprocessPrivacyRequest:f,showReprocess:_}=eJ({privacyRequest:t}),{handleFinalizeRequest:b,finalizeRequestResult:T}=(0,eF.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:j,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:l?s:null,placement:"bottom",children:(0,r.jsx)("span",{"data-testid":"download-results-btn",children:"Download request results"})}),onClick:n,disabled:l}),e},[i,n,s,l,m,y,u,j,_,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)(eW.Z,{isOpen:a,isLoading:!1,onClose:c,onApproveRequest:()=>d({reason:""}),subjectRequest:t}),(0,r.jsx)(eB.Z,{isOpen:p,onClose:g,onDenyRequest:e=>v({reason:e})})]})},eH=()=>{let e=(0,c.useRouter)().query.id,{data:t,isLoading:i}=(0,p.QA)({id:e,verbose:!0},{skip:!e}),n=(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:!!n&&(0,r.jsx)(eK,{privacyRequest:n})}),i&&(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.$jN,{})}),!i&&!n&&(0,r.jsx)(o.xvT,{children:"404 no privacy request found"}),!i&&n&&(0,r.jsx)(ez,{data:n})]})}},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","itemButton--polling":"ActivityTimelineEntry_itemButton--polling__jzolP",header:"ActivityTimelineEntry_header__GYibj",title:"ActivityTimelineEntry_title__rm_g0","title--error":"ActivityTimelineEntry_title--error__fOi0s","title--awaiting-input":"ActivityTimelineEntry_title--awaiting-input__3sPAo","title--polling":"ActivityTimelineEntry_title--polling__g_Hgn",timestamp:"ActivityTimelineEntry_timestamp__uMEMT",viewLogs:"ActivityTimelineEntry_viewLogs___T4jN",logs:"ActivityTimelineEntry_logs__T7R0J","logs--open":"ActivityTimelineEntry_logs--open__o_9Io"}}},function(e){e.O(0,[431,7245,8373,2888,9774,179],function(){return e(e.s=6554)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return i(64665)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return g}});var s=i(24246),a=i(20595),n=i(88038),r=i.n(n),l=i(86677);i(27378);var o=i(25980),d=i(90867),c=i(42478),u=i(77830),m=()=>{let e=(0,l.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(u.AD)},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."," "]})]})})},g=e=>{let{children:t,title:i,padded:n=!0,mainProps:u}=e,g=(0,o.hz)(),h=(0,l.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(g.flags.messagingConfiguration&&p),{data:v}=(0,c.JE)(void 0,{skip:x}),{data:f}=(0,d.PW)(void 0,{skip:x}),y=g.flags.messagingConfiguration&&(!v||!f)&&p;return(0,s.jsxs)(a.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(r(),{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:n?6:0,px:n?10:0,h:n?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,s.jsx)(m,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var s=i(24246),a=i(20595),n=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:r=!0,children:l,rightContent:o,style:d,...c}=e;return(0,s.jsxs)("div",{...c,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,s.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(a.lQT,{className:i||l?"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)(n.m,{className:l?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return d}});var s=i(24246),a=i(20595),n=i(34090),r=i(27378),l=i(46238),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:m="inline",helperText:g,...h}=e,[p,x,{setValue:v}]=(0,n.U$)(t),f=!!(x.touched&&x.error),[y,j]=(0,r.useState)("");p.value||"tags"!==h.mode&&"multiple"!==h.mode||(p.value=[]),"tags"===h.mode&&"string"==typeof p.value&&(p.value=[p.value]);let _="tags"===h.mode?(e,t)=>e?e.value!==y||p.value.includes(y)?h.optionRender?h.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:h.optionRender||void 0,b=e=>{j(e),h.onSearch&&h.onSearch(e)},C=(e,t)=>{v(e),h.onChange&&h.onChange(e,t)};return"inline"===m?(0,s.jsx)(a.NIc,{isInvalid:f,isRequired:u,children:(0,s.jsxs)(a.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,s.jsx)(o.__,{htmlFor:h.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,{...p,id:h.id||t,"data-testid":"controlled-select-".concat(p.name),...h,optionRender:_,onSearch:"tags"===h.mode?b:void 0,onChange:C,value:p.value||void 0,status:f?"error":void 0}),g&&(0,s.jsx)(a.Q6r,{children:g}),(0,s.jsx)(o.Bc,{isInvalid:f,message:x.error,fieldName:p.name})]}),(0,s.jsx)(l.b,{label:c,className:f?"mt-2 self-start":void 0})]})]})}):(0,s.jsx)(a.NIc,{isInvalid:f,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:h.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,(0,s.jsx)(l.b,{label:c})]}),(0,s.jsx)(a.WPr,{...p,id:h.id||t,"data-testid":"controlled-select-".concat(p.name),...h,optionRender:_,onSearch:"tags"===h.mode?b:void 0,onChange:C,value:p.value||void 0,status:f?"error":void 0}),g&&(0,s.jsx)(a.Q6r,{style:{marginTop:0},children:g}),(0,s.jsx)(o.Bc,{isInvalid:f,message:x.error,fieldName:p.name})]})})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var s=i(24246),a=i(20595),n=i(79894),r=i.n(n),l=i(27378);let{Text:o}=a.AntTypography,d=e=>{let{items:t,...i}=e,n=(0,l.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let n=i===t.length-1,l={...e},d=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,id:n?"breadcrumb-current-page":void 0,children:l.title})),d)?l.title=(0,s.jsx)(a.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,s.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,s.jsx)(a.zrq,{items:n,...i})}},42478:function(e,t,i){"use strict";i.d(t,{FU:function(){return d},JE:function(){return a},Ki:function(){return u},SU:function(){return m},W:function(){return g},h9:function(){return n},jc:function(){return s},qt:function(){return o},sn:function(){return c}});let{useGetEmailInviteStatusQuery:s,useGetActiveMessagingProviderQuery:a,useCreateMessagingConfigurationMutation:n,useCreateMessagingConfigurationSecretsMutation:r,useGetMessagingConfigurationDetailsQuery:l,useGetMessagingConfigurationsQuery:o,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:u,useCreateTestConnectionMessageMutation:m,useDeleteMessagingConfigurationByKeyMutation:g}=i(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,t,i,s)=>{let a=await s({url:"messaging/default/active"});return a.error&&404===a.error.status?{data:null}:a},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return l},I3:function(){return a},kN:function(){return r},rE:function(){return n}});var s=i(85054);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}}),n=new Map([[s.Us.ACCESS,"Access"],[s.Us.ERASURE,"Erasure"],[s.Us.CONSENT,"Consent"],[s.Us.UPDATE,"Update"]]),r=[...n].map(e=>{let[t,i]=e;return{label:i,value:t}}),l={local:"local",s3:"s3",gcs:"gcs"}},64665:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return j}});var s=i(24246),a=i(20595),n=i(27378),r=i(812),l=i(17245),o=i(77213),d=i(77830),c=i(58754),u=i(7426),m=i(71784),g=i(90867),h=i(34090),p=i(97181),x=i(40324),v=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[v,f]=(0,n.useState)(""),[y]=(0,g.gC)(),[j]=(0,g.cf)(),{handleError:_}=(0,l.HK)(),{successAlert:b}=(0,l.VY)(),C={type:m.DE.gcs,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},q=async e=>{let t=await y({type:m.DE.gcs,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,r.D4)(t)?_(t.error):(f(e.auth_method),b("Google Cloud Storage credentials successfully updated."))},k=async e=>{let t=e.private_key.trim();t.includes("\\n")&&(t=t.replace(/\\n/g,"\n"));let i=await j({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,r.D4)(i)?_(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)(h.J9,{initialValues:C,onSubmit:q,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(p.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(p.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)(x.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)(h.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:k,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(x.j0,{name:"type",label:"Type"}),(0,s.jsx)(x.j0,{name:"project_id",label:"Project ID"}),(0,s.jsx)(x.j0,{name:"private_key_id",label:"Private key ID",type:"password"}),(0,s.jsx)(x.j0,{name:"private_key",label:"Private key",type:"password"}),(0,s.jsx)(x.j0,{name:"client_email",label:"Client email"}),(0,s.jsx)(x.j0,{name:"client_id",label:"Client ID"}),(0,s.jsx)(x.j0,{name:"auth_uri",label:"Auth URI"}),(0,s.jsx)(x.j0,{name:"token_uri",label:"Token URI"}),(0,s.jsx)(x.j0,{name:"auth_provider_x509_cert_url",label:"Auth provider x509 cert URL"}),(0,s.jsx)(x.j0,{name:"client_x509_cert_url",label:"Client x509 cert URL"}),(0,s.jsx)(x.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"})]})]})}})})]})]})},f=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[v,f]=(0,n.useState)(""),[y]=(0,g.gC)(),[j]=(0,g.cf)(),{handleError:_}=(0,l.HK)(),{successAlert:b}=(0,l.VY)(),C={type:m.DE.s3,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},q=async e=>{let t=await y({type:m.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,r.D4)(t)?_(t.error):(f(e.auth_method),b("S3 storage credentials successfully updated."))},k=async e=>{let t=await j({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:m.DE.s3});(0,r.D4)(t)?_(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)(h.J9,{initialValues:C,onSubmit:q,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(p.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(p.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)(x.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)(h.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:k,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(x.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,s.jsx)(x.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]})},y=()=>{let{successAlert:e}=(0,l.VY)(),{handleError:t}=(0,l.HK)(),[i,h]=(0,n.useState)(""),{data:p}=(0,g.PW)(),{data:x}=(0,g.Au)({type:i}),[y,{isLoading:j}]=(0,g.gC)(),[_]=(0,u.L)();(0,n.useEffect)(()=>{p&&h(p.type)},[p]);let b=async i=>{if(i===m.DE.local){let s=await y({type:i,details:{},format:"json"});(0,r.D4)(s)?t(s.error):e("Configured storage details successfully.")}let s=await _({storage:{active_default_storage_type:i}});(0,r.D4)(s)?t(s.error):h(i)},C={s3:f,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:j,onChange:e=>b(e.target.value),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")]})}),C&&x&&(0,s.jsx)(C,{storageDetails:x})]})]})},j=()=>(0,s.jsx)(y,{})}},function(e){e.O(0,[431,7245,2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
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 g}});var s=i(24246),a=i(20595),n=i(88038),r=i.n(n),l=i(86677);i(27378);var o=i(25980),d=i(90867),c=i(42478),u=i(77830),m=()=>{let e=(0,l.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(u.AD)},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."," "]})]})})},g=e=>{let{children:t,title:i,padded:n=!0,mainProps:u}=e,g=(0,o.hz)(),h=(0,l.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(g.flags.messagingConfiguration&&p),{data:v}=(0,c.JE)(void 0,{skip:x}),{data:f}=(0,d.PW)(void 0,{skip:x}),y=g.flags.messagingConfiguration&&(!v||!f)&&p;return(0,s.jsxs)(a.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(r(),{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:n?6:0,px:n?10:0,h:n?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,s.jsx)(m,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var s=i(24246),a=i(20595),n=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:r=!0,children:l,rightContent:o,style:d,...c}=e;return(0,s.jsxs)("div",{...c,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,s.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(a.lQT,{className:i||l?"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)(n.m,{className:l?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return d}});var s=i(24246),a=i(20595),n=i(34090),r=i(27378),l=i(46238),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:m="inline",helperText:g,...h}=e,[p,x,{setValue:v}]=(0,n.U$)(t),f=!!(x.touched&&x.error),[y,j]=(0,r.useState)("");p.value||"tags"!==h.mode&&"multiple"!==h.mode||(p.value=[]),"tags"===h.mode&&"string"==typeof p.value&&(p.value=[p.value]);let _="tags"===h.mode?(e,t)=>e?e.value!==y||p.value.includes(y)?h.optionRender?h.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:h.optionRender||void 0,b=e=>{j(e),h.onSearch&&h.onSearch(e)},C=(e,t)=>{v(e),h.onChange&&h.onChange(e,t)};return"inline"===m?(0,s.jsx)(a.NIc,{isInvalid:f,isRequired:u,children:(0,s.jsxs)(a.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,s.jsx)(o.__,{htmlFor:h.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,{...p,id:h.id||t,"data-testid":"controlled-select-".concat(p.name),...h,optionRender:_,onSearch:"tags"===h.mode?b:void 0,onChange:C,value:p.value||void 0,status:f?"error":void 0}),g&&(0,s.jsx)(a.Q6r,{children:g}),(0,s.jsx)(o.Bc,{isInvalid:f,message:x.error,fieldName:p.name})]}),(0,s.jsx)(l.b,{label:c,className:f?"mt-2 self-start":void 0})]})]})}):(0,s.jsx)(a.NIc,{isInvalid:f,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:h.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,(0,s.jsx)(l.b,{label:c})]}),(0,s.jsx)(a.WPr,{...p,id:h.id||t,"data-testid":"controlled-select-".concat(p.name),...h,optionRender:_,onSearch:"tags"===h.mode?b:void 0,onChange:C,value:p.value||void 0,status:f?"error":void 0}),g&&(0,s.jsx)(a.Q6r,{style:{marginTop:0},children:g}),(0,s.jsx)(o.Bc,{isInvalid:f,message:x.error,fieldName:p.name})]})})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var s=i(24246),a=i(20595),n=i(79894),r=i.n(n),l=i(27378);let{Text:o}=a.AntTypography,d=e=>{let{items:t,...i}=e,n=(0,l.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let n=i===t.length-1,l={...e},d=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,id:n?"breadcrumb-current-page":void 0,children:l.title})),d)?l.title=(0,s.jsx)(a.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,s.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,s.jsx)(a.zrq,{items:n,...i})}},42478:function(e,t,i){"use strict";i.d(t,{FU:function(){return d},JE:function(){return a},Ki:function(){return u},SU:function(){return m},W:function(){return g},h9:function(){return n},jc:function(){return s},qt:function(){return o},sn:function(){return c}});let{useGetEmailInviteStatusQuery:s,useGetActiveMessagingProviderQuery:a,useCreateMessagingConfigurationMutation:n,useCreateMessagingConfigurationSecretsMutation:r,useGetMessagingConfigurationDetailsQuery:l,useGetMessagingConfigurationsQuery:o,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:u,useCreateTestConnectionMessageMutation:m,useDeleteMessagingConfigurationByKeyMutation:g}=i(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,t,i,s)=>{let a=await s({url:"messaging/default/active"});return a.error&&404===a.error.status?{data:null}:a},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return l},I3:function(){return a},kN:function(){return r},rE:function(){return n}});var s=i(39449);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}}),n=new Map([[s.Us.ACCESS,"Access"],[s.Us.ERASURE,"Erasure"],[s.Us.CONSENT,"Consent"],[s.Us.UPDATE,"Update"]]),r=[...n].map(e=>{let[t,i]=e;return{label:i,value:t}}),l={local:"local",s3:"s3",gcs:"gcs"}},64665:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return j}});var s=i(24246),a=i(20595),n=i(27378),r=i(812),l=i(17245),o=i(77213),d=i(77830),c=i(58754),u=i(7426),m=i(71784),g=i(90867),h=i(34090),p=i(97181),x=i(40324),v=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[v,f]=(0,n.useState)(""),[y]=(0,g.gC)(),[j]=(0,g.cf)(),{handleError:_}=(0,l.HK)(),{successAlert:b}=(0,l.VY)(),C={type:m.DE.gcs,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},q=async e=>{let t=await y({type:m.DE.gcs,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,r.D4)(t)?_(t.error):(f(e.auth_method),b("Google Cloud Storage credentials successfully updated."))},k=async e=>{let t=e.private_key.trim();t.includes("\\n")&&(t=t.replace(/\\n/g,"\n"));let i=await j({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,r.D4)(i)?_(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)(h.J9,{initialValues:C,onSubmit:q,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(p.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(p.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)(x.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)(h.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:k,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(x.j0,{name:"type",label:"Type"}),(0,s.jsx)(x.j0,{name:"project_id",label:"Project ID"}),(0,s.jsx)(x.j0,{name:"private_key_id",label:"Private key ID",type:"password"}),(0,s.jsx)(x.j0,{name:"private_key",label:"Private key",type:"password"}),(0,s.jsx)(x.j0,{name:"client_email",label:"Client email"}),(0,s.jsx)(x.j0,{name:"client_id",label:"Client ID"}),(0,s.jsx)(x.j0,{name:"auth_uri",label:"Auth URI"}),(0,s.jsx)(x.j0,{name:"token_uri",label:"Token URI"}),(0,s.jsx)(x.j0,{name:"auth_provider_x509_cert_url",label:"Auth provider x509 cert URL"}),(0,s.jsx)(x.j0,{name:"client_x509_cert_url",label:"Client x509 cert URL"}),(0,s.jsx)(x.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"})]})]})}})})]})]})},f=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[v,f]=(0,n.useState)(""),[y]=(0,g.gC)(),[j]=(0,g.cf)(),{handleError:_}=(0,l.HK)(),{successAlert:b}=(0,l.VY)(),C={type:m.DE.s3,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},q=async e=>{let t=await y({type:m.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,r.D4)(t)?_(t.error):(f(e.auth_method),b("S3 storage credentials successfully updated."))},k=async e=>{let t=await j({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:m.DE.s3});(0,r.D4)(t)?_(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)(h.J9,{initialValues:C,onSubmit:q,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(p.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(p.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)(x.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)(h.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:k,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(x.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,s.jsx)(x.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]})},y=()=>{let{successAlert:e}=(0,l.VY)(),{handleError:t}=(0,l.HK)(),[i,h]=(0,n.useState)(""),{data:p}=(0,g.PW)(),{data:x}=(0,g.Au)({type:i}),[y,{isLoading:j}]=(0,g.gC)(),[_]=(0,u.L)();(0,n.useEffect)(()=>{p&&h(p.type)},[p]);let b=async i=>{if(i===m.DE.local){let s=await y({type:i,details:{},format:"json"});(0,r.D4)(s)?t(s.error):e("Configured storage details successfully.")}let s=await _({storage:{active_default_storage_type:i}});(0,r.D4)(s)?t(s.error):h(i)},C={s3:f,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:j,onChange:e=>b(e.target.value),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")]})}),C&&x&&(0,s.jsx)(C,{storageDetails:x})]})]})},j=()=>(0,s.jsx)(y,{})}},function(e){e.O(0,[431,7245,2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2369],{1565:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests",function(){return s(77169)}])},35287:function(e,t,s){"use strict";var i=s(24246),l=s(20595),a=s(88038),r=s.n(a);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:a}=e;return(0,i.jsxs)(l.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)(l.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),l=s(20595);t.Z=e=>{let{title:t,text:s,onClose:a}=e;return(0,i.jsxs)(l.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)(l.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:a}),(0,i.jsx)(l.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,i.jsxs)(l.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,i.jsx)(l.X6q,{fontSize:"md",children:t}),(0,i.jsx)(l.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:s})]})]})}},96718:function(e,t,s){"use strict";s.d(t,{z:function(){return a}});var i=s(24246),l=s(20595);let a=e=>{let{...t}=e;return(0,i.jsx)(l.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,styles:t.mode?void 0:{popup:{root:{width:"auto",minWidth:"200px"}}},className:"w-auto","data-testid":"filter-select",...t})}},97181:function(e,t,s){"use strict";s.d(t,{d:function(){return o}});var i=s(24246),l=s(20595),a=s(34090),r=s(27378),n=s(46238),d=s(40324);let o=e=>{let{name:t,label:s,labelProps:o,tooltip:c,isRequired:u,layout:p="inline",helperText:m,...x}=e,[h,v,{setValue:y}]=(0,a.U$)(t),j=!!(v.touched&&v.error),[g,f]=(0,r.useState)("");h.value||"tags"!==x.mode&&"multiple"!==x.mode||(h.value=[]),"tags"===x.mode&&"string"==typeof h.value&&(h.value=[h.value]);let _="tags"===x.mode?(e,t)=>e?e.value!==g||h.value.includes(g)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:x.optionRender||void 0,b=e=>{f(e),x.onSearch&&x.onSearch(e)},q=(e,t)=>{y(e),x.onChange&&x.onChange(e,t)};return"inline"===p?(0,i.jsx)(l.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(l.rjZ,{templateColumns:s?"1fr 3fr":"1fr",children:[s?(0,i.jsx)(d.__,{htmlFor:x.id||t,...o,children:s}):null,(0,i.jsxs)(l.jqI,{align:"center",children:[(0,i.jsxs)(l.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(l.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:_,onSearch:"tags"===x.mode?b:void 0,onChange:q,value:h.value||void 0,status:j?"error":void 0}),m&&(0,i.jsx)(l.Q6r,{children:m}),(0,i.jsx)(d.Bc,{isInvalid:j,message:v.error,fieldName:h.name})]}),(0,i.jsx)(n.b,{label:c,className:j?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(l.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(l.gCW,{alignItems:"start",children:[(0,i.jsxs)(l.jqI,{align:"center",children:[s?(0,i.jsx)(d.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...o,children:s}):null,(0,i.jsx)(n.b,{label:c})]}),(0,i.jsx)(l.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:_,onSearch:"tags"===x.mode?b:void 0,onChange:q,value:h.value||void 0,status:j?"error":void 0}),m&&(0,i.jsx)(l.Q6r,{style:{marginTop:0},children:m}),(0,i.jsx)(d.Bc,{isInvalid:j,message:v.error,fieldName:h.name})]})})}},9270:function(e,t,s){"use strict";s.d(t,{S:function(){return a}});var i=s(27378),l=s(36866);let a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,l.h)(e),{pageIndex:s,pageSize:a,updatePageIndex:r,updatePageSize:n,pageSizeOptions:d,showSizeChanger:o}=t,c=(0,i.useMemo)(()=>({current:s,pageSize:a,showSizeChanger:o,pageSizeOptions:d.map(String),onChange:r,onShowSizeChange:(e,t)=>{n(t)}}),[s,a,o,d,r,n]);return{...t,paginationProps:c}}},71784:function(e,t,s){"use strict";s.d(t,{DE:function(){return n},I3:function(){return l},kN:function(){return r},rE:function(){return a}});var i=s(39449);let l=[...new Map([[i.q2.APPROVED,"Approved"],[i.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[i.q2.CANCELED,"Canceled"],[i.q2.COMPLETE,"Completed"],[i.q2.DENIED,"Denied"],[i.q2.ERROR,"Error"],[i.q2.IN_PROCESSING,"In progress"],[i.q2.PENDING,"New"],[i.q2.PAUSED,"Paused"],[i.q2.IDENTITY_UNVERIFIED,"Unverified"],[i.q2.REQUIRES_INPUT,"Requires input"],[i.q2.REQUIRES_MANUAL_FINALIZATION,"Requires finalization"]])].map(e=>{let[t,s]=e;return{label:s,value:t}}),a=new Map([[i.Us.ACCESS,"Access"],[i.Us.ERASURE,"Erasure"],[i.Us.CONSENT,"Consent"],[i.Us.UPDATE,"Update"]]),r=[...a].map(e=>{let[t,s]=e;return{label:s,value:t}}),n={local:"local",s3:"s3",gcs:"gcs"}},77169:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eU}});var i,l,a=s(24246),r=s(35287),n=s(20595),d=s(65218),o=s.n(d),c=s(27378),u=s(25980),p=s(19904),m=s(56141),x=s.n(m),h=s(86677),v=s(16134),y=s(91317),j=s(18225),g=s(77830),f=s(28407),_=s(16394),b=s(39449),q=s(32735),C=s(59969),S=s(71784),k=s(45116);let E=e=>{let{label:t,children:s}=e;return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"shrink-0 grow-0 basis-1/3 pr-2",children:(0,a.jsxs)(n.AntTypography.Text,{className:"text-gray-700",children:[t,":"]})}),(0,a.jsx)("div",{className:"min-w-0 shrink grow text-gray-600",children:s})]})},R=e=>{let{task:t}=e,s=t.request_type===b.k6.ACCESS?b.Us.ACCESS:b.Us.ERASURE,i=S.rE.get(s)||t.request_type;return(0,a.jsxs)("div",{className:"flex flex-col space-y-3","data-testid":"task-details-container",children:[(0,a.jsx)(E,{label:"Name",children:(0,a.jsx)(n.AntTypography.Text,{children:t.name})}),(0,a.jsx)(E,{label:"Description",children:(0,a.jsx)(n.AntTypography.Text,{children:t.description||"-"})}),(0,a.jsx)(E,{label:"Request Type",children:(0,a.jsx)(n.AntTypography.Text,{children:i})}),(0,a.jsx)(E,{label:"Assigned To",children:t.assigned_users&&t.assigned_users.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-1","data-testid":"assigned-users-tags",children:t.assigned_users.map(e=>(0,a.jsx)(n.j8w,{"data-testid":"assigned-user-tag-".concat(e.id),children:"".concat(e.first_name||""," ").concat(e.last_name||"").trim()||e.email_address||"Unknown User"},e.id))}):(0,a.jsx)(n.AntTypography.Text,{children:"No one assigned"})}),t.privacy_request.subject_identities&&Object.keys(t.privacy_request.subject_identities).length>0?(0,a.jsx)(E,{label:"Subject identities",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:Object.entries(t.privacy_request.subject_identities).map(e=>{let[t,s]=e;return(0,a.jsxs)(n.j8w,{children:[t,": ",String(s)]},t)})})}):null,t.privacy_request.custom_fields&&Object.keys(t.privacy_request.custom_fields).length>0?(0,a.jsx)(E,{label:"Custom fields",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:Object.entries(t.privacy_request.custom_fields).filter(e=>{let[,t]=e;return t}).map(e=>{let[t,s]=e;return(0,a.jsxs)(n.j8w,{children:[t,": ",String(s)]},t)})})}):null]})},w=e=>{let{isOpen:t,onClose:s,task:i}=e,[l,{isLoading:r}]=(0,k.HP)(),[d,o]=(0,c.useState)(""),[u,p]=(0,c.useState)(!1),[m,x]=(0,c.useState)(""),[h,v]=(0,c.useState)([]),y=async()=>{try{await l({privacy_request_id:i.privacy_request.id,manual_field_id:i.manual_field_id,field_value:i.input_type===b.PF.TEXT?d:i.input_type===b.PF.CHECKBOX?u.toString():void 0,comment_text:m||void 0,attachments:h.length>0?h.map(e=>e.originFileObj).filter(Boolean):void 0}).unwrap(),o(""),p(!1),x(""),v([]),s()}catch(e){n.Pg3.error("Failed to complete task. Please try again.")}};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"700px",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{maxWidth:"700px","data-testid":"complete-task-modal",children:[(0,a.jsx)(n.xBx,{children:(0,a.jsx)(n.AntTypography.Title,{level:4,children:"Complete Task"})}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,a.jsx)("div",{children:(0,a.jsx)(R,{task:i})}),(0,a.jsx)(n.htM,{}),(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(()=>{switch(i.input_type){case b.PF.TEXT:return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Subject data"}),(0,a.jsx)(n.AntInput.TextArea,{value:d,onChange:e=>o(e.target.value),placeholder:"Enter your response...",rows:4,"data-testid":"complete-modal-text-input"})]});case b.PF.CHECKBOX:return(0,a.jsx)("div",{className:"space-y-2",children:(0,a.jsx)(n.E_O,{checked:u,onChange:e=>p(e.target.checked),"data-testid":"complete-modal-checkbox",children:"The task has been completed"})});default:return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Upload Files"}),(0,a.jsx)("div",{children:(0,a.jsx)(n.pMK,{fileList:h,onChange:e=>{let{fileList:t}=e;return v(t)},beforeUpload:()=>!1,"data-testid":"complete-modal-file-upload",multiple:!0,children:(0,a.jsx)(n.wpx,{"data-testid":"complete-modal-upload-button",children:"Click to Upload"})})})]})}})(),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Internal comment"}),(0,a.jsx)(n.AntInput.TextArea,{value:m,onChange:e=>x(e.target.value),placeholder:"Add any additional comments...",rows:3,"data-testid":"complete-modal-comment-input"})]})]})})]})}),(0,a.jsx)(n.mzw,{children:(0,a.jsxs)(n.vyj,{children:[(0,a.jsx)(n.wpx,{onClick:()=>{o(""),p(!1),x(""),v([]),s()},disabled:r,"data-testid":"complete-modal-cancel-button",children:"Cancel"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:y,loading:r,disabled:!(()=>{switch(i.input_type){case b.PF.TEXT:return d.trim().length>0;case b.PF.CHECKBOX:return u;default:return h.length>0}})(),"data-testid":"complete-modal-save-button",children:"Save"})]})})]})]})},T=e=>{let{isOpen:t,onClose:s,task:i}=e,[l,{isLoading:r}]=(0,k.DA)(),[d,o]=(0,c.useState)(""),u=async()=>{try{await l({privacy_request_id:i.privacy_request.id,manual_field_id:i.manual_field_id,skip_reason:d}).unwrap(),o(""),s()}catch(e){n.Pg3.error("Failed to skip task. Please try again.")}};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"700px",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{maxWidth:"700px","data-testid":"skip-task-modal",children:[(0,a.jsx)(n.xBx,{children:(0,a.jsx)(n.AntTypography.Title,{level:4,children:"Skip Task"})}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,a.jsx)("div",{children:(0,a.jsx)(R,{task:i})}),(0,a.jsx)(n.htM,{}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"flex flex-col space-y-4",children:(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Reason for skipping (Required)"}),(0,a.jsx)(n.AntInput.TextArea,{value:d,onChange:e=>o(e.target.value),placeholder:"Please provide a reason for skipping this task...",rows:4,"data-testid":"skip-modal-comment-input"})]})})})]})}),(0,a.jsx)(n.mzw,{children:(0,a.jsxs)(n.vyj,{children:[(0,a.jsx)(n.wpx,{onClick:()=>{o(""),s()},disabled:r,"data-testid":"skip-modal-cancel-button",children:"Cancel"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:u,loading:r,disabled:!d.trim(),danger:!0,"data-testid":"skip-modal-skip-button",children:"Skip Task"})]})})]})]})},I=e=>{let{task:t}=e,s=(0,h.useRouter)(),{isOpen:i,onOpen:l,onClose:r}=(0,n.qY0)(),{isOpen:d,onOpen:o,onClose:c}=(0,n.qY0)(),u=(0,p.Tg)([b.Sh.PRIVACY_REQUEST_READ]);if(t.status!==b.OS.NEW)return null;let m=[{key:"skip",label:"Skip task",onClick:o}];return u&&m.push({key:"go-to-request",label:"Go to request",onClick:()=>{s.push({pathname:g.ld,query:{id:t.privacy_request.id}})}}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.vyj,{size:"small",children:[(0,a.jsx)(n.wpx,{type:"default",onClick:l,size:"small",children:"Complete"}),(0,a.jsx)(n.S0p,{menu:{items:m},trigger:["click"],placement:"bottomRight",overlayStyle:{minWidth:120},children:(0,a.jsx)(n.wpx,{size:"small",icon:(0,a.jsx)(n.PJP.r43,{}),"aria-label":"More actions"})})]}),(0,a.jsx)(w,{isOpen:i,onClose:r,task:t}),(0,a.jsx)(T,{isOpen:d,onClose:c,task:t})]})},A={[b.OS.NEW]:{color:"info",label:"New"},[b.OS.COMPLETED]:{color:"success",label:"Completed"},[b.OS.SKIPPED]:{color:"marble",label:"Skipped"}},N=[{text:"New",value:b.OS.NEW},{text:"Completed",value:b.OS.COMPLETED},{text:"Skipped",value:b.OS.SKIPPED}],P=[{text:"Access",value:b.k6.ACCESS},{text:"Erasure",value:b.k6.ERASURE}],O=e=>{let{systemFilters:t,userFilters:s,onUserClick:i,currentFilters:l,hasAccessToAllTasks:r}=e,d=[{title:"Task name",dataIndex:"name",key:"name",minWidth:100,render:e=>(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:e},children:e})},{title:"Status",dataIndex:"status",key:"status",width:110,render:e=>(0,a.jsx)(n.j8w,{color:A[e].color,"data-testid":"manual-task-status-tag",children:A[e].label}),filters:N,filterMultiple:!1},{title:"System",dataIndex:["system","name"],key:"system_name",minWidth:100,render:e=>(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:e},children:e}),filters:t,filterMultiple:!1},{title:"Type",dataIndex:"request_type",key:"request_type",width:80,render:e=>{let t=e===b.k6.ACCESS?b.Us.ACCESS:b.Us.ERASURE,s=S.rE.get(t)||e;return(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:s},children:s})},filters:P,filterMultiple:!1},{title:"Assigned to",dataIndex:"assigned_users",key:"assigned_users",minWidth:100,render:e=>{if(!e||0===e.length)return(0,a.jsx)(n.AntTypography.Text,{children:"-"});let t=e.map(e=>({label:(0,_.gJ)(e),value:e.id})),s=e.map(e=>e.id);return(0,a.jsx)(n.d3V,{value:s,options:t,readonly:!0,onTagClick:e=>i(String(e))})},filters:s,filterMultiple:!1,defaultFilteredValue:l.assignedUsers?[l.assignedUsers]:void 0},{title:"Days left",dataIndex:["privacy_request","days_left"],key:"days_left",width:90,render:e=>(0,a.jsx)(C.Z,{daysLeft:e||0,includeText:!1,status:b.q2.PENDING})},{title:"Subject identity",dataIndex:["privacy_request","subject_identities"],key:"subject_identities",minWidth:120,render:e=>{if(!e)return(0,a.jsx)(n.AntTypography.Text,{children:"-"});let t=e.email||e.phone_number||"";return(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:t},children:t})}},{title:"Actions",key:"actions",width:145,render:(e,t)=>(0,a.jsx)(I,{task:t})}];return r?d:d.filter(e=>"assigned_users"!==e.key)},U=()=>{let e=(0,h.useRouter)(),t=(0,v.C)(y.dy),[s,i]=(0,c.useState)(1),[l,r]=(0,c.useState)(25),d=(0,p.Tg)([b.Sh.MANUAL_FIELD_READ_ALL]),o=e.query.privacy_request_id||void 0,u=(0,c.useMemo)(()=>{let e={};return(null==t?void 0:t.id)&&!o&&(e.assignedUsers=t.id),o&&"string"==typeof o&&(e.privacyRequestId=o),e},[null==t?void 0:t.id,o]),[m,C]=(0,c.useState)(u),{data:S,isLoading:E,isFetching:R}=(0,k.Ym)({page:s,size:l,status:m.status,systemName:m.systemName,requestType:m.requestType,assignedUserId:m.assignedUsers,privacyRequestId:m.privacyRequestId}),{data:w}=(0,k.Ym)({page:1,size:1}),{items:T,total:I}=(0,c.useMemo)(()=>S||{items:[],total:0,pages:0,filter_options:{assigned_users:[],systems:[]}},[S]),A=(0,c.useMemo)(()=>(null==w?void 0:w.filter_options)||{assigned_users:[],systems:[]},[w]),N=O({systemFilters:(0,c.useMemo)(()=>{var e;return(null==A?void 0:null===(e=A.systems)||void 0===e?void 0:e.map(e=>({text:e.name,value:e.name})))||[]},[null==A?void 0:A.systems]),userFilters:(0,c.useMemo)(()=>{var e;let s=(null==A?void 0:null===(e=A.assigned_users)||void 0===e?void 0:e.map(e=>({text:(0,_.gJ)(e),value:e.id})))||[];return(null==t?void 0:t.id)&&!s.some(e=>e.value===t.id)&&s.push({text:(0,_.gJ)(t,{fallbackToId:!0}),value:t.id}),s},[null==A?void 0:A.assigned_users,t]),onUserClick:t=>{e.push({pathname:g.fw,query:{id:t}})},currentFilters:m,hasAccessToAllTasks:d}),P=(0,c.useMemo)(()=>x()(m,u),[m,u]);return E?(0,a.jsx)(j.Z,{}):(0,a.jsxs)("div",{className:"mt-2 space-y-4",children:[(0,a.jsx)(n.kCb,{gap:3,align:"center",className:"mb-4",children:(0,a.jsx)(f.H,{globalFilter:m.privacyRequestId||"",setGlobalFilter:e=>{let t={...m};e&&e.trim()?t.privacyRequestId=e.trim():delete t.privacyRequestId,C(t),i(1)},placeholder:"Search by privacy request ID",testid:"privacy-request-id-filter"})}),(0,a.jsx)(n.V5H,{columns:N,dataSource:T,rowKey:e=>"".concat(e.privacy_request.id,"-").concat(e.manual_field_id),pagination:{current:s,pageSize:l,pageSizeOptions:q.VZ,total:I||0,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," items"),onChange:(e,t)=>{i(e),t!==l&&(r(t),i(1))}},onChange:(e,t)=>{let s={privacyRequestId:m.privacyRequestId};t.status&&([s.status]=t.status),t.system_name&&([s.systemName]=t.system_name),t.request_type&&([s.requestType]=t.request_type),t.assigned_users&&([s.assignedUsers]=t.assigned_users),C(s),i(1)},locale:{emptyText:P?(0,a.jsx)("div",{"data-testid":"empty-state-current-user",className:"my-4",children:(0,a.jsxs)(n.AntTypography.Paragraph,{children:["You have no tasks assigned."," ",d&&(0,a.jsx)("span",{children:'You can modify the "Assigned to" column filter to view tasks assigned to other users.'})]})}):(0,a.jsx)("div",{"data-testid":"empty-state",className:"my-4",children:"No results found."})},loading:E||R,scroll:{scrollToFirstRowOnChange:!0},tableLayout:"fixed",className:"[&_th]:!break-normal"})]})};var z=s(59003),D=s(92222),F=s(40431),M=s(16125),Z=s(14048),L=s(47935),W=s(90867);let Y={approved:{colorScheme:"success",label:"Approved"},complete:{label:"Completed",colorScheme:"success"},awaiting_email_send:{label:"Awaiting Email Send",colorScheme:"marble"},denied:{label:"Denied",colorScheme:"warning"},canceled:{label:"Canceled",colorScheme:"marble"},error:{label:"Error",colorScheme:"error"},in_processing:{label:"In Progress",colorScheme:"caution"},paused:{label:"Paused",colorScheme:"marble"},pending:{label:"New",colorScheme:"info"},identity_unverified:{label:"Unverified",colorScheme:"marble"},requires_input:{colorScheme:"minos",label:"Requires Input"},requires_manual_finalization:{colorScheme:"minos",label:"Requires Finalization"}},B=e=>{let{value:t}=e;return(0,a.jsx)(L.A4,{color:Y[t].colorScheme,value:Y[t].label,"data-testid":"request-status-badge"})},V=e=>{let t,{daysLeft:s,timeframe:i=45,status:l,includeText:r=!1}=e;if(null==s||l===b.q2.COMPLETE||l===b.q2.CANCELED||l===b.q2.DENIED||l===b.q2.IDENTITY_UNVERIFIED)return null;let n=100*s/i;return n<25?t="error":n>=75?t="success":n>=25&&(t="warning"),(0,a.jsx)(L.A4,{value:r?"".concat(s," days left"):s.toString(),color:t})},K=e=>Array.from(new Set(e.filter(e=>Object.values(b.Us).includes(e.action_type)).map(e=>e.action_type))),G=e=>{let{value:t}=e,s=K(t).map(e=>S.rE.get(e));return(0,a.jsx)(L.WP,{value:s,cellState:{isExpanded:!0}})};var Q=s(58452),X=s(7426),J=s(57526),H=s(66548),$=s(45489),ee=s(42478);let et=e=>{var t;let{subjectRequest:s,...i}=e,l=(0,n.qY0)(),r=(0,n.qY0)(),d=(0,n.qY0)(),o=(0,n.qY0)(),{handleApproveRequest:c,handleDenyRequest:u,handleDeleteRequest:m,handleFinalizeRequest:x,isLoading:h}=(0,$.Z)({subjectRequest:s}),{data:v}=(0,X.tB)({api_set:!1}),{data:y}=(0,ee.JE)(),j=null==v?void 0:null===(t=v.notifications)||void 0===t?void 0:t.send_request_completion_notification;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Ugi,{...i,children:["pending"!==s.status?null:(0,a.jsx)(n.wpx,{title:"Approve","aria-label":"Approve",icon:(0,a.jsx)(n.PJP.MCw,{}),onClick:l.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-approve-btn",size:"small"}),"pending"!==s.status?null:(0,a.jsx)(n.wpx,{title:"Deny","aria-label":"Deny",icon:(0,a.jsx)(n.PJP.x8P,{}),onClick:r.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-deny-btn",size:"small"}),s.status!==b.q2.REQUIRES_MANUAL_FINALIZATION?null:(0,a.jsx)(p.ZP,{scopes:[b.Sh.PRIVACY_REQUEST_REVIEW],children:(0,a.jsx)(n.wpx,{title:"Finalize","aria-label":"Finalize",icon:(0,a.jsx)(n.PJP.Ok8,{}),onClick:o.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-finalize-btn",size:"small"})}),(0,a.jsx)(p.ZP,{scopes:[b.Sh.PRIVACY_REQUEST_DELETE],children:(0,a.jsx)(n.wpx,{title:"Delete","aria-label":"Delete",icon:(0,a.jsx)(n.PJP.ZNm,{size:14}),onClick:d.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-delete-btn",size:"small"})})]}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(J.Z,{isOpen:l.isOpen,isLoading:h,onClose:l.onClose,onApproveRequest:c,subjectRequest:s})}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(H.Z,{isOpen:r.isOpen,onClose:r.onClose,onDenyRequest:u})}),(0,a.jsx)(Q.Z,{isOpen:d.isOpen,onClose:d.onClose,onConfirm:m,message:(0,a.jsx)(n.xvT,{children:"You are about to permanently delete the privacy request. Are you sure you would like to continue?"})}),(0,a.jsx)(Q.Z,{isOpen:o.isOpen,onClose:o.onClose,onConfirm:()=>{x(),o.onClose()},title:"Finalize privacy request",message:(0,a.jsxs)(n.xvT,{children:['You are about to finalize this privacy request. The status will be updated to "Complete"',j&&(null==y?void 0:y.service_type)?" and the requesting user will be notified":"",". Would you like to continue?"]})})]})};(i=l||(l={})).STATUS="status",i.DAYS_LEFT="due_date",i.SOURCE="source",i.REQUEST_TYPE="request_type",i.SUBJECT_IDENTITY="subject_identity",i.TIME_RECEIVED="created_at",i.CREATED_BY="created_by",i.REVIEWER="reviewer",i.ID="id",i.LOCATION="location",i.ACTIONS="actions";let es=(0,D.Cl)(),ei=()=>[es.accessor(e=>e.status,{id:"status",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(B,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Status",...e}),size:120}),es.accessor(e=>e.days_left,{id:"due_date",cell:e=>{let{row:t,getValue:s}=e;return(0,a.jsx)(V,{daysLeft:s(),timeframe:t.original.policy.execution_timeframe,status:t.original.status})},header:e=>(0,a.jsx)(L.Rr,{value:"Days left",...e}),size:80}),es.accessor(e=>e.source,{id:"source",cell:e=>e.getValue()?(0,a.jsx)(L.A4,{value:e.getValue()}):(0,a.jsx)(L.G3,{value:void 0}),header:e=>(0,a.jsx)(L.Rr,{value:"Source",...e}),enableSorting:!1}),es.accessor(e=>e.policy.rules,{id:"request_type",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(G,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Request type",...e}),enableSorting:!1,size:100}),es.accessor(e=>{var t,s;return(null===(t=e.identity)||void 0===t?void 0:t.email.value)||(null===(s=e.identity)||void 0===s?void 0:s.phone_number.value)||""},{id:"subject_identity",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Subject identity",...e}),enableSorting:!1}),es.accessor(e=>e.created_at,{id:"created_at",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:(0,_.p6)(t())})},header:e=>(0,a.jsx)(L.Rr,{value:"Time received",...e}),size:120}),es.accessor(e=>{var t;return(null===(t=e.reviewer)||void 0===t?void 0:t.username)||""},{id:"reviewer",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Reviewed by",...e}),enableSorting:!1}),es.accessor(e=>e.id,{id:"id",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Request ID",...e}),enableSorting:!1}),es.accessor(e=>e.location,{id:"location",cell:e=>{let{getValue:t}=e,s=t(),i=s?(0,n.QCN)(s):void 0,l=i?(0,n.c1K)({isoEntry:i,showFlag:!0}):s;return(0,a.jsx)(L.G3,{value:l})},header:e=>(0,a.jsx)(L.Rr,{value:"Location",...e}),enableSorting:!1}),es.display({id:"actions",cell:e=>{let{row:t}=e;return(0,a.jsx)(et,{subjectRequest:t.original})},header:e=>(0,a.jsx)(L.Rr,{value:"Actions",...e}),meta:{disableRowClick:!0}})],el=e=>{let t=(0,M.v9)(W.dp),s=(0,M.I0)();return{handleStatusChange:t=>{s((0,W.CI)(t)),e()},handleActionTypeChange:t=>{s((0,W.aM)(t)),e()},handleFromChange:t=>{s((0,W.su)(null==t?void 0:t.target.value)),e()},handleToChange:t=>{s((0,W.Ue)(null==t?void 0:t.target.value)),e()},handleClearAllFilters:()=>{s((0,W.Mk)()),e()},...t}};var ea=s(96718);let er=e=>{let{onClose:t,onFilterChange:s,...i}=e,{handleStatusChange:l,handleActionTypeChange:r,handleFromChange:d,handleToChange:o,handleClearAllFilters:c,from:u,to:p,status:m,action_type:x}=el(s);return(0,a.jsxs)(n.u_l,{onClose:t,size:"xl",...i,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsx)(n.xBx,{borderBottomWidth:1,borderBottomColor:"gray.200",children:"All Filters"}),(0,a.jsx)(n.olH,{}),(0,a.jsx)(n.fef,{py:4,sx:{"& label":{mb:0}},children:(0,a.jsxs)(n.Kqy,{gap:4,children:[(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",id:"request-date-range-label",children:"Date range"}),(0,a.jsxs)(n.Ugi,{gap:3,children:[(0,a.jsxs)(n.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(n.UiE,{as:"label",htmlFor:"from-date",borderRadius:"md",children:"From"}),(0,a.jsx)(n.IIB,{type:"date",name:"From",value:u,max:p||void 0,onChange:d,borderRadius:"md",id:"from-date","aria-describedby":"request-date-range-label"})]}),(0,a.jsxs)(n.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(n.UiE,{as:"label",htmlFor:"to-date",borderRadius:"md",children:"To"}),(0,a.jsx)(n.IIB,{type:"date",borderRadius:"md",name:"To",value:p,min:u||void 0,onChange:o,id:"to-date","aria-describedby":"request-date-range-label"})]})]})]}),(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",htmlFor:"request-status",children:"Status"}),(0,a.jsx)(ea.z,{id:"request-status",mode:"multiple",options:S.I3,value:m,onChange:l,"data-testid":"request-status-filter"})]}),(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",htmlFor:"request-action-type",children:"Request Type"}),(0,a.jsx)(ea.z,{id:"request-action-type",mode:"multiple",options:S.kN,value:x,onChange:r,"data-testid":"request-action-type-filter"})]})]})}),(0,a.jsxs)(n.mzw,{justifyContent:"space-between",children:[(0,a.jsx)(n.wpx,{type:"text",onClick:c,children:"Clear all"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:t,children:"Done"})]})]})]})};var en=s(9270),ed=s(812),eo=()=>{let e=(0,n.pmc)(),[t,{isFetching:s}]=(0,W.ZU)();return{downloadReport:async s=>{let i=await t(s);if(i.isError)e({status:"error",description:(0,ed.e$)(i.error,"A problem occurred while generating your privacy request report. Please try again.")});else{let t=document.createElement("a"),s=new Blob([i.data],{type:"text/csv"}),l=window.URL.createObjectURL(s);t.href=l,t.download="privacy-request-report.csv",t.click(),t.remove(),window.URL.revokeObjectURL(l),e({status:"success",description:"Successfully downloaded Privacy Request report."})}},isDownloadingReport:s}};let ec=e=>{let{...t}=e,[s,i]=(0,F.v1)("search",F.Oi.withDefault("").withOptions({throttleMs:100})),l=(0,M.v9)(W.dp),r=(0,n.pmc)(),d=(0,h.useRouter)(),o=(0,M.I0)(),u=(0,en.S)(),{pageIndex:p,pageSize:m,resetPagination:x}=u,{isOpen:v,onOpen:y,onClose:j}=(0,n.qY0)(),{data:g,isLoading:f,isFetching:_}=(0,W.QA)({...l,page:p,size:m,fuzzy_search_str:s}),{items:b,total:q}=(0,c.useMemo)(()=>g||{items:[],total:0,pages:0},[g]),{downloadReport:C}=eo(),S=(0,c.useCallback)(e=>{i(null!=e?e:""),x()},[x,i]),k=async()=>{let e;try{await C(l)}catch(t){e=t instanceof Error?t.message:"Unknown error occurred"}e&&r({description:"".concat(e),duration:5e3,status:"error"})},E=e=>{d.push("/privacy-requests/".concat(e))},R=(0,z.b7)({getCoreRowModel:(0,D.sC)(),data:b,columns:(0,c.useMemo)(()=>ei(),[]),getRowId:e=>"".concat(e.status,"-").concat(e.id),manualPagination:!0,columnResizeMode:"onChange"});return(0,a.jsxs)(n.xuv,{...t,children:[(0,a.jsxs)(L.Q$,{children:[(0,a.jsx)(L.HO,{globalFilter:s,setGlobalFilter:S,placeholder:"Search by request ID or identity value"}),(0,a.jsxs)(n.Ugi,{alignItems:"center",spacing:2,children:[(0,a.jsx)(n.wpx,{"data-testid":"filter-btn",onClick:y,children:"Filter"}),(0,a.jsx)(n.wpx,{"aria-label":"Export report","data-testid":"export-btn",icon:(0,a.jsx)(Z.nM,{ml:"1.5px"}),onClick:k})]}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(er,{isOpen:v,onClose:j,onFilterChange:x})})]}),f?(0,a.jsx)(n.xuv,{p:2,borderWidth:1,children:(0,a.jsx)(L.I4,{rowHeight:26,numRows:10})}):(0,a.jsxs)(n.jqI,{vertical:!0,gap:"middle",children:[(0,a.jsx)(L.ZK,{tableInstance:R,onRowClick:e=>E(e.id),onSort:e=>{if(!e){o((0,W.PS)());return}let{id:t,desc:s}=e;o((0,W.WR)(t)),o((0,W.iX)(s?"desc":"asc")),x()},loading:_}),(0,a.jsx)(n.B7X,{...u.paginationProps,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," items"),total:null!=q?q:0,align:"end"})]})]})};var eu=s(87361),ep=s(46628),em=s(32885),ex=s(34090),eh=s(55484),ev=s(40324);let ey=(e,t)=>null==t?void 0:t.find(t=>t.policy_key===e),ej=e=>{var t,s;if(!e)return eh.Ry().shape({policy_key:eh.Z_().required().label("Request type")});let i=e.custom_privacy_request_fields?Object.entries(e.custom_privacy_request_fields).filter(e=>{let[,t]=e;return"field_type"in t&&"location"!==t.field_type}).map(e=>{let[t,s]=e;return{[t]:eh.Ry().shape({value:s.required&&!s.hidden?eh.Z_().required().label(s.label):eh.Z_().nullable()})}}).reduce((e,t)=>({...e,...t}),{}):{};return eh.Ry().shape({policy_key:eh.Z_().required().label("Request type"),identity:eh.Ry().shape({email:(null===(t=e.identity_inputs)||void 0===t?void 0:t.email)==="required"?eh.Z_().email().required().label("Email address"):eh.Z_().nullable(),phone_number:(null===(s=e.identity_inputs)||void 0===s?void 0:s.phone)==="required"?eh.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").required().label("Phone number"):eh.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").nullable()}),custom_privacy_request_fields:eh.Ry().shape(i)})};var eg=s(97181);let ef={is_verified:!1,policy_key:"",identity:{}},e_=e=>{let{identityInputs:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[t.email?(0,a.jsx)(ev.j0,{name:"identity.email",label:"User email address",isRequired:"required"===t.email,variant:"stacked"}):null,t.phone?(0,a.jsx)(ev.j0,{name:"identity.phone_number",label:"User phone number",isRequired:"required"===t.phone,variant:"stacked"}):null]}):null},eb=e=>{var t;let{label:s,required:i,name:l}=e,[r,d,o]=(0,ex.U$)(e),c=!!(d.touched&&d.error),{setValue:u}=o,{value:p}={...r,value:null!==(t=r.value)&&void 0!==t?t:""};return(0,a.jsx)(n.PPS.Item,{label:s,name:l,required:null!=i?i:void 0,layout:"vertical",validateStatus:c?"error":void 0,children:(0,a.jsx)(n.AOh,{value:p,onChange:e=>{e&&u(e)}},l)})},eq=e=>{let{customFieldInputs:t}=e;if(!t)return null;let s=Object.entries(t);return(0,a.jsx)(a.Fragment,{children:s.map(e=>{let[t,s]=e;return"field_type"in s&&"location"===s.field_type?(0,a.jsx)(eb,{name:t,label:s.label,required:!!s.required},t):(0,a.jsx)(ev.j0,{name:"custom_privacy_request_fields.".concat(t,".value"),label:s.label,isRequired:!!s.required,variant:"stacked"},t)})})},eC=e=>{let{onSubmit:t,onCancel:s,privacyCenterUrl:i}=e,{onCopy:l}=(0,n.VPI)(""),r=(0,n.pmc)();return(0,a.jsx)(ex.J9,{initialValues:{identity:{email:""}},onSubmit:e=>{l("".concat(i,"?email=").concat(encodeURIComponent(e.identity.email))),t(e),r({status:"success",description:"DSR Link Copied!"})},validationSchema:()=>eh.Ry().shape({identity:eh.Ry().shape({email:eh.Z_().email().required().label("Email Address")})}),children:e=>{let{dirty:t,isValid:i}=e;return(0,a.jsx)(ex.l0,{children:(0,a.jsxs)(n.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(e_,{identityInputs:{email:"required"}}),(0,a.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,a.jsx)(n.wpx,{onClick:s,children:"Cancel"}),(0,a.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!t||!i,"data-testid":"submit-btn",icon:(0,a.jsx)(n.xPt,{}),children:"Copy"})]})]})})}})};var eS=e=>{let{onSubmit:t,onCancel:s}=e,{data:i}=(0,W.xv)();return(0,a.jsx)(ex.J9,{initialValues:ef,onSubmit:t,validationSchema:()=>(0,eh.Vo)(e=>ej(ey(e.policy_key,null==i?void 0:i.actions))),children:e=>{var t;let{values:l,dirty:r,isValid:d,isSubmitting:o,setFieldValue:c}=e,u=ey(l.policy_key,null==i?void 0:i.actions);return(0,a.jsx)(ex.l0,{children:(0,a.jsxs)(n.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(eg.d,{name:"policy_key",label:"Request type",options:null!==(t=null==i?void 0:i.actions.map(e=>({label:e.title,value:e.policy_key})))&&void 0!==t?t:[],onChange:e=>{let t=ey(e,null==i?void 0:i.actions);if(!(null==t?void 0:t.custom_privacy_request_fields)){c("custom_privacy_request_fields",void 0);return}c("custom_privacy_request_fields",Object.entries(t.custom_privacy_request_fields).map(e=>{let[t,s]=e;return{[t]:{label:s.label,value:s.default_value}}}).reduce((e,t)=>({...e,...t}),{}))},layout:"stacked",isRequired:!0}),(0,a.jsx)(e_,{identityInputs:null==u?void 0:u.identity_inputs}),(0,a.jsx)(eq,{customFieldInputs:null==u?void 0:u.custom_privacy_request_fields}),(0,a.jsx)(ev.Xl,{name:"is_verified",label:"I confirm that I have verified this user information"}),(0,a.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,a.jsx)(n.wpx,{onClick:s,children:"Cancel"}),(0,a.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!l.is_verified||!r||!d,loading:o,"data-testid":"submit-btn",children:"Create"})]})]})})}})},ek=s(31883);let eE=e=>{let{isOpen:t,onClose:s}=e,[i]=(0,W.M6)(),l=(0,n.pmc)(),r=async e=>{let{is_verified:t,...a}=e,r=a.custom_privacy_request_fields?Object.entries(a.custom_privacy_request_fields).map(e=>{let[t,s]=e;return s.value?{[t]:s}:{}}).reduce((e,t)=>({...e,...t}),{}):void 0,n={...a,custom_privacy_request_fields:r},d=await i([n]);(0,ek.D4)(d)?l((0,ep.Vo)((0,ed.e$)(d.error,"An error occurred while creating this privacy request. Please try again"))):l((0,ep.t5)("Privacy request created")),s()};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"2xl",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{"data-testid":"submit-request-modal",maxHeight:"80%",overflowY:"auto",children:[(0,a.jsx)(n.xBx,{children:"Create privacy request"}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)(n.Kqy,{spacing:4,children:[(0,a.jsx)(eu.Z,{title:"Warning: You are bypassing identity verification",text:"You are bypassing Fides' built-in identity verification step. Please ensure that you are only entering information on behalf of a verified and approved user's privacy request."}),(0,a.jsx)(eS,{onSubmit:r,onCancel:()=>s()})]})})]})]})},eR=e=>{let{isOpen:t,onClose:s,privacyCenterUrl:i}=e;return(0,a.jsxs)(n.u_l,{size:"md",isOpen:t,onClose:s,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsx)(n.xBx,{children:"Create a Privacy Request Link"}),(0,a.jsxs)(n.fef,{children:[(0,a.jsx)(n.Kqy,{spacing:4}),(0,a.jsx)(eC,{privacyCenterUrl:i,onSubmit:s,onCancel:s})]})]})]})};var ew=()=>{var e;let[t,s]=(0,c.useState)("closed"),i=()=>s("closed"),{data:l}=(0,em.Vh)(),r=(null!==(e=null==l?void 0:l.privacy_center_url)&&void 0!==e?e:"").trim(),d=r.length>0;return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsx)(eR,{isOpen:"create-link"===t,onClose:i,privacyCenterUrl:r}):null,(0,a.jsx)(eE,{isOpen:"submit-request"===t,onClose:i}),(0,a.jsx)(n.S0p.Button,{type:"primary",onClick:()=>s("submit-request"),"data-testid":"submit-request-btn",menu:{items:[{label:"Create request link",key:"create-request-link",icon:(0,a.jsx)(n.xPt,{}),onClick:()=>s("create-link"),disabled:!d}]},icon:(0,a.jsx)(n.v4q,{}),children:"Create request"})]})},eT=s(58754),eI=s(17245);let eA=()=>{let{errorAlert:e}=(0,eI.VY)(),[t,s]=(0,c.useState)(!1),[i,l]=(0,c.useState)({count:0,total:0}),[r,d]=(0,c.useState)(!0),o=b.q2.ERROR,{data:u}=(0,W.tE)(),{data:p}=(0,W.QA)({status:[o]},{pollingInterval:15e3,skip:r});return(0,c.useEffect)(()=>{d(!(u&&u.notify_after_failures>0))},[u]),(0,c.useEffect)(()=>{let e=(null==p?void 0:p.total)||0;e>=((null==u?void 0:u.notify_after_failures)||0)&&e>i.total?(l({count:e-i.total,total:e}),s(!0)):s(!1)},[null==p?void 0:p.total,null==u?void 0:u.notify_after_failures,i.total]),{processing:()=>{t&&e((0,a.jsxs)(n.xuv,{children:["DSR automation has failed for"," ",(0,a.jsx)(n.xvT,{as:"span",fontWeight:"semibold",children:i.count})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null,id:"dsrErrorAlert"})}}};var eN=s(72281);let eP=o()(()=>s.e(9676).then(s.bind(s,59676)),{loadableGenerated:{webpack:()=>[59676]},loading:()=>(0,a.jsx)("div",{children:"Loading..."})});var eO=()=>{let{processing:e}=eA(),{plus:t}=(0,u.hz)(),{activeTab:s,handleTabChange:i,availableTabs:l}=(0,eN.d)();(0,c.useEffect)(()=>{e()},[e]);let r=(0,c.useMemo)(()=>{let e=[];return l.request&&e.push({key:eN.G.REQUEST,label:"Request",children:(0,a.jsx)(ec,{})}),l.manualTask&&e.push({key:eN.G.MANUAL_TASK,label:"Manual tasks",children:(0,a.jsx)(U,{})}),e},[l.manualTask,l.request]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eT.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests"}],rightContent:(0,a.jsxs)(n.vyj,{children:[t&&(0,a.jsx)(p.ZP,{scopes:[b.Sh.PRIVACY_REQUEST_CREATE],children:(0,a.jsx)(ew,{})}),(0,a.jsx)(eP,{})]}),"data-testid":"privacy-requests"}),(0,a.jsx)(n.A5g,{activeKey:s,onChange:i,items:r})]})},eU=()=>(0,a.jsx)(r.Z,{title:"Privacy Requests",children:(0,a.jsx)(eO,{})})},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,[431,8765,3550,7245,8373,2888,9774,179],function(){return e(e.s=1565)}),_N_E=e.O()}]);