ethyca-fides 2.57.1b6__py2.py3-none-any.whl → 2.57.1b8__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 (229) hide show
  1. {ethyca_fides-2.57.1b6.dist-info → ethyca_fides-2.57.1b8.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.57.1b6.dist-info → ethyca_fides-2.57.1b8.dist-info}/RECORD +199 -198
  3. fides/_version.py +3 -3
  4. fides/api/api/v1/endpoints/config_endpoints.py +4 -2
  5. fides/api/api/v1/endpoints/generic_overrides.py +43 -6
  6. fides/api/main.py +4 -1
  7. fides/api/models/attachment.py +6 -8
  8. fides/api/models/comment.py +17 -17
  9. fides/api/models/connectionconfig.py +1 -1
  10. fides/api/models/privacy_request/privacy_request.py +61 -0
  11. fides/api/oauth/utils.py +11 -11
  12. fides/api/schemas/dataset.py +22 -2
  13. fides/api/service/privacy_request/request_runner_service.py +8 -4
  14. fides/api/service/storage/s3.py +133 -0
  15. fides/api/service/storage/util.py +10 -0
  16. fides/api/tasks/__init__.py +3 -1
  17. fides/api/tasks/storage.py +12 -111
  18. fides/config/__init__.py +1 -1
  19. fides/ui-build/static/admin/404.html +1 -1
  20. fides/ui-build/static/admin/_next/static/chunks/1376-c177d8d0c60b1166.js +1 -0
  21. fides/ui-build/static/admin/_next/static/chunks/3320-317483e6c10bae51.js +1 -0
  22. fides/ui-build/static/admin/_next/static/chunks/355-6a87b50acf54e985.js +1 -0
  23. fides/ui-build/static/admin/_next/static/chunks/3662-6a0cafa3023aa7a2.js +1 -0
  24. fides/ui-build/static/admin/_next/static/chunks/4723-1a785d558dfb6441.js +1 -0
  25. fides/ui-build/static/admin/_next/static/chunks/605-c782df008a0ff167.js +1 -0
  26. fides/ui-build/static/admin/_next/static/chunks/6362-72451aeb32815d26.js +1 -0
  27. fides/ui-build/static/admin/_next/static/chunks/6954-f7daf613febc36ef.js +1 -0
  28. fides/ui-build/static/admin/_next/static/chunks/7434-3d4a0beb84ec57f7.js +1 -0
  29. fides/ui-build/static/admin/_next/static/chunks/7495-2f5c8dfba2eabb4f.js +1 -0
  30. fides/ui-build/static/admin/_next/static/chunks/7958-d2bc63e1be612f36.js +1 -0
  31. fides/ui-build/static/admin/_next/static/chunks/7980-91800d54c5964ba3.js +1 -0
  32. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-de85703aa2346f42.js → _app-e53d13729068a001.js} +8 -8
  33. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-05ab19822a7e9f80.js → manual-5593bb1b6de0473d.js} +1 -1
  34. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-18b0b521255289a3.js → multiple-6a7208eee5e588fb.js} +1 -1
  35. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a33f82e79cb09478.js +1 -0
  36. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-64f83e9a2b777bf3.js → add-vendors-ba0c5fa9764cbd89.js} +1 -1
  37. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-e11ace4f273ebb47.js → configure-1af99ffa7a507e86.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-443e6dd191ce5588.js → [id]-c02510104f9e503a.js} +1 -1
  39. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-36162d5bea29dcc2.js → new-e96415629f3b4223.js} +1 -1
  40. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-2d651499c07d12d9.js → [id]-66827da90b8a2d1e.js} +1 -1
  41. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-36e57d2f2446be82.js → new-13d48f980bf707e5.js} +1 -1
  42. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-1a3bb713fc7bc298.js +1 -0
  43. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-5892ca5d93ea6165.js +1 -0
  44. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-4fac7e0a54eebc32.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-45016545c099e183.js +1 -0
  46. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-5ddd3cd7d29e89c0.js +1 -0
  47. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-0616437e1a82d3ed.js → [id]-9bb953098f68f1ee.js} +1 -1
  48. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-f8218440494e8532.js → new-cdcf42d4cb24b45a.js} +1 -1
  49. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-108945832a7edd7d.js +1 -0
  50. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-e96e959d10afebea.js +1 -0
  51. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-5a161e167c251519.js +1 -0
  52. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-c3e234ad95e6e213.js +1 -0
  53. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-347e203faa31716f.js +1 -0
  54. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-729fa8ed0f10bc8e.js +1 -0
  55. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-ff6edba56dfec090.js +1 -0
  56. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-ad368857e86fe01b.js +1 -0
  57. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-f45920358a405167.js +1 -0
  58. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-ca753b60ca1745c5.js → [id]-44f7fbfee9cf9267.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/css/dd9922a434d21e22.css +1 -0
  60. fides/ui-build/static/admin/_next/static/lO31cDp9wEzsNdiUnl8It/_buildManifest.js +1 -0
  61. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  62. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  63. fides/ui-build/static/admin/add-systems.html +1 -1
  64. fides/ui-build/static/admin/ant-poc.html +1 -1
  65. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  66. fides/ui-build/static/admin/consent/configure.html +1 -1
  67. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  68. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  69. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  70. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  71. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  72. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  73. fides/ui-build/static/admin/consent/properties.html +1 -1
  74. fides/ui-build/static/admin/consent/reporting.html +1 -1
  75. fides/ui-build/static/admin/consent.html +1 -1
  76. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  77. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  78. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  79. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  80. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  81. fides/ui-build/static/admin/data-catalog.html +1 -1
  82. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  83. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  84. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  85. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  86. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  87. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  88. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  89. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  90. fides/ui-build/static/admin/datamap.html +1 -1
  91. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  92. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  93. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  94. fides/ui-build/static/admin/dataset/new.html +1 -1
  95. fides/ui-build/static/admin/dataset.html +1 -1
  96. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  97. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  98. fides/ui-build/static/admin/datastore-connection.html +1 -1
  99. fides/ui-build/static/admin/index.html +1 -1
  100. fides/ui-build/static/admin/integrations/[id].html +1 -1
  101. fides/ui-build/static/admin/integrations.html +1 -1
  102. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  103. fides/ui-build/static/admin/lib/fides-tcf.js +1 -1
  104. fides/ui-build/static/admin/login/[provider].html +1 -1
  105. fides/ui-build/static/admin/login.html +1 -1
  106. fides/ui-build/static/admin/messaging/[id].html +1 -1
  107. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  108. fides/ui-build/static/admin/messaging.html +1 -1
  109. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  110. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  111. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  112. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  113. fides/ui-build/static/admin/privacy-requests.html +1 -1
  114. fides/ui-build/static/admin/properties/[id].html +1 -1
  115. fides/ui-build/static/admin/properties/add-property.html +1 -1
  116. fides/ui-build/static/admin/properties.html +1 -1
  117. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  118. fides/ui-build/static/admin/settings/about.html +1 -1
  119. fides/ui-build/static/admin/settings/consent.html +1 -1
  120. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  121. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  122. fides/ui-build/static/admin/settings/domains.html +1 -1
  123. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  124. fides/ui-build/static/admin/settings/locations.html +1 -1
  125. fides/ui-build/static/admin/settings/organization.html +1 -1
  126. fides/ui-build/static/admin/settings/regulations.html +1 -1
  127. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  128. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  129. fides/ui-build/static/admin/systems.html +1 -1
  130. fides/ui-build/static/admin/taxonomy.html +1 -1
  131. fides/ui-build/static/admin/user-management/new.html +1 -1
  132. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  133. fides/ui-build/static/admin/user-management.html +1 -1
  134. fides/ui-build/static/admin/_next/static/NgZHwKJoepGB5-XW8xdZo/_buildManifest.js +0 -1
  135. fides/ui-build/static/admin/_next/static/chunks/3215-c8c683b93919e0a5.js +0 -1
  136. fides/ui-build/static/admin/_next/static/chunks/3320-87c75df57a47487e.js +0 -1
  137. fides/ui-build/static/admin/_next/static/chunks/3662-420d9807c30008ab.js +0 -1
  138. fides/ui-build/static/admin/_next/static/chunks/3949-9888699e2ac564c4.js +0 -1
  139. fides/ui-build/static/admin/_next/static/chunks/4723-81d28e5be5c7b6d7.js +0 -1
  140. fides/ui-build/static/admin/_next/static/chunks/5574-a4047e826a8cd4c3.js +0 -1
  141. fides/ui-build/static/admin/_next/static/chunks/5834-bd9ed01c4ab2ef5c.js +0 -1
  142. fides/ui-build/static/admin/_next/static/chunks/5973-3226fe183b48668b.js +0 -1
  143. fides/ui-build/static/admin/_next/static/chunks/6277-cad7c7c8cf48dbec.js +0 -1
  144. fides/ui-build/static/admin/_next/static/chunks/6954-6eb480eb132239c3.js +0 -1
  145. fides/ui-build/static/admin/_next/static/chunks/7044-88111db2aca2cf65.js +0 -1
  146. fides/ui-build/static/admin/_next/static/chunks/7980-2597c279c30fbcda.js +0 -1
  147. fides/ui-build/static/admin/_next/static/chunks/9767-9af77524ed1648c1.js +0 -1
  148. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-136bcbd20ac59bf5.js +0 -1
  149. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-942d68a88b321067.js +0 -1
  150. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-214f8f89b94c3842.js +0 -1
  151. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-08e6d8bd6e91ee73.js +0 -1
  152. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-740824dfa6823e26.js +0 -1
  153. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-5541ecd2f62711a5.js +0 -1
  154. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-a8e08ecb0c6c3a7c.js +0 -1
  155. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-1a6965d78bfb26b0.js +0 -1
  156. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-f263e6bacf0f2d19.js +0 -1
  157. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-b96ee3fea3920fcf.js +0 -1
  158. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-1b0f9469cb65abfc.js +0 -1
  159. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-eebd2f4ead19cfd6.js +0 -1
  160. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-4769f55b138073f7.js +0 -1
  161. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-775f55b3f80cd452.js +0 -1
  162. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-14def4ca3cc9cda5.js +0 -1
  163. fides/ui-build/static/admin/_next/static/css/957d0e4fea846ff0.css +0 -1
  164. {ethyca_fides-2.57.1b6.dist-info → ethyca_fides-2.57.1b8.dist-info}/LICENSE +0 -0
  165. {ethyca_fides-2.57.1b6.dist-info → ethyca_fides-2.57.1b8.dist-info}/WHEEL +0 -0
  166. {ethyca_fides-2.57.1b6.dist-info → ethyca_fides-2.57.1b8.dist-info}/entry_points.txt +0 -0
  167. {ethyca_fides-2.57.1b6.dist-info → ethyca_fides-2.57.1b8.dist-info}/top_level.txt +0 -0
  168. /fides/ui-build/static/admin/_next/static/chunks/{1150-73440d7b319558e8.js → 1150-d4a5eef84e70de22.js} +0 -0
  169. /fides/ui-build/static/admin/_next/static/chunks/{2397-d8161100e3634f2c.js → 2397-c6d0dcb3b921555f.js} +0 -0
  170. /fides/ui-build/static/admin/_next/static/chunks/{3086-be6b52546c3efc90.js → 3086-d099019708303444.js} +0 -0
  171. /fides/ui-build/static/admin/_next/static/chunks/{3855-386aec4f0e0e89f1.js → 3855-4d5d936a58a0dd5f.js} +0 -0
  172. /fides/ui-build/static/admin/_next/static/chunks/{3872-0da2c6a790542bd6.js → 3872-2b2bf5ebd4b0a70f.js} +0 -0
  173. /fides/ui-build/static/admin/_next/static/chunks/{4481-0500c40ed13000c0.js → 4481-f2f57e7a75a90e79.js} +0 -0
  174. /fides/ui-build/static/admin/_next/static/chunks/{5246-9fc6af1a6499e0a4.js → 5246-ac8b0fcb44b00af7.js} +0 -0
  175. /fides/ui-build/static/admin/_next/static/chunks/{5258-3a650be9142cf914.js → 5258-a05dcab2f9315dab.js} +0 -0
  176. /fides/ui-build/static/admin/_next/static/chunks/{5480-f5bec5e881f72f8d.js → 5480-c6c1fb87006e471a.js} +0 -0
  177. /fides/ui-build/static/admin/_next/static/chunks/{5487-d96e1abc93f92631.js → 5487-509639439bf9fb46.js} +0 -0
  178. /fides/ui-build/static/admin/_next/static/chunks/{5826-16e497af363a0cbc.js → 5826-e3970cd9440be33b.js} +0 -0
  179. /fides/ui-build/static/admin/_next/static/chunks/{6315-dee79f6861c94d2d.js → 6315-daf94fa7520fb253.js} +0 -0
  180. /fides/ui-build/static/admin/_next/static/chunks/{6372-f1b54f3cb4888660.js → 6372-41afe1e6a9181cc7.js} +0 -0
  181. /fides/ui-build/static/admin/_next/static/chunks/{6853-2777b5ab5717fada.js → 6853-7f95c36e396d3fb8.js} +0 -0
  182. /fides/ui-build/static/admin/_next/static/chunks/{7751-25e0c1307988ffd7.js → 7751-130668529ab1d0b6.js} +0 -0
  183. /fides/ui-build/static/admin/_next/static/chunks/{79-ba88d0cf4c65aaa2.js → 79-1c326c00cf111c00.js} +0 -0
  184. /fides/ui-build/static/admin/_next/static/chunks/{8433-969280d321d1c3a2.js → 8433-b2a96b825124b596.js} +0 -0
  185. /fides/ui-build/static/admin/_next/static/chunks/{8499-07507004e8275df2.js → 8499-34620330ecf2ac53.js} +0 -0
  186. /fides/ui-build/static/admin/_next/static/chunks/{9046-b18572b89f0aaa92.js → 9046-e7b9a3fd010b01ad.js} +0 -0
  187. /fides/ui-build/static/admin/_next/static/chunks/{9282-1a5a2f6f4d9ed586.js → 9282-6ee061da1eb51d65.js} +0 -0
  188. /fides/ui-build/static/admin/_next/static/chunks/{9999-f2e40d5b13343220.js → 9999-8600f6f495a80b38.js} +0 -0
  189. /fides/ui-build/static/admin/_next/static/chunks/pages/{404-1087258931760074.js → 404-8e0baa6e128803ab.js} +0 -0
  190. /fides/ui-build/static/admin/_next/static/chunks/pages/{ant-poc-b3b4d0a98450ffd1.js → ant-poc-39267961e03be6c5.js} +0 -0
  191. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-8b9f75fc0f131240.js → privacy-experience-ed38f18c095141fe.js} +0 -0
  192. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-da37afbe5ec81339.js → privacy-notices-7339b3cdf5d4da32.js} +0 -0
  193. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-c57b209feef7c2da.js → properties-b5b3196eba90246a.js} +0 -0
  194. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-81ca1ac6f52ec342.js → reporting-38b8ec1a221610ff.js} +0 -0
  195. /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-24bef021ee71e36c.js → consent-df2388d953c85c2a.js} +0 -0
  196. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-6cbd79481199812d.js → [resourceUrn]-5e851b9f27bda8a4.js} +0 -0
  197. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-46b9790da2fec05a.js → [projectUrn]-9f9112b22fdfb32a.js} +0 -0
  198. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-742849f39b646a2f.js → projects-ddca867936c89a72.js} +0 -0
  199. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-e7833c1c606081a9.js → [resourceUrn]-85e3d6f1b2afd3e7.js} +0 -0
  200. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-bed368d048ea6883.js → resources-9831226436d884b5.js} +0 -0
  201. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-25eac2d4008cef3d.js → [monitorId]-5c37c3ad1c3cfba5.js} +0 -0
  202. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-0cfa8a9caf7c75c3.js → activity-a0749240265da17d.js} +0 -0
  203. /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-9cd0c40bef77b120.js → datamap-819ac99e7a56465a.js} +0 -0
  204. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-ab9bc1a3640547db.js → [...subfieldNames]-259d4a94861afe2b.js} +0 -0
  205. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-17ec8385bb1fa6d4.js → [collectionName]-25283f5bcac8fa73.js} +0 -0
  206. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-e14c1c07658f8a10.js → [datasetId]-aaedf8f2a849c97f.js} +0 -0
  207. /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-b8eaa9b9d3832b30.js → datastore-connection-61adfcd5f7f69101.js} +0 -0
  208. /fides/ui-build/static/admin/_next/static/chunks/pages/{index-94e6d589c4edf360.js → index-1072281d6cfe8295.js} +0 -0
  209. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-6b032de0a6c2c400.js → [id]-268918d8c1dfe82a.js} +0 -0
  210. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-c0d6ae68ff7979c6.js → add-template-cd75949bee7497b6.js} +0 -0
  211. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-bbe5854b7d19b7e9.js → [id]-d1f4178b8a7e2145.js} +0 -0
  212. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-4bad69cd42c9722c.js → configure-37e800a20e654064.js} +0 -0
  213. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-b4c808a8a0287d11.js → [id]-92145503c4d2d75e.js} +0 -0
  214. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-5a701477b006a63b.js → add-property-ab94805694ebd35c.js} +0 -0
  215. /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-9a1899dfe052023e.js → properties-5e623dcd92418638.js} +0 -0
  216. /fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-449ad3b08750bfc2.js → datamap-710839776b9995ce.js} +0 -0
  217. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-d073be113e9ca7b0.js → about-175d39bdd74f148c.js} +0 -0
  218. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-ce9305fa04fecbb8.js → custom-fields-1262d596c0cdcd81.js} +0 -0
  219. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-c5cd5fb578de9515.js → domain-records-f0c6e6034d37dbcf.js} +0 -0
  220. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-39c7ae3602ac69b2.js → email-templates-6ee49492a7769f89.js} +0 -0
  221. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-f35bd2d0c10aa58c.js → locations-deb754d42982562b.js} +0 -0
  222. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-ba8c25b63bbf7dc2.js → regulations-f9e97decfe56b018.js} +0 -0
  223. /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-73ef0438c85014bb.js → test-datasets-ae133b6e8e1107f2.js} +0 -0
  224. /fides/ui-build/static/admin/_next/static/chunks/pages/{systems-c320df35d51dc537.js → systems-4d6a17a7a24aca97.js} +0 -0
  225. /fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-181ea5b0ac975239.js → taxonomy-46f47c04a01319cf.js} +0 -0
  226. /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-622e16a17a11c096.js → [id]-5b752ba934baee94.js} +0 -0
  227. /fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-aa872b21bb835d34.js → user-management-4fbb29cf0a611aae.js} +0 -0
  228. /fides/ui-build/static/admin/_next/static/chunks/{webpack-4df2ba5ee2d40f0a.js → webpack-815e3c35038201da.js} +0 -0
  229. /fides/ui-build/static/admin/_next/static/{NgZHwKJoepGB5-XW8xdZo → lO31cDp9wEzsNdiUnl8It}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4154],{58095:function(e,t,s){var n=s(8817);e.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},21796:function(e){e.exports=function(e,t,s){for(var n=-1,i=null==e?0:e.length;++n<i;)if(s(t,e[n]))return!0;return!1}},8817:function(e,t,s){var n=s(95372),i=s(1129),a=s(58263);e.exports=function(e,t,s){return t==t?a(e,t,s):n(e,i,s)}},1129:function(e){e.exports=function(e){return e!=e}},92198:function(e,t,s){var n=s(52485),i=s(58095),a=s(21796),r=s(65581),o=s(47111),l=s(43735);e.exports=function(e,t,s){var d=-1,c=i,u=e.length,m=!0,h=[],p=h;if(s)m=!1,c=a;else if(u>=200){var g=t?null:o(e);if(g)return l(g);m=!1,c=r,p=new n}else p=t?[]:h;e:for(;++d<u;){var v=e[d],y=t?t(v):v;if(v=s||0!==v?v:0,m&&y==y){for(var x=p.length;x--;)if(p[x]===y)continue e;t&&p.push(y),h.push(v)}else c(p,y,s)||(p!==h&&p.push(y),h.push(v))}return h}},47111:function(e,t,s){var n=s(46151),i=s(50344),a=s(43735),r=n&&1/a(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i;e.exports=r},58263:function(e){e.exports=function(e,t,s){for(var n=s-1,i=e.length;++n<i;)if(e[n]===t)return n;return -1}},50344:function(e){e.exports=function(){}},83766:function(e,t,s){var n=s(92198);e.exports=function(e){return e&&e.length?n(e):[]}},25654:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-discovery/action-center/[monitorId]/[systemId]",function(){return s(58955)}])},35287:function(e,t,s){"use strict";var n=s(24246),i=s(56351),a=s(88038),r=s.n(a);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:a}=e;return(0,n.jsxs)(i.kCb,{"data-testid":s,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,n.jsxs)(r(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsx)(i.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...a,children:t})]})}},58754:function(e,t,s){"use strict";var n=s(24246),i=s(56351),a=s(70788);t.Z=e=>{let{heading:t,breadcrumbItems:s,isSticky:r=!0,children:o,rightContent:l,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(i.X6q,{className:s||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!s&&(0,n.jsx)(a.m,{className:o?"pb-4":void 0,items:s,"data-testid":"page-breadcrumb"}),o]})}},79283:function(e,t,s){"use strict";s.d(t,{l:function(){return l}});var n=s(24246),i=s(56351),a=s(72707),r=s.n(a);let o=e=>{let{data:t}=e;return(0,n.jsxs)(i.jqI,{gap:12,title:"".concat(t.primaryName||"").concat(t.primaryName?": ":"").concat(t.name," - ").concat(t.description),children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:t.primaryName||t.name}),t.primaryName&&": ".concat(t.name)]}),(0,n.jsx)("em",{children:t.description})]})},l=e=>{let{options:t,...s}=e,a=null==t?void 0:t.map(e=>({...e,className:r().option}));return(0,n.jsx)(i.WPr,{options:a,autoFocus:!0,variant:"borderless",optionRender:o,dropdownStyle:{minWidth:"500px"},className:"w-full p-0","data-testid":"taxonomy-select",...s})}},97181:function(e,t,s){"use strict";s.d(t,{d:function(){return d}});var n=s(24246),i=s(56351),a=s(34090),r=s(27378),o=s(91613),l=s(40324);let d=e=>{let{name:t,label:s,labelProps:d,tooltip:c,isRequired:u,layout:m="inline",...h}=e,[p,g,{setValue:v}]=(0,a.U$)(t),y=!!(g.touched&&g.error),[x,f]=(0,r.useState)("");p.value||"tags"!==h.mode&&"multiple"!==h.mode||(p.value=[]),"tags"===h.mode&&"string"==typeof p.value&&(p.value=[p.value]);let j="tags"===h.mode?(e,t)=>e?e.value!==x||p.value.includes(x)?h.optionRender?h.optionRender(e,t):e.label:'Create "'.concat(x,'"'):void 0:h.optionRender||void 0,b=e=>{f(e),h.onSearch&&h.onSearch(e)},w=(e,t)=>{v(e),h.onChange&&h.onChange(e,t)};return"inline"===m?(0,n.jsx)(i.NIc,{isInvalid:y,isRequired:u,children:(0,n.jsxs)(i.rjZ,{templateColumns:s?"1fr 3fr":"1fr",children:[s?(0,n.jsx)(l.__,{htmlFor:h.id||t,...d,children:s}):null,(0,n.jsxs)(i.jqI,{align:"center",children:[(0,n.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(i.WPr,{...p,id:h.id||t,"data-testid":"controlled-select-".concat(p.name),...h,optionRender:j,onSearch:"tags"===h.mode?b:void 0,onChange:w,value:p.value||void 0}),(0,n.jsx)(l.Bc,{isInvalid:y,message:g.error,fieldName:p.name})]}),c?(0,n.jsx)(o.Z,{label:c}):null]})]})}):(0,n.jsx)(i.NIc,{isInvalid:y,isRequired:u,children:(0,n.jsxs)(i.gCW,{alignItems:"start",children:[(0,n.jsxs)(i.jqI,{align:"center",children:[s?(0,n.jsx)(l.__,{htmlFor:h.id||t,fontSize:"xs",my:0,mr:1,...d,children:s}):null,c?(0,n.jsx)(o.Z,{label:c}):null]}),(0,n.jsx)(i.WPr,{...p,id:h.id||t,"data-testid":"controlled-select-".concat(p.name),...h,optionRender:j,onSearch:"tags"===h.mode?b:void 0,onChange:w,value:p.value||void 0}),(0,n.jsx)(l.Bc,{isInvalid:y,message:g.error,fieldName:p.name})]})})}},14047:function(e,t,s){"use strict";s.d(t,{H:function(){return a},V:function(){return n.V}});var n=s(84306),i=s(812);let a=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let s="An unexpected error occurred. Please try again.";(0,i.Ot)(t)?s=t.data.detail:(0,i.tB)(t)&&(s=t.data.detail[0].msg),e(s)}}}},84306:function(e,t,s){"use strict";s.d(t,{V:function(){return a}});var n=s(24246),i=s(56351);let a=()=>{let e=(0,i.pmc)();return{errorAlert:(t,s,a)=>{let r={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,n.jsxs)(i.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(i.zMQ,{}),(0,n.jsxs)(i.xuv,{children:[s&&(0,n.jsx)(i.CdC,{children:s}),(0,n.jsx)(i.XaZ,{children:t})]}),(0,n.jsx)(i.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,r):e(r)},successAlert:(t,s,a)=>{let r={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,n.jsxs)(i.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(i.zMQ,{}),(0,n.jsxs)(i.xuv,{children:[s&&(0,n.jsx)(i.CdC,{children:s}),(0,n.jsx)(i.XaZ,{children:t})]}),(0,n.jsx)(i.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,r):e(r)}}}},45938:function(e,t,s){"use strict";s.d(t,{Gt:function(){return m},eB:function(){return h},oI:function(){return u}});var n=s(24246),i=s(34090),a=s(27378),r=s(16134),o=s(38602),l=s(58452);let d=(0,a.createRef)(),c=(0,a.createRef)(),u=()=>{let e=(0,r.T)(),t=(0,r.C)(o.DB),s=(0,a.useCallback)(()=>{c.current=void 0,d.current=void 0},[]),n=(0,a.useCallback)(()=>{e((0,o.Mr)()),c.current&&(c.current(!0),s())},[e,s]),i=(0,a.useCallback)(()=>{e((0,o.Mr)()),c.current&&(c.current(!1),s())},[e,s]);return{attemptAction:(0,a.useCallback)(()=>t?(e((0,o.h7)()),d.current||(d.current=new Promise(e=>{c.current=e})),d.current):Promise.resolve(!0),[t,e]),onConfirm:n,onClose:i}},m=e=>{let{id:t,name:s}=e,{dirty:n}=(0,i.u6)(),l=(0,r.T)();return(0,a.useEffect)(()=>(l((0,o.Zu)({id:t,name:s})),()=>{l((0,o.dz)({id:t}))}),[l,t,s]),(0,a.useEffect)(()=>{l((0,o.$p)({id:t,isDirty:n}))},[n,l,t]),null},h=()=>{let{onConfirm:e,onClose:t}=u(),s=(0,r.C)(o.uv);return(0,n.jsx)(l.Z,{isOpen:s,onClose:t,onConfirm:e,isCentered:!0,title:"Unsaved Changes",message:"You have unsaved changes"})}},8133:function(e,t,s){"use strict";var n=s(24246),i=s(56351);t.Z=e=>{let{title:t,children:s,isOpen:a,onClose:r,...o}=e;return(0,n.jsxs)(i.u_l,{isOpen:a,onClose:r,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...o,children:[(0,n.jsx)(i.ZAr,{}),(0,n.jsxs)(i.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,n.jsx)(i.xBx,{p:0,children:(0,n.jsx)(i.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,n.jsx)(i.X6q,{as:"h3",size:"sm",children:t})})}),(0,n.jsx)(i.fef,{pb:4,overflow:"auto",children:s})]})]})}},70788:function(e,t,s){"use strict";s.d(t,{m:function(){return d}});var n=s(24246),i=s(56351),a=s(79894),r=s.n(a),o=s(27378);let{Text:l}=i.AntTypography,d=e=>{let{items:t,...s}=e,a=(0,o.useMemo)(()=>null==t?void 0:t.map((e,s)=>{let a=s===t.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,children:o.title})),d)?o.title=(0,n.jsx)(i.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,n.jsx)(r(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,n.jsx)(i.zrq,{items:a,...s})}},37059:function(e,t,s){"use strict";s.d(t,{Ak:function(){return h},EY:function(){return c},Ud:function(){return a},Vr:function(){return p},WJ:function(){return o},nP:function(){return d},nS:function(){return u},rs:function(){return l},sX:function(){return m},wi:function(){return r}});var n=s(78780),i=s(16394);let{useGetAggregateMonitorResultsQuery:a,useGetDiscoveredSystemAggregateQuery:r,useGetDiscoveredAssetsQuery:o,useAddMonitorResultSystemsMutation:l,useIgnoreMonitorResultSystemsMutation:d,useAddMonitorResultAssetsMutation:c,useIgnoreMonitorResultAssetsMutation:u,useUpdateAssetsSystemMutation:m,useUpdateAssetsDataUseMutation:h,useUpdateAssetsMutation:p}=n.u.injectEndpoints({endpoints:e=>({getAggregateMonitorResults:e.query({query:e=>{let{page:t=1,size:s=20,search:n}=e;return{url:"/plus/discovery-monitor/aggregate-results",params:{page:t,size:s,search:n,diff_status:"addition"}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredSystemAggregate:e.query({query:e=>{let{key:t,page:s=1,size:n=20,search:i}=e;return{url:"/plus/discovery-monitor/system-aggregate-results",params:{monitor_config_id:t,page:s,size:n,search:i,diff_status:"addition"}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredAssets:e.query({query:e=>{let{key:t,system:s,page:n=1,size:i=20,search:a}=e;return{url:"/plus/discovery-monitor/".concat(t,"/results"),params:{resolved_system_id:s,page:n,size:i,search:a,diff_status:"addition",sort_by:"urn"}}},providesTags:()=>["Discovery Monitor Results"]}),addMonitorResultSystems:e.mutation({query:e=>{let{monitor_config_key:t,resolved_system_ids:s}=e,n=(0,i.du)(s,"resolved_system_ids");return{method:"POST",url:"/plus/discovery-monitor/".concat(t,"/promote?").concat(n)}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultSystems:e.mutation({query:e=>{let{monitor_config_key:t,resolved_system_ids:s}=e,n=(0,i.du)(s,"resolved_system_ids");return{method:"POST",url:"/plus/discovery-monitor/".concat(t,"/mute?").concat(n)}},invalidatesTags:["Discovery Monitor Results"]}),addMonitorResultAssets:e.mutation({query:e=>{var t;let s=new URLSearchParams;return null===(t=e.urnList)||void 0===t||t.forEach(e=>s.append("staged_resource_urns",e)),{method:"POST",url:"/plus/discovery-monitor/promote?".concat(s)}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultAssets:e.mutation({query:e=>{var t;let s=new URLSearchParams;return null===(t=e.urnList)||void 0===t||t.forEach(e=>s.append("staged_resource_urns",e)),{method:"POST",url:"/plus/discovery-monitor/mute?".concat(s)}},invalidatesTags:["Discovery Monitor Results"]}),updateAssetsSystem:e.mutation({query:e=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(e.monitorId,"/results"),body:e.urnList.map(t=>({urn:t,system_key:e.systemKey}))}),invalidatesTags:["Discovery Monitor Results","System Assets"]}),updateAssetsDataUse:e.mutation({query:e=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(e.monitorId,"/results"),body:e.urnList.map(t=>({urn:t,data_uses:e.dataUses}))}),invalidatesTags:["Discovery Monitor Results"]}),updateAssets:e.mutation({query:e=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(e.monitorId,"/results"),body:e.assets}),invalidatesTags:["Discovery Monitor Results"]})})})},78238:function(e,t,s){"use strict";s.d(t,{g:function(){return n}});let n=["essential","functional.service.improve","personalize","analytics","marketing.advertising.first_party.targeted","marketing.advertising.third_party.targeted"];t.Z=e=>n.includes(e)},26183:function(e,t,s){"use strict";var n=s(24246);s(27378),t.Z=e=>{let{children:t,className:s,...i}=e;return(0,n.jsx)("div",{className:"relative flex w-full flex-wrap items-center gap-2 overflow-x-auto py-2 ".concat(s||""),...i,children:t})}},33335:function(e,t,s){"use strict";s.d(t,{E:function(){return n}});let n=e=>e.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9._<>-]/g,"")},36345:function(e,t,s){"use strict";s.d(t,{Z:function(){return v}});var n=s(24246),i=s(56351),a=s(34090),r=s(27378),o=s(16134),l=s(40324);let d=(0,i.IUT)({displayName:"CompassIcon",viewBox:"0 0 512 512",path:(0,n.jsx)("path",{fill:"currentColor",d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm306.7 69.1L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})});var c=s(91613),u=s(57865);let{Text:m}=i.AntTypography,h=e=>{let{searchText:t,suggestion:s,...i}=e;return t&&s?(0,n.jsxs)(m,{"aria-hidden":!0,style:{pointerEvents:"none",position:"absolute",zIndex:10,top:"var(--ant-line-width)",bottom:"var(--ant-line-width)",left:"var(--ant-padding-sm)",lineHeight:"calc(var(--ant-control-height) - var(--ant-line-width))"},...i,children:[(0,n.jsx)(m,{className:"text-transparent",children:t}),(0,n.jsx)(m,{type:"secondary",children:s.substring(t.length)})]}):null},p="Create new system",g=e=>{let{active:t,disabled:s,onRefreshSuggestions:a}=e,r={bg:t?"complimentary.500":"gray.100"};return(0,n.jsxs)(i.gCW,{children:[(0,n.jsx)(i.LZC,{minHeight:"18px"}),(0,n.jsxs)(i.v2r,{children:[(0,n.jsx)(i.j2t,{as:i.hU,size:"sm",isDisabled:s,icon:(0,n.jsx)(d,{color:t?"white":"gray.700",boxSize:4}),"aria-label":"Update information from Compass","data-testid":"refresh-suggestions-btn",_hover:{_disabled:r},...r}),(0,n.jsx)(i.qyq,{children:(0,n.jsx)(i.sNh,{onClick:a,children:(0,n.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,children:"Reset to Compass defaults"})})})]})]})};var v=e=>{var t,s;let{label:d,isCreate:m,lockedForGVL:v,options:y,isLoading:x,onVendorSelected:f}=e,j=(0,o.C)(u.bN),[b,w,{setValue:C}]=(0,a.U$)("name"),_=!!(w.touched&&w.error),S={...b,value:null!==(t=b.value)&&void 0!==t?t:""},{touched:k,values:R,setTouched:I,setFieldValue:A,validateForm:T}=(0,a.u6)(),[N,P]=(0,r.useState)(!0),z=null!==(s=y.find(e=>e.value===S.value))&&void 0!==s?s:{label:S.value,value:S.value,description:""},q=(e,t)=>!!(null==t?void 0:t.label.toLowerCase().startsWith(e.toLowerCase())),[D,Z]=(0,r.useState)(""),M=(0,r.useMemo)(()=>y.filter(e=>q(D,e)),[y,D]),E=(0,r.useMemo)(()=>{let e=y;return m&&D&&(e=[...y,{label:"".concat(p,' "').concat(D,'"...'),value:D}]),e},[m,y,D]),L=!!D&&M.length>0,V=v&&!m;(0,r.useEffect)(()=>{P(!S.value&&!R.vendor_id)},[S.value,R.vendor_id,P]),(0,r.useEffect)(()=>{T()},[N,T]);let W=async()=>{Z(""),A("vendor_id",void 0),await C(""),I({...k,vendor_id:!1,name:!1}),f(void 0)},U=async e=>{if(e){let t=y.some(t=>t.value===e.value)?e.value:void 0;A("vendor_id",t),await C(e.label.startsWith(p)?e.value:e.label),I({...k,vendor_id:!0,name:!0}),f(t)}},B=async e=>{S.onBlur(e),D&&await C(D),I({...k,name:!0})},F=async e=>{M.length>0&&D!==M[0].label?(e.preventDefault(),Z(M[0].label),A("vendor_id",M[0].value),await C(M[0].label),f(M[0].value)):(A("vendor_id",void 0),await C(D)),I({...k,name:!0})},O=(0,n.jsx)(i.NIc,{isInvalid:_,isRequired:!0,width:"100%",children:(0,n.jsxs)(i.gCW,{alignItems:"start",position:"relative",width:"100%",children:[(0,n.jsxs)(i.Ugi,{spacing:1,children:[(0,n.jsx)(l.__,{htmlFor:"vendorName",fontSize:"xs",my:0,mr:1,children:d}),(0,n.jsx)(c.Z,{label:"Enter the system name"})]}),(0,n.jsxs)(i.xuv,{width:"100%",className:"relative",children:[(0,n.jsx)(i.WPr,{id:"vendorName",labelInValue:!0,autoFocus:!0,allowClear:!0,options:E,loading:x,filterOption:(e,t)=>q(e,t)||!!(null==t?void 0:t.label.startsWith(p)),optionFilterProp:"label",value:z,placeholder:"Enter system name...",disabled:V,onChange:U,onSearch:Z,onClear:W,onBlur:B,onInputKeyDown:e=>{D&&"Tab"===e.key&&F(e)},status:_?"error":void 0,"data-testid":"vendor-name-select"}),(0,n.jsx)(h,{searchText:D,suggestion:M.length?M[0].label:""})]}),(0,n.jsx)(l.Bc,{isInvalid:_,message:w.error,fieldName:"name"})]})});return(0,n.jsxs)(i.Ugi,{alignItems:"flex-start",width:"full",children:[N?O:(0,n.jsx)(l.j0,{autoFocus:!0,id:"name",name:"name",label:"System name",tooltip:"Enter the system name",variant:"stacked",disabled:V,isRequired:!0,inputRightElement:V?null:(0,n.jsx)(i.PZ7,{onClick:W,size:"sm","data-testid":"clear-btn"})}),(0,n.jsx)(g,{active:!!R.vendor_id||L,disabled:!R.vendor_id||"showing"===j,onRefreshSuggestions:()=>f(R.vendor_id)})]})}},58955:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ea}});var n=s(24246),i=s(86677),a=s(27378),r=s(35287),o=s(77830),l=s(58754),d=s(59003),c=s(92222),u=s(56351),m=s(83766),h=s.n(m),p=s(812),g=s(14047),v=s(14481),y=s(37059),x=s(8133),f=s(79283),j=s(34929),b=s(78238),w=e=>{let{selectedTaxonomies:t,...s}=e,{getDataUseDisplayNameProps:i,getDataUses:a}=(0,j.Z)(),r=a().filter(e=>e.active&&b.g.includes(e.fides_key)).filter(e=>!t.includes(e.fides_key)).map(e=>{let{name:t,primaryName:s}=i(e.fides_key);return{value:e.fides_key,name:t,primaryName:s,description:e.description||""}});return(0,n.jsx)(f.l,{options:r,...s})};let{Text:C}=u.AntTypography;var _=e=>{let{onSave:t,isSaving:s,onClose:i,...r}=e,[o,l]=(0,a.useState)([]),d=()=>{l([]),i()};return(0,n.jsxs)(x.Z,{title:"Add consent category",...r,onClose:d,children:[(0,n.jsxs)(u.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,n.jsx)(C,{children:"Assign consent categories to selected assets. This configures the system for consent management. Consent categories apply to both individual assets and the system."}),(0,n.jsx)(w,{mode:"tags",selectedTaxonomies:o,onSelect:(e,t)=>l([...o,t.value]),variant:"outlined"})]}),(0,n.jsxs)(u.jqI,{justify:"space-between",children:[(0,n.jsx)(u.wpx,{htmlType:"reset",onClick:d,"data-testid":"cancel-btn",children:"Cancel"}),(0,n.jsx)(u.wpx,{htmlType:"submit",type:"primary",disabled:!o.length,loading:s,onClick:()=>t(o),"data-testid":"save-btn",children:"Save"})]})]})},S=s(57454),k=s(65450);let R=e=>{let{children:t,className:s,style:i,...a}=e;return(0,n.jsx)(u.wpx,{...a,type:"text",className:"w-full justify-start ".concat(s),style:{fontWeight:600,padding:"var(--ant-select-option-padding)",backgroundColor:"var(--ant-select-option-selected-bg)",...i},children:t})};var I=s(16394);let A=(e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(R,{onClick:t,"data-testid":"add-new-system",id:"add-new-system",children:"Add new system +"}),e]}),T=e=>{var t;let{onAddSystem:s,...i}=e,[r,o]=(0,a.useState)(),{data:l,isFetching:d}=(0,k.xF)({page:1,size:25,search:r||void 0}),c=null==l?void 0:null===(t=l.items)||void 0===t?void 0:t.map(e=>({value:e.fides_key,label:e.name})),m=(0,a.useCallback)(e=>{(null==e?void 0:e.length)>1&&o(e),(null==e?void 0:e.length)===0&&o(void 0)},[o]),h=(0,a.useMemo)(()=>(0,I.Ds)(m,300),[m]);return(0,n.jsx)(u.WPr,{placeholder:"Search...","aria-label":"Search for a system to select",dropdownStyle:{minWidth:"500px"},dropdownRender:s?e=>A(e,s):void 0,"data-testid":"system-select",...i,filterOption:!1,options:c,onSearch:h,loading:i.loading||d})};var N=s(34090),P=s(59389),z=s(16134),q=s(25980),D=s(97181),Z=s(40324),M=s(45938),E=s(33335),L=s(32885),V=s(57865),W=s(93237),U=s(36345);let{Text:B}=u.AntTypography,F={name:"",vendor_id:void 0,description:"",tags:[]},O=e=>{let{onSuccessfulSubmit:t,toastOnSuccess:s,...i}=e,[r,o]=(0,a.useState)(!1),l=(0,z.T)(),{tcf:d,dictionaryService:c}=(0,q.hz)(),{isLoading:m}=(0,L.Rd)(void 0,{skip:!c}),h=(0,z.C)(L.o),v=(0,z.C)(V.gU),[y]=(0,k.in)(),[f]=(0,L.Qk)(),[j]=(0,k.f7)(),{successAlert:b,errorAlert:w}=(0,g.V)(),{setSuggestions:C,setLockedForGVL:_}=V.dictSuggestionsSlice.actions,S=(0,a.useRef)(null),R=(0,a.useMemo)(()=>P.Ry().shape({name:P.Z_().required().label("System name").test("is-unique","",async(e,t)=>{let{data:s}=await y({page:1,size:10,search:e});return!((null==s?void 0:s.items)||[]).filter(t=>t.name===e).some(t=>t.name===e)||t.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})})}),[y]),I=e=>{if(c){if(!e){l(C("hiding")),l(_(!1));return}l(C("showing")),d&&(0,p.cj)(e)===p.c6.GVL?l(_(!0)):l(_(!1))}},A=()=>{i.onClose(),l(C("initial")),l(_(!1))},T=async e=>{if(o(!0),e.vendor_id){let n=await f([e.vendor_id]);if((0,p.D4)(n))w((0,p.e$)(n.error));else{let{data:e}=n,i=e.systems[0];null==t||t(i.fides_key,i.name),s&&b("".concat(e.name," has been added to your system inventory."))}}else{let n={...e,fides_key:(0,E.E)(e.name),system_type:"",body:"",privacy_declarations:[]},i=await j(n);if((0,p.D4)(i))w((0,p.e$)(i.error));else{let{fides_key:n,name:a}=i.data;null==t||t(n,a),s&&b("".concat(e.name," has been added to your system inventory."))}A()}o(!1)};return(0,n.jsx)(x.Z,{title:"Add New System",...i,onClose:A,children:(0,n.jsx)(N.J9,{initialValues:F,onSubmit:T,validationSchema:R,innerRef:S,children:e=>{let{dirty:t,isValid:s}=e;return(0,n.jsxs)(N.l0,{children:[(0,n.jsx)(M.Gt,{id:"new-system-modal",name:"Add New System"}),(0,n.jsxs)(u.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,n.jsx)(B,{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."}),c?(0,n.jsx)(U.Z,{label:"System name",options:h,onVendorSelected:I,isCreate:!0,lockedForGVL:v,isLoading:m}):(0,n.jsx)(Z.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,n.jsx)(W.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:v}),(0,n.jsx)(D.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:v})]}),(0,n.jsxs)(u.jqI,{justify:"space-between",children:[(0,n.jsx)(u.wpx,{htmlType:"reset",onClick:A,disabled:m||!t||!s,"data-testid":"cancel-btn",children:"Cancel"}),(0,n.jsx)(u.wpx,{htmlType:"submit",type:"primary",disabled:m||!t||!s,loading:r,"data-testid":"save-btn",children:"Save"})]})]})}})})},{Text:$}=u.AntTypography,H=e=>{let{onSave:t,isSaving:s,...i}=e,[r,o]=(0,a.useState)(),[l,d]=(0,a.useState)(!1),c=(0,a.useCallback)(e=>{e.preventDefault(),d(!0)},[]),m=()=>{d(!1)},h=()=>{o(void 0),i.onClose()};return(0,n.jsxs)(x.Z,{title:"Assign system",...i,onClose:h,children:[(0,n.jsxs)(u.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,n.jsx)($,{children:"Assign a system to the selected assets. If no system exists, select 'Add new system' to create one."}),(0,n.jsx)(T,{placeholder:"Search or select...",onSelect:(e,t)=>{o(t)},onAddSystem:c,value:r})]})," ",(0,n.jsxs)(u.jqI,{justify:"space-between",children:[(0,n.jsx)(u.wpx,{htmlType:"reset",onClick:h,"data-testid":"cancel-btn",children:"Cancel"}),(0,n.jsx)(u.wpx,{htmlType:"submit",type:"primary",disabled:!r,loading:s,onClick:()=>{t(r)},"data-testid":"save-btn",children:"Save"})]}),l&&(0,n.jsx)(O,{isOpen:!0,onClose:m,onSuccessfulSubmit:(e,t)=>{m(),o({label:t,value:e})},toastOnSuccess:!0})]})};var G=s(8411),X=s(72625);let J=e=>{let{asset:t}=e,[s,{isLoading:i}]=(0,y.EY)(),[a,{isLoading:r}]=(0,y.nS)(),{successAlert:o,errorAlert:l}=(0,g.V)(),d=i||r,{urn:c,name:m,resource_type:h}=t,v=async()=>{let e=await s({urnList:[c]});(0,p.D4)(e)?l((0,p.e$)(e.error)):o("".concat(h,' "').concat(m,'" has been added to the system inventory.'),"Confirmed")},x=async()=>{let e=await a({urnList:[c]});(0,p.D4)(e)?l((0,p.e$)(e.error)):o("".concat(h,' "').concat(m,'" has been ignored and will not appear in future scans.'),"Ignored")};return(0,n.jsxs)(u.vyj,{children:[(0,n.jsx)(u.esZ,{title:t.system?void 0:"This asset requires a system before you can add it to the inventory.",children:(0,n.jsx)(u.wpx,{"data-testid":"add-btn",size:"small",onClick:v,disabled:!t.system||d,loading:i,children:"Add"})}),(0,n.jsx)(u.wpx,{"data-testid":"ignore-btn",size:"small",onClick:x,disabled:d,loading:r,children:"Ignore"})]})};var K=s(26183),Y=s(31883),Q=e=>{var t;let{asset:s}=e,[i,r]=(0,a.useState)(!1),[o]=(0,y.Ak)(),{successAlert:l,errorAlert:d}=(0,g.V)(),{getDataUseDisplayName:c}=(0,j.Z)(),m=async e=>{let t=s.data_uses||[],n=await o({monitorId:s.monitor_config_id,urnList:[s.urn],dataUses:[...t,e]});(0,Y.D4)(n)?d((0,p.e$)(n.error)):l("Consent category added to ".concat(s.resource_type,' "').concat(s.name,'" .'),"Confirmed"),r(!1)},h=async e=>{let t=s.data_uses||[],n=await o({monitorId:s.monitor_config_id,urnList:[s.urn],dataUses:t.filter(t=>t!==e)});(0,Y.D4)(n)?d((0,p.e$)(n.error)):l("Consent category removed from ".concat(s.resource_type,' "').concat(s.name,'".'),"Confirmed")},v=null===(t=s.data_uses)||void 0===t?void 0:t.filter(e=>(0,b.Z)(e));return(0,n.jsxs)(K.Z,{children:[!i&&(0,n.jsxs)(n.Fragment,{children:[null==v?void 0:v.map(e=>(0,n.jsx)(u.j8w,{"data-testid":"data-use-".concat(e),color:"white",closable:!0,onClose:()=>h(e),closeButtonLabel:"Remove data use",children:c(e)},e)),(0,n.jsx)(u.j8w,{onClick:()=>r(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),i&&(0,n.jsx)(u.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,n.jsx)(w,{selectedTaxonomies:v||[],onSelect:m,onBlur:()=>r(!1),open:!0})})]})},ee=s(43862),et=s(70675);let es=e=>{let{aggregateSystem:t,monitorConfigId:s}=e,{resource_type:i,name:r,urn:o,system:l,user_assigned_system_key:d,system_key:c}=t,[m,h]=(0,a.useState)(!1),[v,y]=(0,a.useState)(!1),[x,{isLoading:f}]=(0,et.NA)(),{successAlert:j,errorAlert:b}=(0,g.V)(),w=(0,a.useCallback)(e=>{e.preventDefault(),y(!0)},[]),C=async(e,t,n)=>{let a=await x({staged_resource_urn:o,monitor_config_id:s,user_assigned_system_key:e});(0,p.D4)(a)?b((0,p.e$)(a.error)):j(n?"".concat(t," has been added to your system inventory and the ").concat(i,' "').concat(r,'" has been assigned to that system.'):"".concat(i,' "').concat(r,'" has been assigned to ').concat(t,"."),"Confirmed"),h(!1)};return(0,n.jsxs)(n.Fragment,{children:[!m&&(0,n.jsx)("div",{style:(0,ee.J9)(),children:l?(0,n.jsxs)(u.j8w,{onClick:()=>h(!0),"data-testid":"system-badge",children:[l,(0,n.jsx)(u.PJP.I8b,{})]}):(0,n.jsx)(u.j8w,{onClick:()=>h(!0),"data-testid":"add-system-btn",addable:!0})}),!!m&&(0,n.jsx)(T,{variant:"borderless",className:"w-full",autoFocus:!0,defaultOpen:!0,defaultValue:d||c,onBlur:e=>{var t;(null===(t=e.relatedTarget)||void 0===t?void 0:t.getAttribute("id"))!=="add-new-system"&&h(!1)},onAddSystem:w,onSelect:(e,t)=>C(e,t.label),loading:f}),v&&(0,n.jsx)(O,{isOpen:!0,onClose:()=>{y(!1)},onSuccessfulSubmit:(e,t)=>C(e,t,!0)})]})},en=()=>{let e=(0,c.Cl)();return{columns:[e.display({id:"select",cell:e=>{let{row:t}=e;return(0,n.jsx)(v.k,{isChecked:t.getIsSelected(),onChange:t.getToggleSelectedHandler(),dataTestId:"select-".concat(t.original.name||t.id)})},header:e=>{let{table:t}=e;return(0,n.jsx)(v.k,{isChecked:t.getIsAllPageRowsSelected(),isIndeterminate:t.getIsSomeRowsSelected(),onChange:t.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40}),e.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(v.G3,{value:e.getValue()}),header:"Asset",size:300}),e.accessor(e=>e.resource_type,{id:"resource_type",cell:e=>(0,n.jsx)(v.G3,{value:e.getValue()}),header:"Type"}),e.accessor(e=>e.system,{id:"system",cell:e=>!!e.row.original.monitor_config_id&&(0,n.jsx)(es,{aggregateSystem:e.row.original,monitorConfigId:e.row.original.monitor_config_id}),header:"System",size:200,meta:{noPadding:!0}}),e.display({id:"data_use",cell:e=>(0,n.jsx)(Q,{asset:e.row.original}),header:"Categories of consent",size:400,meta:{disableRowClick:!0}}),e.accessor(e=>e.locations,{id:"locations",cell:e=>(0,n.jsx)(v.G3,{value:e.getValue().length>1?"".concat(e.getValue().length," locations"):G.Z8[e.getValue()[0]]}),header:"Locations"}),e.accessor(e=>e.domain,{id:"domain",cell:e=>(0,n.jsx)(v.G3,{value:e.getValue()}),header:"Domain"}),e.accessor(e=>e.page,{id:"page",cell:e=>(0,n.jsx)(X.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,n.jsx)(X.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),e.display({id:"actions",cell:e=>(0,n.jsx)(J,{asset:e.row.original}),header:"Actions",meta:{disableRowClick:!0}})]}},ei=e=>{let{monitorId:t,systemId:s,onSystemName:r}=e,l=(0,i.useRouter)(),[m,x]=(0,a.useState)(s),[f,j]=(0,a.useState)({}),[b,w]=(0,a.useState)(!1),[C,k]=(0,a.useState)(!1),[R,{isLoading:I}]=(0,y.EY)(),[A,{isLoading:T}]=(0,y.nS)(),[N,{isLoading:P}]=(0,y.rs)(),[z,{isLoading:q}]=(0,y.sX)(),[D,{isLoading:Z}]=(0,y.Vr)(),M=I||T||P||q,E=M||s===o.Kl,{PAGE_SIZES:L,pageSize:V,setPageSize:W,onPreviousPageClick:U,isPreviousPageDisabled:B,onNextPageClick:F,isNextPageDisabled:O,startRange:$,endRange:G,pageIndex:X,setTotalPages:J,resetPageIndexToDefault:K}=(0,v.oi)(),[Y,Q]=(0,a.useState)(""),{successAlert:ee,errorAlert:et}=(0,g.V)();(0,a.useEffect)(()=>{K()},[t,Y,K]);let{data:es,isLoading:ei,isFetching:ea}=(0,y.WJ)({key:t,system:s,page:X,size:V,search:Y});(0,a.useEffect)(()=>{if(es){var e;let t=(null===(e=es.items[0])||void 0===e?void 0:e.system)||s||"";J(es.pages||1),x(t),null==r||r(t)}},[es,s,r,J]);let{columns:er}=en(),eo=(0,d.b7)({getCoreRowModel:(0,c.sC)(),columns:er,manualPagination:!0,data:(null==es?void 0:es.items)||[],columnResizeMode:"onChange",onRowSelectionChange:j,state:{rowSelection:f}}),el=eo.getSelectedRowModel().rows.map(e=>e.original.urn),ed=async()=>{let e=await R({urnList:el});(0,p.D4)(e)?et((0,p.e$)(e.error)):(eo.resetRowSelection(),ee("".concat(el.length," assets from ").concat(m," have been added to the system inventory."),"Confirmed"))},ec=async e=>{if("string"==typeof(null==e?void 0:e.value)){let s=await z({monitorId:t,urnList:el,systemKey:e.value});(0,p.D4)(s)?et((0,p.e$)(s.error)):(eo.resetRowSelection(),ee("".concat(el.length," assets have been assigned to ").concat(e.label,"."),"Confirmed"))}w(!1)},eu=async e=>{let s=null==es?void 0:es.items.filter(e=>el.includes(e.urn));if(!s)return;let n=s.map(t=>{let s=h()([...t.data_uses||[],...e]);return{urn:t.urn,data_uses:s}}),i=await D({monitorId:t,assets:n});(0,p.D4)(i)?et((0,p.e$)(i.error)):(eo.resetRowSelection(),ee("Consent categories added to ".concat(el.length," assets from ").concat(m,"."),"Confirmed"))},em=async()=>{let e=await A({urnList:el});(0,p.D4)(e)?et((0,p.e$)(e.error)):(eo.resetRowSelection(),ee("".concat(el.length," assets from ").concat(m," have been ignored and will not appear in future scans."),"Confirmed"))},eh=async()=>{let e=(null==es?void 0:es.items.length)||0,n=await N({monitor_config_key:t,resolved_system_ids:[s]});(0,p.D4)(n)?et((0,p.e$)(n.error)):(l.push("".concat(o.vi,"/").concat(t)),ee("".concat(e," assets from ").concat(m," have been added to the system inventory."),"Confirmed"))};return t&&s?ei?(0,n.jsx)(v.I4,{rowHeight:36,numRows:36}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(v.Q$,{children:[(0,n.jsx)(S.M,{value:Y,onChange:Q}),(0,n.jsxs)(u.kCb,{alignItems:"center",children:[!!el.length&&(0,n.jsx)(u.xvT,{fontSize:"xs",fontWeight:"semibold",minW:16,mr:6,"data-testid":"selected-count",children:"".concat(el.length," selected")}),(0,n.jsxs)(u.Ugi,{children:[(0,n.jsxs)(u.v2r,{children:[(0,n.jsx)(u.j2t,{as:u.wpx,icon:(0,n.jsx)(u.PJP._ME,{}),iconPosition:"end",loading:M,"data-testid":"bulk-actions-menu",disabled:!el.length||M,type:"primary",children:"Actions"}),(0,n.jsxs)(u.qyq,{children:[(0,n.jsx)(u.sNh,{fontSize:"small",onClick:ed,"data-testid":"bulk-add",children:"Add"}),(0,n.jsx)(u.sNh,{fontSize:"small",onClick:()=>k(!0),"data-testid":"bulk-add-data-use",children:"Add consent category"}),(0,n.jsx)(u.sNh,{fontSize:"small",onClick:()=>{w(!0)},"data-testid":"bulk-assign-system",children:"Assign system"}),(0,n.jsx)(u.RaW,{}),(0,n.jsx)(u.sNh,{fontSize:"small",onClick:em,"data-testid":"bulk-ignore",children:"Ignore"})]})]}),(0,n.jsx)(u.esZ,{title:E?"These assets require a system before you can add them to the inventory.":void 0,children:(0,n.jsx)(u.wpx,{onClick:eh,disabled:E,loading:P,type:"primary",icon:(0,n.jsx)(u.PJP.MCw,{}),iconPosition:"end","data-testid":"add-all",children:"Add all"})})]})]})]}),(0,n.jsx)(v.ZK,{tableInstance:eo,emptyTableNotice:(0,n.jsx)(u.oj8,{image:u.oj8.PRESENTED_IMAGE_SIMPLE,description:"All caught up!"})}),(0,n.jsx)(v.s8,{totalRows:(null==es?void 0:es.total)||0,pageSizes:L,setPageSize:W,onPreviousPageClick:U,isPreviousPageDisabled:B||ea,onNextPageClick:F,isNextPageDisabled:O||ea,startRange:$,endRange:G}),(0,n.jsx)(H,{isOpen:b,onClose:()=>{w(!1)},onSave:ec,isSaving:q}),(0,n.jsx)(_,{isOpen:C,onClose:()=>{k(!1)},onSave:eu,isSaving:Z})]}):null};var ea=()=>{let e=(0,i.useRouter)(),t=decodeURIComponent(e.query.monitorId),s=decodeURIComponent(e.query.systemId),[d,c]=(0,a.useState)(s===o.Kl?"Uncategorized assets":s);return(0,n.jsxs)(r.Z,{title:"Action center - Discovered assets",children:[(0,n.jsx)(l.Z,{heading:"Action center",breadcrumbItems:[{title:"All activity",href:o.vi},{title:t,href:"".concat(o.vi,"/").concat(t)},{title:s===o.Kl?"Uncategorized assets":d}]}),(0,n.jsx)(ei,{monitorId:t,systemId:s,onSystemName:c})]})}},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=s(19043)},72707:function(e){e.exports={option:"TaxonomySelect_option__vY6v2"}}},function(e){e.O(0,[8033,2780,2858,2866,9278,4481,3215,2888,9774,179],function(){return e(e.s=25654)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8443],{74833:function(t,e,r){var n=r(56127),i=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(i,""):t}},56127:function(t){var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},66726:function(t,e,r){var n=r(11611),i=r(82846),s=r(91936),o=Math.max,a=Math.min;t.exports=function(t,e,r){var c,l,u,d,m,p,f=0,v=!1,g=!1,y=!0;if("function"!=typeof t)throw TypeError("Expected a function");function h(e){var r=c,n=l;return c=l=void 0,f=e,d=t.apply(n,r)}function x(t){var r=t-p,n=t-f;return void 0===p||r>=e||r<0||g&&n>=u}function j(){var t,r,n,s=i();if(x(s))return b(s);m=setTimeout(j,(t=s-p,r=s-f,n=e-t,g?a(n,u-r):n))}function b(t){return(m=void 0,y&&c)?h(t):(c=l=void 0,d)}function _(){var t,r=i(),n=x(r);if(c=arguments,l=this,p=r,n){if(void 0===m)return f=t=p,m=setTimeout(j,e),v?h(t):d;if(g)return clearTimeout(m),m=setTimeout(j,e),h(p)}return void 0===m&&(m=setTimeout(j,e)),d}return e=s(e)||0,n(r)&&(v=!!r.leading,u=(g="maxWait"in r)?o(s(r.maxWait)||0,e):u,y="trailing"in r?!!r.trailing:y),_.cancel=function(){void 0!==m&&clearTimeout(m),f=0,c=p=l=m=void 0},_.flush=function(){return void 0===m?d:b(i())},_}},11611:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},55193:function(t,e,r){var n=r(99736),i=r(92360);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==n(t)}},82846:function(t,e,r){var n=r(77400);t.exports=function(){return n.Date.now()}},91936:function(t,e,r){var n=r(74833),i=r(11611),s=r(55193),o=0/0,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(s(t))return o;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var r=c.test(t);return r||l.test(t)?u(t.slice(2),r?2:8):a.test(t)?o:+t}},40741:function(t,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-discovery/action-center",function(){return r(51500)}])},77213:function(t,e,r){"use strict";r.d(e,{Z:function(){return m}});var n=r(24246),i=r(56351),s=r(88038),o=r.n(s),a=r(86677);r(27378);var c=r(25980),l=r(90867),u=r(77830),d=()=>{let t=(0,a.useRouter)();return(0,n.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(i.xuv,{children:[(0,n.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(i.wpx,{onClick:()=>{t.push(u.fz)},children:"Configure"})]}),(0,n.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=t=>{let{children:e,title:r,padded:s=!0,mainProps:u}=t,m=(0,c.hz)(),p=(0,a.useRouter)(),f="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,v=!(m.flags.privacyRequestsConfiguration&&f),{data:g}=(0,l.JE)(void 0,{skip:v}),{data:y}=(0,l.PW)(void 0,{skip:v}),h=m.flags.privacyRequestsConfiguration&&(!g||!y)&&f;return(0,n.jsxs)(i.kCb,{"data-testid":r,direction:"column",h:"100vh",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",r]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(i.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[h?(0,n.jsx)(d,{}):null,e]})]})}},58754:function(t,e,r){"use strict";var n=r(24246),i=r(56351),s=r(70788);e.Z=t=>{let{heading:e,breadcrumbItems:r,isSticky:o=!0,children:a,rightContent:c,style:l,...u}=t;return(0,n.jsxs)("div",{...u,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...l}:{paddingBottom:"24px",...l},children:[(0,n.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof e?(0,n.jsx)(i.X6q,{className:r||a?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:e}):e,c&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:c})]}),!!r&&(0,n.jsx)(s.m,{className:a?"pb-4":void 0,items:r,"data-testid":"page-breadcrumb"}),a]})}},70788:function(t,e,r){"use strict";r.d(e,{m:function(){return l}});var n=r(24246),i=r(56351),s=r(79894),o=r.n(s),a=r(27378);let{Text:c}=i.AntTypography,l=t=>{let{items:e,...r}=t,s=(0,a.useMemo)(()=>null==e?void 0:e.map((t,r)=>{let s=r===e.length-1,a={...t},l=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,n.jsx)(c,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:a.title})),l)?a.title=(0,n.jsx)(i.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,n.jsx)(o(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[e]);return(0,n.jsx)(i.zrq,{items:s,...r})}},57454:function(t,e,r){"use strict";r.d(e,{M:function(){return c}});var n=r(24246),i=r(66726),s=r.n(i),o=r(27378),a=r(86780);let c=t=>{let{value:e,onChange:r}=t,[i,c]=(0,o.useState)(e),l=s()(r,500),u=(0,o.useCallback)(t=>{c(t),l(t)},[]);return(0,n.jsx)(a.Z,{search:i,onChange:u,onClear:()=>{c(""),r("")}})}},37059:function(t,e,r){"use strict";r.d(e,{Ak:function(){return p},EY:function(){return u},Ud:function(){return s},Vr:function(){return f},WJ:function(){return a},nP:function(){return l},nS:function(){return d},rs:function(){return c},sX:function(){return m},wi:function(){return o}});var n=r(78780),i=r(16394);let{useGetAggregateMonitorResultsQuery:s,useGetDiscoveredSystemAggregateQuery:o,useGetDiscoveredAssetsQuery:a,useAddMonitorResultSystemsMutation:c,useIgnoreMonitorResultSystemsMutation:l,useAddMonitorResultAssetsMutation:u,useIgnoreMonitorResultAssetsMutation:d,useUpdateAssetsSystemMutation:m,useUpdateAssetsDataUseMutation:p,useUpdateAssetsMutation:f}=n.u.injectEndpoints({endpoints:t=>({getAggregateMonitorResults:t.query({query:t=>{let{page:e=1,size:r=20,search:n}=t;return{url:"/plus/discovery-monitor/aggregate-results",params:{page:e,size:r,search:n,diff_status:"addition"}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredSystemAggregate:t.query({query:t=>{let{key:e,page:r=1,size:n=20,search:i}=t;return{url:"/plus/discovery-monitor/system-aggregate-results",params:{monitor_config_id:e,page:r,size:n,search:i,diff_status:"addition"}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredAssets:t.query({query:t=>{let{key:e,system:r,page:n=1,size:i=20,search:s}=t;return{url:"/plus/discovery-monitor/".concat(e,"/results"),params:{resolved_system_id:r,page:n,size:i,search:s,diff_status:"addition",sort_by:"urn"}}},providesTags:()=>["Discovery Monitor Results"]}),addMonitorResultSystems:t.mutation({query:t=>{let{monitor_config_key:e,resolved_system_ids:r}=t,n=(0,i.du)(r,"resolved_system_ids");return{method:"POST",url:"/plus/discovery-monitor/".concat(e,"/promote?").concat(n)}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultSystems:t.mutation({query:t=>{let{monitor_config_key:e,resolved_system_ids:r}=t,n=(0,i.du)(r,"resolved_system_ids");return{method:"POST",url:"/plus/discovery-monitor/".concat(e,"/mute?").concat(n)}},invalidatesTags:["Discovery Monitor Results"]}),addMonitorResultAssets:t.mutation({query:t=>{var e;let r=new URLSearchParams;return null===(e=t.urnList)||void 0===e||e.forEach(t=>r.append("staged_resource_urns",t)),{method:"POST",url:"/plus/discovery-monitor/promote?".concat(r)}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultAssets:t.mutation({query:t=>{var e;let r=new URLSearchParams;return null===(e=t.urnList)||void 0===e||e.forEach(t=>r.append("staged_resource_urns",t)),{method:"POST",url:"/plus/discovery-monitor/mute?".concat(r)}},invalidatesTags:["Discovery Monitor Results"]}),updateAssetsSystem:t.mutation({query:t=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(t.monitorId,"/results"),body:t.urnList.map(e=>({urn:e,system_key:t.systemKey}))}),invalidatesTags:["Discovery Monitor Results","System Assets"]}),updateAssetsDataUse:t.mutation({query:t=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(t.monitorId,"/results"),body:t.urnList.map(e=>({urn:e,data_uses:t.dataUses}))}),invalidatesTags:["Discovery Monitor Results"]}),updateAssets:t.mutation({query:t=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(t.monitorId,"/results"),body:t.assets}),invalidatesTags:["Discovery Monitor Results"]})})})},51500:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return b}});var n=r(24246),i=r(56351),s=r(79894),o=r.n(s),a=r(27378),c=r(77213),l=r(77830),u=r(58754),d=r(14481),m=r(37059);let p=t=>{let{isConfigLoading:e}=t;return(0,n.jsx)(c.Z,{title:"Action center",mainProps:{className:"h-full"},children:(0,n.jsx)(i.jqI,{justify:"center",align:"center",className:"h-full",children:e?(0,n.jsx)(i.$jN,{color:"primary.900"}):(0,n.jsx)(i.DUx,{message:"Coming soon...",description:"Action center is currently disabled.",type:"info",showIcon:!0})})})},f=()=>(0,n.jsx)(i.oj8,{image:i.oj8.PRESENTED_IMAGE_SIMPLE,description:"All caught up! Set up an integration monitor to track your infrastructure in greater detail.",children:(0,n.jsx)(o(),{href:l.KH,passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(i.wpx,{type:"primary",children:"Visit integrations"})})});var v=r(7195),g=r(16394);let{Text:y}=i.AntTypography,h=t=>{let{monitorSummary:e,showSkeleton:r,...s}=t,[c,u]=(0,a.useState)(void 0),{name:d,property:m,total_updates:p,updates:f,last_monitored:h,warning:x,key:j}=e,b=Object.entries(f).map(t=>"".concat(t[1]," ").concat(t[0],"s")).join(", "),_=h?(0,v.B)(new Date(h),new Date,{addSuffix:!0}):void 0;return(0,a.useEffect)(()=>{m&&u((0,g.tl)(m))},[m]),(0,n.jsx)(i.krs.Item,{"data-testid":"monitor-result-".concat(j),...s,children:(0,n.jsxs)(i.N_L,{avatar:!0,title:!1,loading:r,active:!0,children:[(0,n.jsx)(i.krs.Item.Meta,{avatar:(0,n.jsx)(i.t3Z,{src:c,size:"small",icon:(0,n.jsx)(i.PJP.huD,{}),style:{backgroundColor:"transparent",color:"var(--ant-color-text)"}}),title:(0,n.jsxs)(o(),{href:"".concat(l.vi,"/").concat(j),className:"whitespace-nowrap",children:["".concat(p," assets detected").concat(m?" on ".concat(m):""),!!x&&(0,n.jsx)(i.esZ,{title:"string"==typeof x?x:void 0,children:(0,n.jsx)(i.PJP.OdJ,{className:"ml-1 inline-block align-middle",style:{color:"var(--fidesui-error)"}})})]}),description:"".concat(b," detected.")}),(0,n.jsxs)(i.jqI,{className:"gap-12",children:[(0,n.jsx)(y,{style:{maxWidth:300},ellipsis:{tooltip:d},children:d}),!!_&&(0,n.jsx)(i.esZ,{title:(0,g.p6)(h),children:(0,n.jsx)(y,{"data-testid":"monitor-date",children:_})})]})]})})};var x=r(57454),j=r(99716),b=()=>{var t;let e=(0,i.pmc)(),{PAGE_SIZES:r,pageSize:s,setPageSize:v,onPreviousPageClick:g,isPreviousPageDisabled:y,onNextPageClick:b,isNextPageDisabled:_,startRange:w,endRange:T,pageIndex:k,setTotalPages:P,resetPageIndexToDefault:C}=(0,d.oi)(),[R,S]=(0,a.useState)(""),{data:A,isLoading:q}=(0,j.tB)({api_set:!1}),M=!!(null==A?void 0:null===(t=A.detection_discovery)||void 0===t?void 0:t.website_monitor_enabled);(0,a.useEffect)(()=>{C()},[R,C]);let{data:E,isError:N,isLoading:D,isFetching:I}=(0,m.Ud)({page:k,size:s,search:R},{skip:q||!M});(0,a.useEffect)(()=>{N&&e&&M&&e({title:"Error fetching data",description:"Please try again later",status:"error"})},[N,e,M]),(0,a.useEffect)(()=>{E&&P(E.total||1)},[E,P]);let L=(null==E?void 0:E.items)||[],z=I?Array.from({length:s},(t,e)=>({key:e.toString(),updates:[],last_monitored:null})):[],O=(0,a.useCallback)(t=>[(0,n.jsx)(o(),{href:"".concat(l.vi,"/").concat(t),passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(i.wpx,{type:"link",className:"p-0","data-testid":"review-button-".concat(t),children:"Review"})},"review")],[]);return M?(0,n.jsxs)(c.Z,{title:"Action center",children:[(0,n.jsx)(u.Z,{heading:"Action center",breadcrumbItems:[{title:"All activity"}]}),(0,n.jsx)(i.jqI,{className:"justify-between py-6",children:(0,n.jsx)(x.M,{value:R,onChange:S})}),(0,n.jsx)(i.krs,{loading:D,dataSource:L||z,locale:{emptyText:(0,n.jsx)(f,{})},renderItem:t=>!!t&&(0,n.jsx)(h,{showSkeleton:I,monitorSummary:t,actions:O(t.key)},t.key)}),!!L&&!!(null==E?void 0:E.total)&&E.total>s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.htM,{className:"mb-6 mt-0"}),(0,n.jsx)(d.s8,{totalRows:(null==E?void 0:E.total)||0,pageSizes:r,setPageSize:v,onPreviousPageClick:g,isPreviousPageDisabled:y||I,onNextPageClick:b,isNextPageDisabled:_||I,startRange:w,endRange:T})]})]}):(0,n.jsx)(p,{isConfigLoading:q})}}},function(t){t.O(0,[8033,2780,4481,2888,9774,179],function(){return t(t.s=40741)}),_N_E=t.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8538],{73846:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset/new",function(){return a(17294)}])},812:function(e,t,a){"use strict";a.d(t,{D4:function(){return s.D4},MM:function(){return f},Ot:function(){return u},c6:function(){return r},cj:function(){return g},e$:function(){return l},fn:function(){return o},iC:function(){return y},nU:function(){return d},tB:function(){return c}});var n,r,s=a(19043);let i="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.cz)(e.data)){var a;let t=null===(a=e.data.detail)||void 0===a?void 0:a[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:i};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:a}=e;return{status:a,message:l(e,t.message)}}return t},f=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=r||(r={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let y={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},g=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,a){"use strict";a.d(t,{H:function(){return s},V:function(){return n.V}});var n=a(84306),r=a(812);let s=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let a="An unexpected error occurred. Please try again.";(0,r.Ot)(t)?a=t.data.detail:(0,r.tB)(t)&&(a=t.data.detail[0].msg),e(a)}}}},58452:function(e,t,a){"use strict";var n=a(24246),r=a(56351);t.Z=e=>{let{isOpen:t,onClose:a,onConfirm:s,onCancel:i,title:l,message:o,cancelButtonText:u,continueButtonText:c,isLoading:d,returnFocusOnClose:f,isCentered:y,testId:g="confirmation-modal",icon:h}=e;return(0,n.jsxs)(r.u_l,{isOpen:t,onClose:a,size:"lg",returnFocusOnClose:null==f||f,isCentered:y,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"center",p:6,"data-testid":g,children:[h?(0,n.jsx)(r.M5Y,{mb:2,children:h}):null,l?(0,n.jsx)(r.xBx,{fontWeight:"medium",pb:0,children:l}):null,o?(0,n.jsx)(r.fef,{children:o}):null,(0,n.jsx)(r.mzw,{children:(0,n.jsxs)(r.MIq,{columns:2,width:"100%",children:[(0,n.jsx)(r.wpx,{onClick:()=>{i&&i(),a()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:d,children:u||"Cancel"}),(0,n.jsx)(r.wpx,{type:"primary",size:"large",onClick:s,"data-testid":"continue-btn",loading:d,children:c||"Continue"})]})})]})]})}},46628:function(e,t,a){"use strict";a.d(t,{MA:function(){return l},Vo:function(){return u},t5:function(){return o}});var n=a(24246),r=a(56351);let s=e=>{let{children:t,title:a="Success"}=e;return(0,n.jsxs)(r.xvT,{"data-testid":"toast-success-msg",children:[(0,n.jsxs)("strong",{children:[a,":"]})," ",t]})},i=e=>{let{children:t}=e;return(0,n.jsxs)(r.xvT,{"data-testid":"toast-error-msg",children:[(0,n.jsx)("strong",{children:"Error:"})," ",t]})},l={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},o=(e,t)=>{let a=(0,n.jsx)(s,{title:t,children:e});return{...l,description:a}},u=e=>{let t=(0,n.jsx)(i,{children:e});return{...l,description:t,status:"error"}}},17294:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return O}});var n=a(24246),r=a(56351),s=a(27378),i=a(25980),l=a(77213),o=a(77830),u=a(58754),c=a(91613),d=a(34090),f=a(86677),y=a(45007),g=a(59389),h=a(40324),m=a(812),p=a(58452),x=a(46628),b=a(83265),v=a(32885),j=a(21702),w=a(20386);let C=e=>!("system_type"in e),_={url:"",classify:!1,classifyConfirmed:!1},A=g.Ry().shape({url:g.Z_().required().label("Database URL"),classify:g.O7(),classifyConfirmed:g.O7().when(["url","classify"],{is:(e,t)=>e&&t,then:()=>g.O7().equals([!0])})});var D=()=>{let[e,{isLoading:t}]=(0,w.pR)(),[a,{isLoading:s}]=(0,w.IR)(),[l,{isLoading:u}]=(0,v.Du)(),c=t||s||u,g=(0,r.pmc)(),D=(0,f.useRouter)(),L=(0,i.hz)(),S=(0,y.I0)(),k=async t=>{var a;let n=await e({organization_key:b.Av,generate:{config:{connection_string:t.url},target:j.GC.DB,type:j.j.DATASETS}});if("error"in n)return{error:(0,m.e$)(n.error)};let r=(null!==(a=n.data.generate_results)&&void 0!==a?a:[]).filter(C);return r&&r.length>0?{datasets:r}:{error:"Unable to generate a dataset with this connection."}},N=async e=>{let t=await a(e);return"error"in t?{error:(0,m.e$)(t.error)}:{dataset:t.data}},E=async e=>{let{values:t,datasets:a}=e,n=await l({dataset_schemas:a.map(e=>{let{name:t,fides_key:a}=e;return{fides_key:a,name:t}}),schema_config:{organization_key:b.Av,generate:{config:{connection_string:t.url},target:j.GC.DB,type:j.j.DATASETS}}});return"error"in n?{error:(0,m.e$)(n.error)}:{classifyInstances:n.data.classify_instances}},O=async e=>{var t;let a=await k(e);if("error"in a){g((0,x.Vo)(a.error));return}let n=await Promise.all(a.datasets.map(e=>N(e))),r=null!==(t=n.find(e=>"error"in e))&&void 0!==t?t:n[0];if("error"in r){g((0,x.Vo)(r.error));return}if(!e.classify){g((0,x.t5)("Generated ".concat(r.dataset.name," dataset"))),D.push({pathname:o.o5,query:{datasetId:r.dataset.fides_key}});return}let s=await E({values:e,datasets:a.datasets});if("error"in s){g((0,x.Vo)(s.error));return}g((0,x.t5)("Generate and classify are now in progress")),S((0,w.Zl)(r.dataset.fides_key)),D.push("/dataset")};return(0,n.jsx)(d.J9,{initialValues:{..._,classify:L.plus},validationSchema:A,onSubmit:O,validateOnChange:!1,validateOnBlur:!1,children:e=>{let{isSubmitting:t,errors:a,values:s,submitForm:i,resetForm:l,setFieldValue:o}=e;return(0,n.jsxs)(d.l0,{children:[(0,n.jsxs)(r.gCW,{spacing:8,align:"left",children:[(0,n.jsx)(r.xvT,{size:"sm",color:"gray.700",children:"Connect to a database using the connection URL. You may have received this URL from a colleague or your Ethyca developer support engineer."}),(0,n.jsx)(r.xuv,{children:(0,n.jsx)(h.j0,{name:"url",label:"Database URL"})}),L.plus?(0,n.jsx)(h.w8,{name:"classify",label:"Classify dataset",tooltip:"Use Fides Classify to suggest labels based on your data."}):null,(0,n.jsx)(r.xuv,{children:(0,n.jsx)(r.wpx,{type:"primary",htmlType:"submit",loading:t||c,disabled:t||c,"data-testid":"create-dataset-btn",children:"Generate dataset"})})]}),(0,n.jsx)(p.Z,{title:"Generate and classify this dataset",message:"You have chosen to generate and classify this dataset. This process may take several minutes. In the meantime you can continue using Fides. You will receive a notification when the process is complete.",isOpen:void 0!==a.classifyConfirmed,onClose:()=>{l({values:{...s,classifyConfirmed:!1}})},onConfirm:()=>{o("classifyConfirmed",!0),setTimeout(()=>{i()},0)}})]})}})},L=a(66527),S=a(14047),k=a(41207),N=a(39715),E=()=>{let[e]=(0,w.IR)(),[t,a]=(0,s.useState)(!0),[i,l]=(0,s.useState)(!1),[u,c]=(0,s.useState)(!1),d=(0,s.useRef)(null),y=(0,f.useRouter)(),g=(0,r.pmc)(),{errorAlert:h}=(0,S.V)(),[p,b]=(0,s.useState)(void 0),v=e=>{L.ZP.load(e,{json:!0}),b(void 0)},j=async t=>{let a;return"object"==typeof t&&null!=t&&"dataset"in t&&Array.isArray(t.dataset)?[a]=t.dataset:Array.isArray(t)?[a]=t:a=t,e(a)},C=e=>{g((0,x.t5)("Successfully loaded new dataset YAML")),(0,w.Zl)(e.fides_key),y.push({pathname:o.o5,query:{datasetId:e.fides_key}})},_=async()=>{l(!0);let e=d.current.getValue(),t=L.ZP.load(e,{json:!0}),a=await j(t);(0,m.D4)(a)?g((0,x.Vo)((0,m.e$)(a.error))):"data"in a&&C(a.data),l(!1)};return(0,n.jsxs)(r.kCb,{gap:"97px",children:[(0,n.jsxs)(r.xuv,{w:"75%",children:[(0,n.jsx)(r.xuv,{color:"gray.700",fontSize:"14px",mb:4,children:"Get started creating your first dataset by pasting your dataset yaml below! You may have received this yaml from a colleague or your Ethyca developer support engineer."}),(0,n.jsxs)(r.gCW,{align:"stretch",children:[(0,n.jsx)(r.izJ,{color:"gray.100"}),(0,n.jsx)(k.M,{defaultLanguage:"yaml",height:"calc(100vh - 515px)",onChange:e=>{try{c(!0),v(e),a(!!(!e||""===e.trim()))}catch(e){(0,k.F)(e)?b(e):h("Could not parse the supplied YAML")}},onMount:e=>{d.current=e,d.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0}},theme:"light"}),(0,n.jsx)(r.izJ,{color:"gray.100"}),(0,n.jsx)(r.wpx,{type:"primary",disabled:t||!!p||i,loading:i,onClick:_,htmlType:"submit",className:"mt-6 w-fit",children:"Create dataset"})]})]}),(0,n.jsx)(r.xuv,{children:u&&(t||p)&&(0,n.jsx)(N.Z,{isEmptyState:t,yamlError:p})})]})},O=()=>{let e=(0,i.hz)(),[t,a]=(0,s.useState)(null);return(0,n.jsxs)(l.Z,{title:"Create New Dataset",children:[(0,n.jsx)(u.Z,{heading:"Datasets",breadcrumbItems:[{title:"All datasets",href:o.$m},{title:"Create new"}]}),(0,n.jsxs)(r.Kqy,{spacing:8,children:[(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.wpx,{onClick:()=>a("yaml"),"data-testid":"upload-yaml-btn",className:"mr-2",children:"Upload a Dataset YAML"}),(0,n.jsx)(r.wpx,{onClick:()=>a("database"),ghost:"database"===t,disabled:e.flags.dataDiscoveryAndDetection,className:"mr-2","data-testid":"connect-db-btn",children:"Connect to a database"}),e.flags.dataDiscoveryAndDetection?(0,n.jsx)(c.Z,{label:"Creating a dataset via a database connection is disabled when the 'detection & discovery' beta feature is enabled"}):null]}),"database"===t&&(0,n.jsx)(r.xuv,{w:{base:"100%",lg:"50%"},children:(0,n.jsx)(D,{})}),"yaml"===t&&(0,n.jsx)(r.xuv,{w:{base:"100%"},children:(0,n.jsx)(E,{})})]})]})}},19043:function(e,t,a){"use strict";a.d(t,{Bw:function(){return i},D4:function(){return r},Dy:function(){return o},XD:function(){return u},cz:function(){return c},hE:function(){return l},oK:function(){return s}});var n=a(76649);let r=e=>"error"in e,s=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,i=e=>(0,n.Ln)({status:"number",data:{}},e),l=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,a){"use strict";a.d(t,{Ln:function(){return n}});let n=(e,t)=>s(e,t),r=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>s(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>s(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,a])=>s(a,t[e]));class i{static narrow(e){return new i(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,a=e instanceof i?e.NF:e instanceof Function?e:t=>n(e,t);return new i(e=>t(e)&&a(e))}}new i(e=>!0)}},function(e){e.O(0,[3005,5574,2888,9774,179],function(){return e(e.s=73846)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8473],{64902:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset",function(){return a(91949)}])},79806:function(e,t,a){"use strict";a.d(t,{Gn:function(){return o},zR:function(){return l}});var s=a(24246),i=a(56351),n=a(56358);let l=e=>{let{title:t}=e;return(0,s.jsx)(i.OXI,{py:0,display:"flex",alignItems:"flex-start",children:(0,s.jsx)(i.xvT,{mr:"2",color:"gray.700",fontSize:"lg",lineHeight:1.8,children:t})})},o=e=>{let{onDelete:t,onEditYaml:a,formId:l,isSaving:o}=e;return(0,s.jsxs)(i.zeN,{justifyContent:"space-between",children:[t?(0,s.jsx)(i.wpx,{"aria-label":"delete",icon:(0,s.jsx)(n.q,{fontSize:"small"}),onClick:t,"data-testid":"delete-btn"}):null,(0,s.jsxs)("div",{className:"flex gap-2",children:[a&&(0,s.jsx)(i.wpx,{onClick:a,"data-testid":"edit-yaml-btn",children:"Edit YAML"}),(0,s.jsx)(i.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:l,loading:o,children:"Save"})]})]})};t.ZP=e=>{let{header:t,description:a,isOpen:n,onClose:l,children:o,footer:d}=e;return(0,s.jsxs)(i.dys,{placement:"right",isOpen:n,onClose:l,size:"md",children:[(0,s.jsx)(i.P1B,{}),(0,s.jsxs)(i.scA,{"data-testid":"edit-drawer-content",py:2,children:[(0,s.jsxs)(i.xuv,{display:"flex",justifyContent:"space-between",alignItems:"top",mr:2,py:2,gap:2,children:[(0,s.jsx)(i.xuv,{flex:1,minH:8,children:t}),(0,s.jsx)(i.xuv,{display:"flex",justifyContent:"flex-end",mr:2,children:(0,s.jsx)(i.wpx,{"aria-label":"Close editor",onClick:l,"data-testid":"close-drawer-btn",icon:(0,s.jsx)(i.Two,{fontSize:"smaller"})})})]}),(0,s.jsxs)(i.Ng0,{pt:1,children:[a?(0,s.jsx)(i.xvT,{fontSize:"sm",mb:4,color:"gray.600",children:a}):null,o]}),d]})]})}},56358:function(e,t,a){"use strict";a.d(t,{q:function(){return i}});var s=a(24246);let i=(0,a(56351).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,s.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},8133:function(e,t,a){"use strict";var s=a(24246),i=a(56351);t.Z=e=>{let{title:t,children:a,isOpen:n,onClose:l,...o}=e;return(0,s.jsxs)(i.u_l,{isOpen:n,onClose:l,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...o,children:[(0,s.jsx)(i.ZAr,{}),(0,s.jsxs)(i.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,s.jsx)(i.xBx,{p:0,children:(0,s.jsx)(i.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,s.jsx)(i.X6q,{as:"h3",size:"sm",children:t})})}),(0,s.jsx)(i.fef,{pb:4,overflow:"auto",children:a})]})]})}},56026:function(e,t,a){"use strict";a.d(t,{QL:function(){return n},du:function(){return i},tz:function(){return s}});let s={name:{tooltip:"A UI-friendly label for the Dataset."},description:{tooltip:"A human-readable description of the Dataset."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to all collections in the Dataset."}},i={description:{tooltip:"A human-readable description of the collection."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to all fields in the collection."}},n={description:{tooltip:"A human-readable description of the field."},data_categories:{tooltip:"Arrays of Data Category resources, identified by fides_key, that apply to this field."}}},91949:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return L}});var s=a(24246),i=a(92222),n=a(59003),l=a(56351),o=a(79894),d=a.n(o),r=a(86677),c=a(27378),u=a(45007),p=a(32885),x=a(21702);let h=e=>{let{resourceType:t,fidesKeys:a,skip:s}=e,[i,n]=(0,c.useState)(!0),l=(0,p.Wm)({resource_type:t,fides_keys:a},{skip:s,pollingInterval:i?3e3:void 0}),o=!!l.data&&l.data.every(e=>e.status===x.Wg.COMPLETE||e.status===x.Wg.FAILED||e.status===x.Wg.REVIEWED);return(0,c.useEffect)(()=>{o&&n(!1)},[o]),{...l,isClassificationFinished:o}};var f=a(25980),m=a(77213),g=a(77830),j=a(58754),C=a(14481),y=a(20386),b=a(79806),v=a(812),w=a(46628),k=a(8133),_=a(84306),S=a(66527),z=a(41207),A=a(39715),D=a(41966),R=e=>{let{data:t=[],isSubmitting:a=!1,onCancel:i,onSubmit:n,disabled:o,isLoading:d,onChange:r}=e,u=(0,c.useRef)(null),{errorAlert:p}=(0,_.V)(),x=t.length>0?S.ZP.dump(t):void 0,[h,f]=(0,c.useState)(void 0),[m,g]=(0,c.useState)(!1),[j,C]=(0,c.useState)(!x),{data:y}=(0,D.NR)(),[b,v]=(0,c.useState)([]),w=e=>{S.ZP.load(e,{json:!0}),f(void 0)},k=()=>{if(y&&y.length){let e=u.current.getValue();v(y.filter(t=>e.includes("fides_key: ".concat(t.fides_key,"\n"))).map(e=>e.fides_key))}},R=o||j||!m||!!h||a;return(0,s.jsxs)(l.kCb,{gap:"97px",children:[(0,s.jsxs)(l.gCW,{align:"stretch",w:"800px",children:[(0,s.jsx)(z.M,{defaultLanguage:"yaml",defaultValue:x,height:"calc(100vh - 526px)",onChange:e=>{try{g(!0),w(e),C(!e||""===e.trim());let t=S.ZP.load(e||"",{json:!0});Array.isArray(t)?r(t[0]):r(t),k()}catch(e){(0,z.F)(e)?f(e):p("Could not parse the supplied YAML")}},onMount:(e,t)=>{u.current=e,u.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!1},readOnly:o},theme:"light"}),b.length>0?(0,s.jsxs)(l.xvT,{children:["You are about to overwrite the dataset",b.length>1?"s":""," ",b.map((e,t)=>{let a=t===b.length-1;return(0,s.jsxs)(c.Fragment,{children:[(0,s.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),a?".":", "]},e)})]}):null,(0,s.jsx)(l.mzw,{children:(0,s.jsxs)("div",{className:"flex w-full justify-end gap-4",children:[i&&(0,s.jsx)(l.wpx,{onClick:i,"data-testid":"cancel-btn",disabled:d,children:"Cancel"}),(0,s.jsx)(l.wpx,{type:"primary",onClick:()=>{null==n||n(),null==i||i()},"data-testid":"continue-btn",disabled:R,loading:a||d,children:"Confirm"})]})})]}),m&&(j||h)&&(0,s.jsx)(A.Z,{isEmptyState:j,yamlError:h})]})},E=e=>{let{isOpen:t,onClose:a,title:i,isLoading:n,returnFocusOnClose:o,isDatasetSelected:d,dataset:r,onChange:c,onSubmit:u}=e;return(0,s.jsx)(k.Z,{isOpen:t,onClose:a,size:"3xl",returnFocusOnClose:null==o||o,isCentered:!0,title:null!=i?i:"Edit Dataset",children:(0,s.jsx)(l.xuv,{"data-testid":"yaml-editor-section",children:(0,s.jsx)(R,{data:r?[r]:[],onSubmit:u,isSubmitting:!1,disabled:d,onChange:c,isLoading:n,onCancel:a})})})},V=a(34090),H=a(40324),T=a(56026);let M="edit-field-drawer";var Z=e=>{var t,a;let{values:i,onSubmit:n}=e,o={name:null!==(t=i.name)&&void 0!==t?t:"",description:null!==(a=i.description)&&void 0!==a?a:"",data_categories:i.data_categories};return(0,s.jsx)(V.J9,{initialValues:o,onSubmit:e=>{n({...e,data_categories:i.data_categories||[]})},children:(0,s.jsx)(V.l0,{id:M,children:(0,s.jsxs)(l.Kqy,{spacing:"3",children:[(0,s.jsx)(H.j0,{name:"name",label:"Name",tooltip:T.tz.name.tooltip,"data-testid":"name-input",variant:"block"}),(0,s.jsx)(H.j0,{name:"description",label:"Description",tooltip:T.tz.description.tooltip,"data-testid":"description-input",variant:"block"})]})})})},O=e=>{let{dataset:t,isOpen:a,onClose:i}=e,[n,{isLoading:o}]=(0,y.TG)(),[d]=(0,y.QY)(),u=(0,r.useRouter)(),p=(0,l.pmc)(),{isOpen:x,onOpen:h,onClose:f}=(0,l.qY0)(),{isOpen:m,onOpen:g,onClose:j}=(0,l.qY0)(),[C,k]=(0,c.useState)(void 0),_=async e=>{let a={...t,...e};try{let e=await n(a);(0,v.D4)(e)?p((0,w.Vo)((0,v.e$)(e.error))):p((0,w.t5)("Successfully modified dataset"))}catch(e){p((0,w.Vo)(e))}i()},S=async()=>{let{fides_key:e}=t,a=await d(e);(0,v.D4)(a)?p((0,w.Vo)((0,v.e$)(a.error))):p((0,w.t5)("Successfully deleted dataset")),(0,y.Zl)(void 0),u.push("/dataset"),i(),f()};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(b.ZP,{isOpen:a,onClose:i,description:"A Dataset takes a database schema (tables and columns) and adds Fides privacy categorizations. Provide additional context to this dataset by filling out the fields below.",header:(0,s.jsx)(b.zR,{title:"Edit: ".concat(null==t?void 0:t.name)}),footer:(0,s.jsx)(b.Gn,{onClose:i,onDelete:h,onEditYaml:()=>g(),formId:M}),children:[(0,s.jsx)(E,{isOpen:m,onClose:j,onChange:k,onSubmit:()=>_(C),title:"Edit dataset YAML",isLoading:o,isDatasetSelected:!1,dataset:t}),(0,s.jsx)(Z,{values:t,onSubmit:_})]}),(0,s.jsx)(l.cVQ,{isOpen:x,onClose:f,onConfirm:S,title:"Delete Dataset",message:(0,s.jsxs)(l.xvT,{children:["You are about to permanently delete the dataset named"," ",(0,s.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name}),". Are you sure you would like to continue?"]})})]})};let P=(0,i.Cl)(),I={items:[],total:0,page:1,size:25,pages:1},N=()=>(0,s.jsx)(l.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,s.jsxs)(l.gCW,{children:[(0,s.jsx)(l.xvT,{fontSize:"md",fontWeight:"600",children:"No datasets found."}),(0,s.jsx)(l.xvT,{fontSize:"sm",children:'Click "Create new dataset" to add your first dataset to Fides.'})]})});var L=()=>{let e=(0,u.I0)(),t=(0,r.useRouter)(),[a,o]=(0,c.useState)(!1),[p,b]=(0,c.useState)(),{PAGE_SIZES:v,pageSize:w,setPageSize:k,onPreviousPageClick:_,isPreviousPageDisabled:S,onNextPageClick:z,isNextPageDisabled:A,startRange:D,endRange:R,pageIndex:E,setTotalPages:V,resetPageIndexToDefault:H}=(0,C.oi)(),[T,M]=(0,c.useState)(),Z=(0,c.useCallback)(e=>{H(),M(e)},[H,M]),{data:L,isLoading:W,isFetching:F}=(0,y.rt)({page:E,size:w,search:T,exclude_saas_datasets:!0}),{items:Y,total:q,pages:G}=(0,c.useMemo)(()=>null!=L?L:I,[L]);(0,c.useEffect)(()=>{V(G)},[G,V]);let B=(0,c.useCallback)(a=>{e((0,y.Zl)(a.fides_key)),t.push({pathname:g.o5,query:{datasetId:encodeURIComponent(a.fides_key)}})},[e,t]),Q=(0,f.hz)();h({resourceType:x.j.DATASETS,skip:!Q.plus});let U=(0,c.useMemo)(()=>[P.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(C.G3,{value:e.getValue(),fontWeight:"semibold"}),header:e=>(0,s.jsx)(C.Rr,{value:"Dataset Name",...e}),size:180}),P.accessor(e=>e.fides_key,{id:"fides_key",cell:e=>(0,s.jsx)(C.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(C.Rr,{value:"Fides Key",...e}),size:150}),P.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(C.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(C.Rr,{value:"Description",...e}),size:300,meta:{showHeaderMenu:!0}}),P.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e,a=t.original;return(0,s.jsx)(l.Ugi,{spacing:0,"data-testid":"dataset-".concat(a.fides_key),children:(0,s.jsx)(l.wpx,{size:"small",icon:(0,s.jsx)(l.dY8,{}),onClick:()=>{b(a),o(!0)},children:"Edit"})})},meta:{disableRowClick:!0}})].filter(Boolean),[]),X=(0,n.b7)({getCoreRowModel:(0,i.sC)(),getFilteredRowModel:(0,i.vL)(),getSortedRowModel:(0,i.tj)(),columns:U,data:Y,columnResizeMode:"onChange"});return(0,s.jsx)(m.Z,{title:"Datasets",children:(0,s.jsxs)(l.xuv,{"data-testid":"system-management",children:[(0,s.jsx)(j.Z,{heading:"Datasets",breadcrumbItems:[{title:"All datasets"}],rightContent:(0,s.jsx)(d(),{href:"/dataset/new",passHref:!0,legacyBehavior:!0,children:(0,s.jsx)(l.wpx,{"data-testid":"create-dataset-btn",children:"+ Add dataset"})})}),W?(0,s.jsx)(C.I4,{rowHeight:36,numRows:15}):(0,s.jsxs)(l.xuv,{"data-testid":"dataset-table",children:[(0,s.jsx)(C.Q$,{children:(0,s.jsx)(C.HO,{globalFilter:T,setGlobalFilter:Z,placeholder:"Search",testid:"dataset-search"})}),(0,s.jsx)(C.ZK,{tableInstance:X,emptyTableNotice:(0,s.jsx)(N,{}),onRowClick:B})]}),(0,s.jsx)(C.s8,{totalRows:q||0,pageSizes:v,setPageSize:k,onPreviousPageClick:_,isPreviousPageDisabled:S||F,onNextPageClick:z,isNextPageDisabled:A||F,startRange:D,endRange:R}),(0,s.jsx)(O,{dataset:p,isOpen:a,onClose:()=>{b(void 0),o(!1)}})]})})}}},function(e){e.O(0,[8033,2780,3005,4481,5574,2888,9774,179],function(){return e(e.s=64902)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1500],{50697:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations/[id]",function(){return n(327)}])},67991:function(e,t,n){"use strict";n.d(t,{Od:function(){return o},QZ:function(){return a}});var i=n(27378);let a=e=>{let{items:t,selected:n,onChange:i}=e,a=t.every(e=>n.includes(e.id))&&!!t.length;return{allSelected:a,someSelected:t.some(e=>n.includes(e.id))&&!!t.length,handleToggleAll:()=>{a?i([]):i(t.map(e=>e.id))},handleToggleSelection:e=>{n.includes(e)?i(n.filter(t=>t!==e)):i([...n,e])}}},o=e=>{let{initialSelected:t,initialExcluded:n,initialAllSelected:a,itemCount:o}=e,[s,l]=(0,i.useState)(t),[r,c]=(0,i.useState)(n),[d,u]=(0,i.useState)(a||s.length===o),m=!!s.length||!!r.length;return{selected:s,excluded:r,allSelected:d,someSelected:m,handleToggleAll:()=>{d?(c([]),r.length||u(!1)):(l([]),u(!0))},handleToggleItemSelected:e=>{if(d)c(r.includes(e)?r.filter(t=>t!==e):[...r,e]);else{let t=s.includes(e)?s.filter(t=>t!==e):[...s,e];l(t),t.length===o&&u(!0)}}}}},79494:function(e,t,n){"use strict";var i=n(24246),a=n(56351);t.Z=e=>{let{title:t,icon:n,type:o,...s}=e;return(0,i.jsx)(a.wpx,{size:"small",type:o,"data-testid":"action-".concat(t),icon:n,iconPosition:"start",...s,children:t})}},327:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return el}});var i=n(24246),a=n(56351),o=n(86677),s=n(7617),l=n(77213),r=n(77830),c=n(58754),d=n(94725),u=n(45216),m=n(7621),x=n(92222),g=n(59003),h=n(27378),p=n(18225);let f=(0,a.IUT)({displayName:"MonitorIcon",viewBox:"0 0 12 12",path:(0,i.jsx)("path",{d:"M1.33333 2.21875C1.15 2.21875 1 2.37344 1 2.5625V5.65625H3.66667C3.84167 5.65625 4.00417 5.75078 4.09583 5.90762L4.62708 6.8207L5.88542 4.22324C5.96667 4.05566 6.13125 3.94609 6.3125 3.93965C6.49375 3.9332 6.66667 4.02773 6.76042 4.18887L7.61458 5.65625H8.83333C9.11042 5.65625 9.33333 5.88613 9.33333 6.17188C9.33333 6.45762 9.11042 6.6875 8.83333 6.6875H7.33333C7.15833 6.6875 6.99583 6.59297 6.90417 6.43613L6.37292 5.52305L5.11458 8.12051C5.03333 8.28809 4.86875 8.39766 4.6875 8.4041C4.50625 8.41055 4.33333 8.31602 4.23958 8.15488L3.38542 6.6875H1V9.4375C1 9.62656 1.15 9.78125 1.33333 9.78125H10.6667C10.85 9.78125 11 9.62656 11 9.4375V2.5625C11 2.37344 10.85 2.21875 10.6667 2.21875H1.33333ZM0 2.5625C0 1.8041 0.597917 1.1875 1.33333 1.1875H10.6667C11.4021 1.1875 12 1.8041 12 2.5625V9.4375C12 10.1959 11.4021 10.8125 10.6667 10.8125H1.33333C0.597917 10.8125 0 10.1959 0 9.4375V2.5625Z",fill:"currentColor"})});var j=n(14481),y=n(72625),_=n(70675),b=n(812),v=e=>{let{defaultSuccessMsg:t,defaultErrorMsg:n}=e,i=(0,a.pmc)();return{toastResult:e=>{(0,b.D4)(e)?i({status:"error",description:(0,b.e$)(e.error,n)}):i({status:"success",description:t})}}},C=n(8133),S=n(46628),k=n(67991),w=n(91613);let R=(0,x.Cl)();var T=e=>{let{items:t,totalItemCount:n,selected:o,excluded:s,allSelected:l,someSelected:r,moreLoading:c,handleToggleSelection:d,handleToggleAll:u,onMoreClick:m}=e,f=t.map(e=>({id:e,isSelected:o.includes(e),isExcluded:s.includes(e)})),y=(0,h.useMemo)(()=>[R.display({id:"select",cell:e=>{let{row:t}=e;return(0,i.jsx)(j.k,{isChecked:t.original.isSelected||l&&!t.original.isExcluded,onChange:()=>d(t.original.id),dataTestId:"".concat(t.original.id,"-checkbox")})},header:()=>(0,i.jsx)(j.k,{isChecked:l,isIndeterminate:r,onChange:u,dataTestId:"select-all-checkbox"}),size:1}),R.accessor(e=>e.id,{id:"id",cell:e=>(0,i.jsx)(j.G3,{value:e.getValue()}),header:e=>(0,i.jsx)(j.Rr,{value:"Scope",...e})})],[d,u,l,r]),_=(0,g.b7)({getCoreRowModel:(0,x.sC)(),getRowId:e=>e.id,manualPagination:!0,data:f,columns:y,columnResizeMode:"onChange"});return(0,i.jsx)(a.kCb,{w:"full",direction:"column",maxH:"lg",children:(0,i.jsx)(j.ZK,{tableInstance:_,onRowClick:e=>d(e.id),footer:!!m&&(0,i.jsx)(j.vr,{totalColumns:2,children:(0,i.jsx)(a.kCb,{justify:"center",children:c?(0,i.jsx)(p.Z,{size:"xs"}):(0,i.jsxs)(a.kCb,{align:"center",children:[(0,i.jsxs)(a.xvT,{fontSize:"xs",mr:4,children:["Showing ",t.length," of ",n]}),(0,i.jsx)(a.wpx,{onClick:m,size:"small","data-testid":"load-more-btn",children:"Load more..."})]})})})})})};let E={items:[],total:1,page:1,size:50,pages:0};var q=(e,t)=>{let[n,i]=(0,h.useState)(2),{data:a,isLoading:o}=(0,_.oN)({page:1,size:25,connection_config_key:e}),s=(0,h.useRef)(o),{items:l,total:r}=null!=a?a:E,c=!!(null==a?void 0:a.pages)&&n>a.pages,[d,u]=(0,h.useState)(l);(0,h.useEffect)(()=>{s.current=o,u(l)},[o,l]),(0,h.useEffect)(()=>{let e=setTimeout(()=>{s.current&&t&&t()},5e3);return()=>clearTimeout(e)},[]);let[m,{isLoading:x,isFetching:g}]=(0,_.j3)(),p=x||g||o,f=async()=>{var t,a;if(c)return;let o=await m({connection_config_key:e,size:25,page:n+1});o.isError||(i(n+1),u([...d,...null!==(a=null===(t=o.data)||void 0===t?void 0:t.items)&&void 0!==a?a:[]]))};return{databases:d,totalDatabases:r,fetchMore:f,initialIsLoading:o,isLoading:p,reachedEnd:c}},M=e=>{var t;let{monitor:n,isEditing:o,isSubmitting:s,integrationKey:l,onSubmit:r,onClose:c}=e,d=(0,a.pmc)(),{databases:u,totalDatabases:m,fetchMore:x,reachedEnd:g,isLoading:h,initialIsLoading:f}=q(l,()=>{r({...n,databases:[]}),d({...S.MA,status:"info",description:"Loading resources is taking longer than expected. The monitor has been saved and is tracking all available resources. You can return later to limit its scope if needed"}),c()}),j=null!==(t=null==n?void 0:n.databases)&&void 0!==t?t:[],{selected:y,excluded:_,allSelected:b,someSelected:v,handleToggleItemSelected:C,handleToggleAll:R}=(0,k.Od)({initialSelected:j,initialExcluded:[],initialAllSelected:o&&!j.length,itemCount:m}),E=!b&&0===y.length;return f?(0,i.jsx)(p.Z,{my:12}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.kCb,{p:4,direction:"column",children:[(0,i.jsxs)(a.kCb,{direction:"row",mb:4,gap:1,align:"center",children:[(0,i.jsx)(a.xvT,{fontSize:"sm",children:"Select projects to monitor"}),(0,i.jsx)(w.Z,{label:"Selecting a project will monitor all current and future datasets within that project."})]}),(0,i.jsx)(T,{items:u,totalItemCount:m,selected:y,excluded:_,allSelected:b,someSelected:v,moreLoading:h,handleToggleSelection:C,handleToggleAll:R,onMoreClick:g?void 0:x})]}),(0,i.jsxs)("div",{className:"mt-4 flex w-full justify-between",children:[(0,i.jsx)(a.wpx,{onClick:c,children:"Cancel"}),(0,i.jsx)(a.ua7,{label:"Select one or more projects to save",isDisabled:!E,children:(0,i.jsx)(a.wpx,{onClick:()=>{r({...n,excluded_databases:_,databases:b?[]:y})},loading:s,type:"primary","data-testid":"save-btn",disabled:E,children:"Save"})})]})]})},L=n(19508),D=n(96063),N=n(34090),A=n(59389),Z=n(97181),O=n(40324),z=n(21702),I=e=>{var t,n;let{monitor:s,integrationOption:l,isSubmitting:r,databasesAvailable:c,onClose:d,onAdvance:u,onSubmit:m}=e,x=!!s,{query:g}=(0,o.useRouter)(),h=Array.isArray(g.id)?g.id[0]:g.id,p=A.Ry().shape({name:A.Z_().required().label("Name"),execution_frequency:A.Z_().nullable().label("Execution frequency"),execution_start_date:A.hT().nullable().label("Execution start date")}),f=(null==s?void 0:s.execution_start_date)?(0,L.D)(s.execution_start_date):Date.now(),j={name:null!==(t=null==s?void 0:s.name)&&void 0!==t?t:"",execution_start_date:(0,D.WU)(f,"yyyy-MM-dd'T'HH:mm"),execution_frequency:null!==(n=null==s?void 0:s.execution_frequency)&&void 0!==n?n:z.hV.MONTHLY},y=(0,b.MM)(z.hV);return(0,i.jsx)(N.J9,{initialValues:j,enableReinitialize:!0,onSubmit:e=>{let t=e.execution_frequency!==z.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:z.hV.NOT_SCHEDULED,execution_start_date:void 0},n=x?{...s,...t,name:e.name}:{...t,name:e.name,connection_config_key:h,classify_params:{num_samples:25,num_threads:1}};l.identifier===z.Rj.DYNAMODB&&(n.datasource_params={single_dataset:!1}),c?u(n):m(n)},validationSchema:p,children:e=>{let{values:t,isValid:n,resetForm:o}=e;return(0,i.jsx)(N.l0,{children:(0,i.jsxs)(a.gCW,{alignItems:"start",spacing:6,mt:4,children:[(0,i.jsx)(O.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,i.jsx)(Z.d,{name:"execution_frequency",id:"execution_frequency",tooltip:"Interval to run the monitor automatically after the start date",options:y,label:"Automatic execution frequency",layout:"stacked"}),(0,i.jsx)(O.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:t.execution_frequency===z.hV.NOT_SCHEDULED,id:"execution_start_date"}),(0,i.jsxs)("div",{className:"flex w-full justify-between",children:[(0,i.jsx)(a.wpx,{onClick:()=>{o(),d()},children:"Cancel"}),(0,i.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!n,loading:r,"data-testid":"next-btn",children:c?"Next":"Save"})]})]})})}})},V=n(8411),H=n(3968),P=n(64781),U=n(60325);let W=A.Ry().shape({name:A.Z_().required().label("Name"),execution_frequency:A.Z_().nullable().label("Execution frequency"),execution_start_date:A.hT().nullable().label("Execution start date"),datasource_params:A.Ry().shape({locations:A.IX().label("Locations"),exclude_domains:A.IX().label("Exclude domains"),sitemap_url:A.Z_().nullable().url().label("Sitemap URL")})});var Y=e=>{var t,n,s;let{monitor:l,url:r,onClose:c,onSubmit:d}=e,{query:u}=(0,o.useRouter)(),m=Array.isArray(u.id)?u.id[0]:u.id,x=(null==l?void 0:l.execution_start_date)?(0,L.D)(l.execution_start_date):Date.now(),{data:g,isLoading:h}=(0,P.gT)(),p=[...(0,U.TK)(null!==(t=null==g?void 0:g.locations)&&void 0!==t?t:[]),...(0,U.TK)(null!==(n=null==g?void 0:g.location_groups)&&void 0!==n?n:[])].map(e=>({value:e,label:V.Z8[e]})),f={name:(null==l?void 0:l.name)||"",execution_frequency:(null==l?void 0:l.execution_frequency)||z.hV.MONTHLY,execution_start_date:(0,D.WU)(x,"yyyy-MM-dd'T'HH:mm"),url:r,connection_config_key:m,datasource_params:null!==(s=null==l?void 0:l.datasource_params)&&void 0!==s?s:{locations:[]}},j=async e=>{let t=e.execution_frequency!==z.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:z.hV.NOT_SCHEDULED,execution_start_date:void 0};d({...l,...e,...t,key:(null==l?void 0:l.key)||(0,H.E)(e.name),classify_params:(null==l?void 0:l.classify_params)||{},datasource_params:e.datasource_params||{},connection_config_key:m})};return(0,i.jsxs)(a.jqI,{vertical:!0,className:"pt-4",children:[(0,i.jsx)(a.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",children:(0,i.jsx)(a.xvT,{fontSize:"sm",children:"This monitor allows you to simulate and verify user consent actions, such as 'accept,' 'reject,' or 'opt-out,' on consent experiences. For each detected activity, the monitor will record whether it occurred before or after the configured user actions, ensuring compliance with user consent choices."})}),(0,i.jsx)(N.J9,{initialValues:f,enableReinitialize:!0,onSubmit:j,validationSchema:W,children:e=>{let{values:t,resetForm:n}=e;return(0,i.jsx)(N.l0,{children:(0,i.jsxs)(a.jqI,{vertical:!0,gap:"middle",children:[(0,i.jsx)(O.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,i.jsx)(O.j0,{name:"datasource_params.sitemap_url",id:"sitemap_url",label:"Sitemap URL",variant:"stacked"}),(0,i.jsx)(Z.d,{mode:"tags",name:"datasource_params.exclude_domains",placeholder:"Enter domains to exclude",id:"exclude_domains",label:"Exclude domains",options:[],open:!1,layout:"stacked"}),(0,i.jsx)(O.j0,{name:"url",id:"url",label:"URL",isRequired:!0,disabled:!0,variant:"stacked"}),(0,i.jsx)(Z.d,{mode:"multiple",isRequired:!0,name:"datasource_params.locations",id:"locations",label:"Locations",loading:h,options:p,optionFilterProp:"label",tooltip:"Specify the region(s) to include in the scan. The monitor will scan the same URL across these locations to identify tracking technologies, such as cookies served by ad tech vendors.",layout:"stacked"}),(0,i.jsx)(Z.d,{name:"execution_frequency",id:"execution_frequency",options:(0,b.MM)(z.hV),label:"Automatic execution frequency",layout:"stacked"}),(0,i.jsx)(O.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:t.execution_frequency===z.hV.NOT_SCHEDULED,id:"execution_start_date",tooltip:"Set the start time for the scan. For optimal performance and minimal disruption, schedule scans during periods of low traffic."}),(0,i.jsxs)(a.jqI,{className:"mt-2 justify-between",children:[(0,i.jsx)(a.wpx,{onClick:()=>{n(),c()},children:"Cancel"}),(0,i.jsx)(a.wpx,{type:"primary",htmlType:"submit","data-testid":"save-btn",children:"Save"})]})]})})}})]})},F=n(31883),K=e=>{let{isOpen:t,onClose:n,formStep:o,onAdvance:s,monitor:l,isEditing:r,integration:c,integrationOption:d}=e,[u,{isLoading:m}]=(0,_.Fy)(),{data:x}=(0,_.oN)({page:1,size:25,connection_config_key:c.key}),g=!!x&&!!x.total,h=(0,a.pmc)(),{toastResult:f}=v({defaultSuccessMsg:"Monitor ".concat(r?"updated":"created"," successfully"),defaultErrorMsg:"A problem occurred while ".concat(r?"updating":"creating"," this monitor")}),j=async e=>{let t;let i=setTimeout(()=>{t||(h({...S.MA,status:"info",description:"Saving this monitor is taking longer than expected. Fides will continue processing it in the background, and you can check back later to view the updates."}),n())},5e3);(t=await u(e))&&(clearTimeout(i),f(t),(0,F.D4)(t)||n())};return d.identifier===z.Rj.WEBSITE?(0,i.jsx)(C.Z,{title:(null==l?void 0:l.name)?"Configure ".concat(l.name):"Configure website monitor",isOpen:t,onClose:n,children:(0,i.jsx)(Y,{monitor:l,url:c.secrets.url,onClose:n,onSubmit:j})}):(0,i.jsxs)(C.Z,{title:(null==l?void 0:l.name)?"Configure ".concat(l.name):"Configure discovery monitor",isOpen:t,onClose:n,children:[0===o&&(0,i.jsx)(I,{monitor:l,onClose:n,onAdvance:s,onSubmit:j,isSubmitting:m,databasesAvailable:g,integrationOption:d}),1===o&&(l?(0,i.jsx)(M,{monitor:l,isEditing:r,isSubmitting:m,onSubmit:j,onClose:n,integrationKey:c.key}):(0,i.jsx)(p.Z,{}))]})},B=n(58452),G=n(79494),X=e=>{let{monitorId:t,onEditClick:n}=e,[o]=(0,_.Sb)(),{toastResult:s}=v({defaultErrorMsg:"A problem occurred deleting this monitor",defaultSuccessMsg:"Monitor deleted successfully"}),[l,{isLoading:r}]=(0,_.V9)(),{toastResult:c}=v({defaultErrorMsg:"A problem occurred initiating monitor execution",defaultSuccessMsg:"Monitor execution successfully started"}),d=async()=>{s(await o({monitor_config_id:t}))},{isOpen:u,onOpen:m,onClose:x}=(0,a.qY0)(),g=async()=>{c(await l({monitor_config_id:t}))};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(B.Z,{isOpen:u,onClose:x,onConfirm:d,title:"Delete monitor",message:"Are you sure you want to delete this discovery monitor?",continueButtonText:"Delete",isCentered:!0}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(a.ua7,{label:"Edit",children:(0,i.jsx)(a.wpx,{onClick:n,size:"small",icon:(0,i.jsx)(a.dY8,{}),"data-testid":"edit-monitor-btn","aria-label":"Edit monitor"})}),(0,i.jsx)(a.ua7,{label:"Delete",children:(0,i.jsx)(a.wpx,{onClick:m,size:"small",icon:(0,i.jsx)(a.pJl,{}),"aria-label":"Delete monitor","data-testid":"delete-monitor-btn"})}),(0,i.jsx)(G.Z,{onClick:g,title:"Scan",loading:r})]})]})};let J=e=>{let{row:t,getValue:n}=e,[a]=(0,_.Fy)(),o=async e=>a({...t.original,enabled:e}),s=n();return(0,i.jsx)(y.S1,{enabled:s,onToggle:o,title:"Disabling monitor",message:"You are about to disable this monitor. If you continue, it will no longer scan automatically."})},$={items:[],total:0,page:1,size:50,pages:0},Q=(0,x.Cl)(),ee=e=>{let{onAddClick:t}=e;return(0,i.jsx)(a.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,i.jsxs)(a.gCW,{children:[(0,i.jsx)(a.xvT,{fontSize:"md",fontWeight:"600",children:"No monitors"}),(0,i.jsx)(a.xvT,{fontSize:"sm",children:'You have not configured any data discovery monitors. Click "Add monitor" to configure data discovery now.'}),(0,i.jsx)(a.wpx,{onClick:t,type:"primary",children:"Add monitor"})]})})};var et=e=>{let{integration:t,integrationOption:n}=e,{PAGE_SIZES:o,pageSize:s,setPageSize:l,onPreviousPageClick:r,isPreviousPageDisabled:c,onNextPageClick:d,isNextPageDisabled:u,startRange:m,endRange:b,pageIndex:v,setTotalPages:C}=(0,j.oi)(),{isLoading:S,isFetching:k,data:w}=(0,_.Fu)({page:v,size:s,connection_config_key:t.key}),R=(0,a.qY0)(),[T,E]=(0,h.useState)(void 0),[q,M]=(0,h.useState)(!1),[L,D]=(0,h.useState)(0),N=e=>{E(e),M(!0),R.onOpen()},A=null!=w?w:$,{items:Z,total:O,pages:I}=(0,h.useMemo)(()=>A,[A]);(0,h.useEffect)(()=>{C(I)},[I,C]);let V=(0,h.useMemo)(()=>[Q.accessor(e=>e.name,{id:"name",cell:e=>(0,i.jsx)(j.G3,{value:e.getValue()}),header:e=>(0,i.jsx)(j.Rr,{value:"Name",...e})}),Q.accessor(e=>e.databases,{id:"projects",cell:e=>0===e.getValue().length?(0,i.jsx)(j.G3,{value:"All projects"}):(0,i.jsx)(j.WP,{suffix:"Projects",value:e.getValue(),...e,cellState:{isExpanded:!0}}),header:e=>(0,i.jsx)(j.Rr,{value:"Scope",...e})}),Q.accessor(e=>e.execution_frequency,{id:"frequency",cell:e=>{var t;return(0,i.jsx)(j.G3,{value:null!==(t=e.getValue())&&void 0!==t?t:"Not scheduled"})},header:e=>(0,i.jsx)(j.Rr,{value:"Scan frequency",...e})}),Q.accessor(e=>e.last_monitored,{id:"last_monitored",cell:e=>(0,i.jsx)(y.Cy,{time:e.getValue()}),header:e=>(0,i.jsx)(j.Rr,{value:"Last scan",...e})}),Q.accessor(e=>e.enabled,{id:"status",cell:J,header:e=>(0,i.jsx)(j.Rr,{value:"Status",...e}),size:0,meta:{disableRowClick:!0}}),Q.display({id:"action",cell:e=>(0,i.jsx)(X,{onEditClick:()=>N(e.row.original),monitorId:e.row.original.key}),header:"Actions",meta:{disableRowClick:!0}})],[]),H=(0,g.b7)({getCoreRowModel:(0,x.sC)(),getGroupedRowModel:(0,x.qe)(),getExpandedRowModel:(0,x.rV)(),getRowId:e=>e.name,manualPagination:!0,data:Z,columns:V,columnResizeMode:"onChange"});return S?(0,i.jsx)(p.Z,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.xvT,{maxW:"720px",mb:6,fontSize:"sm","data-testid":"monitor-description",children:(null==n?void 0:n.identifier)===z.Rj.WEBSITE?"Configure your website monitor to identify active ad tech vendors and tracking technologies across your site. This monitor will analyze selected pages for vendor activity, compliance with privacy requirements, and data collection practices. Set your preferences below to customize the monitor frequency and scan locations.":"A data discovery monitor observes configured systems for data model changes to proactively discover and classify data risks. Monitors can observe part or all of a project, dataset, table, or API for changes and each can be assigned to a different data steward."}),(0,i.jsxs)(j.Q$,{children:[(0,i.jsx)(a.LZC,{}),(0,i.jsx)(a.wpx,{onClick:R.onOpen,icon:(0,i.jsx)(f,{}),iconPosition:"end","data-testid":"add-monitor-btn",children:"Add monitor"}),(0,i.jsx)(K,{isOpen:R.isOpen,onClose:()=>{E(void 0),M(!1),D(0),R.onClose()},formStep:L,onAdvance:e=>{E(e),D(1)},monitor:T,isEditing:q,integration:t,integrationOption:n})]}),(0,i.jsx)(j.ZK,{tableInstance:H,onRowClick:N,emptyTableNotice:(0,i.jsx)(ee,{onAddClick:R.onOpen})}),(0,i.jsx)(j.s8,{totalRows:O||0,pageSizes:o,setPageSize:l,onPreviousPageClick:r,isPreviousPageDisabled:c||k,onNextPageClick:d,isNextPageDisabled:u||k,startRange:m,endRange:b})]})},en=n(15987),ei=n(64176),ea=e=>{let{isOpen:t,onClose:n,connection:a}=e,o=(0,ei.Z)(a.connection_type);return(0,i.jsx)(C.Z,{title:"Manage integration secret",isOpen:t,onClose:n,children:(0,i.jsx)(en.Z,{connection:a,connectionOption:o,onCancel:n})})},eo=n(41553),es=n(75595),el=()=>{var e,t;let{query:n}=(0,o.useRouter)(),x=Array.isArray(n.id)?n.id[0]:n.id,{data:g,isLoading:h}=(0,d.jA)(null!=x?x:""),p=(0,ei.Z)(null==g?void 0:g.connection_type),{testConnection:f,isLoading:j,testData:y}=(0,u.Z)(g),{onOpen:_,isOpen:b,onClose:v}=(0,a.qY0)(),{overview:C,instructions:S}=(0,m.ZP)(null==g?void 0:g.connection_type),k=(0,o.useRouter)();g&&!m.jq.includes(g.connection_type)&&k.push(r.KH);let w=[{label:"Connection",content:(0,i.jsxs)(a.xuv,{maxW:"720px",children:[(0,i.jsxs)(a.kCb,{borderRadius:"md",outline:"1px solid",outlineColor:"gray.100",align:"center",p:3,children:[(0,i.jsx)(a.kCb,{flexDirection:"column",children:(0,i.jsx)(eo.Z,{testData:y})}),(0,i.jsx)(a.LZC,{}),(0,i.jsxs)("div",{className:"flex gap-4",children:[(0,i.jsx)(a.wpx,{onClick:f,loading:j,"data-testid":"test-connection-btn",children:"Test connection"}),(0,i.jsx)(a.wpx,{onClick:_,"data-testid":"manage-btn",children:"Manage"})]})]}),(0,i.jsx)(ea,{isOpen:b,onClose:v,connection:g}),C,S]})},{label:"Data discovery",content:(0,i.jsx)(et,{integration:g,integrationOption:p})}];return(0,i.jsx)(l.Z,{title:"Integrations",children:(0,i.jsxs)(c.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations",href:r.KH},{title:null!==(t=null!==(e=null==g?void 0:g.name)&&void 0!==e?e:null==g?void 0:g.key)&&void 0!==t?t:""}],children:[(0,i.jsx)(es.Z,{integration:g,showDeleteButton:!0}),h?(0,i.jsx)(a.$jN,{}):!!g&&(0,i.jsx)(s.Z,{data:w,isLazy:!0})]})})}}},function(e){e.O(0,[8033,2780,2858,2866,9278,9255,4481,5834,5973,2888,9774,179],function(){return e(e.s=50697)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[710],{9387:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations",function(){return t(22406)}])},97181:function(e,n,t){"use strict";t.d(n,{d:function(){return c}});var i=t(24246),r=t(56351),l=t(34090),o=t(27378),a=t(91613),s=t(40324);let c=e=>{let{name:n,label:t,labelProps:c,tooltip:d,isRequired:u,layout:g="inline",...f}=e,[x,m,{setValue:h}]=(0,l.U$)(n),p=!!(m.touched&&m.error),[v,j]=(0,o.useState)("");x.value||"tags"!==f.mode&&"multiple"!==f.mode||(x.value=[]),"tags"===f.mode&&"string"==typeof x.value&&(x.value=[x.value]);let C="tags"===f.mode?(e,n)=>e?e.value!==v||x.value.includes(v)?f.optionRender?f.optionRender(e,n):e.label:'Create "'.concat(v,'"'):void 0:f.optionRender||void 0,y=e=>{j(e),f.onSearch&&f.onSearch(e)},b=(e,n)=>{h(e),f.onChange&&f.onChange(e,n)};return"inline"===g?(0,i.jsx)(r.NIc,{isInvalid:p,isRequired:u,children:(0,i.jsxs)(r.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,i.jsx)(s.__,{htmlFor:f.id||n,...c,children:t}):null,(0,i.jsxs)(r.jqI,{align:"center",children:[(0,i.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(r.WPr,{...x,id:f.id||n,"data-testid":"controlled-select-".concat(x.name),...f,optionRender:C,onSearch:"tags"===f.mode?y:void 0,onChange:b,value:x.value||void 0}),(0,i.jsx)(s.Bc,{isInvalid:p,message:m.error,fieldName:x.name})]}),d?(0,i.jsx)(a.Z,{label:d}):null]})]})}):(0,i.jsx)(r.NIc,{isInvalid:p,isRequired:u,children:(0,i.jsxs)(r.gCW,{alignItems:"start",children:[(0,i.jsxs)(r.jqI,{align:"center",children:[t?(0,i.jsx)(s.__,{htmlFor:f.id||n,fontSize:"xs",my:0,mr:1,...c,children:t}):null,d?(0,i.jsx)(a.Z,{label:d}):null]}),(0,i.jsx)(r.WPr,{...x,id:f.id||n,"data-testid":"controlled-select-".concat(x.name),...f,optionRender:C,onSearch:"tags"===f.mode?y:void 0,onChange:b,value:x.value||void 0}),(0,i.jsx)(s.Bc,{isInvalid:p,message:m.error,fieldName:x.name})]})})}},812:function(e,n,t){"use strict";t.d(n,{D4:function(){return l.D4},MM:function(){return g},Ot:function(){return c},c6:function(){return r},cj:function(){return x},e$:function(){return a},fn:function(){return s},iC:function(){return f},nU:function(){return u},tB:function(){return d}});var i,r,l=t(19043);let o="An unexpected error occurred. Please try again.",a=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if((0,l.Bw)(e)){if((0,l.hE)(e.data))return e.data.detail;if((0,l.cz)(e.data)){var t;let n=null===(t=e.data.detail)||void 0===t?void 0:t[0];return"".concat(null==n?void 0:n.msg,": ").concat(null==n?void 0:n.loc)}if(409===e.status&&(0,l.Dy)(e.data)||404===e.status&&(0,l.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return n};function s(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:o};if((0,l.oK)(e))return{status:e.originalStatus,message:e.data};if((0,l.Bw)(e)){let{status:t}=e;return{status:t,message:a(e,n.message)}}return n},g=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let f={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},x=e=>{let n=e.split(".")[0];return"gacp"===n?"gacp":"gvl"===n?"gvl":"compass"}},22406:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return L}});var i,r,l,o,a=t(24246),s=t(56351),c=t(27378),d=t(7617),u=t(18225),g=t(77213),f=t(58754),x=t(14207),m=t(8133),h=t(15987),p=t(75595),v=e=>{let{integrationType:n,onConfigure:t,onCancel:i}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Z,{integration:null==n?void 0:n.placeholder,onConfigureClick:t}),null==n?void 0:n.overview,(0,a.jsxs)(s.kCb,{children:[(0,a.jsx)(s.LZC,{}),(0,a.jsx)(s.wpx,{onClick:i,children:"Cancel"})]})]})},j=t(25980),C=t(7621);(i=l||(l={})).ALL="All",i.DATABASE="Database",i.DATA_CATALOG="Data Catalog",i.DATA_WAREHOUSE="Data Warehouse",i.WEBSITE="Website";var y=e=>{var n;let t=Object.values(l),[i,r]=(0,c.useState)(0),o=t[i],[a,s]=(0,c.useState)(!1),d="All"!==o,u=null!==(n=null==e?void 0:e.filter(e=>!d||e.category===o))&&void 0!==n?n:[];return{tabs:t,tabIndex:i,anyFiltersApplied:d,isFiltering:a,onChangeFilter:e=>{s(!0),r(e),setTimeout(()=>s(!1),100)},filteredTypes:u}},b=e=>{let{onCancel:n,onDetailClick:t,onConfigureClick:i}=e,{tabIndex:r,onChangeFilter:l,isFiltering:o,filteredTypes:c,tabs:g}=y(C.FO),{flags:{datahub:f}}=(0,j.Vb)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.mQc,{index:r,onChange:l,mb:4,children:(0,a.jsx)(s.tdY,{children:g.map(e=>(0,a.jsx)(d.q,{label:e},e))})}),o?(0,a.jsx)(u.Z,{}):(0,a.jsx)(s.kCb,{direction:"column",children:c.map(e=>f||"datahub"!==e.placeholder.connection_type?(0,a.jsx)(p.Z,{integration:e.placeholder,onConfigureClick:()=>i(e),otherButtons:(0,a.jsx)(s.wpx,{onClick:()=>t(e),children:"Details"})},e.placeholder.key):null)}),(0,a.jsxs)(s.kCb,{children:[(0,a.jsx)(s.LZC,{}),(0,a.jsx)(s.wpx,{onClick:n,children:"Cancel"})]})]})},_=t(64176);(r=o||(o={})).LIST_VIEW="list-view",r.DETAIL="detail",r.FORM="form";var A=e=>{let{isOpen:n,onClose:t}=e,[i,r]=(0,c.useState)("list-view"),[l,o]=(0,c.useState)(),s=(0,_.Z)(null==l?void 0:l.placeholder.connection_type),d=()=>{r("list-view"),o(void 0),t()},u=l?"".concat(l.placeholder.name," Integration"):"Add integration";return(0,a.jsxs)(m.Z,{size:"2xl",isOpen:n,onClose:d,title:u,children:["list-view"===i&&(0,a.jsx)(b,{onCancel:d,onDetailClick:e=>{r("detail"),o(e)},onConfigureClick:e=>{r("form"),o(e)}}),"detail"===i&&(0,a.jsx)(v,{integrationType:l,onConfigure:()=>r("form"),onCancel:d}),"form"===i&&(0,a.jsx)(h.Z,{connectionOption:s,onCancel:d})]})},k=t(86677),w=t(77830),I=e=>{let{isFiltered:n,onOpenAddModal:t}=e;return(0,a.jsxs)(s.kCb,{direction:"column",alignItems:"center","data-testid":"empty-state",children:[(0,a.jsx)(s.xvT,{color:"gray.700",fontWeight:"semibold",fontSize:"md",children:"No integrations"}),(0,a.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",marginTop:"8px",children:n?"No integrations match your filters":"You have not configured any integrations"}),(0,a.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",children:'Click "Add integration" to connect and configure systems now.'}),(0,a.jsx)(s.wpx,{type:"primary",onClick:t,className:"mt-4",children:"Add integration"})]})},S=e=>{let{integrations:n,isFiltered:t,onOpenAddModal:i}=e,r=(0,k.useRouter)();return(0,a.jsx)(s.xuv,{marginTop:"24px",children:n.length?n.map(e=>(0,a.jsx)(p.Z,{integration:e,showTestNotice:!0,configureButtonLabel:"Manage",onConfigureClick:()=>r.push("".concat(w.KH,"/").concat(e.key))},e.key)):(0,a.jsx)(I,{onOpenAddModal:i,isFiltered:t})})},L=()=>{var e,n;let{data:t,isLoading:i}=(0,x.AZ)({connection_type:C.jq}),{onOpen:r,isOpen:l,onClose:o}=(0,s.qY0)(),{tabIndex:c,onChangeFilter:m,anyFiltersApplied:h,isFiltering:p,filteredTypes:v,tabs:j}=y(null==t?void 0:null===(e=t.items)||void 0===e?void 0:e.map(e=>(0,C.ZP)(e.connection_type))),b=null!==(n=null==t?void 0:t.items.filter(e=>v.some(n=>n.placeholder.connection_type===e.connection_type)))&&void 0!==n?n:[];return(0,a.jsxs)(g.Z,{title:"Integrations",children:[(0,a.jsx)(f.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations"}]}),(0,a.jsxs)(s.xuv,{"data-testid":"integration-tabs",display:"flex",children:[(0,a.jsx)(s.mQc,{index:c,onChange:m,w:"full",children:(0,a.jsx)(s.tdY,{children:j.map(e=>(0,a.jsx)(d.q,{label:e},e))})}),(0,a.jsx)(s.xuv,{borderBottom:"2px solid",borderColor:"gray.200",height:"fit-content",pr:"2",pb:"2",children:(0,a.jsx)(s.wpx,{onClick:r,"data-testid":"add-integration-btn",icon:(0,a.jsx)(s.xPt,{}),iconPosition:"end",children:"Add Integration"})})]}),i||p?(0,a.jsx)(u.Z,{}):(0,a.jsx)(S,{integrations:b,onOpenAddModal:r,isFiltered:h}),(0,a.jsx)(A,{isOpen:l,onClose:o})]})}},19043:function(e,n,t){"use strict";t.d(n,{Bw:function(){return o},D4:function(){return r},Dy:function(){return s},XD:function(){return c},cz:function(){return d},hE:function(){return a},oK:function(){return l}});var i=t(76649);let r=e=>"error"in e,l=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,o=e=>(0,i.Ln)({status:"number",data:{}},e),a=e=>(0,i.Ln)({detail:"string"},e),s=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)}},function(e){e.O(0,[2858,2866,9278,6834,5973,2888,9774,179],function(){return e(e.s=9387)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2815],{79349:function(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},52033:function(e,t,n){var i=n(26194),r=n(26789)(i);e.exports=r},23545:function(e,t,n){var i=n(97141),r=n(72889);e.exports=function e(t,n,s,a,o){var l=-1,c=t.length;for(s||(s=r),o||(o=[]);++l<c;){var u=t[l];n>0&&s(u)?n>1?e(u,n-1,s,a,o):i(o,u):a||(o[o.length]=u)}return o}},49819:function(e,t,n){var i=n(18911)();e.exports=i},26194:function(e,t,n){var i=n(49819),r=n(50098);e.exports=function(e,t){return e&&i(e,t,r)}},67375:function(e,t,n){var i=n(52033),r=n(80068);e.exports=function(e,t){var n=-1,s=r(e)?Array(e.length):[];return i(e,function(e,i,r){s[++n]=t(e,i,r)}),s}},98497:function(e,t,n){var i=n(66070),r=n(79867),s=n(89278),a=n(67375),o=n(73303),l=n(39334),c=n(96348),u=n(31137),d=n(19785);e.exports=function(e,t,n){t=t.length?i(t,function(e){return d(e)?function(t){return r(t,1===e.length?e[0]:e)}:e}):[u];var p=-1;return t=i(t,l(s)),o(a(e,function(e,n,r){return{criteria:i(t,function(t){return t(e)}),index:++p,value:e}}),function(e,t){return c(e,t,n)})}},1197:function(e,t,n){var i=n(31137),r=n(11871),s=n(63132);e.exports=function(e,t){return s(r(e,t,i),e+"")}},54459:function(e,t,n){var i=n(551),r=n(42630),s=n(31137),a=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:s;e.exports=a},73303:function(e){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},17845:function(e,t,n){var i=n(55193);e.exports=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,s=e==e,a=i(e),o=void 0!==t,l=null===t,c=t==t,u=i(t);if(!l&&!u&&!a&&e>t||a&&o&&c&&!l&&!u||r&&o&&c||!n&&c||!s)return 1;if(!r&&!a&&!u&&e<t||u&&n&&s&&!r&&!a||l&&n&&s||!o&&s||!c)return -1}return 0}},96348:function(e,t,n){var i=n(17845);e.exports=function(e,t,n){for(var r=-1,s=e.criteria,a=t.criteria,o=s.length,l=n.length;++r<o;){var c=i(s[r],a[r]);if(c){if(r>=l)return c;return c*("desc"==n[r]?-1:1)}}return e.index-t.index}},26789:function(e,t,n){var i=n(80068);e.exports=function(e,t){return function(n,r){if(null==n)return n;if(!i(n))return e(n,r);for(var s=n.length,a=t?s:-1,o=Object(n);(t?a--:++a<s)&&!1!==r(o[a],a,o););return n}}},18911:function(e){e.exports=function(e){return function(t,n,i){for(var r=-1,s=Object(t),a=i(t),o=a.length;o--;){var l=a[e?o:++r];if(!1===n(s[l],l,s))break}return t}}},42630:function(e,t,n){var i=n(81822),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},72889:function(e,t,n){var i=n(96539),r=n(2900),s=n(19785),a=i?i.isConcatSpreadable:void 0;e.exports=function(e){return s(e)||r(e)||!!(a&&e&&e[a])}},57535:function(e,t,n){var i=n(85638),r=n(80068),s=n(42383),a=n(11611);e.exports=function(e,t,n){if(!a(n))return!1;var o=typeof t;return("number"==o?!!(r(n)&&s(t,n.length)):"string"==o&&t in n)&&i(n[t],e)}},11871:function(e,t,n){var i=n(79349),r=Math.max;e.exports=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var s=arguments,a=-1,o=r(s.length-t,0),l=Array(o);++a<o;)l[a]=s[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=s[a];return c[t]=n(l),i(e,this,c)}}},63132:function(e,t,n){var i=n(54459),r=n(49591)(i);e.exports=r},49591:function(e){var t=Date.now;e.exports=function(e){var n=0,i=0;return function(){var r=t(),s=16-(r-i);if(i=r,s>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},551:function(e){e.exports=function(e){return function(){return e}}},95099:function(e,t,n){var i=n(23545),r=n(98497),s=n(1197),a=n(57535),o=s(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,i(t,1),[])});e.exports=o},24081:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/messaging",function(){return n(18504)}])},35287:function(e,t,n){"use strict";var i=n(24246),r=n(56351),s=n(88038),a=n.n(s);n(27378),t.Z=e=>{let{children:t,title:n,mainProps:s}=e;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:t})]})}},87361:function(e,t,n){"use strict";var i=n(24246),r=n(56351);t.Z=e=>{let{title:t,text:n,onClose:s}=e;return(0,i.jsxs)(r.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderRadius:"md",justifyContent:"space-between",py:4,pr:6,pl:3,"data-testid":"empty-state",gap:2,position:"relative",children:[s&&(0,i.jsx)(r.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:s}),(0,i.jsx)(r.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,i.jsxs)(r.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,i.jsx)(r.X6q,{fontSize:"md",children:t}),(0,i.jsx)(r.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:n})]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(56351),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:c,...u}=e;return(0,i.jsxs)("div",{...u,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(s.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var i=n(24246),r=n(56351),s=n(79894),a=n.n(s),o=n(27378);let{Text:l}=r.AntTypography,c=e=>{let{items:t,...n}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,o={...e},c=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:o.title})),c)?o.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(r.zrq,{items:s,...n})}},67810:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}}),(i=r||(r={})).PRIVACY_REQUEST_REVIEW_APPROVE="privacy_request_review_approve",i.PRIVACY_REQUEST_REVIEW_DENY="privacy_request_review_deny",i.PRIVACY_REQUEST_RECEIPT="privacy_request_receipt",i.PRIVACY_REQUEST_COMPLETE_ACCESS="privacy_request_complete_access",i.PRIVACY_REQUEST_COMPLETE_DELETION="privacy_request_complete_deletion",i.SUBJECT_IDENTITY_VERIFICATION="subject_identity_verification";var i,r,s={[r.PRIVACY_REQUEST_COMPLETE_ACCESS]:"Access request completed",[r.PRIVACY_REQUEST_COMPLETE_DELETION]:"Erasure request completed",[r.PRIVACY_REQUEST_RECEIPT]:"Privacy request received",[r.PRIVACY_REQUEST_REVIEW_APPROVE]:"Privacy request approved",[r.PRIVACY_REQUEST_REVIEW_DENY]:"Privacy request denied",[r.SUBJECT_IDENTITY_VERIFICATION]:"Subject identity verification"}},5058:function(e,t,n){"use strict";n.d(t,{Vw:function(){return s},ms:function(){return i},pS:function(){return r},vm:function(){return a}});let{useGetSummaryMessagingTemplatesQuery:i,usePutMessagingTemplateByIdMutation:r,useCreateMessagingTemplateByTypeMutation:s,usePatchMessagingTemplateByIdMutation:a}=n(78780).u.injectEndpoints({endpoints:e=>({getSummaryMessagingTemplates:e.query({query:e=>({method:"GET",url:"plus/messaging/templates/summary",params:e}),providesTags:()=>["Property-Specific Messaging Templates"]}),putMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"PUT",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),patchMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"PATCH",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),createMessagingTemplateByType:e.mutation({query:e=>{let{templateType:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"POST",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]})})})},18504:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return M}});var i=n(24246),r=n(92222),s=n(59003),a=n(56351),o=n(95099),l=n.n(o),c=n(86677),u=n(27378),d=n(35287),p=n(71795),g=n(87361),m=n(77830),f=n(58754),x=n(91613),h=n(14481),v=n(42904),j=n(67810),y=e=>{let{isOpen:t,onClose:n,onAccept:r}=e,[s,o]=(0,u.useState)(void 0),l=Object.keys(j.Z).map(e=>({value:e,label:j.Z[e]}));return(0,i.jsxs)(a.u_l,{isOpen:t,onClose:n,size:"2xl",isCentered:!0,children:[(0,i.jsx)(a.ZAr,{}),(0,i.jsxs)(a.hzk,{"data-testid":"add-messaging-template-modal",children:[(0,i.jsx)(a.xBx,{borderBottomWidth:1,fontWeight:"bold",children:"Select message template"}),(0,i.jsxs)(a.fef,{children:[(0,i.jsx)(a.xvT,{color:"gray.700",fontWeight:"medium",fontSize:"sm",marginBottom:3,marginTop:1,children:"Add a new email message by selecting a template below and clicking accept."}),(0,i.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"medium",marginBottom:2,children:"Choose template:"}),(0,i.jsx)(a.xuv,{"data-testid":"template-type-selector",children:(0,i.jsx)(a.WPr,{options:l,onChange:e=>{o(e)},className:"w-full"})})]}),(0,i.jsx)(a.mzw,{justifyContent:"flex-start",children:(0,i.jsxs)("div",{className:"flex w-full gap-4",children:[(0,i.jsx)(a.wpx,{onClick:n,"data-testid":"cancel-btn",className:"grow",children:"Cancel"}),(0,i.jsx)(a.wpx,{onClick:()=>r(s),type:"primary","data-testid":"confirm-btn",disabled:!s,className:"grow",children:"Next"})]})})]})]})},b=n(5058),_=n(812),E=n(46628),C=n(31883),T=()=>{let e=(0,a.pmc)(),[t]=(0,b.vm)();return{toggleIsTemplateEnabled:(0,u.useCallback)(async n=>{let{isEnabled:i,templateId:r}=n,s=await t({templateId:r,template:{is_enabled:i}});if((0,C.D4)(s)){e((0,E.Vo)((0,_.e$)(s.error)));return}e((0,E.t5)("Messaging template ".concat(i?"enabled":"disabled")))},[t,e])}},w=n(99716),R=n(64826);let P=(0,r.Cl)(),S={items:[],total:0,page:1,size:50,pages:1},I=()=>(0,i.jsx)(a.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,i.jsxs)(a.gCW,{children:[(0,i.jsx)(a.xvT,{fontSize:"md",fontWeight:"600",children:"It looks like it’s your first time here!"}),(0,i.jsxs)(a.xvT,{fontSize:"sm",children:["Add new email templates with the ",'"Add message +"'," button.",(0,i.jsx)("br",{})]})]})}),k=()=>{let{isLoading:e,data:t}=(0,R.gz)({page:1,size:100}),n=null==t?void 0:t.items.filter(e=>!e.messaging_templates||0===e.messaging_templates.length),r=!!(!e&&(null==n?void 0:n.length)),s="missing-messages-notice-".concat(null==n?void 0:n.map(e=>e.id).join("-")),[o,l]=(0,p._)("notices.dismissedMessageNoticeId",""),c=s===o;return r&&!c?(0,i.jsx)(a.xuv,{mb:6,"data-testid":"notice-properties-without-messaging-templates",children:(0,i.jsx)(g.Z,{title:"Not all properties have messages configured.",text:(0,i.jsxs)(a.xvT,{as:"span",children:["You have properties that do not have messages configured. Users who submit privacy requests for these properties may not receive the necessary emails regarding their requests."," ",(0,i.jsx)(a.xuv,{as:"span",children:(0,i.jsx)(x.Z,{label:null==n?void 0:n.map(e=>e.name).join(", ")})})]}),onClose:()=>{l(s)}})}):null},A=()=>{let{data:e}=(0,w.tB)({api_set:!1});return(null==e?void 0:e.notifications.enable_property_specific_messaging)?null:(0,i.jsx)(a.xuv,{mb:6,"data-testid":"notice-properties-without-messaging-templates",children:(0,i.jsx)(g.Z,{title:"Basic messaging enabled",text:(0,i.jsxs)(a.xvT,{as:"span",children:["In basic messaging mode, you can edit the content of your messages from this screen. Please note that in basic messaging, the “Enable” toggle does not apply. Fides also supports property specific messaging mode. Read our"," ",(0,i.jsx)(a.rUS,{href:"https://fid.es/property-specific-messaging",target:"_blank",rel:"nofollow",textDecoration:"underline",children:"docs"})," ","for more information about property specific mode or contact"," ",(0,i.jsx)(a.rUS,{href:"mailto:support@ethyca.com",textDecoration:"underline",children:"Ethyca support"})," ","to enable this mode on your Fides instance."]})})})};var M=()=>{let e=(0,c.useRouter)(),{toggleIsTemplateEnabled:t}=T(),{PAGE_SIZES:n,pageSize:o,setPageSize:p,onPreviousPageClick:g,isPreviousPageDisabled:x,onNextPageClick:_,isNextPageDisabled:E,startRange:C,endRange:w,pageIndex:R,setTotalPages:M}=(0,h.oi)(),{data:N,isLoading:z,isFetching:q}=(0,b.ms)({page:R,size:o}),{items:V,total:O,pages:U}=(0,u.useMemo)(()=>null!=N?N:S,[N]);(0,u.useEffect)(()=>{M(U)},[U,M]);let[W,B]=(0,u.useState)(!1),Y=(0,u.useMemo)(()=>[P.accessor(e=>e.type,{id:"message",cell:e=>(0,i.jsx)(h.G3,{value:j.Z[e.getValue()]}),header:e=>(0,i.jsx)(h.Rr,{value:"Message",...e}),size:150}),P.accessor(e=>(e.properties||[]).map(e=>e.name),{id:"properties",cell:e=>(0,i.jsx)(h.WP,{suffix:"properties",value:e.getValue(),...e}),header:e=>(0,i.jsx)(h.Rr,{value:"Properties",...e}),meta:{showHeaderMenu:!0},size:250}),P.accessor(e=>e.is_enabled,{id:"is_enabled",cell:e=>(0,i.jsx)(a.kCb,{align:"center",justifyContent:"flex-start",w:"full",h:"full",children:(0,i.jsx)(a.rAg,{checked:e.getValue(),onChange:n=>{t({isEnabled:n,templateId:e.row.original.id})}})}),header:e=>(0,i.jsx)(h.Rr,{value:"Enable",...e}),size:200,meta:{disableRowClick:!0}})],[t]),D=(0,u.useMemo)(()=>l()(V,"id"),[V]),Z=(0,s.b7)({getCoreRowModel:(0,r.sC)(),getFilteredRowModel:(0,r.vL)(),getSortedRowModel:(0,r.tj)(),columns:Y,data:D,columnResizeMode:"onChange"});return(0,i.jsxs)(d.Z,{title:"Messaging",children:[(0,i.jsx)(f.Z,{heading:"Messaging"}),(0,i.jsx)(A,{}),(0,i.jsx)(k,{}),(0,i.jsx)(h.Q$,{children:(0,i.jsx)(a.Ugi,{alignItems:"center",spacing:4,marginLeft:"auto",children:(0,i.jsx)(a.wpx,{type:"primary","data-testid":"add-message-btn",onClick:()=>B(!0),children:"Add message +"})})}),z?(0,i.jsx)(h.I4,{rowHeight:36,numRows:15}):(0,i.jsx)(h.ZK,{tableInstance:Z,onRowClick:t=>{e.push({pathname:m.ax,query:{id:t.id}})},emptyTableNotice:(0,i.jsx)(I,{})}),(0,i.jsx)(v.s8,{totalRows:O||0,pageSizes:n,setPageSize:p,onPreviousPageClick:g,isPreviousPageDisabled:x||q,onNextPageClick:_,isNextPageDisabled:E||q,startRange:C,endRange:w}),(0,i.jsx)(y,{isOpen:W,onClose:()=>B(!1),onAccept:t=>{e.push({pathname:m.sM,query:{templateType:t}})}})]})}},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=n(19043)}},function(e){e.O(0,[8033,2780,2858,2866,9278,4481,2888,9774,179],function(){return e(e.s=24081)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{13687:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/messaging",function(){return i(50019)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var n=i(24246),s=i(56351),r=i(88038),l=i.n(r),a=i(86677);i(27378);var o=i(25980),c=i(90867),u=i(77830),d=()=>{let e=(0,a.useRouter)();return(0,n.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(s.xuv,{children:[(0,n.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(s.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,n.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:u}=e,m=(0,o.hz)(),p=(0,a.useRouter)(),x="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(m.flags.privacyRequestsConfiguration&&x),{data:g}=(0,c.JE)(void 0,{skip:h}),{data:f}=(0,c.PW)(void 0,{skip:h}),y=m.flags.privacyRequestsConfiguration&&(!g||!f)&&x;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,n.jsx)(d,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(56351),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:a,rightContent:o,style:c,...u}=e;return(0,n.jsxs)("div",{...u,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.X6q,{className:i||a?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return c},c6:function(){return s},cj:function(){return x},e$:function(){return a},fn:function(){return o},iC:function(){return p},nU:function(){return d},tB:function(){return u}});var n,s,r=i(19043);let l="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:l};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:i}=e;return{status:i,message:a(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=s||(s={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},x=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),s=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?i=t.data.detail:(0,s.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var n=i(24246),s=i(56351);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)},successAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return c}});var n=i(24246),s=i(56351),r=i(79894),l=i.n(r),a=i(27378);let{Text:o}=s.AntTypography,c=e=>{let{items:t,...i}=e,r=(0,a.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,a={...e},c=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:a.title})),c)?a.title=(0,n.jsx)(s.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,n.jsx)(l(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,n.jsx)(s.zrq,{items:r,...i})}},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return s},kN:function(){return l},qX:function(){return a},rE:function(){return r}});var n=i(21702);let s=[...new Map([[n.q2.APPROVED,"Approved"],[n.q2.CANCELED,"Canceled"],[n.q2.COMPLETE,"Completed"],[n.q2.DENIED,"Denied"],[n.q2.ERROR,"Error"],[n.q2.IN_PROCESSING,"In Progress"],[n.q2.PENDING,"New"],[n.q2.PAUSED,"Paused"],[n.q2.IDENTITY_UNVERIFIED,"Unverified"],[n.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[n.Us.ACCESS,"Access"],[n.Us.ERASURE,"Erasure"],[n.Us.CONSENT,"Consent"],[n.Us.UPDATE,"Update"]]),l=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),a={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3"}},50019:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return v}});var n=i(24246),s=i(56351),r=i(27378),l=i(812),a=i(14047),o=i(77213),c=i(77830),u=i(58754),d=i(71784),m=i(90867),p=i(34090),x=i(40324),h=e=>{let{messagingDetails:t}=e,{successAlert:i}=(0,a.V)(),{handleError:r}=(0,a.H)(),[o]=(0,m.SU)(),c=t.service_type===d.qX.twilio_email||t.service_type===d.qX.mailgun,u=t.service_type===d.qX.twilio_text,h=async e=>{if(c){let t=await o({email:e.email});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}if(u){let t=await o({phone_number:e.phone});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,mb:5,children:"Test connection"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:{email:"",phone:""},onSubmit:h,children:e=>{let{isSubmitting:t,resetForm:i}=e;return(0,n.jsxs)(p.l0,{children:[c?(0,n.jsx)(x.j0,{name:"email",label:"Email",placeholder:"youremail@domain.com",isRequired:!0}):null,u?(0,n.jsx)(x.j0,{name:"phone",label:"Phone",placeholder:"+10000000000",isRequired:!0}):null,(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]})},g=()=>{var e;let{successAlert:t}=(0,a.V)(),[i,o]=(0,r.useState)(""),{handleError:c}=(0,a.H)(),{data:u}=(0,m.S3)({type:d.qX.mailgun}),[g]=(0,m.h9)(),[f]=(0,m.iI)(),y=async e=>{let i=await g({service_type:d.qX.mailgun,details:{is_eu_domain:"false",domain:e.domain}});(0,l.D4)(i)?c(i.error):(t("Mailgun email successfully updated. You can now enter your security key."),o("apiKey"))},j=async e=>{let i=await f({details:{mailgun_api_key:e.api_key},service_type:d.qX.mailgun});(0,l.D4)(i)?c(i.error):(t("Mailgun security key successfully updated."),o("testConnection"))},v={domain:null!==(e=null==u?void 0:u.details.domain)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Mailgun messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:v,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(x.j0,{name:"domain",label:"Domain",placeholder:"Enter domain","data-testid":"option-twilio-domain",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{htmlType:"submit",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"apiKey"===i||"testConnection"===i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:{api_key:""},onSubmit:j,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsx)(x.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===i?(0,n.jsx)(h,{messagingDetails:u||{service_type:d.qX.mailgun}}):null]})},f=()=>{var e;let[t,i]=(0,r.useState)(""),{successAlert:o}=(0,a.V)(),{handleError:c}=(0,a.H)(),{data:u}=(0,m.S3)({type:d.qX.twilio_email}),[g]=(0,m.h9)(),[f]=(0,m.iI)(),y=async e=>{let t=await g({service_type:d.qX.twilio_email,details:{twilio_email_from:e.email}});(0,l.D4)(t)?c(t.error):(o("Twilio email successfully updated. You can now enter your security key."),i("configureTwilioEmailSecrets"))},j=async e=>{let t=await f({details:{twilio_api_key:e.api_key},service_type:d.qX.twilio_email});(0,l.D4)(t)?c(t.error):(o("Twilio email secrets successfully updated."),i("testConnection"))},v={email:null!==(e=null==u?void 0:u.details.twilio_email_from)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio Email messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:v,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(x.j0,{name:"email",label:"Email",placeholder:"Enter email",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"configureTwilioEmailSecrets"===t||"testConnection"===t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:{api_key:""},onSubmit:j,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(x.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===t?(0,n.jsx)(h,{messagingDetails:u||{service_type:d.qX.twilio_email}}):null]})},y=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,o]=(0,r.useState)(""),{data:c}=(0,m.S3)({type:"twilio_text"}),[u]=(0,m.iI)(),g=async i=>{let n=await u({details:{twilio_account_sid:i.account_sid,twilio_auth_token:i.auth_token,twilio_messaging_service_sid:i.messaging_service_sid,twilio_sender_phone_number:i.phone},service_type:d.qX.twilio_text});(0,l.D4)(n)?t(n.error):(e("Twilio text secrets successfully updated."),o("testConnection"))};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio SMS messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(p.J9,{initialValues:{account_sid:"",auth_token:"",messaging_service_sid:"",phone:""},onSubmit:g,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(p.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(x.j0,{name:"account_sid",label:"Account SID",placeholder:"Enter account SID",isRequired:!0}),(0,n.jsx)(x.j0,{name:"auth_token",label:"Auth token",placeholder:"Enter auth token",type:"password",isRequired:!0}),(0,n.jsx)(x.j0,{name:"messaging_service_sid",label:"Messaging Service SID",placeholder:"Enter messaging service SID"}),(0,n.jsx)(x.j0,{name:"phone",label:"Phone Number",placeholder:"Enter phone number"})]}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"testConnection"===i?(0,n.jsx)(h,{messagingDetails:c||{service_type:d.qX.twilio_text}}):null]})},j=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,p]=(0,r.useState)(""),[x]=(0,m.h9)(),[h]=(0,m.L)(),{data:j}=(0,m.JE)();(0,r.useEffect)(()=>{j&&p(null==j?void 0:j.service_type)},[j]);let v=async i=>{let{value:n}=i.target,s=await h({notifications:{notification_service_type:n,send_request_completion_notification:!0,send_request_receipt_notification:!0,send_request_review_notification:!0},execution:{subject_identity_verification_required:!0}});if((0,l.D4)(s))t(s.error);else if(n!==d.qX.twilio_text)p(n);else{let i=await x({service_type:d.qX.twilio_text});(0,l.D4)(i)?t(i.error):(e("Messaging provider saved successfully."),p(n))}};return(0,n.jsxs)(o.Z,{title:"Configure Privacy Requests - Messaging",children:[(0,n.jsx)(u.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Configure requests",href:c.fz},{title:"Messaging"}]}),(0,n.jsx)(s.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure your messaging provider"}),(0,n.jsxs)(s.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,n.jsxs)(s.xuv,{children:["Fides requires a messsaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,n.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"documentation"})," ","to setup a messaging service that Fides supports. Ensure you have completed the setup for the preferred messaging provider and have the details handy prior to the following steps."]}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose service type to configure"}),(0,n.jsx)(s.y02.Group,{onChange:v,value:i,"data-testid":"privacy-requests-messaging-provider-selection",className:"p-3",children:(0,n.jsxs)(s.jqI,{children:[(0,n.jsx)(s.y02,{value:d.qX.mailgun,"data-testid":"option-mailgun",children:"Mailgun Email"},d.qX.mailgun),(0,n.jsx)(s.y02,{value:d.qX.twilio_email,"data-testid":"option-twilio-email",children:"Twilio Email"},d.qX.twilio_email),(0,n.jsx)(s.y02,{value:d.qX.twilio_text,"data-testid":"option-twilio-sms",children:"Twilio SMS"},d.qX.twilio_text)]})}),i===d.qX.mailgun?(0,n.jsx)(g,{}):null,i===d.qX.twilio_email?(0,n.jsx)(f,{}):null,i===d.qX.twilio_text?(0,n.jsx)(y,{}):null]})]})},v=()=>(0,n.jsx)(j,{})},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return l},D4:function(){return s},Dy:function(){return o},XD:function(){return c},cz:function(){return u},hE:function(){return a},oK:function(){return r}});var n=i(76649);let s=e=>"error"in e,r=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,l=e=>(0,n.Ln)({status:"number",data:{}},e),a=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>r(e,t),s=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>r(i,t[e]));class l{static narrow(e){return new l(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof l?e.NF:e instanceof Function?e:t=>n(e,t);return new l(e=>t(e)&&i(e))}}new l(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=13687)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return n(49755)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var s=n(24246),i=n(56351),r=n(88038),a=n.n(r),l=n(86677);n(27378);var o=n(25980),c=n(90867),d=n(77830),u=()=>{let e=(0,l.useRouter)();return(0,s.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(i.xuv,{children:[(0,s.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(i.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,s.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:n,padded:r=!0,mainProps:d}=e,m=(0,o.hz)(),h=(0,l.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,f=!(m.flags.privacyRequestsConfiguration&&p),{data:g}=(0,c.JE)(void 0,{skip:f}),{data:x}=(0,c.PW)(void 0,{skip:f}),v=m.flags.privacyRequestsConfiguration&&(!g||!x)&&p;return(0,s.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,s.jsxs)(a(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(i.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[v?(0,s.jsx)(u,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var s=n(24246),i=n(56351),r=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:l,rightContent:o,style:c,...d}=e;return(0,s.jsxs)("div",{...d,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,s.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(i.X6q,{className:n||l?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!n&&(0,s.jsx)(r.m,{className:l?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return c}});var s=n(24246),i=n(56351),r=n(34090),a=n(27378),l=n(91613),o=n(40324);let c=e=>{let{name:t,label:n,labelProps:c,tooltip:d,isRequired:u,layout:m="inline",...h}=e,[p,f,{setValue:g}]=(0,r.U$)(t),x=!!(f.touched&&f.error),[v,j]=(0,a.useState)("");p.value||"tags"!==h.mode&&"multiple"!==h.mode||(p.value=[]),"tags"===h.mode&&"string"==typeof p.value&&(p.value=[p.value]);let y="tags"===h.mode?(e,t)=>e?e.value!==v||p.value.includes(v)?h.optionRender?h.optionRender(e,t):e.label:'Create "'.concat(v,'"'):void 0:h.optionRender||void 0,b=e=>{j(e),h.onSearch&&h.onSearch(e)},_=(e,t)=>{g(e),h.onChange&&h.onChange(e,t)};return"inline"===m?(0,s.jsx)(i.NIc,{isInvalid:x,isRequired:u,children:(0,s.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,s.jsx)(o.__,{htmlFor:h.id||t,...c,children:n}):null,(0,s.jsxs)(i.jqI,{align:"center",children:[(0,s.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,s.jsx)(i.WPr,{...p,id:h.id||t,"data-testid":"controlled-select-".concat(p.name),...h,optionRender:y,onSearch:"tags"===h.mode?b:void 0,onChange:_,value:p.value||void 0}),(0,s.jsx)(o.Bc,{isInvalid:x,message:f.error,fieldName:p.name})]}),d?(0,s.jsx)(l.Z,{label:d}):null]})]})}):(0,s.jsx)(i.NIc,{isInvalid:x,isRequired:u,children:(0,s.jsxs)(i.gCW,{alignItems:"start",children:[(0,s.jsxs)(i.jqI,{align:"center",children:[n?(0,s.jsx)(o.__,{htmlFor:h.id||t,fontSize:"xs",my:0,mr:1,...c,children:n}):null,d?(0,s.jsx)(l.Z,{label:d}):null]}),(0,s.jsx)(i.WPr,{...p,id:h.id||t,"data-testid":"controlled-select-".concat(p.name),...h,optionRender:y,onSearch:"tags"===h.mode?b:void 0,onChange:_,value:p.value||void 0}),(0,s.jsx)(o.Bc,{isInvalid:x,message:f.error,fieldName:p.name})]})})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return c},c6:function(){return i},cj:function(){return p},e$:function(){return l},fn:function(){return o},iC:function(){return h},nU:function(){return u},tB:function(){return d}});var s,i,r=n(19043);let a="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:n}=e;return{status:n,message:l(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(s=i||(i={})).GVL="gvl",s.AC="gacp",s.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,n){"use strict";n.d(t,{H:function(){return r},V:function(){return s.V}});var s=n(84306),i=n(812);let r=()=>{let{errorAlert:e}=(0,s.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,i.Ot)(t)?n=t.data.detail:(0,i.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var s=n(24246),i=n(56351);let r=()=>{let e=(0,i.pmc)();return{errorAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(i.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(i.zMQ,{}),(0,s.jsxs)(i.xuv,{children:[n&&(0,s.jsx)(i.CdC,{children:n}),(0,s.jsx)(i.XaZ,{children:t})]}),(0,s.jsx)(i.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(i.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(i.zMQ,{}),(0,s.jsxs)(i.xuv,{children:[n&&(0,s.jsx)(i.CdC,{children:n}),(0,s.jsx)(i.XaZ,{children:t})]}),(0,s.jsx)(i.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var s=n(24246),i=n(56351),r=n(79894),a=n.n(r),l=n(27378);let{Text:o}=i.AntTypography,c=e=>{let{items:t,...n}=e,r=(0,l.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let r=n===t.length-1,l={...e},c=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:l.title})),c)?l.title=(0,s.jsx)(i.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,s.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,s.jsx)(i.zrq,{items:r,...n})}},71784:function(e,t,n){"use strict";n.d(t,{DE:function(){return o},I3:function(){return i},kN:function(){return a},qX:function(){return l},rE:function(){return r}});var s=n(21702);let i=[...new Map([[s.q2.APPROVED,"Approved"],[s.q2.CANCELED,"Canceled"],[s.q2.COMPLETE,"Completed"],[s.q2.DENIED,"Denied"],[s.q2.ERROR,"Error"],[s.q2.IN_PROCESSING,"In Progress"],[s.q2.PENDING,"New"],[s.q2.PAUSED,"Paused"],[s.q2.IDENTITY_UNVERIFIED,"Unverified"],[s.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,n]=e;return{label:n,value:t}}),r=new Map([[s.Us.ACCESS,"Access"],[s.Us.ERASURE,"Erasure"],[s.Us.CONSENT,"Consent"],[s.Us.UPDATE,"Update"]]),a=[...r].map(e=>{let[t,n]=e;return{label:n,value:t}}),l={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3"}},49755:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var s=n(24246),i=n(56351),r=n(27378),a=n(812),l=n(14047),o=n(77213),c=n(77830),d=n(58754),u=n(71784),m=n(90867),h=n(34090),p=n(97181),f=n(40324),g=e=>{var t,n,o,c,d;let{storageDetails:g}=e,[x,v]=(0,r.useState)(""),[j]=(0,m.gC)(),[y]=(0,m.cf)(),{handleError:b}=(0,l.H)(),{successAlert:_}=(0,l.V)(),C={type:u.DE.s3,auth_method:null!==(o=null==g?void 0:null===(t=g.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(c=null==g?void 0:null===(n=g.details)||void 0===n?void 0:n.bucket)&&void 0!==c?c:"",format:null!==(d=null==g?void 0:g.format)&&void 0!==d?d:""},w=async e=>{let t=await j({type:u.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,a.D4)(t)?b(t.error):(v(e.auth_method),_("S3 storage credentials successfully updated."))},q=async e=>{let t=await y({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:u.DE.s3});(0,a.D4)(t)?b(t.error):_("S3 storage secrets successfully updated.")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"S3 storage configuration"}),(0,s.jsx)(i.Kqy,{children:(0,s.jsx)(h.J9,{initialValues:C,onSubmit:w,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:n}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(i.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(p.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(p.d,{name:"auth_method",label:"Auth method",options:[{label:"secret_keys",value:"secret_keys"},{label:"automatic",value:"automatic"}],"data-testid":"auth_method",isRequired:!0}),(0,s.jsx)(f.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,s.jsx)(i.wpx,{onClick:()=>n(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(i.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"secret_keys"===x?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.izJ,{mt:5}),(0,s.jsx)(i.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,s.jsx)(i.Kqy,{children:(0,s.jsx)(h.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:q,children:e=>{let{isSubmitting:t,handleReset:n}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(i.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(f.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,s.jsx)(f.j0,{name:"aws_secret_access_key",label:"AWS secret access key",type:"password"})]}),(0,s.jsxs)(i.xuv,{mt:10,children:[(0,s.jsx)(i.wpx,{onClick:()=>n(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(i.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null]})},x=()=>{let{successAlert:e}=(0,l.V)(),{handleError:t}=(0,l.H)(),[n,h]=(0,r.useState)(""),{data:p}=(0,m.PW)(),{data:f}=(0,m.Au)({type:n}),[x,{isLoading:v}]=(0,m.gC)(),[j]=(0,m.L)();(0,r.useEffect)(()=>{p&&h(p.type)},[p]);let y=async n=>{let{value:s}=n.target;if(s===u.DE.local){let n=await x({type:s,details:{},format:"json"});(0,a.D4)(n)?t(n.error):e("Configured storage details successfully.")}let i=await j({storage:{active_default_storage_type:s}});(0,a.D4)(i)?t(i.error):h(s)};return(0,s.jsxs)(o.Z,{title:"Configure Privacy Requests - Storage",children:[(0,s.jsx)(d.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Configure requests",href:c.fz},{title:"Storage"}]}),(0,s.jsx)(i.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure storage"}),(0,s.jsxs)(i.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,s.jsx)(i.xuv,{mb:5,children:"Fides requires a storage destination to store and share the results of privacy requests. For a production setup, it is highly recommended to have S3 as a storage destination. Ensure you have completed the setup for the storage destination and have the details handy prior to the following steps."}),(0,s.jsxs)(i.xuv,{children:["To configure a Storage destination, first choose a method to store your results. Fides currently supports"," ",(0,s.jsx)(i.xvT,{as:"span",color:"complimentary.500",children:"Local"})," ","and"," ",(0,s.jsx)(i.xvT,{as:"span",color:"complimentary.500",children:"S3"})," ","storage methods."]}),(0,s.jsx)(i.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose storage type to configure"}),(0,s.jsx)(i.y02.Group,{disabled:v,onChange:y,value:n,"data-testid":"privacy-requests-storage-selection",className:"p-3",children:(0,s.jsxs)(i.jqI,{children:[(0,s.jsx)(i.y02,{value:"local","data-testid":"option-local",children:"Local"},"local"),(0,s.jsx)(i.y02,{value:"s3","data-testid":"option-s3",children:"S3"},"s3")]})}),"s3"===n&&f?(0,s.jsx)(g,{storageDetails:f}):null]})]})},v=()=>(0,s.jsx)(x,{})},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return a},D4:function(){return i},Dy:function(){return o},XD:function(){return c},cz:function(){return d},hE:function(){return l},oK:function(){return r}});var s=n(76649);let i=e=>"error"in e,r=e=>(0,s.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,s.Ln)({status:"number",data:{}},e),l=e=>(0,s.Ln)({detail:"string"},e),o=e=>(0,s.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,s.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,s.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return s}});let s=(e,t)=>r(e,t),i=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?i in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>r(n,t[e]));class a{static narrow(e){return new a(t=>s(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof a?e.NF:e instanceof Function?e:t=>s(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2369],{1565:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests",function(){return l(22017)}])},35287:function(e,t,l){"use strict";var r=l(24246),i=l(56351),a=l(88038),n=l.n(a);l(27378),t.Z=e=>{let{children:t,title:l,mainProps:a}=e;return(0,r.jsxs)(i.kCb,{"data-testid":l,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,r.jsxs)(n(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",l]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsx)(i.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...a,children:t})]})}},87361:function(e,t,l){"use strict";var r=l(24246),i=l(56351);t.Z=e=>{let{title:t,text:l,onClose:a}=e;return(0,r.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderRadius:"md",justifyContent:"space-between",py:4,pr:6,pl:3,"data-testid":"empty-state",gap:2,position:"relative",children:[a&&(0,r.jsx)(i.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:a}),(0,r.jsx)(i.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,r.jsxs)(i.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,r.jsx)(i.X6q,{fontSize:"md",children:t}),(0,r.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:l})]})]})}},96718:function(e,t,l){"use strict";l.d(t,{z:function(){return a}});var r=l(24246),i=l(56351);let a=e=>{let{...t}=e,l="multiple"===t.mode;return(0,r.jsx)(i.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,dropdownStyle:l?void 0:{width:"auto",minWidth:"200px"},className:"w-auto","data-testid":"filter-select",...t})}},97181:function(e,t,l){"use strict";l.d(t,{d:function(){return d}});var r=l(24246),i=l(56351),a=l(34090),n=l(27378),s=l(91613),o=l(40324);let d=e=>{let{name:t,label:l,labelProps:d,tooltip:u,isRequired:c,layout:p="inline",...m}=e,[h,x,{setValue:v}]=(0,a.U$)(t),f=!!(x.touched&&x.error),[y,b]=(0,n.useState)("");h.value||"tags"!==m.mode&&"multiple"!==m.mode||(h.value=[]),"tags"===m.mode&&"string"==typeof h.value&&(h.value=[h.value]);let _="tags"===m.mode?(e,t)=>e?e.value!==y||h.value.includes(y)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:m.optionRender||void 0,j=e=>{b(e),m.onSearch&&m.onSearch(e)},g=(e,t)=>{v(e),m.onChange&&m.onChange(e,t)};return"inline"===p?(0,r.jsx)(i.NIc,{isInvalid:f,isRequired:c,children:(0,r.jsxs)(i.rjZ,{templateColumns:l?"1fr 3fr":"1fr",children:[l?(0,r.jsx)(o.__,{htmlFor:m.id||t,...d,children:l}):null,(0,r.jsxs)(i.jqI,{align:"center",children:[(0,r.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(i.WPr,{...h,id:m.id||t,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:_,onSearch:"tags"===m.mode?j:void 0,onChange:g,value:h.value||void 0}),(0,r.jsx)(o.Bc,{isInvalid:f,message:x.error,fieldName:h.name})]}),u?(0,r.jsx)(s.Z,{label:u}):null]})]})}):(0,r.jsx)(i.NIc,{isInvalid:f,isRequired:c,children:(0,r.jsxs)(i.gCW,{alignItems:"start",children:[(0,r.jsxs)(i.jqI,{align:"center",children:[l?(0,r.jsx)(o.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:l}):null,u?(0,r.jsx)(s.Z,{label:u}):null]}),(0,r.jsx)(i.WPr,{...h,id:m.id||t,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:_,onSearch:"tags"===m.mode?j:void 0,onChange:g,value:h.value||void 0}),(0,r.jsx)(o.Bc,{isInvalid:f,message:x.error,fieldName:h.name})]})})}},71784:function(e,t,l){"use strict";l.d(t,{DE:function(){return o},I3:function(){return i},kN:function(){return n},qX:function(){return s},rE:function(){return a}});var r=l(21702);let i=[...new Map([[r.q2.APPROVED,"Approved"],[r.q2.CANCELED,"Canceled"],[r.q2.COMPLETE,"Completed"],[r.q2.DENIED,"Denied"],[r.q2.ERROR,"Error"],[r.q2.IN_PROCESSING,"In Progress"],[r.q2.PENDING,"New"],[r.q2.PAUSED,"Paused"],[r.q2.IDENTITY_UNVERIFIED,"Unverified"],[r.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,l]=e;return{label:l,value:t}}),a=new Map([[r.Us.ACCESS,"Access"],[r.Us.ERASURE,"Erasure"],[r.Us.CONSENT,"Consent"],[r.Us.UPDATE,"Update"]]),n=[...a].map(e=>{let[t,l]=e;return{label:l,value:t}}),s={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3"}},22017:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return es}});var r,i,a=l(24246),n=l(35287),s=l(56351),o=l(65218),d=l.n(o),u=l(27378),c=l(25980),p=l(19904),m=l(59003),h=l(92222),x=l(86677),v=l(45007),f=l(91317),y=l(14048),b=l(14481),_=l(90867),j=l(16394),g=l(71784),q=l(21702);let C={approved:{colorScheme:"success",label:"Approved"},complete:{label:"Completed",colorScheme:"success"},awaiting_email_send:{label:"Awaiting Email Send",colorScheme:"marble"},denied:{label:"Denied",colorScheme:"warning"},canceled:{label:"Canceled",colorScheme:"marble"},error:{label:"Error",colorScheme:"error"},in_processing:{label:"In Progress",colorScheme:"caution"},paused:{label:"Paused",colorScheme:"marble"},pending:{label:"New",colorScheme:"info"},identity_unverified:{label:"Unverified",colorScheme:"marble"},requires_input:{colorScheme:"alert",label:"Requires Input"}},E=e=>{let{value:t}=e;return(0,a.jsx)(b.A4,{color:C[t].colorScheme,value:C[t].label,"data-testid":"request-status-badge"})},R=e=>{let t,{daysLeft:l,timeframe:r=45,status:i,includeText:n=!1}=e;if(null==l||i===q.q2.COMPLETE||i===q.q2.CANCELED||i===q.q2.DENIED||i===q.q2.IDENTITY_UNVERIFIED)return null;let s=100*l/r;return s<25?t="error":s>=75?t="success":s>=25&&(t="warning"),(0,a.jsx)(b.A4,{value:n?"".concat(l," days left"):l.toString(),color:t})},w=e=>Array.from(new Set(e.filter(e=>Object.values(q.Us).includes(e.action_type)).map(e=>e.action_type))),S=e=>{let{value:t}=e,l=w(t).map(e=>g.rE.get(e));return(0,a.jsx)(b.WP,{value:l,cellState:{isExpanded:!0}})};var I=l(58452),P=l(57526),k=l(66548),T=l(45489);let D=e=>{let{subjectRequest:t,...l}=e,r=(0,s.qY0)(),i=(0,s.qY0)(),n=(0,s.qY0)(),{handleApproveRequest:o,handleDenyRequest:d,handleDeleteRequest:u,isLoading:c}=(0,T.Z)({subjectRequest:t});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.Ugi,{...l,children:["pending"!==t.status?null:(0,a.jsx)(s.wpx,{title:"Approve","aria-label":"Approve",icon:(0,a.jsx)(s.nQG,{w:2,h:2}),onClick:r.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-approve-btn",size:"small"}),"pending"!==t.status?null:(0,a.jsx)(s.wpx,{title:"Deny","aria-label":"Deny",icon:(0,a.jsx)(s.Two,{w:2,h:2}),onClick:i.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-deny-btn",size:"small"}),(0,a.jsx)(p.ZP,{scopes:[q.Sh.PRIVACY_REQUEST_DELETE],children:(0,a.jsx)(s.wpx,{title:"Delete","aria-label":"Delete",icon:(0,a.jsx)(s.pJl,{w:2,h:2}),onClick:n.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-delete-btn",size:"small"})})]}),(0,a.jsx)(s.h_i,{children:(0,a.jsx)(P.Z,{isOpen:r.isOpen,isLoading:c,onClose:r.onClose,onApproveRequest:o,subjectRequest:t})}),(0,a.jsx)(s.h_i,{children:(0,a.jsx)(k.Z,{isOpen:i.isOpen,onClose:i.onClose,onDenyRequest:d})}),(0,a.jsx)(I.Z,{isOpen:n.isOpen,onClose:n.onClose,onConfirm:u,message:(0,a.jsx)(s.xvT,{children:"You are about to permanently delete the privacy request. Are you sure you would like to continue?"})})]})};(r=i||(i={})).STATUS="status",r.DAYS_LEFT="due_date",r.SOURCE="source",r.REQUEST_TYPE="request_type",r.SUBJECT_IDENTITY="subject_identity",r.TIME_RECEIVED="created_at",r.CREATED_BY="created_by",r.REVIEWER="reviewer",r.ID="id",r.ACTIONS="actions";let A=(0,h.Cl)(),O=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return[A.accessor(e=>e.status,{id:"status",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(E,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Status",...e})}),A.accessor(e=>e.days_left,{id:"due_date",cell:e=>{let{row:t,getValue:l}=e;return(0,a.jsx)(R,{daysLeft:l(),timeframe:t.original.policy.execution_timeframe,status:t.original.status})},header:e=>(0,a.jsx)(b.Rr,{value:"Days left",...e})}),...e?[A.accessor(e=>e.source,{id:"source",cell:e=>e.getValue()?(0,a.jsx)(b.A4,{value:e.getValue()}):(0,a.jsx)(b.G3,{value:void 0}),header:e=>(0,a.jsx)(b.Rr,{value:"Source",...e}),enableSorting:!1})]:[],A.accessor(e=>e.policy.rules,{id:"request_type",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(S,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Request type",...e}),enableSorting:!1}),A.accessor(e=>{var t,l;return(null===(t=e.identity)||void 0===t?void 0:t.email.value)||(null===(l=e.identity)||void 0===l?void 0:l.phone_number.value)||""},{id:"subject_identity",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Subject identity",...e}),enableSorting:!1}),A.accessor(e=>e.created_at,{id:"created_at",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:(0,j.p6)(t())})},header:e=>(0,a.jsx)(b.Rr,{value:"Time received",...e})}),A.accessor(e=>{var t;return(null===(t=e.reviewer)||void 0===t?void 0:t.username)||""},{id:"reviewer",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Reviewed by",...e}),enableSorting:!1}),A.accessor(e=>e.id,{id:"id",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Request ID",...e}),enableSorting:!1}),A.display({id:"actions",cell:e=>{let{row:t}=e;return(0,a.jsx)(D,{subjectRequest:t.original})},header:e=>(0,a.jsx)(b.Rr,{value:"Actions",...e}),meta:{disableRowClick:!0}})]},N=e=>{let t=(0,v.v9)(_.dp),l=(0,v.I0)();return{handleStatusChange:t=>{l((0,_.CI)(t)),e()},handleActionTypeChange:t=>{l((0,_.aM)(t)),e()},handleFromChange:t=>{l((0,_.su)(null==t?void 0:t.target.value)),e()},handleToChange:t=>{l((0,_.Ue)(null==t?void 0:t.target.value)),e()},handleClearAllFilters:()=>{l((0,_.Mk)()),e()},...t}};var U=l(96718);let F=e=>{let{onClose:t,onFilterChange:l,...r}=e,{handleStatusChange:i,handleActionTypeChange:n,handleFromChange:o,handleToChange:d,handleClearAllFilters:u,from:c,to:p,status:m,action_type:h}=N(l);return(0,a.jsxs)(s.u_l,{onClose:t,size:"xl",...r,children:[(0,a.jsx)(s.ZAr,{}),(0,a.jsxs)(s.hzk,{children:[(0,a.jsx)(s.xBx,{borderBottomWidth:1,borderBottomColor:"gray.200",children:"All Filters"}),(0,a.jsx)(s.olH,{}),(0,a.jsx)(s.fef,{py:4,sx:{"& label":{mb:0}},children:(0,a.jsxs)(s.Kqy,{gap:4,children:[(0,a.jsxs)(s.Kqy,{children:[(0,a.jsx)(s.lXp,{size:"md",id:"request-date-range-label",children:"Date range"}),(0,a.jsxs)(s.Ugi,{gap:3,children:[(0,a.jsxs)(s.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(s.UiE,{as:"label",htmlFor:"from-date",borderRadius:"md",children:"From"}),(0,a.jsx)(s.IIB,{type:"date",name:"From",value:c,max:p||void 0,onChange:o,borderRadius:"md",id:"from-date","aria-describedby":"request-date-range-label"})]}),(0,a.jsxs)(s.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(s.UiE,{as:"label",htmlFor:"to-date",borderRadius:"md",children:"To"}),(0,a.jsx)(s.IIB,{type:"date",borderRadius:"md",name:"To",value:p,min:c||void 0,onChange:d,id:"to-date","aria-describedby":"request-date-range-label"})]})]})]}),(0,a.jsxs)(s.Kqy,{children:[(0,a.jsx)(s.lXp,{size:"md",htmlFor:"request-status",children:"Status"}),(0,a.jsx)(U.z,{id:"request-status",mode:"multiple",options:g.I3,value:m,onChange:i,"data-testid":"request-status-filter"})]}),(0,a.jsxs)(s.Kqy,{children:[(0,a.jsx)(s.lXp,{size:"md",htmlFor:"request-action-type",children:"Request Type"}),(0,a.jsx)(U.z,{id:"request-action-type",mode:"multiple",options:g.kN,value:h,onChange:n,"data-testid":"request-action-type-filter"})]})]})}),(0,a.jsxs)(s.mzw,{justifyContent:"space-between",children:[(0,a.jsx)(s.wpx,{type:"text",onClick:u,children:"Clear all"}),(0,a.jsx)(s.wpx,{type:"primary",onClick:t,children:"Done"})]})]})]})},z=e=>{let{...t}=e,{plus:l}=(0,c.hz)(),[r,i]=(0,u.useState)(""),n=(0,v.v9)(_.dp),o=(0,v.v9)(f.rK),d=(0,s.pmc)(),p=(0,x.useRouter)(),j=(0,v.I0)(),{PAGE_SIZES:g,pageSize:q,setPageSize:C,onPreviousPageClick:E,isPreviousPageDisabled:R,onNextPageClick:w,isNextPageDisabled:S,startRange:I,endRange:P,pageIndex:k,setTotalPages:T,resetPageIndexToDefault:D}=(0,b.oi)(),{isOpen:A,onOpen:N,onClose:U}=(0,s.qY0)(),{data:z,isLoading:Z,isFetching:M}=(0,_.QA)({...n,page:k,size:q}),{items:V,total:Y}=(0,u.useMemo)(()=>{let e=z||{items:[],total:0,pages:0};return T(e.pages),e},[z,T]),G=(0,u.useCallback)(e=>{j((0,_.mU)(e)),i(e),D()},[j,D,i]),B=async()=>{let e;try{await (0,_.py)({...n,token:o})}catch(t){e=t instanceof Error?t.message:"Unknown error occurred"}e&&d({description:"".concat(e),duration:5e3,status:"error"})},L=e=>{p.push("/privacy-requests/".concat(e))},W=(0,m.b7)({getCoreRowModel:(0,h.sC)(),data:V,columns:(0,u.useMemo)(()=>O(l),[l]),getRowId:e=>"".concat(e.status,"-").concat(e.id),manualPagination:!0,columnResizeMode:"onChange"});return(0,a.jsxs)(s.xuv,{...t,children:[(0,a.jsxs)(b.Q$,{children:[(0,a.jsx)(b.HO,{globalFilter:r,setGlobalFilter:G,placeholder:"Search by request ID or identity value"}),(0,a.jsxs)(s.Ugi,{alignItems:"center",spacing:2,children:[(0,a.jsx)(s.wpx,{"data-testid":"filter-btn",onClick:N,children:"Filter"}),(0,a.jsx)(s.wpx,{"aria-label":"Export report","data-testid":"export-btn",icon:(0,a.jsx)(y.nM,{ml:"1.5px"}),onClick:B})]}),(0,a.jsx)(s.h_i,{children:(0,a.jsx)(F,{isOpen:A,onClose:U,onFilterChange:D})})]}),Z?(0,a.jsx)(s.xuv,{p:2,borderWidth:1,children:(0,a.jsx)(b.I4,{rowHeight:26,numRows:10})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.ZK,{tableInstance:W,onRowClick:e=>L(e.id),onSort:e=>{if(!e){j((0,_.p2)()),D();return}let{id:t,desc:l}=e;j((0,_.PU)(t)),j((0,_.iX)(l?"desc":"asc")),D()}}),(0,a.jsx)(b.s8,{totalRows:Y||0,pageSizes:g,setPageSize:C,onPreviousPageClick:E,isPreviousPageDisabled:R||M,onNextPageClick:w,isNextPageDisabled:S||M,startRange:I,endRange:P})]})]})};var Z=l(812),M=l(87361),V=l(46628),Y=l(34090),G=l(59389),B=l(40324);let L=(e,t)=>null==t?void 0:t.find(t=>t.policy_key===e),W=e=>{var t,l;if(!e)return G.Ry().shape({policy_key:G.Z_().required().label("Request type")});let r=e.custom_privacy_request_fields?Object.entries(e.custom_privacy_request_fields).map(e=>{let[t,l]=e;return{[t]:G.Ry().shape({value:l.required&&!l.hidden?G.Z_().required().label(l.label):G.Z_().nullable()})}}).reduce((e,t)=>({...e,...t}),{}):{};return G.Ry().shape({policy_key:G.Z_().required().label("Request type"),identity:G.Ry().shape({email:(null===(t=e.identity_inputs)||void 0===t?void 0:t.email)==="required"?G.Z_().email().required().label("Email address"):G.Z_().nullable(),phone_number:(null===(l=e.identity_inputs)||void 0===l?void 0:l.phone)==="required"?G.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").required().label("Phone number"):G.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").nullable()}),custom_privacy_request_fields:G.Ry().shape(r)})};var X=l(97181);let K={is_verified:!1,policy_key:"",identity:{}},Q=e=>{let{identityInputs:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[t.email?(0,a.jsx)(B.j0,{name:"identity.email",label:"User email address",isRequired:"required"===t.email,variant:"stacked"}):null,t.phone?(0,a.jsx)(B.j0,{name:"identity.phone_number",label:"User phone number",isRequired:"required"===t.phone,variant:"stacked"}):null]}):null},H=e=>{let{customFieldInputs:t}=e;if(!t)return null;let l=Object.entries(t);return(0,a.jsx)(a.Fragment,{children:l.map(e=>{let[t,l]=e;return(0,a.jsx)(B.j0,{name:"custom_privacy_request_fields.".concat(t,".value"),label:l.label,isRequired:!!l.required,variant:"stacked"},t)})})};var $=e=>{let{onSubmit:t,onCancel:l}=e,{data:r}=(0,_.xv)();return(0,a.jsx)(Y.J9,{initialValues:K,onSubmit:t,validationSchema:()=>(0,G.Vo)(e=>W(L(e.policy_key,null==r?void 0:r.actions))),children:e=>{var t;let{values:i,dirty:n,isValid:o,isSubmitting:d,setFieldValue:u}=e,c=L(i.policy_key,null==r?void 0:r.actions);return(0,a.jsx)(Y.l0,{children:(0,a.jsxs)(s.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(X.d,{name:"policy_key",label:"Request type",options:null!==(t=null==r?void 0:r.actions.map(e=>({label:e.title,value:e.policy_key})))&&void 0!==t?t:[],onChange:e=>{let t=L(e,null==r?void 0:r.actions);if(!(null==t?void 0:t.custom_privacy_request_fields)){u("custom_privacy_request_fields",void 0);return}u("custom_privacy_request_fields",Object.entries(t.custom_privacy_request_fields).map(e=>{let[t,l]=e;return{[t]:{label:l.label,value:l.default_value}}}).reduce((e,t)=>({...e,...t}),{}))},layout:"stacked",isRequired:!0}),(0,a.jsx)(Q,{identityInputs:null==c?void 0:c.identity_inputs}),(0,a.jsx)(H,{customFieldInputs:null==c?void 0:c.custom_privacy_request_fields}),(0,a.jsx)(B.Xl,{name:"is_verified",label:"I confirm that I have verified this user information"}),(0,a.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,a.jsx)(s.wpx,{onClick:l,children:"Cancel"}),(0,a.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:!i.is_verified||!n||!o,loading:d,"data-testid":"submit-btn",children:"Create"})]})]})})}})},J=l(31883);let ee=e=>{let{isOpen:t,onClose:l}=e,[r]=(0,_.M6)(),i=(0,s.pmc)(),n=async e=>{let{is_verified:t,...a}=e,n=a.custom_privacy_request_fields?Object.entries(a.custom_privacy_request_fields).map(e=>{let[t,l]=e;return l.value?{[t]:l}:{}}).reduce((e,t)=>({...e,...t}),{}):void 0,s={...a,custom_privacy_request_fields:n},o=await r([s]);(0,J.D4)(o)?i((0,V.Vo)((0,Z.e$)(o.error,"An error occurred while creating this privacy request. Please try again"))):i((0,V.t5)("Privacy request created")),l()};return(0,a.jsxs)(s.u_l,{isOpen:t,onClose:l,size:"2xl",isCentered:!0,children:[(0,a.jsx)(s.ZAr,{}),(0,a.jsxs)(s.hzk,{"data-testid":"submit-request-modal",maxHeight:"80%",overflowY:"auto",children:[(0,a.jsx)(s.xBx,{children:"Create privacy request"}),(0,a.jsx)(s.fef,{children:(0,a.jsxs)(s.Kqy,{spacing:4,children:[(0,a.jsx)(M.Z,{title:"Warning: You are bypassing identity verification",text:"You are bypassing Fides' built-in identity verification step. Please ensure that you are only entering information on behalf of a verified and approved user's privacy request."}),(0,a.jsx)($,{onSubmit:n,onCancel:()=>l()})]})})]})]})};var et=()=>{let{onOpen:e,isOpen:t,onClose:l}=(0,s.qY0)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ee,{isOpen:t,onClose:l}),(0,a.jsx)(s.wpx,{type:"primary",onClick:e,"data-testid":"submit-request-btn",children:"Create request"})]})},el=l(58754),er=l(14047);let ei=()=>{let{errorAlert:e}=(0,er.V)(),[t,l]=(0,u.useState)(!1),[r,i]=(0,u.useState)({count:0,total:0}),[n,o]=(0,u.useState)(!0),d=q.q2.ERROR,{data:c}=(0,_.tE)(),{data:p}=(0,_.QA)({status:[d]},{pollingInterval:15e3,skip:n});return(0,u.useEffect)(()=>{o(!(c&&c.notify_after_failures>0))},[c]),(0,u.useEffect)(()=>{let e=(null==p?void 0:p.total)||0;e>=((null==c?void 0:c.notify_after_failures)||0)&&e>r.total?(i({count:e-r.total,total:e}),l(!0)):l(!1)},[null==p?void 0:p.total,null==c?void 0:c.notify_after_failures,r.total]),{processing:()=>{t&&e((0,a.jsxs)(s.xuv,{children:["DSR automation has failed for"," ",(0,a.jsx)(s.xvT,{as:"span",fontWeight:"semibold",children:r.count})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null,id:"dsrErrorAlert"})}}},ea=d()(()=>l.e(9676).then(l.bind(l,59676)),{loadableGenerated:{webpack:()=>[59676]},loading:()=>(0,a.jsx)("div",{children:"Loading..."})});var en=()=>{let{processing:e}=ei(),{plus:t}=(0,c.hz)();return(0,u.useEffect)(()=>{e()},[e]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(el.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests"}],rightContent:(0,a.jsxs)(s.vyj,{children:[t&&(0,a.jsx)(p.ZP,{scopes:[q.Sh.PRIVACY_REQUEST_CREATE],children:(0,a.jsx)(et,{})}),(0,a.jsx)(ea,{})]}),"data-testid":"privacy-requests"}),(0,a.jsx)(z,{})]})},es=()=>(0,a.jsx)(n.Z,{title:"Privacy Requests",children:(0,a.jsx)(en,{})})},31883:function(e,t,l){"use strict";l.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=l(19043)},40015:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var l in t)Object.defineProperty(e,l,{enumerable:!0,get:t[l]})}(t,{default:function(){return s},noSSR:function(){return n}});let r=l(51538);l(24246),l(27378);let i=r._(l(21887));function a(e){return{default:(null==e?void 0:e.default)||e}}function n(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let l=i.default,r={loading:e=>{let{error:t,isLoading:l,pastDelay:r}=e;return null}};e instanceof Promise?r.loader=()=>e:"function"==typeof e?r.loader=e:"object"==typeof e&&(r={...r,...e});let s=(r={...r,...t}).loader;return(r.loadableGenerated&&(r={...r,...r.loadableGenerated},delete r.loadableGenerated),"boolean"!=typeof r.ssr||r.ssr)?l({...r,loader:()=>null!=s?s().then(a):Promise.resolve(a(()=>null))}):(delete r.webpack,delete r.modules,n(l,r))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28438:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return r}});let r=l(51538)._(l(27378)).default.createContext(null)},21887:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});let r=l(51538)._(l(27378)),i=l(28438),a=[],n=[],s=!1;function o(e){let t=e(),l={loading:!0,loaded:null,error:null};return l.promise=t.then(e=>(l.loading=!1,l.loaded=e,e)).catch(e=>{throw l.loading=!1,l.error=e,e}),l}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let l=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),a=null;function o(){if(!a){let t=new d(e,l);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!s){let e=l.webpack?l.webpack():l.modules;e&&n.push(t=>{for(let l of e)if(t.includes(l))return o()})}function u(e,t){!function(){o();let e=r.default.useContext(i.LoadableContext);e&&Array.isArray(l.modules)&&l.modules.forEach(t=>{e(t)})}();let n=r.default.useSyncExternalStore(a.subscribe,a.getCurrentValue,a.getCurrentValue);return r.default.useImperativeHandle(t,()=>({retry:a.retry}),[]),r.default.useMemo(()=>{var t;return n.loading||n.error?r.default.createElement(l.loading,{isLoading:n.loading,pastDelay:n.pastDelay,timedOut:n.timedOut,error:n.error,retry:a.retry}):n.loaded?r.default.createElement((t=n.loaded)&&t.default?t.default:t,e):null},[e,n])}return u.preload=()=>o(),u.displayName="LoadableComponent",r.default.forwardRef(u)}(o,e)}function c(e,t){let l=[];for(;e.length;){let r=e.pop();l.push(r(t))}return Promise.all(l).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(a).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let l=()=>(s=!0,t());c(n,e).then(l,l)})),window.__NEXT_PRELOADREADY=u.preloadReady;let p=u},65218:function(e,t,l){e.exports=l(40015)}},function(e){e.O(0,[8033,2780,4481,8433,2888,9774,179],function(){return e(e.s=1565)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53611:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return n(44649)}])},59301:function(e,t,n){"use strict";var r=n(24246),i=n(56351);t.Z=e=>(0,r.jsx)(i.rUS,{isExternal:!0,color:"complimentary.500",...e})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(24246),i=n(56351),s=n(88038),o=n.n(s),a=n(86677);n(27378);var l=n(25980),d=n(90867),c=n(77830),u=()=>{let e=(0,a.useRouter)();return(0,r.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(i.xuv,{children:[(0,r.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(i.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,r.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:n,padded:s=!0,mainProps:c}=e,p=(0,l.hz)(),h=(0,a.useRouter)(),g="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,m=!(p.flags.privacyRequestsConfiguration&&g),{data:x}=(0,d.JE)(void 0,{skip:m}),{data:f}=(0,d.PW)(void 0,{skip:m}),v=p.flags.privacyRequestsConfiguration&&(!x||!f)&&g;return(0,r.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,r.jsxs)(o(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(i.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,r.jsx)(u,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var r=n(24246),i=n(56351),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:o=!0,children:a,rightContent:l,style:d,...c}=e;return(0,r.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,r.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(i.X6q,{className:n||a?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,r.jsx)(s.m,{className:a?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),a]})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return s.D4},MM:function(){return p},Ot:function(){return d},c6:function(){return i},cj:function(){return g},e$:function(){return a},fn:function(){return l},iC:function(){return h},nU:function(){return u},tB:function(){return c}});var r,i,s=n(19043);let o="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function l(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:o};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:n}=e;return{status:n,message:a(e,t.message)}}return t},p=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(r=i||(i={})).GVL="gvl",r.AC="gacp",r.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},g=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return d}});var r=n(24246),i=n(56351),s=n(79894),o=n.n(s),a=n(27378);let{Text:l}=i.AntTypography,d=e=>{let{items:t,...n}=e,s=(0,a.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,a={...e},d=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:a.title})),d)?a.title=(0,r.jsx)(i.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,r.jsx)(o(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,r.jsx)(i.zrq,{items:s,...n})}},6675:function(e,t,n){"use strict";n.d(t,{ZS:function(){return a},a4:function(){return s}});var r=n(80406);let i=n(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:s}=i,o={purposes:{},special_purposes:{}},a=(0,r.P1)(i.endpoints.getPurposes.select(),e=>{let{data:t}=e;return t||o})},46628:function(e,t,n){"use strict";n.d(t,{MA:function(){return a},Vo:function(){return d},t5:function(){return l}});var r=n(24246),i=n(56351);let s=e=>{let{children:t,title:n="Success"}=e;return(0,r.jsxs)(i.xvT,{"data-testid":"toast-success-msg",children:[(0,r.jsxs)("strong",{children:[n,":"]})," ",t]})},o=e=>{let{children:t}=e;return(0,r.jsxs)(i.xvT,{"data-testid":"toast-error-msg",children:[(0,r.jsx)("strong",{children:"Error:"})," ",t]})},a={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},l=(e,t)=>{let n=(0,r.jsx)(s,{title:t,children:e});return{...a,description:n}},d=e=>{let t=(0,r.jsx)(o,{children:e});return{...a,description:t,status:"error"}}},44649:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return P}});var r=n(24246),i=n(56351),s=n(34090),o=n(27378),a=n(16134),l=n(59301),d=n(25980),c=n(812),u=n(77213),p=n(58754),h=n(6675),g=n(91613),m=n(46628),x=e=>{let{name:t,enabled:n}=e;return(0,r.jsxs)(i.Kqy,{spacing:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:[(0,r.jsxs)(i.xvT,{children:[t," status"," ",n?(0,r.jsx)(i.j8w,{color:"success",children:"Enabled"}):(0,r.jsx)(i.j8w,{color:"error",children:"Disabled"})]}),(0,r.jsxs)(i.xvT,{children:["To ",n?"disable":"enable"," ",t,", please contact your Fides administrator or"," ",(0,r.jsx)(l.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},f=n(40324),v=e=>{var t,n;let{label:o,options:a,layout:l,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,s.U$)(c),h={...u,value:null!==(t=u.value)&&void 0!==t?t:""},m=!!(p.touched&&p.error),x=d?a[0]:void 0,v=null!==(n=a.find(e=>e.value===h.value))&&void 0!==n?n:x,j=e=>{h.onChange(c.name)(e.target.value)};return"stacked"===l?(0,r.jsxs)(i.NIc,{isInvalid:m,children:[(0,r.jsxs)(i.jqI,{className:"w-fit",children:[o?(0,r.jsx)(f.__,{children:o}):null,(0,r.jsx)(i.y02.Group,{onChange:j,value:null==v?void 0:v.value,"data-testid":"input-".concat(h.name),children:(0,r.jsx)(i.jqI,{className:"flex-col gap-3",children:a.map(e=>{let{value:t,label:n,tooltip:s}=e;return(0,r.jsx)(i.y02,{value:t,"data-testid":"option-".concat(t),children:(0,r.jsxs)(i.jqI,{className:"items-center gap-2",children:[(0,r.jsx)(i.xvT,{fontSize:"sm",fontWeight:"medium",children:n}),s?(0,r.jsx)(g.Z,{label:s}):null]})},t)})})})]}),(0,r.jsx)(f.Bc,{isInvalid:m,message:p.error,fieldName:h.name})]}):(0,r.jsxs)(i.NIc,{isInvalid:m,children:[(0,r.jsxs)(i.rjZ,{templateColumns:"1fr 3fr",children:[(0,r.jsx)(f.__,{children:o}),(0,r.jsx)(i.y02.Group,{onChange:j,value:null==v?void 0:v.value,"data-testid":"input-".concat(h.name),children:(0,r.jsx)(i.jqI,{children:a.map(e=>(0,r.jsx)(i.y02,{value:e.value,"data-testid":"option-".concat(e.value),children:e.label},e.value))})})]}),(0,r.jsx)(f.Bc,{isInvalid:m,message:p.error,fieldName:h.name})]})},j=n(99716),b=n(21702),y=e=>{let{title:t,children:n,...s}=e;return(0,r.jsxs)(i.xuv,{backgroundColor:"gray.50",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(t),...s,children:[(0,r.jsx)(i.xvT,{fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:t}),n]})};let _=e=>{let{title:t,children:n}=e;return(0,r.jsxs)(i.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(t),children:[(0,r.jsx)(i.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:t}),n]})};var C=()=>{let{tcf:e}=(0,d.hz)(),t=!!(0,a.C)(j.D2).enabled,{values:n,setFieldValue:o}=(0,s.u6)(),l=!!n.gpp.us_approach;return(0,r.jsx)(y,{title:"Global Privacy Platform",children:(0,r.jsxs)(i.Kqy,{spacing:6,children:[(0,r.jsx)(x,{name:"GPP",enabled:t}),t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_,{title:"GPP U.S.",children:(0,r.jsx)(v,{name:"gpp.us_approach",layout:"stacked",defaultFirstSelected:!1,options:[{label:"Enable U.S. National",value:b.en.NATIONAL,tooltip:"When US National is selected, Fides will present the same privacy notices to all consumers located anywhere in the United States."},{label:"Enable U.S. State-by-State",value:b.en.STATE,tooltip:"When state-by-state is selected, Fides will only present consent to consumers and save their preferences if they are located in a state that is supported by the GPP. The consent options presented to consumers will vary depending on the regulations in each state."},{label:"Enable US National and State-by-State notices",value:b.en.ALL,tooltip:"When enabled, Fides can be configured to serve the National and U.S. state notices. This mode is intended to provide consent coverage to U.S. states with new privacy laws where GPP support lags behind the effective date of state laws."}]})}),l?(0,r.jsxs)(_,{title:"MSPA",children:[(0,r.jsx)(f.Xl,{name:"gpp.mspa_covered_transactions",label:"All transactions covered by MSPA",tooltip:"When selected, the Fides CMP will communicate to downstream vendors that all preferences are covered under the MSPA.",onChange:e=>{e||(o("gpp.mspa_service_provider_mode",!1),o("gpp.mspa_opt_out_option_mode",!1))}}),(0,r.jsx)(f.w8,{label:"Enable MSPA service provider mode",name:"gpp.mspa_service_provider_mode",variant:"switchFirst",tooltip:"Enable service provider mode if you do not engage in any sales or sharing of personal information.",isDisabled:!!n.gpp.mspa_opt_out_option_mode||!n.gpp.mspa_covered_transactions}),(0,r.jsx)(f.w8,{label:"Enable MSPA opt-out option mode",name:"gpp.mspa_opt_out_option_mode",variant:"switchFirst",tooltip:"Enable opt-out option mode if you engage or may engage in the sales or sharing of personal information, or process any information for the purpose of targeted advertising.",isDisabled:!!n.gpp.mspa_service_provider_mode||!n.gpp.mspa_covered_transactions})]}):null]}):null,e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.izJ,{color:"gray.200"}),(0,r.jsxs)(_,{title:"GPP Europe",children:[(0,r.jsx)(i.xvT,{fontSize:"sm",fontWeight:"medium",children:"Configure TCF string for Global Privacy Platform"}),(0,r.jsx)(f.w8,{label:"Enable TC string",name:"gpp.enable_tcfeu_string",variant:"switchFirst",tooltip:"When enabled, the GPP API will include a TCF EU consent string for users who are in regions where TCF applies."})]})]}):null]})})};let w=e=>{let{children:t,purpose:n,endCol:s}=e;return(0,r.jsx)(i.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderRight:s?"solid 1px":"unset",borderColor:"gray.200",height:"100%",minWidth:"36px",children:[1,3,4,5,6].includes(n)?null:(0,r.jsx)(i.xuv,{children:t})})};var S=()=>{let{values:e,setFieldValue:t}=(0,s.u6)(),{purposes:n}=(0,a.C)(h.ZS);return(0,r.jsx)(s.F2,{name:"purposeOverrides",render:()=>(0,r.jsxs)(i.kCb,{flexDirection:"column",minWidth:"944px",children:[(0,r.jsxs)(i.kCb,{width:"100%",border:"solid 1px",borderColor:"gray.200",backgroundColor:"gray.50",height:"36px",children:[(0,r.jsx)(i.kCb,{width:"600px",pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:"TCF purpose"}),(0,r.jsx)(i.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",minWidth:"36px",children:(0,r.jsx)(i.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Allowed"})}),(0,r.jsx)(i.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:(0,r.jsx)(i.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Consent"})}),(0,r.jsx)(i.kCb,{flex:"1",alignItems:"center",children:(0,r.jsx)(i.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Legitimate interest"})})]}),e.purposeOverrides.map((s,o)=>(0,r.jsxs)(i.kCb,{width:"100%",height:"36px",alignItems:"center",borderBottom:"solid 1px",borderColor:"gray.200",children:[(0,r.jsxs)(i.kCb,{width:"600px",borderLeft:"solid 1px",borderColor:"gray.200",p:0,alignItems:"center",height:"100%",pl:"4",fontSize:"xs",fontWeight:"normal",lineHeight:"4",children:["Purpose ",s.purpose,": ",n[s.purpose].name]}),(0,r.jsx)(i.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderColor:"gray.200",height:"100%",children:(0,r.jsx)(i.xuv,{children:(0,r.jsx)(f.w8,{name:"purposeOverrides[".concat(o,"].is_included"),onChange:e=>{e||(t("purposeOverrides[".concat(o,"].is_consent"),!1),t("purposeOverrides[".concat(o,"].is_legitimate_interest"),!1))}})})}),(0,r.jsx)(w,{purpose:s.purpose,children:(0,r.jsx)(f.w8,{isDisabled:!e.purposeOverrides[o].is_included||e.purposeOverrides[o].is_legitimate_interest,name:"purposeOverrides[".concat(o,"].is_consent")})}),(0,r.jsx)(w,{purpose:s.purpose,endCol:!0,children:(0,r.jsx)(f.w8,{isDisabled:!e.purposeOverrides[o].is_included||e.purposeOverrides[o].is_consent,name:"purposeOverrides[".concat(o,"].is_legitimate_interest")})})]},s.purpose))]})})},T=n(32885),N=n(90867),P=()=>{let{isLoading:e}=(0,T.x8)(),{tcf:t}=(0,d.hz)(),{data:n,isLoading:f}=(0,T.n3)(void 0,{skip:e||!t}),[v]=(0,T.M7)(),{data:j,isLoading:_}=(0,N.tB)({api_set:!0}),{data:w,isLoading:P}=(0,N.tB)({api_set:!1}),[k,{isLoading:E}]=(0,N.L)(),I=(0,a.C)(N.D2),A=(0,o.useMemo)(()=>j&&(null==j?void 0:j.consent)&&"override_vendor_purposes"in j.consent?j.consent.override_vendor_purposes:!!w&&null!=w&&!!w.consent&&"override_vendor_purposes"in w.consent&&w.consent.override_vendor_purposes,[j,w]),{isLoading:F}=(0,h.a4)(),L=(0,i.pmc)(),z=async e=>{let t=e=>{if(L.closeAll(),(0,c.D4)(e)){let t=(0,c.e$)(e.error,"An unexpected error occurred while saving. Please try again.");L((0,m.Vo)(t))}else L((0,m.t5)("Settings saved successfully"))},n=[...e.purposeOverrides.map(e=>{let t;return e.is_consent&&(t=b.I$.CONSENT),e.is_legitimate_interest&&(t=b.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:t}})];if(A){let e=await v(n);if((0,c.D4)(e)){t(e);return}}let{enabled:r,...i}=e.gpp;t(await k({gpp:i}))},W=async e=>{let t=await k({consent:{override_vendor_purposes:e}});e&&await v(n.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(e=>{if(L.closeAll(),(0,c.D4)(e)){let t=(0,c.e$)(e.error,"An unexpected error occurred while saving vendor override settings. Please try again.");L((0,m.Vo)(t))}})(t)},O=(0,o.useMemo)(()=>({purposeOverrides:n?n.map(e=>({purpose:e.purpose,is_included:e.is_included,is_consent:e.required_legal_basis===b.I$.CONSENT,is_legitimate_interest:e.required_legal_basis===b.I$.LEGITIMATE_INTERESTS})):[],gpp:I}),[n,I]);return(0,r.jsx)(u.Z,{title:"Consent Configuration",children:e||F||f||_||P?(0,r.jsx)(i.kCb,{justifyContent:"center",alignItems:"center",height:"100%",children:(0,r.jsx)(i.$jN,{})}):(0,r.jsxs)(i.xuv,{"data-testid":"consent-configuration",children:[(0,r.jsx)(p.Z,{heading:"Consent settings"}),(0,r.jsxs)(i.Kqy,{spacing:3,mb:3,children:[(0,r.jsx)(y,{title:"Transparency & Consent Framework settings",children:(0,r.jsx)(x,{name:"TCF",enabled:t})}),(0,r.jsxs)(y,{title:"Vendor overrides",children:[t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.xvT,{mb:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:"Configure overrides for TCF related purposes."}),(0,r.jsxs)(i.kCb,{alignItems:"center",marginBottom:2,children:[(0,r.jsx)(i.rAg,{size:"small",checked:A,onChange:W,disabled:E}),(0,r.jsx)(i.xvT,{px:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:"Override vendor purposes"}),(0,r.jsx)(g.Z,{label:"Toggle on if you want to globally change any flexible legal bases or remove TCF purposes from your CMP"})]}),(0,r.jsx)(i.xvT,{mb:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:A?"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activites.":null})]}):null,A&&t?(0,r.jsxs)(i.xvT,{fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:["To configure this section, select the purposes you allow and where available, the appropriate legal bases (either Consent or Legitimate Interest)."," ",(0,r.jsxs)(l.Z,{href:"https://fid.es/tcf-overrides",children:["Read the guide on vendor overrides here."," "]})]}):null]})]}),(0,r.jsx)(s.J9,{initialValues:O,enableReinitialize:!0,onSubmit:z,children:e=>{let{dirty:t,isValid:n,isSubmitting:o}=e;return(0,r.jsx)(s.l0,{children:(0,r.jsxs)(i.Kqy,{spacing:6,children:[A?(0,r.jsx)(S,{}):null,(0,r.jsx)(C,{}),(0,r.jsx)(i.wpx,{htmlType:"submit",type:"primary",disabled:!t||!n,loading:o,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return o},D4:function(){return i},Dy:function(){return l},XD:function(){return d},cz:function(){return c},hE:function(){return a},oK:function(){return s}});var r=n(76649);let i=e=>"error"in e,s=e=>(0,r.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,o=e=>(0,r.Ln)({status:"number",data:{}},e),a=e=>(0,r.Ln)({detail:"string"},e),l=e=>(0,r.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,r.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,r.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return r}});let r=(e,t)=>s(e,t),i=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?i in e?e.some(e=>s(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>s(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>s(n,t[e]));class o{static narrow(e){return new o(t=>r(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof o?e.NF:e instanceof Function?e:t=>r(e,t);return new o(e=>t(e)&&n(e))}}new o(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=53611)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9252],{98648:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/domains",function(){return n(76974)}])},59301:function(e,t,n){"use strict";var i=n(24246),r=n(56351);t.Z=e=>(0,i.jsx)(r.rUS,{isExternal:!0,color:"complimentary.500",...e})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var i=n(24246),r=n(56351),s=n(88038),a=n.n(s),o=n(86677);n(27378);var c=n(25980),l=n(90867),d=n(77830),u=()=>{let e=(0,o.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:n,padded:s=!0,mainProps:d}=e,m=(0,c.hz)(),g=(0,o.useRouter)(),p="/privacy-requests"===g.pathname||"/datastore-connection"===g.pathname,h=!(m.flags.privacyRequestsConfiguration&&p),{data:x}=(0,l.JE)(void 0,{skip:h}),{data:f}=(0,l.PW)(void 0,{skip:h}),j=m.flags.privacyRequestsConfiguration&&(!x||!f)&&p;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[j?(0,i.jsx)(u,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(56351),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:c,style:l,...d}=e;return(0,i.jsxs)("div",{...d,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...l}:{paddingBottom:"24px",...l},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,c&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:c})]}),!!n&&(0,i.jsx)(s.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},10342:function(e,t,n){"use strict";var i=n(24246),r=n(56351),s=n(91613);t.Z=e=>{let{title:t,tooltip:n,children:a,...o}=e;return(0,i.jsxs)(r.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...o,children:[(0,i.jsxs)(r.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[t,n?(0,i.jsx)(r.xvT,{as:"span",mx:1,children:(0,i.jsx)(s.Z,{label:n})}):void 0]}),(0,i.jsx)(r.Kqy,{p:6,spacing:6,children:a})]})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return s.D4},MM:function(){return m},Ot:function(){return l},c6:function(){return r},cj:function(){return p},e$:function(){return o},fn:function(){return c},iC:function(){return g},nU:function(){return u},tB:function(){return d}});var i,r,s=n(19043);let a="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function c(e){return"object"==typeof e&&null!=e&&"status"in e}function l(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:n}=e;return{status:n,message:o(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let g={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return l}});var i=n(24246),r=n(56351),s=n(79894),a=n.n(s),o=n(27378);let{Text:c}=r.AntTypography,l=e=>{let{items:t,...n}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,o={...e},l=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(c,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:o.title})),l)?o.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(r.zrq,{items:s,...n})}},46628:function(e,t,n){"use strict";n.d(t,{MA:function(){return o},Vo:function(){return l},t5:function(){return c}});var i=n(24246),r=n(56351);let s=e=>{let{children:t,title:n="Success"}=e;return(0,i.jsxs)(r.xvT,{"data-testid":"toast-success-msg",children:[(0,i.jsxs)("strong",{children:[n,":"]})," ",t]})},a=e=>{let{children:t}=e;return(0,i.jsxs)(r.xvT,{"data-testid":"toast-error-msg",children:[(0,i.jsx)("strong",{children:"Error:"})," ",t]})},o={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},c=(e,t)=>{let n=(0,i.jsx)(s,{title:t,children:e});return{...o,description:n}},l=e=>{let t=(0,i.jsx)(a,{children:e});return{...o,description:t,status:"error"}}},76974:function(e,t,n){"use strict";n.r(t);var i=n(24246),r=n(56351),s=n(34090),a=n(59389),o=n(16134),c=n(59301),l=n(10342),d=n(40324),u=n(812),m=n(77213),g=n(58754),p=n(46628),h=n(90867);t.default=()=>{var e;let{isLoading:t}=(0,h.tB)({api_set:!0}),{isLoading:n}=(0,h.tB)({api_set:!1}),x=(0,o.C)(h.ak),f=x.apiSet,j=x.configSet,v=!!((null===(e=j.cors_origins)||void 0===e?void 0:e.length)||j.cors_origin_regex),b=(0,o.C)((0,h.U7)()),[y,{isLoading:w}]=(0,h.km)(),_=(0,r.pmc)(),C=e=>{if(!e||!(e.startsWith("https://")||e.startsWith("http://")))return!1;try{new URL(e)}catch(e){return!1}return!0},k=e=>!!e&&!e.includes("*"),N=e=>{if(!e)return!1;try{let t=new URL(e);return"/"===t.pathname&&!e.endsWith("/")}catch(e){return!1}},A=a.Ry().shape({cors_origins:a.IX().nullable().of(a.Z_().required().trim().test("is-valid-url",e=>{let{label:t}=e;return"".concat(t," must be a valid URL (e.g. https://example.com)")},e=>C(e)).test("has-no-wildcard",e=>{let{label:t}=e;return"".concat(t," cannot contain a wildcard (e.g. https://*.example.com)")},e=>k(e)).test("has-no-path",e=>{let{label:t}=e;return"".concat(t," cannot contain a path (e.g. https://example.com/path)")},e=>N(e)).label("Domain"))}),L=async(e,t)=>{let n=e.cors_origins&&e.cors_origins.length>0?e.cors_origins:void 0,i={...b,security:{cors_origins:n}};(n=>{if(_.closeAll(),(0,u.D4)(n)){let e=(0,u.e$)(n.error,"An unexpected error occurred while saving domains. Please try again.");_((0,p.Vo)(e))}else _((0,p.t5)("Domains saved successfully")),t.resetForm({values:e})})(await y(i))};return(0,i.jsx)(m.Z,{title:"Domains",children:(0,i.jsxs)(r.xuv,{"data-testid":"management-domains",children:[(0,i.jsx)(g.Z,{heading:"Domains"}),(0,i.jsxs)(r.xuv,{maxW:"600px",children:[(0,i.jsxs)(r.xvT,{fontSize:"sm",pb:6,children:["For Fides to work on your website(s), each of your domains must be listed below. You can add and remove domains at any time up to the quantity included in your license. For more information on managing domains"," ",(0,i.jsx)(c.Z,{href:"https://fid.es/domain-configuration",children:"read here"}),"."]}),(0,i.jsx)(l.Z,{"data-testid":"api-set-domains-form",title:"Organization domains",tooltip:"Fides uses these domains to enforce cross-origin resource sharing (CORS), a browser-based security standard. Each domain must be a valid URL (e.g. https://example.com) without any wildcards '*' or paths '/blog'",children:t||w?(0,i.jsx)(r.kCb,{justifyContent:"center",children:(0,i.jsx)(r.$jN,{})}):(0,i.jsx)(s.J9,{initialValues:f,enableReinitialize:!0,onSubmit:L,validationSchema:A,validateOnChange:!0,children:e=>{let{dirty:t,values:n,isValid:a}=e;return(0,i.jsxs)(s.l0,{children:[(0,i.jsx)(s.F2,{name:"cors_origins",render:e=>(0,i.jsxs)(r.kCb,{flexDir:"column",children:[n.cors_origins.map((t,n)=>(0,i.jsxs)(r.kCb,{flexDir:"row",my:3,children:[(0,i.jsx)(d.j0,{variant:"stacked",name:"cors_origins[".concat(n,"]"),placeholder:"https://subdomain.example.com:9090"}),(0,i.jsx)(r.wpx,{"aria-label":"delete-domain",className:"z-[2] ml-4",icon:(0,i.jsx)(r.pJl,{}),onClick:()=>{e.remove(n)}})]},n)),(0,i.jsx)(r.kCb,{justifyContent:"center",mt:3,children:(0,i.jsx)(r.wpx,{"aria-label":"add-domain",className:"w-full",onClick:()=>{e.push("")},children:"Add domain"})})]})}),(0,i.jsx)(r.xuv,{mt:6,children:(0,i.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:w||!t||!a,loading:w,"data-testid":"save-btn",children:"Save"})})]})}})})]}),(0,i.jsx)(r.xuv,{maxW:"600px",marginY:3,children:(0,i.jsx)(l.Z,{"data-testid":"config-set-domains-form",title:"Advanced settings",tooltip:"These domains are configured by an administrator with access to Fides security settings and can support more advanced options such as wildcards and regex.",children:n?(0,i.jsx)(r.kCb,{justifyContent:"center",children:(0,i.jsx)(r.$jN,{})}):(0,i.jsxs)(r.kCb,{flexDir:"column",children:[j.cors_origins.map((e,t)=>(0,i.jsx)(d.oi,{"data-testid":"input-config_cors_origins[".concat(t,"]"),marginY:3,value:e,isDisabled:!0,isPassword:!1},t)),j.cors_origin_regex?(0,i.jsx)(d.oi,{"data-testid":"input-config_cors_origin_regex",marginY:3,value:j.cors_origin_regex,isDisabled:!0,isPassword:!1},"cors_origin_regex"):void 0,v?void 0:(0,i.jsx)(r.xvT,{fontSize:"xs",color:"gray.500",children:"No advanced domain settings configured."})]})})})]})})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return a},D4:function(){return r},Dy:function(){return c},XD:function(){return l},cz:function(){return d},hE:function(){return o},oK:function(){return s}});var i=n(76649);let r=e=>"error"in e,s=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,i.Ln)({status:"number",data:{}},e),o=e=>(0,i.Ln)({detail:"string"},e),c=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),l=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>s(e,t),r=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>s(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>s(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>s(n,t[e]));class a{static narrow(e){return new a(t=>i(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof a?e.NF:e instanceof Function?e:t=>i(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=98648)}),_N_E=e.O()}]);