ethyca-fides 2.69.3b0__py2.py3-none-any.whl → 2.69.3b2__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 (332) hide show
  1. {ethyca_fides-2.69.3b0.dist-info → ethyca_fides-2.69.3b2.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.69.3b0.dist-info → ethyca_fides-2.69.3b2.dist-info}/RECORD +267 -239
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/30369bb8ae01_add_webmonitorgroupjob_model.py +67 -0
  5. fides/api/alembic/migrations/versions/5fa78b1f324d_add_event_audit_table.py +82 -0
  6. fides/api/alembic/migrations/versions/67d0e389b003_update_consentstatus_enum.py +47 -0
  7. fides/api/alembic/migrations/versions/b9bfa12c167b_add_not_applicable_to_asset_consentstatus.py +46 -0
  8. fides/api/alembic/migrations/versions/f36ce1bde293_add_system_groups.py +132 -0
  9. fides/api/alembic/migrations/versions/fd7571bef683_adds_new_fields_to_messagingconfig_for_.py +31 -0
  10. fides/api/api/v1/endpoints/messaging_endpoints.py +164 -34
  11. fides/api/api/v1/endpoints/system.py +140 -55
  12. fides/api/db/base.py +3 -0
  13. fides/api/db/seed.py +34 -0
  14. fides/api/main.py +2 -0
  15. fides/api/models/asset.py +3 -0
  16. fides/api/models/detection_discovery/web_monitor.py +61 -0
  17. fides/api/models/event_audit.py +68 -0
  18. fides/api/models/messaging.py +30 -10
  19. fides/api/models/sql_models.py +8 -0
  20. fides/api/models/system_group.py +85 -0
  21. fides/api/models/taxonomy.py +16 -4
  22. fides/api/schemas/application_config.py +4 -1
  23. fides/api/schemas/messaging/messaging.py +33 -66
  24. fides/api/schemas/messaging/messaging_secrets_docs_only.py +1 -1
  25. fides/api/schemas/messaging/shared_schemas.py +102 -0
  26. fides/api/schemas/saas/saas_config.py +2 -17
  27. fides/api/schemas/saas/strategy_configuration.py +12 -0
  28. fides/api/schemas/system.py +8 -0
  29. fides/api/service/async_dsr/async_dsr_service.py +130 -10
  30. fides/api/service/async_dsr/async_dsr_strategy.py +5 -0
  31. fides/api/service/async_dsr/async_dsr_strategy_callback.py +16 -0
  32. fides/api/service/async_dsr/async_dsr_strategy_factory.py +63 -0
  33. fides/api/service/async_dsr/async_dsr_strategy_polling.py +94 -0
  34. fides/api/service/connectors/saas_connector.py +25 -7
  35. fides/api/service/deps.py +17 -2
  36. fides/api/service/messaging/message_dispatch_service.py +16 -15
  37. fides/api/service/messaging/messaging_crud_service.py +5 -9
  38. fides/api/service/privacy_request/request_runner_service.py +18 -0
  39. fides/api/service/privacy_request/request_service.py +29 -20
  40. fides/api/service/strategy.py +6 -3
  41. fides/api/task/graph_task.py +1 -2
  42. fides/api/tasks/__init__.py +1 -0
  43. fides/api/util/filter_utils.py +0 -3
  44. fides/api/worker/__init__.py +2 -0
  45. fides/common/api/v1/urn_registry.py +2 -1
  46. fides/service/event_audit_service.py +115 -0
  47. fides/service/messaging/aws_ses_service.py +2 -4
  48. fides/service/system/__init__.py +0 -0
  49. fides/service/system/system_service.py +138 -0
  50. fides/service/taxonomy/taxonomy_service.py +49 -3
  51. fides/ui-build/static/admin/404.html +1 -1
  52. fides/ui-build/static/admin/_next/static/86A8z6OnbTuDYww0DJkX0/_buildManifest.js +1 -0
  53. fides/ui-build/static/admin/_next/static/chunks/1115-d5a834cdaa717edc.js +1 -0
  54. fides/ui-build/static/admin/_next/static/chunks/155-b5e4370b158e5ee3.js +1 -0
  55. fides/ui-build/static/admin/_next/static/chunks/1817-dc2bba3ca736d39e.js +1 -0
  56. fides/ui-build/static/admin/_next/static/chunks/1841-2052c3239f2a0a1a.js +1 -0
  57. fides/ui-build/static/admin/_next/static/chunks/1896-49010da5c2705fc5.js +1 -0
  58. fides/ui-build/static/admin/_next/static/chunks/2040-3f9c66c56a05b336.js +1 -0
  59. fides/ui-build/static/admin/_next/static/chunks/2751-58285ccf50a0ba4b.js +1 -0
  60. fides/ui-build/static/admin/_next/static/chunks/3377-c5e0cc3de1a5ffd1.js +1 -0
  61. fides/ui-build/static/admin/_next/static/chunks/3696-fff4f944d7d5ff20.js +1 -0
  62. fides/ui-build/static/admin/_next/static/chunks/{3855-ef5194cdb228beb6.js → 3855-8377b3fcbb3d93b0.js} +1 -1
  63. fides/ui-build/static/admin/_next/static/chunks/3872-4786ccbe7c6f65b0.js +1 -0
  64. fides/ui-build/static/admin/_next/static/chunks/409-e1deab19fc7e6d99.js +1 -0
  65. fides/ui-build/static/admin/_next/static/chunks/4230-c55d5531697a715c.js +1 -0
  66. fides/ui-build/static/admin/_next/static/chunks/4608-2fbc3389681f6924.js +1 -0
  67. fides/ui-build/static/admin/_next/static/chunks/4786-8d78ec773d171562.js +1 -0
  68. fides/ui-build/static/admin/_next/static/chunks/5185-a219b390ef17ff4b.js +1 -0
  69. fides/ui-build/static/admin/_next/static/chunks/5309-e994c5195f99b1eb.js +1 -0
  70. fides/ui-build/static/admin/_next/static/chunks/5783-c62c79e7be21be73.js +1 -0
  71. fides/ui-build/static/admin/_next/static/chunks/6084-29cbe703bffdccfe.js +1 -0
  72. fides/ui-build/static/admin/_next/static/chunks/6416-79eee298a5b3f80f.js +1 -0
  73. fides/ui-build/static/admin/_next/static/chunks/6780-eeb7775eb21d7a12.js +1 -0
  74. fides/ui-build/static/admin/_next/static/chunks/{6853-b17673391117c976.js → 6853-91a8641cd2784b54.js} +1 -1
  75. fides/ui-build/static/admin/_next/static/chunks/6882-55dbb142f7c40f53.js +1 -0
  76. fides/ui-build/static/admin/_next/static/chunks/6954-6dfafd38b02d5852.js +1 -0
  77. fides/ui-build/static/admin/_next/static/chunks/7476-3da7a490debad8e2.js +1 -0
  78. fides/ui-build/static/admin/_next/static/chunks/7630-22f9c4b25d6aed29.js +1 -0
  79. fides/ui-build/static/admin/_next/static/chunks/7725-b2fa93d747d3d85d.js +1 -0
  80. fides/ui-build/static/admin/_next/static/chunks/7929-4314e317b1717257.js +1 -0
  81. fides/ui-build/static/admin/_next/static/chunks/796-8e4da90ae82dfebb.js +1 -0
  82. fides/ui-build/static/admin/_next/static/chunks/8002-78d78545309b2c1c.js +1 -0
  83. fides/ui-build/static/admin/_next/static/chunks/8373-bd50fa53cbcab2aa.js +1 -0
  84. fides/ui-build/static/admin/_next/static/chunks/9037-453224ba3ee65b13.js +1 -0
  85. fides/ui-build/static/admin/_next/static/chunks/9046-0f92802b0e3382a9.js +1 -0
  86. fides/ui-build/static/admin/_next/static/chunks/9226-49dbcdb135bf9793.js +1 -0
  87. fides/ui-build/static/admin/_next/static/chunks/9826-f316eb1d61cb90b6.js +1 -0
  88. fides/ui-build/static/admin/_next/static/chunks/{9951-a88367a129b724ba.js → 9951-c389c51ca6353035.js} +1 -1
  89. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-fcdad91f6f66292b.js → _app-c780470042750062.js} +10 -10
  90. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-ace203dfacacbdc4.js → manual-fb9434d926ebf0b3.js} +1 -1
  91. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-92034daafd2187a0.js +1 -0
  92. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-87919c1192e68b1a.js +1 -0
  93. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-9dda4de5ec580279.js → privacy-experience-ae8a64fffe3f8c66.js} +1 -1
  94. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-d7d9ff9ed28fa790.js +1 -0
  95. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-226efa1dcd41437f.js → properties-c985ea8c1a0e0550.js} +1 -1
  96. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-28b192e2c074b0f3.js → reporting-ddf6ba92355f81de.js} +1 -1
  97. fides/ui-build/static/admin/_next/static/chunks/pages/consent-35c0ae9d5b5a940c.js +1 -0
  98. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-2c29ff7a01198f30.js → [resourceUrn]-6a196c704f1c6dd7.js} +1 -1
  99. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-06ba907e7d91a724.js +1 -0
  100. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-8eb581024bc0172f.js → [resourceUrn]-9cee4e222ebb2b60.js} +1 -1
  101. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-f99af5669b9ab44c.js +1 -0
  102. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-db7f1a269d3e7fc2.js +1 -0
  103. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-de957913f9b47daa.js +1 -0
  104. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-5868591ff1e5f881.js +1 -0
  105. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-715064e1c9788e1a.js +1 -0
  106. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-8f736b078e9842da.js → [resourceUrn]-9ae81f5c245b8a01.js} +1 -1
  107. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-eb814e3c22807871.js → detection-6537c93c69b597c7.js} +1 -1
  108. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-6875b7783fcfda2f.js → [resourceUrn]-5db26067d921a94a.js} +1 -1
  109. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-172dbd7740e212ca.js → discovery-9f6a62614d7eb113.js} +1 -1
  110. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-aed0e6dafc143b97.js +1 -0
  111. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-72b9878ea9b91529.js +1 -0
  112. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-f36a46381a6c25d4.js +1 -0
  113. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-b653fd60e7db989b.js +1 -0
  114. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-5bb96c8684a38bbf.js +1 -0
  115. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-639046f6c76bc8bd.js +1 -0
  116. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-927b7e476c4b47d0.js → [id]-6bf117315d909ad1.js} +1 -1
  117. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-cbe100d50df34285.js → new-1e2fa11f22dbc449.js} +1 -1
  118. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-c55e3e0e19030f3f.js +1 -0
  119. fides/ui-build/static/admin/_next/static/chunks/pages/index-d66ea87b457af21e.js +1 -0
  120. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-0159fbb2e0440709.js +1 -0
  121. fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-95402b5001c07ef2.js → integrations-267d2742fffaebe5.js} +1 -1
  122. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-670b05b03ba11e0a.js +1 -0
  123. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-482a7256925a6e06.js +1 -0
  124. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-331147598052f25c.js +1 -0
  125. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-28083bfb2dec7b9f.js +1 -0
  126. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-e784c05d056b2371.js → [id]-e02dc4b4b385c86f.js} +1 -1
  127. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-0a7a2db148a7561a.js → add-property-74c2a0ff4c992633.js} +1 -1
  128. fides/ui-build/static/admin/_next/static/chunks/pages/{properties-da734840e4f9d04b.js → properties-7459d56e548925b2.js} +1 -1
  129. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-6903f42a0412bfa6.js → datamap-aed018025b09c045.js} +1 -1
  130. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/alpha-68eaac2d79133679.js +1 -0
  131. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about-6c4904c157477285.js +1 -0
  132. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-9495e2eb506606c7.js → [purpose_id]-7f2c50044806c094.js} +1 -1
  133. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-e8cab942d09aa358.js +1 -0
  134. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-128f952a49a0e8dc.js +1 -0
  135. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-cca3d1a26e1269bb.js +1 -0
  136. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-07e1b9937a169e32.js +1 -0
  137. fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-3bc799dac8423f50.js +1 -0
  138. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-2e635dcd11b78224.js → locations-9f36b6c213ae524c.js} +1 -1
  139. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/[key]-f8887b2b29aed1b9.js +1 -0
  140. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/new-5473558807e94462.js +1 -0
  141. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers-1065fbefd449719c.js +1 -0
  142. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-3e23d92d789fff99.js +1 -0
  143. fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-907bfbb71d84646f.js +1 -0
  144. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-aa1ada4d4ac09759.js +1 -0
  145. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-6e15332935f6b538.js → [id]-02b0dde03a1ad159.js} +1 -1
  146. fides/ui-build/static/admin/_next/static/chunks/pages/systems-4a6ef2509e8cedfc.js +1 -0
  147. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-16b122b83e57bb8c.js +1 -0
  148. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-92f52c43f522a350.js → new-6304dad2c5fab694.js} +1 -1
  149. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-64452dfae2c5e614.js → [id]-0a8ec3aa2ed59a33.js} +1 -1
  150. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-9cec020f89544426.js → user-management-4036b023366b7eec.js} +1 -1
  151. fides/ui-build/static/admin/_next/static/css/018c12b58ee7f861.css +1 -0
  152. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  153. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  154. fides/ui-build/static/admin/add-systems.html +1 -1
  155. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  156. fides/ui-build/static/admin/consent/configure.html +1 -1
  157. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  158. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  159. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  160. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  161. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  162. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  163. fides/ui-build/static/admin/consent/properties.html +1 -1
  164. fides/ui-build/static/admin/consent/reporting.html +1 -1
  165. fides/ui-build/static/admin/consent.html +1 -1
  166. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  167. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  168. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  169. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  170. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  171. fides/ui-build/static/admin/data-catalog.html +1 -1
  172. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  173. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  174. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  175. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  176. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  177. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  178. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  179. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  180. fides/ui-build/static/admin/datamap.html +1 -1
  181. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  182. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  183. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  184. fides/ui-build/static/admin/dataset/new.html +1 -1
  185. fides/ui-build/static/admin/dataset.html +1 -1
  186. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  187. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  188. fides/ui-build/static/admin/datastore-connection.html +1 -1
  189. fides/ui-build/static/admin/index.html +1 -1
  190. fides/ui-build/static/admin/integrations/[id].html +1 -1
  191. fides/ui-build/static/admin/integrations.html +1 -1
  192. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  193. fides/ui-build/static/admin/lib/fides-headless.js +1 -1
  194. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  195. fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
  196. fides/ui-build/static/admin/lib/fides.js +2 -2
  197. fides/ui-build/static/admin/login/[provider].html +1 -1
  198. fides/ui-build/static/admin/login.html +1 -1
  199. fides/ui-build/static/admin/messaging/[id].html +1 -1
  200. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  201. fides/ui-build/static/admin/messaging.html +1 -1
  202. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  203. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  204. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  205. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  206. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  207. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  208. fides/ui-build/static/admin/poc/forms.html +1 -1
  209. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  210. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  211. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  212. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  213. fides/ui-build/static/admin/privacy-requests.html +1 -1
  214. fides/ui-build/static/admin/properties/[id].html +1 -1
  215. fides/ui-build/static/admin/properties/add-property.html +1 -1
  216. fides/ui-build/static/admin/properties.html +1 -1
  217. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  218. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  219. fides/ui-build/static/admin/settings/about.html +1 -1
  220. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  221. fides/ui-build/static/admin/settings/consent.html +1 -1
  222. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  223. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  224. fides/ui-build/static/admin/settings/domains.html +1 -1
  225. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  226. fides/ui-build/static/admin/settings/locations.html +1 -1
  227. fides/ui-build/static/admin/settings/messaging-providers/[key].html +1 -0
  228. fides/ui-build/static/admin/settings/messaging-providers/new.html +1 -0
  229. fides/ui-build/static/admin/settings/messaging-providers.html +1 -0
  230. fides/ui-build/static/admin/settings/organization.html +1 -1
  231. fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
  232. fides/ui-build/static/admin/settings/regulations.html +1 -1
  233. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  234. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  235. fides/ui-build/static/admin/systems.html +1 -1
  236. fides/ui-build/static/admin/taxonomy.html +1 -1
  237. fides/ui-build/static/admin/user-management/new.html +1 -1
  238. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  239. fides/ui-build/static/admin/user-management.html +1 -1
  240. fides/ui-build/static/admin/_next/static/FFd0ddRZhjxA7iBCrjLzA/_buildManifest.js +0 -1
  241. fides/ui-build/static/admin/_next/static/chunks/1099-79646e64f26d62fa.js +0 -1
  242. fides/ui-build/static/admin/_next/static/chunks/1345-5e1c5b66e25c566e.js +0 -1
  243. fides/ui-build/static/admin/_next/static/chunks/1817-0ca16d288fad916d.js +0 -1
  244. fides/ui-build/static/admin/_next/static/chunks/3620-602eb74dc896d556.js +0 -1
  245. fides/ui-build/static/admin/_next/static/chunks/3729-c17ac8031a4c4fd1.js +0 -1
  246. fides/ui-build/static/admin/_next/static/chunks/3847-f08c58d074858f48.js +0 -1
  247. fides/ui-build/static/admin/_next/static/chunks/3872-f78dec02f0d959ae.js +0 -1
  248. fides/ui-build/static/admin/_next/static/chunks/4164-355644b916ae0094.js +0 -1
  249. fides/ui-build/static/admin/_next/static/chunks/4608-be8cba73f5d7c326.js +0 -1
  250. fides/ui-build/static/admin/_next/static/chunks/4786-61154adf88e448e1.js +0 -1
  251. fides/ui-build/static/admin/_next/static/chunks/4808-dd4157aa72648068.js +0 -1
  252. fides/ui-build/static/admin/_next/static/chunks/4831-fd99c0b3784de128.js +0 -1
  253. fides/ui-build/static/admin/_next/static/chunks/4844-46324c3d848b8b6a.js +0 -1
  254. fides/ui-build/static/admin/_next/static/chunks/5258-e880b606a2293803.js +0 -1
  255. fides/ui-build/static/admin/_next/static/chunks/5487-02d00bad7c6830e0.js +0 -1
  256. fides/ui-build/static/admin/_next/static/chunks/549-38ea1d91ee2addaa.js +0 -1
  257. fides/ui-build/static/admin/_next/static/chunks/6084-c153669d5567e242.js +0 -1
  258. fides/ui-build/static/admin/_next/static/chunks/6954-5296188c19d7d0ac.js +0 -1
  259. fides/ui-build/static/admin/_next/static/chunks/7476-45c5088baa8b66af.js +0 -1
  260. fides/ui-build/static/admin/_next/static/chunks/7630-7ed6c6117775dffe.js +0 -1
  261. fides/ui-build/static/admin/_next/static/chunks/787-a8c7eab617e2fceb.js +0 -1
  262. fides/ui-build/static/admin/_next/static/chunks/79-65674011d455af4d.js +0 -1
  263. fides/ui-build/static/admin/_next/static/chunks/796-9e1ca1a4030707c5.js +0 -1
  264. fides/ui-build/static/admin/_next/static/chunks/8002-24af20d679efc04e.js +0 -1
  265. fides/ui-build/static/admin/_next/static/chunks/9046-712156d461165f56.js +0 -1
  266. fides/ui-build/static/admin/_next/static/chunks/9826-dbae8dee941a7fac.js +0 -1
  267. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-bd0d82078e67cac3.js +0 -1
  268. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-7207ab23bdb36ce8.js +0 -1
  269. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-94c13aad1499eea9.js +0 -1
  270. fides/ui-build/static/admin/_next/static/chunks/pages/consent-3e8bdefe714254ec.js +0 -1
  271. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-5f2d7b24804f861f.js +0 -1
  272. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-30108b00ac769fc3.js +0 -1
  273. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-3b0bcb9e98fab95c.js +0 -1
  274. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-9403d5b239e318d2.js +0 -1
  275. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-9a81d42a474e1e48.js +0 -1
  276. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-b6ae7adb8ef0b525.js +0 -1
  277. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-c7390e046b2e2b7f.js +0 -1
  278. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-dfd71c1e9c458b89.js +0 -1
  279. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-7cdc42ec5493b83d.js +0 -1
  280. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-e12b11ba15bc3fc1.js +0 -1
  281. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-e32fccc4ca520d2b.js +0 -1
  282. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-7c59a6abf6ba6207.js +0 -1
  283. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-cce20440b177050b.js +0 -1
  284. fides/ui-build/static/admin/_next/static/chunks/pages/index-6cd8708106331b8d.js +0 -1
  285. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-5d40db1ce8810e1d.js +0 -1
  286. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-0f25a76dd18c5e20.js +0 -1
  287. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-ad6ad3e5bd72765d.js +0 -1
  288. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-6032d82f0fc2893d.js +0 -1
  289. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-d83e5bd52a638234.js +0 -1
  290. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-baf31c3e4b081046.js +0 -1
  291. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/alpha-a82f3df840d5c1b5.js +0 -1
  292. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about-d06fb16487705b9d.js +0 -1
  293. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-93a978443bf299db.js +0 -1
  294. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-9ecb803099082bf4.js +0 -1
  295. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-16fdd91a81074dd1.js +0 -1
  296. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-4cdd6001e7cb9aee.js +0 -1
  297. fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-1914de830ce5cfc4.js +0 -1
  298. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-f547f1f33c12faf3.js +0 -1
  299. fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-2ecc073f41628f62.js +0 -1
  300. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-20b1193ed76c56b0.js +0 -1
  301. fides/ui-build/static/admin/_next/static/chunks/pages/systems-fbc8761ef4d55516.js +0 -1
  302. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-4d7827fc9c46b6b8.js +0 -1
  303. fides/ui-build/static/admin/_next/static/css/650df9c348000a26.css +0 -1
  304. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +0 -1
  305. {ethyca_fides-2.69.3b0.dist-info → ethyca_fides-2.69.3b2.dist-info}/WHEEL +0 -0
  306. {ethyca_fides-2.69.3b0.dist-info → ethyca_fides-2.69.3b2.dist-info}/entry_points.txt +0 -0
  307. {ethyca_fides-2.69.3b0.dist-info → ethyca_fides-2.69.3b2.dist-info}/licenses/LICENSE +0 -0
  308. {ethyca_fides-2.69.3b0.dist-info → ethyca_fides-2.69.3b2.dist-info}/top_level.txt +0 -0
  309. /fides/ui-build/static/admin/_next/static/{FFd0ddRZhjxA7iBCrjLzA → 86A8z6OnbTuDYww0DJkX0}/_ssgManifest.js +0 -0
  310. /fides/ui-build/static/admin/_next/static/chunks/{2921-52328140bc420d0f.js → 2921-cdc7a13973f4a0ba.js} +0 -0
  311. /fides/ui-build/static/admin/_next/static/chunks/{3923-bb2417b8dcade7a4.js → 3923-db57401384d1de8f.js} +0 -0
  312. /fides/ui-build/static/admin/_next/static/chunks/{401-4af0a912e249d30f.js → 401-4e56e924f35317f2.js} +0 -0
  313. /fides/ui-build/static/admin/_next/static/chunks/pages/{404-471a6b18e712f050.js → 404-e4a1f93a7ce944f0.js} +0 -0
  314. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-920fb469e0dda1d2.js → multiple-a4f821c4902f2df8.js} +0 -0
  315. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-406170eaae4329c6.js → add-vendors-96245b63aafc5168.js} +0 -0
  316. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-f80cf2d3966816fd.js → [id]-4fea66e59bd59de8.js} +0 -0
  317. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-b378576cba255609.js → [id]-c8038e05f35da8d1.js} +0 -0
  318. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-2ca1de7b88094ab0.js → new-f3a40101a8f3fd00.js} +0 -0
  319. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-04cfe2cfba7b7cd8.js → [projectUrn]-965af6c1fd01334e.js} +0 -0
  320. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-de704de849960f01.js → resources-5afecf141308bfc5.js} +0 -0
  321. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-3c6dc2f6e6bae960.js → [id]-4352e55f110556b4.js} +0 -0
  322. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-4a6d4023a7791be8.js → add-template-c533120e94e049e3.js} +0 -0
  323. /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-76b204c9b98d656f.js → messaging-b14f5f38b2d711a8.js} +0 -0
  324. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-bc0e2adf6e0d3ac7.js → ant-components-31d51e3b9227c8d5.js} +0 -0
  325. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-86ffcc1ad3fa912e.js → AntForm-8794a0d2e7554a05.js} +0 -0
  326. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-ec04f595465bdf69.js → FormikAntFormItem-90b31073e478c99c.js} +0 -0
  327. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-41d309754ff0c1de.js → FormikControlled-0a6859a0225b7e00.js} +0 -0
  328. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-cab1f78cec7808f9.js → FormikField-eb0552917907fe21.js} +0 -0
  329. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-eb6058221403b156.js → forms-b2a2a084d8cfe22d.js} +0 -0
  330. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-48500551fd6a7602.js → table-migration-0c944cfa9c6acbff.js} +0 -0
  331. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-7c02e469d8c5bd74.js → regulations-f0f0ea35d0185ae3.js} +0 -0
  332. /fides/ui-build/static/admin/_next/static/chunks/{webpack-678e89d68dbcd94f.js → webpack-55e1c55932df2413.js} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4966],{18193:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/email-templates",function(){return i(43104)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var n=i(24246),s=i(96306),a=i(88038),r=i.n(a),o=i(86677);i(27378);var l=i(25980),g=i(90867),u=i(42478),d=i(77830),c=()=>{let e=(0,o.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(d.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."," "]})]})})},m=e=>{let{children:t,title:i,padded:a=!0,mainProps:d}=e,m=(0,l.hz)(),p=(0,o.useRouter)(),f="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(m.flags.messagingConfiguration&&f),{data:y}=(0,u.JE)(void 0,{skip:h}),{data:x}=(0,g.PW)(void 0,{skip:h}),j=m.flags.messagingConfiguration&&(!y||!x)&&f;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(r(),{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:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[j?(0,n.jsx)(c,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(96306),a=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:r=!0,children:o,rightContent:l,style:g,...u}=e;return(0,n.jsxs)("div",{...u,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",...g}:{paddingBottom:"24px",...g},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.lQT,{className:i||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,l&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!i&&(0,n.jsx)(a.m,{className:o?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),o]})}},10342:function(e,t,i){"use strict";var n=i(24246),s=i(96306),a=i(46238);t.Z=e=>{let{title:t,tooltip:i,children:r,...o}=e;return(0,n.jsxs)(s.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...o,children:[(0,n.jsxs)(s.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[t,i?(0,n.jsx)(s.xvT,{as:"span",mx:1,children:(0,n.jsx)(a.b,{label:i})}):void 0]}),(0,n.jsx)(s.Kqy,{p:6,spacing:6,children:r})]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return g}});var n=i(24246),s=i(96306),a=i(79894),r=i.n(a),o=i(27378);let{Text:l}=s.AntTypography,g=e=>{let{items:t,...i}=e,a=(0,o.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let a=i===t.length-1,o={...e},g=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,id:a?"breadcrumb-current-page":void 0,children:o.title})),g)?o.title=(0,n.jsx)(s.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,n.jsx)(r(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,n.jsx)(s.zrq,{items:a,...i})}},47466:function(e,t,i){"use strict";i.d(t,{KC:function(){return r},ew:function(){return o},gQ:function(){return a},jM:function(){return n},lE:function(){return s}});let{useGetMessagingTemplatesQuery:n,useUpdateMessagingTemplatesMutation:s,useGetMessagingTemplateByIdQuery:a,useGetMessagingTemplateDefaultQuery:r,useDeleteMessagingTemplateByIdMutation:o}=i(78780).u.injectEndpoints({endpoints:e=>({getMessagingTemplates:e.query({query:()=>({url:"messaging/templates"}),providesTags:()=>["Messaging Templates"]}),updateMessagingTemplates:e.mutation({query:e=>({url:"messaging/templates",method:"PUT",body:e}),invalidatesTags:()=>["Messaging Templates"]}),getMessagingTemplateById:e.query({query:e=>({url:"/messaging/templates/".concat(e)}),providesTags:()=>["Property-Specific Messaging Templates"]}),getMessagingTemplateDefault:e.query({query:e=>({url:"/messaging/templates/default/".concat(e)})}),deleteMessagingTemplateById:e.mutation({query:e=>({url:"/messaging/templates/".concat(e),method:"DELETE"}),invalidatesTags:()=>["Property-Specific Messaging Templates"]})})})},42478:function(e,t,i){"use strict";i.d(t,{FU:function(){return g},JE:function(){return s},Ki:function(){return d},SU:function(){return c},W:function(){return m},h9:function(){return a},jc:function(){return n},qt:function(){return l},sn:function(){return u}});let{useGetEmailInviteStatusQuery:n,useGetActiveMessagingProviderQuery:s,useCreateMessagingConfigurationMutation:a,useCreateMessagingConfigurationSecretsMutation:r,useGetMessagingConfigurationDetailsQuery:o,useGetMessagingConfigurationsQuery:l,useGetMessagingConfigurationByKeyQuery:g,useUpdateMessagingConfigurationByKeyMutation:u,useUpdateMessagingConfigurationSecretsByKeyMutation:d,useCreateTestConnectionMessageMutation:c,useDeleteMessagingConfigurationByKeyMutation:m}=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,n)=>{let s=await n({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"]})})})},43104:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return p}});var n=i(24246),s=i(96306),a=i(77213),r=i(58754),o=i(34090),l=i(10342),g=i(40324),u=i(812),d=i(46628),c=i(47466),m=e=>{let{emailTemplates:t}=e,[i,{isLoading:a}]=(0,c.lE)(),r=(0,s.pmc)(),m=async(e,t)=>{let n=Object.entries(e).map(e=>{let[t,{content:i}]=e;return{type:t,content:i}});(i=>{if((0,u.D4)(i)){let e=(0,u.e$)(i.error,"An unexpected error occurred while editing the email templates. Please try again.");r((0,d.Vo)(e))}else r((0,d.t5)("Email templates saved.")),t.resetForm({values:e})})(await i(n))},p=t.reduce((e,t)=>({...e,[t.type]:{label:t.label,content:t.content}}),{});return(0,n.jsx)(o.J9,{enableReinitialize:!0,initialValues:p,onSubmit:m,children:()=>(0,n.jsxs)(o.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[Object.entries(p).map(e=>{let[t,i]=e;return(0,n.jsx)(s.xuv,{py:3,children:(0,n.jsxs)(l.Z,{title:i.label,children:[(0,n.jsx)(g.j0,{label:"Message subject",name:"".concat(t,".content.subject"),variant:"stacked"}),(0,n.jsx)(g.Ks,{label:"Message body",name:"".concat(t,".content.body"),variant:"stacked",resize:!0})]})},t)}),(0,n.jsx)(s.kCb,{justifyContent:"right",width:"100%",paddingTop:2,children:(0,n.jsx)(s.wpx,{htmlType:"submit",type:"primary",loading:a,children:"Save"})})]})})},p=()=>{let{data:e,isLoading:t}=(0,c.jM)();return t?(0,n.jsx)(a.Z,{title:"Email templates",children:(0,n.jsx)(s.$jN,{})}):(0,n.jsx)(a.Z,{title:"Email templates",children:(0,n.jsxs)(s.xuv,{"data-testid":"email-templates",children:[(0,n.jsx)(r.Z,{heading:"Email Templates"}),(0,n.jsxs)(s.xuv,{maxWidth:"720px",children:[(0,n.jsx)(s.xvT,{fontSize:"sm",children:"When privacy requests are submitted, Fides emails the data subject to confirm their identity and keep them updated on the status of the request. The templates below allow you to configure the subject and body of the email to suit your business needs. To change the appearance of the email, you may use the editors within your messaging provider (e.g. Mailgun, SendGrid, Twilio)."}),(0,n.jsx)(s.xuv,{padding:2,children:(0,n.jsx)(m,{emailTemplates:e})})]})]})})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=18193)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2462],{40135:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/locations",function(){return n(36956)}])},36956:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Z}});var i=n(24246),l=n(96306),s=n(16134),o=n(77213),a=n(58754),r=n(98784),d=n.n(r),c=n(86677),u=n(27378),h=n(812),g=n(58452),m=n(26917),x=n(46628),p=n(54682),j=n(31883),f=n(77830),v=n(26089),C=n(61524),y=n(46238),w=e=>{let{id:t,isChecked:n,onChange:s}=e;return(0,i.jsxs)(l.kCb,{alignItems:"center",gap:"8px",children:[(0,i.jsx)(l.rAg,{checked:n,size:"small",onChange:s,id:t,"data-testid":"regulated-toggle"}),(0,i.jsx)(l.lXp,{fontSize:"sm",m:0,htmlFor:t,children:"Regulated"}),(0,i.jsx)(y.b,{label:"Toggle on to see only locations in this region with privacy regulations supported by Fides"})]})},b=n(67991),k=n(12282),S=n(85759),_=e=>{let{groups:t,locations:n,isOpen:s,onClose:o,selected:a,onChange:r}=e,[d,c]=(0,u.useState)(a),[h,g]=(0,u.useState)(!1),{filteredLocations:m,locationsByGroup:x}=(0,u.useMemo)(()=>{let e=h?n.filter(e=>{var t;return null===(t=e.regulation)||void 0===t?void 0:t.length}):n;return{locationsByGroup:(0,S.VT)(e),filteredLocations:e}},[n,h]),{allSelected:p,handleToggleAll:j,handleToggleSelection:f}=(0,b.QZ)({items:m,selected:d,onChange:c}),v=d.filter(e=>!Object.keys(x).includes(e)).length,C=n[0].continent,y=Object.keys(x),_=!(1===y.length&&"Other"===y[0]);return(0,i.jsxs)(l.u_l,{size:"2xl",isOpen:s,onClose:o,isCentered:!0,children:[(0,i.jsx)(l.ZAr,{}),(0,i.jsxs)(l.hzk,{"data-testid":"subgroup-modal",children:[(0,i.jsx)(k.h4,{title:"Select locations"}),(0,i.jsxs)(l.fef,{p:6,maxHeight:"70vh",overflowY:"auto",children:[(0,i.jsx)(k.x$,{title:C,allSelected:p,onToggleAll:j,numSelected:v,children:(0,i.jsx)(w,{id:"".concat(C,"-modal-regulated"),isChecked:h,onChange:()=>g(!h)})}),_?(0,i.jsx)(l.UQy,{allowToggle:!0,allowMultiple:!0,children:Object.entries(x).map(e=>{let[n,s]=e,o=t.find(e=>n===e.id),a=o?o.name:n;return(0,i.jsxs)(l.Qdk,{"data-testid":"".concat(a,"-accordion"),children:[(0,i.jsx)("h2",{children:(0,i.jsxs)(l.KFZ,{children:[(0,i.jsx)(l.xuv,{as:"span",flex:"1",textAlign:"left",fontWeight:"semibold",fontSize:"sm",children:a}),(0,i.jsx)(l.XEm,{})]})}),(0,i.jsx)(l.Hk3,{pb:4,children:(0,i.jsx)(l.MIq,{columns:3,spacing:6,children:s.map(e=>(0,i.jsx)(l.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:d.includes(e.id),onChange:()=>f(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})})]},n)})}):(0,i.jsx)(l.MIq,{columns:3,spacing:6,paddingInline:4,children:m.map(e=>(0,i.jsx)(l.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:d.includes(e.id),onChange:()=>f(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})]}),(0,i.jsx)(k.$_,{onApply:()=>{let e=new Set(d);Object.entries(x).forEach(t=>{let[n,i]=t;i.every(e=>d.includes(e.id))?e.add(n):e.delete(n)}),r(Array.from(e)),o()},onClose:o})]})]})};let O=(e,t)=>{var n;return null===(n=e.name)||void 0===n?void 0:n.toLocaleLowerCase().includes(t.toLocaleLowerCase())};var E=e=>{let{title:t,groups:n,locations:s,selected:o,onChange:a,search:r}=e,d=(0,l.qY0)(),[c,h]=(0,u.useState)(!1),g=!!(null==r?void 0:r.length),m=n.length>0,x=s;n.length&&(x=n),g&&(x=[...s,...n].sort((e,t)=>e.name.localeCompare(t.name)));let p=c?x.filter(e=>(0,S.$q)(e,s)):x,j=r?p.filter(e=>O(e,r)):p,f=n.filter(e=>"checked"===(0,S.ji)({group:e,selected:o,locations:s})).map(e=>e.id),v=n.filter(e=>"indeterminate"===(0,S.ji)({group:e,selected:o,locations:s})).map(e=>e.id),y=m?[...f,...o]:o,b=o.length,k=e=>{a(s.map(t=>e.includes(t.id)?{...t,selected:!0}:{...t,selected:!1}))};return 0===j.length&&r?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C.ZP,{title:t,items:j,selected:y,indeterminate:m?v:[],onChange:e=>{let t=new Set(e),i=new Set(y);e.forEach(e=>{!i.has(e)&&n.find(t=>t.id===e)&&s.filter(t=>{var n;return null===(n=t.belongs_to)||void 0===n?void 0:n.includes(e)}).forEach(e=>{t.add(e.id)})}),i.forEach(e=>{!t.has(e)&&n.find(t=>t.id===e)&&s.filter(t=>{var n;return null===(n=t.belongs_to)||void 0===n?void 0:n.includes(e)}).forEach(e=>{t.delete(e.id)})}),k(Array.from(t))},onViewMore:()=>{d.onOpen()},numSelected:b,toggle:(0,i.jsx)(w,{id:"".concat(t,"-regulated"),isChecked:c,onChange:()=>h(!c)})}),(0,i.jsx)(_,{groups:n,locations:s,isOpen:d.isOpen,onClose:d.onClose,selected:o,onChange:k},"subgroup-modal-selected-".concat(y.length))]})},L=n(64781),A=e=>{var t,n;let{data:s}=e,o=(0,l.pmc)(),a=(0,l.qY0)(),[r,C]=(0,u.useState)(null!==(n=null===(t=s.locations)||void 0===t?void 0:t.filter(e=>e.id!==p._F.GLOBAL))&&void 0!==n?n:[]),[y,w]=(0,u.useState)(""),[b,{isLoading:k}]=(0,L.WA)(),_=(0,u.useMemo)(()=>(0,S.Il)((s.locations||[]).filter(e=>e.id!==p._F.GLOBAL),s.location_groups||[]),[s]),O=!d().isEqual(r,s.locations),A=(0,c.useRouter)(),Z=()=>{A.push(f.vY).then(()=>{o.closeAll()})},F=async()=>{let e=await b({locations:r.map(e=>({id:e.id,selected:e.selected})),regulations:[]});(0,j.D4)(e)?o((0,x.Vo)((0,h.e$)(e.error))):o((0,x.t5)((0,i.jsxs)(l.xvT,{display:"inline",children:["Fides has automatically associated the relevant regulations with your location choices."," ",(0,i.jsx)(v.Z,{onClick:Z,children:"View regulations here."})]})))},M=e=>{C(r.map(t=>{let n=e.find(e=>e.id===t.id);return null!=n?n:t}))};return(0,i.jsxs)(l.gCW,{alignItems:"start",spacing:4,children:[(0,i.jsx)(l.xuv,{maxWidth:"510px",width:"100%",children:(0,i.jsx)(m.Z,{onChange:w,placeholder:"Search",value:y,onClear:()=>w("")})}),(0,i.jsx)(l.MIq,{columns:{base:1,md:2,xl:3},spacing:6,width:"100%",children:Object.entries(_).map(e=>{let[t,n]=e;return(0,i.jsx)(E,{title:t,groups:n.locationGroups,locations:n.locations,selected:r.filter(e=>n.locations.find(t=>t.id===e.id)&&e.selected).map(e=>e.id),onChange:M,search:y},t)})}),(0,i.jsx)(g.Z,{isOpen:a.isOpen,onClose:a.onClose,onConfirm:()=>{F(),a.onClose()},title:"Regulation updates",message:"Modifications in your location settings may also affect your regulation settings to simplify management. You can override any Fides-initiated changes directly in the regulation settings.",isCentered:!0,icon:(0,i.jsx)(l.aNP,{color:"orange"})}),O?(0,i.jsx)(l.wpx,{type:"primary",onClick:a.onOpen,loading:k,"data-testid":"save-btn",children:"Save"}):null]})},Z=()=>{let{isLoading:e}=(0,L.QM)(),t=(0,s.C)(L.P8);return(0,i.jsx)(o.Z,{title:"Locations",children:(0,i.jsxs)(l.xuv,{"data-testid":"location-management",children:[(0,i.jsx)(a.Z,{heading:"Locations"}),(0,i.jsx)(l.xvT,{fontSize:"sm",maxWidth:"720px",pb:6,children:"Select the locations that you operate in and Fides will make sure that you are automatically presented with the relevant regulatory guidelines and global frameworks for your locations."}),(0,i.jsx)(l.xuv,{children:e?(0,i.jsx)(l.$jN,{}):(0,i.jsx)(A,{data:t})})]})})}}},function(e){e.O(0,[9826,2888,9774,179],function(){return e(e.s=40135)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2462],{40135:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/locations",function(){return n(36956)}])},36956:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Z}});var i=n(24246),l=n(96306),s=n(16134),o=n(77213),a=n(58754),r=n(98784),d=n.n(r),c=n(86677),u=n(27378),h=n(812),g=n(58452),m=n(26917),x=n(46628),p=n(21910),j=n(31883),f=n(77830),v=n(26089),C=n(61524),y=n(46238),w=e=>{let{id:t,isChecked:n,onChange:s}=e;return(0,i.jsxs)(l.kCb,{alignItems:"center",gap:"8px",children:[(0,i.jsx)(l.rAg,{checked:n,size:"small",onChange:s,id:t,"data-testid":"regulated-toggle"}),(0,i.jsx)(l.lXp,{fontSize:"sm",m:0,htmlFor:t,children:"Regulated"}),(0,i.jsx)(y.b,{label:"Toggle on to see only locations in this region with privacy regulations supported by Fides"})]})},b=n(67991),k=n(12282),S=n(85759),_=e=>{let{groups:t,locations:n,isOpen:s,onClose:o,selected:a,onChange:r}=e,[d,c]=(0,u.useState)(a),[h,g]=(0,u.useState)(!1),{filteredLocations:m,locationsByGroup:x}=(0,u.useMemo)(()=>{let e=h?n.filter(e=>{var t;return null===(t=e.regulation)||void 0===t?void 0:t.length}):n;return{locationsByGroup:(0,S.VT)(e),filteredLocations:e}},[n,h]),{allSelected:p,handleToggleAll:j,handleToggleSelection:f}=(0,b.QZ)({items:m,selected:d,onChange:c}),v=d.filter(e=>!Object.keys(x).includes(e)).length,C=n[0].continent,y=Object.keys(x),_=!(1===y.length&&"Other"===y[0]);return(0,i.jsxs)(l.u_l,{size:"2xl",isOpen:s,onClose:o,isCentered:!0,children:[(0,i.jsx)(l.ZAr,{}),(0,i.jsxs)(l.hzk,{"data-testid":"subgroup-modal",children:[(0,i.jsx)(k.h4,{title:"Select locations"}),(0,i.jsxs)(l.fef,{p:6,maxHeight:"70vh",overflowY:"auto",children:[(0,i.jsx)(k.x$,{title:C,allSelected:p,onToggleAll:j,numSelected:v,children:(0,i.jsx)(w,{id:"".concat(C,"-modal-regulated"),isChecked:h,onChange:()=>g(!h)})}),_?(0,i.jsx)(l.UQy,{allowToggle:!0,allowMultiple:!0,children:Object.entries(x).map(e=>{let[n,s]=e,o=t.find(e=>n===e.id),a=o?o.name:n;return(0,i.jsxs)(l.Qdk,{"data-testid":"".concat(a,"-accordion"),children:[(0,i.jsx)("h2",{children:(0,i.jsxs)(l.KFZ,{children:[(0,i.jsx)(l.xuv,{as:"span",flex:"1",textAlign:"left",fontWeight:"semibold",fontSize:"sm",children:a}),(0,i.jsx)(l.XEm,{})]})}),(0,i.jsx)(l.Hk3,{pb:4,children:(0,i.jsx)(l.MIq,{columns:3,spacing:6,children:s.map(e=>(0,i.jsx)(l.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:d.includes(e.id),onChange:()=>f(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})})]},n)})}):(0,i.jsx)(l.MIq,{columns:3,spacing:6,paddingInline:4,children:m.map(e=>(0,i.jsx)(l.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:d.includes(e.id),onChange:()=>f(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})]}),(0,i.jsx)(k.$_,{onApply:()=>{let e=new Set(d);Object.entries(x).forEach(t=>{let[n,i]=t;i.every(e=>d.includes(e.id))?e.add(n):e.delete(n)}),r(Array.from(e)),o()},onClose:o})]})]})};let O=(e,t)=>{var n;return null===(n=e.name)||void 0===n?void 0:n.toLocaleLowerCase().includes(t.toLocaleLowerCase())};var E=e=>{let{title:t,groups:n,locations:s,selected:o,onChange:a,search:r}=e,d=(0,l.qY0)(),[c,h]=(0,u.useState)(!1),g=!!(null==r?void 0:r.length),m=n.length>0,x=s;n.length&&(x=n),g&&(x=[...s,...n].sort((e,t)=>e.name.localeCompare(t.name)));let p=c?x.filter(e=>(0,S.$q)(e,s)):x,j=r?p.filter(e=>O(e,r)):p,f=n.filter(e=>"checked"===(0,S.ji)({group:e,selected:o,locations:s})).map(e=>e.id),v=n.filter(e=>"indeterminate"===(0,S.ji)({group:e,selected:o,locations:s})).map(e=>e.id),y=m?[...f,...o]:o,b=o.length,k=e=>{a(s.map(t=>e.includes(t.id)?{...t,selected:!0}:{...t,selected:!1}))};return 0===j.length&&r?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C.ZP,{title:t,items:j,selected:y,indeterminate:m?v:[],onChange:e=>{let t=new Set(e),i=new Set(y);e.forEach(e=>{!i.has(e)&&n.find(t=>t.id===e)&&s.filter(t=>{var n;return null===(n=t.belongs_to)||void 0===n?void 0:n.includes(e)}).forEach(e=>{t.add(e.id)})}),i.forEach(e=>{!t.has(e)&&n.find(t=>t.id===e)&&s.filter(t=>{var n;return null===(n=t.belongs_to)||void 0===n?void 0:n.includes(e)}).forEach(e=>{t.delete(e.id)})}),k(Array.from(t))},onViewMore:()=>{d.onOpen()},numSelected:b,toggle:(0,i.jsx)(w,{id:"".concat(t,"-regulated"),isChecked:c,onChange:()=>h(!c)})}),(0,i.jsx)(_,{groups:n,locations:s,isOpen:d.isOpen,onClose:d.onClose,selected:o,onChange:k},"subgroup-modal-selected-".concat(y.length))]})},L=n(64781),A=e=>{var t,n;let{data:s}=e,o=(0,l.pmc)(),a=(0,l.qY0)(),[r,C]=(0,u.useState)(null!==(n=null===(t=s.locations)||void 0===t?void 0:t.filter(e=>e.id!==p._F.GLOBAL))&&void 0!==n?n:[]),[y,w]=(0,u.useState)(""),[b,{isLoading:k}]=(0,L.WA)(),_=(0,u.useMemo)(()=>(0,S.Il)((s.locations||[]).filter(e=>e.id!==p._F.GLOBAL),s.location_groups||[]),[s]),O=!d().isEqual(r,s.locations),A=(0,c.useRouter)(),Z=()=>{A.push(f.vY).then(()=>{o.closeAll()})},F=async()=>{let e=await b({locations:r.map(e=>({id:e.id,selected:e.selected})),regulations:[]});(0,j.D4)(e)?o((0,x.Vo)((0,h.e$)(e.error))):o((0,x.t5)((0,i.jsxs)(l.xvT,{display:"inline",children:["Fides has automatically associated the relevant regulations with your location choices."," ",(0,i.jsx)(v.Z,{onClick:Z,children:"View regulations here."})]})))},M=e=>{C(r.map(t=>{let n=e.find(e=>e.id===t.id);return null!=n?n:t}))};return(0,i.jsxs)(l.gCW,{alignItems:"start",spacing:4,children:[(0,i.jsx)(l.xuv,{maxWidth:"510px",width:"100%",children:(0,i.jsx)(m.Z,{onChange:w,placeholder:"Search",value:y,onClear:()=>w("")})}),(0,i.jsx)(l.MIq,{columns:{base:1,md:2,xl:3},spacing:6,width:"100%",children:Object.entries(_).map(e=>{let[t,n]=e;return(0,i.jsx)(E,{title:t,groups:n.locationGroups,locations:n.locations,selected:r.filter(e=>n.locations.find(t=>t.id===e.id)&&e.selected).map(e=>e.id),onChange:M,search:y},t)})}),(0,i.jsx)(g.Z,{isOpen:a.isOpen,onClose:a.onClose,onConfirm:()=>{F(),a.onClose()},title:"Regulation updates",message:"Modifications in your location settings may also affect your regulation settings to simplify management. You can override any Fides-initiated changes directly in the regulation settings.",isCentered:!0,icon:(0,i.jsx)(l.aNP,{color:"orange"})}),O?(0,i.jsx)(l.wpx,{type:"primary",onClick:a.onOpen,loading:k,"data-testid":"save-btn",children:"Save"}):null]})},Z=()=>{let{isLoading:e}=(0,L.QM)(),t=(0,s.C)(L.P8);return(0,i.jsx)(o.Z,{title:"Locations",children:(0,i.jsxs)(l.xuv,{"data-testid":"location-management",children:[(0,i.jsx)(a.Z,{heading:"Locations"}),(0,i.jsx)(l.xvT,{fontSize:"sm",maxWidth:"720px",pb:6,children:"Select the locations that you operate in and Fides will make sure that you are automatically presented with the relevant regulatory guidelines and global frameworks for your locations."}),(0,i.jsx)(l.xuv,{children:e?(0,i.jsx)(l.$jN,{}):(0,i.jsx)(A,{data:t})})]})})}}},function(e){e.O(0,[9826,2888,9774,179],function(){return e(e.s=40135)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4046],{10234:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/messaging-providers/[key]",function(){return n(55066)}])},55066:function(e,i,n){"use strict";n.r(i),n.d(i,{default:function(){return h}});var t=n(24246),r=n(86677),s=n(77213),c=n(90980),o=n(77830),d=n(96306),u=n(27378),l=n(41841),a=n(90710),f=n(42478),x=n(10792);let g=e=>{let{configKey:i}=e,{handleError:n}=(0,l.HK)(),{data:r,isLoading:s,error:c}=(0,f.FU)({key:i});if((0,u.useEffect)(()=>{c&&n(c)},[c,n]),s)return(0,t.jsx)(d.xuv,{display:"flex",justifyContent:"center",alignItems:"center",height:"200px",children:(0,t.jsx)(d.$jN,{})});if(!r)return(0,t.jsx)(d.V4A,{children:(0,t.jsxs)(d.xvT,{color:"red.500",children:["Messaging configuration not found for key: ",i]})});let o=r.service_type;return(0,t.jsxs)(d.xuv,{children:[(0,t.jsx)(d.X6q,{fontSize:"2xl",fontWeight:"semibold",mb:6,children:"Edit messaging provider"}),Object.values(a.q).includes(o)?(0,t.jsx)(x.Z,{configKey:i,initialProviderType:o}):(0,t.jsxs)(d.xvT,{color:"red.500",children:["Unsupported service type: ",o]})]})};var h=()=>{let{key:e}=(0,r.useRouter)().query;return e&&"string"==typeof e?(0,t.jsxs)(s.Z,{title:"Edit Messaging Provider - ".concat(e),children:[(0,t.jsx)(c.Z,{backPath:o.AD}),(0,t.jsx)(g,{configKey:e})]}):(0,t.jsxs)(s.Z,{title:"Edit Messaging Provider",children:[(0,t.jsx)(c.Z,{backPath:o.AD}),(0,t.jsx)("div",{children:"Invalid messaging provider key"})]})}}},function(e){e.O(0,[431,8765,9278,3662,9037,1841,3377,2888,9774,179],function(){return e(e.s=10234)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2992],{84983:function(n,e,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/messaging-providers/new",function(){return i(51192)}])},51192:function(n,e,i){"use strict";i.r(e),i.d(e,{default:function(){return c}});var s=i(24246),t=i(96306),r=i(77213),u=i(90980),o=i(77830),f=i(10792);let a=()=>(0,s.jsxs)(r.Z,{title:"Create Messaging Configuration",children:[(0,s.jsx)(u.Z,{backPath:o.AD}),(0,s.jsx)(t.X6q,{fontSize:"2xl",fontWeight:"semibold",mb:6,children:"Configure your messaging provider"}),(0,s.jsx)(f.Z,{})]});var c=()=>(0,s.jsx)(a,{})}},function(n){n.O(0,[431,8765,9278,3662,9037,1841,3377,2888,9774,179],function(){return n(n.s=84983)}),_N_E=n.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5935],{9255:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/messaging-providers",function(){return i(60612)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return f}});var n=i(24246),s=i(96306),a=i(88038),r=i.n(a),o=i(86677);i(27378);var l=i(25980),u=i(90867),c=i(42478),d=i(77830),g=()=>{let e=(0,o.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(d.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."," "]})]})})},f=e=>{let{children:t,title:i,padded:a=!0,mainProps:d}=e,f=(0,l.hz)(),p=(0,o.useRouter)(),m="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(f.flags.messagingConfiguration&&m),{data:v}=(0,c.JE)(void 0,{skip:h}),{data:x}=(0,u.PW)(void 0,{skip:h}),y=f.flags.messagingConfiguration&&(!v||!x)&&m;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(r(),{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:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[y?(0,n.jsx)(g,{}):null,t]})]})}},19904:function(e,t,i){"use strict";i.d(t,{Tg:function(){return r}});var n=i(24246),s=i(16134),a=i(31793);let r=e=>(0,s.C)(a.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:i}=e;return r(t)?(0,n.jsx)(n.Fragment,{children:i}):null}},8125:function(e,t,i){"use strict";i.d(t,{V:function(){return a},o:function(){return u}});var n=i(27378),s=i(32735);let a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{enableSelection:i=!1,getRowKey:a,bulkActions:r,isLoading:o=!1,isFetching:l=!1,dataSource:u=[],totalRows:c=0,currentPage:d,pageSize:g,customTableProps:f={}}=t,p=(0,n.useCallback)(e=>{if(e&&"object"==typeof e){if(e.id)return String(e.id);if(e.key)return String(e.key)}return String(e)},[]),m=a||p,[h,v]=(0,n.useState)([]),[x,y]=(0,n.useState)([]),j=(0,n.useCallback)(()=>{v([]),y([])},[]),C=(0,n.useMemo)(()=>({selectedRowKeys:h,selectedRows:x,resetSelections:j}),[h,x,j]),b=(0,n.useMemo)(()=>{if(i)return{selectedRowKeys:h,onChange:(e,t)=>{v(e),y(t)}}},[i,h]),w=(0,n.useCallback)((t,i,n)=>{var s,a;let r=null!==(s=t.current)&&void 0!==s?s:e.pageIndex,o=null!==(a=t.pageSize)&&void 0!==a?a:e.pageSize,l=r!==e.pageIndex||o!==e.pageSize;l?(t.current&&t.current!==e.pageIndex&&e.updatePageIndex(t.current),t.pageSize&&t.pageSize!==e.pageSize&&e.updatePageSize(t.pageSize)):e.updateFilters(i||{});let u=n&&!Array.isArray(n)?n.field:void 0,c=n&&!Array.isArray(n)&&null!==n.order?n.order:void 0;l||e.updateSorting(u,c)},[e]),S=(0,n.useMemo)(()=>{var t,i,n,a,r;return{current:null!=d?d:e.pageIndex,pageSize:null!=g?g:e.pageSize,total:c,showSizeChanger:null===(a=null===(t=e.paginationConfig)||void 0===t?void 0:t.showSizeChanger)||void 0===a||a,pageSizeOptions:null!==(r=null===(n=e.paginationConfig)||void 0===n?void 0:null===(i=n.pageSizeOptions)||void 0===i?void 0:i.map(String))&&void 0!==r?r:s.VZ}},[d,e.pageIndex,g,e.pageSize,c,e.paginationConfig]),k=(0,n.useMemo)(()=>({dataSource:u,loading:o||l,pagination:S,onChange:w,rowKey:m,scroll:{x:"max-content",scrollToFirstRowOnChange:!0},size:"small",bordered:!0,...f}),[u,o,l,S,w,m,f]),z=h.map(String),M=x.length>0,_=(0,n.useCallback)(e=>{let t=null==r?void 0:r.actions.find(t=>t.key===e);return t?{disabled:!M||!!t.disabled&&t.disabled(x),loading:t.loading||!1,onClick:()=>t.onClick(x)}:{disabled:!0,loading:!1}},[r,M,x]);return(0,n.useMemo)(()=>({tableProps:k,selectionProps:b,selectionState:C,selectedRows:x,selectedKeys:z,hasSelectedRows:M,resetSelections:j,getBulkActionProps:_,isLoadingOrFetching:o||l,hasData:u.length>0}),[k,b,C,x,z,M,j,_,o,l,u.length])};var r=i(40431),o=i(41841);let l=()=>({filters:(0,r.WJ)(e=>e).withDefault({})}),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{pagination:t={},sorting:i={},search:s={},onStateChange:a}=e,{pageIndex:u,pageSize:c,resetPagination:d,updatePageIndex:g,updatePageSize:f,pageSizeOptions:p,showSizeChanger:m}=(0,o.h0)(t),{sortKey:h,sortOrder:v,updateSorting:x,resetSorting:y}=(0,o.rK)(i),{searchQuery:j,updateSearch:C,resetSearch:b}=(0,o.Rx)(s),w=(0,n.useMemo)(()=>l(),[]),[S,k]=(0,r.XI)(w,{history:"push"}),z=(0,n.useMemo)(()=>{var e;return{pageIndex:u,pageSize:c,sortKey:h,sortOrder:v,columnFilters:null!==(e=S.filters)&&void 0!==e?e:{},searchQuery:j}},[S,u,c,h,v,j]),M=(0,n.useCallback)((e,t)=>{x(e,t),d()},[x,d]),_=(0,n.useCallback)(e=>{let t=Object.fromEntries(Object.entries(e).filter(e=>{let[,t]=e;return null!=t}));k({filters:Object.keys(t).length>0?t:null}),d()},[k,d]),T=(0,n.useCallback)(e=>{C(e),d()},[C,d]),P=(0,n.useCallback)(()=>{k({filters:null}),d(),y(),b()},[k,d,y,b]);return(0,n.useEffect)(()=>{a&&a(z)},[z,a]),{state:z,pageIndex:z.pageIndex,pageSize:z.pageSize,updatePageIndex:g,updatePageSize:f,sortKey:z.sortKey,sortOrder:z.sortOrder,updateSorting:M,columnFilters:z.columnFilters,updateFilters:_,searchQuery:z.searchQuery,updateSearch:T,resetState:P,paginationConfig:{pageSizeOptions:p,showSizeChanger:m}}}},17828:function(e,t,i){"use strict";var n=i(24246);i(27378),t.Z=()=>(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 74.375 85",width:"20",height:"20",fill:"#fff",fillRule:"evenodd",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("use",{xlinkHref:"#A",x:"2.188",y:"2.5"}),(0,n.jsx)("symbol",{id:"A",overflow:"visible",children:(0,n.jsxs)("g",{stroke:"none",children:[(0,n.jsx)("path",{d:"M16.558 12.75L0 38.591l16.558 25.841 13.227-3.324.654-44.869-13.881-3.489z",fill:"#876929"}),(0,n.jsx)("path",{d:"M35.049 59.786l-18.491 4.645V12.75l18.491 4.645v42.391z",fill:"#d9a741"}),(0,n.jsxs)("g",{fill:"#876929",children:[(0,n.jsx)("path",{d:"M32.849 21.614L35.05 80 70 62.867l-.01-43.615-8.914 1.448-28.228.913z"}),(0,n.jsx)("path",{d:"M46.184 33.149l10.906-.632 10.778-19.164L40.612 0 30.439 4.364l15.745 28.785z"})]}),(0,n.jsx)("path",{d:"M40.612 0l27.256 13.353-10.778 19.164L40.612 0z",fill:"#d9a741"}),(0,n.jsx)("path",{d:"M35.049 5.539L57.09 44.742l3.788 22.595L35.049 80l-10.46-5.131V9.64l10.45-4.101h.01z",fill:"#876929"}),(0,n.jsx)("path",{d:"M69.991 19.251L70 62.867 35.05 80V5.539l22.041 39.203 12.899-25.491z",fill:"#d9a741"})]})})]})},44907:function(e,t,i){"use strict";var n=i(24246);i(27378),t.Z=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",preserveAspectRatio:"xMidYMid",viewBox:"-0.5 0 257 257",children:(0,n.jsx)("path",{fill:"#C02428",d:"M128.418 80.526c-26.51 0-48.884 21.475-48.884 48.728a48.197 48.197 0 0014.187 34.579 48.532 48.532 0 0034.697 14.14c26.511 0 48.875-21.476 48.875-48.719 0-27.253-22.364-48.728-48.875-48.728zm-76.22 47.895c0-41.285 33.968-75.138 75.395-75.138 41.417 0 75.385 33.853 75.385 75.138 0 2.478 0 5.788-.825 8.266-.835 7.422 4.972 13.2 12.43 13.2 12.43 0 14.08-15.678 14.08-21.466 0-55.328-45.573-100.746-101.07-100.746-55.518 0-101.07 45.418-101.07 100.746 0 55.339 45.552 100.747 101.07 100.747 29.822 0 56.333-12.388 74.56-33.03l20.703 17.342c-22.364 26.43-57.158 42.952-94.448 42.952-34.097.105-66.827-13.35-90.932-37.384C13.37 195.016-.118 162.392 0 128.411 0 58.228 57.159.432 128.418.432 198.832.432 256 58.238 256 128.432c0 28.075-13.256 51.205-40.591 51.205-11.605 0-19.053-5.787-23.2-11.565-13.255 21.476-37.29 35.508-64.626 35.508-20.017.068-39.234-7.827-53.388-21.933a74.755 74.755 0 01-22.008-53.205l.01-.02zm76.21-22.297c12.43 0 22.374 9.91 22.374 22.297 0 12.388-9.944 22.298-22.364 22.298a22.322 22.322 0 01-15.848-6.504 22.169 22.169 0 01-6.526-15.794c0-12.387 9.944-22.297 22.374-22.297h-.01z"})})},5144:function(e,t,i){"use strict";var n=i(24246);t.Z=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",preserveAspectRatio:"xMidYMid",viewBox:"0 0 256 256",children:(0,n.jsx)("path",{fill:"#F12E45",d:"M128 0c70.656 0 128 57.344 128 128s-57.344 128-128 128S0 198.656 0 128 57.344 0 128 0zm0 33.792c-52.224 0-94.208 41.984-94.208 94.208S75.776 222.208 128 222.208s94.208-41.984 94.208-94.208S180.224 33.792 128 33.792zm31.744 99.328c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624zm-63.488 0c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624zm63.488-63.488c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624zm-63.488 0c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624z"})})},42478:function(e,t,i){"use strict";i.d(t,{FU:function(){return u},JE:function(){return s},Ki:function(){return d},SU:function(){return g},W:function(){return f},h9:function(){return a},jc:function(){return n},qt:function(){return l},sn:function(){return c}});let{useGetEmailInviteStatusQuery:n,useGetActiveMessagingProviderQuery:s,useCreateMessagingConfigurationMutation:a,useCreateMessagingConfigurationSecretsMutation:r,useGetMessagingConfigurationDetailsQuery:o,useGetMessagingConfigurationsQuery:l,useGetMessagingConfigurationByKeyQuery:u,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:d,useCreateTestConnectionMessageMutation:g,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,t,i,n)=>{let s=await n({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"]})})})},60612:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var n,s,a=i(24246),r=i(96306),o=i(77213),l=i(77830),u=i(47935),c=i(812),d=i(41841),g=i(86677),f=i(27378),p=i(8125),m=i(7426),h=i(21910),v=i(19904),x=i(17828),y=i(44907),j=i(5144),C=i(42478),b=i(51980),w=i(16394),S=e=>{let{messagingConfig:t}=e,{last_test_succeeded:i,last_test_timestamp:n}=t;if(!n)return(0,a.jsx)(r.j8w,{children:"Verify configuration"});let s=new Date(n),o=(0,w.p6)(s),l=(0,b.B)(s,new Date,{addSuffix:!0});return(0,a.jsx)(r.esZ,{title:"Last verified: ".concat(o),children:(0,a.jsxs)(r.j8w,{color:i?"success":"error","data-testid":i?"test-success":"test-error",children:[i?"Succeeded":"Failed"," ",l]})})};(n=s||(s={})).NAME="name",n.VERIFICATION_STATUS="verification_status",n.ENABLED="enabled",n.ACTIONS="actions";let k=()=>{let e=(0,g.useRouter)(),{handleError:t}=(0,d.HK)(),[i,n]=(0,f.useState)(null),[o]=(0,m.L)(),[u]=(0,C.W)(),b=(0,v.Tg)([h.Sh.MESSAGING_CREATE_OR_UPDATE]),[w,k]=(0,f.useState)(!1),[z,M]=(0,f.useState)(null),_=(0,p.o)({pagination:{defaultPageSize:25,pageSizeOptions:[25,50,100]},sorting:{validColumns:Object.values(s),defaultSortKey:"name",defaultSortOrder:"ascend"}}),{data:T,isLoading:P}=(0,C.JE)(),{data:E,isLoading:q}=(0,C.qt)();(0,f.useEffect)(()=>{T?n(T.service_type):n(null)},[T]);let A=(0,f.useCallback)(async e=>{try{let i=await o({notifications:{notification_service_type:e}});(0,c.D4)(i)?t(i.error):(n(e),r.Pg3.success(e?"Updated active messaging config":"Disabled active messaging config"))}catch(e){t(e)}},[o,t,n]),I=(0,f.useCallback)(t=>{var i,n;let s=l.GE.replace("[key]",t.key);e.push({pathname:s,query:{last_test_succeeded:null!==(i=t.last_test_succeeded)&&void 0!==i?i:"",last_test_timestamp:null!==(n=t.last_test_timestamp)&&void 0!==n?n:""}})},[e]),O=(0,f.useCallback)((e,t)=>{M({key:e,name:t}),k(!0)},[]),L=(0,f.useCallback)(async()=>{if(z)try{let e=await u({key:z.key});(0,c.D4)(e)?t(e.error):r.Pg3.success("Messaging configuration successfully deleted")}catch(e){t(e)}finally{k(!1),M(null)}},[z,u,t]),D=(0,f.useCallback)(()=>{k(!1),M(null)},[]),F=(0,f.useMemo)(()=>({enableSelection:!1,getRowKey:e=>e.key,isLoading:q||P,dataSource:(null==E?void 0:E.items)||[],totalRows:(null==E?void 0:E.total)||0,customTableProps:{size:"small",pagination:{hideOnSinglePage:!0,showSizeChanger:!0,pageSizeOptions:["25","50","100"]}}}),[q,P,null==E?void 0:E.items,null==E?void 0:E.total]),R=(0,p.V)(_,F),K=(0,f.useMemo)(()=>[{title:"Provider type",dataIndex:"name",key:"name",render:(e,t)=>(0,a.jsxs)(r.Ugi,{children:[(()=>{switch(t.service_type){case"mailgun":return(0,a.jsx)(y.Z,{});case"twilio_text":case"twilio_email":default:return(0,a.jsx)(j.Z,{});case"aws_ses":return(0,a.jsx)(x.Z,{})}})(),(0,a.jsx)(r.xvT,{children:e})]})},{title:"Verification status",key:"verification_status",render:(e,t)=>(0,a.jsx)(S,{messagingConfig:t})},{title:"Enabled",key:"enabled",width:100,render:(e,t)=>{let n=t.service_type===i,s=!!t.last_test_timestamp&&""!==t.last_test_timestamp&&!1===t.last_test_succeeded&&!n,o=(0,a.jsx)(r.rAg,{checked:n,disabled:s,onChange:e=>{e?A(t.service_type):A(null)}});return s?(0,a.jsx)(r.esZ,{title:"This provider cannot be enabled because its last test failed. Please fix the configuration and test again.",children:o}):o}},{title:"Actions",key:"actions",render:(e,t)=>(0,a.jsxs)(r.Ugi,{children:[b&&(0,a.jsx)(r.wpx,{onClick:e=>{e.stopPropagation(),I(t)},size:"small",icon:(0,a.jsx)(r.PJP.I8b,{}),title:"Edit","aria-label":"Edit messaging configuration","data-testid":"edit-messaging-config-btn"}),b&&(0,a.jsx)(r.wpx,{onClick:e=>{e.stopPropagation(),O(t.key,t.name)},size:"small",icon:(0,a.jsx)(r.PJP.ZNm,{}),title:"Delete","aria-label":"Delete messaging configuration","data-testid":"delete-messaging-config-btn"})]})}],[b,i,I,O,A]),Z=(0,f.useMemo)(()=>(0,a.jsx)(r.$zI,{title:"Delete messaging configuration",open:w,onCancel:D,footer:[(0,a.jsx)(r.wpx,{onClick:D,children:"Cancel"},"cancel"),(0,a.jsx)(r.wpx,{type:"primary",danger:!0,onClick:L,children:"Delete"},"delete")],children:(0,a.jsxs)(r.vyj,{direction:"vertical",children:[(0,a.jsxs)(r.xvT,{children:['Are you sure you want to delete "',(0,a.jsx)("strong",{children:null==z?void 0:z.name}),'" messaging configuration?']}),(0,a.jsx)(r.xvT,{children:"This action cannot be undone."})]})}),[w,null==z?void 0:z.name,D,L]);return{columns:K,tableProps:R.tableProps,selectionProps:R.selectionProps,userCanUpdate:b,isLoading:q||P,deleteModal:Z,handleEditConfiguration:I,handleDeleteConfiguration:O,setActiveServiceType:A}},z=()=>(0,a.jsx)(r.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,a.jsxs)(r.gCW,{children:[(0,a.jsx)(r.xvT,{fontSize:"md",fontWeight:"600",children:"No messaging providers found."}),(0,a.jsx)(r.xvT,{fontSize:"sm",children:'Click "Add a messaging provider" to add your first messaging provider to Fides.'})]})}),M=()=>{let{columns:e,tableProps:t,userCanUpdate:i,isLoading:n,deleteModal:s}=k();return(0,a.jsxs)(o.Z,{title:"Messaging providers",children:[(0,a.jsx)(r.X6q,{mb:5,fontSize:"2xl",fontWeight:"semibold",children:"Manage messaging providers"}),(0,a.jsxs)(r.xvT,{fontSize:"sm",mb:8,width:{base:"100%",lg:"70%"},children:["Fides requires a messaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,a.jsx)(r.xvT,{as:"span",color:"complimentary.500",children:"documentation"})," ","to setup a messaging service that Fides supports. Ensure you have completed the setup for the preferred messaging provider and have the details handy prior to the following steps."]}),(0,a.jsxs)(r.kCb,{flex:1,direction:"column",overflow:"auto",children:[i&&(0,a.jsx)(r.vyj,{direction:"horizontal",style:{width:"100%",justifyContent:"flex-end",marginBottom:16},children:(0,a.jsx)(r.wpx,{href:"".concat(l.AD,"/new"),role:"link",type:"primary",icon:(0,a.jsx)(r.PJP.mm_,{}),iconPosition:"end","data-testid":"add-messaging-provider-btn",children:"Add a messaging provider"})}),n?(0,a.jsx)(u.I4,{rowHeight:36,numRows:5}):(0,a.jsx)(r.V5H,{...t,columns:e,locale:{emptyText:(0,a.jsx)(z,{})}})]}),s]})};var _=()=>(0,a.jsx)(M,{})}},function(e){e.O(0,[431,1841,2888,9774,179],function(){return e(e.s=9255)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2828],{85082:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/organization",function(){return t(5417)}])},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return m}});var n=t(24246),r=t(96306),a=t(88038),s=t.n(a),o=t(86677);t(27378);var l=t(25980),d=t(90867),c=t(42478),u=t(77830),g=()=>{let e=(0,o.useRouter)();return(0,n.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(r.xuv,{children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(r.wpx,{onClick:()=>{e.push(u.AD)},children:"Configure"})]}),(0,n.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:i,title:t,padded:a=!0,mainProps:u}=e,m=(0,l.hz)(),p=(0,o.useRouter)(),x="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,f=!(m.flags.messagingConfiguration&&x),{data:v}=(0,c.JE)(void 0,{skip:f}),{data:h}=(0,d.PW)(void 0,{skip:f}),j=m.flags.messagingConfiguration&&(!v||!h)&&x;return(0,n.jsxs)(r.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,n.jsxs)(s(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[j?(0,n.jsx)(g,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var n=t(24246),r=t(96306),a=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:s=!0,children:o,rightContent:l,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:s?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof i?(0,n.jsx)(r.lQT,{className:t||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,l&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!t&&(0,n.jsx)(a.m,{className:o?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,i,t){"use strict";t.d(i,{Tg:function(){return s}});var n=t(24246),r=t(16134),a=t(31793);let s=e=>(0,r.C)(a.uu).filter(i=>e.includes(i)).length>0;i.ZP=e=>{let{scopes:i,children:t}=e;return s(i)?(0,n.jsx)(n.Fragment,{children:t}):null}},97181:function(e,i,t){"use strict";t.d(i,{d:function(){return d}});var n=t(24246),r=t(96306),a=t(34090),s=t(27378),o=t(46238),l=t(40324);let d=e=>{let{name:i,label:t,labelProps:d,tooltip:c,isRequired:u,layout:g="inline",helperText:m,...p}=e,[x,f,{setValue:v}]=(0,a.U$)(i),h=!!(f.touched&&f.error),[j,y]=(0,s.useState)("");x.value||"tags"!==p.mode&&"multiple"!==p.mode||(x.value=[]),"tags"===p.mode&&"string"==typeof x.value&&(x.value=[x.value]);let b="tags"===p.mode?(e,i)=>e?e.value!==j||x.value.includes(j)?p.optionRender?p.optionRender(e,i):e.label:'Create "'.concat(j,'"'):void 0:p.optionRender||void 0,C=e=>{y(e),p.onSearch&&p.onSearch(e)},k=(e,i)=>{v(e),p.onChange&&p.onChange(e,i)};return"inline"===g?(0,n.jsx)(r.NIc,{isInvalid:h,isRequired:u,children:(0,n.jsxs)(r.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,n.jsx)(l.__,{htmlFor:p.id||i,...d,children:t}):null,(0,n.jsxs)(r.jqI,{align:"center",children:[(0,n.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(r.WPr,{...x,id:p.id||i,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:b,onSearch:"tags"===p.mode?C:void 0,onChange:k,value:x.value||void 0,status:h?"error":void 0}),m&&(0,n.jsx)(r.Q6r,{children:m}),(0,n.jsx)(l.Bc,{isInvalid:h,message:f.error,fieldName:x.name})]}),(0,n.jsx)(o.b,{label:c,className:h?"mt-2 self-start":void 0})]})]})}):(0,n.jsx)(r.NIc,{isInvalid:h,isRequired:u,children:(0,n.jsxs)(r.gCW,{alignItems:"start",children:[(0,n.jsxs)(r.jqI,{align:"center",children:[t?(0,n.jsx)(l.__,{htmlFor:p.id||i,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,n.jsx)(o.b,{label:c})]}),(0,n.jsx)(r.WPr,{...x,id:p.id||i,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:b,onSearch:"tags"===p.mode?C:void 0,onChange:k,value:x.value||void 0,status:h?"error":void 0}),m&&(0,n.jsx)(r.Q6r,{style:{marginTop:0},children:m}),(0,n.jsx)(l.Bc,{isInvalid:h,message:f.error,fieldName:x.name})]})})}},8133:function(e,i,t){"use strict";var n=t(24246),r=t(96306);i.Z=e=>{let{title:i,children:t,isOpen:a,onClose:s,modalContentProps:o,showCloseButton:l=!1,footer:d,...c}=e;return(0,n.jsxs)(r.u_l,{isOpen:a,onClose:s,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...o,children:[l&&(0,n.jsx)(r.olH,{}),(0,n.jsx)(r.xBx,{p:0,children:(0,n.jsx)(r.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,n.jsx)(r.X6q,{as:"h3",size:"sm",children:i})})}),(0,n.jsx)(r.fef,{pb:4,overflow:"auto",children:t}),d&&(0,n.jsx)(r.mzw,{children:d})]})]})}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return d}});var n=t(24246),r=t(96306),a=t(79894),s=t.n(a),o=t(27378);let{Text:l}=r.AntTypography,d=e=>{let{items:i,...t}=e,a=(0,o.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let a=t===i.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,id:a?"breadcrumb-current-page":void 0,children:o.title})),d)?o.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,n.jsx)(s(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[i]);return(0,n.jsx)(r.zrq,{items:a,...t})}},42478:function(e,i,t){"use strict";t.d(i,{FU:function(){return d},JE:function(){return r},Ki:function(){return u},SU:function(){return g},W:function(){return m},h9:function(){return a},jc:function(){return n},qt:function(){return l},sn:function(){return c}});let{useGetEmailInviteStatusQuery:n,useGetActiveMessagingProviderQuery:r,useCreateMessagingConfigurationMutation:a,useCreateMessagingConfigurationSecretsMutation:s,useGetMessagingConfigurationDetailsQuery:o,useGetMessagingConfigurationsQuery:l,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:u,useCreateTestConnectionMessageMutation:g,useDeleteMessagingConfigurationByKeyMutation:m}=t(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,i,t,n)=>{let r=await n({url:"messaging/default/active"});return r.error&&404===r.error.status?{data:null}:r},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"]})})})},5417:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return I}});var n=t(24246),r=t(19904),a=t(96306),s=t(25980),o=t(77213),l=t(58754),d=t(8133),c=t(34090),u=t(27378),g=t(55484),m=t(40324),p=t(812),x=t(46628),f=t(76174),v=t(97181);let h={identifier:"",name:"",client_id:"",client_secret:""},j=e=>({...e}),y=g.Ry().shape({provider:g.Z_().required().label("Provider"),name:g.Z_().required().label("Name"),client_id:g.Z_().required().label("Client ID"),client_secret:g.Z_().required().label("Client Secret")});var b=e=>{let{openIDProvider:i,onSuccess:t,onClose:r}=e,[s]=(0,f.Qc)(),[o]=(0,f.oP)(),l=(0,u.useMemo)(()=>i?j(i):h,[i]),d=(0,a.pmc)(),g=async(e,i)=>{(e=>{if((0,p.D4)(e)){let i=(0,p.e$)(e.error,"An unexpected error occurred while editing the SSO provider. Please try again.");d((0,x.Vo)(i))}else d((0,x.t5)("SSO provider configuration saved.")),r(),i.resetForm({}),t&&t(e.data)})(l.id?await o(e):await s(e))},b=[{label:"Azure",value:"azure"},{label:"Google",value:"google"},{label:"Okta",value:"okta"},{label:"Custom",value:"custom"}],C=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0})]}),k=()=>(0,n.jsx)(m.j0,{id:"domain",name:"domain",label:"Domain",tooltip:"Domain for your Okta provider",variant:"stacked",isRequired:!0}),q=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"userinfo_url",name:"user_info_url",label:"User Info URL",tooltip:"User Info URL for your provider",variant:"stacked",isRequired:!0})]});return(0,n.jsx)(c.J9,{initialValues:l,enableReinitialize:!0,onSubmit:g,validationSchema:y,children:e=>{let{dirty:i,isValid:t,values:s}=e;return(0,n.jsx)(c.l0,{"data-testid":"openIDProvider-form",children:(0,n.jsxs)(a.Kqy,{spacing:4,children:[(0,n.jsx)(v.d,{name:"provider",label:"Provider",options:b,layout:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"identifier",name:"identifier",label:"Identifier",tooltip:"Unique identifier for your provider",variant:"stacked",isRequired:!0,disabled:!!l.id}),(0,n.jsx)(m.j0,{id:"name",name:"name",label:"Name",tooltip:"Display name for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"client_id",name:"client_id",label:"Client ID",type:"password",tooltip:"Client ID for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"client_secret",name:"client_secret",label:"Client secret",type:"password",tooltip:"Client secret for your provider",variant:"stacked",isRequired:!0}),"azure"===s.provider&&C(),"okta"===s.provider&&k(),"custom"===s.provider&&q(),(0,n.jsxs)(a.xuv,{textAlign:"right",children:[(0,n.jsx)(a.wpx,{htmlType:"button","data-testid":"cancel-btn",className:"mr-3",onClick:r,children:"Cancel"}),(0,n.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,"data-testid":"save-btn",children:"Save"})]})]})})}})},C=e=>{let{isOpen:i,onClose:t}=e;return(0,n.jsx)(d.Z,{isOpen:i,onClose:t,title:"Add SSO Provider",children:(0,n.jsx)(b,{onClose:t})})},k=e=>{let{isOpen:i,onClose:t,openIDProvider:r}=e;return(0,n.jsx)(d.Z,{isOpen:i,onClose:t,title:"Edit SSO Provider",children:(0,n.jsx)(b,{openIDProvider:r,onClose:t})})},q=e=>{let{openIDProvider:i}=e,{onOpen:t,isOpen:r,onClose:s}=(0,a.qY0)(),{onOpen:o,isOpen:l,onClose:d}=(0,a.qY0)(),c=(0,a.pmc)(),[u]=(0,f.rB)(),g=async()=>{let e=await u(i.identifier);if((0,p.D4)(e)){c((0,x.Vo)((0,p.e$)(e.error))),d();return}c((0,x.t5)("SSO provider deleted successfully")),d()};return(0,n.jsxs)(a.xuv,{alignItems:"center",borderRadius:"lg",borderWidth:"1px",display:"flex",height:"74px",marginBottom:"24px",padding:2,children:[(0,n.jsxs)(a.xuv,{display:"flex",alignItems:"center",children:[(0,n.jsx)(a.Eep,{src:"/images/oauth-login/".concat(i.provider,".svg"),alt:"".concat(i.provider," icon"),width:"40px",height:"40px"}),(0,n.jsxs)(a.xuv,{display:"flex",flexDirection:"column",children:[(0,n.jsx)(a.xvT,{fontSize:"medium",fontWeight:"bold",marginLeft:"16px",children:i.name}),(0,n.jsx)(a.xvT,{fontSize:"medium",marginLeft:"16px",children:i.identifier})]})]}),(0,n.jsxs)(a.xuv,{flexGrow:1,display:"flex",justifyContent:"flex-end",children:[(0,n.jsx)(a.wpx,{className:"mr-3",onClick:o,"data-testid":"remove-sso-provider-btn",children:"Remove"}),(0,n.jsx)(a.wpx,{className:"mr-3",onClick:t,"data-testid":"edit-sso-provider-btn",children:"Edit"})]}),(0,n.jsx)(k,{isOpen:r,onClose:s,openIDProvider:i}),(0,n.jsx)(a.cVQ,{isOpen:l,onClose:d,onConfirm:g,title:"Remove SSO provider",message:(0,n.jsx)(a.xvT,{children:"You are about to permanently remove this SSO provider. Are you sure you would like to continue?"})})]})},S=()=>{let{onOpen:e,isOpen:i,onClose:t}=(0,a.qY0)(),{data:r}=(0,f.qv)();return(0,n.jsxs)(a.xuv,{maxWidth:"600px",marginTop:"40px",children:[(0,n.jsxs)(a.X6q,{marginBottom:4,fontSize:"lg",display:"flex",justifyContent:"space-between",children:["SSO Providers",r&&r.length<5&&(0,n.jsx)(a.wpx,{onClick:e,"data-testid":"add-sso-provider-btn",children:"Add SSO Provider"})]}),(0,n.jsx)(a.xvT,{marginBottom:"30px",fontSize:"sm",children:"Use this area to add and manage SSO providers for you organization. Select “Add SSO provider” to add a new provider."}),null==r?void 0:r.map(e=>(0,n.jsx)(q,{openIDProvider:e},e.identifier)),(0,n.jsx)(C,{isOpen:i,onClose:t})]})},_=t(83265);let R={description:"",fides_key:_.Av,name:""},T=e=>({...e}),z=e=>({description:e.description,fides_key:e.fides_key,name:e.name}),w=g.Ry().shape({description:g.Z_().required().label("Description"),fides_key:g.Z_().required().label("Organization Fides Key"),name:g.Z_().required().label("Name")}),O=e=>{let{organization:i,onSuccess:t}=e,[r,s]=(0,_.$f)(),o=(0,u.useMemo)(()=>i?T(i):R,[i]),l=(0,a.pmc)(),d=async(e,i)=>{let n=z(e);(r=>{if((0,p.D4)(r)){let e=(0,p.e$)(r.error,"An unexpected error occurred while editing the organization. Please try again.");l((0,x.Vo)(e))}else l((0,x.t5)("Organization configuration saved.")),i.resetForm({values:e}),t&&t(n)})(await r(n))},g=!i||s.isLoading;return(0,n.jsx)(c.J9,{initialValues:o,enableReinitialize:!0,onSubmit:d,validationSchema:w,children:e=>{let{dirty:i,isValid:t}=e;return(0,n.jsx)(c.l0,{"data-testid":"organization-form",children:(0,n.jsxs)(a.Kqy,{spacing:4,children:[(0,n.jsx)(m.j0,{id:"fides_key",name:"fides_key",label:"Fides Key",disabled:!0,tooltip:"A unique key that identifies your organization. Not editable via UI.",variant:"stacked"}),(0,n.jsx)(m.j0,{id:"name",name:"name",label:"Name",disabled:g,tooltip:"User-friendly name for your organization, used in messaging to end-users and other public locations.",variant:"stacked"}),(0,n.jsx)(m.j0,{id:"description",name:"description",label:"Description",disabled:g,tooltip:"Short description of your organization, your services, etc.",variant:"stacked"}),(0,n.jsx)(a.xuv,{textAlign:"right",children:(0,n.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:g||!i||!t,loading:g,"data-testid":"save-btn",children:"Save"})})]})})}})};var P=t(21910),I=()=>{let{data:e}=(0,_.GQ)(_.Av),{plus:i}=(0,s.hz)();return(0,n.jsx)(o.Z,{title:"Organization",children:(0,n.jsxs)(a.xuv,{"data-testid":"organization-management",children:[(0,n.jsx)(l.Z,{heading:"Organization Management"}),(0,n.jsxs)(a.xuv,{maxWidth:"600px",children:[(0,n.jsx)(a.xvT,{pb:6,fontSize:"sm",children:"Please use this section to manage your organization‘s details, including key information that will be recorded in the RoPA (Record of Processing Activities)."}),(0,n.jsx)(a.xuv,{background:"gray.50",padding:2,children:(0,n.jsx)(O,{organization:e})}),i&&(0,n.jsx)(r.ZP,{scopes:[P.Sh.OPENID_PROVIDER_CREATE],children:(0,n.jsx)(S,{})})]})]})})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=85082)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8687],{69489:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/privacy-requests",function(){return n(26819)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i=n(24246),a=n(96306),s=n(88038),r=n.n(s),o=n(86677);n(27378);var l=n(25980),d=n(90867),c=n(42478),u=n(77830),g=()=>{let e=(0,o.useRouter)();return(0,i.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,i.jsxs)(a.xuv,{children:[(0,i.jsxs)(a.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(a.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(a.wpx,{onClick:()=>{e.push(u.AD)},children:"Configure"})]}),(0,i.jsxs)(a.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:n,padded:s=!0,mainProps:u}=e,p=(0,l.hz)(),m=(0,o.useRouter)(),f="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,x=!(p.flags.messagingConfiguration&&f),{data:h}=(0,c.JE)(void 0,{skip:x}),{data:y}=(0,d.PW)(void 0,{skip:x}),v=p.flags.messagingConfiguration&&(!h||!y)&&f;return(0,i.jsxs)(a.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(a.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[v?(0,i.jsx)(g,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),a=n(96306),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:r=!0,children:o,rightContent:l,style:d,...c}=e;return(0,i.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,i.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(a.lQT,{className:n||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(s.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},10342:function(e,t,n){"use strict";var i=n(24246),a=n(96306),s=n(46238);t.Z=e=>{let{title:t,tooltip:n,children:r,...o}=e;return(0,i.jsxs)(a.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...o,children:[(0,i.jsxs)(a.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[t,n?(0,i.jsx)(a.xvT,{as:"span",mx:1,children:(0,i.jsx)(s.b,{label:n})}):void 0]}),(0,i.jsx)(a.Kqy,{p:6,spacing:6,children:r})]})}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return d}});var i=n(24246),a=n(96306),s=n(79894),r=n.n(s),o=n(27378);let{Text:l}=a.AntTypography,d=e=>{let{items:t,...n}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,id:s?"breadcrumb-current-page":void 0,children:o.title})),d)?o.title=(0,i.jsx)(a.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(r(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(a.zrq,{items:s,...n})}},42478:function(e,t,n){"use strict";n.d(t,{FU:function(){return d},JE:function(){return a},Ki:function(){return u},SU:function(){return g},W:function(){return p},h9:function(){return s},jc:function(){return i},qt:function(){return l},sn:function(){return c}});let{useGetEmailInviteStatusQuery:i,useGetActiveMessagingProviderQuery:a,useCreateMessagingConfigurationMutation:s,useCreateMessagingConfigurationSecretsMutation:r,useGetMessagingConfigurationDetailsQuery:o,useGetMessagingConfigurationsQuery:l,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:u,useCreateTestConnectionMessageMutation:g,useDeleteMessagingConfigurationByKeyMutation:p}=n(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,n,i)=>{let a=await i({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"]})})})},26819:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return y}});var i=n(24246),a=n(77213),s=n(58754),r=n(96306),o=n(34090),l=n(55484),d=n(10342),c=n(40324),u=n(812),g=n(41841);let{useGetPrivacyRequestRedactionPatternsQuery:p,useUpdatePrivacyRequestRedactionPatternsMutation:m}=n(78780).u.injectEndpoints({endpoints:e=>({getPrivacyRequestRedactionPatterns:e.query({query:()=>({url:"privacy-request/redaction-patterns",method:"GET"}),providesTags:["Privacy Request Redaction Patterns"]}),updatePrivacyRequestRedactionPatterns:e.mutation({query:e=>({url:"privacy-request/redaction-patterns",method:"PUT",body:e}),invalidatesTags:["Privacy Request Redaction Patterns"]})})}),f=e=>!!(e&&e.trim().length>0),x=l.Ry().shape({patterns:l.IX().nullable().of(l.Ry().shape({id:l.Z_().required(),value:l.Z_().required().test("is-valid-pattern","Pattern cannot be empty",f).label("Pattern")}))});var h=()=>{let{errorAlert:e,successAlert:t}=(0,g.VY)(),{data:n}=p(void 0),[a,{isLoading:s}]=m(),l=async n=>{let i=n.patterns.filter(e=>f(e.value)).map(e=>e.value.trim()),s=await a({patterns:i});(0,u.D4)(s)?e((0,u.e$)(s.error),"Failed to update privacy request redaction patterns"):t("Privacy request redaction patterns updated successfully.")},h={patterns:((null==n?void 0:n.patterns)||[]).map((e,t)=>({id:"pattern-".concat(t),value:e}))};return(0,i.jsx)(r.xuv,{"data-testid":"privacy-request-redaction-patterns",children:(0,i.jsxs)(r.xuv,{maxW:"600px",children:[(0,i.jsx)(r.xvT,{fontSize:"sm",pb:6,children:"List of regex patterns used to mask dataset, collection, and field names in DSR package reports. Names matching these patterns will be replaced with position-based identifiers (e.g. dataset_1, collection_2, field_3)."}),(0,i.jsx)(d.Z,{"data-testid":"privacy-request-redaction-patterns-form",title:"Regex patterns",children:(0,i.jsx)(o.J9,{initialValues:h,enableReinitialize:!0,onSubmit:l,validationSchema:x,validateOnChange:!0,children:e=>{let{dirty:t,values:n,isValid:a}=e;return(0,i.jsxs)(o.l0,{children:[(0,i.jsx)(o.F2,{name:"patterns",render:e=>(0,i.jsxs)(r.kCb,{flexDir:"column",children:[n.patterns.map((t,n)=>(0,i.jsxs)(r.kCb,{flexDir:"row",my:3,children:[(0,i.jsx)(c.j0,{variant:"stacked",name:"patterns[".concat(n,"].value"),placeholder:"Enter regex pattern (e.g., sensitive_.*)"}),(0,i.jsx)(r.wpx,{"aria-label":"remove-pattern",className:"z-[2] ml-4",icon:(0,i.jsx)(r.pJl,{}),onClick:()=>{e.remove(n)}})]},t.id)),(0,i.jsx)(r.kCb,{justifyContent:"center",mt:3,children:(0,i.jsx)(r.wpx,{"aria-label":"add-pattern",className:"w-full",onClick:()=>{e.push({id:"pattern-new-".concat(n.patterns.length),value:""})},children:"Add regex pattern +"})})]})}),(0,i.jsx)(r.xuv,{mt:6,textAlign:"right",children:(0,i.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:s||!t||!a,loading:s,"data-testid":"save-btn",children:"Save"})})]})}})})]})})},y=()=>(0,i.jsxs)(a.Z,{title:"Privacy request redaction patterns",children:[(0,i.jsx)(s.Z,{heading:"Privacy request redaction patterns"}),(0,i.jsx)(h,{})]})}},function(e){e.O(0,[431,1841,2888,9774,179],function(){return e(e.s=69489)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1617],{54543:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]/test-datasets",function(){return i(94010)}])},18225:function(e,t,i){"use strict";var n=i(24246),s=i(96306);t.Z=e=>{let{alignment:t="center",...i}=e;return(0,n.jsx)(s.kCb,{boxSize:"full",align:"center",justify:t,children:(0,n.jsx)(s.$jN,{color:"primary",...i})})}},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return g}});var n=i(24246),s=i(96306),r=i(88038),a=i.n(r),l=i(86677);i(27378);var o=i(25980),d=i(90867),u=i(42478),c=i(77830),f=()=>{let e=(0,l.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(c.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."," "]})]})})},g=e=>{let{children:t,title:i,padded:r=!0,mainProps:c}=e,g=(0,o.hz)(),p=(0,l.useRouter)(),m="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(g.flags.messagingConfiguration&&m),{data:y}=(0,u.JE)(void 0,{skip:h}),{data:v}=(0,d.PW)(void 0,{skip:h}),x=g.flags.messagingConfiguration&&(!y||!v)&&m;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:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[x?(0,n.jsx)(f,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(96306),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:a=!0,children:l,rightContent:o,style:d,...u}=e;return(0,n.jsxs)("div",{...u,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.lQT,{className:i||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:l?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),l]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var n=i(24246),s=i(96306),r=i(79894),a=i.n(r),l=i(27378);let{Text:o}=s.AntTypography,d=e=>{let{items:t,...i}=e,r=(0,l.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,l={...e},d=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,id:r?"breadcrumb-current-page":void 0,children:l.title})),d)?l.title=(0,n.jsx)(s.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,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,n.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,n.jsx)(s.zrq,{items:r,...i})}},41207:function(e,t,i){"use strict";i.d(t,{F:function(){return a},M:function(){return r}});var n=i(76649),s=i(65218);let r=i.n(s)()(()=>i.e(7088).then(i.bind(i,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),a=e=>(0,n.Ln)({name:"string"},e)&&"YAMLException"===e.name},42478:function(e,t,i){"use strict";i.d(t,{FU:function(){return d},JE:function(){return s},Ki:function(){return c},SU:function(){return f},W:function(){return g},h9:function(){return r},jc:function(){return n},qt:function(){return o},sn:function(){return u}});let{useGetEmailInviteStatusQuery:n,useGetActiveMessagingProviderQuery:s,useCreateMessagingConfigurationMutation:r,useCreateMessagingConfigurationSecretsMutation:a,useGetMessagingConfigurationDetailsQuery:l,useGetMessagingConfigurationsQuery:o,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:u,useUpdateMessagingConfigurationSecretsByKeyMutation:c,useCreateTestConnectionMessageMutation:f,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,n)=>{let s=await n({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"]})})})},94010:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return A}});var n=i(24246),s=i(96306),r=i(86677),a=i(27378),l=i(16134),o=i(18225),d=i(77213),u=i(77830),c=i(58754),f=i(1315),g=i(66527),p=i(88340),m=i(812),h=i(46628),y=i(41207),v=i(41966),x=i(94725),b=i(88124);let _=e=>Array.isArray(e)?e.map(e=>_(e)).filter(e=>null!==e):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(e=>{let[t,i]=e;return[t,_(i)]}).filter(e=>{let[,t]=e;return null!==t})):e,j=e=>{if(Array.isArray(e)){let t=e[0];if(!t)return"";let i=t.msg||"",n=t.loc?" (".concat(t.loc,")"):"";return"".concat(i).concat(n)}return e};var C=e=>{let{connectionKey:t}=e,i=(0,s.pmc)(),r=(0,l.T)(),[o]=(0,v.TG)(),[d,u]=(0,a.useState)(""),c=(0,l.C)(b.fD),f=(0,l.C)(b.lR),{data:C,isLoading:k,refetch:T}=(0,x.Eg)(t,{skip:!t}),{data:w,refetch:S}=(0,x.tW)({connectionKey:t,datasetKey:(null==c?void 0:c.fides_key)||"",policyKey:f},{skip:!t||!(null==c?void 0:c.fides_key)||!f});(0,a.useEffect)(()=>{w&&r((0,b.x0)(w.reachable))},[w,r]);let E=(0,a.useMemo)(()=>((null==C?void 0:C.items)||[]).map(e=>({value:e.fides_key,label:e.fides_key})),[null==C?void 0:C.items]);(0,a.useEffect)(()=>{if((null==C?void 0:C.items.length)&&(!c||!C.items.find(e=>e.fides_key===c.fides_key))){let e=C.items[0];r((0,b.w7)(e))}},[C,c,r]),(0,a.useEffect)(()=>{(null==c?void 0:c.ctl_dataset)&&u(g.ZP.dump(_(null==c?void 0:c.ctl_dataset)))},[c]),(0,a.useEffect)(()=>{f&&(null==c?void 0:c.fides_key)&&t&&S()},[f,null==c?void 0:c.fides_key,t,S]),(0,a.useEffect)(()=>{w&&r((0,b.x0)(w.reachable))},[w,r]);let q=async e=>{let t=null==C?void 0:C.items.find(t=>t.fides_key===e);t&&r((0,b.w7)(t))},M=async()=>{let e;if(!c)return;try{e=g.ZP.load(d)}catch(e){i((0,h.Vo)("YAML Parsing Error: ".concat(e instanceof g._L?"".concat(e.reason," ").concat(e.mark?"at line ".concat(e.mark.line):""):"Invalid YAML format")));return}let t=await o(e);if((0,m.D4)(t)){i((0,h.Vo)((0,m.e$)(t.error)));return}r((0,b.w7)({fides_key:c.fides_key,ctl_dataset:t.data})),i((0,h.t5)("Successfully modified dataset")),await T(),await S()},O=async()=>{try{let{data:e}=await T(),t=null==e?void 0:e.items.find(e=>e.fides_key===(null==c?void 0:c.fides_key));(null==t?void 0:t.ctl_dataset)&&u(g.ZP.dump(_(t.ctl_dataset))),i((0,h.t5)("Successfully refreshed datasets"))}catch(e){i((0,h.Vo)((0,m.e$)(e)))}};return(0,n.jsxs)(s.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",maxHeight:"100vh",children:[(0,n.jsxs)(s.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsx)(s.xvT,{children:"Edit dataset: "}),(0,n.jsx)(s.WPr,{id:"format","data-testid":"export-format-select",value:(null==c?void 0:c.fides_key)||"",options:E,onChange:q,className:"w-64"}),(0,n.jsx)(p.Z,{copyText:d})]}),(0,n.jsxs)(s.Ugi,{spacing:2,children:[(0,n.jsx)(s.esZ,{title:"Refresh to load the latest data from the database. This will overwrite any unsaved local changes.",placement:"top",children:(0,n.jsx)(s.wpx,{htmlType:"submit",size:"small","data-testid":"refresh-btn",onClick:O,loading:k,children:"Refresh"})}),(0,n.jsx)(s.esZ,{title:"Save your changes to update the dataset in the database.",placement:"top",children:(0,n.jsx)(s.wpx,{htmlType:"submit",size:"small",onClick:M,children:"Save"})})]})]}),(0,n.jsx)(s.Kqy,{border:"1px solid",borderColor:"gray.200",borderRadius:"md",justifyContent:"space-between",py:4,pr:4,"data-testid":"empty-state",flex:"1 1 auto",minHeight:"200px",children:(0,n.jsx)(y.M,{defaultLanguage:"yaml",value:d,height:"100%",onChange:e=>u(e||""),onMount:()=>{},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!1},readOnly:!1,hideCursorInOverviewRuler:!0,overviewRulerBorder:!1,scrollBeyondLastLine:!1},theme:"light"})}),w&&(0,n.jsx)(s.Kqy,{backgroundColor:(null==w?void 0:w.reachable)?"green.50":"red.50",border:"1px solid",borderColor:(null==w?void 0:w.reachable)?"green.500":"red.500",borderRadius:"md",p:2,flexShrink:0,mt:2,children:(0,n.jsx)(s.Ugi,{alignItems:"center",children:(0,n.jsxs)(s.Ugi,{flex:"1",children:[(null==w?void 0:w.reachable)?(0,n.jsx)(s.StI,{}):(0,n.jsx)(s.f9v,{}),(0,n.jsx)(s.xvT,{fontSize:"sm",whiteSpace:"pre-wrap",children:(null==w?void 0:w.reachable)?"Dataset is reachable":"Dataset is not reachable. ".concat(j(null==w?void 0:w.details))})]})})})]})},k=i(54458),T=i(16125),w=i(99716);let S=e=>{let t=new Date(e);return(0,k.WU)(t,"yyyy-MM-dd HH:mm:ss.SSS")},E=e=>{switch(e){case"ERROR":return"red.500";case"WARNING":return"orange.500";case"INFO":return"blue.500";default:return"gray.500"}},q=(0,a.memo)(e=>{let{log:t}=e;return(0,n.jsxs)(s.xuv,{as:"pre",margin:0,fontSize:"xs",fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word",children:[(0,n.jsx)(s.xvT,{as:"span",color:"green.500",children:S(t.timestamp)}),(0,n.jsx)(s.xvT,{as:"span",children:" | "}),(0,n.jsx)(s.xvT,{as:"span",color:E(t.level),children:t.level.padEnd(8)}),(0,n.jsx)(s.xvT,{as:"span",children:" | "}),(0,n.jsx)(s.xvT,{as:"span",color:"cyan.500",children:t.module_info}),(0,n.jsx)(s.xvT,{as:"span",children:" - "}),(0,n.jsx)(s.xvT,{as:"span",color:"ERROR"===t.level||"WARNING"===t.level?E(t.level):"gray.800",children:t.message})]})});q.displayName="LogLine";var M=(0,a.memo)(()=>{let e=(0,l.T)(),t=(0,a.useRef)(null),i=(0,T.v9)(b.HN),r=(0,T.v9)(b.pz),{data:o}=(0,w.fV)({privacy_request_id:i},{skip:!i,pollingInterval:1e3});(0,a.useEffect)(()=>{o&&e((0,b.Hy)(o))},[o,e]);let d=(0,a.useCallback)(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[]);(0,a.useEffect)(()=>{d()},[r,d]);let u=(0,a.useMemo)(()=>(null==r?void 0:r.map(e=>"".concat(S(e.timestamp)," | ").concat(e.level," | ").concat(e.module_info," - ").concat(e.message)).join("\n"))||"",[r]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:(0,n.jsxs)(s.Ugi,{children:[(0,n.jsx)(s.xvT,{children:"Test logs"}),(0,n.jsx)(p.Z,{copyText:u})]})}),(0,n.jsx)(s.xuv,{ref:t,height:"200px",overflowY:"auto",borderWidth:1,borderColor:"gray.200",borderRadius:"md",p:2,children:null==r?void 0:r.map(e=>(0,n.jsx)(q,{log:e},"".concat(e.timestamp,"-").concat(e.module_info,"-").concat(e.message)))})]})}),O=i(46238);let{useGetPoliciesQuery:R}=i(78780).u.injectEndpoints({endpoints:e=>({getPolicies:e.query({query:()=>({url:"/dsr/policy"}),providesTags:()=>["Policies"]})})});var P=i(21910),N=i(31883),I=e=>{let{connectionKey:t}=e,i=(0,s.pmc)(),r=(0,l.T)(),[o]=(0,x.s7)(),d=(0,T.v9)(b.fD),u=(0,T.v9)(b.YS),c=(0,T.v9)(b.Af),f=(0,T.v9)(b.zn),g=(0,T.v9)(b.lR),y=(0,T.v9)(b.M_),v=(0,T.v9)(b.HN),[_,j]=(0,a.useState)("{}");(0,a.useEffect)(()=>{d&&j(JSON.stringify(f,null,2))},[d,f]);let{data:C,error:k}=(0,w.Z2)({privacy_request_id:v},{skip:!v||!(null==d?void 0:d.fides_key),pollingInterval:2e3}),{refetch:S}=(0,w.fV)({privacy_request_id:v},{skip:!v}),{refetch:E}=(0,x.I1)({connectionKey:t,datasetKey:(null==d?void 0:d.fides_key)||""},{skip:!t||!(null==d?void 0:d.fides_key),refetchOnMountOrArgChange:!0}),{data:q}=R(),M=(0,a.useMemo)(()=>((null==q?void 0:q.items)||[]).filter(e=>{var t;return null===(t=e.rules)||void 0===t?void 0:t.some(e=>"access"===e.action_type)}).map(e=>({value:e.key,label:e.name})),[null==q?void 0:q.items]);(0,a.useEffect)(()=>{let e=null==d?void 0:d.fides_key;t&&e&&E().then(t=>{t.data&&(null==d?void 0:d.fides_key)===e&&r((0,b.qD)({datasetKey:e,values:t.data}))})},[d,t,r,E]),(0,a.useEffect)(()=>{let e=null==d?void 0:d.fides_key;if(k&&"status"in k&&404===k.status){r((0,b.hT)()),i((0,h.Vo)("Test run failed"));return}if(!C||C.privacy_request_id!==v||!e)return;let t={datasetKey:e,values:JSON.stringify(C,null,2)};C.status===P.q2.COMPLETE?y&&S().then(()=>{r((0,b.EO)(t)),r((0,b.hT)()),i((0,h.t5)("Test run completed successfully"))}):C.status===P.q2.ERROR&&S().then(()=>{r((0,b.EO)(t)),r((0,b.hT)()),i((0,h.Vo)("Test run failed"))})},[C,k,v,d,y,r,i,S]);let I=(0,a.useMemo)(()=>g&&(null==q?void 0:q.items)?g:null,[g,null==q?void 0:q.items]),D=async()=>{if((null==d?void 0:d.fides_key)&&g)try{let e;try{e=JSON.parse(_)}catch(e){i((0,h.Vo)("Invalid JSON in test input"));return}r((0,b.Vh)(d.fides_key)),i((0,h.t5)("Test run started"));let n=await o({connection_key:t,dataset_key:d.fides_key,identities:e,policy_key:g});(0,N.D4)(n)?(i((0,h.Vo)((0,m.e$)(n.error))),r((0,b.hT)())):"data"in n?r((0,b.eY)(n.data.privacy_request_id)):(r((0,b.hT)()),i((0,h.Vo)("No privacy request ID in response")))}catch(e){r((0,b.hT)()),i((0,h.Vo)("Failed to start test run"))}};return(0,n.jsxs)(s.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",minHeight:"0",children:[(0,n.jsxs)(s.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsx)(s.xvT,{children:"Test inputs"}),(0,n.jsx)(p.Z,{copyText:_})]}),(0,n.jsxs)(s.Ugi,{children:[(0,n.jsx)(s.WPr,{id:"policy","aria-label":"Policy selector","data-testid":"policy-select",placeholder:"Select policy",value:I,options:M,onChange:e=>{r((0,b.kF)(e))},className:"w-64"}),(0,n.jsx)(s.wpx,{htmlType:"submit",size:"small",type:"primary","data-testid":"run-btn",onClick:y?()=>{r((0,b.qU)()),i((0,h.t5)("Test manually stopped by user"))}:D,disabled:!g||!u,children:y?"Stop":"Run"}),(0,n.jsx)(O.b,{label:y?"Stop the currently running test":"Run a test access request using the provided test input data and the selected access policy"})]})]}),(0,n.jsx)(s.gxH,{size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:y,height:"100%",value:_,onChange:e=>{let t=e.target.value;j(t);try{let e=JSON.parse(t);d&&r((0,b.qD)({datasetKey:d.fides_key,values:e}))}catch(e){}}}),(0,n.jsxs)(s.X6q,{as:"h3",size:"sm",children:["Test results ",(0,n.jsx)(p.Z,{copyText:c})]}),(0,n.jsx)(s.gxH,{isReadOnly:!0,size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:!1,height:"100%",value:c})]})};let D=e=>e.id?Array.isArray(e.id)?e.id[0]:e.id:"";var A=()=>{var e;let t=(0,r.useRouter)(),i=(0,l.T)(),g=D(t.query),{data:p,isLoading:m}=(0,f.rn)(g,{skip:!g}),h=(null==p?void 0:null===(e=p.connection_configs)||void 0===e?void 0:e.key)||"";return((0,a.useEffect)(()=>{i((0,f.db)(p))},[p,i]),m)?(0,n.jsx)(d.Z,{title:"Systems",children:(0,n.jsx)(o.Z,{})}):(0,n.jsxs)(d.Z,{title:"System inventory",mainProps:{height:"100vh",display:"flex",flexDirection:"column"},children:[(0,n.jsx)(c.Z,{heading:"System inventory",breadcrumbItems:[{title:"System inventory",href:u.So},{title:(null==p?void 0:p.name)||"",href:"/systems/configure/".concat(g,"#integrations")},{title:"Test datasets"}]}),(0,n.jsxs)(s.gCW,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",padding:"0",children:[(0,n.jsxs)(s.Ugi,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",maxHeight:"60vh",children:[(0,n.jsx)(C,{connectionKey:h}),(0,n.jsx)(I,{connectionKey:h})]}),(0,n.jsx)(s.xuv,{flex:"0 0 auto",children:(0,n.jsx)(M,{})})]})]})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=i(19043)},76737:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{default:function(){return l},noSSR:function(){return a}});let n=i(51538);i(24246),i(27378);let s=n._(i(21887));function r(e){return{default:(null==e?void 0:e.default)||e}}function a(e,t){return delete t.webpack,delete t.modules,e(t)}function l(e,t){let i=s.default,n={loading:e=>{let{error:t,isLoading:i,pastDelay:n}=e;return null}};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e});let l=(n={...n,...t}).loader;return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?i({...n,loader:()=>null!=l?l().then(r):Promise.resolve(r(()=>null))}):(delete n.webpack,delete n.modules,a(i,n))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28438:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let n=i(51538)._(i(27378)).default.createContext(null)},21887:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let n=i(51538)._(i(27378)),s=i(28438),r=[],a=[],l=!1;function o(e){let t=e(),i={loading:!0,loaded:null,error:null};return i.promise=t.then(e=>(i.loading=!1,i.loaded=e,e)).catch(e=>{throw i.loading=!1,i.error=e,e}),i}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let i=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),r=null;function o(){if(!r){let t=new d(e,i);r={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return r.promise()}if(!l){let e=i.webpack?i.webpack():i.modules;e&&a.push(t=>{for(let i of e)if(t.includes(i))return o()})}function u(e,t){!function(){o();let e=n.default.useContext(s.LoadableContext);e&&Array.isArray(i.modules)&&i.modules.forEach(t=>{e(t)})}();let a=n.default.useSyncExternalStore(r.subscribe,r.getCurrentValue,r.getCurrentValue);return n.default.useImperativeHandle(t,()=>({retry:r.retry}),[]),n.default.useMemo(()=>{var t;return a.loading||a.error?n.default.createElement(i.loading,{isLoading:a.loading,pastDelay:a.pastDelay,timedOut:a.timedOut,error:a.error,retry:r.retry}):a.loaded?n.default.createElement((t=a.loaded)&&t.default?t.default:t,e):null},[e,a])}return u.preload=()=>o(),u.displayName="LoadableComponent",n.default.forwardRef(u)}(o,e)}function c(e,t){let i=[];for(;e.length;){let n=e.pop();i.push(n(t))}return Promise.all(i).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(r).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let i=()=>(l=!0,t());c(a,e).then(i,i)})),window.__NEXT_PRELOADREADY=u.preloadReady;let f=u},65218:function(e,t,i){e.exports=i(76737)}},function(e){e.O(0,[6527,2888,9774,179],function(){return e(e.s=54543)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3691],{8828:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]",function(){return s(82657)}])},18225:function(e,t,s){"use strict";var n=s(24246),i=s(96306);t.Z=e=>{let{alignment:t="center",...s}=e;return(0,n.jsx)(i.kCb,{boxSize:"full",align:"center",justify:t,children:(0,n.jsx)(i.$jN,{color:"primary",...s})})}},82657:function(e,t,s){"use strict";s.r(t);var n=s(24246),i=s(96306),r=s(86677),a=s(27378),l=s(16134),d=s(25980),u=s(18225),c=s(812),o=s(14048),f=s(77213),x=s(77830),h=s(58754),m=s(32885),y=s(1315),j=s(57865),g=s(72774),_=s(72250);t.default=()=>{let e=(0,r.useRouter)(),t=(0,l.T)(),s="";e.query.id&&(s=Array.isArray(e.query.id)?e.query.id[0]:e.query.id);let{data:p,isLoading:b}=(0,y.rn)(s,{skip:!s}),{error:v,isLoading:w}=(0,m.Rd)(),{tcf:C,plus:N}=(0,d.hz)(),Z=(0,l.C)(j.gU);(0,a.useEffect)(()=>{if(t((0,y.db)(p)),p){let e=C&&!!p.vendor_id&&(0,c.cj)(p.vendor_id)===c.c6.GVL;t((0,j.gQ)(e))}else(0,j.gQ)(!1)},[p,t,C]);let{tabData:k,activeKey:E,onTabChange:S}=(0,_.Z)({isCreate:!1});return(b||w)&&!v?(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsx)(u.Z,{})}):p?(0,n.jsxs)(f.Z,{title:"System inventory",mainProps:{w:"calc(100vw - 240px)"},children:[(0,n.jsx)(h.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems",href:x.So},{title:(null==p?void 0:p.name)||""}]}),(0,n.jsx)(i.A5g,{activeKey:E,onChange:S,items:k,className:"w-full",tabBarExtraContent:N&&(0,n.jsxs)(i.wpx,{size:"small",className:"absolute right-2 top-2","data-testid":"integration-page-btn",onClick:()=>e.push(x.KH),children:[(0,n.jsx)(i.xvT,{children:"Integrations"}),(0,n.jsx)(o.A5,{marginLeft:2})]}),renderTabBar:(e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t,{...e}),Z&&(0,n.jsx)(g.Z,{})]})})]}):(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsxs)(i.xvT,{"data-testid":"system-not-found",children:["Could not find a system with id ",s]})})}}},function(e){e.O(0,[431,8765,9278,5163,699,5277,4164,401,9951,4808,4844,4786,2888,9774,179],function(){return e(e.s=8828)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3691],{8828:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]",function(){return s(82657)}])},18225:function(e,t,s){"use strict";var n=s(24246),i=s(96306);t.Z=e=>{let{alignment:t="center",...s}=e;return(0,n.jsx)(i.kCb,{boxSize:"full",align:"center",justify:t,children:(0,n.jsx)(i.$jN,{color:"primary",...s})})}},82657:function(e,t,s){"use strict";s.r(t);var n=s(24246),i=s(96306),r=s(86677),a=s(27378),l=s(16134),d=s(25980),u=s(18225),c=s(812),o=s(14048),f=s(77213),x=s(77830),h=s(58754),m=s(32885),y=s(1315),j=s(57865),g=s(72774),_=s(72250);t.default=()=>{let e=(0,r.useRouter)(),t=(0,l.T)(),s="";e.query.id&&(s=Array.isArray(e.query.id)?e.query.id[0]:e.query.id);let{data:p,isLoading:b}=(0,y.rn)(s,{skip:!s}),{error:v,isLoading:w}=(0,m.Rd)(),{tcf:C,plus:N}=(0,d.hz)(),Z=(0,l.C)(j.gU);(0,a.useEffect)(()=>{if(t((0,y.db)(p)),p){let e=C&&!!p.vendor_id&&(0,c.cj)(p.vendor_id)===c.c6.GVL;t((0,j.gQ)(e))}else(0,j.gQ)(!1)},[p,t,C]);let{tabData:k,activeKey:E,onTabChange:S}=(0,_.Z)({isCreate:!1});return(b||w)&&!v?(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsx)(u.Z,{})}):p?(0,n.jsxs)(f.Z,{title:"System inventory",mainProps:{w:"calc(100vw - 240px)"},children:[(0,n.jsx)(h.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems",href:x.So},{title:(null==p?void 0:p.name)||""}]}),(0,n.jsx)(i.A5g,{activeKey:E,onChange:S,items:k,className:"w-full",tabBarExtraContent:N&&(0,n.jsxs)(i.wpx,{size:"small",className:"absolute right-2 top-2","data-testid":"integration-page-btn",onClick:()=>e.push(x.KH),children:[(0,n.jsx)(i.xvT,{children:"Integrations"}),(0,n.jsx)(o.A5,{marginLeft:2})]}),renderTabBar:(e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t,{...e}),Z&&(0,n.jsx)(g.Z,{})]})})]}):(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsxs)(i.xvT,{"data-testid":"system-not-found",children:["Could not find a system with id ",s]})})}}},function(e){e.O(0,[431,8765,9278,5163,699,5277,1841,409,401,9951,6416,6780,4786,2888,9774,179],function(){return e(e.s=8828)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3785],{90988:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems",function(){return s(6557)}])},30952:function(e,t,s){"use strict";s.d(t,{f:function(){return o}});var l=s(24246),a=s(66726),n=s.n(a),i=s(27378),r=s(26917);let o=e=>{let{value:t,onChange:s,placeholder:a,...o}=e,[d,u]=(0,i.useState)(t);(0,i.useEffect)(()=>{u(t||"")},[t]);let c=n()(s,500),p=(0,i.useCallback)(e=>{u(e),c(e)},[]);return(0,l.jsx)(r.Z,{value:d,onChange:p,onClear:()=>{u(""),s("")},placeholder:a,...o})}},35287:function(e,t,s){"use strict";var l=s(24246),a=s(96306),n=s(88038),i=s.n(n);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:n}=e;return(0,l.jsxs)(a.kCb,{"data-testid":s,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,l.jsxs)(i(),{children:[(0,l.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,l.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,l.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,l.jsx)(a.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...n,children:t})]})}},58754:function(e,t,s){"use strict";var l=s(24246),a=s(96306),n=s(70788);t.Z=e=>{let{heading:t,breadcrumbItems:s,isSticky:i=!0,children:r,rightContent:o,style:d,...u}=e;return(0,l.jsxs)("div",{...u,style:i?{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,l.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,l.jsx)(a.lQT,{className:s||r?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,l.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!s&&(0,l.jsx)(n.m,{className:r?"pb-4":void 0,items:s,"data-testid":"page-breadcrumb"}),r]})}},19904:function(e,t,s){"use strict";s.d(t,{Tg:function(){return i}});var l=s(24246),a=s(16134),n=s(31793);let i=e=>(0,a.C)(n.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:s}=e;return i(t)?(0,l.jsx)(l.Fragment,{children:s}):null}},97181:function(e,t,s){"use strict";s.d(t,{d:function(){return d}});var l=s(24246),a=s(96306),n=s(34090),i=s(27378),r=s(46238),o=s(40324);let d=e=>{let{name:t,label:s,labelProps:d,tooltip:u,isRequired:c,layout:p="inline",helperText:m,...g}=e,[y,h,{setValue:v}]=(0,n.U$)(t),x=!!(h.touched&&h.error),[f,j]=(0,i.useState)("");y.value||"tags"!==g.mode&&"multiple"!==g.mode||(y.value=[]),"tags"===g.mode&&"string"==typeof y.value&&(y.value=[y.value]);let k="tags"===g.mode?(e,t)=>e?e.value!==f||y.value.includes(f)?g.optionRender?g.optionRender(e,t):e.label:'Create "'.concat(f,'"'):void 0:g.optionRender||void 0,b=e=>{j(e),g.onSearch&&g.onSearch(e)},S=(e,t)=>{v(e),g.onChange&&g.onChange(e,t)};return"inline"===p?(0,l.jsx)(a.NIc,{isInvalid:x,isRequired:c,children:(0,l.jsxs)(a.rjZ,{templateColumns:s?"1fr 3fr":"1fr",children:[s?(0,l.jsx)(o.__,{htmlFor:g.id||t,...d,children:s}):null,(0,l.jsxs)(a.jqI,{align:"center",children:[(0,l.jsxs)(a.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(a.WPr,{...y,id:g.id||t,"data-testid":"controlled-select-".concat(y.name),...g,optionRender:k,onSearch:"tags"===g.mode?b:void 0,onChange:S,value:y.value||void 0,status:x?"error":void 0}),m&&(0,l.jsx)(a.Q6r,{children:m}),(0,l.jsx)(o.Bc,{isInvalid:x,message:h.error,fieldName:y.name})]}),(0,l.jsx)(r.b,{label:u,className:x?"mt-2 self-start":void 0})]})]})}):(0,l.jsx)(a.NIc,{isInvalid:x,isRequired:c,children:(0,l.jsxs)(a.gCW,{alignItems:"start",children:[(0,l.jsxs)(a.jqI,{align:"center",children:[s?(0,l.jsx)(o.__,{htmlFor:g.id||t,fontSize:"xs",my:0,mr:1,...d,children:s}):null,(0,l.jsx)(r.b,{label:u})]}),(0,l.jsx)(a.WPr,{...y,id:g.id||t,"data-testid":"controlled-select-".concat(y.name),...g,optionRender:k,onSearch:"tags"===g.mode?b:void 0,onChange:S,value:y.value||void 0,status:x?"error":void 0}),m&&(0,l.jsx)(a.Q6r,{style:{marginTop:0},children:m}),(0,l.jsx)(o.Bc,{isInvalid:x,message:h.error,fieldName:y.name})]})})}},34929:function(e,t,s){"use strict";var l=s(24246),a=s(64925),n=s.n(a),i=s(27378),r=s(16134),o=s(30002),d=s(28079),u=s(57072);let c=()=>{let{isLoading:e}=(0,d.fd)(),t=(0,r.C)(d.U3),{isLoading:s}=(0,u.MO)(),l=(0,r.C)(u.qb),{isLoading:a}=(0,o.te)();return{dataUses:t,dataSubjects:(0,r.C)(o.ZL),dataCategories:l,isLoading:e||s||a}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:s,isLoading:a}=c(),r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},o=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=t(e);if(!l)return{};let a=t(r(e,s)),n=!!l.parent_key;return{name:l.name||void 0,primaryName:n&&(null==a?void 0:a.name)!==l.name&&(null==a?void 0:a.name)||void 0}},d=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:a,primaryName:n}=o(e,t,s);return a?n?(0,l.jsxs)(i.Fragment,{children:[(0,l.jsxs)("strong",{children:[n,":"]})," ",a]},e):(0,l.jsx)("strong",{children:a},e):e},u=t=>n()(e,{fides_key:t}),p=e=>n()(t,{fides_key:e}),m=e=>n()(s,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:u,getDataUseDisplayName:e=>d(e,u,1),getDataUseDisplayNameProps:e=>o(e,u,1),getDataCategories:()=>t,getDataCategoryByKey:p,getDataCategoryDisplayName:e=>d(e,p,2),getDataCategoryDisplayNameProps:e=>o(e,p,2),getDataSubjects:()=>s,getDataSubjectByKey:m,getDataSubjectDisplayName:e=>{let t=m(e);return t?t.name:e},getPrimaryKey:r,isLoading:a}}},70788:function(e,t,s){"use strict";s.d(t,{m:function(){return d}});var l=s(24246),a=s(96306),n=s(79894),i=s.n(n),r=s(27378);let{Text:o}=a.AntTypography,d=e=>{let{items:t,...s}=e,n=(0,r.useMemo)(()=>null==t?void 0:t.map((e,s)=>{let n=s===t.length-1,r={...e},d=r.onClick&&!r.href;return("string"==typeof r.title&&(r.title=(0,l.jsx)(o,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,id:n?"breadcrumb-current-page":void 0,children:r.title})),d)?r.title=(0,l.jsx)(a.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,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"anticon align-text-bottom",children:r.icon}),r.title]})),r.href&&r.title&&(r.title=(0,l.jsx)(i(),{href:r.href,className:"ant-breadcrumb-link",children:r.title}),delete r.href)),r}),[t]);return(0,l.jsx)(a.zrq,{items:n,...s})}},99640:function(e,t,s){"use strict";s.d(t,{Z:function(){return d}});var l=s(24246),a=s(96306),n=s(79894),i=s.n(n);let{Link:r,Text:o}=a.AntTypography,d=e=>{let{href:t,children:s,...a}=e;return t?(0,l.jsx)(i(),{href:t,passHref:!0,legacyBehavior:!0,children:(0,l.jsx)(r,{strong:!0,ellipsis:!0,onClick:e=>e.stopPropagation(),...a,children:s})}):(0,l.jsx)(o,{strong:!0,ellipsis:!0,...a,children:s})}},2525:function(e,t,s){"use strict";s.d(t,{Q:function(){return r}});var l=s(24246),a=s(96306),n=s(27378),i=s(3110);let r=e=>{let{values:t,columnState:s,tagProps:r,onTagClose:o,...d}=e,{isExpanded:u,isWrapped:c,version:p}=s||{},[m,g]=(0,n.useState)(!u),[y,h]=(0,n.useState)(!!c),[v,x]=(0,n.useState)(u?t:null==t?void 0:t.slice(0,2));(0,n.useEffect)(()=>{g(!u)},[u,p]),(0,n.useEffect)(()=>{h(!!c)},[c]),(0,n.useEffect)(()=>{(null==t?void 0:t.length)&&x(m?t.slice(0,2):t)},[m,t]);let f=(0,n.useCallback)(()=>{x(null==t?void 0:t.slice(0,2)),g(!0)},[t]),j=(0,n.useCallback)(()=>{g(!1)},[]),k=(0,n.useCallback)(()=>{m?j():f()},[m,j,f]);return(0,n.useMemo)(()=>(null==v?void 0:v.length)?(0,l.jsxs)(a.jqI,{align:m?"center":"start",wrap:y?"wrap":"nowrap",vertical:!m,gap:"small","data-testid":"tag-expandable-cell",...d,children:[v.map(e=>(0,l.jsx)(a.j8w,{color:"white","data-testid":e.key,onClose:o?()=>o(e.key):void 0,...r,...e.tagProps,children:(0,l.jsx)(a.lKn,{ellipsis:!!m&&{tooltip:!0},style:{color:"inherit",maxWidth:m?i.TD:void 0},children:e.label})},e.key)),t&&t.length>2&&(0,l.jsx)(a.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),k()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:m?"+".concat(t.length-2," more"):i.T5})]}):(0,l.jsx)("span",{"data-testid":"tag-expandable-cell-empty"}),[v,m,y,d,t,r,o,k])}},3110:function(e,t,s){"use strict";s.d(t,{DI:function(){return r},T5:function(){return n},TD:function(){return i}});var l=s(24246),a=s(96306);let n="show less",i=150,r=[{key:"expand-all",label:"Expand all",icon:(0,l.jsx)(a.PJP.jbG,{})},{key:"collapse-all",label:"Collapse all",icon:(0,l.jsx)(a.PJP.MVB,{})}]},26070:function(e,t,s){"use strict";s.d(t,{v:function(){return o},Q:function(){return d.Q}});var l=s(24246),a=s(96306),n=s(27378),i=s(3110);let{Text:r}=a.AntTypography,o=e=>{let{values:t,valueSuffix:s,columnState:o}=e,{isExpanded:d,version:u}=o||{},[c,p]=(0,n.useState)(!d);(0,n.useEffect)(()=>{p(!d)},[d,u]);let m=(0,n.useCallback)(()=>{p(!0)},[]),g=(0,n.useCallback)(()=>{p(!1)},[]),y=(0,n.useCallback)(()=>{c?g():m()},[c,g,m]);return(0,n.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,l.jsx)(r,{ellipsis:!0,"data-testid":"list-expandable-cell-single",children:t[0]}):(0,l.jsxs)(a.jqI,{align:c?"center":"flex-start",vertical:!c,gap:c?"small":"none","data-testid":"list-expandable-cell",children:[c?(0,l.jsxs)(r,{ellipsis:!0,children:[t.length," ",s]}):(0,l.jsx)(a.krs,{dataSource:t,renderItem:e=>(0,l.jsx)("li",{children:e})}),(0,l.jsx)(a.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),y()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:c?"view":i.T5})]}):null,[c,t,s,y])};var d=s(2525)},8125:function(e,t,s){"use strict";s.d(t,{V:function(){return n},o:function(){return d}});var l=s(27378),a=s(32735);let n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{enableSelection:s=!1,getRowKey:n,bulkActions:i,isLoading:r=!1,isFetching:o=!1,dataSource:d=[],totalRows:u=0,currentPage:c,pageSize:p,customTableProps:m={}}=t,g=(0,l.useCallback)(e=>{if(e&&"object"==typeof e){if(e.id)return String(e.id);if(e.key)return String(e.key)}return String(e)},[]),y=n||g,[h,v]=(0,l.useState)([]),[x,f]=(0,l.useState)([]),j=(0,l.useCallback)(()=>{v([]),f([])},[]),k=(0,l.useMemo)(()=>({selectedRowKeys:h,selectedRows:x,resetSelections:j}),[h,x,j]),b=(0,l.useMemo)(()=>{if(s)return{selectedRowKeys:h,onChange:(e,t)=>{v(e),f(t)}}},[s,h]),S=(0,l.useCallback)((t,s,l)=>{var a,n;let i=null!==(a=t.current)&&void 0!==a?a:e.pageIndex,r=null!==(n=t.pageSize)&&void 0!==n?n:e.pageSize,o=i!==e.pageIndex||r!==e.pageSize;o?(t.current&&t.current!==e.pageIndex&&e.updatePageIndex(t.current),t.pageSize&&t.pageSize!==e.pageSize&&e.updatePageSize(t.pageSize)):e.updateFilters(s||{});let d=l&&!Array.isArray(l)?l.field:void 0,u=l&&!Array.isArray(l)&&null!==l.order?l.order:void 0;o||e.updateSorting(d,u)},[e]),_=(0,l.useMemo)(()=>{var t,s,l,n,i;return{current:null!=c?c:e.pageIndex,pageSize:null!=p?p:e.pageSize,total:u,showSizeChanger:null===(n=null===(t=e.paginationConfig)||void 0===t?void 0:t.showSizeChanger)||void 0===n||n,pageSizeOptions:null!==(i=null===(l=e.paginationConfig)||void 0===l?void 0:null===(s=l.pageSizeOptions)||void 0===s?void 0:s.map(String))&&void 0!==i?i:a.VZ}},[c,e.pageIndex,p,e.pageSize,u,e.paginationConfig]),C=(0,l.useMemo)(()=>({dataSource:d,loading:r||o,pagination:_,onChange:S,rowKey:y,scroll:{x:"max-content",scrollToFirstRowOnChange:!0},size:"small",bordered:!0,...m}),[d,r,o,_,S,y,m]),E=h.map(String),w=x.length>0,N=(0,l.useCallback)(e=>{let t=null==i?void 0:i.actions.find(t=>t.key===e);return t?{disabled:!w||!!t.disabled&&t.disabled(x),loading:t.loading||!1,onClick:()=>t.onClick(x)}:{disabled:!0,loading:!1}},[i,w,x]);return(0,l.useMemo)(()=>({tableProps:C,selectionProps:b,selectionState:k,selectedRows:x,selectedKeys:E,hasSelectedRows:w,resetSelections:j,getBulkActionProps:N,isLoadingOrFetching:r||o,hasData:d.length>0}),[C,b,k,x,E,w,j,N,r,o,d.length])};var i=s(40431),r=s(41841);let o=()=>({filters:(0,i.WJ)(e=>e).withDefault({})}),d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{pagination:t={},sorting:s={},search:a={},onStateChange:n}=e,{pageIndex:d,pageSize:u,resetPagination:c,updatePageIndex:p,updatePageSize:m,pageSizeOptions:g,showSizeChanger:y}=(0,r.h0)(t),{sortKey:h,sortOrder:v,updateSorting:x,resetSorting:f}=(0,r.rK)(s),{searchQuery:j,updateSearch:k,resetSearch:b}=(0,r.Rx)(a),S=(0,l.useMemo)(()=>o(),[]),[_,C]=(0,i.XI)(S,{history:"push"}),E=(0,l.useMemo)(()=>{var e;return{pageIndex:d,pageSize:u,sortKey:h,sortOrder:v,columnFilters:null!==(e=_.filters)&&void 0!==e?e:{},searchQuery:j}},[_,d,u,h,v,j]),w=(0,l.useCallback)((e,t)=>{x(e,t),c()},[x,c]),N=(0,l.useCallback)(e=>{let t=Object.fromEntries(Object.entries(e).filter(e=>{let[,t]=e;return null!=t}));C({filters:Object.keys(t).length>0?t:null}),c()},[C,c]),T=(0,l.useCallback)(e=>{k(e),c()},[k,c]),O=(0,l.useCallback)(()=>{C({filters:null}),c(),f(),b()},[C,c,f,b]);return(0,l.useEffect)(()=>{n&&n(E)},[E,n]),{state:E,pageIndex:E.pageIndex,pageSize:E.pageSize,updatePageIndex:p,updatePageSize:m,sortKey:E.sortKey,sortOrder:E.sortOrder,updateSorting:w,columnFilters:E.columnFilters,updateFilters:N,searchQuery:E.searchQuery,updateSearch:T,resetState:O,paginationConfig:{pageSizeOptions:g,showSizeChanger:y}}}},33335:function(e,t,s){"use strict";s.d(t,{E:function(){return l}});let l=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")},95782:function(e,t,s){"use strict";s.d(t,{Nr:function(){return a},QD:function(){return l},Xz:function(){return n}});let{useGetAllSystemGroupsQuery:l,useCreateSystemGroupMutation:a,useUpdateSystemGroupMutation:n,useDeleteSystemGroupMutation:i}=s(78780).u.injectEndpoints({endpoints:e=>({getAllSystemGroups:e.query({query:()=>({url:"system-groups"}),providesTags:()=>["System Groups"]}),createSystemGroup:e.mutation({query:e=>({url:"system-groups",method:"POST",body:e}),invalidatesTags:["System Groups","System"]}),updateSystemGroup:e.mutation({query:e=>({url:"system-groups/".concat(e.fides_key),method:"PUT",body:e}),invalidatesTags:["System Groups","System"]}),deleteSystemGroup:e.mutation({query:e=>({url:"system-groups/".concat(e),method:"DELETE"}),invalidatesTags:["System Groups","System"]})})})},6557:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return J}});var l=s(24246),a=s(96306),n=s(27378),i=s(35287),r=s(58754),o=s(30952),d=s(25980),u=s(34090),c=s(83766),p=s.n(c),m=s(55484),g=s(97181),y=s(40324),h=s(28079),v=s(1315),x=s(21910);let f={[x.Ej.TAXONOMY_WHITE]:"default",[x.Ej.TAXONOMY_RED]:"error",[x.Ej.TAXONOMY_ORANGE]:"warning",[x.Ej.TAXONOMY_YELLOW]:"caution",[x.Ej.TAXONOMY_GREEN]:"success",[x.Ej.TAXONOMY_BLUE]:"info",[x.Ej.TAXONOMY_PURPLE]:"alert",[x.Ej.SANDSTONE]:"sandstone",[x.Ej.MINOS]:"minos"},j={[x.Ej.TAXONOMY_WHITE]:"White",[x.Ej.TAXONOMY_RED]:"Red",[x.Ej.TAXONOMY_ORANGE]:"Orange",[x.Ej.TAXONOMY_YELLOW]:"Yellow",[x.Ej.TAXONOMY_GREEN]:"Green",[x.Ej.TAXONOMY_BLUE]:"Blue",[x.Ej.TAXONOMY_PURPLE]:"Purple",[x.Ej.SANDSTONE]:"Sandstone",[x.Ej.MINOS]:"Minos"},k=e=>{let{color:t,...s}=e;return(0,l.jsx)("span",{"aria-hidden":!0,className:"mr-2 inline-block size-4 rounded-lg align-middle",style:{backgroundColor:"var(--fidesui-bg-".concat(f[t],")"),border:t===x.Ej.TAXONOMY_WHITE?"1px solid var(--fidesui-neutral-200)":"none",...s.style}})},b=e=>{let t=null==e?void 0:e.value,s=null==e?void 0:e.label;return(0,l.jsxs)("span",{className:"flex items-center",children:[(0,l.jsx)(k,{color:t}),(0,l.jsx)("span",{children:s})]})};var S=e=>{let t=Object.values(x.Ej).map(e=>({value:e,label:j[e]})),[s,a]=(0,n.useState)(void 0);return(0,l.jsx)(g.d,{...e,options:t,optionRender:b,layout:"stacked",value:s,onChange:e=>{a(e)},prefix:(0,l.jsx)(k,{color:null!=s?s:x.Ej.TAXONOMY_WHITE,style:{marginBottom:"2px"}})})};let _="all-suggested";var C=e=>{let{options:t,loading:s,name:i,suggestedDataUses:r,...o}=e,[d,c,{setValue:m}]=(0,u.U$)(i),g=!!(c.touched&&c.error),h=(0,n.useMemo)(()=>{let e=[],s=[];return null==t||t.forEach(t=>{r.includes(t.value)?e.push(t):s.push(t)}),{suggested:e,all:s}},[t,r]);return(0,l.jsxs)(a.jqI,{vertical:!0,gap:"small",children:[(0,l.jsx)(a.jqI,{align:"center",children:(0,l.jsx)(y.__,{htmlFor:o.id||i,fontSize:"xs",my:0,mr:1,children:"Data uses"})}),(0,l.jsx)(a.WPr,{options:[{label:"Select all suggested",value:_},{label:(0,l.jsxs)(a.jqI,{gap:"small",align:"center",children:[(0,l.jsx)(a.QMR,{}),(0,l.jsx)("strong",{children:"Suggested data uses"})]}),value:"suggested",options:h.suggested},{label:(0,l.jsxs)(a.jqI,{gap:"small",align:"center",children:[(0,l.jsx)(a.PJP.BBB,{}),(0,l.jsx)("strong",{children:"All data uses"})]}),value:"all",options:h.all}],mode:"multiple",placeholder:"Select data uses",allowClear:!0,loading:s,value:d.value,onChange:e=>{e.includes(_)?m(p()([...r,...e.filter(e=>e!==_)])):m(e)},status:g?"error":void 0,virtual:!1,...o}),(0,l.jsx)(y.Bc,{isInvalid:g,message:c.error,fieldName:d.name})]})};let E=m.Ry().shape({name:m.Z_().required("Name is required").label("Name"),label_color:m.Z_().required("Color is required").label("Color"),systems:m.IX().of(m.Z_()).label("Systems"),data_uses:m.IX().of(m.Z_()).label("Data uses")});var w=e=>{let{selectedSystemKeys:t=[],onSubmit:s,onCancel:i,isSubmitting:r=!1}=e,{data:o=[],isLoading:d}=(0,h.fd)(),{data:c,isLoading:m}=(0,v.K3)(),f=(0,n.useMemo)(()=>o.map(e=>({label:e.name||e.fides_key,value:e.fides_key})),[o]),j=(0,n.useMemo)(()=>{var e;let s=null!==(e=null==c?void 0:c.filter(e=>t.includes(e.fides_key)))&&void 0!==e?e:[];return p()(null==s?void 0:s.flatMap(e=>e.privacy_declarations.map(e=>e.data_use)))},[c,t]),k=(0,n.useMemo)(()=>{var e;return null!==(e=null==c?void 0:c.map(e=>({label:e.name||e.fides_key,value:e.fides_key})))&&void 0!==e?e:[]},[c]),b={name:"",description:"",label_color:x.Ej.TAXONOMY_WHITE,systems:t,data_uses:[],active:!0};return(0,l.jsx)(u.J9,{initialValues:b,validationSchema:E,onSubmit:s,enableReinitialize:!0,children:e=>{let{isValid:t,dirty:s}=e;return(0,l.jsx)(u.l0,{children:(0,l.jsxs)(a.jqI,{vertical:!0,gap:"middle",children:[(0,l.jsx)(a.AntTypography.Title,{level:2,children:"Create system group"}),(0,l.jsx)(y.j0,{name:"name",label:"Name",isRequired:!0,variant:"stacked",placeholder:"Enter system group name"}),(0,l.jsx)(y.Ks,{name:"description",label:"Description",variant:"stacked",placeholder:"Enter system group description",resize:!1}),(0,l.jsx)(g.d,{name:"systems",label:"Systems",mode:"multiple",placeholder:"Select systems",options:k,layout:"stacked",allowClear:!0,loading:m}),(0,l.jsx)(S,{name:"label_color",label:"Color"}),(0,l.jsx)(C,{name:"data_uses",options:f,loading:d,suggestedDataUses:j}),(0,l.jsxs)(a.jqI,{gap:"small",justify:"space-between",className:"pt-4",children:[(0,l.jsx)(a.wpx,{onClick:i,disabled:r,children:"Cancel"}),(0,l.jsx)(a.wpx,{type:"primary",htmlType:"submit",loading:r,disabled:!t||!s||r,"data-testid":"save-btn",children:"Create group"})]})]})})}})},N=s(812),T=s(65450),O=s(31793),I=s(31883),M=e=>{var t;let{selectedRowKeys:s}=e,[i,r]=a.Pg3.useMessage(),[o,d]=(0,n.useState)(!1),[u]=(0,T.WP)(),{data:c}=(0,O.wv)({page:1,size:100,username:""}),[p]=(0,T.C9)(),m=async e=>{let t=await u({data_steward:e,system_keys:s});(0,I.D4)(t)?i.error((0,N.e$)(t.error,"A problem occurred assigning stewards")):i.success("".concat(s.length," systems assigned to ").concat(e," successfully"))},g=async()=>{let e=await p(s);(0,I.D4)(e)?i.error((0,N.e$)(e.error,"A problem occurred deleting systems")):i.success("".concat(s.length," systems deleted successfully"))};return(0,l.jsxs)(l.Fragment,{children:[r,(0,l.jsx)(a.$zI,{open:o,onCancel:()=>d(!1),onOk:g,okText:"Delete",okType:"danger",centered:!0,children:(0,l.jsxs)(a.AntTypography.Paragraph,{children:["Delete ",s.length," systems? This action cannot be undone."]})}),(0,l.jsx)(a.S0p,{trigger:["click"],menu:{items:[{key:"assign-data-steward",label:"Assign data steward",children:null==c?void 0:null===(t=c.items)||void 0===t?void 0:t.map(e=>({key:e.username,label:e.username,onClick:()=>m(e.username)}))},{key:"delete",label:"Delete",onClick:()=>{d(!0)}}]},children:(0,l.jsx)(a.wpx,{disabled:0===s.length,icon:(0,l.jsx)(a.PJP._ME,{}),children:"Actions"})})]})},P=s(86677),D=s(19904),z=s(26070),A=s(3110),R=s(99640),q=s(8125),X=s(16394),F=s(33335),L=s(34929),W=e=>{let{privacyDeclarations:t,...s}=e,{getDataUseDisplayName:a}=(0,L.Z)(),n=t.map(e=>e.data_use).map(e=>({label:a(e),key:e}));return(0,l.jsx)(z.Q,{values:n,...s})},Y=s(56141),Z=s.n(Y);let G="update-system-groups-msg";var B=e=>{let{selectedGroups:t,allGroups:s,system:i,columnState:r,...o}=e,[d,u]=(0,n.useState)(!1),[c,p]=(0,n.useState)(t.map(e=>e.fides_key)),[m,g]=a.Pg3.useMessage(),[y]=(0,v.qQ)(),h=async()=>{if(u(!1),Z()(c,t.map(e=>e.fides_key)))return;m.open({key:G,type:"loading",content:"Updating groups for ".concat(i.name,"...")});let e=await y({...i,system_groups:c});(0,I.D4)(e)?m.open({key:G,type:"error",content:(0,N.e$)(e.error,"Failed to update system groups")}):m.open({key:G,type:"success",content:"Groups updated for ".concat(i.name)}),setTimeout(()=>{m.destroy(G)},3e3)};return(0,l.jsxs)(a.jqI,{gap:"small",...o,children:[g,!d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.j8w,{onClick:()=>u(!0),addable:!0,"data-testid":"group-add-btn","aria-label":"Add group"}),(0,l.jsx)(z.Q,{values:t.map(e=>e&&{label:e.name,key:e.fides_key,tagProps:{color:e.label_color?"".concat(f[e.label_color]):void 0,bordered:!1}}),columnState:r})]}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.WPr,{options:s.map(e=>({label:e.name,value:e.fides_key})),mode:"tags",defaultValue:t.map(e=>e.fides_key),defaultOpen:!0,onChange:e=>{p(e)}}),(0,l.jsx)(a.wpx,{icon:(0,l.jsx)(a.PJP.MCw,{}),onClick:h})]})]})},Q=s(95782),U=e=>{var t,s;let{isAlphaSystemGroupsEnabled:i}=e,{data:r}=(0,Q.QD)(),o=(0,n.useMemo)(()=>r?r.reduce((e,t)=>({...e,[t.fides_key]:t}),{}):{},[r]),{data:u}=(0,O.wv)({page:1,size:100,username:""}),[c]=(0,T.DW)(),[p]=(0,Q.Xz)(),[m]=(0,Q.Nr)(),[g,y]=(0,n.useState)(!1),[h,v]=(0,n.useState)(!1),[f,j]=(0,n.useState)(!1),[k,b]=(0,n.useState)(!1),[S,_]=(0,n.useState)(null),C=(0,q.o)({pagination:{defaultPageSize:25,pageSizeOptions:[25,50,100]},search:{defaultSearchQuery:""}}),{columnFilters:E,pageIndex:w,pageSize:M,searchQuery:L,updateSearch:Y}=C,{data:Z,isLoading:G,isFetching:U}=(0,T.xF)({page:w,size:M,search:L,system_group:null==E?void 0:null===(s=E.system_groups)||void 0===s?void 0:null===(t=s[0])||void 0===t?void 0:t.toString(),...E}),K=(0,n.useMemo)(()=>{var e,t;return{enableSelection:!0,dataSource:null!==(e=null==Z?void 0:Z.items)&&void 0!==e?e:[],totalRows:null!==(t=null==Z?void 0:Z.total)&&void 0!==t?t:0,isLoading:G,isFetching:U,getRowKey:e=>e.fides_key}},[Z,G,U]),{tableProps:J,selectionProps:$}=(0,q.V)(C,K),{selectedRowKeys:V}=null!=$?$:{},[H,ee]=a.Pg3.useMessage(),{plus:et}=(0,d.hz)(),es=(0,P.useRouter)(),el=(0,D.Tg)([x.Sh.SYSTEM_DELETE]),ea=async e=>{let t=await c(e.fides_key);(0,I.D4)(t)?H.error((0,N.e$)(t.error,"Failed to delete system")):H.success("Successfully deleted system"),b(!1)},en=async e=>{let t={...e,fides_key:(0,F.E)(e.name),active:!0},s=await m(t);if((0,I.D4)(s))H.error((0,N.e$)(s.error));else{var l,a;let e="System group '".concat(s.data.name,"' created");(null===(l=s.data.systems)||void 0===l?void 0:l.length)===1?e+=" with system '".concat(s.data.systems[0],"'"):(null===(a=s.data.systems)||void 0===a?void 0:a.length)&&(e+=" with ".concat(s.data.systems.length," systems")),H.success(e)}j(!1)},ei=(0,n.useCallback)(async e=>{var t;if(!V)return;let s=o[e],l=await p({...s,systems:[...null!==(t=s.systems)&&void 0!==t?t:[],...V.map(e=>e.toString())]});(0,I.D4)(l)?H.error((0,N.e$)(l.error)):H.success("".concat(null==V?void 0:V.length," systems added to group '").concat(e,"'"))},[o,p,V,H]),er=(0,n.useMemo)(()=>{var e;return null!==(e=null==r?void 0:r.map(e=>({key:e.fides_key,label:e.name,onClick:()=>ei(e.fides_key)})))&&void 0!==e?e:[]},[r,ei]);return{tableProps:J,selectionProps:$,columns:(0,n.useMemo)(()=>{var e;return[{title:"Name",dataIndex:"name",key:"name",render:(e,t)=>(0,l.jsx)(R.Z,{href:"/systems/configure/".concat(t.fides_key),"data-testid":"system-link-".concat(t.fides_key),children:e||t.fides_key}),ellipsis:!0,fixed:"left"},{dataIndex:"system_groups",key:"system_groups",render:(e,t)=>{var s;return(0,l.jsx)(B,{selectedGroups:null!==(s=null==e?void 0:e.map(e=>null==o?void 0:o[e]).filter(e=>!!e))&&void 0!==s?s:[],allGroups:r,system:{...t,system_groups:null!=e?e:[]},columnState:{isWrapped:!0,isExpanded:g},className:"w-96"})},title:"Groups",hidden:!et||!i,menu:{items:A.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?y(!0):"collapse-all"===e.key&&y(!1)}},filters:(0,X.nZ)(null==r?void 0:r.map(e=>e.fides_key),e=>{var t,s;return null!==(s=null===(t=o[e])||void 0===t?void 0:t.name)&&void 0!==s?s:e}),filteredValue:(null==E?void 0:E.system_groups)||null,filterMultiple:!1},{title:"Data uses",menu:{items:A.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?v(!0):"collapse-all"===e.key&&v(!1)}},dataIndex:"privacy_declarations",key:"privacy_declarations",render:e=>(0,l.jsx)(W,{privacyDeclarations:e,columnState:{isWrapped:!0,isExpanded:h}})},{title:"Data stewards",dataIndex:"data_stewards",key:"data_steward",render:e=>(0,l.jsx)(z.v,{values:null!=e?e:[],valueSuffix:"users"}),filters:(0,X.nZ)(null==u?void 0:null===(e=u.items)||void 0===e?void 0:e.map(e=>e.username)),filteredValue:(null==E?void 0:E.data_steward)||null,filterMultiple:!1},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,l.jsx)("div",{className:"max-w-96",children:(0,l.jsx)(a.AntTypography.Text,{ellipsis:{tooltip:e},children:e})}),ellipsis:!0},{title:"Actions",key:"actions",render:(e,t)=>(0,l.jsx)(a.kCb,{justify:"end",children:(0,l.jsx)(a.S0p,{trigger:["click"],menu:{items:[{key:"edit",label:"Edit",icon:(0,l.jsx)(a.PJP.I8b,{}),onClick:()=>es.push("/systems/configure/".concat(t.fides_key))},...el?[{key:"delete",label:"Delete",icon:(0,l.jsx)(a.PJP.ZNm,{}),onClick:()=>{_(t),b(!0)}}]:[]]},children:(0,l.jsx)(a.wpx,{size:"small",icon:(0,l.jsx)(a.PJP.r43,{}),"aria-label":"More actions",type:"text","data-testid":"system-actions-menu"})})}),fixed:"right"}]},[et,i,r,null==E?void 0:E.system_groups,null==E?void 0:E.data_steward,null==u?void 0:u.items,g,o,h,el,es]),searchQuery:L,updateSearch:Y,columnFilters:E,pageIndex:w,pageSize:M,createModalIsOpen:f,setCreateModalIsOpen:j,deleteModalIsOpen:k,setDeleteModalIsOpen:b,setSelectedSystemForDelete:_,handleCreateSystemGroup:en,handleDelete:ea,handleBulkAddToGroup:ei,messageContext:ee,groupMenuItems:er,selectedSystemForDelete:S}},K=()=>{var e,t;let{flags:{alphaSystemGroups:s}}=(0,d.Vb)(),{tableProps:n,selectionProps:i,columns:r,searchQuery:u,updateSearch:c,createModalIsOpen:p,setCreateModalIsOpen:m,deleteModalIsOpen:g,setDeleteModalIsOpen:y,handleCreateSystemGroup:h,handleDelete:v,groupMenuItems:x,messageContext:f,selectedSystemForDelete:j}=U({isAlphaSystemGroupsEnabled:s});return(0,l.jsxs)(l.Fragment,{children:[f,(0,l.jsxs)(a.jqI,{justify:"space-between",className:"mb-4",children:[(0,l.jsx)(o.f,{value:u,onChange:c,"data-testid":"system-search"}),(0,l.jsxs)(a.jqI,{gap:"small",children:[s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.S0p,{trigger:["click"],menu:{items:[{key:"new-group",label:"Create new group +",onClick:()=>m(!0)},{type:"divider"},...x]},children:(0,l.jsx)(a.wpx,{disabled:(null==i?void 0:i.selectedRowKeys.length)===0,icon:(0,l.jsx)(a.PJP._ME,{}),children:"Add to group"})}),(0,l.jsx)(a.$zI,{open:p,destroyOnHidden:!0,onCancel:()=>m(!1),centered:!0,width:768,footer:null,children:(0,l.jsx)(w,{selectedSystemKeys:null==i?void 0:i.selectedRowKeys.map(e=>e.toString()),onSubmit:h,onCancel:()=>m(!1)})})]}),(0,l.jsx)(M,{selectedRowKeys:null!==(e=null==i?void 0:i.selectedRowKeys)&&void 0!==e?e:[]}),(0,l.jsx)(a.$zI,{open:g,onCancel:()=>y(!1),onOk:()=>!!j&&v(j),okText:"Delete",okType:"danger",cancelText:"Cancel",centered:!0,children:(0,l.jsxs)(a.AntTypography.Paragraph,{children:["Are you sure you want to delete"," ",null!==(t=null==j?void 0:j.name)&&void 0!==t?t:null==j?void 0:j.fides_key,"? This action cannot be undone."]})})]})]}),(0,l.jsx)(a.V5H,{...n,columns:r,rowSelection:i})]})},J=()=>(0,l.jsx)(i.Z,{title:"System inventory",children:(0,l.jsxs)(a.xuv,{"data-testid":"system-management",children:[(0,l.jsx)(r.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems"}]}),(0,l.jsx)(K,{})]})})},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return l.Bw},D4:function(){return l.D4}});var l=s(19043)}},function(e){e.O(0,[431,8765,9278,5163,1896,1841,2888,9774,179],function(){return e(e.s=90988)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4202],{96586:function(e,t,n){var r=n(57753),i=n(82452),o=n(22115),a=n(38256),s=n(67426);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},36301:function(e,t,n){var r=n(69417),i=n(72470),o=n(66165),a=n(71873),s=n(52556);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},44538:function(e,t,n){var r=n(81822)(n(77400),"Map");e.exports=r},74554:function(e,t,n){var r=n(39448),i=n(7738),o=n(66575),a=n(7238),s=n(38738);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},46151:function(e,t,n){var r=n(81822)(n(77400),"Set");e.exports=r},52485:function(e,t,n){var r=n(74554),i=n(38639),o=n(88379);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},93382:function(e,t,n){var r=n(85638);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return -1}},46729:function(e,t,n){var r=n(28338),i=n(99678),o=n(11611),a=n(76532),s=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:s).test(a(e))}},75733:function(e){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},70830:function(e,t,n){var r=n(76747),i=n(31159),o=n(64373),a=n(37948);e.exports=function(e,t){return t=r(t,e),null==(e=o(e,t))||delete e[a(i(t))]}},65581:function(e){e.exports=function(e,t){return e.has(t)}},64937:function(e,t,n){var r=n(77400)["__core-js_shared__"];e.exports=r},95899:function(e,t,n){var r=n(54479);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},81822:function(e,t,n){var r=n(46729),i=n(15371);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},15371:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},57753:function(e,t,n){var r=n(35718);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},82452:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},22115:function(e,t,n){var r=n(35718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},38256:function(e,t,n){var r=n(35718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},67426:function(e,t,n){var r=n(35718);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},54479:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},99678:function(e,t,n){var r,i=n(64937),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},69417:function(e){e.exports=function(){this.__data__=[],this.size=0}},72470:function(e,t,n){var r=n(93382),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},66165:function(e,t,n){var r=n(93382);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},71873:function(e,t,n){var r=n(93382);e.exports=function(e){return r(this.__data__,e)>-1}},52556:function(e,t,n){var r=n(93382);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},39448:function(e,t,n){var r=n(96586),i=n(36301),o=n(44538);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},7738:function(e,t,n){var r=n(95899);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},66575:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).get(e)}},7238:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).has(e)}},38738:function(e,t,n){var r=n(95899);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},35718:function(e,t,n){var r=n(81822)(Object,"create");e.exports=r},64373:function(e,t,n){var r=n(79867),i=n(75733);e.exports=function(e,t){return t.length<2?e:r(e,i(t,0,-1))}},38639:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},88379:function(e){e.exports=function(e){return this.__data__.has(e)}},43735:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},76532:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},85638:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},28338:function(e,t,n){var r=n(99736),i=n(11611);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},43551:function(e,t,n){var r=n(70830);e.exports=function(e,t){return null==e||r(e,t)}},71180:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/taxonomy",function(){return n(62e3)}])},79806:function(e,t,n){"use strict";n.d(t,{Gn:function(){return s},zR:function(){return a}});var r=n(24246),i=n(96306),o=n(56358);let a=e=>{let{title:t}=e;return(0,r.jsx)(i.OXI,{py:0,display:"flex",alignItems:"flex-start",children:(0,r.jsx)(i.xvT,{mr:"2",color:"gray.700",fontSize:"lg",lineHeight:1.8,children:t})})},s=e=>{let{onDelete:t,onEditYaml:n,formId:a,isSaving:s}=e;return(0,r.jsxs)(i.zeN,{justifyContent:"space-between",children:[t?(0,r.jsx)(i.wpx,{"aria-label":"delete",icon:(0,r.jsx)(o.q,{fontSize:"small"}),onClick:t,"data-testid":"delete-btn"}):null,(0,r.jsxs)("div",{className:"flex gap-2",children:[n&&(0,r.jsx)(i.wpx,{onClick:n,"data-testid":"edit-yaml-btn",children:"Edit YAML"}),(0,r.jsx)(i.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:a,loading:s,children:"Save"})]})]})};t.ZP=e=>{let{header:t,description:n,isOpen:o,onClose:a,children:s,footer:l}=e;return(0,r.jsxs)(i.dys,{placement:"right",isOpen:o,onClose:a,size:"md",children:[(0,r.jsx)(i.P1B,{}),(0,r.jsxs)(i.scA,{"data-testid":"edit-drawer-content",py:2,children:[(0,r.jsxs)(i.xuv,{display:"flex",justifyContent:"space-between",alignItems:"top",mr:2,py:2,gap:2,children:[(0,r.jsx)(i.xuv,{flex:1,minH:8,children:t}),(0,r.jsx)(i.xuv,{display:"flex",justifyContent:"flex-end",mr:2,children:(0,r.jsx)(i.wpx,{"aria-label":"Close editor",onClick:a,"data-testid":"close-drawer-btn",icon:(0,r.jsx)(i.Two,{fontSize:"smaller"})})})]}),(0,r.jsxs)(i.Ng0,{pt:1,children:[n?(0,r.jsx)(i.xvT,{fontSize:"sm",mb:4,color:"gray.600",children:n}):null,s]}),l]})]})}},18225:function(e,t,n){"use strict";var r=n(24246),i=n(96306);t.Z=e=>{let{alignment:t="center",...n}=e;return(0,r.jsx)(i.kCb,{boxSize:"full",align:"center",justify:t,children:(0,r.jsx)(i.$jN,{color:"primary",...n})})}},56358:function(e,t,n){"use strict";n.d(t,{q:function(){return i}});var r=n(24246);let i=(0,n(96306).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,r.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(24246),i=n(96306),o=n(88038),a=n.n(o),s=n(86677);n(27378);var l=n(25980),u=n(90867),c=n(42478),d=n(77830),f=()=>{let e=(0,s.useRouter)();return(0,r.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(i.xuv,{children:[(0,r.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(i.wpx,{onClick:()=>{e.push(d.AD)},children:"Configure"})]}),(0,r.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:t,title:n,padded:o=!0,mainProps:d}=e,h=(0,l.hz)(),p=(0,s.useRouter)(),m="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,x=!(h.flags.messagingConfiguration&&m),{data:g}=(0,c.JE)(void 0,{skip:x}),{data:v}=(0,u.PW)(void 0,{skip:x}),_=h.flags.messagingConfiguration&&(!g||!v)&&m;return(0,r.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,r.jsxs)(a(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(i.kCb,{as:"main",direction:"column",py:o?6:0,px:o?10:0,h:o?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[_?(0,r.jsx)(f,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var r=n(24246),i=n(96306),o=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:s,rightContent:l,style:u,...c}=e;return(0,r.jsxs)("div",{...c,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...u}:{paddingBottom:"24px",...u},children:[(0,r.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(i.lQT,{className:n||s?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,r.jsx)(o.m,{className:s?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),s]})}},19904:function(e,t,n){"use strict";n.d(t,{Tg:function(){return a}});var r=n(24246),i=n(16134),o=n(31793);let a=e=>(0,i.C)(o.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,r.jsx)(r.Fragment,{children:n}):null}},94799:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(76649);let i=e=>(0,r.Ln)({id:"string"},e),o=e=>(null!=e?e:[]).filter(i)},30320:function(e,t,n){"use strict";n.d(t,{m:function(){return l}});var r=n(27378),i=n(25980),o=n(41841),a=n(32885),s=n(94799);let l=e=>{let{resourceFidesKey:t,resourceType:n}=e,{errorAlert:l}=(0,o.VY)(),{plus:u}=(0,i.hz)(),c=(0,r.useMemo)(()=>null!=t?t:"",[]),d=(0,a.YU)(!0,{skip:!u}),f=(0,a.VN)(n,{skip:!u}),{data:h,isLoading:p,error:m,isError:x}=(0,a.PV)(null!=t?t:"",{skip:""!==c&&!(u&&c)}),[g]=(0,a._D)(),v=d.isLoading||f.isLoading||p,_=(0,r.useMemo)(()=>new Map((0,s.k)(d.data).map(e=>{var t;return[e.id,{...e,options:(null!==(t=e.allowed_values)&&void 0!==t?t:[]).map(e=>({value:e,label:e}))}]})),[d.data]),y=(0,r.useMemo)(()=>{var e;return null===(e=f.data)||void 0===e?void 0:e.filter(e=>e.active)},[f.data]),T=(0,r.useMemo)(()=>new Map((0,s.k)(y).map(e=>[e.id,e])),[y]),C=(0,r.useMemo)(()=>x&&(null==m?void 0:m.status)===404?new Map:new Map((0,s.k)(h).map(e=>[e.custom_field_definition_id,e])),[h,x,m]),E=(0,r.useMemo)(()=>{let e=[...T.keys()];return e.sort(),e},[T]),j=(0,r.useMemo)(()=>{let e={};return y&&C&&y.forEach(t=>{let n=C.get(t.id||"");n&&(t.allow_list_id&&"string[]"===t.field_type?e[n.custom_field_definition_id]=n.value:e[n.custom_field_definition_id]=n.value.toString())}),e},[y,C]),b=(0,r.useCallback)(async e=>{if(!u)return;let r="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!r)return;let{customFieldValues:i}=e;if(!i||0===Object.keys(i).length)return;let o=[],a=[];E.forEach(e=>{let t=C.get(e),n=i[e];void 0===n||""===n||Array.isArray(n)&&0===n.length?(null==t?void 0:t.id)&&a.push(t.id):o.push({custom_field_definition_id:e,resource_id:r,id:null==t?void 0:t.id,value:n})});try{await g({resource_type:n,resource_id:r,upsert:o,delete:a})}catch(e){l("One or more custom fields have failed to save, please try again."),console.error(e)}},[u,C,l,t,E,g,n]);return{customFieldValues:j,definitionIdToCustomField:C,idToAllowListWithOptions:_,idToCustomFieldDefinition:T,isEnabled:u,isLoading:v,sortedCustomFieldDefinitionIds:E,upsertCustomFields:b}}},95346:function(e,t,n){"use strict";n.d(t,{uc:function(){return g},Hn:function(){return l},Uv:function(){return a},C7:function(){return u},mZ:function(){return x.m}});var r,i,o,a,s=n(21910);(r=o||(o={}))[r.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",r[r.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",r[r.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",s.AL.STRING,s.AL.STRING,s.AL.STRING_,(i=a||(a={})).SINGLE_SELECT="singleSelect",i.MULTIPLE_SELECT="multipleSelect",i.LOCATION_SELECT="locationSelect",i.OPEN_TEXT="openText";let l=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Location select",value:"locationSelect"},{label:"Open Text",value:"openText"}],u=[{label:"taxonomy:".concat(s.P6.DATA_CATEGORY),value:s.P6.DATA_CATEGORY},{label:"taxonomy:".concat(s.P6.DATA_SUBJECT),value:s.P6.DATA_SUBJECT},{label:"taxonomy:".concat(s.P6.DATA_USE),value:s.P6.DATA_USE},{label:"".concat(s.P6.SYSTEM,":information"),value:s.P6.SYSTEM},{label:"system:data use",value:s.P6.PRIVACY_DECLARATION}];var c=n(24246),d=n(96306),f=n(34090),h=n(30234),p=n(97181),m=n(40324),x=n(30320);let g=e=>{let{resourceFidesKey:t,resourceType:n}=e,{idToAllowListWithOptions:r,idToCustomFieldDefinition:i,isEnabled:o,isLoading:a,sortedCustomFieldDefinitionIds:l}=(0,x.m)({resourceFidesKey:t,resourceType:n});return o&&0!==l.length?(0,c.jsx)(h.Z,{heading:"Custom fields",children:(0,c.jsx)(d.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(d.kCb,{flexDir:"column",gap:"24px",children:a?(0,c.jsx)(d.M5Y,{children:(0,c.jsx)(d.$jN,{})}):l.length>0&&(0,c.jsx)(d.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:l.map(e=>{let t=i.get(e);if(!t)return null;let n="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===s.AL.STRING)return(0,c.jsx)(f.gN,{name:n,children:e=>{let{field:n}=e;return(0,c.jsx)(m.j0,{...n,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let o=r.get(t.allow_list_id);if(!o)return null;let{options:a}=o;return(0,c.jsx)(p.d,{name:n,allowClear:!0,mode:t.field_type!==s.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};n(94799)},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var r=n(24246),i=n(96306),o=n(34090),a=n(27378),s=n(46238),l=n(40324);let u=e=>{let{name:t,label:n,labelProps:u,tooltip:c,isRequired:d,layout:f="inline",helperText:h,...p}=e,[m,x,{setValue:g}]=(0,o.U$)(t),v=!!(x.touched&&x.error),[_,y]=(0,a.useState)("");m.value||"tags"!==p.mode&&"multiple"!==p.mode||(m.value=[]),"tags"===p.mode&&"string"==typeof m.value&&(m.value=[m.value]);let T="tags"===p.mode?(e,t)=>e?e.value!==_||m.value.includes(_)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(_,'"'):void 0:p.optionRender||void 0,C=e=>{y(e),p.onSearch&&p.onSearch(e)},E=(e,t)=>{g(e),p.onChange&&p.onChange(e,t)};return"inline"===f?(0,r.jsx)(i.NIc,{isInvalid:v,isRequired:d,children:(0,r.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,r.jsx)(l.__,{htmlFor:p.id||t,...u,children:n}):null,(0,r.jsxs)(i.jqI,{align:"center",children:[(0,r.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(i.WPr,{...m,id:p.id||t,"data-testid":"controlled-select-".concat(m.name),...p,optionRender:T,onSearch:"tags"===p.mode?C:void 0,onChange:E,value:m.value||void 0,status:v?"error":void 0}),h&&(0,r.jsx)(i.Q6r,{children:h}),(0,r.jsx)(l.Bc,{isInvalid:v,message:x.error,fieldName:m.name})]}),(0,r.jsx)(s.b,{label:c,className:v?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(i.NIc,{isInvalid:v,isRequired:d,children:(0,r.jsxs)(i.gCW,{alignItems:"start",children:[(0,r.jsxs)(i.jqI,{align:"center",children:[n?(0,r.jsx)(l.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...u,children:n}):null,(0,r.jsx)(s.b,{label:c})]}),(0,r.jsx)(i.WPr,{...m,id:p.id||t,"data-testid":"controlled-select-".concat(m.name),...p,optionRender:T,onSearch:"tags"===p.mode?C:void 0,onChange:E,value:m.value||void 0,status:v?"error":void 0}),h&&(0,r.jsx)(i.Q6r,{style:{marginTop:0},children:h}),(0,r.jsx)(l.Bc,{isInvalid:v,message:x.error,fieldName:m.name})]})})}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return u}});var r=n(24246),i=n(96306),o=n(79894),a=n.n(o),s=n(27378);let{Text:l}=i.AntTypography,u=e=>{let{items:t,...n}=e,o=(0,s.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let o=n===t.length-1,s={...e},u=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:o?void 0:400},ellipsis:!o,id:o?"breadcrumb-current-page":void 0,children:s.title})),u)?s.title=(0,r.jsx)(i.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,r.jsx)(a(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[t]);return(0,r.jsx)(i.zrq,{items:o,...n})}},42478:function(e,t,n){"use strict";n.d(t,{FU:function(){return u},JE:function(){return i},Ki:function(){return d},SU:function(){return f},W:function(){return h},h9:function(){return o},jc:function(){return r},qt:function(){return l},sn:function(){return c}});let{useGetEmailInviteStatusQuery:r,useGetActiveMessagingProviderQuery:i,useCreateMessagingConfigurationMutation:o,useCreateMessagingConfigurationSecretsMutation:a,useGetMessagingConfigurationDetailsQuery:s,useGetMessagingConfigurationsQuery:l,useGetMessagingConfigurationByKeyQuery:u,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:d,useCreateTestConnectionMessageMutation:f,useDeleteMessagingConfigurationByKeyMutation:h}=n(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,n,r)=>{let i=await r({url:"messaging/default/active"});return i.error&&404===i.error.status?{data:null}:i},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"]})})})},30234:function(e,t,n){"use strict";var r=n(24246),i=n(96306);t.Z=e=>{let{heading:t,HeadingButton:n,children:o}=e;return(0,r.jsx)(i.Kqy,{spacing:4,children:(0,r.jsxs)(i.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,r.jsxs)(i.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,r.jsx)(i.X6q,{as:"h3",size:"xs",children:t}),n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.LZC,{}),(0,r.jsx)(n,{})]}):null]}),(0,r.jsx)(i.Kqy,{spacing:4,px:6,py:6,children:o})]})})}},59001:function(e,t,n){"use strict";n.d(t,{Ch:function(){return a},Hy:function(){return s},Lo:function(){return i}});var r,i,o=n(21910);let a="root";(r=i||(i={})).DATA_CATEGORIES="Data categories",r.DATA_USES="Data uses",r.DATA_SUBJECTS="Data subjects";let s=e=>{switch(e){case"Data categories":return{UPDATE:o.Sh.DATA_CATEGORY_UPDATE,CREATE:o.Sh.DATA_CATEGORY_CREATE,DELETE:o.Sh.DATA_CATEGORY_DELETE,READ:o.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:o.Sh.DATA_USE_UPDATE,CREATE:o.Sh.DATA_USE_CREATE,DELETE:o.Sh.DATA_USE_DELETE,READ:o.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:o.Sh.DATA_SUBJECT_UPDATE,CREATE:o.Sh.DATA_SUBJECT_CREATE,DELETE:o.Sh.DATA_SUBJECT_DELETE,READ:o.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,n){"use strict";n.d(t,{Cd:function(){return o},Xl:function(){return a}});var r=n(21910),i=n(59001);let o=(e,t)=>{let n;if(null==t&&e.every(e=>void 0===e.parent_key))n=e;else{let r=null!=t?t:null;n=e.filter(e=>e.parent_key===r)}return n.map(t=>{var n,r;let i=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:o(e,i),is_default:null!==(n=t.is_default)&&void 0!==n&&n,active:null!==(r=t.active)&&void 0!==r&&r}})},a=e=>{switch(e){case i.Lo.DATA_CATEGORIES:return r.P6.DATA_CATEGORY;case i.Lo.DATA_SUBJECTS:return r.P6.DATA_SUBJECT;case i.Lo.DATA_USES:return r.P6.DATA_USE;default:return}}},62e3:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ey}});var r,i,o=n(24246),a=n(96306),s=n(69238),l=n.n(s),u=n(63662),c=n(27378),d=n(812),f=n(77213),h=n(58754),p=n(19904),m=n(46628),x=n(95346),g=n(56358),v=n(31883),_=n(79806),y=n(59001),T=n(90673),C=n(30002),E=n(28079),j=n(39864),b=e=>{let{taxonomyType:t}=e,[n,r]=(0,j.Vj)(),[i,o]=(0,C.nC)(),[a,s]=(0,E.dk)(),[l]=(0,j.Ti)(),[u]=(0,E.Ql)(),[c]=(0,C.wG)(),[d]=(0,j.jU)(),[f]=(0,E.LG)(),[h]=(0,C.h8)(),[p]=(0,j.K9)(),[m]=(0,E.gu)(),[x]=(0,C.Kv)();return t===y.Lo.DATA_SUBJECTS?{getAllTrigger:i,taxonomyItems:o.data||[],updateTrigger:h,deleteTrigger:x,createTrigger:c}:t===y.Lo.DATA_USES?{getAllTrigger:a,taxonomyItems:s.data||[],updateTrigger:f,deleteTrigger:m,createTrigger:u}:{getAllTrigger:n,taxonomyItems:r.data||[],updateTrigger:d,deleteTrigger:p,createTrigger:l}},A=n(90104),S=n.n(A),I=n(18225),k=n(21910),w=e=>{let{customFields:t,formId:n,form:r}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:s,isEnabled:l,isLoading:u,sortedCustomFieldDefinitionIds:c}=t;return l&&0!==c.length?(0,o.jsxs)(a.PPS,{form:r,name:n,initialValues:t.customFieldValues,layout:"vertical","data-testid":"custom-fields-form",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(a.AntTypography.Title,{level:3,children:"Custom fields"})}),u?(0,o.jsx)(I.Z,{}):(0,o.jsx)("div",{children:!S()(c)&&(0,o.jsx)("div",{children:c.map(e=>{let t=s.get(e);if(!t)return null;let{id:n,name:r,description:l,allow_list_id:u,field_type:c}=t;if(!u&&c===k.AL.STRING)return(0,o.jsx)(a.PPS.Item,{name:n,label:r,tooltip:l,children:(0,o.jsx)(a.uFc,{})},e);let d=i.get(t.allow_list_id);if(!d)return null;let{options:f}=d;return(0,o.jsx)(a.PPS.Item,{name:n,label:r,tooltip:l,children:(0,o.jsx)(a.WPr,{mode:"string"!==c?"multiple":void 0,allowClear:!0,options:f})},e)})})})]}):null},N=n(43551),D=n.n(N),R=()=>{let e=a.PPS.useFormInstance(),t=a.PPS.useWatch(["rights","values"],e);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.PPS.Item,{label:"Automated Decisions or Profiling",name:"automated_decisions_or_profiling",layout:"horizontal",valuePropName:"checked",children:(0,o.jsx)(a.E_O,{"data-testid":"edit-taxonomy-form_automated-decisions"})}),(0,o.jsx)(a.PPS.Item,{name:["rights","values"],label:"Rights",children:(0,o.jsx)(a.WPr,{mode:"multiple",options:(0,d.MM)(k.ts),"data-testid":"edit-taxonomy-form_rights"})}),t&&!S()(t)&&(0,o.jsx)(a.PPS.Item,{name:["rights","strategy"],label:"Strategy",required:!0,rules:[{required:!0,message:"Please select a strategy"}],children:(0,o.jsx)(a.WPr,{options:(0,d.MM)(k.jX),"data-testid":"edit-taxonomy-form_strategy"})})]})},O=e=>{let{initialValues:t,onSubmit:n,form:r,formId:i,taxonomyType:s,isDisabled:l}=e,u=s===y.Lo.DATA_SUBJECTS;return(0,o.jsxs)(a.PPS,{name:i,initialValues:t,onFinish:e=>{var r,i;let o={...t,...e};(!(null==o?void 0:null===(r=o.rights)||void 0===r?void 0:r.values)||S()(null==o?void 0:null===(i=o.rights)||void 0===i?void 0:i.values))&&D()(o,"rights"),n(o)},layout:"vertical",form:r,children:[(0,o.jsx)(a.PPS.Item,{label:"Name",name:"name",children:(0,o.jsx)(a.uFc,{"data-testid":"edit-taxonomy-form_name",disabled:l})}),(0,o.jsx)(a.PPS.Item,{label:"Description",name:"description",children:(0,o.jsx)(a.uFc.TextArea,{rows:4,"data-testid":"edit-taxonomy-form_description",disabled:l})}),u&&(0,o.jsx)(R,{})]})},P=e=>{let{taxonomyItem:t,taxonomyType:n,onClose:r}=e,i="edit-taxonomy-form",[s]=a.PPS.useForm(),[l]=a.PPS.useForm(),u=(0,a.pmc)(),{isOpen:c,onOpen:f,onClose:h}=(0,a.qY0)(),{updateTrigger:C}=b({taxonomyType:n}),E=(0,x.mZ)({resourceFidesKey:null==t?void 0:t.fides_key,resourceType:(0,T.Xl)(n)}),j=(0,p.Tg)([(0,y.Hy)(n).UPDATE]),A=(0,p.Tg)([(0,y.Hy)(n).DELETE]),S=async e=>{let n=await C(e);if((0,v.D4)(n)){u((0,m.Vo)((0,d.e$)(n.error)));return}if(E.isEnabled){let e=l.getFieldsValue();await E.upsertCustomFields({fides_key:null==t?void 0:t.fides_key,customFieldValues:e})}u((0,m.t5)("Taxonomy successfully updated")),r()},I=async()=>{await C({...t,active:!1}),h(),r()},k=async()=>{await C({...t,active:!0}),h(),r()};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(_.ZP,{isOpen:!!t,onClose:r,header:(0,o.jsx)(_.zR,{title:(null==t?void 0:t.name)||""}),footer:(0,o.jsxs)(a.zeN,{justifyContent:"space-between",children:[(null==t?void 0:t.active)&&A&&(0,o.jsx)(a.esZ,{title:"Delete label",children:(0,o.jsx)(a.wpx,{"aria-label":"delete",icon:(0,o.jsx)(g.q,{fontSize:"small"}),onClick:f,"data-testid":"delete-btn"})}),!(null==t?void 0:t.active)&&j&&(0,o.jsx)(a.esZ,{title:"Enable label",children:(0,o.jsx)(a.wpx,{"aria-label":"enable",onClick:k,"data-testid":"enable-btn",icon:(0,o.jsx)(a.tEF,{fontSize:"small"})})}),(0,o.jsx)("div",{className:"flex gap-2",children:j&&(0,o.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:i,children:"Save"})})]}),children:[(0,o.jsxs)("div",{className:"mb-4",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(a.AntTypography.Title,{level:3,children:"Details"})}),(0,o.jsxs)("div",{className:"flex",children:[(0,o.jsx)("span",{className:"w-1/3 shrink-0 text-sm text-gray-500",children:"Fides key:"}),(0,o.jsx)(a.esZ,{title:null==t?void 0:t.fides_key,trigger:"click",children:(0,o.jsx)("span",{className:"flex-1 truncate","data-testid":"edit-drawer-fides-key",children:null==t?void 0:t.fides_key})})]})]}),!!t&&(0,o.jsx)(O,{initialValues:t,onSubmit:S,form:s,formId:i,taxonomyType:n,isDisabled:!j}),E.isEnabled&&!E.isLoading&&(0,o.jsx)(w,{form:l,formId:"custom-fields-form",customFields:E})]}),(0,o.jsx)(a.cVQ,{isOpen:c,onClose:h,onConfirm:I,title:"Delete ".concat(n),message:(0,o.jsx)(a.Kqy,{children:(0,o.jsxs)(a.xvT,{children:["You are about to permanently delete the ",n," ",(0,o.jsx)(a.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name})," ","from your taxonomy. Are you sure you would like to continue?"]})})})]})};n(51901);var L=n(86298),M=n(3124),F=n.n(M);(r=i||(i={})).DEFAULT="DEFAULT",r.ACTIVE_HOVER="ACTIVE_HOVER",r.PARENT_OF_HOVER="PARENT_OF_HOVER",r.CHILD_OF_HOVER="CHILD_OF_HOVER",r.SIBLING_OF_HOVER="SIBLING_OF_HOVER",r.INACTIVE="INACTIVE";let V=(0,c.createContext)({activeNodeKey:null,setActiveNodeKey:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},getNodeHoverStatus:()=>"DEFAULT"}),U=e=>{let{children:t}=e,[n,r]=(0,c.useState)(null),i=(0,c.useCallback)(e=>{e!==n&&r(e)},[n]),a=(0,c.useCallback)(()=>{r(null)},[]),s=(0,c.useCallback)(e=>n?e===n?"ACTIVE_HOVER":n.startsWith("".concat(e,"."))||e===y.Ch?"PARENT_OF_HOVER":e.startsWith("".concat(n,"."))||n===y.Ch?"CHILD_OF_HOVER":n.split(".").slice(0,-1).join(".")===e.split(".").slice(0,-1).join(".")?"SIBLING_OF_HOVER":"INACTIVE":"DEFAULT",[n]),l=(0,c.useMemo)(()=>({activeNodeKey:n,setActiveNodeKey:r,onMouseEnter:i,onMouseLeave:a,getNodeHoverStatus:s}),[n,r,i,a,s]);return(0,o.jsx)(V.Provider,{value:l,children:t})};function z(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function H(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=q)):void 0===t&&(t=B);for(var n,r,i,o,a,s=new K(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new K(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(G)}function B(e){return e.children}function q(e){return Array.isArray(e)?e[1]:null}function Z(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function G(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function K(e){this.data=e,this.depth=this.height=0,this.parent=null}function W(e,t){return e.parent===t.parent?1:2}function Y(e){var t=e.children;return t?t[0]:e.t}function J(e){var t=e.children;return t?t[t.length-1]:e.t}function $(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function X(e){return null==e?null:function(e){if("function"!=typeof e)throw Error();return e}(e)}K.prototype=H.prototype={constructor:K,count:function(){return this.eachAfter(z)},each:function(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)r.push(t=t.parent);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return H(this).eachBefore(Z)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);while(o.length)}},$.prototype=Object.create(K.prototype);var Q={depth:-1},ee={},et={};function en(e){return e.id}function er(e){return e.parentId}function ei(e){let t=e.length;if(t<2)return"";for(;--t>1&&!eo(e,t););return e.slice(0,t)}function eo(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if((1&n)==0)return!0}return!1}let ea=function(){var e=W,t=1,n=1,r=null;function i(i){var l=function(e){for(var t,n,r,i,o,a=new $(e,0),s=[a];t=s.pop();)if(r=t._.children)for(t.children=Array(o=r.length),i=o-1;i>=0;--i)s.push(n=t.children[i]=new $(r[i],i)),n.parent=t;return(a.parent=new $(null,0)).children=[a],a}(i);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)i.eachBefore(s);else{var u=i,c=i,d=i;i.eachBefore(function(e){e.x<u.x&&(u=e),e.x>c.x&&(c=e),e.depth>d.depth&&(d=e)});var f=u===c?1:e(u,c)/2,h=f-u.x,p=t/(c.x+f+h),m=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+h)*p,e.y=e.depth*m})}return i}function o(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)t=i[o],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o,a,s=t,l=t,u=n,c=s.parent.children[0],d=s.m,f=l.m,h=u.m,p=c.m;u=J(u),s=Y(s),u&&s;)c=Y(c),(l=J(l)).a=t,(a=u.z+h-s.z-d+e(u._,s._))>0&&(function(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}((i=u,o=r,i.a.parent===t.parent?i.a:o),t,a),d+=a,f+=a),h+=u.m,d+=s.m,p+=c.m,f+=l.m;u&&!J(l)&&(l.t=u,l.m+=h-f),s&&!Y(c)&&(c.t=s,c.m+=d-p,r=t)}return r}(t,i,t.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}();var es=e=>{let{nodes:t,edges:n,options:r}=e;return(0,c.useMemo)(()=>{if(0===t.length)return{nodes:t,edges:n};let e=(function(){var e,t=en,n=er;function r(r){var i,o,a,s,l,u,c,d,f=Array.from(r),h=t,p=n,m=new Map;if(null!=e){let t=f.map((t,n)=>{var i;let o;return i=e(t,n,r),o=(i=`${i}`).length,eo(i,o-1)&&!eo(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}),n=t.map(ei),i=new Set(t).add("");for(let e of n)i.has(e)||(i.add(e),t.push(e),n.push(ei(e)),f.push(et));h=(e,n)=>t[n],p=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],u=f[a]=new K(o),null!=(c=h(o,a,r))&&(c+="")&&(d=u.id=c,m.set(d,m.has(d)?ee:u)),null!=(c=p(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=f[a]).parent){if(!(l=m.get(c)))throw Error("missing: "+c);if(l===ee)throw Error("ambiguous: "+c);l.children?l.children.push(u):l.children=[u],u.parent=l}else{if(s)throw Error("multiple roots");s=u}if(!s)throw Error("no root");if(null!=e){for(;s.data===et&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(u=f[e]).data===et;--e)u.data=null}if(s.parent=Q,s.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(G),s.parent=null,i>0)throw Error("cycle");return s}return r.id=function(e){return arguments.length?(t=X(e),r):t},r.parentId=function(e){return arguments.length?(n=X(e),r):n},r.path=function(t){return arguments.length?(e=X(t),r):e},r})().id(e=>e.id).parentId(e=>{var t;return null===(t=n.find(t=>t.target===e.id))||void 0===t?void 0:t.source})(t),i="LR"===r.direction?[35,320]:[320,35];return{nodes:ea.nodeSize(i).separation((e,t)=>e.parent===t.parent?1:1.5)(e).descendants().map(e=>{let t;return t="LR"===r.direction?{x:e.y,y:e.x}:{x:e.x,y:e.y},{...e.data,position:t}}),edges:n}},[t,n,r])},el=e=>{let{positionAbsoluteX:t,positionAbsoluteY:n,nodeWidth:r}=e,{setCenter:i,getZoom:o}=(0,L._K)();return{centerScreenOnNode:(0,c.useCallback)(()=>i(t+r/2,n,{duration:500,zoom:o()}),[o,t,n,r,i])}},eu=n(1945),ec=n.n(eu),ed=n(8335),ef=e=>{let{type:t,inactive:n=!1}=e;return(0,o.jsx)(L.HH,{type:t,position:"source"===t?ed.Ly.Right:ed.Ly.Left,style:{width:8,height:8,backgroundColor:n?F().FIDESUI_NEUTRAL_400:F().FIDESUI_MINOS},className:"transition-colors duration-300 ease-in"})},eh=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:r}=e,{onCancel:i,onSubmit:s,parentKey:l}=t,u=(0,c.useRef)(null),[d,f]=(0,c.useState)(""),{centerScreenOnNode:h}=el({positionAbsoluteX:n,positionAbsoluteY:r,nodeWidth:200});return(0,c.useEffect)(()=>{f("");let e=()=>{var e;return null===(e=u.current)||void 0===e?void 0:e.focus({cursor:"start",preventScroll:!0})};(async()=>{await h(),e()})()},[l,h,n,r]),(0,o.jsxs)("div",{style:{width:200},"data-testid":"taxonomy-text-input-node",children:[(0,o.jsx)(a.uFc,{placeholder:"Type label name...",ref:u,onBlur:i,onSubmit:()=>s(d),value:d,onChange:e=>f(e.target.value),onKeyUp:e=>{"Escape"===e.key&&i()},onPressEnter:()=>s(d),className:ec().input}),(0,o.jsx)(ef,{type:"target"})]})},ep=e=>{let{getNodeHoverStatus:t}=(0,c.useContext)(V),{target:n}=e,r=t(n),a=(0,c.useCallback)(()=>{switch(r){case i.ACTIVE_HOVER:case i.PARENT_OF_HOVER:return F().FIDESUI_MINOS;case i.INACTIVE:return F().NEUTRAL_400;default:return F().FIDESUI_SANDSTONE}},[r]),s=(0,c.useCallback)(()=>{switch(r){case i.ACTIVE_HOVER:case i.PARENT_OF_HOVER:return 2;default:return 1}},[r]);return(0,o.jsx)(L.Jd,{...e,style:{stroke:a(),strokeWidth:s(),transition:"stroke 0.3s ease 0s"}})},em=n(34770),ex=n.n(em),eg=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:r}=e,{onMouseEnter:s,onMouseLeave:l,getNodeHoverStatus:u}=(0,c.useContext)(V),{taxonomyType:d,taxonomyItem:f,onAddButtonClick:h,onTaxonomyItemClick:p,label:m,hasChildren:x,isLastCreatedItem:g,resetLastCreatedItemKey:v,userCanAddLabels:_}=t,{centerScreenOnNode:T}=el({positionAbsoluteX:n,positionAbsoluteY:r,nodeWidth:200});(0,c.useEffect)(()=>{let e=async()=>{await T(),s(null==f?void 0:f.fides_key)};g&&(e(),v())},[g,s,null==f?void 0:f.fides_key,v,T]);let C=u(null==f?void 0:f.fides_key),E=(0,c.useCallback)(()=>{switch(C){case i.ACTIVE_HOVER:return ex()["button--hover"];case i.PARENT_OF_HOVER:return ex()["button--parent-hover"];case i.INACTIVE:return ex()["button--inactive"];case i.DEFAULT:case i.CHILD_OF_HOVER:case i.SIBLING_OF_HOVER:default:return""}},[C]),j=(null==f?void 0:f.fides_key)===y.Ch,b=d===y.Lo.DATA_SUBJECTS;return(0,o.jsxs)("div",{className:ex().container,onMouseEnter:()=>s(null==f?void 0:f.fides_key),onMouseLeave:()=>l(null==f?void 0:f.fides_key),"data-testid":"taxonomy-node-".concat(null==f?void 0:f.fides_key),children:[(0,o.jsx)(a.wpx,{className:"".concat(ex().button," ").concat(E()),onClick:()=>null==p?void 0:p(f),disabled:!p,type:"text",children:(0,o.jsxs)(a.AntTypography.Text,{ellipsis:!0,style:{color:"inherit"},children:[(null==f?void 0:f.active)===!1?"(disabled) ":"",m]})}),!j&&(0,o.jsx)(ef,{type:"target",inactive:C===i.INACTIVE}),x&&(0,o.jsx)(ef,{type:"source",inactive:C===i.INACTIVE}),_&&(!b||j)&&(0,o.jsx)("div",{className:ex()["add-button-container"],children:(0,o.jsx)(a.wpx,{type:"default",className:"".concat(ex()["add-button"]," ").concat(C===i.ACTIVE_HOVER?ex()["add-button--visible"]:""),icon:(0,o.jsx)(a.PJP.mm_,{size:20}),onClick:()=>null==h?void 0:h(f),size:"middle","data-testid":"taxonomy-add-child-label-button","aria-label":"Add child label to ".concat(m)})})]})};let ev=e=>{let{taxonomyType:t,taxonomyItems:n,draftNewItem:r,lastCreatedItemKey:i,resetLastCreatedItemKey:a,onTaxonomyItemClick:s,onAddButtonClick:l,onCancelDraftItem:u,onSubmitDraftItem:d,userCanAddLabels:f}=e,{fitView:h}=(0,L._K)();(0,c.useEffect)(()=>{setTimeout(()=>h(),150)},[h,t]);let p=[(0,c.useMemo)(()=>({id:y.Ch,position:{x:0,y:0},data:{label:t,taxonomyItem:{fides_key:y.Ch},taxonomyType:t,onTaxonomyItemClick:null,onAddButtonClick:l,hasChildren:0!==n.length,userCanAddLabels:f},type:"taxonomyTreeNode"}),[t,n.length,l,f])],m=[];if(n.forEach(e=>{let n=e.name||e.fides_key.split(".").pop()||"",r={id:e.fides_key,position:{x:0,y:0},data:{label:n,taxonomyType:t,taxonomyItem:e,onTaxonomyItemClick:s,onAddButtonClick:l,hasChildren:!1,isLastCreatedItem:i===e.fides_key,resetLastCreatedItemKey:a,userCanAddLabels:f},type:"taxonomyTreeNode"};p.push(r);let o=e.parent_key?p.find(t=>t.id===e.parent_key):null,u=o?o.id:y.Ch,c=e.fides_key,d={id:"".concat(u,"-").concat(c),source:u,target:c,type:"taxonomyTreeEdge"};m.push(d),o&&(o.data.hasChildren=!0)}),r){let e=r.parent_key||y.Ch;p.push({id:"draft-node",position:{x:0,y:0},type:"textInputNode",data:{parentKey:e,onCancel:u,onSubmit:d},hidden:!r}),m.push({id:"draft-line",source:e,target:"draft-node",animated:!0});let t=p.find(t=>t.id===e);t&&(t.data.hasChildren=!0)}let{nodes:x,edges:g}=es({nodes:p,edges:m,options:{direction:"LR"}}),v=(0,c.useMemo)(()=>({taxonomyTreeNode:eg,textInputNode:eh}),[]),_=(0,c.useMemo)(()=>({taxonomyTreeEdge:ep}),[]);return(0,o.jsx)("div",{className:"size-full",style:{backgroundColor:F().FIDESUI_BG_CORINTH},"data-testid":"taxonomy-interactive-tree",children:(0,o.jsx)(U,{children:(0,o.jsxs)(L.x$,{nodes:x,edges:g,nodeTypes:v,edgeTypes:_,maxZoom:2,minZoom:.3,nodesConnectable:!1,edgesFocusable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},children:[(0,o.jsx)(L.Aq,{color:F().FIDESUI_NEUTRAL_100,variant:L.T7.Dots,size:3}),(0,o.jsx)(L.a9,{nodeStrokeWidth:3,pannable:!0}),(0,o.jsx)(L.ZX,{showInteractive:!1})]})})})};var e_=e=>(0,o.jsx)(L.tV,{children:(0,o.jsx)(ev,{...e})}),ey=()=>{let[e,t]=(0,c.useState)(y.Lo.DATA_CATEGORIES),{createTrigger:n,getAllTrigger:r,taxonomyItems:i=[]}=b({taxonomyType:e}),s=(0,u.useSearchParams)(),x=(null==s?void 0:s.get("showDisabledItems"))==="true";(0,c.useEffect)(()=>{r()},[r,e]);let[g,v]=(0,c.useState)(null),[_,T]=(0,c.useState)(null),[C,E]=(0,c.useState)(null);(0,c.useEffect)(()=>{T(null),E(null),v(null)},[e]);let j=(0,a.pmc)(),A=(0,c.useCallback)(async e=>{if(!_)return;let t=(null==_?void 0:_.parent_key)===y.Ch,r={..._,name:e,parent_key:t?null:_.parent_key},i=await n(r);if((0,d.D4)(i)){j((0,m.Vo)((0,d.e$)(i.error)));return}E(i.data.fides_key),j((0,m.t5)("New label successfully created")),T(null)},[n,_,j]),S=l()(i,"active"),I=(0,p.Tg)([(0,y.Hy)(e).CREATE]);return(0,o.jsxs)(f.Z,{title:"Taxonomy",children:[(0,o.jsxs)(a.jqI,{vertical:!0,className:"h-full",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(h.Z,{heading:"Taxonomy"}),(0,o.jsx)("div",{className:"hidden",children:(0,o.jsx)("div",{className:"mb-5 flex justify-between",children:(0,o.jsxs)(a.vyj.Compact,{children:[(0,o.jsx)(a.uFc,{className:"min-w-[350px]",placeholder:"Search",allowClear:!0}),(0,o.jsx)(a.wpx,{type:"default",children:"Clear"})]})})})]}),(0,o.jsxs)("div",{className:"relative grow",children:[(0,o.jsx)("div",{className:"absolute left-2 top-2 z-[1]",children:(0,o.jsx)(a.AHg,{selectedKeys:[e],onSelect:e=>{let{key:n}=e;return t(n)},items:(0,d.MM)(y.Lo).map(e=>({label:e.label,key:e.value})),"data-testid":"taxonomy-type-selector"})}),!!i.length&&(0,o.jsx)(e_,{userCanAddLabels:I,taxonomyItems:x?i:S,draftNewItem:_,lastCreatedItemKey:C,resetLastCreatedItemKey:()=>E(null),onTaxonomyItemClick:e=>{v(e)},onAddButtonClick:e=>{var t;T({parent_key:null!==(t=null==e?void 0:e.fides_key)&&void 0!==t?t:null,is_default:!1,description:""})},taxonomyType:e,onCancelDraftItem:()=>T(null),onSubmitDraftItem:A})]})]}),g&&(0,o.jsx)(P,{taxonomyItem:g,taxonomyType:e,onClose:()=>v(null)})]})}},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=n(19043)},1945:function(e){e.exports={input:"TaxonomyTextInputNode_input__P9czz"}},34770:function(e){e.exports={container:"TaxonomyTreeNode_container__T4KpF",button:"TaxonomyTreeNode_button__mcbOd","button--hover":"TaxonomyTreeNode_button--hover__oycXY","button--parent-hover":"TaxonomyTreeNode_button--parent-hover__pwAPl","button--inactive":"TaxonomyTreeNode_button--inactive__Fjdpe","add-button-container":"TaxonomyTreeNode_add-button-container__eEoRN","add-button":"TaxonomyTreeNode_add-button__oM2vI","add-button--visible":"TaxonomyTreeNode_add-button--visible__Ojqqf"}}},function(e){e.O(0,[1096,431,8765,9278,3662,6148,1841,2888,9774,179],function(){return e(e.s=71180)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6355],{52923:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user-management/new",function(){return n(57292)}])},57292:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return h}});var t=n(24246),r=n(27378),u=n(16394),i=n(86677),a=n(74831),c=n(16134),o=n(812),d=n(77830),l=n(58754),f=n(65497),w=()=>{let e=(0,i.useRouter)(),[s]=(0,f.ny)(),n=(0,c.T)();(0,r.useEffect)(()=>{n((0,f.Vv)(void 0))},[n]);let w=async n=>{let t=n.password?(0,u.JJ)(n.password):void 0,r=await s({...n,password:t});return(0,o.D4)(r)||e.push("".concat(d.e3,"/profile/").concat(r.data.id)),r};return(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Z,{heading:"Users",breadcrumbItems:[{title:"All users",href:d.e3},{title:"New User"}]}),(0,t.jsx)(a.Z,{onSubmit:w})]})},_=n(77213),h=()=>(0,t.jsx)(_.Z,{title:"Users - New User",children:(0,t.jsx)(w,{})})}},function(e){e.O(0,[7476,4831,2888,9774,179],function(){return e(e.s=52923)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6355],{52923:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user-management/new",function(){return n(57292)}])},57292:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return h}});var t=n(24246),r=n(27378),u=n(16394),i=n(86677),a=n(83696),c=n(16134),o=n(812),d=n(77830),l=n(58754),f=n(65497),w=()=>{let e=(0,i.useRouter)(),[s]=(0,f.ny)(),n=(0,c.T)();(0,r.useEffect)(()=>{n((0,f.Vv)(void 0))},[n]);let w=async n=>{let t=n.password?(0,u.JJ)(n.password):void 0,r=await s({...n,password:t});return(0,o.D4)(r)||e.push("".concat(d.e3,"/profile/").concat(r.data.id)),r};return(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Z,{heading:"Users",breadcrumbItems:[{title:"All users",href:d.e3},{title:"New User"}]}),(0,t.jsx)(a.Z,{onSubmit:w})]})},_=n(77213),h=()=>(0,t.jsx)(_.Z,{title:"Users - New User",children:(0,t.jsx)(w,{})})}},function(e){e.O(0,[7476,3696,2888,9774,179],function(){return e(e.s=52923)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8905],{16967:function(e,s,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user-management/profile/[id]",function(){return i(69404)}])},69404:function(e,s,i){"use strict";i.r(s),i.d(s,{default:function(){return y}});var r=i(24246),n=i(96306),t=i(86677),a=i(27378),d=i(16125),u=i(74831),l=i(91317),o=i(19904),c=i(54682),_=i(77830),f=i(58754),h=i(65497);let m=e=>{var s,i,r,n;let t=(0,d.v9)(l.dy),[a]=(0,h.Gl)(),u={username:null!==(s=e.username)&&void 0!==s?s:"",email_address:null!==(i=e.email_address)&&void 0!==i?i:"",first_name:null!==(r=e.first_name)&&void 0!==r?r:"",last_name:null!==(n=e.last_name)&&void 0!==n?n:"",password:"",password_login_enabled:!!e.password_login_enabled},_=async s=>a({...s,id:e.id}),f=!!t&&t.id===e.id,m=(0,o.Tg)([c.Sh.USER_UPDATE]);return{handleSubmit:_,isOwnProfile:f,canUpdateUser:!!f||m,initialValues:u}};var E=e=>{let{user:s}=e,{handleSubmit:i,canUpdateUser:n,initialValues:t}=m(s),a=(0,o.Tg)([c.Sh.USER_READ]);return(0,r.jsxs)("div",{children:[(0,r.jsx)(f.Z,{heading:"Users",breadcrumbItems:[{title:"All users",href:a?_.e3:void 0},{title:t.username}]}),(0,r.jsx)(u.Z,{onSubmit:i,initialValues:t,canEditNames:n})]})},j=i(16134),p=i(77213),y=()=>{let e=(0,t.useRouter)(),s=(0,j.T)(),i="";i=e.query.id?Array.isArray(e.query.id)?e.query.id[0]:e.query.id:"";let{data:d,isLoading:u}=(0,h.Fk)(i),_=(0,j.C)(l.dy),f=!!_&&!!d&&_.id===d.id,m=(0,o.Tg)([c.Sh.USER_UPDATE])||f;return(0,a.useEffect)(()=>{d&&s((0,h.Vv)(d.id))},[s,d,m]),(0,a.useEffect)(()=>{d&&!m&&e.push("/")},[e,m,d]),(0,r.jsxs)(p.Z,{title:"Users - Edit a user",children:[u&&(0,r.jsx)(n.jqI,{justify:"center",align:"center",className:"h-full",children:(0,r.jsx)(n.$jN,{color:"primary.900"})}),!u&&!d&&(0,r.jsx)(n.jqI,{justify:"center",children:(0,r.jsx)(n.DUx,{message:"Could not find user with this profile ID.",type:"warning",showIcon:!0})}),!!d&&(0,r.jsx)(E,{user:d})]})}}},function(e){e.O(0,[7476,4831,2888,9774,179],function(){return e(e.s=16967)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8905],{16967:function(e,s,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user-management/profile/[id]",function(){return i(69404)}])},69404:function(e,s,i){"use strict";i.r(s),i.d(s,{default:function(){return y}});var r=i(24246),n=i(96306),t=i(86677),a=i(27378),d=i(16125),u=i(83696),l=i(91317),o=i(19904),c=i(21910),_=i(77830),f=i(58754),h=i(65497);let m=e=>{var s,i,r,n;let t=(0,d.v9)(l.dy),[a]=(0,h.Gl)(),u={username:null!==(s=e.username)&&void 0!==s?s:"",email_address:null!==(i=e.email_address)&&void 0!==i?i:"",first_name:null!==(r=e.first_name)&&void 0!==r?r:"",last_name:null!==(n=e.last_name)&&void 0!==n?n:"",password:"",password_login_enabled:!!e.password_login_enabled},_=async s=>a({...s,id:e.id}),f=!!t&&t.id===e.id,m=(0,o.Tg)([c.Sh.USER_UPDATE]);return{handleSubmit:_,isOwnProfile:f,canUpdateUser:!!f||m,initialValues:u}};var E=e=>{let{user:s}=e,{handleSubmit:i,canUpdateUser:n,initialValues:t}=m(s),a=(0,o.Tg)([c.Sh.USER_READ]);return(0,r.jsxs)("div",{children:[(0,r.jsx)(f.Z,{heading:"Users",breadcrumbItems:[{title:"All users",href:a?_.e3:void 0},{title:t.username}]}),(0,r.jsx)(u.Z,{onSubmit:i,initialValues:t,canEditNames:n})]})},j=i(16134),p=i(77213),y=()=>{let e=(0,t.useRouter)(),s=(0,j.T)(),i="";i=e.query.id?Array.isArray(e.query.id)?e.query.id[0]:e.query.id:"";let{data:d,isLoading:u}=(0,h.Fk)(i),_=(0,j.C)(l.dy),f=!!_&&!!d&&_.id===d.id,m=(0,o.Tg)([c.Sh.USER_UPDATE])||f;return(0,a.useEffect)(()=>{d&&s((0,h.Vv)(d.id))},[s,d,m]),(0,a.useEffect)(()=>{d&&!m&&e.push("/")},[e,m,d]),(0,r.jsxs)(p.Z,{title:"Users - Edit a user",children:[u&&(0,r.jsx)(n.jqI,{justify:"center",align:"center",className:"h-full",children:(0,r.jsx)(n.$jN,{color:"primary.900"})}),!u&&!d&&(0,r.jsx)(n.jqI,{justify:"center",children:(0,r.jsx)(n.DUx,{message:"Could not find user with this profile ID.",type:"warning",showIcon:!0})}),!!d&&(0,r.jsx)(E,{user:d})]})}}},function(e){e.O(0,[7476,3696,2888,9774,179],function(){return e(e.s=16967)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[693],{7873:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user-management",function(){return n(923)}])},923:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return f}});var i=n(24246),l=n(27378),r=n(96306),t=n(16125),d=n(16134),a=n(65497),c=n(95492),h=n(86677),o=n(91317),u=n(77830),p=n(19904),x=n(91437),j=n(54682),m=n(61038),g=e=>{var s,n;let{user:l}=e,t=(0,h.useRouter)(),g=(0,r.qY0)(),v=(0,d.C)(o.dy),T=!!v&&v.id===l.id,b=(0,p.Tg)([j.Sh.USER_UPDATE])||T,_=()=>{b&&t.push("".concat(u.e3,"/profile/").concat(l.id))},{data:w}=(0,a.gU)(null!==(s=l.id)&&void 0!==s?s:"",{skip:!l.id}),{data:C}=(0,a.d6)(null!==(n=l.id)&&void 0!==n?n:"",{skip:!l.id}),N=[];return w&&w.roles&&w.roles.forEach(e=>{let s=x.K.find(s=>s.roleKey===e);s&&N.push(s.permissions_label)}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Tr,{_hover:{bg:"gray.50",cursor:b?"pointer":void 0},height:"36px","data-testid":"row-".concat(l.id),children:[(0,i.jsxs)(r.Td,{pl:0,py:1,onClick:_,children:[l.username," ",l.disabled&&(0,i.jsx)(r.j8w,{color:"success","data-testid":"invite-sent-badge",children:"Invite sent"})]}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:l.email_address}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:l.first_name}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:l.last_name}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:N.map(e=>(0,i.jsx)(r.j8w,{"data-testid":"user-permissions-badge",children:e},e))}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:(0,i.jsx)(r.j8w,{className:"text-center","data-testid":"user-systems-badge",children:C?C.length:0})}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:l.created_at?new Date(l.created_at).toUTCString():null}),(0,i.jsx)(p.ZP,{scopes:[j.Sh.USER_DELETE],children:(0,i.jsx)(r.Td,{pr:0,py:1,textAlign:"end",position:"relative",children:(0,i.jsx)(r.wpx,{"aria-label":"delete",icon:(0,i.jsx)(c.l,{}),onClick:g.onOpen,"data-testid":"delete-user-btn"})})})]},l.id),(0,i.jsx)(m.Z,{user:l,...g})]})};let v=()=>{var e,s;let n=(0,t.I0)(),i=(0,t.v9)(a.lq),{data:l,isLoading:r}=(0,a.wv)(i),d=null!==(e=null==l?void 0:l.items)&&void 0!==e?e:[],c=null!==(s=null==l?void 0:l.total)&&void 0!==s?s:0;return{...i,isLoading:r,users:d,total:c,handleNextPage:()=>{n((0,a.YA)(i.page+1))},handlePreviousPage:()=>{n((0,a.YA)(i.page-1))}}},T=()=>{let{users:e,total:s,page:n,size:t,handleNextPage:c,handlePreviousPage:h}=v(),o=(n-1)*t+1,u=Math.min(s,n*t),p=(0,d.T)();return(0,l.useEffect)(()=>{p((0,a.Vv)(void 0))},[p]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.iA_,{size:"sm","data-testid":"user-management-table",children:[(0,i.jsx)(r.hrZ,{children:(0,i.jsxs)(r.Tr,{children:[(0,i.jsx)(r.Th,{pl:0,children:"Username"}),(0,i.jsx)(r.Th,{pl:0,children:"Email"}),(0,i.jsx)(r.Th,{pl:0,children:"First Name"}),(0,i.jsx)(r.Th,{pl:0,children:"Last Name"}),(0,i.jsx)(r.Th,{pl:0,children:"Permissions"}),(0,i.jsx)(r.Th,{pl:0,children:"Assigned Systems"}),(0,i.jsx)(r.Th,{pl:0,children:"Created At"})]})}),(0,i.jsx)(r.p3B,{children:null==e?void 0:e.map(e=>(0,i.jsx)(g,{user:e},e.id))})]}),(0,i.jsxs)(r.kCb,{justifyContent:"space-between",mt:6,children:[(0,i.jsx)(r.xvT,{fontSize:"xs",color:"gray.600",children:s>0?(0,i.jsxs)(i.Fragment,{children:["Showing ",Number.isNaN(o)?0:o," to"," ",Number.isNaN(u)?0:u," of"," ",Number.isNaN(s)?0:s," results"]}):"0 results"}),(0,i.jsxs)("div",{children:[(0,i.jsx)(r.wpx,{disabled:n<=1,onClick:h,className:"mr-2",children:"Previous"}),(0,i.jsx)(r.wpx,{disabled:n*t>=s,onClick:c,children:"Next"})]})]})]})};T.defaultProps={users:[]};var b=n(26917);let _=()=>{let e=(0,t.v9)(a.lq),s=(0,t.I0)();return{handleSearchChange:e=>{s((0,a.SY)(e))},...e}};var w=()=>{let{handleSearchChange:e,username:s}=_(),n=(0,h.useRouter)();return(0,i.jsxs)(r.Kqy,{direction:"row",spacing:4,mb:6,children:[(0,i.jsx)(b.Z,{value:s,onChange:e,placeholder:"Search by Username"}),(0,i.jsx)(p.ZP,{scopes:[j.Sh.USER_CREATE],children:(0,i.jsx)(r.wpx,{onClick:()=>n.push("".concat(u.e3,"/new")),type:"primary",className:"shrink-0","data-testid":"add-new-user-btn",children:"Add new user"})})]})},C=n(77213),N=n(58754),f=()=>(0,i.jsxs)(C.Z,{title:"User Management",children:[(0,i.jsx)(N.Z,{heading:"Users",breadcrumbItems:[{title:"All users"}]}),(0,i.jsx)(w,{}),(0,i.jsx)(T,{})]})}},function(e){e.O(0,[7476,2888,9774,179],function(){return e(e.s=7873)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[693],{7873:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user-management",function(){return n(923)}])},923:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return f}});var i=n(24246),l=n(27378),r=n(96306),t=n(16125),d=n(16134),a=n(65497),c=n(95492),h=n(86677),o=n(91317),u=n(77830),p=n(19904),x=n(91437),j=n(21910),m=n(61038),g=e=>{var s,n;let{user:l}=e,t=(0,h.useRouter)(),g=(0,r.qY0)(),v=(0,d.C)(o.dy),T=!!v&&v.id===l.id,b=(0,p.Tg)([j.Sh.USER_UPDATE])||T,_=()=>{b&&t.push("".concat(u.e3,"/profile/").concat(l.id))},{data:w}=(0,a.gU)(null!==(s=l.id)&&void 0!==s?s:"",{skip:!l.id}),{data:C}=(0,a.d6)(null!==(n=l.id)&&void 0!==n?n:"",{skip:!l.id}),N=[];return w&&w.roles&&w.roles.forEach(e=>{let s=x.K.find(s=>s.roleKey===e);s&&N.push(s.permissions_label)}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Tr,{_hover:{bg:"gray.50",cursor:b?"pointer":void 0},height:"36px","data-testid":"row-".concat(l.id),children:[(0,i.jsxs)(r.Td,{pl:0,py:1,onClick:_,children:[l.username," ",l.disabled&&(0,i.jsx)(r.j8w,{color:"success","data-testid":"invite-sent-badge",children:"Invite sent"})]}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:l.email_address}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:l.first_name}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:l.last_name}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:N.map(e=>(0,i.jsx)(r.j8w,{"data-testid":"user-permissions-badge",children:e},e))}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:(0,i.jsx)(r.j8w,{className:"text-center","data-testid":"user-systems-badge",children:C?C.length:0})}),(0,i.jsx)(r.Td,{pl:0,py:1,onClick:_,children:l.created_at?new Date(l.created_at).toUTCString():null}),(0,i.jsx)(p.ZP,{scopes:[j.Sh.USER_DELETE],children:(0,i.jsx)(r.Td,{pr:0,py:1,textAlign:"end",position:"relative",children:(0,i.jsx)(r.wpx,{"aria-label":"delete",icon:(0,i.jsx)(c.l,{}),onClick:g.onOpen,"data-testid":"delete-user-btn"})})})]},l.id),(0,i.jsx)(m.Z,{user:l,...g})]})};let v=()=>{var e,s;let n=(0,t.I0)(),i=(0,t.v9)(a.lq),{data:l,isLoading:r}=(0,a.wv)(i),d=null!==(e=null==l?void 0:l.items)&&void 0!==e?e:[],c=null!==(s=null==l?void 0:l.total)&&void 0!==s?s:0;return{...i,isLoading:r,users:d,total:c,handleNextPage:()=>{n((0,a.YA)(i.page+1))},handlePreviousPage:()=>{n((0,a.YA)(i.page-1))}}},T=()=>{let{users:e,total:s,page:n,size:t,handleNextPage:c,handlePreviousPage:h}=v(),o=(n-1)*t+1,u=Math.min(s,n*t),p=(0,d.T)();return(0,l.useEffect)(()=>{p((0,a.Vv)(void 0))},[p]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.iA_,{size:"sm","data-testid":"user-management-table",children:[(0,i.jsx)(r.hrZ,{children:(0,i.jsxs)(r.Tr,{children:[(0,i.jsx)(r.Th,{pl:0,children:"Username"}),(0,i.jsx)(r.Th,{pl:0,children:"Email"}),(0,i.jsx)(r.Th,{pl:0,children:"First Name"}),(0,i.jsx)(r.Th,{pl:0,children:"Last Name"}),(0,i.jsx)(r.Th,{pl:0,children:"Permissions"}),(0,i.jsx)(r.Th,{pl:0,children:"Assigned Systems"}),(0,i.jsx)(r.Th,{pl:0,children:"Created At"})]})}),(0,i.jsx)(r.p3B,{children:null==e?void 0:e.map(e=>(0,i.jsx)(g,{user:e},e.id))})]}),(0,i.jsxs)(r.kCb,{justifyContent:"space-between",mt:6,children:[(0,i.jsx)(r.xvT,{fontSize:"xs",color:"gray.600",children:s>0?(0,i.jsxs)(i.Fragment,{children:["Showing ",Number.isNaN(o)?0:o," to"," ",Number.isNaN(u)?0:u," of"," ",Number.isNaN(s)?0:s," results"]}):"0 results"}),(0,i.jsxs)("div",{children:[(0,i.jsx)(r.wpx,{disabled:n<=1,onClick:h,className:"mr-2",children:"Previous"}),(0,i.jsx)(r.wpx,{disabled:n*t>=s,onClick:c,children:"Next"})]})]})]})};T.defaultProps={users:[]};var b=n(26917);let _=()=>{let e=(0,t.v9)(a.lq),s=(0,t.I0)();return{handleSearchChange:e=>{s((0,a.SY)(e))},...e}};var w=()=>{let{handleSearchChange:e,username:s}=_(),n=(0,h.useRouter)();return(0,i.jsxs)(r.Kqy,{direction:"row",spacing:4,mb:6,children:[(0,i.jsx)(b.Z,{value:s,onChange:e,placeholder:"Search by Username"}),(0,i.jsx)(p.ZP,{scopes:[j.Sh.USER_CREATE],children:(0,i.jsx)(r.wpx,{onClick:()=>n.push("".concat(u.e3,"/new")),type:"primary",className:"shrink-0","data-testid":"add-new-user-btn",children:"Add new user"})})]})},C=n(77213),N=n(58754),f=()=>(0,i.jsxs)(C.Z,{title:"User Management",children:[(0,i.jsx)(N.Z,{heading:"Users",breadcrumbItems:[{title:"All users"}]}),(0,i.jsx)(w,{}),(0,i.jsx)(T,{})]})}},function(e){e.O(0,[7476,2888,9774,179],function(){return e(e.s=7873)}),_N_E=e.O()}]);