ethyca-fides 2.69.1b1__py2.py3-none-any.whl → 2.69.1rc0__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.
Files changed (245) hide show
  1. {ethyca_fides-2.69.1b1.dist-info → ethyca_fides-2.69.1rc0.dist-info}/METADATA +2 -2
  2. {ethyca_fides-2.69.1b1.dist-info → ethyca_fides-2.69.1rc0.dist-info}/RECORD +241 -232
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/78dbe23d8204_adding_privacy_request_redaction_patterns.py +52 -0
  5. fides/api/api/v1/api.py +2 -0
  6. fides/api/api/v1/endpoints/dsr_package_link.py +5 -3
  7. fides/api/api/v1/endpoints/oauth_endpoints.py +19 -7
  8. fides/api/api/v1/endpoints/privacy_request_redaction_patterns_endpoints.py +95 -0
  9. fides/api/api/v1/endpoints/user_endpoints.py +27 -4
  10. fides/api/app_setup.py +16 -2
  11. fides/api/db/base.py +3 -0
  12. fides/api/main.py +22 -0
  13. fides/api/models/client.py +1 -0
  14. fides/api/models/privacy_request_redaction_pattern.py +64 -0
  15. fides/api/oauth/utils.py +126 -12
  16. fides/api/schemas/privacy_request_redaction_patterns.py +55 -0
  17. fides/api/service/privacy_request/dsr_package/dsr_data_preprocessor.py +231 -0
  18. fides/api/service/privacy_request/dsr_package/dsr_report_builder.py +286 -120
  19. fides/api/service/privacy_request/dsr_package/templates/attachments_index.html +4 -2
  20. fides/api/service/privacy_request/dsr_package/templates/collection_index.html +3 -1
  21. fides/api/service/privacy_request/dsr_package/templates/dataset_index.html +1 -1
  22. fides/api/service/privacy_request/dsr_package/utils.py +268 -0
  23. fides/api/service/privacy_request/request_runner_service.py +8 -2
  24. fides/api/service/privacy_request/request_service.py +18 -1
  25. fides/api/service/storage/storage_uploader_service.py +1 -21
  26. fides/api/service/storage/streaming/dsr_storage.py +1 -5
  27. fides/api/service/storage/streaming/s3/s3_storage_client.py +78 -40
  28. fides/api/service/storage/streaming/s3/streaming_s3.py +9 -21
  29. fides/api/service/storage/streaming/smart_open_client.py +8 -7
  30. fides/api/service/storage/streaming/smart_open_streaming_storage.py +110 -197
  31. fides/api/service/storage/streaming/storage_client_factory.py +7 -3
  32. fides/api/service/storage/util.py +579 -0
  33. fides/api/task/manual/manual_task_graph_task.py +11 -9
  34. fides/api/tasks/storage.py +2 -2
  35. fides/api/util/endpoint_utils.py +0 -13
  36. fides/api/util/rate_limit.py +194 -0
  37. fides/common/api/scope_registry.py +8 -0
  38. fides/common/api/v1/urn_registry.py +3 -0
  39. fides/config/redis_settings.py +27 -3
  40. fides/config/security_settings.py +21 -6
  41. fides/ui-build/static/admin/404.html +1 -1
  42. fides/ui-build/static/admin/_next/static/OmXHlY9MvjoZH9jDkAytl/_buildManifest.js +1 -0
  43. fides/ui-build/static/admin/_next/static/chunks/{1345-04e37a66c0d40dc1.js → 1345-5e1c5b66e25c566e.js} +1 -1
  44. fides/ui-build/static/admin/_next/static/chunks/{3729-f5f2976904dce90d.js → 3729-c17ac8031a4c4fd1.js} +1 -1
  45. fides/ui-build/static/admin/_next/static/chunks/{3847-2c0126e6eb54c526.js → 3847-230bf61b053bc706.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/{3855-9dd54ded74f4036b.js → 3855-ef5194cdb228beb6.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/4164-355644b916ae0094.js +1 -0
  48. fides/ui-build/static/admin/_next/static/chunks/{4608-d101417a3abb4ad6.js → 4608-be8cba73f5d7c326.js} +1 -1
  49. fides/ui-build/static/admin/_next/static/chunks/{4786-7aafb744445445b2.js → 4786-61154adf88e448e1.js} +1 -1
  50. fides/ui-build/static/admin/_next/static/chunks/{4808-357ca7ea7bbd24c6.js → 4808-dd4157aa72648068.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/4831-fd99c0b3784de128.js +1 -0
  52. fides/ui-build/static/admin/_next/static/chunks/{4844-707b20a6c4b127cc.js → 4844-46324c3d848b8b6a.js} +1 -1
  53. fides/ui-build/static/admin/_next/static/chunks/{5258-1a8b9f66b97761fc.js → 5258-b0de22a8521686ab.js} +1 -1
  54. fides/ui-build/static/admin/_next/static/chunks/{9046-058a4d8f0b5e08f9.js → 9046-712156d461165f56.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/{9676.b7d5d1d90b9da224.js → 9676.9fd9552ef744c717.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/{9951-b954027a046ce553.js → 9951-a88367a129b724ba.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-7612a768b9a6304b.js → _app-fcdad91f6f66292b.js} +2 -2
  58. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-20253dd047fb9736.js → manual-ace203dfacacbdc4.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-169099ff7b305cf5.js → add-systems-bd0d82078e67cac3.js} +1 -1
  60. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-28b192e2c074b0f3.js +1 -0
  61. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-adc500a03e239857.js → [resourceUrn]-2c29ff7a01198f30.js} +1 -1
  62. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-c8b3d090e4ba60d3.js → [resourceUrn]-8eb581024bc0172f.js} +1 -1
  63. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-cfb0b1200bc1a2c9.js → [systemId]-e1ba213fb666b3f4.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-fed8b879c13c2bf3.js → [monitorId]-6d133580045abdda.js} +1 -1
  65. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-58a110542d6bcd0f.js → activity-b6ae7adb8ef0b525.js} +1 -1
  66. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-22eec362dfbb1d2a.js → [resourceUrn]-8f736b078e9842da.js} +1 -1
  67. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-4decce5ef996e563.js → detection-eb814e3c22807871.js} +1 -1
  68. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-01acdd1ad492fd89.js → [resourceUrn]-6875b7783fcfda2f.js} +1 -1
  69. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-85fdbf4cde60d910.js → discovery-172dbd7740e212ca.js} +1 -1
  70. fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-60e27b673c68bd27.js → datamap-c7390e046b2e2b7f.js} +1 -1
  71. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-2c7b1213b6604d30.js → new-e32fccc4ca520d2b.js} +1 -1
  72. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-7ed3f05700dc397b.js → [id]-927b7e476c4b47d0.js} +1 -1
  73. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-95f6d64f84fc6bf3.js → new-cbe100d50df34285.js} +1 -1
  74. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-02ff0dd9d8f1d719.js → [id]-4c3c413a2668df53.js} +1 -1
  75. fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-0f12d5b658c98c9f.js → integrations-95402b5001c07ef2.js} +1 -1
  76. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-b379873a5771e55b.js → [id]-0f25a76dd18c5e20.js} +1 -1
  77. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-a9bb257906dcd7e0.js → messaging-ad6ad3e5bd72765d.js} +1 -1
  78. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-de0036c74b78e9b7.js → storage-6032d82f0fc2893d.js} +1 -1
  79. fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-91f578139548652c.js → privacy-requests-baf31c3e4b081046.js} +1 -1
  80. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-83019a6753e14857.js → datamap-6903f42a0412bfa6.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-74f0fe9656f4a1f6.js → custom-fields-9ecb803099082bf4.js} +1 -1
  82. fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-2ecc073f41628f62.js +1 -0
  83. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-e91da49c0681a300.js → [id]-6e15332935f6b538.js} +1 -1
  84. fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-78c3a5200d362cff.js → taxonomy-4d7827fc9c46b6b8.js} +1 -1
  85. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-de8cb3739ab99c09.js → new-92f52c43f522a350.js} +1 -1
  86. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-4f9001870e2b3aff.js → [id]-64452dfae2c5e614.js} +1 -1
  87. fides/ui-build/static/admin/_next/static/chunks/{webpack-b5eb3e1da37616d2.js → webpack-678e89d68dbcd94f.js} +1 -1
  88. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  89. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  90. fides/ui-build/static/admin/add-systems.html +1 -1
  91. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  92. fides/ui-build/static/admin/consent/configure.html +1 -1
  93. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  94. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  95. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  96. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  97. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  98. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  99. fides/ui-build/static/admin/consent/properties.html +1 -1
  100. fides/ui-build/static/admin/consent/reporting.html +1 -1
  101. fides/ui-build/static/admin/consent.html +1 -1
  102. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  103. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  104. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  105. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  106. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  107. fides/ui-build/static/admin/data-catalog.html +1 -1
  108. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  109. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  110. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  111. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  112. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  113. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  114. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  115. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  116. fides/ui-build/static/admin/datamap.html +1 -1
  117. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  118. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  119. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  120. fides/ui-build/static/admin/dataset/new.html +1 -1
  121. fides/ui-build/static/admin/dataset.html +1 -1
  122. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  123. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  124. fides/ui-build/static/admin/datastore-connection.html +1 -1
  125. fides/ui-build/static/admin/index.html +1 -1
  126. fides/ui-build/static/admin/integrations/[id].html +1 -1
  127. fides/ui-build/static/admin/integrations.html +1 -1
  128. fides/ui-build/static/admin/login/[provider].html +1 -1
  129. fides/ui-build/static/admin/login.html +1 -1
  130. fides/ui-build/static/admin/messaging/[id].html +1 -1
  131. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  132. fides/ui-build/static/admin/messaging.html +1 -1
  133. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  134. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  135. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  136. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  137. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  138. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  139. fides/ui-build/static/admin/poc/forms.html +1 -1
  140. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  141. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  142. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  143. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  144. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  145. fides/ui-build/static/admin/privacy-requests.html +1 -1
  146. fides/ui-build/static/admin/properties/[id].html +1 -1
  147. fides/ui-build/static/admin/properties/add-property.html +1 -1
  148. fides/ui-build/static/admin/properties.html +1 -1
  149. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  150. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  151. fides/ui-build/static/admin/settings/about.html +1 -1
  152. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  153. fides/ui-build/static/admin/settings/consent.html +1 -1
  154. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  155. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  156. fides/ui-build/static/admin/settings/domains.html +1 -1
  157. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  158. fides/ui-build/static/admin/settings/locations.html +1 -1
  159. fides/ui-build/static/admin/settings/organization.html +1 -1
  160. fides/ui-build/static/admin/settings/privacy-requests.html +1 -0
  161. fides/ui-build/static/admin/settings/regulations.html +1 -1
  162. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  163. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  164. fides/ui-build/static/admin/systems.html +1 -1
  165. fides/ui-build/static/admin/taxonomy.html +1 -1
  166. fides/ui-build/static/admin/user-management/new.html +1 -1
  167. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  168. fides/ui-build/static/admin/user-management.html +1 -1
  169. fides/ui-build/static/admin/_next/static/LqjE2O1xWlQKqW38Sy4m3/_buildManifest.js +0 -1
  170. fides/ui-build/static/admin/_next/static/chunks/4121-bd6f467aacd80f91.js +0 -1
  171. fides/ui-build/static/admin/_next/static/chunks/768-7eac4b30d7477b0a.js +0 -1
  172. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-60e3394c887f3d5e.js +0 -1
  173. {ethyca_fides-2.69.1b1.dist-info → ethyca_fides-2.69.1rc0.dist-info}/WHEEL +0 -0
  174. {ethyca_fides-2.69.1b1.dist-info → ethyca_fides-2.69.1rc0.dist-info}/entry_points.txt +0 -0
  175. {ethyca_fides-2.69.1b1.dist-info → ethyca_fides-2.69.1rc0.dist-info}/licenses/LICENSE +0 -0
  176. {ethyca_fides-2.69.1b1.dist-info → ethyca_fides-2.69.1rc0.dist-info}/top_level.txt +0 -0
  177. /fides/ui-build/static/admin/_next/static/{LqjE2O1xWlQKqW38Sy4m3 → OmXHlY9MvjoZH9jDkAytl}/_ssgManifest.js +0 -0
  178. /fides/ui-build/static/admin/_next/static/chunks/{1099-c34f76b4da5f3d15.js → 1099-79646e64f26d62fa.js} +0 -0
  179. /fides/ui-build/static/admin/_next/static/chunks/{1817-e6934e258111a961.js → 1817-0ca16d288fad916d.js} +0 -0
  180. /fides/ui-build/static/admin/_next/static/chunks/{2921-0696287bb8de1f0b.js → 2921-52328140bc420d0f.js} +0 -0
  181. /fides/ui-build/static/admin/_next/static/chunks/{3620-8c0ee3d0b19c342d.js → 3620-602eb74dc896d556.js} +0 -0
  182. /fides/ui-build/static/admin/_next/static/chunks/{3872-72ea3eb040366277.js → 3872-f78dec02f0d959ae.js} +0 -0
  183. /fides/ui-build/static/admin/_next/static/chunks/{3923-c4f2b03706ddbe39.js → 3923-bb2417b8dcade7a4.js} +0 -0
  184. /fides/ui-build/static/admin/_next/static/chunks/{401-959a15ed18a8abdf.js → 401-4af0a912e249d30f.js} +0 -0
  185. /fides/ui-build/static/admin/_next/static/chunks/{5487-fd9724519f31caff.js → 5487-02d00bad7c6830e0.js} +0 -0
  186. /fides/ui-build/static/admin/_next/static/chunks/{549-d3bef0990071230c.js → 549-38ea1d91ee2addaa.js} +0 -0
  187. /fides/ui-build/static/admin/_next/static/chunks/{6084-487d27d017c45e05.js → 6084-c153669d5567e242.js} +0 -0
  188. /fides/ui-build/static/admin/_next/static/chunks/{6853-f7ab74e30abbdeaf.js → 6853-b17673391117c976.js} +0 -0
  189. /fides/ui-build/static/admin/_next/static/chunks/{6954-b0a7b8ac6db238f8.js → 6954-5296188c19d7d0ac.js} +0 -0
  190. /fides/ui-build/static/admin/_next/static/chunks/{7476-9a57db910472b48e.js → 7476-45c5088baa8b66af.js} +0 -0
  191. /fides/ui-build/static/admin/_next/static/chunks/{7630-46807321449479c7.js → 7630-7ed6c6117775dffe.js} +0 -0
  192. /fides/ui-build/static/admin/_next/static/chunks/{787-79e8e558bd80ece6.js → 787-a8c7eab617e2fceb.js} +0 -0
  193. /fides/ui-build/static/admin/_next/static/chunks/{79-3e5047415bee9391.js → 79-65674011d455af4d.js} +0 -0
  194. /fides/ui-build/static/admin/_next/static/chunks/{796-fb2af44165f37ecc.js → 796-9e1ca1a4030707c5.js} +0 -0
  195. /fides/ui-build/static/admin/_next/static/chunks/{8002-c1f66179adabece8.js → 8002-24af20d679efc04e.js} +0 -0
  196. /fides/ui-build/static/admin/_next/static/chunks/{9826-0d9a7f61c08ed88a.js → 9826-dbae8dee941a7fac.js} +0 -0
  197. /fides/ui-build/static/admin/_next/static/chunks/pages/{404-9c9efb820bb6b432.js → 404-471a6b18e712f050.js} +0 -0
  198. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-caadc3c0e86a7bfe.js → multiple-920fb469e0dda1d2.js} +0 -0
  199. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-acefb9e08c6c4082.js → add-vendors-406170eaae4329c6.js} +0 -0
  200. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-558fbb1667473abb.js → configure-7207ab23bdb36ce8.js} +0 -0
  201. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-b1ff1c9683841815.js → [id]-f80cf2d3966816fd.js} +0 -0
  202. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-674906d2d9a0a3a6.js → privacy-experience-9dda4de5ec580279.js} +0 -0
  203. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-5b7aa7971f070513.js → [id]-b378576cba255609.js} +0 -0
  204. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-285958a12a66575e.js → new-2ca1de7b88094ab0.js} +0 -0
  205. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-dc56bbdb6dd7a670.js → privacy-notices-0d4844d0b808e6e4.js} +0 -0
  206. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-0843757f00eeaaec.js → properties-226efa1dcd41437f.js} +0 -0
  207. /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-5cba58ebecb4511f.js → consent-3e8bdefe714254ec.js} +0 -0
  208. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-0f90cac9f190130c.js → [projectUrn]-04cfe2cfba7b7cd8.js} +0 -0
  209. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-f9117645c941342c.js → projects-5f2d7b24804f861f.js} +0 -0
  210. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-6c3714ee97a718c1.js → resources-de704de849960f01.js} +0 -0
  211. /fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-c566640eecc6f3fe.js → data-catalog-30108b00ac769fc3.js} +0 -0
  212. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-991659e916ad60b1.js → action-center-9a81d42a474e1e48.js} +0 -0
  213. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-3f4ba87513e030a2.js → [...subfieldNames]-dfd71c1e9c458b89.js} +0 -0
  214. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-a6cd31103deba465.js → [collectionName]-7cdc42ec5493b83d.js} +0 -0
  215. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-491d2c8dd559d0cb.js → [datasetId]-e12b11ba15bc3fc1.js} +0 -0
  216. /fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-c8bcd568d3b0ee7f.js → dataset-7c59a6abf6ba6207.js} +0 -0
  217. /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-9a33a412a5f36960.js → datastore-connection-cce20440b177050b.js} +0 -0
  218. /fides/ui-build/static/admin/_next/static/chunks/pages/{index-1299410f671fac23.js → index-6cd8708106331b8d.js} +0 -0
  219. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-ba232c4b17576ccb.js → [id]-3c6dc2f6e6bae960.js} +0 -0
  220. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-b97883026fbc5b1e.js → add-template-4a6d4023a7791be8.js} +0 -0
  221. /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-38189c1058aa4acf.js → messaging-76b204c9b98d656f.js} +0 -0
  222. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-3119bdb3811409bf.js → ant-components-bc0e2adf6e0d3ac7.js} +0 -0
  223. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-8f9d0434dc3eb8cf.js → AntForm-86ffcc1ad3fa912e.js} +0 -0
  224. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-a14e51c7f22f3395.js → FormikAntFormItem-ec04f595465bdf69.js} +0 -0
  225. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-a40645b57822684d.js → FormikControlled-41d309754ff0c1de.js} +0 -0
  226. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-c55df6527b700701.js → FormikField-cab1f78cec7808f9.js} +0 -0
  227. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-292d761616b162a0.js → forms-eb6058221403b156.js} +0 -0
  228. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-135bcf384b81820a.js → table-migration-48500551fd6a7602.js} +0 -0
  229. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-70efccbe0732786b.js → configure-d83e5bd52a638234.js} +0 -0
  230. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-63c6f0193634add5.js → [id]-e784c05d056b2371.js} +0 -0
  231. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-e76567f0374d5912.js → add-property-0a7a2db148a7561a.js} +0 -0
  232. /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-2050b7dac0413c11.js → properties-da734840e4f9d04b.js} +0 -0
  233. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/{alpha-913f8eab62460f31.js → alpha-a82f3df840d5c1b5.js} +0 -0
  234. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-2ed1ee6017c0656a.js → about-d06fb16487705b9d.js} +0 -0
  235. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-bffd6292e7e0302a.js → [purpose_id]-9495e2eb506606c7.js} +0 -0
  236. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-e54b4a7d80b81800.js → consent-93a978443bf299db.js} +0 -0
  237. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-a649ca07ce51b0fe.js → domain-records-16fdd91a81074dd1.js} +0 -0
  238. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-eb675ba600cea2a8.js → domains-4cdd6001e7cb9aee.js} +0 -0
  239. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-4db2f42f90867890.js → email-templates-1914de830ce5cfc4.js} +0 -0
  240. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-89b404989b4ea21c.js → locations-2e635dcd11b78224.js} +0 -0
  241. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-eb1ecff37fd85c72.js → organization-f547f1f33c12faf3.js} +0 -0
  242. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-07d883b5aaec58f2.js → regulations-7c02e469d8c5bd74.js} +0 -0
  243. /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-61ecb7546830c345.js → test-datasets-20b1193ed76c56b0.js} +0 -0
  244. /fides/ui-build/static/admin/_next/static/chunks/pages/{systems-44d714017dd87e62.js → systems-fbc8761ef4d55516.js} +0 -0
  245. /fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-583a7f0c1bead240.js → user-management-9cec020f89544426.js} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4831],{74831:function(e,s,a){a.d(s,{Z:function(){return et}});var t=a(24246),n=a(96306),l=a(91437),i=()=>(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.xuv,{pb:4,fontSize:"18px",fontWeight:"semibold",children:"Role Description"}),(0,t.jsx)(n.gCW,{spacing:4,children:l.K.map(e=>(0,t.jsxs)(n.xuv,{width:"100%",padding:4,borderRadius:"md",backgroundColor:"gray.75",fontSize:"14px",children:[(0,t.jsx)(n.xuv,{fontWeight:"semibold",children:e.label}),(0,t.jsx)(n.xuv,{color:"gray.700",children:e.description})]},e.roleKey))})]}),r=a(16134),d=a(54682),o=a(19904),c=a(34090),h=a(86677),u=a(27378),m=a(812),p=a(46238),x=a(58452),j=a(77830),w=a(46628),g=a(26917),b=a(1315),f=a(95492),y=a(65497);let v=e=>{let{assignedSystems:s,onAssignedSystemChange:a}=e,l=(0,r.C)(y.Ux);if((0,y.d6)(l,{skip:!l}),0===s.length)return null;let i=e=>{a(s.filter(s=>s.fides_key!==e.fides_key))};return(0,t.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,t.jsx)(n.hrZ,{children:(0,t.jsxs)(n.Tr,{children:[(0,t.jsx)(n.Th,{children:"System"}),(0,t.jsx)(n.Th,{})]})}),(0,t.jsx)(n.p3B,{children:s.map(e=>(0,t.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,t.jsx)(n.Td,{children:e.name}),(0,t.jsx)(n.Td,{textAlign:"end",children:(0,t.jsx)(n.wpx,{"aria-label":"Unassign system from user",icon:(0,t.jsx)(f.l,{}),onClick:()=>i(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var _=e=>{let{allSystems:s,assignedSystems:a,onChange:l}=e,i=e=>{a.find(s=>s.fides_key===e.fides_key)?l(a.filter(s=>s.fides_key!==e.fides_key)):l([...a,e])};return(0,t.jsx)(n.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,t.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,t.jsx)(n.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,t.jsxs)(n.Tr,{children:[(0,t.jsx)(n.Th,{children:"System"}),(0,t.jsx)(n.Th,{children:"Assign"})]})}),(0,t.jsx)(n.p3B,{children:s.map(e=>{let s=!!a.find(s=>s.fides_key===e.fides_key);return(0,t.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,t.jsx)(n.Td,{children:e.name}),(0,t.jsx)(n.Td,{children:(0,t.jsx)(n.rAg,{checked:s,onChange:()=>i(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let C=(e,s)=>{var a,t;return(null===(a=e.name)||void 0===a?void 0:a.toLocaleLowerCase().includes(s.toLocaleLowerCase()))||(null===(t=e.description)||void 0===t?void 0:t.toLocaleLowerCase().includes(s.toLocaleLowerCase()))};var S=e=>{let{isOpen:s,onClose:a,assignedSystems:l,onAssignedSystemChange:i}=e,{data:r}=(0,b.K3)(),[d,o]=(0,u.useState)(""),[c,h]=(0,u.useState)(l),m=async()=>{i(c),a()},p=!r||0===r.length,x=(0,u.useMemo)(()=>r?r.filter(e=>C(e,d)):[],[r,d]),j=(0,u.useMemo)(()=>{let e=new Set(c.map(e=>e.fides_key));return x.every(s=>e.has(s.fides_key))},[x,c]);return(0,t.jsxs)(n.u_l,{isOpen:s,onClose:a,size:"2xl",children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,t.jsxs)(n.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,t.jsx)(n.xvT,{children:"Assign systems"}),(0,t.jsxs)(n.j8w,{color:"success",children:["Assigned to ",l.length," systems"]})]}),(0,t.jsx)(n.fef,{"data-testid":"assign-systems-modal-body",children:p?(0,t.jsx)(n.xvT,{children:"No systems found"}):(0,t.jsxs)(n.Kqy,{spacing:4,children:[(0,t.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Assign systems in your organization to this user"}),(0,t.jsx)(n.xuv,{children:(0,t.jsxs)(n.NIc,{display:"flex",alignItems:"center",children:[(0,t.jsx)(n.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,t.jsx)(n.rAg,{size:"small",id:"assign-all-systems",checked:j,onChange:e=>{e&&r?h(x):h(r?r.filter(e=>!x.includes(e)):[])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,t.jsx)(g.Z,{value:d,onChange:o,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,t.jsx)(_,{allSystems:x,assignedSystems:c,onChange:h})]})}),(0,t.jsx)(n.mzw,{justifyContent:"flex-start",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:a,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),p?null:(0,t.jsx)(n.wpx,{type:"primary",onClick:m,"data-testid":"confirm-btn",children:"Confirm"})]})})]})]})},k=e=>{let{label:s,roleKey:a,isSelected:l,isDisabled:i,assignedSystems:r,onAssignedSystemChange:o}=e,{setFieldValue:h}=(0,c.u6)(),u=(0,n.qY0)(),m=i?"You do not have sufficient permissions to assign this role.":void 0;return l?(0,t.jsxs)(n.Kqy,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",p:4,backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",justifyContent:"space-between",children:[(0,t.jsx)(n.xvT,{fontSize:"md",fontWeight:"semibold",children:s}),(0,t.jsx)(n.StI,{})]}),a!==d.A7.APPROVER&&a!==d.A7.RESPONDENT&&a!==d.A7.EXTERNAL_RESPONDENT?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"Assigned systems"}),(0,t.jsx)(p.b,{label:"Assigned systems refer to those systems that have been specifically allocated to a user for management purposes. Users assigned to a system possess full edit permissions and are listed as the Data Steward for the respective system."})]}),(0,t.jsx)(n.wpx,{disabled:i,title:m,type:"primary",size:"small",onClick:u.onOpen,"data-testid":"assign-systems-btn",children:"Assign systems +"}),(0,t.jsx)(v,{assignedSystems:r,onAssignedSystemChange:o}),u.isOpen?(0,t.jsx)(S,{isOpen:u.isOpen,onClose:u.onClose,assignedSystems:r,onAssignedSystemChange:o}):null]}):null]}):(0,t.jsx)(n.wpx,{onClick:()=>{h("roles",[a])},"data-testid":"role-option-".concat(s),title:m,disabled:i,children:s})};let E={roles:[]};var R=()=>{var e,s;let a=(0,n.pmc)(),i=(0,h.useRouter)(),g=(0,r.C)(y.Ux);(0,y.d6)(g,{skip:!g});let{isOpen:b,onOpen:f,onClose:v}=(0,n.qY0)(),_=(0,r.C)(y.R$),[C,S]=(0,u.useState)(_),[R]=(0,y.G$)();(0,u.useEffect)(()=>{S(_)},[_]);let{data:A,isLoading:T}=(0,y.gU)(null!=g?g:"",{skip:!g}),[P]=(0,y.lD)(),N=!!(null==A?void 0:null===(e=A.roles)||void 0===e?void 0:e.includes(d.A7.EXTERNAL_RESPONDENT)),O=async e=>{if(b&&v(),!g)return;let s=e.roles.includes(d.A7.APPROVER),t=await P({user_id:g,payload:{roles:e.roles}});if((0,m.D4)(t)){a((0,w.Vo)((0,m.e$)(t.error)));return}if(!s){let e=C.map(e=>e.fides_key),s=await R({userId:g,fidesKeys:e});if((0,m.D4)(s)){a((0,w.Vo)((0,m.e$)(s.error)));return}}a((0,w.t5)("Permissions updated"))},I=async e=>{g&&(C.length>0&&e.roles.includes(d.A7.APPROVER)?f():await O(e))},z=(0,o.Tg)([d.Sh.USER_PERMISSION_ASSIGN_OWNERS]);if(!g)return null;if(T)return(0,t.jsx)(n.$jN,{});if(!z&&(null==A?void 0:null===(s=A.roles)||void 0===s?void 0:s.includes(d.A7.OWNER)))return(0,t.jsx)(n.xvT,{"data-testid":"insufficient-access",children:"You do not have sufficient access to change this user's permissions."});let q=(null==A?void 0:A.roles)?{roles:A.roles}:E,U=l.K.filter(e=>N?e.roleKey===d.A7.EXTERNAL_RESPONDENT:e.roleKey!==d.A7.EXTERNAL_RESPONDENT),D=N?"External respondent role cannot be changed":void 0;return(0,t.jsx)(c.J9,{onSubmit:I,initialValues:q,enableReinitialize:!0,children:e=>{let{values:s,isSubmitting:a,dirty:l}=e;return(0,t.jsxs)(c.l0,{children:[(0,t.jsxs)(n.Kqy,{spacing:7,children:[(0,t.jsxs)(n.Kqy,{spacing:3,"data-testid":"role-options",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"User role"}),(0,t.jsx)(p.b,{label:"A user's role in the organization determines what parts of the UI they can access and which functions are available to them."})]}),U.map(e=>{let a=s.roles.indexOf(e.roleKey)>=0,n=e.roleKey===d.A7.OWNER?!z:N;return(0,t.jsx)(k,{isSelected:a,isDisabled:n,assignedSystems:C,onAssignedSystemChange:S,...e},e.roleKey)}),!N&&(0,t.jsx)(n.esZ,{title:"To invite a new External respondent user, create a manual task integration and then click on the 'Manage secure access' button",children:(0,t.jsx)(n.wpx,{disabled:!0,"data-testid":"role-option-External respondent",children:"External respondent"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:()=>i.push(j.e3),children:"Cancel"}),(0,t.jsx)(n.esZ,{title:D,children:(0,t.jsx)(n.wpx,{className:"ml-2",type:"primary",htmlType:"submit",loading:a,disabled:!l&&C===_||N,"data-testid":"save-btn",children:"Save"})})]})]}),(0,t.jsx)(x.Z,{isOpen:b,onClose:v,onConfirm:()=>O(s),title:"Change role to Approver",testId:"downgrade-to-approver-confirmation-modal",continueButtonText:"Yes",message:(0,t.jsx)(n.xvT,{children:"Switching to an approver role will remove all assigned systems. Do you wish to proceed?"})})]})}})},A=a(61038),T=a(55484),P=a(25980),N=a(40324),O=a(96006),I=a(7426);let{useGetEmailInviteStatusQuery:z}=a(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]})})});var q=a(76174),U=a(91317),D=a(16125),Z=a(36835),W=a(31883),K=a(52253);let L=(e,s,a)=>{var t;try{localStorage.removeItem(K.xH)}catch(e){}e((0,Z.kS)()),null==a||null===(t=a.onClose)||void 0===t||t.call(a),s.push(K._e)},V=T.Ry().shape({password:O.a.label("Password"),passwordConfirmation:T.Z_().required().oneOf([T.iH("password")],"Passwords must match").label("Password confirmation")}),B={password:"",passwordConfirmation:""},Y=e=>{let s=(0,n.qY0)(),a=(0,n.pmc)(),[t]=(0,y.ls)(),l=(0,h.useRouter)(),i=(0,D.I0)(),d=(0,r.C)(Z.dy),o=async n=>{let r=await t({id:e,new_password:n.password});(0,W.D4)(r)?a((0,w.Vo)((0,m.e$)(r.error))):(a((0,w.t5)("Successfully reset user's password. Please inform the user of their new password.")),s.onClose(),(null==d?void 0:d.id)===e&&L(i,l))};return{...s,handleResetPassword:o}};var F=e=>{let{id:s}=e,{handleResetPassword:a,isOpen:l,onClose:i,onOpen:r}=Y(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{onClick:r,"data-testid":"reset-password-btn",children:"Reset password"}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:l,onClose:i,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsx)(n.hzk,{children:(0,t.jsx)(c.J9,{initialValues:B,validationSchema:V,onSubmit:a,children:e=>{let{isSubmitting:s,dirty:a,isValid:l}=e;return(0,t.jsxs)(c.l0,{children:[(0,t.jsx)(n.xBx,{children:"Reset Password"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{children:(0,t.jsxs)(n.Kqy,{direction:"column",spacing:4,children:[(0,t.jsx)(n.xvT,{mb:2,children:"Choose a new password for this user."}),(0,t.jsx)(N.j0,{name:"password",label:"Password",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",autoComplete:"new-password"}),(0,t.jsx)(N.j0,{name:"passwordConfirmation",label:"Confirm Password",placeholder:"********",type:"password",tooltip:"Must match above password.",autoComplete:"confirm-password"})]})}),(0,t.jsx)(n.mzw,{children:(0,t.jsxs)("div",{className:"w-full gap-2",children:[(0,t.jsx)(n.wpx,{onClick:i,className:"w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{type:"primary",disabled:!a||!l,loading:s,htmlType:"submit",className:"w-1/2","data-testid":"submit-btn",children:"Change Password"})]})})]})}})})]})]})};let $=e=>{let s=(0,n.qY0)(),a=(0,n.pmc)(),[t,l]=(0,u.useState)(""),[i,r]=(0,u.useState)(""),[d,{isLoading:o}]=(0,y.ev)(),c=(0,h.useRouter)(),m=(0,D.I0)(),p=!!(e&&i&&t),x=async()=>{p&&d({id:e,old_password:t,new_password:i}).unwrap().then(()=>{a((0,w.t5)("Password updated")),L(m,c,{onClose:s.onClose})})};return{...s,changePasswordValidation:p,handleChange:e=>{"oldPassword"===e.target.name?l(e.target.value):r(e.target.value)},handleChangePassword:x,isLoading:o,newPasswordValue:i,oldPasswordValue:t}};var H=e=>{let{id:s}=e,{changePasswordValidation:a,handleChange:l,handleChangePassword:i,isLoading:r,isOpen:d,newPasswordValue:o,oldPasswordValue:c,onClose:h,onOpen:u}=$(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{onClick:u,"data-testid":"update-password-btn",children:"Update password"}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:d,onClose:h,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{children:[(0,t.jsx)(n.xBx,{children:"Update Password"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{pb:6,children:(0,t.jsxs)(n.Kqy,{direction:"column",spacing:"15px",children:[(0,t.jsx)(n.NIc,{children:(0,t.jsx)(n.IIB,{isRequired:!0,name:"oldPassword",onChange:l,placeholder:"Old Password",type:"password",value:c,"data-testid":"input-oldPassword"})}),(0,t.jsx)(n.NIc,{children:(0,t.jsx)(n.IIB,{isRequired:!0,name:"newPassword",onChange:l,placeholder:"New Password",type:"password",value:o,"data-testid":"input-newPassword"})})]})}),(0,t.jsxs)(n.mzw,{children:[(0,t.jsx)(n.wpx,{onClick:h,className:"mr-2 w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{type:"primary",disabled:!a,loading:r,onClick:i,htmlType:"submit",className:"mr-3 w-1/2","data-testid":"submit-btn",children:"Change Password"})]})]})]})]})},M=()=>{var e;let s=(0,r.C)(y.Ux),a=(0,r.C)(U.dy),l=!!a&&a.id===s,{data:i}=(0,y.gU)(null!=s?s:"",{skip:!s});return(null==i?void 0:null===(e=i.roles)||void 0===e?void 0:e.includes(d.A7.EXTERNAL_RESPONDENT))?null:(0,t.jsx)(n.xuv,{children:s?(0,t.jsxs)(n.Ugi,{children:[l?(0,t.jsx)(H,{id:s}):null,(0,t.jsx)(o.ZP,{scopes:[d.Sh.USER_PASSWORD_RESET],children:(0,t.jsx)(F,{id:s})})]}):null})};let X=(e,s,a,t)=>!e||e&&!s||e&&s&&!0===a&&!!t,G=(e,s,a)=>!!(e&&s&&a),J=(e,s,a,t,n,l)=>!!e&&!s&&X(a,t,n,l),Q=(e,s,a,t)=>X(e,s,a,t),ee={username:"",first_name:"",email_address:"",last_name:"",password:"",password_login_enabled:!1},es=(e,s,a,t,n)=>T.Ry().shape({username:T.Z_().required().label("Username"),email_address:T.Z_().email().required().label("Email address"),first_name:T.Z_().label("First name"),last_name:T.Z_().label("Last name"),password:T.Z_().when(["password_login_enabled"],{is:l=>J(e,s,a,t,n,l),then:()=>O.a.label("Password"),otherwise:()=>T.Z_().optional().label("Password")}),password_login_enabled:T.O7().label("Allow password login")});var ea=e=>{let{onSubmit:s,initialValues:a,canEditNames:l}=e,i=(0,h.useRouter)(),d=(0,n.pmc)(),o=(0,r.T)(),u=(0,n.qY0)(),{data:p}=z(),{data:x}=(0,q.qv)();(0,I.tB)({api_set:!1});let g=(0,r.C)(y.ZC),b=(0,r.C)(I.iR),{plus:v}=(0,P.hz)(),_=(null==p?void 0:p.enabled)||!1,C=(null==b?void 0:b.allow_username_password_login)||!1,S=!g,k=!S&&!l,E=x&&x.length>0||!1,R=G(v,E,C),T=null!=a?a:ee;g&&"password_login_enabled"in g&&(T={...T,password_login_enabled:!!g.password_login_enabled});let O=es(S,_,v,E,C),U=async e=>{let a=J(S,_,v,E,C,e.password_login_enabled),t={username:e.username,email_address:e.email_address,first_name:e.first_name,last_name:e.last_name};R&&(t.password_login_enabled=e.password_login_enabled),a&&e.password&&(t.password=e.password);let n=await s(t);if((0,m.D4)(n)){d((0,w.Vo)((0,m.e$)(n.error)));return}d((0,w.t5)("".concat(S?"User created. By default, new users are set to the Viewer role. To change the role, please go to the Permissions tab.":"User updated."))),(null==n?void 0:n.data)&&o((0,y.Vv)(n.data.id))};return(0,t.jsx)(c.J9,{onSubmit:U,initialValues:T,validationSchema:O,"data-testid":"user-form",children:e=>{let{dirty:s,isSubmitting:a,isValid:l,values:r}=e;return(0,t.jsx)(c.l0,{children:(0,t.jsxs)(n.Kqy,{maxW:["xs","xs","100%"],width:"100%",spacing:7,children:[(0,t.jsxs)(n.Kqy,{spacing:6,maxWidth:"55%",children:[(0,t.jsxs)(n.kCb,{children:[(0,t.jsxs)(n.xvT,{display:"flex",alignItems:"center",fontSize:"sm",fontWeight:"semibold",children:["Profile"," ",(null==g?void 0:g.disabled)&&(0,t.jsx)(n.j8w,{color:"success",className:"ml-2","data-testid":"invite-sent-badge",children:"Invite sent"})]}),(0,t.jsx)(n.xuv,{marginLeft:"auto",children:(0,t.jsxs)(n.Ugi,{children:[Q(v,E,C||!1,r.password_login_enabled)&&(0,t.jsx)(M,{"data-testid":"password-management"}),S?null:(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.wpx,{"aria-label":"delete",icon:(0,t.jsx)(f.l,{}),onClick:u.onOpen,"data-testid":"delete-user-btn"}),(0,t.jsx)(A.Z,{user:g,...u})]})]})})]}),(0,t.jsx)(N.j0,{name:"username",label:"Username",variant:"block",placeholder:"Enter new username",disabled:!S,isRequired:!0,"data-testid":"input-username"}),(0,t.jsx)(N.j0,{name:"email_address",label:"Email address",variant:"block",placeholder:"Enter email of user",isRequired:!0,"data-testid":"input-email-address"}),(0,t.jsx)(N.j0,{name:"first_name",label:"First name",variant:"block",placeholder:"Enter first name of user",disabled:k,"data-testid":"input-first-name"}),(0,t.jsx)(N.j0,{name:"last_name",label:"Last name",variant:"block",placeholder:"Enter last name of user",disabled:k,"data-testid":"input-last-name"}),R&&(0,t.jsx)(N.w8,{name:"password_login_enabled",label:"Allow password login",tooltip:"When enabled, user can log in with username and password. When disabled, user must use SSO.",variant:"stacked",isDisabled:!S,"data-testid":"toggle-allow-password-login",size:"default"}),J(S,_,v,E,C,r.password_login_enabled)&&(0,t.jsx)(N.j0,{name:"password",label:"Password",variant:"block",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",isRequired:!0,"data-testid":"input-password"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:()=>i.push(j.e3),className:"mr-3","data-testid":"cancel-btn",children:"Cancel"}),(0,t.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!s||!l,loading:a,"data-testid":"save-user-btn",children:"Save"})]})]})})}})},et=e=>{let{onSubmit:s,initialValues:a,...l}=e,c=(0,r.C)(y.Ux);(0,y.Fk)(c,{skip:!c});let h=(0,o.Tg)([d.Sh.USER_PERMISSION_UPDATE]),u=!c||!h,m=[{label:"Profile",key:"profile",children:(0,t.jsx)(ea,{onSubmit:s,initialValues:a,...l})},{label:"Permissions",key:"permissions",children:(0,t.jsxs)(n.kCb,{gap:"97px",children:[(0,t.jsx)(n.xuv,{w:{base:"100%",md:"50%",xl:"50%"},children:(0,t.jsx)(R,{})}),(0,t.jsx)(n.xuv,{position:"absolute",top:"96px",right:6,height:"calc(100% + 100px)",overflowY:"scroll",padding:6,w:"35%",borderLeftWidth:"1px",children:(0,t.jsx)(i,{})})]}),disabled:u,forceRender:!u}];return(0,t.jsx)(n.A5g,{items:m})}},31883:function(e,s,a){a.d(s,{Bw:function(){return t.Bw},D4:function(){return t.D4}});var t=a(19043)}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4844],{74833:function(e,a,n){var i=n(56127),t=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(t,""):e}},56632:function(e,a,n){var i=n(89278),t=n(80068),r=n(50098);e.exports=function(e){return function(a,n,s){var o=Object(a);if(!t(a)){var _=i(n,3);a=r(a),n=function(e){return _(o[e],e,o)}}var l=e(a,n,s);return l>-1?o[_?a[l]:l]:void 0}}},56127:function(e){var a=/\s/;e.exports=function(e){for(var n=e.length;n--&&a.test(e.charAt(n)););return n}},66726:function(e,a,n){var i=n(11611),t=n(82846),r=n(91936),s=Math.max,o=Math.min;e.exports=function(e,a,n){var _,l,F,u,d,c,m=0,h=!1,S=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function p(a){var n=_,i=l;return _=l=void 0,m=a,u=e.apply(i,n)}function y(e){var n=e-c,i=e-m;return void 0===c||n>=a||n<0||S&&i>=F}function v(){var e,n,i,r=t();if(y(r))return C(r);d=setTimeout(v,(e=r-c,n=r-m,i=a-e,S?o(i,F-n):i))}function C(e){return(d=void 0,f&&_)?p(e):(_=l=void 0,u)}function g(){var e,n=t(),i=y(n);if(_=arguments,l=this,c=n,i){if(void 0===d)return m=e=c,d=setTimeout(v,a),h?p(e):u;if(S)return clearTimeout(d),d=setTimeout(v,a),p(c)}return void 0===d&&(d=setTimeout(v,a)),u}return a=r(a)||0,i(n)&&(h=!!n.leading,F=(S="maxWait"in n)?s(r(n.maxWait)||0,a):F,f="trailing"in n?!!n.trailing:f),g.cancel=function(){void 0!==d&&clearTimeout(d),m=0,_=c=l=d=void 0},g.flush=function(){return void 0===d?u:C(t())},g}},64925:function(e,a,n){var i=n(56632)(n(66259));e.exports=i},66259:function(e,a,n){var i=n(95372),t=n(89278),r=n(47991),s=Math.max;e.exports=function(e,a,n){var o=null==e?0:e.length;if(!o)return -1;var _=null==n?0:r(n);return _<0&&(_=s(o+_,0)),i(e,t(a,3),_)}},82846:function(e,a,n){var i=n(77400);e.exports=function(){return i.Date.now()}},94919:function(e,a,n){var i=n(91936),t=1/0;e.exports=function(e){return e?(e=i(e))===t||e===-t?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,a,n){var i=n(94919);e.exports=function(e){var a=i(e),n=a%1;return a==a?n?a-n:a:0}},91936:function(e,a,n){var i=n(74833),t=n(11611),r=n(55193),s=0/0,o=/^[-+]0x[0-9a-f]+$/i,_=/^0b[01]+$/i,l=/^0o[0-7]+$/i,F=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return s;if(t(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=t(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=_.test(e);return n||l.test(e)?F(e.slice(2),n?2:8):o.test(e)?s:+e}},30952:function(e,a,n){"use strict";n.d(a,{f:function(){return _}});var i=n(24246),t=n(66726),r=n.n(t),s=n(27378),o=n(26917);let _=e=>{let{value:a,onChange:n,placeholder:t,..._}=e,[l,F]=(0,s.useState)(a);(0,s.useEffect)(()=>{F(a||"")},[a]);let u=r()(n,500),d=(0,s.useCallback)(e=>{F(e),u(e)},[]);return(0,i.jsx)(o.Z,{value:l,onChange:d,onClear:()=>{F(""),n("")},placeholder:t,..._})}},26089:function(e,a,n){"use strict";var i=n(24246),t=n(96306),r=n(99830),s=n.n(r);a.Z=e=>{let{onClick:a,children:n}=e;return(0,i.jsx)(t.wpx,{onClick:a,type:"link",role:"link",size:"small",className:s().toastLink,children:n})}},29850:function(e,a,n){"use strict";n.d(a,{R:function(){return F}});var i=n(24246),t=n(96306),r=n(27378),s=n(65450);let o=e=>{let{children:a,className:n,style:r,...s}=e;return(0,i.jsx)(t.wpx,{...s,type:"text",className:"w-full justify-start ".concat(n),style:{fontWeight:600,padding:"var(--ant-select-option-padding)",backgroundColor:"var(--ant-select-option-selected-bg)",...r},children:a})};var _=n(16394);let l=(e,a)=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o,{onClick:a,"data-testid":"add-new-system",id:"add-new-system",children:"Add new system +"}),e]}),F=e=>{var a;let{onAddSystem:n,...o}=e,[F,u]=(0,r.useState)(),{data:d,isFetching:c}=(0,s.xF)({page:1,size:25,search:F||void 0}),m=null==d?void 0:null===(a=d.items)||void 0===a?void 0:a.map(e=>({value:e.fides_key,label:e.name})),h=(0,r.useCallback)(e=>{(null==e?void 0:e.length)>1&&u(e),(null==e?void 0:e.length)===0&&u(void 0)},[u]),S=(0,r.useMemo)(()=>(0,_.Ds)(h,300),[h]);return(0,i.jsx)(t.WPr,{placeholder:"Search...","aria-label":"Search for a system to select",popupRender:n?e=>l(e,n):void 0,"data-testid":"system-select",...o,styles:{popup:{root:{minWidth:"500px"}},...o.styles},filterOption:!1,options:m,onSearch:S,loading:o.loading||c})}},8411:function(e,a,n){"use strict";n.d(a,{NA:function(){return r},Z8:function(){return t}});var i=n(54682);let t={[i._F.ER]:"Eritrea",[i._F.DJ]:"Djibouti",[i._F.MR]:"Mauritania",[i._F.NA]:"Namibia",[i._F.GH]:"Ghana",[i._F.SS]:"South Sudan",[i._F.SC]:"Seychelles",[i._F.IO]:"British Indian Ocean Territory",[i._F.GQ]:"Equatorial Guinea",[i._F.AO]:"Angola",[i._F.CG]:"Republic of the Congo",[i._F.BW]:"Botswana",[i._F.BI]:"Burundi",[i._F.DZ]:"Algeria",[i._F.TD]:"Chad",[i._F.NG]:"Nigeria",[i._F.TZ]:"Tanzania",[i._F.EH]:"Western Sahara",[i._F.SN]:"Senegal",[i._F.LR]:"Liberia",[i._F.ZA]:"South Africa",[i._F.CV]:"Cape Verde",[i._F.GM]:"Gambia",[i._F.SD]:"Sudan",[i._F.KM]:"Comoros",[i._F.SZ]:"Eswatini",[i._F.UG]:"Uganda",[i._F.MG]:"Madagascar",[i._F.RW]:"Rwanda",[i._F.CD]:"DR Congo",[i._F.CM]:"Cameroon",[i._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[i._F.TG]:"Togo",[i._F.MU]:"Mauritius",[i._F.NE]:"Niger",[i._F.BJ]:"Benin",[i._F.EG]:"Egypt",[i._F.LS]:"Lesotho",[i._F.ET]:"Ethiopia",[i._F.MA]:"Morocco",[i._F.YT]:"Mayotte",[i._F.BF]:"Burkina Faso",[i._F.RE]:"R\xe9union",[i._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[i._F.CF]:"Central African Republic",[i._F.MZ]:"Mozambique",[i._F.MW]:"Malawi",[i._F.ML]:"Mali",[i._F.ZM]:"Zambia",[i._F.LY]:"Libya",[i._F.GW]:"Guinea-Bissau",[i._F.SO]:"Somalia",[i._F.KE]:"Kenya",[i._F.GN]:"Guinea",[i._F.ZW]:"Zimbabwe",[i._F.TN]:"Tunisia",[i._F.SL]:"Sierra Leone",[i._F.GA]:"Gabon",[i._F.CI]:"Ivory Coast",[i._F.JO]:"Jordan",[i._F.PK]:"Pakistan",[i._F.KP]:"North Korea",[i._F.MO]:"Macau",[i._F.AM]:"Armenia",[i._F.SY]:"Syria",[i._F.TJ]:"Tajikistan",[i._F.SA]:"Saudi Arabia",[i._F.KR]:"South Korea",[i._F.NP]:"Nepal",[i._F.PH]:"Philippines",[i._F.IQ]:"Iraq",[i._F.LB]:"Lebanon",[i._F.MN]:"Mongolia",[i._F.PS]:"Palestine",[i._F.YE]:"Yemen",[i._F.JP]:"Japan",[i._F.KZ]:"Kazakhstan",[i._F.LK]:"Sri Lanka",[i._F.MM]:"Myanmar",[i._F.KG]:"Kyrgyzstan",[i._F.CN]:"China",[i._F.AF]:"Afghanistan",[i._F.OM]:"Oman",[i._F.IN]:"India",[i._F.LA]:"Laos",[i._F.UZ]:"Uzbekistan",[i._F.MV]:"Maldives",[i._F.ID]:"Indonesia",[i._F.VN]:"Vietnam",[i._F.MY]:"Malaysia",[i._F.TW]:"Taiwan",[i._F.KH]:"Cambodia",[i._F.AE]:"United Arab Emirates",[i._F.HK]:"Hong Kong",[i._F.GE]:"Georgia (Country)",[i._F.BD]:"Bangladesh",[i._F.KW]:"Kuwait",[i._F.TM]:"Turkmenistan",[i._F.QA]:"Qatar",[i._F.BH]:"Bahrain",[i._F.BN]:"Brunei",[i._F.TH]:"Thailand",[i._F.BT]:"Bhutan",[i._F.SG]:"Singapore",[i._F.IL]:"Israel",[i._F.AZ]:"Azerbaijan",[i._F.TL]:"Timor-Leste",[i._F.IR]:"Iran",[i._F.TR]:"Turkey",[i._F.MK]:"North Macedonia",[i._F.IE]:"Ireland",[i._F.DK]:"Denmark",[i._F.SK]:"Slovakia",[i._F.MD]:"Moldova",[i._F.AX]:"\xc5land Islands",[i._F.PL]:"Poland",[i._F.BA]:"Bosnia and Herzegovina",[i._F.SM]:"San Marino",[i._F.CZ]:"Czechia",[i._F.EE]:"Estonia",[i._F.XK]:"Kosovo",[i._F.FO]:"Faroe Islands",[i._F.SJ]:"Svalbard and Jan Mayen",[i._F.GG]:"Guernsey",[i._F.FR]:"France",[i._F.NL]:"Netherlands",[i._F.FI]:"Finland",[i._F.PT]:"Portugal",[i._F.DE]:"Germany",[i._F.MT]:"Malta",[i._F.JE]:"Jersey",[i._F.IS]:"Iceland",[i._F.ES]:"Spain",[i._F.GI]:"Gibraltar",[i._F.NO]:"Norway",[i._F.CY]:"Cyprus",[i._F.RS]:"Serbia",[i._F.LT]:"Lithuania",[i._F.MC]:"Monaco",[i._F.LU]:"Luxembourg",[i._F.UA]:"Ukraine",[i._F.IM]:"Isle of Man",[i._F.RO]:"Romania",[i._F.BE]:"Belgium",[i._F.SE]:"Sweden",[i._F.ME]:"Montenegro",[i._F.LV]:"Latvia",[i._F.VA]:"Vatican City",[i._F.AT]:"Austria",[i._F.AL]:"Albania",[i._F.LI]:"Liechtenstein",[i._F.GR]:"Greece",[i._F.IT]:"Italy",[i._F.AD]:"Andorra",[i._F.GB]:"United Kingdom",[i._F.RU]:"Russia",[i._F.SI]:"Slovenia",[i._F.BY]:"Belarus",[i._F.CH]:"Switzerland",[i._F.HU]:"Hungary",[i._F.BG]:"Bulgaria",[i._F.HR]:"Croatia",[i._F.TC]:"Turks and Caicos Islands",[i._F.CW]:"Cura\xe7ao",[i._F.GP]:"Guadeloupe",[i._F.UM]:"United States Minor Outlying Islands",[i._F.GT]:"Guatemala",[i._F.PM]:"Saint Pierre and Miquelon",[i._F.BQ]:"Caribbean Netherlands",[i._F.GL]:"Greenland",[i._F.SX]:"Sint Maarten",[i._F.PA]:"Panama",[i._F.AW]:"Aruba",[i._F.MQ]:"Martinique",[i._F.AG]:"Antigua and Barbuda",[i._F.BM]:"Bermuda",[i._F.CU]:"Cuba",[i._F.GD]:"Grenada",[i._F.NI]:"Nicaragua",[i._F.LC]:"Saint Lucia",[i._F.KN]:"Saint Kitts and Nevis",[i._F.DO]:"Dominican Republic",[i._F.VC]:"Saint Vincent and the Grenadines",[i._F.BZ]:"Belize",[i._F.HT]:"Haiti",[i._F.JM]:"Jamaica",[i._F.BS]:"Bahamas",[i._F.MX]:"Mexico",[i._F.MF]:"Saint Martin",[i._F.SV]:"El Salvador",[i._F.BL]:"Saint Barth\xe9lemy",[i._F.AI]:"Anguilla",[i._F.MS]:"Montserrat",[i._F.VG]:"British Virgin Islands",[i._F.BB]:"Barbados",[i._F.HN]:"Honduras",[i._F.KY]:"Cayman Islands",[i._F.DM]:"Dominica",[i._F.TT]:"Trinidad and Tobago",[i._F.CR]:"Costa Rica",[i._F.SR]:"Suriname",[i._F.CX]:"Christmas Island",[i._F.WS]:"Samoa",[i._F.PF]:"French Polynesia",[i._F.AS]:"American Samoa",[i._F.NC]:"New Caledonia",[i._F.TK]:"Tokelau",[i._F.PW]:"Palau",[i._F.KI]:"Kiribati",[i._F.VU]:"Vanuatu",[i._F.PN]:"Pitcairn Islands",[i._F.CK]:"Cook Islands",[i._F.FJ]:"Fiji",[i._F.PG]:"Papua New Guinea",[i._F.MP]:"Northern Mariana Islands",[i._F.NU]:"Niue",[i._F.TV]:"Tuvalu",[i._F.NF]:"Norfolk Island",[i._F.TO]:"Tonga",[i._F.FM]:"Micronesia",[i._F.SB]:"Solomon Islands",[i._F.NR]:"Nauru",[i._F.WF]:"Wallis and Futuna",[i._F.GU]:"Guam",[i._F.AU]:"Australia",[i._F.NZ]:"New Zealand",[i._F.MH]:"Marshall Islands",[i._F.CC]:"Cocos (Keeling) Islands",[i._F.VE]:"Venezuela",[i._F.PY]:"Paraguay",[i._F.BR]:"Brazil",[i._F.CO]:"Colombia",[i._F.PE]:"Peru",[i._F.CL]:"Chile",[i._F.UY]:"Uruguay",[i._F.AR]:"Argentina",[i._F.GY]:"Guyana",[i._F.BO]:"Bolivia",[i._F.GF]:"French Guiana",[i._F.EC]:"Ecuador",[i._F.FK]:"Falkland Islands",[i._F.US_AL]:"Alabama",[i._F.US_AK]:"Alaska",[i._F.US_AZ]:"Arizona",[i._F.US_AR]:"Arkansas",[i._F.US_CA]:"California",[i._F.US_CO]:"Colorado",[i._F.US_CT]:"Connecticut",[i._F.US_DE]:"Delaware",[i._F.US_DC]:"District of Columbia (DC)",[i._F.US_FL]:"Florida",[i._F.US_GA]:"Georgia",[i._F.US_HI]:"Hawaii",[i._F.US_ID]:"Idaho",[i._F.US_IL]:"Illinois",[i._F.US_IN]:"Indiana",[i._F.US_IA]:"Iowa",[i._F.US_KS]:"Kansas",[i._F.US_KY]:"Kentucky",[i._F.US_LA]:"Louisiana",[i._F.US_ME]:"Maine",[i._F.US_MD]:"Maryland",[i._F.US_MA]:"Massachusetts",[i._F.US_MI]:"Michigan",[i._F.US_MN]:"Minnesota",[i._F.US_MS]:"Mississippi",[i._F.US_MO]:"Missouri",[i._F.US_MT]:"Montana",[i._F.US_NE]:"Nebraska",[i._F.US_NV]:"Nevada",[i._F.US_NH]:"New Hampshire",[i._F.US_NJ]:"New Jersey",[i._F.US_NM]:"New Mexico",[i._F.US_NY]:"New York",[i._F.US_NC]:"North Carolina",[i._F.US_ND]:"North Dakota",[i._F.US_OH]:"Ohio",[i._F.US_OK]:"Oklahoma",[i._F.US_OR]:"Oregon",[i._F.US_PA]:"Pennsylvania",[i._F.US_PR]:"Puerto Rico",[i._F.US_RI]:"Rhode Island",[i._F.US_SC]:"South Carolina",[i._F.US_SD]:"South Dakota",[i._F.US_TN]:"Tennessee",[i._F.US_TX]:"Texas",[i._F.US_UT]:"Utah",[i._F.US_VA]:"Virginia",[i._F.US_VI]:"United States Virgin Islands",[i._F.US_VT]:"Vermont",[i._F.US_WA]:"Washington",[i._F.US_WV]:"West Virginia",[i._F.US_WI]:"Wisconsin",[i._F.US_WY]:"Wyoming",[i._F.CA_AB]:"Alberta",[i._F.CA_BC]:"British Columbia",[i._F.CA_MB]:"Manitoba",[i._F.CA_NB]:"New Brunswick",[i._F.CA_NL]:"Newfoundland and Labrador",[i._F.CA_NS]:"Nova Scotia",[i._F.CA_ON]:"Ontario",[i._F.CA_PE]:"Prince Edward Island",[i._F.CA_QC]:"Quebec",[i._F.CA_SK]:"Saskatchewan",[i._F.CA_NT]:"Northwest Territories",[i._F.CA_NU]:"Nunavut",[i._F.CA_YT]:"Yukon",[i._F.CA]:"Canada",[i._F.US]:"United States",[i._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[i._F.CARIBBEAN]:"Caribbean",[i._F.EEA]:"European Economic Area (EEA)",[i._F.NON_EEA]:"Non European Economic Area",[i._F.GLOBAL]:"Global"},r=new Map(Object.entries(t));Object.entries(t).map(e=>({value:e[0],label:e[1]}))},14908:function(e,a,n){"use strict";var i=n(86677),t=n(27378);let r=e=>e.startsWith("#")?e.slice(1):e;a.Z=e=>{let{tabKeys:a,initialTab:n}=e,s=(0,i.useRouter)(),o=s.asPath.split("#")[1]||a[0],[_,l]=(0,t.useState)(o);return(0,t.useEffect)(()=>{n&&a.includes(n)&&l(n)},[n,a,s.isReady]),{activeTab:_,onTabChange:(0,t.useCallback)(async e=>{if(!a.includes(e)){await s.replace({pathname:s.pathname,query:s.query,hash:void 0}),l(a[0]);return}s.isReady&&(await s.replace({pathname:s.pathname,query:s.query,hash:r(e)},void 0,{shallow:!0}),l(e))},[s,a])}}},77685:function(e,a,n){"use strict";n.d(a,{i:function(){return M}});var i=n(24246),t=n(96306),r=n(34090),s=n(27378),o=n(55484),_=n(16134),l=n(25980),F=n(97181),u=n(40324),d=n(812),c=n(75573),m=n(45938),h=n(8133),S=n(33335),f=n(32885),p=n(57865),y=n(93237),v=n(65450),C=n(36345);let{Text:g}=t.AntTypography,b={name:"",vendor_id:void 0,description:"",tags:[]},M=e=>{let{onSuccessfulSubmit:a,toastOnSuccess:n,...M}=e,[A,N]=(0,s.useState)(!1),x=(0,_.T)(),{tcf:U,dictionaryService:I}=(0,l.hz)(),{isLoading:T}=(0,f.Rd)(void 0,{skip:!I}),j=(0,_.C)(f.o),w=(0,_.C)(p.gU),[B]=(0,v.in)(),[E]=(0,f.Qk)(),[k]=(0,v.f7)(),{successAlert:G,errorAlert:L}=(0,c.VY)(),{setSuggestions:R,setLockedForGVL:P}=p.dictSuggestionsSlice.actions,K=(0,s.useRef)(null),D=(0,s.useMemo)(()=>o.Ry().shape({name:o.Z_().required().label("System name").test("is-unique","",async(e,a)=>{let{data:n}=await B({page:1,size:10,search:e});return!((null==n?void 0:n.items)||[]).filter(a=>a.name===e).some(a=>a.name===e)||a.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})})}),[B]),O=e=>{if(I){if(!e){x(R("hiding")),x(P(!1));return}x(R("showing")),U&&(0,d.cj)(e)===d.c6.GVL?x(P(!0)):x(P(!1))}},W=()=>{M.onClose(),x(R("initial")),x(P(!1))},V=async e=>{if(N(!0),e.vendor_id){let i=await E([e.vendor_id]);if((0,d.D4)(i))L((0,d.e$)(i.error));else{let{data:e}=i,t=e.systems[0];null==a||a(t.fides_key,t.name),n&&G("".concat(e.name," has been added to your system inventory."))}}else{let i={...e,fides_key:(0,S.E)(e.name),system_type:"",body:"",privacy_declarations:[]},t=await k(i);if((0,d.D4)(t))L((0,d.e$)(t.error));else{let{fides_key:i,name:r}=t.data;null==a||a(i,r),n&&G("".concat(e.name," has been added to your system inventory."))}W()}N(!1)};return(0,i.jsx)(h.Z,{title:"Add New System",...M,onClose:W,children:(0,i.jsx)(r.J9,{initialValues:b,onSubmit:V,validationSchema:D,innerRef:K,children:e=>{let{dirty:a,isValid:n}=e;return(0,i.jsxs)(r.l0,{children:[(0,i.jsx)(m.Gt,{id:"new-system-modal",name:"Add New System"}),(0,i.jsxs)(t.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,i.jsx)(g,{children:"Fides will add this system to your inventory and configure it for consent using the categories of consent listed below. Optionally, you can check if this system is listed within the Fides compass library by selecting the compass icon below."}),I?(0,i.jsx)(C.Z,{label:"System name",options:j,onVendorSelected:O,isCreate:!0,lockedForGVL:w,isLoading:T}):(0,i.jsx)(u.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(0,i.jsx)(y.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:w}),(0,i.jsx)(F.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:w})]}),(0,i.jsxs)(t.jqI,{justify:"space-between",children:[(0,i.jsx)(t.wpx,{htmlType:"reset",onClick:W,disabled:T||!a||!n,"data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(t.wpx,{htmlType:"submit",type:"primary",disabled:T||!a||!n,loading:A,"data-testid":"save-btn",children:"Save"})]})]})}})})}},93237:function(e,a,n){"use strict";n.d(a,{Sv:function(){return m},Yb:function(){return c},dQ:function(){return h},lm:function(){return S}});var i=n(24246),t=n(96306),r=n(34090),s=n(27378),o=n(16134),_=n(40324),l=n(46238),F=n(32885),u=n(57865);let d=(e,a,n)=>{var i,t;let[_,l,{setValue:d,setTouched:c}]=(0,r.U$)({name:e,type:n||void 0}),m=!!(l.touched&&l.error),{error:h}=l,S={..._,value:null!==(i=_.value)&&void 0!==i?i:""},[f,p]=(0,s.useState)(null!==(t=S.value)&&void 0!==t?t:""),{values:y}=(0,r.u6)(),{vendor_id:v}=y,C=(0,o.C)((0,F.$e)(v||"")),g=(0,o.C)(u.bN),b=(0,s.useRef)();return(0,s.useEffect)(()=>{"showing"===g&&p(S.value)},[g,p]),(0,s.useEffect)(()=>{if("showing"===g&&C){let n=a?a(C):C[e];S.value!==n&&(d(n),setTimeout(()=>{var e;c(!0),null===(e=b.current)||void 0===e||e.blur()},300))}},[g,d,C,b.current]),(0,s.useEffect)(()=>{"hiding"===g&&d(f)},[g,d,f]),{field:S,isInvalid:m,isShowingSuggestions:g,error:h,inputRef:b}},c=e=>{let{label:a,tooltip:n,disabled:r,isRequired:s=!1,dictField:o,name:F,placeholder:u,id:c}=e,{field:m,isInvalid:h,isShowingSuggestions:S,error:f,inputRef:p}=d(F,o);return(0,i.jsx)(t.NIc,{isInvalid:h,isRequired:s,children:(0,i.jsxs)(t.gCW,{alignItems:"start",children:[(0,i.jsxs)(t.kCb,{alignItems:"center",children:[(0,i.jsx)(_.__,{htmlFor:c||F,fontSize:"xs",my:0,mr:1,children:a}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(_.oi,{...m,ref:p,isRequired:s,isDisabled:r,"data-testid":"input-".concat(m.name),placeholder:u,isPassword:!1,color:"showing"===S?"complimentary.500":"gray.800"}),(0,i.jsx)(_.Bc,{isInvalid:h,message:f,fieldName:m.name})]})})},m=e=>{let{label:a,tooltip:n,disabled:r,isRequired:s=!1,dictField:o,name:F,id:u}=e,{field:c,isInvalid:m,isShowingSuggestions:h,error:S}=d(F,o);return(0,i.jsx)(t.NIc,{isInvalid:m,isRequired:s,children:(0,i.jsxs)(t.gCW,{alignItems:"start",children:[(0,i.jsxs)(t.kCb,{alignItems:"center",children:[(0,i.jsx)(_.__,{htmlFor:u||F,fontSize:"xs",my:0,mr:1,children:a}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.gxH,{...c,size:"sm","data-testid":"input-".concat(c.name),focusBorderColor:"primary.600",color:"showing"===h?"complimentary.500":"gray.800",isDisabled:r}),(0,i.jsx)(_.Bc,{isInvalid:m,message:S,fieldName:c.name})]})})},h=e=>{let{label:a,tooltip:n,dictField:s,name:o,id:F,disabled:u}=e,{field:c,isInvalid:m,error:h}=d(o,s,"checkbox");return(0,i.jsxs)(t.NIc,{isInvalid:m,width:"full",children:[(0,i.jsxs)(t.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(t.Ugi,{spacing:1,children:[(0,i.jsx)(_.__,{htmlFor:F||o,fontSize:"xs",my:0,mr:0,children:a}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.Ugi,{children:(0,i.jsx)(r.gN,{name:c.name,children:e=>{let{form:{setFieldValue:a}}=e;return(0,i.jsx)(t.rAg,{checked:c.checked,onChange:e=>{a(c.name,e)},disabled:u,className:"mr-2","data-testid":"input-".concat(c.name),size:"small"})}})})]}),(0,i.jsx)(_.Bc,{isInvalid:m,message:h,fieldName:c.name})]})},S=e=>{let{label:a,tooltip:n,dictField:s,name:o,id:F,disabled:u}=e,{field:c,isInvalid:m,error:h,isShowingSuggestions:S}=d(o,s,"numeric"),{setFieldValue:f}=(0,r.u6)();return(0,i.jsxs)(t.NIc,{isInvalid:m,width:"full",children:[(0,i.jsxs)(t.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(t.Ugi,{spacing:1,children:[(0,i.jsx)(_.__,{htmlFor:F||o,fontSize:"xs",my:0,mr:0,children:a}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.Ugi,{children:(0,i.jsxs)(t.Y2U,{value:c.value,name:c.name,size:"xs",onBlur:c.onBlur,onChange:e=>{f(c.name,e)},w:"100%",colorScheme:"terracotta",inputMode:"numeric","data-testid":"input-".concat(c.name),color:"showing"===S?"complimentary.500":"gray.800",focusBorderColor:"primary.600",isDisabled:u,children:[(0,i.jsx)(t.zuI,{}),(0,i.jsxs)(t.FiK,{children:[(0,i.jsx)(t.WQu,{}),(0,i.jsx)(t.Y_d,{})]})]})})]}),(0,i.jsx)(_.Bc,{isInvalid:m,message:h,fieldName:c.name})]})}},99830:function(e){e.exports={toastLink:"ToastLink_toastLink__OLSeq"}}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4844],{74833:function(e,a,n){var i=n(56127),t=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(t,""):e}},56632:function(e,a,n){var i=n(89278),t=n(80068),r=n(50098);e.exports=function(e){return function(a,n,s){var o=Object(a);if(!t(a)){var _=i(n,3);a=r(a),n=function(e){return _(o[e],e,o)}}var l=e(a,n,s);return l>-1?o[_?a[l]:l]:void 0}}},56127:function(e){var a=/\s/;e.exports=function(e){for(var n=e.length;n--&&a.test(e.charAt(n)););return n}},66726:function(e,a,n){var i=n(11611),t=n(82846),r=n(91936),s=Math.max,o=Math.min;e.exports=function(e,a,n){var _,l,F,u,d,c,m=0,h=!1,S=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function p(a){var n=_,i=l;return _=l=void 0,m=a,u=e.apply(i,n)}function y(e){var n=e-c,i=e-m;return void 0===c||n>=a||n<0||S&&i>=F}function v(){var e,n,i,r=t();if(y(r))return C(r);d=setTimeout(v,(e=r-c,n=r-m,i=a-e,S?o(i,F-n):i))}function C(e){return(d=void 0,f&&_)?p(e):(_=l=void 0,u)}function g(){var e,n=t(),i=y(n);if(_=arguments,l=this,c=n,i){if(void 0===d)return m=e=c,d=setTimeout(v,a),h?p(e):u;if(S)return clearTimeout(d),d=setTimeout(v,a),p(c)}return void 0===d&&(d=setTimeout(v,a)),u}return a=r(a)||0,i(n)&&(h=!!n.leading,F=(S="maxWait"in n)?s(r(n.maxWait)||0,a):F,f="trailing"in n?!!n.trailing:f),g.cancel=function(){void 0!==d&&clearTimeout(d),m=0,_=c=l=d=void 0},g.flush=function(){return void 0===d?u:C(t())},g}},64925:function(e,a,n){var i=n(56632)(n(66259));e.exports=i},66259:function(e,a,n){var i=n(95372),t=n(89278),r=n(47991),s=Math.max;e.exports=function(e,a,n){var o=null==e?0:e.length;if(!o)return -1;var _=null==n?0:r(n);return _<0&&(_=s(o+_,0)),i(e,t(a,3),_)}},82846:function(e,a,n){var i=n(77400);e.exports=function(){return i.Date.now()}},94919:function(e,a,n){var i=n(91936),t=1/0;e.exports=function(e){return e?(e=i(e))===t||e===-t?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,a,n){var i=n(94919);e.exports=function(e){var a=i(e),n=a%1;return a==a?n?a-n:a:0}},91936:function(e,a,n){var i=n(74833),t=n(11611),r=n(55193),s=0/0,o=/^[-+]0x[0-9a-f]+$/i,_=/^0b[01]+$/i,l=/^0o[0-7]+$/i,F=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return s;if(t(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=t(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=_.test(e);return n||l.test(e)?F(e.slice(2),n?2:8):o.test(e)?s:+e}},30952:function(e,a,n){"use strict";n.d(a,{f:function(){return _}});var i=n(24246),t=n(66726),r=n.n(t),s=n(27378),o=n(26917);let _=e=>{let{value:a,onChange:n,placeholder:t,..._}=e,[l,F]=(0,s.useState)(a);(0,s.useEffect)(()=>{F(a||"")},[a]);let u=r()(n,500),d=(0,s.useCallback)(e=>{F(e),u(e)},[]);return(0,i.jsx)(o.Z,{value:l,onChange:d,onClear:()=>{F(""),n("")},placeholder:t,..._})}},26089:function(e,a,n){"use strict";var i=n(24246),t=n(96306),r=n(99830),s=n.n(r);a.Z=e=>{let{onClick:a,children:n}=e;return(0,i.jsx)(t.wpx,{onClick:a,type:"link",role:"link",size:"small",className:s().toastLink,children:n})}},29850:function(e,a,n){"use strict";n.d(a,{R:function(){return F}});var i=n(24246),t=n(96306),r=n(27378),s=n(65450);let o=e=>{let{children:a,className:n,style:r,...s}=e;return(0,i.jsx)(t.wpx,{...s,type:"text",className:"w-full justify-start ".concat(n),style:{fontWeight:600,padding:"var(--ant-select-option-padding)",backgroundColor:"var(--ant-select-option-selected-bg)",...r},children:a})};var _=n(16394);let l=(e,a)=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o,{onClick:a,"data-testid":"add-new-system",id:"add-new-system",children:"Add new system +"}),e]}),F=e=>{var a;let{onAddSystem:n,...o}=e,[F,u]=(0,r.useState)(),{data:d,isFetching:c}=(0,s.xF)({page:1,size:25,search:F||void 0}),m=null==d?void 0:null===(a=d.items)||void 0===a?void 0:a.map(e=>({value:e.fides_key,label:e.name})),h=(0,r.useCallback)(e=>{(null==e?void 0:e.length)>1&&u(e),(null==e?void 0:e.length)===0&&u(void 0)},[u]),S=(0,r.useMemo)(()=>(0,_.Ds)(h,300),[h]);return(0,i.jsx)(t.WPr,{placeholder:"Search...","aria-label":"Search for a system to select",popupRender:n?e=>l(e,n):void 0,"data-testid":"system-select",...o,styles:{popup:{root:{minWidth:"500px"}},...o.styles},filterOption:!1,options:m,onSearch:S,loading:o.loading||c})}},8411:function(e,a,n){"use strict";n.d(a,{NA:function(){return r},Z8:function(){return t}});var i=n(54682);let t={[i._F.ER]:"Eritrea",[i._F.DJ]:"Djibouti",[i._F.MR]:"Mauritania",[i._F.NA]:"Namibia",[i._F.GH]:"Ghana",[i._F.SS]:"South Sudan",[i._F.SC]:"Seychelles",[i._F.IO]:"British Indian Ocean Territory",[i._F.GQ]:"Equatorial Guinea",[i._F.AO]:"Angola",[i._F.CG]:"Republic of the Congo",[i._F.BW]:"Botswana",[i._F.BI]:"Burundi",[i._F.DZ]:"Algeria",[i._F.TD]:"Chad",[i._F.NG]:"Nigeria",[i._F.TZ]:"Tanzania",[i._F.EH]:"Western Sahara",[i._F.SN]:"Senegal",[i._F.LR]:"Liberia",[i._F.ZA]:"South Africa",[i._F.CV]:"Cape Verde",[i._F.GM]:"Gambia",[i._F.SD]:"Sudan",[i._F.KM]:"Comoros",[i._F.SZ]:"Eswatini",[i._F.UG]:"Uganda",[i._F.MG]:"Madagascar",[i._F.RW]:"Rwanda",[i._F.CD]:"DR Congo",[i._F.CM]:"Cameroon",[i._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[i._F.TG]:"Togo",[i._F.MU]:"Mauritius",[i._F.NE]:"Niger",[i._F.BJ]:"Benin",[i._F.EG]:"Egypt",[i._F.LS]:"Lesotho",[i._F.ET]:"Ethiopia",[i._F.MA]:"Morocco",[i._F.YT]:"Mayotte",[i._F.BF]:"Burkina Faso",[i._F.RE]:"R\xe9union",[i._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[i._F.CF]:"Central African Republic",[i._F.MZ]:"Mozambique",[i._F.MW]:"Malawi",[i._F.ML]:"Mali",[i._F.ZM]:"Zambia",[i._F.LY]:"Libya",[i._F.GW]:"Guinea-Bissau",[i._F.SO]:"Somalia",[i._F.KE]:"Kenya",[i._F.GN]:"Guinea",[i._F.ZW]:"Zimbabwe",[i._F.TN]:"Tunisia",[i._F.SL]:"Sierra Leone",[i._F.GA]:"Gabon",[i._F.CI]:"Ivory Coast",[i._F.JO]:"Jordan",[i._F.PK]:"Pakistan",[i._F.KP]:"North Korea",[i._F.MO]:"Macau",[i._F.AM]:"Armenia",[i._F.SY]:"Syria",[i._F.TJ]:"Tajikistan",[i._F.SA]:"Saudi Arabia",[i._F.KR]:"South Korea",[i._F.NP]:"Nepal",[i._F.PH]:"Philippines",[i._F.IQ]:"Iraq",[i._F.LB]:"Lebanon",[i._F.MN]:"Mongolia",[i._F.PS]:"Palestine",[i._F.YE]:"Yemen",[i._F.JP]:"Japan",[i._F.KZ]:"Kazakhstan",[i._F.LK]:"Sri Lanka",[i._F.MM]:"Myanmar",[i._F.KG]:"Kyrgyzstan",[i._F.CN]:"China",[i._F.AF]:"Afghanistan",[i._F.OM]:"Oman",[i._F.IN]:"India",[i._F.LA]:"Laos",[i._F.UZ]:"Uzbekistan",[i._F.MV]:"Maldives",[i._F.ID]:"Indonesia",[i._F.VN]:"Vietnam",[i._F.MY]:"Malaysia",[i._F.TW]:"Taiwan",[i._F.KH]:"Cambodia",[i._F.AE]:"United Arab Emirates",[i._F.HK]:"Hong Kong",[i._F.GE]:"Georgia (Country)",[i._F.BD]:"Bangladesh",[i._F.KW]:"Kuwait",[i._F.TM]:"Turkmenistan",[i._F.QA]:"Qatar",[i._F.BH]:"Bahrain",[i._F.BN]:"Brunei",[i._F.TH]:"Thailand",[i._F.BT]:"Bhutan",[i._F.SG]:"Singapore",[i._F.IL]:"Israel",[i._F.AZ]:"Azerbaijan",[i._F.TL]:"Timor-Leste",[i._F.IR]:"Iran",[i._F.TR]:"Turkey",[i._F.MK]:"North Macedonia",[i._F.IE]:"Ireland",[i._F.DK]:"Denmark",[i._F.SK]:"Slovakia",[i._F.MD]:"Moldova",[i._F.AX]:"\xc5land Islands",[i._F.PL]:"Poland",[i._F.BA]:"Bosnia and Herzegovina",[i._F.SM]:"San Marino",[i._F.CZ]:"Czechia",[i._F.EE]:"Estonia",[i._F.XK]:"Kosovo",[i._F.FO]:"Faroe Islands",[i._F.SJ]:"Svalbard and Jan Mayen",[i._F.GG]:"Guernsey",[i._F.FR]:"France",[i._F.NL]:"Netherlands",[i._F.FI]:"Finland",[i._F.PT]:"Portugal",[i._F.DE]:"Germany",[i._F.MT]:"Malta",[i._F.JE]:"Jersey",[i._F.IS]:"Iceland",[i._F.ES]:"Spain",[i._F.GI]:"Gibraltar",[i._F.NO]:"Norway",[i._F.CY]:"Cyprus",[i._F.RS]:"Serbia",[i._F.LT]:"Lithuania",[i._F.MC]:"Monaco",[i._F.LU]:"Luxembourg",[i._F.UA]:"Ukraine",[i._F.IM]:"Isle of Man",[i._F.RO]:"Romania",[i._F.BE]:"Belgium",[i._F.SE]:"Sweden",[i._F.ME]:"Montenegro",[i._F.LV]:"Latvia",[i._F.VA]:"Vatican City",[i._F.AT]:"Austria",[i._F.AL]:"Albania",[i._F.LI]:"Liechtenstein",[i._F.GR]:"Greece",[i._F.IT]:"Italy",[i._F.AD]:"Andorra",[i._F.GB]:"United Kingdom",[i._F.RU]:"Russia",[i._F.SI]:"Slovenia",[i._F.BY]:"Belarus",[i._F.CH]:"Switzerland",[i._F.HU]:"Hungary",[i._F.BG]:"Bulgaria",[i._F.HR]:"Croatia",[i._F.TC]:"Turks and Caicos Islands",[i._F.CW]:"Cura\xe7ao",[i._F.GP]:"Guadeloupe",[i._F.UM]:"United States Minor Outlying Islands",[i._F.GT]:"Guatemala",[i._F.PM]:"Saint Pierre and Miquelon",[i._F.BQ]:"Caribbean Netherlands",[i._F.GL]:"Greenland",[i._F.SX]:"Sint Maarten",[i._F.PA]:"Panama",[i._F.AW]:"Aruba",[i._F.MQ]:"Martinique",[i._F.AG]:"Antigua and Barbuda",[i._F.BM]:"Bermuda",[i._F.CU]:"Cuba",[i._F.GD]:"Grenada",[i._F.NI]:"Nicaragua",[i._F.LC]:"Saint Lucia",[i._F.KN]:"Saint Kitts and Nevis",[i._F.DO]:"Dominican Republic",[i._F.VC]:"Saint Vincent and the Grenadines",[i._F.BZ]:"Belize",[i._F.HT]:"Haiti",[i._F.JM]:"Jamaica",[i._F.BS]:"Bahamas",[i._F.MX]:"Mexico",[i._F.MF]:"Saint Martin",[i._F.SV]:"El Salvador",[i._F.BL]:"Saint Barth\xe9lemy",[i._F.AI]:"Anguilla",[i._F.MS]:"Montserrat",[i._F.VG]:"British Virgin Islands",[i._F.BB]:"Barbados",[i._F.HN]:"Honduras",[i._F.KY]:"Cayman Islands",[i._F.DM]:"Dominica",[i._F.TT]:"Trinidad and Tobago",[i._F.CR]:"Costa Rica",[i._F.SR]:"Suriname",[i._F.CX]:"Christmas Island",[i._F.WS]:"Samoa",[i._F.PF]:"French Polynesia",[i._F.AS]:"American Samoa",[i._F.NC]:"New Caledonia",[i._F.TK]:"Tokelau",[i._F.PW]:"Palau",[i._F.KI]:"Kiribati",[i._F.VU]:"Vanuatu",[i._F.PN]:"Pitcairn Islands",[i._F.CK]:"Cook Islands",[i._F.FJ]:"Fiji",[i._F.PG]:"Papua New Guinea",[i._F.MP]:"Northern Mariana Islands",[i._F.NU]:"Niue",[i._F.TV]:"Tuvalu",[i._F.NF]:"Norfolk Island",[i._F.TO]:"Tonga",[i._F.FM]:"Micronesia",[i._F.SB]:"Solomon Islands",[i._F.NR]:"Nauru",[i._F.WF]:"Wallis and Futuna",[i._F.GU]:"Guam",[i._F.AU]:"Australia",[i._F.NZ]:"New Zealand",[i._F.MH]:"Marshall Islands",[i._F.CC]:"Cocos (Keeling) Islands",[i._F.VE]:"Venezuela",[i._F.PY]:"Paraguay",[i._F.BR]:"Brazil",[i._F.CO]:"Colombia",[i._F.PE]:"Peru",[i._F.CL]:"Chile",[i._F.UY]:"Uruguay",[i._F.AR]:"Argentina",[i._F.GY]:"Guyana",[i._F.BO]:"Bolivia",[i._F.GF]:"French Guiana",[i._F.EC]:"Ecuador",[i._F.FK]:"Falkland Islands",[i._F.US_AL]:"Alabama",[i._F.US_AK]:"Alaska",[i._F.US_AZ]:"Arizona",[i._F.US_AR]:"Arkansas",[i._F.US_CA]:"California",[i._F.US_CO]:"Colorado",[i._F.US_CT]:"Connecticut",[i._F.US_DE]:"Delaware",[i._F.US_DC]:"District of Columbia (DC)",[i._F.US_FL]:"Florida",[i._F.US_GA]:"Georgia",[i._F.US_HI]:"Hawaii",[i._F.US_ID]:"Idaho",[i._F.US_IL]:"Illinois",[i._F.US_IN]:"Indiana",[i._F.US_IA]:"Iowa",[i._F.US_KS]:"Kansas",[i._F.US_KY]:"Kentucky",[i._F.US_LA]:"Louisiana",[i._F.US_ME]:"Maine",[i._F.US_MD]:"Maryland",[i._F.US_MA]:"Massachusetts",[i._F.US_MI]:"Michigan",[i._F.US_MN]:"Minnesota",[i._F.US_MS]:"Mississippi",[i._F.US_MO]:"Missouri",[i._F.US_MT]:"Montana",[i._F.US_NE]:"Nebraska",[i._F.US_NV]:"Nevada",[i._F.US_NH]:"New Hampshire",[i._F.US_NJ]:"New Jersey",[i._F.US_NM]:"New Mexico",[i._F.US_NY]:"New York",[i._F.US_NC]:"North Carolina",[i._F.US_ND]:"North Dakota",[i._F.US_OH]:"Ohio",[i._F.US_OK]:"Oklahoma",[i._F.US_OR]:"Oregon",[i._F.US_PA]:"Pennsylvania",[i._F.US_PR]:"Puerto Rico",[i._F.US_RI]:"Rhode Island",[i._F.US_SC]:"South Carolina",[i._F.US_SD]:"South Dakota",[i._F.US_TN]:"Tennessee",[i._F.US_TX]:"Texas",[i._F.US_UT]:"Utah",[i._F.US_VA]:"Virginia",[i._F.US_VI]:"United States Virgin Islands",[i._F.US_VT]:"Vermont",[i._F.US_WA]:"Washington",[i._F.US_WV]:"West Virginia",[i._F.US_WI]:"Wisconsin",[i._F.US_WY]:"Wyoming",[i._F.CA_AB]:"Alberta",[i._F.CA_BC]:"British Columbia",[i._F.CA_MB]:"Manitoba",[i._F.CA_NB]:"New Brunswick",[i._F.CA_NL]:"Newfoundland and Labrador",[i._F.CA_NS]:"Nova Scotia",[i._F.CA_ON]:"Ontario",[i._F.CA_PE]:"Prince Edward Island",[i._F.CA_QC]:"Quebec",[i._F.CA_SK]:"Saskatchewan",[i._F.CA_NT]:"Northwest Territories",[i._F.CA_NU]:"Nunavut",[i._F.CA_YT]:"Yukon",[i._F.CA]:"Canada",[i._F.US]:"United States",[i._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[i._F.CARIBBEAN]:"Caribbean",[i._F.EEA]:"European Economic Area (EEA)",[i._F.NON_EEA]:"Non European Economic Area",[i._F.GLOBAL]:"Global"},r=new Map(Object.entries(t));Object.entries(t).map(e=>({value:e[0],label:e[1]}))},14908:function(e,a,n){"use strict";var i=n(86677),t=n(27378);let r=e=>e.startsWith("#")?e.slice(1):e;a.Z=e=>{let{tabKeys:a,initialTab:n}=e,s=(0,i.useRouter)(),o=s.asPath.split("#")[1]||a[0],[_,l]=(0,t.useState)(o);return(0,t.useEffect)(()=>{n&&a.includes(n)&&l(n)},[n,a,s.isReady]),{activeTab:_,onTabChange:(0,t.useCallback)(async e=>{if(!a.includes(e)){await s.replace({pathname:s.pathname,query:s.query,hash:void 0}),l(a[0]);return}s.isReady&&(await s.replace({pathname:s.pathname,query:s.query,hash:r(e)},void 0,{shallow:!0}),l(e))},[s,a])}}},77685:function(e,a,n){"use strict";n.d(a,{i:function(){return M}});var i=n(24246),t=n(96306),r=n(34090),s=n(27378),o=n(55484),_=n(16134),l=n(25980),F=n(97181),u=n(40324),d=n(812),c=n(41841),m=n(45938),h=n(8133),S=n(33335),f=n(32885),p=n(57865),y=n(93237),v=n(65450),C=n(36345);let{Text:g}=t.AntTypography,b={name:"",vendor_id:void 0,description:"",tags:[]},M=e=>{let{onSuccessfulSubmit:a,toastOnSuccess:n,...M}=e,[A,N]=(0,s.useState)(!1),x=(0,_.T)(),{tcf:U,dictionaryService:I}=(0,l.hz)(),{isLoading:T}=(0,f.Rd)(void 0,{skip:!I}),j=(0,_.C)(f.o),w=(0,_.C)(p.gU),[B]=(0,v.in)(),[E]=(0,f.Qk)(),[k]=(0,v.f7)(),{successAlert:G,errorAlert:L}=(0,c.VY)(),{setSuggestions:R,setLockedForGVL:P}=p.dictSuggestionsSlice.actions,K=(0,s.useRef)(null),D=(0,s.useMemo)(()=>o.Ry().shape({name:o.Z_().required().label("System name").test("is-unique","",async(e,a)=>{let{data:n}=await B({page:1,size:10,search:e});return!((null==n?void 0:n.items)||[]).filter(a=>a.name===e).some(a=>a.name===e)||a.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})})}),[B]),O=e=>{if(I){if(!e){x(R("hiding")),x(P(!1));return}x(R("showing")),U&&(0,d.cj)(e)===d.c6.GVL?x(P(!0)):x(P(!1))}},W=()=>{M.onClose(),x(R("initial")),x(P(!1))},V=async e=>{if(N(!0),e.vendor_id){let i=await E([e.vendor_id]);if((0,d.D4)(i))L((0,d.e$)(i.error));else{let{data:e}=i,t=e.systems[0];null==a||a(t.fides_key,t.name),n&&G("".concat(e.name," has been added to your system inventory."))}}else{let i={...e,fides_key:(0,S.E)(e.name),system_type:"",body:"",privacy_declarations:[]},t=await k(i);if((0,d.D4)(t))L((0,d.e$)(t.error));else{let{fides_key:i,name:r}=t.data;null==a||a(i,r),n&&G("".concat(e.name," has been added to your system inventory."))}W()}N(!1)};return(0,i.jsx)(h.Z,{title:"Add New System",...M,onClose:W,children:(0,i.jsx)(r.J9,{initialValues:b,onSubmit:V,validationSchema:D,innerRef:K,children:e=>{let{dirty:a,isValid:n}=e;return(0,i.jsxs)(r.l0,{children:[(0,i.jsx)(m.Gt,{id:"new-system-modal",name:"Add New System"}),(0,i.jsxs)(t.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,i.jsx)(g,{children:"Fides will add this system to your inventory and configure it for consent using the categories of consent listed below. Optionally, you can check if this system is listed within the Fides compass library by selecting the compass icon below."}),I?(0,i.jsx)(C.Z,{label:"System name",options:j,onVendorSelected:O,isCreate:!0,lockedForGVL:w,isLoading:T}):(0,i.jsx)(u.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(0,i.jsx)(y.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:w}),(0,i.jsx)(F.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:w})]}),(0,i.jsxs)(t.jqI,{justify:"space-between",children:[(0,i.jsx)(t.wpx,{htmlType:"reset",onClick:W,disabled:T||!a||!n,"data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(t.wpx,{htmlType:"submit",type:"primary",disabled:T||!a||!n,loading:A,"data-testid":"save-btn",children:"Save"})]})]})}})})}},93237:function(e,a,n){"use strict";n.d(a,{Sv:function(){return m},Yb:function(){return c},dQ:function(){return h},lm:function(){return S}});var i=n(24246),t=n(96306),r=n(34090),s=n(27378),o=n(16134),_=n(40324),l=n(46238),F=n(32885),u=n(57865);let d=(e,a,n)=>{var i,t;let[_,l,{setValue:d,setTouched:c}]=(0,r.U$)({name:e,type:n||void 0}),m=!!(l.touched&&l.error),{error:h}=l,S={..._,value:null!==(i=_.value)&&void 0!==i?i:""},[f,p]=(0,s.useState)(null!==(t=S.value)&&void 0!==t?t:""),{values:y}=(0,r.u6)(),{vendor_id:v}=y,C=(0,o.C)((0,F.$e)(v||"")),g=(0,o.C)(u.bN),b=(0,s.useRef)();return(0,s.useEffect)(()=>{"showing"===g&&p(S.value)},[g,p]),(0,s.useEffect)(()=>{if("showing"===g&&C){let n=a?a(C):C[e];S.value!==n&&(d(n),setTimeout(()=>{var e;c(!0),null===(e=b.current)||void 0===e||e.blur()},300))}},[g,d,C,b.current]),(0,s.useEffect)(()=>{"hiding"===g&&d(f)},[g,d,f]),{field:S,isInvalid:m,isShowingSuggestions:g,error:h,inputRef:b}},c=e=>{let{label:a,tooltip:n,disabled:r,isRequired:s=!1,dictField:o,name:F,placeholder:u,id:c}=e,{field:m,isInvalid:h,isShowingSuggestions:S,error:f,inputRef:p}=d(F,o);return(0,i.jsx)(t.NIc,{isInvalid:h,isRequired:s,children:(0,i.jsxs)(t.gCW,{alignItems:"start",children:[(0,i.jsxs)(t.kCb,{alignItems:"center",children:[(0,i.jsx)(_.__,{htmlFor:c||F,fontSize:"xs",my:0,mr:1,children:a}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(_.oi,{...m,ref:p,isRequired:s,isDisabled:r,"data-testid":"input-".concat(m.name),placeholder:u,isPassword:!1,color:"showing"===S?"complimentary.500":"gray.800"}),(0,i.jsx)(_.Bc,{isInvalid:h,message:f,fieldName:m.name})]})})},m=e=>{let{label:a,tooltip:n,disabled:r,isRequired:s=!1,dictField:o,name:F,id:u}=e,{field:c,isInvalid:m,isShowingSuggestions:h,error:S}=d(F,o);return(0,i.jsx)(t.NIc,{isInvalid:m,isRequired:s,children:(0,i.jsxs)(t.gCW,{alignItems:"start",children:[(0,i.jsxs)(t.kCb,{alignItems:"center",children:[(0,i.jsx)(_.__,{htmlFor:u||F,fontSize:"xs",my:0,mr:1,children:a}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.gxH,{...c,size:"sm","data-testid":"input-".concat(c.name),focusBorderColor:"primary.600",color:"showing"===h?"complimentary.500":"gray.800",isDisabled:r}),(0,i.jsx)(_.Bc,{isInvalid:m,message:S,fieldName:c.name})]})})},h=e=>{let{label:a,tooltip:n,dictField:s,name:o,id:F,disabled:u}=e,{field:c,isInvalid:m,error:h}=d(o,s,"checkbox");return(0,i.jsxs)(t.NIc,{isInvalid:m,width:"full",children:[(0,i.jsxs)(t.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(t.Ugi,{spacing:1,children:[(0,i.jsx)(_.__,{htmlFor:F||o,fontSize:"xs",my:0,mr:0,children:a}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.Ugi,{children:(0,i.jsx)(r.gN,{name:c.name,children:e=>{let{form:{setFieldValue:a}}=e;return(0,i.jsx)(t.rAg,{checked:c.checked,onChange:e=>{a(c.name,e)},disabled:u,className:"mr-2","data-testid":"input-".concat(c.name),size:"small"})}})})]}),(0,i.jsx)(_.Bc,{isInvalid:m,message:h,fieldName:c.name})]})},S=e=>{let{label:a,tooltip:n,dictField:s,name:o,id:F,disabled:u}=e,{field:c,isInvalid:m,error:h,isShowingSuggestions:S}=d(o,s,"numeric"),{setFieldValue:f}=(0,r.u6)();return(0,i.jsxs)(t.NIc,{isInvalid:m,width:"full",children:[(0,i.jsxs)(t.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(t.Ugi,{spacing:1,children:[(0,i.jsx)(_.__,{htmlFor:F||o,fontSize:"xs",my:0,mr:0,children:a}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.Ugi,{children:(0,i.jsxs)(t.Y2U,{value:c.value,name:c.name,size:"xs",onBlur:c.onBlur,onChange:e=>{f(c.name,e)},w:"100%",colorScheme:"terracotta",inputMode:"numeric","data-testid":"input-".concat(c.name),color:"showing"===S?"complimentary.500":"gray.800",focusBorderColor:"primary.600",isDisabled:u,children:[(0,i.jsx)(t.zuI,{}),(0,i.jsxs)(t.FiK,{children:[(0,i.jsx)(t.WQu,{}),(0,i.jsx)(t.Y_d,{})]})]})})]}),(0,i.jsx)(_.Bc,{isInvalid:m,message:h,fieldName:c.name})]})}},99830:function(e){e.exports={toastLink:"ToastLink_toastLink__OLSeq"}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5258],{97181:function(e,a,t){t.d(a,{d:function(){return o}});var i=t(24246),s=t(96306),n=t(34090),r=t(27378),l=t(46238),d=t(40324);let o=e=>{let{name:a,label:t,labelProps:o,tooltip:c,isRequired:u,layout:m="inline",helperText:x,...p}=e,[h,y,{setValue:v}]=(0,n.U$)(a),j=!!(y.touched&&y.error),[g,b]=(0,r.useState)("");h.value||"tags"!==p.mode&&"multiple"!==p.mode||(h.value=[]),"tags"===p.mode&&"string"==typeof h.value&&(h.value=[h.value]);let f="tags"===p.mode?(e,a)=>e?e.value!==g||h.value.includes(g)?p.optionRender?p.optionRender(e,a):e.label:'Create "'.concat(g,'"'):void 0:p.optionRender||void 0,_=e=>{b(e),p.onSearch&&p.onSearch(e)},k=(e,a)=>{v(e),p.onChange&&p.onChange(e,a)};return"inline"===m?(0,i.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(s.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,i.jsx)(d.__,{htmlFor:p.id||a,...o,children:t}):null,(0,i.jsxs)(s.jqI,{align:"center",children:[(0,i.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(s.WPr,{...h,id:p.id||a,"data-testid":"controlled-select-".concat(h.name),...p,optionRender:f,onSearch:"tags"===p.mode?_:void 0,onChange:k,value:h.value||void 0,status:j?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{children:x}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]}),(0,i.jsx)(l.b,{label:c,className:j?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[t?(0,i.jsx)(d.__,{htmlFor:p.id||a,fontSize:"xs",my:0,mr:1,...o,children:t}):null,(0,i.jsx)(l.b,{label:c})]}),(0,i.jsx)(s.WPr,{...h,id:p.id||a,"data-testid":"controlled-select-".concat(h.name),...p,optionRender:f,onSearch:"tags"===p.mode?_:void 0,onChange:k,value:h.value||void 0,status:j?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{style:{marginTop:0},children:x}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]})})}},35258:function(e,a,t){t.d(a,{Z:function(){return W}});var i=t(24246),s=t(96306),n=t(27378),r=t(84720),l=t(52368),d=t(812),o=t(46628),c=t(65450),u=t(31883),m=t(34090),x=t(45938),p=t(95346),h=t(55484),y=t(97181),v=t(40324),j=t(54682);let g=h.Ry().shape({data_categories:h.IX(h.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:h.Z_().required().label("Data use"),data_subjects:h.IX(h.Z_()).min(1,"Must assign at least one data subject").label("Data subjects")}),b={data_categories:[],data_subjects:[],data_use:"",dataset_references:[],customFieldValues:{},id:""},f=e=>{var a;let{customFieldValues:t,...i}=e;return{...i,name:null!==(a=e.name)&&void 0!==a?a:""}},_=e=>{let{allDataUses:a,allDataCategories:t,allDataSubjects:n,allDatasets:r,privacyDeclarationId:l,includeCustomFields:d}=e,o=r?r.map(e=>{var a;return{label:null!==(a=e.name)&&void 0!==a?a:e.fides_key,value:e.fides_key}}):[];return(0,i.jsxs)(s.Kqy,{spacing:4,children:[(0,i.jsx)(y.d,{id:"data_use",label:"Data use",name:"data_use",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What is the system using the data for. For example, is it for third party advertising or perhaps simply providing system operations.",layout:"stacked",disabled:!!l}),(0,i.jsx)(v.j0,{id:"name",label:"Processing Activity",name:"name",variant:"stacked",tooltip:"The personal data processing activity or activities associated with this data use.",disabled:!!l}),(0,i.jsx)(y.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What type of data is your system processing? This could be various types of user or system data.",mode:"multiple",layout:"stacked",disabled:!0}),(0,i.jsx)(y.d,{name:"data_subjects",label:"Data subjects",options:n.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Whose data are you processing? This could be customers, employees or any other type of user in your system.",mode:"multiple",layout:"stacked",disabled:!0}),r?(0,i.jsx)(y.d,{name:"dataset_references",label:"Dataset references",options:o,tooltip:"Referenced Dataset fides keys used by the system.",mode:"multiple",layout:"stacked"}):null,d?(0,i.jsx)(p.uc,{resourceType:j.P6.PRIVACY_DECLARATION,resourceFidesKey:l}):null]})},k=(e,a)=>e?{...e,customFieldValues:a||{}}:b,S=e=>{let{onSubmit:a,initialValues:t,allDataUses:r,privacyDeclarationId:l}=e,{customFieldValues:d,upsertCustomFields:o}=(0,p.mZ)({resourceType:j.P6.PRIVACY_DECLARATION,resourceFidesKey:l}),c=(0,n.useMemo)(()=>k(t,d),[t,d]),[u,m]=(0,n.useState)(!1),x=(0,n.useMemo)(()=>{let e=r.filter(e=>e.fides_key===c.data_use)[0];if(e)return c.name?"".concat(e.name," - ").concat(c.name):e.name},[r,c]);return{handleSubmit:async(e,t)=>{let{customFieldValues:i}=e,s=f(e),n=await a(s,t);if(n){let a=n.filter(a=>a.data_use===e.data_use&&(!a.name||a.name===e.name));a.length>0&&await o({customFieldValues:i,fides_key:a[0].id}),t.resetForm({values:e}),m(!0)}},renderHeader:e=>{let{dirty:a,boxProps:t,hideSaved:n}=e;return(0,i.jsxs)(s.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",...t,children:[x?(0,i.jsx)(s.X6q,{as:"h4",size:"xs",fontWeight:"medium",mr:4,children:x}):null,!n&&u&&!a&&c.data_use?(0,i.jsxs)(s.xvT,{fontSize:"sm","data-testid":"saved-indicator",children:[(0,i.jsx)(s.StI,{})," Saved"]}):null]})},initialValues:c}},D=e=>{let{onSubmit:a,initialValues:t,onDelete:n,...r}=e,{handleSubmit:l,renderHeader:d,initialValues:o}=S({onSubmit:a,initialValues:t,allDataUses:r.allDataUses,privacyDeclarationId:null==t?void 0:t.id});return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:o,onSubmit:l,validationSchema:g,children:e=>{let{dirty:a}=e;return(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(x.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,i.jsxs)(s.Kqy,{spacing:4,children:[(0,i.jsx)(s.xuv,{"data-testid":"header",children:d({dirty:a})}),(0,i.jsx)(_,{onDelete:n,...r})]})]})}})},C=e=>{let{privacyDeclaration:a,onEdit:t,onDelete:n,includeCustomFields:r,...l}=e,{initialValues:d,renderHeader:o,handleSubmit:c}=S({initialValues:a,onSubmit:e=>t(a,e),privacyDeclarationId:a.id,...l});return(0,i.jsx)(s.Qdk,{children:e=>{let{isExpanded:t}=e;return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:d,onSubmit:c,validationSchema:g,children:e=>{let{dirty:d}=e;return(0,i.jsxs)(m.l0,{"data-testid":"".concat(a.data_use,"-form"),children:[(0,i.jsx)(x.Gt,{id:"".concat(a.id,"-form"),name:a.id}),(0,i.jsxs)(s.KFZ,{py:4,borderBottomWidth:t?"0px":"1px",backgroundColor:t?"gray.50":void 0,"data-testid":"accordion-header-".concat(a.data_use),children:[o({dirty:d,boxProps:{flex:"1",textAlign:"left"},hideSaved:!t}),(0,i.jsx)(s.XEm,{})]}),(0,i.jsx)(s.Hk3,{backgroundColor:"gray.50",pt:0,children:(0,i.jsx)(s.Kqy,{spacing:4,children:(0,i.jsx)(_,{privacyDeclarationId:a.id,onDelete:n,includeCustomFields:r,...l})})})]})}})}})};var w=e=>{let{privacyDeclarations:a,...t}=e;return(0,i.jsx)(s.UQy,{allowToggle:!0,border:"transparent","data-testid":"privacy-declaration-accordion",children:a.map(e=>(0,i.jsx)(C,{privacyDeclaration:e,...t},e.id))})},I=e=>{let{system:a,includeCustomFields:t,onSave:r,...l}=e,m=(0,s.pmc)(),[x]=(0,c.qQ)(),[p,h]=(0,n.useState)(!1),[y,v]=(0,n.useState)(void 0),j=(0,n.useMemo)(()=>y?a.privacy_declarations.filter(e=>e.id!==y.id):a.privacy_declarations,[y,a]),g=e=>j.filter(a=>a.data_use===e.data_use&&a.name===e.name).length>0&&(m((0,o.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),b=async(e,t)=>{let i=e.map(e=>{var a;return{...e,name:null!==(a=e.name)&&void 0!==a?a:""}}),s={...a,privacy_declarations:i};return(e=>{if((0,u.D4)(e)){let a=(0,d.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");m((0,o.Vo)(a));return}return m.closeAll(),m((0,o.t5)(t?"Data use deleted":"Data use saved")),r&&r(e.data),e.data.privacy_declarations})(await x(s))},f=async(e,t)=>{if(!(t.id!==e.id&&g(t)))return b(a.privacy_declarations.map(a=>a.id===e.id?t:a))},_=async e=>{if(g(e))return;m.closeAll();let a=[...j,e],t=await b(a);return t&&v(t.filter(a=>(!a.name||a.name===e.name)&&a.data_use===e.data_use)[0]),t},k=async e=>b(a.privacy_declarations.filter(a=>a.id!==e.id),!0),S=async e=>{let a=await k(e);return a&&(h(!1),v(void 0)),a};return(0,n.useEffect)(()=>{h(!1)},[a.fides_key]),(0,i.jsxs)(s.Kqy,{spacing:3,children:[(0,i.jsx)(w,{privacyDeclarations:j,onEdit:f,onDelete:k,includeCustomFields:t,...l}),p?(0,i.jsx)(s.xuv,{backgroundColor:"gray.50",p:4,"data-testid":"new-declaration-form",children:(0,i.jsx)(D,{initialValues:y,onSubmit:_,onDelete:S,includeCustomFields:t,...l})}):null,0===a.privacy_declarations.length?(0,i.jsx)(s.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",pl:2,children:"No data uses"}):null]})},T=t(19043);let V=e=>{let[a]=(0,c.dB)(),t=(0,s.pmc)();return{handleUpsertSystem:async(i,s)=>{let n=[{...e,name:i.name,description:i.description}],r=await a(n);(0,T.D4)(r)?t((0,o.Vo)((0,d.e$)(r.error))):(t((0,o.t5)("Successfully saved system info")),s.resetForm({values:i}))},validationSchema:h.Ry().shape({name:h.Z_().required().label("Name"),description:h.Z_().required().label("Description")})}},R={name:"",description:""};var F=e=>{let{system:a}=e,t="/systems/configure/".concat(a.fides_key),{handleUpsertSystem:n,validationSchema:r}=V(a);return(0,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.kCb,{alignItems:"center",children:[(0,i.jsx)(s.xvT,{color:"gray.600",size:"md",lineHeight:6,fontWeight:"semibold",marginBottom:2,children:"System details"}),(0,i.jsx)(s.LZC,{}),(0,i.jsxs)(s._pl,{color:"complimentary.500",href:t,children:["View more",(0,i.jsx)(s.h0n,{ml:2})]})]}),(0,i.jsx)(s.xuv,{width:"100%",padding:4,borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:null!=a?a:R,validationSchema:r,onSubmit:n,children:()=>(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(x.Gt,{id:"SystemInfoDrawer",name:"System Info"}),(0,i.jsx)(s.xuv,{marginTop:3,children:(0,i.jsx)(v.j0,{label:"System name",name:"name",variant:"stacked",disabled:!0})}),(0,i.jsx)(s.xuv,{marginTop:3,children:(0,i.jsx)(v.Ks,{label:"System description",name:"description",variant:"stacked",disabled:!0})})]})})})]})},W=e=>{var a;let{selectedSystemId:t,resetSelectedSystemId:d}=e,o=(0,n.useMemo)(()=>!!t,[t]),{isLoading:u,...m}=(0,l.f)({includeDatasets:!1,includeDisabled:!1}),{data:x}=(0,c.rn)(t,{skip:!t});return(0,i.jsx)(s.xuv,{position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,overflow:"hidden",children:(0,i.jsx)(s.Mi4,{transition:{enter:{ease:"easeInOut",duration:.5},exit:{ease:"easeInOut",duration:.5}},direction:"right",in:o,unmountOnExit:!0,style:{zIndex:21,pointerEvents:"none",position:"absolute"},children:(0,i.jsxs)(s.xuv,{position:"absolute",right:"0px",height:"100%",width:"100%",maxWidth:"480px",pointerEvents:"auto",borderWidth:0,boxShadow:"0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)",display:t?"unset":"none",backgroundColor:"white","data-testid":"datamap-drawer",children:[(0,i.jsx)(s.xuv,{id:"drawer-header",borderBottomWidth:1,paddingX:6,paddingY:3,children:(0,i.jsxs)(s.kCb,{children:[(0,i.jsx)(s.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:(0,i.jsx)(s.xvT,{fontWeight:"semibold",fontSize:"lg",lineHeight:"7",color:"gray.900",children:null!==(a=null==x?void 0:x.name)&&void 0!==a?a:"System Information"})}),(0,i.jsx)(s.LZC,{}),(0,i.jsx)(s.kCb,{alignItems:"center",children:(0,i.jsx)(s.wpx,{icon:(0,i.jsx)(s.Two,{}),"aria-label":"Close error message",type:"text",onClick:d,"data-testid":"datamap-drawer-close"})})]})}),(0,i.jsx)(s.xuv,{id:"drawer-body",height:"calc(100% - 46px)",overflowY:"auto",padding:6,style:{scrollbarGutter:"stable"},children:x?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(F,{system:x}),(0,i.jsx)(s.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,children:"Data uses"}),(0,i.jsx)(s.xuv,{borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(s.xuv,{pb:3,children:(0,i.jsx)(I,{system:x,...m})})}),(0,i.jsx)(s.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,paddingBottom:2,children:"Data flow"}),(0,i.jsx)(r.q,{system:x})]}):null})]})})})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5258],{97181:function(e,a,t){t.d(a,{d:function(){return o}});var i=t(24246),s=t(96306),n=t(34090),r=t(27378),l=t(46238),d=t(40324);let o=e=>{let{name:a,label:t,labelProps:o,tooltip:c,isRequired:u,layout:m="inline",helperText:x,...p}=e,[h,y,{setValue:v}]=(0,n.U$)(a),j=!!(y.touched&&y.error),[g,b]=(0,r.useState)("");h.value||"tags"!==p.mode&&"multiple"!==p.mode||(h.value=[]),"tags"===p.mode&&"string"==typeof h.value&&(h.value=[h.value]);let f="tags"===p.mode?(e,a)=>e?e.value!==g||h.value.includes(g)?p.optionRender?p.optionRender(e,a):e.label:'Create "'.concat(g,'"'):void 0:p.optionRender||void 0,_=e=>{b(e),p.onSearch&&p.onSearch(e)},k=(e,a)=>{v(e),p.onChange&&p.onChange(e,a)};return"inline"===m?(0,i.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(s.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,i.jsx)(d.__,{htmlFor:p.id||a,...o,children:t}):null,(0,i.jsxs)(s.jqI,{align:"center",children:[(0,i.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(s.WPr,{...h,id:p.id||a,"data-testid":"controlled-select-".concat(h.name),...p,optionRender:f,onSearch:"tags"===p.mode?_:void 0,onChange:k,value:h.value||void 0,status:j?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{children:x}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]}),(0,i.jsx)(l.b,{label:c,className:j?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[t?(0,i.jsx)(d.__,{htmlFor:p.id||a,fontSize:"xs",my:0,mr:1,...o,children:t}):null,(0,i.jsx)(l.b,{label:c})]}),(0,i.jsx)(s.WPr,{...h,id:p.id||a,"data-testid":"controlled-select-".concat(h.name),...p,optionRender:f,onSearch:"tags"===p.mode?_:void 0,onChange:k,value:h.value||void 0,status:j?"error":void 0}),x&&(0,i.jsx)(s.Q6r,{style:{marginTop:0},children:x}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]})})}},35258:function(e,a,t){t.d(a,{Z:function(){return W}});var i=t(24246),s=t(96306),n=t(27378),r=t(84720),l=t(52368),d=t(812),o=t(46628),c=t(65450),u=t(31883),m=t(34090),x=t(45938),p=t(95346),h=t(55484),y=t(97181),v=t(40324),j=t(54682);let g=h.Ry().shape({data_categories:h.IX(h.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:h.Z_().required().label("Data use"),data_subjects:h.IX(h.Z_()).min(1,"Must assign at least one data subject").label("Data subjects")}),b={data_categories:[],data_subjects:[],data_use:"",dataset_references:[],customFieldValues:{},id:""},f=e=>{var a;let{customFieldValues:t,...i}=e;return{...i,name:null!==(a=e.name)&&void 0!==a?a:""}},_=e=>{let{allDataUses:a,allDataCategories:t,allDataSubjects:n,allDatasets:r,privacyDeclarationId:l,includeCustomFields:d}=e,o=r?r.map(e=>{var a;return{label:null!==(a=e.name)&&void 0!==a?a:e.fides_key,value:e.fides_key}}):[];return(0,i.jsxs)(s.Kqy,{spacing:4,children:[(0,i.jsx)(y.d,{id:"data_use",label:"Data use",name:"data_use",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What is the system using the data for. For example, is it for third party advertising or perhaps simply providing system operations.",layout:"stacked",disabled:!!l}),(0,i.jsx)(v.j0,{id:"name",label:"Processing Activity",name:"name",variant:"stacked",tooltip:"The personal data processing activity or activities associated with this data use.",disabled:!!l}),(0,i.jsx)(y.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What type of data is your system processing? This could be various types of user or system data.",mode:"multiple",layout:"stacked",disabled:!0}),(0,i.jsx)(y.d,{name:"data_subjects",label:"Data subjects",options:n.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Whose data are you processing? This could be customers, employees or any other type of user in your system.",mode:"multiple",layout:"stacked",disabled:!0}),r?(0,i.jsx)(y.d,{name:"dataset_references",label:"Dataset references",options:o,tooltip:"Referenced Dataset fides keys used by the system.",mode:"multiple",layout:"stacked"}):null,d?(0,i.jsx)(p.uc,{resourceType:j.P6.PRIVACY_DECLARATION,resourceFidesKey:l}):null]})},k=(e,a)=>e?{...e,customFieldValues:a||{}}:b,S=e=>{let{onSubmit:a,initialValues:t,allDataUses:r,privacyDeclarationId:l}=e,{customFieldValues:d,upsertCustomFields:o}=(0,p.mZ)({resourceType:j.P6.PRIVACY_DECLARATION,resourceFidesKey:l}),c=(0,n.useMemo)(()=>k(t,d),[t,d]),[u,m]=(0,n.useState)(!1),x=(0,n.useMemo)(()=>{let e=r.filter(e=>e.fides_key===c.data_use)[0];if(e)return c.name?"".concat(e.name," - ").concat(c.name):e.name},[r,c]);return{handleSubmit:async(e,t)=>{let{customFieldValues:i}=e,s=f(e),n=await a(s,t);if(n){let a=n.filter(a=>a.data_use===e.data_use&&(!a.name||a.name===e.name));a.length>0&&await o({customFieldValues:i,fides_key:a[0].id}),t.resetForm({values:e}),m(!0)}},renderHeader:e=>{let{dirty:a,boxProps:t,hideSaved:n}=e;return(0,i.jsxs)(s.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",...t,children:[x?(0,i.jsx)(s.X6q,{as:"h4",size:"xs",fontWeight:"medium",mr:4,children:x}):null,!n&&u&&!a&&c.data_use?(0,i.jsxs)(s.xvT,{fontSize:"sm","data-testid":"saved-indicator",children:[(0,i.jsx)(s.StI,{})," Saved"]}):null]})},initialValues:c}},D=e=>{let{onSubmit:a,initialValues:t,onDelete:n,...r}=e,{handleSubmit:l,renderHeader:d,initialValues:o}=S({onSubmit:a,initialValues:t,allDataUses:r.allDataUses,privacyDeclarationId:null==t?void 0:t.id});return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:o,onSubmit:l,validationSchema:g,children:e=>{let{dirty:a}=e;return(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(x.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,i.jsxs)(s.Kqy,{spacing:4,children:[(0,i.jsx)(s.xuv,{"data-testid":"header",children:d({dirty:a})}),(0,i.jsx)(_,{onDelete:n,...r})]})]})}})},C=e=>{let{privacyDeclaration:a,onEdit:t,onDelete:n,includeCustomFields:r,...l}=e,{initialValues:d,renderHeader:o,handleSubmit:c}=S({initialValues:a,onSubmit:e=>t(a,e),privacyDeclarationId:a.id,...l});return(0,i.jsx)(s.Qdk,{children:e=>{let{isExpanded:t}=e;return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:d,onSubmit:c,validationSchema:g,children:e=>{let{dirty:d}=e;return(0,i.jsxs)(m.l0,{"data-testid":"".concat(a.data_use,"-form"),children:[(0,i.jsx)(x.Gt,{id:"".concat(a.id,"-form"),name:a.id}),(0,i.jsxs)(s.KFZ,{py:4,borderBottomWidth:t?"0px":"1px",backgroundColor:t?"gray.50":void 0,"data-testid":"accordion-header-".concat(a.data_use),children:[o({dirty:d,boxProps:{flex:"1",textAlign:"left"},hideSaved:!t}),(0,i.jsx)(s.XEm,{})]}),(0,i.jsx)(s.Hk3,{backgroundColor:"gray.50",pt:0,children:(0,i.jsx)(s.Kqy,{spacing:4,children:(0,i.jsx)(_,{privacyDeclarationId:a.id,onDelete:n,includeCustomFields:r,...l})})})]})}})}})};var w=e=>{let{privacyDeclarations:a,...t}=e;return(0,i.jsx)(s.UQy,{allowToggle:!0,border:"transparent","data-testid":"privacy-declaration-accordion",children:a.map(e=>(0,i.jsx)(C,{privacyDeclaration:e,...t},e.id))})},I=e=>{let{system:a,includeCustomFields:t,onSave:r,...l}=e,m=(0,s.pmc)(),[x]=(0,c.qQ)(),[p,h]=(0,n.useState)(!1),[y,v]=(0,n.useState)(void 0),j=(0,n.useMemo)(()=>y?a.privacy_declarations.filter(e=>e.id!==y.id):a.privacy_declarations,[y,a]),g=e=>j.filter(a=>a.data_use===e.data_use&&a.name===e.name).length>0&&(m((0,o.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),b=async(e,t)=>{let i=e.map(e=>{var a;return{...e,name:null!==(a=e.name)&&void 0!==a?a:""}}),s={...a,privacy_declarations:i};return(e=>{if((0,u.D4)(e)){let a=(0,d.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");m((0,o.Vo)(a));return}return m.closeAll(),m((0,o.t5)(t?"Data use deleted":"Data use saved")),r&&r(e.data),e.data.privacy_declarations})(await x(s))},f=async(e,t)=>{if(!(t.id!==e.id&&g(t)))return b(a.privacy_declarations.map(a=>a.id===e.id?t:a))},_=async e=>{if(g(e))return;m.closeAll();let a=[...j,e],t=await b(a);return t&&v(t.filter(a=>(!a.name||a.name===e.name)&&a.data_use===e.data_use)[0]),t},k=async e=>b(a.privacy_declarations.filter(a=>a.id!==e.id),!0),S=async e=>{let a=await k(e);return a&&(h(!1),v(void 0)),a};return(0,n.useEffect)(()=>{h(!1)},[a.fides_key]),(0,i.jsxs)(s.Kqy,{spacing:3,children:[(0,i.jsx)(w,{privacyDeclarations:j,onEdit:f,onDelete:k,includeCustomFields:t,...l}),p?(0,i.jsx)(s.xuv,{backgroundColor:"gray.50",p:4,"data-testid":"new-declaration-form",children:(0,i.jsx)(D,{initialValues:y,onSubmit:_,onDelete:S,includeCustomFields:t,...l})}):null,0===a.privacy_declarations.length?(0,i.jsx)(s.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",pl:2,children:"No data uses"}):null]})},T=t(19043);let V=e=>{let[a]=(0,c.dB)(),t=(0,s.pmc)();return{handleUpsertSystem:async(i,s)=>{let n=[{...e,name:i.name,description:i.description}],r=await a(n);(0,T.D4)(r)?t((0,o.Vo)((0,d.e$)(r.error))):(t((0,o.t5)("Successfully saved system info")),s.resetForm({values:i}))},validationSchema:h.Ry().shape({name:h.Z_().required().label("Name"),description:h.Z_().required().label("Description")})}},R={name:"",description:""};var F=e=>{let{system:a}=e,t="/systems/configure/".concat(a.fides_key),{handleUpsertSystem:n,validationSchema:r}=V(a);return(0,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.kCb,{alignItems:"center",children:[(0,i.jsx)(s.xvT,{color:"gray.600",size:"md",lineHeight:6,fontWeight:"semibold",marginBottom:2,children:"System details"}),(0,i.jsx)(s.LZC,{}),(0,i.jsxs)(s._pl,{color:"complimentary.500",href:t,children:["View more",(0,i.jsx)(s.h0n,{ml:2})]})]}),(0,i.jsx)(s.xuv,{width:"100%",padding:4,borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:null!=a?a:R,validationSchema:r,onSubmit:n,children:()=>(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(x.Gt,{id:"SystemInfoDrawer",name:"System Info"}),(0,i.jsx)(s.xuv,{marginTop:3,children:(0,i.jsx)(v.j0,{label:"System name",name:"name",variant:"stacked",disabled:!0})}),(0,i.jsx)(s.xuv,{marginTop:3,children:(0,i.jsx)(v.Ks,{label:"System description",name:"description",variant:"stacked",disabled:!0})})]})})})]})},W=e=>{var a;let{selectedSystemId:t,resetSelectedSystemId:d}=e,o=(0,n.useMemo)(()=>!!t,[t]),{isLoading:u,...m}=(0,l.f)({includeDatasets:!1,includeDisabled:!1}),{data:x}=(0,c.rn)(t,{skip:!t});return(0,i.jsx)(s.xuv,{position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,overflow:"hidden",children:(0,i.jsx)(s.Mi4,{transition:{enter:{ease:"easeInOut",duration:.5},exit:{ease:"easeInOut",duration:.5}},direction:"right",in:o,unmountOnExit:!0,style:{zIndex:11,pointerEvents:"none",position:"absolute"},children:(0,i.jsxs)(s.xuv,{position:"absolute",right:"0px",height:"100%",width:"100%",maxWidth:"480px",pointerEvents:"auto",borderWidth:0,boxShadow:"0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)",display:t?"unset":"none",backgroundColor:"white","data-testid":"datamap-drawer",children:[(0,i.jsx)(s.xuv,{id:"drawer-header",borderBottomWidth:1,paddingX:6,paddingY:3,children:(0,i.jsxs)(s.kCb,{children:[(0,i.jsx)(s.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:(0,i.jsx)(s.xvT,{fontWeight:"semibold",fontSize:"lg",lineHeight:"7",color:"gray.900",children:null!==(a=null==x?void 0:x.name)&&void 0!==a?a:"System Information"})}),(0,i.jsx)(s.LZC,{}),(0,i.jsx)(s.kCb,{alignItems:"center",children:(0,i.jsx)(s.wpx,{icon:(0,i.jsx)(s.Two,{}),"aria-label":"Close error message",type:"text",onClick:d,"data-testid":"datamap-drawer-close"})})]})}),(0,i.jsx)(s.xuv,{id:"drawer-body",height:"calc(100% - 46px)",overflowY:"auto",padding:6,style:{scrollbarGutter:"stable"},children:x?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(F,{system:x}),(0,i.jsx)(s.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,children:"Data uses"}),(0,i.jsx)(s.xuv,{borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(s.xuv,{pb:3,children:(0,i.jsx)(I,{system:x,...m})})}),(0,i.jsx)(s.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,paddingBottom:2,children:"Data flow"}),(0,i.jsx)(r.q,{system:x})]}):null})]})})})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9046],{14908:function(e,s,a){var i=a(86677),t=a(27378);let l=e=>e.startsWith("#")?e.slice(1):e;s.Z=e=>{let{tabKeys:s,initialTab:a}=e,r=(0,i.useRouter)(),n=r.asPath.split("#")[1]||s[0],[o,d]=(0,t.useState)(n);return(0,t.useEffect)(()=>{a&&s.includes(a)&&d(a)},[a,s,r.isReady]),{activeTab:o,onTabChange:(0,t.useCallback)(async e=>{if(!s.includes(e)){await r.replace({pathname:r.pathname,query:r.query,hash:void 0}),d(s[0]);return}r.isReady&&(await r.replace({pathname:r.pathname,query:r.query,hash:l(e)},void 0,{shallow:!0}),d(e))},[r,s])}}},69828:function(e,s,a){a.d(s,{Y:function(){return r}});var i=a(24246),t=a(96306),l=a(70788);let r=[(0,i.jsx)(t.PJP.S9g,{},"layers"),(0,i.jsx)(t.PJP.ehp,{},"dataset"),(0,i.jsx)(t.PJP.iA_,{},"table"),(0,i.jsx)(t.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];s.Z=e=>{let{resourceUrn:s,parentLink:a,onPathClick:t=()=>{}}=e,n=[];if(s||n.push({title:"All activity"}),s){n.push({title:"All activity",href:a});let e=s.split(".");e.forEach((s,a)=>{0!==a&&n.push({title:s,icon:r[a-1],onClick:s=>{s.preventDefault(),t(e.slice(0,a+1).join("."))}})})}return(0,i.jsx)(l.m,{"data-testid":"results-breadcrumb",items:n})}},11904:function(e,s,a){a.d(s,{Z:function(){return E}});var i,t,l=a(24246),r=a(59003),n=a(92222),o=a(96306),d=a(27378),c=a(47935),u=a(70675),g=a(72625),x=a(79947),j=a(50169),h=a(28278),m=a(74241),p=a(54682),I=a(91761),C=a(61099),f=a(87667),y=e=>{let{resourceType:s}=e,a=(0,n.Cl)();return s===p.D$.SCHEMA?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original,changeTypeOverride:h.E.CLASSIFICATION}),header:e=>(0,l.jsx)(c.Rr,{value:"Name",...e}),size:300}),a.accessor(e=>e.urn,{id:"project",cell:e=>(0,l.jsx)(c.G3,{value:(0,m.Z)(e.getValue())}),header:e=>(0,l.jsx)(c.Rr,{value:"Project",...e})}),a.display({id:"status",cell:e=>(0,l.jsx)(j.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.system,{id:"system",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"System",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"action",cell:e=>e.row.original.diff_status!==p.LL.MUTED?(0,l.jsx)(I.Z,{resource:e.row.original}):(0,l.jsx)(c.G3,{value:"--"}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.TABLE?{columns:[a.display({id:"select",cell:e=>{var s;let{row:a}=e;return(0,l.jsx)(g.k,{isChecked:a.getIsSelected(),onChange:a.getToggleSelectedHandler(),dataTestId:"select-".concat(null!==(s=a.original.name)&&void 0!==s?s:a.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(g.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40}),a.accessor(e=>e.name,{id:"tables",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Table name",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(j.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(c.G3,{value:"Table"}),header:"Type"}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:"Time"}),a.display({id:"actions",cell:e=>(0,l.jsx)(I.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.FIELD?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Field name",...e}),size:300}),a.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,l.jsx)(x.Z,{type:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"Data type",...e})}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(j.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(c.G3,{value:"Field"}),header:"Type"}),a.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(C.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,l.jsx)(I.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.ENDPOINT?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Object",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(j.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(c.G3,{value:"Endpoint"}),header:"Type"}),a.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(C.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,l.jsx)(I.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:{columns:[]}},v=a(14908);(i=t||(t={})).ACTION_REQUIRED="action-required",i.IN_PROGRESS="in-progress",i.UNMONITORED="unmonitored";let L={"action-required":{label:"Action Required",key:"action-required",filters:[p.LL.CLASSIFICATION_ADDITION,p.LL.CLASSIFICATION_UPDATE],childFilters:[p.LL.CLASSIFICATION_ADDITION,p.LL.CLASSIFICATION_UPDATE]},"in-progress":{label:"In progress",key:"in-progress",filters:[p.LL.CLASSIFYING,p.LL.CLASSIFICATION_QUEUED],childFilters:[p.LL.CLASSIFYING,p.LL.CLASSIFICATION_QUEUED]},unmonitored:{label:"Unmonitored",key:"unmonitored",filters:[p.LL.MUTED],childFilters:[]}};var S=()=>{var e,s;let{activeTab:a,onTabChange:i}=(0,v.Z)({tabKeys:Object.values(t)});return{filterTabs:Object.values(L),activeTab:a,onTabChange:i,activeDiffFilters:null===(e=L[a])||void 0===e?void 0:e.filters,activeChildDiffFilters:null===(s=L[a])||void 0===s?void 0:s.childFilters}},_=a(47182),b=a(38347),w=a(79494),A=e=>{let{resourceUrn:s}=e,[a,{isLoading:i}]=(0,u.Hf)(),[t,{isLoading:r}]=(0,u.zV)(),n=i||r,d=async e=>{await t({staged_resource_urns:e})},c=async e=>{await a({staged_resource_urns:e})};return(0,l.jsx)(o.jqI,{"data-testid":"bulk-actions-menu",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(w.Z,{title:"Confirm all",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>c([s]),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(w.Z,{title:"Ignore all",icon:(0,l.jsx)(o.tpL,{}),onClick:()=>d([s]),disabled:n,loading:r,size:"middle"})]})})},R=e=>{let{selectedUrns:s}=e,[a,{isLoading:i}]=(0,u.Hf)(),[t,{isLoading:r}]=(0,u.zV)(),n=i||r,d=async e=>{await a({staged_resource_urns:e})},c=async e=>{await t({staged_resource_urns:e})};return s.length?(0,l.jsxs)(o.jqI,{className:"items-center","data-testid":"bulk-actions-menu",children:[(0,l.jsx)(o.xvT,{fontSize:"xs",fontWeight:"semibold",minW:16,mr:4,children:"".concat(s.length," selected")}),(0,l.jsxs)(o.jqI,{className:"gap-2",children:[(0,l.jsx)(w.Z,{title:"Confirm",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>d(s),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(w.Z,{title:"Ignore",icon:(0,l.jsx)(o.tpL,{}),disabled:n,loading:r,onClick:()=>c(s),size:"middle"})]})]}):null},T=a(7940),D=a(80285),k=a(36168),N=a(30952);let F={items:[],total:0,page:1,size:50,pages:1},Z=()=>(0,l.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,l.jsxs)(o.gCW,{children:[(0,l.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,l.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var E=e=>{let{resourceUrn:s}=e,[a,i]=(0,d.useState)(""),{filterTabs:t,activeTab:g,onTabChange:x,activeDiffFilters:j,activeChildDiffFilters:h}=S(),[m,I]=(0,d.useState)({}),{PAGE_SIZES:C,pageSize:f,setPageSize:v,onPreviousPageClick:L,isPreviousPageDisabled:w,onNextPageClick:E,isNextPageDisabled:P,startRange:O,endRange:z,pageIndex:G,setTotalPages:U,resetPageIndexToDefault:M}=(0,c.oi)();(0,d.useEffect)(()=>{M()},[s,a,M,j,h]);let{isFetching:V,isLoading:q,data:$}=(0,u.z8)({staged_resource_urn:s,page:G,size:f,child_diff_status:h,diff_status:j,search:a}),W=(0,T.G)(null==$?void 0:$.items[0]),{items:H,total:Q,pages:Y}=(0,d.useMemo)(()=>null!=$?$:F,[$]);(0,d.useEffect)(()=>{U(Y)},[Y,U]);let{columns:J}=y({resourceType:W}),K=(0,d.useMemo)(()=>J,[J]),{navigateToDiscoveryResults:B}=(0,_.Z)(),X=(0,r.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),columns:K,manualPagination:!0,onRowSelectionChange:I,state:{rowSelection:m},getRowId:D.Z,data:H,columnResizeMode:"onChange"}),ee=Object.keys(m).filter(e=>m[e]);return q?(0,l.jsx)(c.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.A5g,{items:t.map(e=>({key:e.key,label:e.label})),activeKey:g,onChange:e=>x(e)}),(0,l.jsxs)(c.Q$,{children:[(0,l.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,l.jsx)(o.xuv,{flexShrink:0,children:(0,l.jsx)(N.f,{value:a,onChange:i})}),(0,l.jsx)(b.a,{})]}),W===p.D$.TABLE&&!!ee.length&&(0,l.jsx)(R,{selectedUrns:ee}),W===p.D$.FIELD&&"unmonitored"!==g&&(0,l.jsx)(A,{resourceUrn:s})]}),(0,l.jsx)(c.ZK,{tableInstance:X,onRowClick:e=>B({resourceUrn:e.urn,filterTab:g}),getRowIsClickable:e=>W!==p.D$.FIELD||(0,k.Z)(e),emptyTableNotice:(0,l.jsx)(Z,{})}),(0,l.jsx)(c.s8,{totalRows:Q||0,pageSizes:C,setPageSize:v,onPreviousPageClick:L,isPreviousPageDisabled:w||V,onNextPageClick:E,isNextPageDisabled:P||V,startRange:O,endRange:z})]})}},91761:function(e,s,a){var i=a(24246),t=a(96306),l=a(812),r=a(75573),n=a(7940),o=a(98559),d=a(54682),c=a(79494),u=a(70675);s.Z=e=>{let{resource:s}=e,[a,{isLoading:g}]=(0,u.v8)(),[x,{isLoading:j}]=(0,u.cM)(),[h,{isLoading:m}]=(0,u.vi)(),p=j||m||g,{diff_status:I,child_diff_statuses:C,top_level_field_name:f}=s,{successAlert:y,errorAlert:v}=(0,r.VY)(),L=I===d.LL.CLASSIFICATION_ADDITION||I===d.LL.CLASSIFICATION_UPDATE,S=C&&(C[d.LL.CLASSIFICATION_ADDITION]||C[d.LL.CLASSIFICATION_UPDATE]),_=(L||S)&&!f,b=L||S,w=(0,n.G)(s)!==d.D$.FIELD,A=_&&b&&w,R=async()=>{let e=await x({staged_resource_urn:s.urn});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to promote resource"):y('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},T=async()=>{let e=await h({staged_resource_urn:s.urn});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to mute resource"):y("Ignored changes will not be added to a Fides dataset.","".concat(s.name||"Changes"," ignored"))},D=async()=>{let e=await a({staged_resource_urn:s.urn,monitor_config_id:s.monitor_config_id,start_classification:!0,diff_statuses_to_classify:[d.LL.CLASSIFICATION_ADDITION,d.LL.CLASSIFICATION_UPDATE,d.LL.CLASSIFYING,d.LL.CLASSIFICATION_QUEUED]});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to reclassify resource"):y("Reclassification of ".concat((0,o.Z)(s)||"the resource"," has begun. The results may take some time to appear in the “Data discovery“ tab."),"Reclassification started")};return(0,i.jsxs)(t.Ugi,{gap:2,children:[_&&(0,i.jsx)(c.Z,{title:"Confirm",icon:(0,i.jsx)(t.nQG,{}),onClick:R,disabled:p,loading:j}),b&&(0,i.jsx)(c.Z,{title:"Ignore",icon:(0,i.jsx)(t.tpL,{}),onClick:T,disabled:p,loading:m}),w&&!A&&(0,i.jsx)(c.Z,{title:"Reclassify",icon:(0,i.jsx)(t.nyI,{}),onClick:D,disabled:p,loading:g}),A&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.LZC,{}),(0,i.jsxs)(t.v2r,{children:[(0,i.jsx)(t.j2t,{as:t.wpx,size:"small",type:"text",icon:(0,i.jsx)(t.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-overflow-btn"}),(0,i.jsx)(t.qyq,{children:(0,i.jsx)(t.sNh,{onClick:D,icon:(0,i.jsx)(t.nyI,{}),"data-testid":"action-reclassify",children:"Reclassify"})})]})]})]})}},79947:function(e,s,a){var i=a(24246),t=a(96306);s.Z=e=>{let{type:s}=e;return(0,i.jsx)(t.kCb,{align:"center",h:"full",children:!!s&&(0,i.jsx)(t.j8w,{children:s})})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9046],{14908:function(e,s,a){var i=a(86677),t=a(27378);let l=e=>e.startsWith("#")?e.slice(1):e;s.Z=e=>{let{tabKeys:s,initialTab:a}=e,r=(0,i.useRouter)(),n=r.asPath.split("#")[1]||s[0],[o,d]=(0,t.useState)(n);return(0,t.useEffect)(()=>{a&&s.includes(a)&&d(a)},[a,s,r.isReady]),{activeTab:o,onTabChange:(0,t.useCallback)(async e=>{if(!s.includes(e)){await r.replace({pathname:r.pathname,query:r.query,hash:void 0}),d(s[0]);return}r.isReady&&(await r.replace({pathname:r.pathname,query:r.query,hash:l(e)},void 0,{shallow:!0}),d(e))},[r,s])}}},69828:function(e,s,a){a.d(s,{Y:function(){return r}});var i=a(24246),t=a(96306),l=a(70788);let r=[(0,i.jsx)(t.PJP.S9g,{},"layers"),(0,i.jsx)(t.PJP.ehp,{},"dataset"),(0,i.jsx)(t.PJP.iA_,{},"table"),(0,i.jsx)(t.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];s.Z=e=>{let{resourceUrn:s,parentLink:a,onPathClick:t=()=>{}}=e,n=[];if(s||n.push({title:"All activity"}),s){n.push({title:"All activity",href:a});let e=s.split(".");e.forEach((s,a)=>{0!==a&&n.push({title:s,icon:r[a-1],onClick:s=>{s.preventDefault(),t(e.slice(0,a+1).join("."))}})})}return(0,i.jsx)(l.m,{"data-testid":"results-breadcrumb",items:n})}},11904:function(e,s,a){a.d(s,{Z:function(){return E}});var i,t,l=a(24246),r=a(59003),n=a(92222),o=a(96306),d=a(27378),c=a(47935),u=a(70675),g=a(72625),x=a(79947),j=a(50169),h=a(28278),m=a(74241),p=a(54682),I=a(91761),C=a(61099),f=a(87667),y=e=>{let{resourceType:s}=e,a=(0,n.Cl)();return s===p.D$.SCHEMA?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original,changeTypeOverride:h.E.CLASSIFICATION}),header:e=>(0,l.jsx)(c.Rr,{value:"Name",...e}),size:300}),a.accessor(e=>e.urn,{id:"project",cell:e=>(0,l.jsx)(c.G3,{value:(0,m.Z)(e.getValue())}),header:e=>(0,l.jsx)(c.Rr,{value:"Project",...e})}),a.display({id:"status",cell:e=>(0,l.jsx)(j.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.system,{id:"system",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"System",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"action",cell:e=>e.row.original.diff_status!==p.LL.MUTED?(0,l.jsx)(I.Z,{resource:e.row.original}):(0,l.jsx)(c.G3,{value:"--"}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.TABLE?{columns:[a.display({id:"select",cell:e=>{var s;let{row:a}=e;return(0,l.jsx)(g.k,{isChecked:a.getIsSelected(),onChange:a.getToggleSelectedHandler(),dataTestId:"select-".concat(null!==(s=a.original.name)&&void 0!==s?s:a.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(g.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40}),a.accessor(e=>e.name,{id:"tables",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Table name",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(j.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(c.G3,{value:"Table"}),header:"Type"}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:"Time"}),a.display({id:"actions",cell:e=>(0,l.jsx)(I.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.FIELD?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Field name",...e}),size:300}),a.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,l.jsx)(x.Z,{type:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"Data type",...e})}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(j.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(c.G3,{value:"Field"}),header:"Type"}),a.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(C.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,l.jsx)(I.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.ENDPOINT?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Object",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(j.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(c.G3,{value:"Endpoint"}),header:"Type"}),a.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(C.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,l.jsx)(I.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:{columns:[]}},v=a(14908);(i=t||(t={})).ACTION_REQUIRED="action-required",i.IN_PROGRESS="in-progress",i.UNMONITORED="unmonitored";let L={"action-required":{label:"Action Required",key:"action-required",filters:[p.LL.CLASSIFICATION_ADDITION,p.LL.CLASSIFICATION_UPDATE],childFilters:[p.LL.CLASSIFICATION_ADDITION,p.LL.CLASSIFICATION_UPDATE]},"in-progress":{label:"In progress",key:"in-progress",filters:[p.LL.CLASSIFYING,p.LL.CLASSIFICATION_QUEUED],childFilters:[p.LL.CLASSIFYING,p.LL.CLASSIFICATION_QUEUED]},unmonitored:{label:"Unmonitored",key:"unmonitored",filters:[p.LL.MUTED],childFilters:[]}};var S=()=>{var e,s;let{activeTab:a,onTabChange:i}=(0,v.Z)({tabKeys:Object.values(t)});return{filterTabs:Object.values(L),activeTab:a,onTabChange:i,activeDiffFilters:null===(e=L[a])||void 0===e?void 0:e.filters,activeChildDiffFilters:null===(s=L[a])||void 0===s?void 0:s.childFilters}},_=a(47182),b=a(38347),w=a(79494),A=e=>{let{resourceUrn:s}=e,[a,{isLoading:i}]=(0,u.Hf)(),[t,{isLoading:r}]=(0,u.zV)(),n=i||r,d=async e=>{await t({staged_resource_urns:e})},c=async e=>{await a({staged_resource_urns:e})};return(0,l.jsx)(o.jqI,{"data-testid":"bulk-actions-menu",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(w.Z,{title:"Confirm all",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>c([s]),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(w.Z,{title:"Ignore all",icon:(0,l.jsx)(o.tpL,{}),onClick:()=>d([s]),disabled:n,loading:r,size:"middle"})]})})},R=e=>{let{selectedUrns:s}=e,[a,{isLoading:i}]=(0,u.Hf)(),[t,{isLoading:r}]=(0,u.zV)(),n=i||r,d=async e=>{await a({staged_resource_urns:e})},c=async e=>{await t({staged_resource_urns:e})};return s.length?(0,l.jsxs)(o.jqI,{className:"items-center","data-testid":"bulk-actions-menu",children:[(0,l.jsx)(o.xvT,{fontSize:"xs",fontWeight:"semibold",minW:16,mr:4,children:"".concat(s.length," selected")}),(0,l.jsxs)(o.jqI,{className:"gap-2",children:[(0,l.jsx)(w.Z,{title:"Confirm",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>d(s),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(w.Z,{title:"Ignore",icon:(0,l.jsx)(o.tpL,{}),disabled:n,loading:r,onClick:()=>c(s),size:"middle"})]})]}):null},T=a(7940),D=a(80285),k=a(36168),N=a(30952);let F={items:[],total:0,page:1,size:50,pages:1},Z=()=>(0,l.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,l.jsxs)(o.gCW,{children:[(0,l.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,l.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var E=e=>{let{resourceUrn:s}=e,[a,i]=(0,d.useState)(""),{filterTabs:t,activeTab:g,onTabChange:x,activeDiffFilters:j,activeChildDiffFilters:h}=S(),[m,I]=(0,d.useState)({}),{PAGE_SIZES:C,pageSize:f,setPageSize:v,onPreviousPageClick:L,isPreviousPageDisabled:w,onNextPageClick:E,isNextPageDisabled:P,startRange:O,endRange:z,pageIndex:G,setTotalPages:U,resetPageIndexToDefault:M}=(0,c.oi)();(0,d.useEffect)(()=>{M()},[s,a,M,j,h]);let{isFetching:V,isLoading:q,data:$}=(0,u.z8)({staged_resource_urn:s,page:G,size:f,child_diff_status:h,diff_status:j,search:a}),W=(0,T.G)(null==$?void 0:$.items[0]),{items:H,total:Q,pages:Y}=(0,d.useMemo)(()=>null!=$?$:F,[$]);(0,d.useEffect)(()=>{U(Y)},[Y,U]);let{columns:J}=y({resourceType:W}),K=(0,d.useMemo)(()=>J,[J]),{navigateToDiscoveryResults:B}=(0,_.Z)(),X=(0,r.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),columns:K,manualPagination:!0,onRowSelectionChange:I,state:{rowSelection:m},getRowId:D.Z,data:H,columnResizeMode:"onChange"}),ee=Object.keys(m).filter(e=>m[e]);return q?(0,l.jsx)(c.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.A5g,{items:t.map(e=>({key:e.key,label:e.label})),activeKey:g,onChange:e=>x(e)}),(0,l.jsxs)(c.Q$,{children:[(0,l.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,l.jsx)(o.xuv,{flexShrink:0,children:(0,l.jsx)(N.f,{value:a,onChange:i})}),(0,l.jsx)(b.a,{})]}),W===p.D$.TABLE&&!!ee.length&&(0,l.jsx)(R,{selectedUrns:ee}),W===p.D$.FIELD&&"unmonitored"!==g&&(0,l.jsx)(A,{resourceUrn:s})]}),(0,l.jsx)(c.ZK,{tableInstance:X,onRowClick:e=>B({resourceUrn:e.urn,filterTab:g}),getRowIsClickable:e=>W!==p.D$.FIELD||(0,k.Z)(e),emptyTableNotice:(0,l.jsx)(Z,{})}),(0,l.jsx)(c.s8,{totalRows:Q||0,pageSizes:C,setPageSize:v,onPreviousPageClick:L,isPreviousPageDisabled:w||V,onNextPageClick:E,isNextPageDisabled:P||V,startRange:O,endRange:z})]})}},91761:function(e,s,a){var i=a(24246),t=a(96306),l=a(812),r=a(41841),n=a(7940),o=a(98559),d=a(54682),c=a(79494),u=a(70675);s.Z=e=>{let{resource:s}=e,[a,{isLoading:g}]=(0,u.v8)(),[x,{isLoading:j}]=(0,u.cM)(),[h,{isLoading:m}]=(0,u.vi)(),p=j||m||g,{diff_status:I,child_diff_statuses:C,top_level_field_name:f}=s,{successAlert:y,errorAlert:v}=(0,r.VY)(),L=I===d.LL.CLASSIFICATION_ADDITION||I===d.LL.CLASSIFICATION_UPDATE,S=C&&(C[d.LL.CLASSIFICATION_ADDITION]||C[d.LL.CLASSIFICATION_UPDATE]),_=(L||S)&&!f,b=L||S,w=(0,n.G)(s)!==d.D$.FIELD,A=_&&b&&w,R=async()=>{let e=await x({staged_resource_urn:s.urn});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to promote resource"):y('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},T=async()=>{let e=await h({staged_resource_urn:s.urn});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to mute resource"):y("Ignored changes will not be added to a Fides dataset.","".concat(s.name||"Changes"," ignored"))},D=async()=>{let e=await a({staged_resource_urn:s.urn,monitor_config_id:s.monitor_config_id,start_classification:!0,diff_statuses_to_classify:[d.LL.CLASSIFICATION_ADDITION,d.LL.CLASSIFICATION_UPDATE,d.LL.CLASSIFYING,d.LL.CLASSIFICATION_QUEUED]});(0,l.D4)(e)?v((0,l.e$)(e.error),"Failed to reclassify resource"):y("Reclassification of ".concat((0,o.Z)(s)||"the resource"," has begun. The results may take some time to appear in the “Data discovery“ tab."),"Reclassification started")};return(0,i.jsxs)(t.Ugi,{gap:2,children:[_&&(0,i.jsx)(c.Z,{title:"Confirm",icon:(0,i.jsx)(t.nQG,{}),onClick:R,disabled:p,loading:j}),b&&(0,i.jsx)(c.Z,{title:"Ignore",icon:(0,i.jsx)(t.tpL,{}),onClick:T,disabled:p,loading:m}),w&&!A&&(0,i.jsx)(c.Z,{title:"Reclassify",icon:(0,i.jsx)(t.nyI,{}),onClick:D,disabled:p,loading:g}),A&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.LZC,{}),(0,i.jsxs)(t.v2r,{children:[(0,i.jsx)(t.j2t,{as:t.wpx,size:"small",type:"text",icon:(0,i.jsx)(t.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-overflow-btn"}),(0,i.jsx)(t.qyq,{children:(0,i.jsx)(t.sNh,{onClick:D,icon:(0,i.jsx)(t.nyI,{}),"data-testid":"action-reclassify",children:"Reclassify"})})]})]})]})}},79947:function(e,s,a){var i=a(24246),t=a(96306);s.Z=e=>{let{type:s}=e;return(0,i.jsx)(t.kCb,{align:"center",h:"full",children:!!s&&(0,i.jsx)(t.j8w,{children:s})})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9676],{59676:function(e,i,r){r.r(i),r.d(i,{default:function(){return j}});var t=r(24246),s=r(96306),n=r(16134),a=r(27378),l=r(812),o=r(75573),d=r(90867);let u=(0,s.Gpc)((e,i)=>{let{handleBlur:r,subjectRequest:u}=e,c=(0,n.T)(),[f,m]=(0,a.useState)(!1),{errorAlert:h,successAlert:x}=(0,o.VY)(),{errorRequests:p}=(0,n.C)(d.fe),[g]=(0,d.JD)(),[j]=(0,d.Fq)(),y=async()=>{m(!0);let e=await g(p);(0,l.D4)(e)?(c((0,d.uT)({checkAll:!1,errorRequests:[]})),h((0,l.e$)(e.error),"DSR batch automation has failed due to the following:",{duration:null})):(e.data.failed.length>0&&h((0,t.jsxs)(s.xuv,{children:["DSR automation has failed for"," ",(0,t.jsx)(s.xvT,{as:"span",fontWeight:"semibold",children:e.data.failed.length})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null}),e.data.succeeded.length>0&&x("Privacy request(s) are now being reprocessed.")),m(!1)},v=async()=>{if(!u)return;m(!0);let e=await j(u);(0,l.D4)(e)?h((0,l.e$)(e.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):x("Privacy request is now being reprocessed."),m(!1),r&&r(i)};return(0,t.jsx)(s.wpx,{disabled:f,loading:f,onClick:u?v:y,ref:i,size:"small",icon:(0,t.jsx)(s.AyE,{}),children:"Reprocess"})});var c=r(34090),f=r(55484);let m=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,h=e=>m.test(e),x=(0,s.Gpc)((e,i)=>{let{isRequired:r=!1,...n}=e,{emails:l}=n.form.values,[o,d]=(0,a.useState)(""),u=e=>l.includes(e),c=e=>{e.map(e=>e.trim()).filter(e=>h(e)&&!u(e)).forEach(e=>n.push(e)),d("")};return(0,t.jsxs)(s.NIc,{alignItems:"baseline",display:"inline-flex",isInvalid:!!n.form.errors[n.name],isRequired:r,children:[(0,t.jsx)(s.lXp,{fontSize:"md",htmlFor:"email",children:"Email"}),(0,t.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:[(0,t.jsx)(s.IIB,{autoComplete:"off",placeholder:"Type or paste email addresses separated by commas and press `Enter` or `Tab`...",onChange:e=>{d(e.target.value)},onKeyDown:e=>{["Enter","Tab",","].includes(e.key)&&(e.preventDefault(),c([o]))},onPaste:e=>{e.preventDefault(),c(e.clipboardData.getData("text").split(","))},ref:i,size:"sm",type:"email",value:o}),(0,t.jsx)(s.J1D,{children:n.form.errors[n.name]}),l.length>0&&(0,t.jsx)(s.Eq9,{spacing:1,mb:3,pt:"8px",children:l.map((e,i)=>(0,t.jsxs)(s.Vp9,{borderRadius:"full",backgroundColor:"primary.400",color:"white",size:"sm",variant:"solid",children:[(0,t.jsx)(s.Sn0,{children:e}),(0,t.jsx)(s.SD9,{onClick:()=>{n.remove(i)}})]},e))})]})]})}),p=f.Ry().shape({emails:f.IX(f.Z_()).when(["notify"],{is:!0,then:()=>f.IX(f.Z_()).min(1,"Must enter at least one valid email").label("Email")}),notify:f.O7(),minErrorCount:f.Rx().required()});var g=()=>{let{isOpen:e,onOpen:i,onClose:r}=(0,s.qY0)(),[n,u]=(0,a.useState)({emails:[],notify:!1,minErrorCount:1}),f=(0,a.useRef)(null),{errorAlert:m,successAlert:h}=(0,o.VY)(),[g,j]=(0,a.useState)(!0),{data:y}=(0,d.tE)(void 0,{skip:g}),[v]=(0,d.SC)(),C=async(e,i)=>{i.setSubmitting(!0);let t=await v({email_addresses:e.emails,notify_after_failures:e.notify?e.minErrorCount:0});(0,l.D4)(t)?m((0,l.e$)(t.error),"Configure alerts and notifications has failed to save due to the following:"):h("Configure alerts and notifications saved successfully."),i.setSubmitting(!1),r()};return(0,a.useEffect)(()=>{e&&j(!1),y&&u({emails:y.email_addresses,notify:0!==y.notify_after_failures,minErrorCount:y.notify_after_failures})},[y,e]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.wpx,{onClick:i,title:"Configure alerts","aria-label":"Configure alerts",icon:(0,t.jsx)(s.Dkj,{})}),(0,t.jsx)(c.J9,{enableReinitialize:!0,initialValues:n,onSubmit:C,validationSchema:p,children:i=>(0,t.jsxs)(s.dys,{isOpen:e,placement:"right",initialFocusRef:f,onClose:()=>{i.resetForm(),r()},size:"lg",children:[(0,t.jsx)(s.P1B,{}),(0,t.jsxs)(s.scA,{color:"gray.900",children:[(0,t.jsx)(s.cCv,{}),(0,t.jsxs)(s.OXI,{color:"gray.900",children:[(0,t.jsx)(s.xvT,{fontSize:"2xl",fontWeight:"normal",mb:4,children:"Configure alerts and notifications"}),(0,t.jsx)(s.xuv,{mt:"26px",children:(0,t.jsx)(s.xvT,{fontSize:"md",fontWeight:"normal",children:"Setup your alerts to send you a notification when there are any processing failures. You can also setup a threshold for connector failures for Fides to notify you after X amount of failures have occurred."})})]}),(0,t.jsx)(s.Ng0,{mt:"20px",children:(0,t.jsxs)(c.l0,{id:"configure-alerts-form",noValidate:!0,children:[(0,t.jsx)(s.xvT,{fontSize:"md",children:"Contact details"}),(0,t.jsxs)(s.gCW,{align:"stretch",gap:"29px",mt:"14px",children:[(0,t.jsx)(s.Ugi,{children:(0,t.jsx)(c.F2,{name:"emails",render:e=>(0,t.jsx)(x,{...e,isRequired:i.values.notify,ref:f})})}),(0,t.jsx)(s.Ugi,{children:(0,t.jsx)(c.gN,{id:"notify",name:"notify",children:e=>{let{field:r}=e;return(0,t.jsxs)(s.NIc,{alignItems:"center",display:"flex",mt:"45px",children:[(0,t.jsx)(s.lXp,{fontSize:"md",mb:"0",children:"Notify me immediately if there are any DSR processing errors"}),(0,t.jsx)(s.rAg,{checked:i.values.notify,onChange:(e,t)=>{r.onChange(t),i.setFieldValue(r.name,e),i.setFieldValue("minErrorCount",1),e||setTimeout(()=>{i.setFieldTouched("emails",!1)},0)}})]})}})})]}),(0,t.jsx)(s.xvT,{color:"#757575",fontSize:"sm",mt:"11px",children:"If selected, then Fides will notify you by your chosen method of communication every time the system encounters a data subject request processing error. You can turn this off anytime and setup a more suitable notification method below if you wish."}),i.values.notify&&(0,t.jsx)(s.Ugi,{mt:"34px",children:(0,t.jsx)(c.gN,{id:"minErrorCount",name:"minErrorCount",children:e=>{let{field:r,meta:n}=e;return(0,t.jsxs)(s.NIc,{alignItems:"center",display:"flex",isInvalid:!!(n.error&&n.touched),isRequired:!0,children:[(0,t.jsx)(s.xvT,{children:"Notify me after"}),(0,t.jsxs)(s.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:i.values.minErrorCount||1,min:1,ml:"8px",mr:"8px",onChange:(e,r)=>{i.setFieldValue("minErrorCount",r)},size:"sm",w:"80px",children:[(0,t.jsx)(s.zuI,{...r}),(0,t.jsxs)(s.FiK,{children:[(0,t.jsx)(s.WQu,{}),(0,t.jsx)(s.Y_d,{})]})]}),(0,t.jsx)(s.xvT,{children:"DSR processing errors "})]})}})})]})}),(0,t.jsx)(s.zeN,{justifyContent:"flex-start",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.wpx,{onClick:()=>{i.resetForm(),r()},children:"Cancel"}),(0,t.jsx)(s.wpx,{form:"configure-alerts-form",disabled:i.isSubmitting,loading:i.isSubmitting,htmlType:"submit",children:"Save"})]})})]})]})})]})},j=()=>{let{errorRequests:e}=(0,n.C)(d.fe);return(0,t.jsxs)(s.kCb,{gap:4,children:[(null==e?void 0:e.length)>0&&(0,t.jsx)(u,{}),(0,t.jsx)(g,{})]})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9676],{59676:function(e,i,r){r.r(i),r.d(i,{default:function(){return j}});var t=r(24246),s=r(96306),n=r(16134),a=r(27378),l=r(812),o=r(41841),d=r(90867);let u=(0,s.Gpc)((e,i)=>{let{handleBlur:r,subjectRequest:u}=e,c=(0,n.T)(),[f,m]=(0,a.useState)(!1),{errorAlert:h,successAlert:x}=(0,o.VY)(),{errorRequests:p}=(0,n.C)(d.fe),[g]=(0,d.JD)(),[j]=(0,d.Fq)(),y=async()=>{m(!0);let e=await g(p);(0,l.D4)(e)?(c((0,d.uT)({checkAll:!1,errorRequests:[]})),h((0,l.e$)(e.error),"DSR batch automation has failed due to the following:",{duration:null})):(e.data.failed.length>0&&h((0,t.jsxs)(s.xuv,{children:["DSR automation has failed for"," ",(0,t.jsx)(s.xvT,{as:"span",fontWeight:"semibold",children:e.data.failed.length})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null}),e.data.succeeded.length>0&&x("Privacy request(s) are now being reprocessed.")),m(!1)},v=async()=>{if(!u)return;m(!0);let e=await j(u);(0,l.D4)(e)?h((0,l.e$)(e.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):x("Privacy request is now being reprocessed."),m(!1),r&&r(i)};return(0,t.jsx)(s.wpx,{disabled:f,loading:f,onClick:u?v:y,ref:i,size:"small",icon:(0,t.jsx)(s.AyE,{}),children:"Reprocess"})});var c=r(34090),f=r(55484);let m=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,h=e=>m.test(e),x=(0,s.Gpc)((e,i)=>{let{isRequired:r=!1,...n}=e,{emails:l}=n.form.values,[o,d]=(0,a.useState)(""),u=e=>l.includes(e),c=e=>{e.map(e=>e.trim()).filter(e=>h(e)&&!u(e)).forEach(e=>n.push(e)),d("")};return(0,t.jsxs)(s.NIc,{alignItems:"baseline",display:"inline-flex",isInvalid:!!n.form.errors[n.name],isRequired:r,children:[(0,t.jsx)(s.lXp,{fontSize:"md",htmlFor:"email",children:"Email"}),(0,t.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:[(0,t.jsx)(s.IIB,{autoComplete:"off",placeholder:"Type or paste email addresses separated by commas and press `Enter` or `Tab`...",onChange:e=>{d(e.target.value)},onKeyDown:e=>{["Enter","Tab",","].includes(e.key)&&(e.preventDefault(),c([o]))},onPaste:e=>{e.preventDefault(),c(e.clipboardData.getData("text").split(","))},ref:i,size:"sm",type:"email",value:o}),(0,t.jsx)(s.J1D,{children:n.form.errors[n.name]}),l.length>0&&(0,t.jsx)(s.Eq9,{spacing:1,mb:3,pt:"8px",children:l.map((e,i)=>(0,t.jsxs)(s.Vp9,{borderRadius:"full",backgroundColor:"primary.400",color:"white",size:"sm",variant:"solid",children:[(0,t.jsx)(s.Sn0,{children:e}),(0,t.jsx)(s.SD9,{onClick:()=>{n.remove(i)}})]},e))})]})]})}),p=f.Ry().shape({emails:f.IX(f.Z_()).when(["notify"],{is:!0,then:()=>f.IX(f.Z_()).min(1,"Must enter at least one valid email").label("Email")}),notify:f.O7(),minErrorCount:f.Rx().required()});var g=()=>{let{isOpen:e,onOpen:i,onClose:r}=(0,s.qY0)(),[n,u]=(0,a.useState)({emails:[],notify:!1,minErrorCount:1}),f=(0,a.useRef)(null),{errorAlert:m,successAlert:h}=(0,o.VY)(),[g,j]=(0,a.useState)(!0),{data:y}=(0,d.tE)(void 0,{skip:g}),[v]=(0,d.SC)(),C=async(e,i)=>{i.setSubmitting(!0);let t=await v({email_addresses:e.emails,notify_after_failures:e.notify?e.minErrorCount:0});(0,l.D4)(t)?m((0,l.e$)(t.error),"Configure alerts and notifications has failed to save due to the following:"):h("Configure alerts and notifications saved successfully."),i.setSubmitting(!1),r()};return(0,a.useEffect)(()=>{e&&j(!1),y&&u({emails:y.email_addresses,notify:0!==y.notify_after_failures,minErrorCount:y.notify_after_failures})},[y,e]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.wpx,{onClick:i,title:"Configure alerts","aria-label":"Configure alerts",icon:(0,t.jsx)(s.Dkj,{})}),(0,t.jsx)(c.J9,{enableReinitialize:!0,initialValues:n,onSubmit:C,validationSchema:p,children:i=>(0,t.jsxs)(s.dys,{isOpen:e,placement:"right",initialFocusRef:f,onClose:()=>{i.resetForm(),r()},size:"lg",children:[(0,t.jsx)(s.P1B,{}),(0,t.jsxs)(s.scA,{color:"gray.900",children:[(0,t.jsx)(s.cCv,{}),(0,t.jsxs)(s.OXI,{color:"gray.900",children:[(0,t.jsx)(s.xvT,{fontSize:"2xl",fontWeight:"normal",mb:4,children:"Configure alerts and notifications"}),(0,t.jsx)(s.xuv,{mt:"26px",children:(0,t.jsx)(s.xvT,{fontSize:"md",fontWeight:"normal",children:"Setup your alerts to send you a notification when there are any processing failures. You can also setup a threshold for connector failures for Fides to notify you after X amount of failures have occurred."})})]}),(0,t.jsx)(s.Ng0,{mt:"20px",children:(0,t.jsxs)(c.l0,{id:"configure-alerts-form",noValidate:!0,children:[(0,t.jsx)(s.xvT,{fontSize:"md",children:"Contact details"}),(0,t.jsxs)(s.gCW,{align:"stretch",gap:"29px",mt:"14px",children:[(0,t.jsx)(s.Ugi,{children:(0,t.jsx)(c.F2,{name:"emails",render:e=>(0,t.jsx)(x,{...e,isRequired:i.values.notify,ref:f})})}),(0,t.jsx)(s.Ugi,{children:(0,t.jsx)(c.gN,{id:"notify",name:"notify",children:e=>{let{field:r}=e;return(0,t.jsxs)(s.NIc,{alignItems:"center",display:"flex",mt:"45px",children:[(0,t.jsx)(s.lXp,{fontSize:"md",mb:"0",children:"Notify me immediately if there are any DSR processing errors"}),(0,t.jsx)(s.rAg,{checked:i.values.notify,onChange:(e,t)=>{r.onChange(t),i.setFieldValue(r.name,e),i.setFieldValue("minErrorCount",1),e||setTimeout(()=>{i.setFieldTouched("emails",!1)},0)}})]})}})})]}),(0,t.jsx)(s.xvT,{color:"#757575",fontSize:"sm",mt:"11px",children:"If selected, then Fides will notify you by your chosen method of communication every time the system encounters a data subject request processing error. You can turn this off anytime and setup a more suitable notification method below if you wish."}),i.values.notify&&(0,t.jsx)(s.Ugi,{mt:"34px",children:(0,t.jsx)(c.gN,{id:"minErrorCount",name:"minErrorCount",children:e=>{let{field:r,meta:n}=e;return(0,t.jsxs)(s.NIc,{alignItems:"center",display:"flex",isInvalid:!!(n.error&&n.touched),isRequired:!0,children:[(0,t.jsx)(s.xvT,{children:"Notify me after"}),(0,t.jsxs)(s.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:i.values.minErrorCount||1,min:1,ml:"8px",mr:"8px",onChange:(e,r)=>{i.setFieldValue("minErrorCount",r)},size:"sm",w:"80px",children:[(0,t.jsx)(s.zuI,{...r}),(0,t.jsxs)(s.FiK,{children:[(0,t.jsx)(s.WQu,{}),(0,t.jsx)(s.Y_d,{})]})]}),(0,t.jsx)(s.xvT,{children:"DSR processing errors "})]})}})})]})}),(0,t.jsx)(s.zeN,{justifyContent:"flex-start",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.wpx,{onClick:()=>{i.resetForm(),r()},children:"Cancel"}),(0,t.jsx)(s.wpx,{form:"configure-alerts-form",disabled:i.isSubmitting,loading:i.isSubmitting,htmlType:"submit",children:"Save"})]})})]})]})})]})},j=()=>{let{errorRequests:e}=(0,n.C)(d.fe);return(0,t.jsxs)(s.kCb,{gap:4,children:[(null==e?void 0:e.length)>0&&(0,t.jsx)(u,{}),(0,t.jsx)(g,{})]})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9951],{95492:function(e,t,s){s.d(t,{l:function(){return n}});var i=s(24246);let n=(0,s(96306).IUT)({displayName:"TrashCanSolidIcon",viewBox:"0 0 12 15",path:(0,i.jsx)("path",{d:"M8.37857 1.18083C8.23393 0.892838 7.93661 0.710938 7.6125 0.710938H4.3875C4.06339 0.710938 3.76607 0.892838 3.62143 1.18083L3.42857 1.56094H0.857143C0.383036 1.56094 -1.19209e-07 1.94158 -1.19209e-07 2.41094C-1.19209e-07 2.8803 0.383036 3.26094 0.857143 3.26094H11.1429C11.6162 3.26094 12 2.8803 12 2.41094C12 1.94158 11.6162 1.56094 11.1429 1.56094H8.57143L8.37857 1.18083ZM11.167 4.11094H0.857143V12.6109C0.857143 13.5486 1.62589 14.3109 2.57143 14.3109H9.45268C10.3754 14.3109 11.167 13.5486 11.167 12.6109V4.11094ZM9.02411 6.23594V12.1859C9.02411 12.4197 8.80714 12.6109 8.59554 12.6109C8.33571 12.6109 8.16696 12.4197 8.16696 12.1859V6.23594C8.16696 6.00219 8.33571 5.81094 8.59554 5.81094C8.80714 5.81094 9.02411 6.00219 9.02411 6.23594ZM6.45268 6.23594V12.1859C6.45268 12.4197 6.23571 12.6109 6.02411 12.6109C5.76429 12.6109 5.57143 12.4197 5.57143 12.1859V6.23594C5.57143 6.00219 5.76429 5.81094 6.02411 5.81094C6.23571 5.81094 6.45268 6.00219 6.45268 6.23594ZM3.85714 6.23594V12.1859C3.85714 12.4197 3.66429 12.6109 3.42857 12.6109C3.19286 12.6109 3 12.4197 3 12.1859V6.23594C3 6.00219 3.19286 5.81094 3.42857 5.81094C3.66429 5.81094 3.85714 6.00219 3.85714 6.23594Z",fill:"currentColor"})})},94799:function(e,t,s){s.d(t,{k:function(){return l}});var i=s(76649);let n=e=>(0,i.Ln)({id:"string"},e),l=e=>(null!=e?e:[]).filter(n)},30320:function(e,t,s){s.d(t,{m:function(){return o}});var i=s(27378),n=s(25980),l=s(75573),a=s(32885),r=s(94799);let o=e=>{let{resourceFidesKey:t,resourceType:s}=e,{errorAlert:o}=(0,l.VY)(),{plus:d}=(0,n.hz)(),c=(0,i.useMemo)(()=>null!=t?t:"",[]),u=(0,a.YU)(!0,{skip:!d}),m=(0,a.VN)(s,{skip:!d}),{data:f,isLoading:x,error:h,isError:y}=(0,a.PV)(null!=t?t:"",{skip:""!==c&&!(d&&c)}),[p]=(0,a._D)(),g=u.isLoading||m.isLoading||x,C=(0,i.useMemo)(()=>new Map((0,r.k)(u.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}))}]})),[u.data]),j=(0,i.useMemo)(()=>{var e;return null===(e=m.data)||void 0===e?void 0:e.filter(e=>e.active)},[m.data]),_=(0,i.useMemo)(()=>new Map((0,r.k)(j).map(e=>[e.id,e])),[j]),v=(0,i.useMemo)(()=>y&&(null==h?void 0:h.status)===404?new Map:new Map((0,r.k)(f).map(e=>[e.custom_field_definition_id,e])),[f,y,h]),k=(0,i.useMemo)(()=>{let e=[..._.keys()];return e.sort(),e},[_]),S=(0,i.useMemo)(()=>{let e={};return j&&v&&j.forEach(t=>{let s=v.get(t.id||"");s&&(t.allow_list_id&&"string[]"===t.field_type?e[s.custom_field_definition_id]=s.value:e[s.custom_field_definition_id]=s.value.toString())}),e},[j,v]),T=(0,i.useCallback)(async e=>{if(!d)return;let i="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!i)return;let{customFieldValues:n}=e;if(!n||0===Object.keys(n).length)return;let l=[],a=[];k.forEach(e=>{let t=v.get(e),s=n[e];void 0===s||""===s||Array.isArray(s)&&0===s.length?(null==t?void 0:t.id)&&a.push(t.id):l.push({custom_field_definition_id:e,resource_id:i,id:null==t?void 0:t.id,value:s})});try{await p({resource_type:s,resource_id:i,upsert:l,delete:a})}catch(e){o("One or more custom fields have failed to save, please try again."),console.error(e)}},[d,v,o,t,k,p,s]);return{customFieldValues:S,definitionIdToCustomField:v,idToAllowListWithOptions:C,idToCustomFieldDefinition:_,isEnabled:d,isLoading:g,sortedCustomFieldDefinitionIds:k,upsertCustomFields:T}}},95346:function(e,t,s){s.d(t,{uc:function(){return p},Hn:function(){return o},Uv:function(){return a},C7:function(){return d},mZ:function(){return y.m}});var i,n,l,a,r=s(54682);(i=l||(l={}))[i.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",i[i.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",i[i.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",r.AL.STRING,r.AL.STRING,r.AL.STRING_,(n=a||(a={})).SINGLE_SELECT="singleSelect",n.MULTIPLE_SELECT="multipleSelect",n.LOCATION_SELECT="locationSelect",n.OPEN_TEXT="openText";let o=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Location select",value:"locationSelect"},{label:"Open Text",value:"openText"}],d=[{label:"taxonomy:".concat(r.P6.DATA_CATEGORY),value:r.P6.DATA_CATEGORY},{label:"taxonomy:".concat(r.P6.DATA_SUBJECT),value:r.P6.DATA_SUBJECT},{label:"taxonomy:".concat(r.P6.DATA_USE),value:r.P6.DATA_USE},{label:"".concat(r.P6.SYSTEM,":information"),value:r.P6.SYSTEM},{label:"system:data use",value:r.P6.PRIVACY_DECLARATION}];var c=s(24246),u=s(96306),m=s(34090),f=s(30234),x=s(97181),h=s(40324),y=s(30320);let p=e=>{let{resourceFidesKey:t,resourceType:s}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:n,isEnabled:l,isLoading:a,sortedCustomFieldDefinitionIds:o}=(0,y.m)({resourceFidesKey:t,resourceType:s});return l&&0!==o.length?(0,c.jsx)(f.Z,{heading:"Custom fields",children:(0,c.jsx)(u.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(u.kCb,{flexDir:"column",gap:"24px",children:a?(0,c.jsx)(u.M5Y,{children:(0,c.jsx)(u.$jN,{})}):o.length>0&&(0,c.jsx)(u.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:o.map(e=>{let t=n.get(e);if(!t)return null;let s="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===r.AL.STRING)return(0,c.jsx)(m.gN,{name:s,children:e=>{let{field:s}=e;return(0,c.jsx)(h.j0,{...s,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let l=i.get(t.allow_list_id);if(!l)return null;let{options:a}=l;return(0,c.jsx)(x.d,{name:s,allowClear:!0,mode:t.field_type!==r.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};s(94799)},45938:function(e,t,s){s.d(t,{Gt:function(){return m},eB:function(){return f},oI:function(){return u}});var i=s(24246),n=s(34090),l=s(27378),a=s(16134),r=s(38602),o=s(58452);let d=(0,l.createRef)(),c=(0,l.createRef)(),u=()=>{let e=(0,a.T)(),t=(0,a.C)(r.DB),s=(0,l.useCallback)(()=>{c.current=void 0,d.current=void 0},[]),i=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!0),s())},[e,s]),n=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!1),s())},[e,s]);return{attemptAction:(0,l.useCallback)(()=>t?(e((0,r.h7)()),d.current||(d.current=new Promise(e=>{c.current=e})),d.current):Promise.resolve(!0),[t,e]),onConfirm:i,onClose:n}},m=e=>{let{id:t,name:s}=e,{dirty:i}=(0,n.u6)(),o=(0,a.T)();return(0,l.useEffect)(()=>(o((0,r.Zu)({id:t,name:s})),()=>{o((0,r.dz)({id:t}))}),[o,t,s]),(0,l.useEffect)(()=>{o((0,r.$p)({id:t,isDirty:i}))},[i,o,t]),null},f=()=>{let{onConfirm:e,onClose:t}=u(),s=(0,a.C)(r.uv);return(0,i.jsx)(o.Z,{isOpen:s,onClose:t,onConfirm:e,isCentered:!0,title:"Unsaved Changes",message:"You have unsaved changes"})}},84720:function(e,t,s){s.d(t,{q:function(){return j}});var i=s(24246),n=s(96306),l=s(27378),a=s(34090),r=s(812),o=s(45938),d=s(14048),c=s(95492);let u=e=>{let{systems:t,dataFlows:s,onDataFlowSystemChange:l}=e,{setFieldValue:r}=(0,a.u6)(),o=s.map(e=>e.fides_key),d=e=>{let t=s.filter(t=>t.fides_key!==e.fides_key);r("dataFlowSystems",t),l(t)};return(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,i.jsx)(n.hrZ,{children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsx)(n.Th,{})]})}),(0,i.jsx)(n.p3B,{children:t.filter(e=>o.includes(e.fides_key)).map(e=>(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"end",children:(0,i.jsx)(n.wpx,{"aria-label":"Unassign data flow from system",icon:(0,i.jsx)(c.l,{}),onClick:()=>d(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var m=s(26917),f=e=>{let{allSystems:t,dataFlowSystems:s,onChange:l,flowType:r}=e,{setFieldValue:o}=(0,a.u6)(),d=e=>{if(s.find(t=>t.fides_key===e.fides_key)){let t=s.filter(t=>t.fides_key!==e.fides_key);o("dataFlowSystems",t),l(t)}else{let t=[...s,{fides_key:e.fides_key,type:"system"}];o("dataFlowSystems",t),l(t)}};return(0,i.jsx)(n.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,i.jsx)(n.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsxs)(n.Th,{textAlign:"right",children:["Set as ",r]})]})}),(0,i.jsx)(n.p3B,{children:t.map(e=>{let t=!!s.find(t=>t.fides_key===e.fides_key);return(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"right",children:(0,i.jsx)(n.rAg,{checked:t,onChange:()=>d(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let x=(e,t)=>{var s,i;return(null===(s=e.name)||void 0===s?void 0:s.toLocaleLowerCase().includes(t.toLocaleLowerCase()))||(null===(i=e.description)||void 0===i?void 0:i.toLocaleLowerCase().includes(t.toLocaleLowerCase()))};var h=e=>{let{currentSystem:t,systems:s,isOpen:r,onClose:o,dataFlowSystems:d,onDataFlowSystemChange:c,flowType:u}=e,{setFieldValue:h}=(0,a.u6)(),[y,p]=(0,l.useState)(""),[g,C]=(0,l.useState)(d),j=async()=>{c(g),o()},_=0===s.length,v=(0,l.useMemo)(()=>s?s.filter(e=>e.fides_key!==t.fides_key).filter(e=>x(e,y)):[],[s,t.fides_key,y]),k=(0,l.useMemo)(()=>{let e=new Set(g.map(e=>e.fides_key));return v.every(t=>e.has(t.fides_key))},[v,g]);return(0,i.jsxs)(n.u_l,{isOpen:r,onClose:o,size:"2xl",isCentered:!0,children:[(0,i.jsx)(n.ZAr,{}),(0,i.jsxs)(n.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,i.jsxs)(n.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,i.jsxs)(n.xvT,{fontSize:"2xl",lineHeight:8,fontWeight:"semibold",children:["Configure ",u.toLocaleLowerCase()," systems"]}),(0,i.jsxs)(n.j8w,{color:"success",children:["Assigned to ",g.length," systems"]})]}),(0,i.jsx)(n.fef,{"data-testid":"assign-systems-modal-body",children:_?(0,i.jsx)(n.xvT,{children:"No systems found"}):(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Add or remove destination systems from your data map"}),(0,i.jsx)(n.xuv,{children:(0,i.jsxs)(n.NIc,{display:"flex",alignItems:"center",children:[(0,i.jsx)(n.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,i.jsx)(n.rAg,{size:"small",id:"assign-all-systems",checked:k,onChange:e=>{if(e&&s){let e=v.map(e=>({fides_key:e.fides_key,type:"system"}));h("dataFlowSystems",e),C(e)}else C([])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,i.jsx)(m.Z,{value:y,onChange:p,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,i.jsx)(f,{flowType:u,allSystems:v,dataFlowSystems:g,onChange:C})]})}),(0,i.jsxs)(n.mzw,{justifyContent:"flex-start",children:[(0,i.jsx)(n.wpx,{onClick:o,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),!_&&(0,i.jsx)(n.wpx,{type:"primary",onClick:j,"data-testid":"confirm-btn",children:"Confirm"})]})]})]})},y=s(46628),p=s(1315);let g={dataFlowSystems:[]},C=e=>{let{system:t,isIngress:s,isSystemTab:c}=e,m=(0,n.pmc)(),f=s?"Source":"Destination",x="".concat(f,"s"),C=(0,n.qY0)(),[j]=(0,p.qQ)(),{data:_=[]}=(0,p.K3)(),v=(0,l.useMemo)(()=>{let e=s?t.ingress:t.egress;e||(e=[]);let i=_?_.map(e=>e.fides_key):[];return e.filter(e=>i.includes(e.fides_key))},[s,t,_]),[k,S]=(0,l.useState)(v);(0,l.useEffect)(()=>{S(v)},[v]);let T=async(e,i)=>{let{dataFlowSystems:n}=e,{resetForm:l}=i,a={...t,ingress:s?n:t.ingress,egress:s?t.egress:n},o=await j(a);(0,r.D4)(o)?m((0,y.Vo)("Failed to update data flows")):m((0,y.t5)("".concat(x," updated"))),l({values:{dataFlowSystems:n}})};return(0,i.jsxs)(n.Qdk,{children:[(0,i.jsx)(n.KFZ,{height:"68px",paddingLeft:c?6:2,"data-testid":"data-flow-button-".concat(f),children:(0,i.jsxs)(n.kCb,{alignItems:"center",justifyContent:"start",flex:1,textAlign:"left",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"semibold",mr:2,children:x}),(0,i.jsx)(n.Vp9,{ml:2,backgroundColor:"primary.400",borderRadius:"6px",color:"white",children:k.length}),(0,i.jsx)(n.LZC,{}),(0,i.jsx)(n.XEm,{})]})}),(0,i.jsx)(n.Hk3,{backgroundColor:"gray.50",padding:6,"data-testid":"data-flow-panel-".concat(f),children:(0,i.jsx)(n.Kqy,{borderRadius:"md",backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:(0,i.jsx)(a.J9,{initialValues:g,onSubmit:T,children:e=>{let{isSubmitting:s,dirty:l,resetForm:r}=e;return(0,i.jsxs)(a.l0,{children:[(0,i.jsx)(o.Gt,{id:"".concat(t.fides_key,":").concat(f),name:"".concat(f," Data Flow")}),(0,i.jsx)(n.wpx,{onClick:C.onOpen,type:"primary",size:"small",icon:(0,i.jsx)(d.A5,{}),iconPosition:"end",className:"mb-4","data-testid":"assign-systems-btn",children:"Configure ".concat(x.toLocaleLowerCase())}),(0,i.jsx)(u,{systems:_,dataFlows:k,onDataFlowSystemChange:S}),(0,i.jsxs)("div",{className:"mt-6 flex gap-2",children:[(0,i.jsx)(n.wpx,{disabled:!l&&k===v,onClick:()=>{S(v),r({values:{dataFlowSystems:v}})},"data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(n.wpx,{type:"primary",htmlType:"submit",loading:s,disabled:!l&&k===v,"data-testid":"save-btn",children:"Save"})]}),C.isOpen?(0,i.jsx)(h,{currentSystem:t,systems:_,isOpen:C.isOpen,onClose:C.onClose,dataFlowSystems:k,onDataFlowSystemChange:S,flowType:f}):null]})}})})})]})},j=e=>{let{system:t,isSystemTab:s}=e;return(0,i.jsxs)(n.UQy,{allowToggle:!0,"data-testid":"data-flow-accordion",children:[(0,i.jsx)(C,{system:t,isIngress:!0,isSystemTab:s}),(0,i.jsx)(C,{system:t,isSystemTab:s})]})}},30234:function(e,t,s){var i=s(24246),n=s(96306);t.Z=e=>{let{heading:t,HeadingButton:s,children:l}=e;return(0,i.jsx)(n.Kqy,{spacing:4,children:(0,i.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,i.jsxs)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,i.jsx)(n.X6q,{as:"h3",size:"xs",children:t}),s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.LZC,{}),(0,i.jsx)(s,{})]}):null]}),(0,i.jsx)(n.Kqy,{spacing:4,px:6,py:6,children:l})]})})}},52368:function(e,t,s){s.d(t,{f:function(){return o}});var i=s(16134),n=s(30002),l=s(28079),a=s(41966),r=s(57072);let o=e=>{let{includeDatasets:t,includeDisabled:s}=e,{isLoading:o}=(0,r.MO)(),{isLoading:d}=(0,n.te)(),{isLoading:c}=(0,l.fd)(),{isLoading:u}=(0,a.LH)({onlyUnlinkedDatasets:!1,minimal:!0},{skip:!t}),m=(0,i.C)(r.qb),f=(0,i.C)(r.Bd),x=(0,i.C)(n.ZL),h=(0,i.C)(n.H7),y=(0,i.C)(l.U3),p=(0,i.C)(l.jp),g=(0,i.C)(a.Q4);return{allDataCategories:s?m:f,allDataSubjects:s?x:h,allDataUses:s?y:p,allDatasets:t?g:void 0,isLoading:o||d||c||u}}},31883:function(e,t,s){s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9951],{95492:function(e,t,s){s.d(t,{l:function(){return n}});var i=s(24246);let n=(0,s(96306).IUT)({displayName:"TrashCanSolidIcon",viewBox:"0 0 12 15",path:(0,i.jsx)("path",{d:"M8.37857 1.18083C8.23393 0.892838 7.93661 0.710938 7.6125 0.710938H4.3875C4.06339 0.710938 3.76607 0.892838 3.62143 1.18083L3.42857 1.56094H0.857143C0.383036 1.56094 -1.19209e-07 1.94158 -1.19209e-07 2.41094C-1.19209e-07 2.8803 0.383036 3.26094 0.857143 3.26094H11.1429C11.6162 3.26094 12 2.8803 12 2.41094C12 1.94158 11.6162 1.56094 11.1429 1.56094H8.57143L8.37857 1.18083ZM11.167 4.11094H0.857143V12.6109C0.857143 13.5486 1.62589 14.3109 2.57143 14.3109H9.45268C10.3754 14.3109 11.167 13.5486 11.167 12.6109V4.11094ZM9.02411 6.23594V12.1859C9.02411 12.4197 8.80714 12.6109 8.59554 12.6109C8.33571 12.6109 8.16696 12.4197 8.16696 12.1859V6.23594C8.16696 6.00219 8.33571 5.81094 8.59554 5.81094C8.80714 5.81094 9.02411 6.00219 9.02411 6.23594ZM6.45268 6.23594V12.1859C6.45268 12.4197 6.23571 12.6109 6.02411 12.6109C5.76429 12.6109 5.57143 12.4197 5.57143 12.1859V6.23594C5.57143 6.00219 5.76429 5.81094 6.02411 5.81094C6.23571 5.81094 6.45268 6.00219 6.45268 6.23594ZM3.85714 6.23594V12.1859C3.85714 12.4197 3.66429 12.6109 3.42857 12.6109C3.19286 12.6109 3 12.4197 3 12.1859V6.23594C3 6.00219 3.19286 5.81094 3.42857 5.81094C3.66429 5.81094 3.85714 6.00219 3.85714 6.23594Z",fill:"currentColor"})})},94799:function(e,t,s){s.d(t,{k:function(){return l}});var i=s(76649);let n=e=>(0,i.Ln)({id:"string"},e),l=e=>(null!=e?e:[]).filter(n)},30320:function(e,t,s){s.d(t,{m:function(){return o}});var i=s(27378),n=s(25980),l=s(41841),a=s(32885),r=s(94799);let o=e=>{let{resourceFidesKey:t,resourceType:s}=e,{errorAlert:o}=(0,l.VY)(),{plus:d}=(0,n.hz)(),c=(0,i.useMemo)(()=>null!=t?t:"",[]),u=(0,a.YU)(!0,{skip:!d}),m=(0,a.VN)(s,{skip:!d}),{data:f,isLoading:x,error:h,isError:y}=(0,a.PV)(null!=t?t:"",{skip:""!==c&&!(d&&c)}),[p]=(0,a._D)(),g=u.isLoading||m.isLoading||x,C=(0,i.useMemo)(()=>new Map((0,r.k)(u.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}))}]})),[u.data]),j=(0,i.useMemo)(()=>{var e;return null===(e=m.data)||void 0===e?void 0:e.filter(e=>e.active)},[m.data]),_=(0,i.useMemo)(()=>new Map((0,r.k)(j).map(e=>[e.id,e])),[j]),v=(0,i.useMemo)(()=>y&&(null==h?void 0:h.status)===404?new Map:new Map((0,r.k)(f).map(e=>[e.custom_field_definition_id,e])),[f,y,h]),k=(0,i.useMemo)(()=>{let e=[..._.keys()];return e.sort(),e},[_]),S=(0,i.useMemo)(()=>{let e={};return j&&v&&j.forEach(t=>{let s=v.get(t.id||"");s&&(t.allow_list_id&&"string[]"===t.field_type?e[s.custom_field_definition_id]=s.value:e[s.custom_field_definition_id]=s.value.toString())}),e},[j,v]),T=(0,i.useCallback)(async e=>{if(!d)return;let i="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!i)return;let{customFieldValues:n}=e;if(!n||0===Object.keys(n).length)return;let l=[],a=[];k.forEach(e=>{let t=v.get(e),s=n[e];void 0===s||""===s||Array.isArray(s)&&0===s.length?(null==t?void 0:t.id)&&a.push(t.id):l.push({custom_field_definition_id:e,resource_id:i,id:null==t?void 0:t.id,value:s})});try{await p({resource_type:s,resource_id:i,upsert:l,delete:a})}catch(e){o("One or more custom fields have failed to save, please try again."),console.error(e)}},[d,v,o,t,k,p,s]);return{customFieldValues:S,definitionIdToCustomField:v,idToAllowListWithOptions:C,idToCustomFieldDefinition:_,isEnabled:d,isLoading:g,sortedCustomFieldDefinitionIds:k,upsertCustomFields:T}}},95346:function(e,t,s){s.d(t,{uc:function(){return p},Hn:function(){return o},Uv:function(){return a},C7:function(){return d},mZ:function(){return y.m}});var i,n,l,a,r=s(54682);(i=l||(l={}))[i.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",i[i.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",i[i.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",r.AL.STRING,r.AL.STRING,r.AL.STRING_,(n=a||(a={})).SINGLE_SELECT="singleSelect",n.MULTIPLE_SELECT="multipleSelect",n.LOCATION_SELECT="locationSelect",n.OPEN_TEXT="openText";let o=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Location select",value:"locationSelect"},{label:"Open Text",value:"openText"}],d=[{label:"taxonomy:".concat(r.P6.DATA_CATEGORY),value:r.P6.DATA_CATEGORY},{label:"taxonomy:".concat(r.P6.DATA_SUBJECT),value:r.P6.DATA_SUBJECT},{label:"taxonomy:".concat(r.P6.DATA_USE),value:r.P6.DATA_USE},{label:"".concat(r.P6.SYSTEM,":information"),value:r.P6.SYSTEM},{label:"system:data use",value:r.P6.PRIVACY_DECLARATION}];var c=s(24246),u=s(96306),m=s(34090),f=s(30234),x=s(97181),h=s(40324),y=s(30320);let p=e=>{let{resourceFidesKey:t,resourceType:s}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:n,isEnabled:l,isLoading:a,sortedCustomFieldDefinitionIds:o}=(0,y.m)({resourceFidesKey:t,resourceType:s});return l&&0!==o.length?(0,c.jsx)(f.Z,{heading:"Custom fields",children:(0,c.jsx)(u.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(u.kCb,{flexDir:"column",gap:"24px",children:a?(0,c.jsx)(u.M5Y,{children:(0,c.jsx)(u.$jN,{})}):o.length>0&&(0,c.jsx)(u.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:o.map(e=>{let t=n.get(e);if(!t)return null;let s="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===r.AL.STRING)return(0,c.jsx)(m.gN,{name:s,children:e=>{let{field:s}=e;return(0,c.jsx)(h.j0,{...s,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let l=i.get(t.allow_list_id);if(!l)return null;let{options:a}=l;return(0,c.jsx)(x.d,{name:s,allowClear:!0,mode:t.field_type!==r.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};s(94799)},45938:function(e,t,s){s.d(t,{Gt:function(){return m},eB:function(){return f},oI:function(){return u}});var i=s(24246),n=s(34090),l=s(27378),a=s(16134),r=s(38602),o=s(58452);let d=(0,l.createRef)(),c=(0,l.createRef)(),u=()=>{let e=(0,a.T)(),t=(0,a.C)(r.DB),s=(0,l.useCallback)(()=>{c.current=void 0,d.current=void 0},[]),i=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!0),s())},[e,s]),n=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!1),s())},[e,s]);return{attemptAction:(0,l.useCallback)(()=>t?(e((0,r.h7)()),d.current||(d.current=new Promise(e=>{c.current=e})),d.current):Promise.resolve(!0),[t,e]),onConfirm:i,onClose:n}},m=e=>{let{id:t,name:s}=e,{dirty:i}=(0,n.u6)(),o=(0,a.T)();return(0,l.useEffect)(()=>(o((0,r.Zu)({id:t,name:s})),()=>{o((0,r.dz)({id:t}))}),[o,t,s]),(0,l.useEffect)(()=>{o((0,r.$p)({id:t,isDirty:i}))},[i,o,t]),null},f=()=>{let{onConfirm:e,onClose:t}=u(),s=(0,a.C)(r.uv);return(0,i.jsx)(o.Z,{isOpen:s,onClose:t,onConfirm:e,isCentered:!0,title:"Unsaved Changes",message:"You have unsaved changes"})}},84720:function(e,t,s){s.d(t,{q:function(){return j}});var i=s(24246),n=s(96306),l=s(27378),a=s(34090),r=s(812),o=s(45938),d=s(14048),c=s(95492);let u=e=>{let{systems:t,dataFlows:s,onDataFlowSystemChange:l}=e,{setFieldValue:r}=(0,a.u6)(),o=s.map(e=>e.fides_key),d=e=>{let t=s.filter(t=>t.fides_key!==e.fides_key);r("dataFlowSystems",t),l(t)};return(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,i.jsx)(n.hrZ,{children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsx)(n.Th,{})]})}),(0,i.jsx)(n.p3B,{children:t.filter(e=>o.includes(e.fides_key)).map(e=>(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"end",children:(0,i.jsx)(n.wpx,{"aria-label":"Unassign data flow from system",icon:(0,i.jsx)(c.l,{}),onClick:()=>d(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var m=s(26917),f=e=>{let{allSystems:t,dataFlowSystems:s,onChange:l,flowType:r}=e,{setFieldValue:o}=(0,a.u6)(),d=e=>{if(s.find(t=>t.fides_key===e.fides_key)){let t=s.filter(t=>t.fides_key!==e.fides_key);o("dataFlowSystems",t),l(t)}else{let t=[...s,{fides_key:e.fides_key,type:"system"}];o("dataFlowSystems",t),l(t)}};return(0,i.jsx)(n.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,i.jsx)(n.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsxs)(n.Th,{textAlign:"right",children:["Set as ",r]})]})}),(0,i.jsx)(n.p3B,{children:t.map(e=>{let t=!!s.find(t=>t.fides_key===e.fides_key);return(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"right",children:(0,i.jsx)(n.rAg,{checked:t,onChange:()=>d(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let x=(e,t)=>{var s,i;return(null===(s=e.name)||void 0===s?void 0:s.toLocaleLowerCase().includes(t.toLocaleLowerCase()))||(null===(i=e.description)||void 0===i?void 0:i.toLocaleLowerCase().includes(t.toLocaleLowerCase()))};var h=e=>{let{currentSystem:t,systems:s,isOpen:r,onClose:o,dataFlowSystems:d,onDataFlowSystemChange:c,flowType:u}=e,{setFieldValue:h}=(0,a.u6)(),[y,p]=(0,l.useState)(""),[g,C]=(0,l.useState)(d),j=async()=>{c(g),o()},_=0===s.length,v=(0,l.useMemo)(()=>s?s.filter(e=>e.fides_key!==t.fides_key).filter(e=>x(e,y)):[],[s,t.fides_key,y]),k=(0,l.useMemo)(()=>{let e=new Set(g.map(e=>e.fides_key));return v.every(t=>e.has(t.fides_key))},[v,g]);return(0,i.jsxs)(n.u_l,{isOpen:r,onClose:o,size:"2xl",isCentered:!0,children:[(0,i.jsx)(n.ZAr,{}),(0,i.jsxs)(n.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,i.jsxs)(n.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,i.jsxs)(n.xvT,{fontSize:"2xl",lineHeight:8,fontWeight:"semibold",children:["Configure ",u.toLocaleLowerCase()," systems"]}),(0,i.jsxs)(n.j8w,{color:"success",children:["Assigned to ",g.length," systems"]})]}),(0,i.jsx)(n.fef,{"data-testid":"assign-systems-modal-body",children:_?(0,i.jsx)(n.xvT,{children:"No systems found"}):(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Add or remove destination systems from your data map"}),(0,i.jsx)(n.xuv,{children:(0,i.jsxs)(n.NIc,{display:"flex",alignItems:"center",children:[(0,i.jsx)(n.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,i.jsx)(n.rAg,{size:"small",id:"assign-all-systems",checked:k,onChange:e=>{if(e&&s){let e=v.map(e=>({fides_key:e.fides_key,type:"system"}));h("dataFlowSystems",e),C(e)}else C([])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,i.jsx)(m.Z,{value:y,onChange:p,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,i.jsx)(f,{flowType:u,allSystems:v,dataFlowSystems:g,onChange:C})]})}),(0,i.jsxs)(n.mzw,{justifyContent:"flex-start",children:[(0,i.jsx)(n.wpx,{onClick:o,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),!_&&(0,i.jsx)(n.wpx,{type:"primary",onClick:j,"data-testid":"confirm-btn",children:"Confirm"})]})]})]})},y=s(46628),p=s(1315);let g={dataFlowSystems:[]},C=e=>{let{system:t,isIngress:s,isSystemTab:c}=e,m=(0,n.pmc)(),f=s?"Source":"Destination",x="".concat(f,"s"),C=(0,n.qY0)(),[j]=(0,p.qQ)(),{data:_=[]}=(0,p.K3)(),v=(0,l.useMemo)(()=>{let e=s?t.ingress:t.egress;e||(e=[]);let i=_?_.map(e=>e.fides_key):[];return e.filter(e=>i.includes(e.fides_key))},[s,t,_]),[k,S]=(0,l.useState)(v);(0,l.useEffect)(()=>{S(v)},[v]);let T=async(e,i)=>{let{dataFlowSystems:n}=e,{resetForm:l}=i,a={...t,ingress:s?n:t.ingress,egress:s?t.egress:n},o=await j(a);(0,r.D4)(o)?m((0,y.Vo)("Failed to update data flows")):m((0,y.t5)("".concat(x," updated"))),l({values:{dataFlowSystems:n}})};return(0,i.jsxs)(n.Qdk,{children:[(0,i.jsx)(n.KFZ,{height:"68px",paddingLeft:c?6:2,"data-testid":"data-flow-button-".concat(f),children:(0,i.jsxs)(n.kCb,{alignItems:"center",justifyContent:"start",flex:1,textAlign:"left",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"semibold",mr:2,children:x}),(0,i.jsx)(n.Vp9,{ml:2,backgroundColor:"primary.400",borderRadius:"6px",color:"white",children:k.length}),(0,i.jsx)(n.LZC,{}),(0,i.jsx)(n.XEm,{})]})}),(0,i.jsx)(n.Hk3,{backgroundColor:"gray.50",padding:6,"data-testid":"data-flow-panel-".concat(f),children:(0,i.jsx)(n.Kqy,{borderRadius:"md",backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:(0,i.jsx)(a.J9,{initialValues:g,onSubmit:T,children:e=>{let{isSubmitting:s,dirty:l,resetForm:r}=e;return(0,i.jsxs)(a.l0,{children:[(0,i.jsx)(o.Gt,{id:"".concat(t.fides_key,":").concat(f),name:"".concat(f," Data Flow")}),(0,i.jsx)(n.wpx,{onClick:C.onOpen,type:"primary",size:"small",icon:(0,i.jsx)(d.A5,{}),iconPosition:"end",className:"mb-4","data-testid":"assign-systems-btn",children:"Configure ".concat(x.toLocaleLowerCase())}),(0,i.jsx)(u,{systems:_,dataFlows:k,onDataFlowSystemChange:S}),(0,i.jsxs)("div",{className:"mt-6 flex gap-2",children:[(0,i.jsx)(n.wpx,{disabled:!l&&k===v,onClick:()=>{S(v),r({values:{dataFlowSystems:v}})},"data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(n.wpx,{type:"primary",htmlType:"submit",loading:s,disabled:!l&&k===v,"data-testid":"save-btn",children:"Save"})]}),C.isOpen?(0,i.jsx)(h,{currentSystem:t,systems:_,isOpen:C.isOpen,onClose:C.onClose,dataFlowSystems:k,onDataFlowSystemChange:S,flowType:f}):null]})}})})})]})},j=e=>{let{system:t,isSystemTab:s}=e;return(0,i.jsxs)(n.UQy,{allowToggle:!0,"data-testid":"data-flow-accordion",children:[(0,i.jsx)(C,{system:t,isIngress:!0,isSystemTab:s}),(0,i.jsx)(C,{system:t,isSystemTab:s})]})}},30234:function(e,t,s){var i=s(24246),n=s(96306);t.Z=e=>{let{heading:t,HeadingButton:s,children:l}=e;return(0,i.jsx)(n.Kqy,{spacing:4,children:(0,i.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,i.jsxs)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,i.jsx)(n.X6q,{as:"h3",size:"xs",children:t}),s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.LZC,{}),(0,i.jsx)(s,{})]}):null]}),(0,i.jsx)(n.Kqy,{spacing:4,px:6,py:6,children:l})]})})}},52368:function(e,t,s){s.d(t,{f:function(){return o}});var i=s(16134),n=s(30002),l=s(28079),a=s(41966),r=s(57072);let o=e=>{let{includeDatasets:t,includeDisabled:s}=e,{isLoading:o}=(0,r.MO)(),{isLoading:d}=(0,n.te)(),{isLoading:c}=(0,l.fd)(),{isLoading:u}=(0,a.LH)({onlyUnlinkedDatasets:!1,minimal:!0},{skip:!t}),m=(0,i.C)(r.qb),f=(0,i.C)(r.Bd),x=(0,i.C)(n.ZL),h=(0,i.C)(n.H7),y=(0,i.C)(l.U3),p=(0,i.C)(l.jp),g=(0,i.C)(a.Q4);return{allDataCategories:s?m:f,allDataSubjects:s?x:h,allDataUses:s?y:p,allDatasets:t?g:void 0,isLoading:o||d||c||u}}},31883:function(e,t,s){s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}}]);