ethyca-fides 2.59.2b1__py2.py3-none-any.whl → 2.59.2b2__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 (225) hide show
  1. {ethyca_fides-2.59.2b1.dist-info → ethyca_fides-2.59.2b2.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.59.2b1.dist-info → ethyca_fides-2.59.2b2.dist-info}/RECORD +189 -190
  3. fides/_version.py +3 -3
  4. fides/api/schemas/connection_configuration/connection_secrets_mysql.py +12 -0
  5. fides/api/service/connectors/mysql_connector.py +13 -1
  6. fides/api/worker/__init__.py +1 -1
  7. fides/ui-build/static/admin/404.html +1 -1
  8. fides/ui-build/static/admin/_next/static/chunks/{1100-22c375e757f23150.js → 1100-93c5835d689e9dd5.js} +1 -1
  9. fides/ui-build/static/admin/_next/static/chunks/{1817-11bb237f57d9ad27.js → 1817-16d1dd3b13e590b3.js} +1 -1
  10. fides/ui-build/static/admin/_next/static/chunks/{1904-3c40738cb0fd2a7c.js → 1904-0f03e5a2c3de8487.js} +1 -1
  11. fides/ui-build/static/admin/_next/static/chunks/{2479-50f431c0e2c0de3c.js → 2479-18fbea714b5f1f7a.js} +1 -1
  12. fides/ui-build/static/admin/_next/static/chunks/3503-569232568cee1a7e.js +1 -0
  13. fides/ui-build/static/admin/_next/static/chunks/3513-cf0c4d886ff26e00.js +1 -0
  14. fides/ui-build/static/admin/_next/static/chunks/{3702-31d37a0217f82615.js → 3702-c4465f7b3bbc3edc.js} +1 -1
  15. fides/ui-build/static/admin/_next/static/chunks/3855-5417dfc333c7b6b6.js +1 -0
  16. fides/ui-build/static/admin/_next/static/chunks/{3872-68b4ceba8f632bc0.js → 3872-03319b7328ddc284.js} +1 -1
  17. fides/ui-build/static/admin/_next/static/chunks/401-f0c485676a4fc5f9.js +1 -0
  18. fides/ui-build/static/admin/_next/static/chunks/4060-98d858ec609e4b76.js +1 -0
  19. fides/ui-build/static/admin/_next/static/chunks/4121-044a191b265f4e51.js +1 -0
  20. fides/ui-build/static/admin/_next/static/chunks/4481-85e3f5845b50f10d.js +1 -0
  21. fides/ui-build/static/admin/_next/static/chunks/{5487-22de631f1d186527.js → 5487-7751e91b40dc6050.js} +1 -1
  22. fides/ui-build/static/admin/_next/static/chunks/{5826-226c8843e715b6ad.js → 5826-8516f6c635510e95.js} +1 -1
  23. fides/ui-build/static/admin/_next/static/chunks/5835-b7b45dfb97180a88.js +1 -0
  24. fides/ui-build/static/admin/_next/static/chunks/5973-4e65b191ed82f8bd.js +1 -0
  25. fides/ui-build/static/admin/_next/static/chunks/6277-076a319bcff4f1a2.js +1 -0
  26. fides/ui-build/static/admin/_next/static/chunks/{6372-0ca1b9521b5489fd.js → 6372-d3f778c62070545f.js} +1 -1
  27. fides/ui-build/static/admin/_next/static/chunks/{6853-7d7eb22f19d3806c.js → 6853-25ff9e572d633f33.js} +1 -1
  28. fides/ui-build/static/admin/_next/static/chunks/{6954-981a8a444780bedb.js → 6954-169abc679def0fb6.js} +1 -1
  29. fides/ui-build/static/admin/_next/static/chunks/{7751-09c6424d673d8aa4.js → 7751-e0a78be0ca620df1.js} +1 -1
  30. fides/ui-build/static/admin/_next/static/chunks/79-2302442f8b53f944.js +1 -0
  31. fides/ui-build/static/admin/_next/static/chunks/{8433-dd6d8dae02275d66.js → 8433-4481a5d085d3b008.js} +1 -1
  32. fides/ui-build/static/admin/_next/static/chunks/{8934-6881185f0c5c0f6d.js → 8934-e2a4fd9f8ab74142.js} +1 -1
  33. fides/ui-build/static/admin/_next/static/chunks/9282-356dc48612f4a21c.js +1 -0
  34. fides/ui-build/static/admin/_next/static/chunks/{9327-fb7ef941b5176077.js → 9327-b019990849ff57f3.js} +1 -1
  35. fides/ui-build/static/admin/_next/static/chunks/{9392.da35a8e778812d91.js → 9392.5f3cfb8eafbeac59.js} +1 -1
  36. fides/ui-build/static/admin/_next/static/chunks/9572-ab070b1ae17dde8f.js +1 -0
  37. fides/ui-build/static/admin/_next/static/chunks/{9676.f297a1347ac09c56.js → 9676.2e1267373b5a6076.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/9719-caba0228fc973d3f.js +1 -0
  39. fides/ui-build/static/admin/_next/static/chunks/9767-b4f9c2cc14de6df6.js +1 -0
  40. fides/ui-build/static/admin/_next/static/chunks/{9951-8ceba69296972ce9.js → 9951-e0d7db7ec538ebf1.js} +1 -1
  41. fides/ui-build/static/admin/_next/static/chunks/9965-528ef17ac491d809.js +1 -0
  42. fides/ui-build/static/admin/_next/static/chunks/pages/{404-a3c57a06ff67cf1f.js → 404-1dfbf30fba0233a2.js} +1 -1
  43. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-fc9e922ec354be47.js → _app-9560c81c6cf5f050.js} +17 -17
  44. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-bca30784c7356aa3.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-93907c53f342831f.js → multiple-14c60fbc5907c621.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-0d7a9d9ad082c80c.js +1 -0
  47. fides/ui-build/static/admin/_next/static/chunks/pages/ant-poc-c2c4fd5faaf0f882.js +1 -0
  48. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-5e83ee7792c0f75f.js → add-vendors-79949b978a966399.js} +1 -1
  49. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-ea7b2c628260c84c.js → configure-6af86d0717034a7f.js} +1 -1
  50. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-7122d8a8c20e7cd2.js → [id]-e876f21f7f2245aa.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-85ddbe3ae50c7527.js → privacy-experience-83dea888aad26af3.js} +1 -1
  52. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-5a9269aa00a16596.js → [id]-80dd6ab96599efb5.js} +1 -1
  53. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-78808c75ba86c0be.js → new-e48da14c5d5d0a66.js} +1 -1
  54. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-047c409bc5e12d1a.js → privacy-notices-05e67aa6f029e6d4.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-893753088b9729a3.js → properties-6c99121562583eb7.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-01d1371e690ae190.js → reporting-ed1cdefeb38cf592.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/pages/{consent-7e5adfec9134a268.js → consent-253aa071516a6436.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-4b2c10ff79e46e50.js → [projectUrn]-366121dfd638f6b5.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-05bbb01e37766b80.js → projects-974623a3afd4754b.js} +1 -1
  60. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-4b1d9e4cc7fa17a2.js +1 -0
  61. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-936f72087aae94e1.js +1 -0
  62. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-b6e0c8625c953a00.js +1 -0
  63. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-9ebb4dc8bc7dd058.js +1 -0
  64. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-f0fe5d6cfcce0e69.js +1 -0
  65. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-1bcaa606739ea1c5.js → [resourceUrn]-10f789d4ab2b8927.js} +1 -1
  66. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-22f55dc12354b4c6.js → detection-f473b2ee1c67be3c.js} +1 -1
  67. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-86111c25dc30ef2b.js → [resourceUrn]-2569551ae75ea5a2.js} +1 -1
  68. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-853be75f08b9ab5c.js → discovery-ad077f30849fdc0a.js} +1 -1
  69. fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-6c63a6295668ed4e.js → datamap-0cb4cd87c876acc3.js} +1 -1
  70. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-7a99a6c5c2fc2abe.js → [...subfieldNames]-fd1f9aba215e8fb2.js} +1 -1
  71. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-39aab1de4df0660d.js → [collectionName]-06793bb37fa509d8.js} +1 -1
  72. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-2cf04998a7521a7d.js → [datasetId]-662ce6650bd83f05.js} +1 -1
  73. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-f3a6dd67f012b005.js → new-5b773da9c79af072.js} +1 -1
  74. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-3b703775de1ca75e.js → dataset-a8582040705239d4.js} +1 -1
  75. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-b905c75f68786c2f.js → [id]-e650d48347fb457e.js} +1 -1
  76. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-abd92bec98bdbb66.js → new-4b96de4707916560.js} +1 -1
  77. fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-52c3f076edb49944.js → datastore-connection-7ce2cd66791e7f6f.js} +1 -1
  78. fides/ui-build/static/admin/_next/static/chunks/pages/{index-1bccf315f995267a.js → index-71e4264dcfba6181.js} +1 -1
  79. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-b3ec5320782fbb49.js +1 -0
  80. fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-2ce76b506ba8404a.js → integrations-4789200cdb1d7ec5.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-8950b4aff799099c.js → [id]-3a52dfa45f398f31.js} +1 -1
  82. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-4cad85d5b6d52734.js → add-template-8e20f0da3a0779cc.js} +1 -1
  83. fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-57c7aa44af163623.js → messaging-439832fde70c1157.js} +1 -1
  84. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-2fc14bda8d314449.js → [id]-16b266c9ddf8d192.js} +1 -1
  85. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-3219ddeb37d46398.js → messaging-9c1748191ca19867.js} +1 -1
  86. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-9f1ea2b5896ff3fd.js +1 -0
  87. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-d8d23d06ce1d9dae.js → configure-67b0a2a798d71e4d.js} +1 -1
  88. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-faa220f7200fb252.js +1 -0
  89. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-6cca2c8ebbff78aa.js → [id]-99860c05fb5d25bd.js} +1 -1
  90. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-f09f98007725fa51.js → add-property-4a7a21c25985fff0.js} +1 -1
  91. fides/ui-build/static/admin/_next/static/chunks/pages/{properties-9034bab3d7200d9b.js → properties-a78b5af5894ed324.js} +1 -1
  92. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-a36cf070c98a6cbd.js → datamap-b5c8cdfd6c1e0544.js} +1 -1
  93. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-92dada8329e89092.js → about-92fcfaa6111d7d24.js} +1 -1
  94. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-224434177b2775dc.js +1 -0
  95. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-f6d6e3d9d556387c.js → consent-5822e06b76f3ec84.js} +1 -1
  96. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-ff123ece2e2e4009.js +1 -0
  97. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-368a4183139ea5e0.js → domain-records-4347b3fdd12fdcff.js} +1 -1
  98. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-255655d6c367faad.js → domains-899401bf5c72b67f.js} +1 -1
  99. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-e4498b6310074705.js → email-templates-d8f6562694f9dd45.js} +1 -1
  100. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-18f56b6b76abb71d.js → locations-f74503aa1626e302.js} +1 -1
  101. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-610aa65b3dbcf467.js +1 -0
  102. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-0350314337abff11.js → regulations-081148db3f589271.js} +1 -1
  103. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-6986ba3f6f33c110.js +1 -0
  104. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-022910a52efbad76.js → [id]-e0110a539d33069a.js} +1 -1
  105. fides/ui-build/static/admin/_next/static/chunks/pages/{systems-e9a111ef0c32161e.js → systems-7aef28e963417fa3.js} +1 -1
  106. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-61345b0f7cbd939e.js +1 -0
  107. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-082c3156175f9267.js → new-65ef1bdebb679666.js} +1 -1
  108. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-32ec340d4b390d07.js → [id]-3430c5a08e86a85d.js} +1 -1
  109. fides/ui-build/static/admin/_next/static/chunks/pages/user-management-216944eb66e430bb.js +1 -0
  110. fides/ui-build/static/admin/_next/static/chunks/webpack-7104b266fb47d653.js +1 -0
  111. fides/ui-build/static/admin/_next/static/css/{72caf4a266697967.css → 091e5fc4883aeb42.css} +1 -1
  112. fides/ui-build/static/admin/_next/static/tLZG5DlQ8HHUd5zR6TZEN/_buildManifest.js +1 -0
  113. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  114. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  115. fides/ui-build/static/admin/add-systems.html +1 -1
  116. fides/ui-build/static/admin/ant-poc.html +1 -1
  117. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  118. fides/ui-build/static/admin/consent/configure.html +1 -1
  119. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  120. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  121. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  122. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  123. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  124. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  125. fides/ui-build/static/admin/consent/properties.html +1 -1
  126. fides/ui-build/static/admin/consent/reporting.html +1 -1
  127. fides/ui-build/static/admin/consent.html +1 -1
  128. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  129. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  130. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  131. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  132. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  133. fides/ui-build/static/admin/data-catalog.html +1 -1
  134. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  135. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  136. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  137. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  138. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  139. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  140. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  141. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  142. fides/ui-build/static/admin/datamap.html +1 -1
  143. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  144. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  145. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  146. fides/ui-build/static/admin/dataset/new.html +1 -1
  147. fides/ui-build/static/admin/dataset.html +1 -1
  148. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  149. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  150. fides/ui-build/static/admin/datastore-connection.html +1 -1
  151. fides/ui-build/static/admin/index.html +1 -1
  152. fides/ui-build/static/admin/integrations/[id].html +1 -1
  153. fides/ui-build/static/admin/integrations.html +1 -1
  154. fides/ui-build/static/admin/login/[provider].html +1 -1
  155. fides/ui-build/static/admin/login.html +1 -1
  156. fides/ui-build/static/admin/messaging/[id].html +1 -1
  157. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  158. fides/ui-build/static/admin/messaging.html +1 -1
  159. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  160. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  161. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  162. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  163. fides/ui-build/static/admin/privacy-requests.html +1 -1
  164. fides/ui-build/static/admin/properties/[id].html +1 -1
  165. fides/ui-build/static/admin/properties/add-property.html +1 -1
  166. fides/ui-build/static/admin/properties.html +1 -1
  167. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  168. fides/ui-build/static/admin/settings/about.html +1 -1
  169. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  170. fides/ui-build/static/admin/settings/consent.html +1 -1
  171. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  172. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  173. fides/ui-build/static/admin/settings/domains.html +1 -1
  174. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  175. fides/ui-build/static/admin/settings/locations.html +1 -1
  176. fides/ui-build/static/admin/settings/organization.html +1 -1
  177. fides/ui-build/static/admin/settings/regulations.html +1 -1
  178. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  179. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  180. fides/ui-build/static/admin/systems.html +1 -1
  181. fides/ui-build/static/admin/taxonomy.html +1 -1
  182. fides/ui-build/static/admin/user-management/new.html +1 -1
  183. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  184. fides/ui-build/static/admin/user-management.html +1 -1
  185. fides/ui-build/static/admin/_next/static/4ZsbAUsCLedx18AUPZCUU/_buildManifest.js +0 -1
  186. fides/ui-build/static/admin/_next/static/chunks/146-106021bf1ae6e912.js +0 -1
  187. fides/ui-build/static/admin/_next/static/chunks/3086-ffd15c92ea81b3d6.js +0 -1
  188. fides/ui-build/static/admin/_next/static/chunks/3244-4b76482dcc5d576f.js +0 -1
  189. fides/ui-build/static/admin/_next/static/chunks/3855-da54ef27afd56c46.js +0 -1
  190. fides/ui-build/static/admin/_next/static/chunks/401-49cdd118a89cc343.js +0 -1
  191. fides/ui-build/static/admin/_next/static/chunks/4060-bad5f07013c7bb49.js +0 -1
  192. fides/ui-build/static/admin/_next/static/chunks/4121-4914fb77e60d31f4.js +0 -1
  193. fides/ui-build/static/admin/_next/static/chunks/4481-7a992683e9191bc9.js +0 -1
  194. fides/ui-build/static/admin/_next/static/chunks/5102-3acf312a8f0d7720.js +0 -1
  195. fides/ui-build/static/admin/_next/static/chunks/5480-d177a83facd21738.js +0 -1
  196. fides/ui-build/static/admin/_next/static/chunks/5973-1020589bef6dd253.js +0 -1
  197. fides/ui-build/static/admin/_next/static/chunks/6277-c46c9eb59177b850.js +0 -1
  198. fides/ui-build/static/admin/_next/static/chunks/6395-04041b53946664b1.js +0 -1
  199. fides/ui-build/static/admin/_next/static/chunks/79-7ca48fb1a0b52f96.js +0 -1
  200. fides/ui-build/static/admin/_next/static/chunks/9282-23b38e03f897722f.js +0 -1
  201. fides/ui-build/static/admin/_next/static/chunks/9572-8f5947db1a6da260.js +0 -1
  202. fides/ui-build/static/admin/_next/static/chunks/9767-162b0f8524990149.js +0 -1
  203. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-c4c0c42bbe0f5548.js +0 -1
  204. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a8c51c7bdbb405e2.js +0 -1
  205. fides/ui-build/static/admin/_next/static/chunks/pages/ant-poc-8fcf312148606e7e.js +0 -1
  206. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-d08a38d4f198691a.js +0 -1
  207. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-cc5431e4fbd6d39e.js +0 -1
  208. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-f073ddcfb916988e.js +0 -1
  209. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-cf48ed7dc04c3af2.js +0 -1
  210. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-73025c2ac5a00347.js +0 -1
  211. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-afcf73fd0337dde0.js +0 -1
  212. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-8e17802ab6b2d3fd.js +0 -1
  213. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-9d71495b42f34038.js +0 -1
  214. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-7986cf3b36456353.js +0 -1
  215. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-e6c477f2ac098e0b.js +0 -1
  216. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-c01d24583e9485f0.js +0 -1
  217. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-d5f777510ab8dfd2.js +0 -1
  218. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-517419b35435604a.js +0 -1
  219. fides/ui-build/static/admin/_next/static/chunks/pages/user-management-c8ca51efbeccf39b.js +0 -1
  220. fides/ui-build/static/admin/_next/static/chunks/webpack-01277b766c8eb076.js +0 -1
  221. {ethyca_fides-2.59.2b1.dist-info → ethyca_fides-2.59.2b2.dist-info}/WHEEL +0 -0
  222. {ethyca_fides-2.59.2b1.dist-info → ethyca_fides-2.59.2b2.dist-info}/entry_points.txt +0 -0
  223. {ethyca_fides-2.59.2b1.dist-info → ethyca_fides-2.59.2b2.dist-info}/licenses/LICENSE +0 -0
  224. {ethyca_fides-2.59.2b1.dist-info → ethyca_fides-2.59.2b2.dist-info}/top_level.txt +0 -0
  225. /fides/ui-build/static/admin/_next/static/{4ZsbAUsCLedx18AUPZCUU → tLZG5DlQ8HHUd5zR6TZEN}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9572],{58754:function(e,t,a){var i=a(24246),s=a(56078),n=a(70788);t.Z=e=>{let{heading:t,breadcrumbItems:a,isSticky:r=!0,children:l,rightContent:d,style:o,...c}=e;return(0,i.jsxs)("div",{...c,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...o}:{paddingBottom:"24px",...o},children:[(0,i.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(s.X6q,{className:a||l?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,d&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:d})]}),!!a&&(0,i.jsx)(n.m,{className:l?"pb-4":void 0,items:a,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,a){a.d(t,{d:function(){return o}});var i=a(24246),s=a(56078),n=a(34090),r=a(27378),l=a(46238),d=a(40324);let o=e=>{let{name:t,label:a,labelProps:o,tooltip:c,isRequired:u,layout:m="inline",helperText:p,...x}=e,[h,j,{setValue:v}]=(0,n.U$)(t),y=!!(j.touched&&j.error),[g,f]=(0,r.useState)("");h.value||"tags"!==x.mode&&"multiple"!==x.mode||(h.value=[]),"tags"===x.mode&&"string"==typeof h.value&&(h.value=[h.value]);let b="tags"===x.mode?(e,t)=>e?e.value!==g||h.value.includes(g)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:x.optionRender||void 0,_=e=>{f(e),x.onSearch&&x.onSearch(e)},k=(e,t)=>{v(e),x.onChange&&x.onChange(e,t)};return"inline"===m?(0,i.jsx)(s.NIc,{isInvalid:y,isRequired:u,children:(0,i.jsxs)(s.rjZ,{templateColumns:a?"1fr 3fr":"1fr",children:[a?(0,i.jsx)(d.__,{htmlFor:x.id||t,...o,children:a}):null,(0,i.jsxs)(s.jqI,{align:"center",children:[(0,i.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(s.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:b,onSearch:"tags"===x.mode?_:void 0,onChange:k,value:h.value||void 0,status:y?"error":void 0}),p&&(0,i.jsx)(s.Q6r,{children:p}),(0,i.jsx)(d.Bc,{isInvalid:y,message:j.error,fieldName:h.name})]}),(0,i.jsx)(l.b,{label:c})]})]})}):(0,i.jsx)(s.NIc,{isInvalid:y,isRequired:u,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[a?(0,i.jsx)(d.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...o,children:a}):null,(0,i.jsx)(l.b,{label:c})]}),(0,i.jsx)(s.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:b,onSearch:"tags"===x.mode?_:void 0,onChange:k,value:h.value||void 0,status:y?"error":void 0}),p&&(0,i.jsx)(s.Q6r,{style:{marginTop:0},children:p}),(0,i.jsx)(d.Bc,{isInvalid:y,message:j.error,fieldName:h.name})]})})}},14047:function(e,t,a){a.d(t,{H:function(){return n},V:function(){return i.V}});var i=a(84306),s=a(812);let n=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:t=>{let a="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?a=t.data.detail:(0,s.tB)(t)&&(a=t.data.detail[0].msg),e(a)}}}},84306:function(e,t,a){a.d(t,{V:function(){return n}});var i=a(24246),s=a(56078);let n=()=>{let e=(0,s.pmc)();return{errorAlert:(t,a,n)=>{let r={...n,position:(null==n?void 0:n.position)||"top",render:e=>{let{onClose:n}=e;return(0,i.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,i.jsx)(s.zMQ,{}),(0,i.jsxs)(s.xuv,{children:[a&&(0,i.jsx)(s.CdC,{children:a}),(0,i.jsx)(s.XaZ,{children:t})]}),(0,i.jsx)(s.PZ7,{onClick:n,position:"relative",right:0,size:"sm",top:-1})]})}};(null==n?void 0:n.id)&&e.isActive(n.id)?e.update(n.id,r):e(r)},successAlert:(t,a,n)=>{let r={...n,position:(null==n?void 0:n.position)||"top",render:e=>{let{onClose:n}=e;return(0,i.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,i.jsx)(s.zMQ,{}),(0,i.jsxs)(s.xuv,{children:[a&&(0,i.jsx)(s.CdC,{children:a}),(0,i.jsx)(s.XaZ,{children:t})]}),(0,i.jsx)(s.PZ7,{onClick:n,position:"relative",right:0,size:"sm",top:-1})]})}};(null==n?void 0:n.id)&&e.isActive(n.id)?e.update(n.id,r):e(r)}}}},70788:function(e,t,a){a.d(t,{m:function(){return o}});var i=a(24246),s=a(56078),n=a(79894),r=a.n(n),l=a(27378);let{Text:d}=s.AntTypography,o=e=>{let{items:t,...a}=e,n=(0,l.useMemo)(()=>null==t?void 0:t.map((e,a)=>{let n=a===t.length-1,l={...e},o=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,i.jsx)(d,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,children:l.title})),o)?l.title=(0,i.jsx)(s.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,i.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,i.jsx)(s.zrq,{items:n,...a})}},35258:function(e,t,a){a.d(t,{Z:function(){return q}});var i=a(24246),s=a(84720),n=a(56078),r=a(27378),l=a(52368),d=a(812),o=a(46628),c=a(65450),u=a(31883),m=a(34090),p=a(45938),x=a(95346),h=a(55484),j=a(97181),v=a(40324),y=a(16643);let g=h.Ry().shape({data_categories:h.IX(h.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:h.Z_().required().label("Data use"),data_subjects:h.IX(h.Z_()).min(1,"Must assign at least one data subject").label("Data subjects")}),f={data_categories:[],data_subjects:[],data_use:"",dataset_references:[],customFieldValues:{},id:"",cookies:[]},b=e=>{var t;let{customFieldValues:a,...i}=e;return{...i,name:null!==(t=e.name)&&void 0!==t?t:"",cookies:i.cookies.map(e=>({name:e,path:"/"}))}},_=e=>{let{allDataUses:t,allDataCategories:a,allDataSubjects:s,allDatasets:r,privacyDeclarationId:l,includeCustomFields:d}=e,o=r?r.map(e=>{var t;return{label:null!==(t=e.name)&&void 0!==t?t:e.fides_key,value:e.fides_key}}):[];return(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsx)(j.d,{id:"data_use",label:"Data use",name:"data_use",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What is the system using the data for. For example, is it for third party advertising or perhaps simply providing system operations.",layout:"stacked",disabled:!!l}),(0,i.jsx)(v.j0,{id:"name",label:"Processing Activity",name:"name",variant:"stacked",tooltip:"The personal data processing activity or activities associated with this data use.",disabled:!!l}),(0,i.jsx)(j.d,{name:"data_categories",label:"Data categories",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What type of data is your system processing? This could be various types of user or system data.",mode:"multiple",layout:"stacked",disabled:!0}),(0,i.jsx)(j.d,{name:"data_subjects",label:"Data subjects",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Whose data are you processing? This could be customers, employees or any other type of user in your system.",mode:"multiple",layout:"stacked",disabled:!0}),r?(0,i.jsx)(j.d,{name:"dataset_references",label:"Dataset references",options:o,tooltip:"Referenced Dataset fides keys used by the system.",mode:"multiple",layout:"stacked"}):null,d?(0,i.jsx)(x.uc,{resourceType:y.P6.PRIVACY_DECLARATION,resourceFidesKey:l}):null]})},k=(e,t)=>{var a,i;return e?{...e,customFieldValues:t||{},cookies:null!==(i=null===(a=e.cookies)||void 0===a?void 0:a.map(e=>e.name))&&void 0!==i?i:[]}:f},C=e=>{let{onSubmit:t,initialValues:a,allDataUses:s,privacyDeclarationId:l}=e,{customFieldValues:d,upsertCustomFields:o}=(0,x.mZ)({resourceType:y.P6.PRIVACY_DECLARATION,resourceFidesKey:l}),c=(0,r.useMemo)(()=>k(a,d),[a,d]),[u,m]=(0,r.useState)(!1),p=(0,r.useMemo)(()=>{let e=s.filter(e=>e.fides_key===c.data_use)[0];if(e)return c.name?"".concat(e.name," - ").concat(c.name):e.name},[s,c]);return{handleSubmit:async(e,a)=>{let{customFieldValues:i}=e,s=b(e),n=await t(s,a);if(n){let t=n.filter(t=>t.data_use===e.data_use&&(!t.name||t.name===e.name));t.length>0&&await o({customFieldValues:i,fides_key:t[0].id}),a.resetForm({values:e}),m(!0)}},renderHeader:e=>{let{dirty:t,boxProps:a,hideSaved:s}=e;return(0,i.jsxs)(n.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",...a,children:[p?(0,i.jsx)(n.X6q,{as:"h4",size:"xs",fontWeight:"medium",mr:4,children:p}):null,!s&&u&&!t&&c.data_use?(0,i.jsxs)(n.xvT,{fontSize:"sm","data-testid":"saved-indicator",children:[(0,i.jsx)(n.StI,{})," Saved"]}):null]})},initialValues:c}},S=e=>{let{onSubmit:t,initialValues:a,onDelete:s,...r}=e,{handleSubmit:l,renderHeader:d,initialValues:o}=C({onSubmit:t,initialValues:a,allDataUses:r.allDataUses,privacyDeclarationId:null==a?void 0:a.id});return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:o,onSubmit:l,validationSchema:g,children:e=>{let{dirty:t}=e;return(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(p.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsx)(n.xuv,{"data-testid":"header",children:d({dirty:t})}),(0,i.jsx)(_,{onDelete:s,...r})]})]})}})},w=e=>{let{privacyDeclaration:t,onEdit:a,onDelete:s,includeCustomFields:r,...l}=e,{initialValues:d,renderHeader:o,handleSubmit:c}=C({initialValues:t,onSubmit:e=>a(t,e),privacyDeclarationId:t.id,...l});return(0,i.jsx)(n.Qdk,{children:e=>{let{isExpanded:a}=e;return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:d,onSubmit:c,validationSchema:g,children:e=>{let{dirty:d}=e;return(0,i.jsxs)(m.l0,{"data-testid":"".concat(t.data_use,"-form"),children:[(0,i.jsx)(p.Gt,{id:"".concat(t.id,"-form"),name:t.id}),(0,i.jsxs)(n.KFZ,{py:4,borderBottomWidth:a?"0px":"1px",backgroundColor:a?"gray.50":void 0,"data-testid":"accordion-header-".concat(t.data_use),children:[o({dirty:d,boxProps:{flex:"1",textAlign:"left"},hideSaved:!a}),(0,i.jsx)(n.XEm,{})]}),(0,i.jsx)(n.Hk3,{backgroundColor:"gray.50",pt:0,children:(0,i.jsx)(n.Kqy,{spacing:4,children:(0,i.jsx)(_,{privacyDeclarationId:t.id,onDelete:s,includeCustomFields:r,...l})})})]})}})}})};var I=e=>{let{privacyDeclarations:t,...a}=e;return(0,i.jsx)(n.UQy,{allowToggle:!0,border:"transparent","data-testid":"privacy-declaration-accordion",children:t.map(e=>(0,i.jsx)(w,{privacyDeclaration:e,...a},e.id))})},D=e=>{let{system:t,includeCustomFields:a,onSave:s,...l}=e,m=(0,n.pmc)(),[p]=(0,c.qQ)(),[x,h]=(0,r.useState)(!1),[j,v]=(0,r.useState)(void 0),y=(0,r.useMemo)(()=>j?t.privacy_declarations.filter(e=>e.id!==j.id):t.privacy_declarations,[j,t]),g=e=>y.filter(t=>t.data_use===e.data_use&&t.name===e.name).length>0&&(m((0,o.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),f=async(e,a)=>{let i=e.map(e=>{var t;return{...e,name:null!==(t=e.name)&&void 0!==t?t:""}}),n={...t,privacy_declarations:i};return(e=>{if((0,u.D4)(e)){let t=(0,d.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");m((0,o.Vo)(t));return}return m.closeAll(),m((0,o.t5)(a?"Data use deleted":"Data use saved")),s&&s(e.data),e.data.privacy_declarations})(await p(n))},b=async(e,a)=>{if(!(a.id!==e.id&&g(a)))return f(t.privacy_declarations.map(t=>t.id===e.id?a:t))},_=async e=>{if(g(e))return;m.closeAll();let t=[...y,e],a=await f(t);return a&&v(a.filter(t=>(!t.name||t.name===e.name)&&t.data_use===e.data_use)[0]),a},k=async e=>f(t.privacy_declarations.filter(t=>t.id!==e.id),!0),C=async e=>{let t=await k(e);return t&&(h(!1),v(void 0)),t};return(0,r.useEffect)(()=>{h(!1)},[t.fides_key]),(0,i.jsxs)(n.Kqy,{spacing:3,children:[(0,i.jsx)(I,{privacyDeclarations:y,onEdit:b,onDelete:k,includeCustomFields:a,...l}),x?(0,i.jsx)(n.xuv,{backgroundColor:"gray.50",p:4,"data-testid":"new-declaration-form",children:(0,i.jsx)(S,{initialValues:j,onSubmit:_,onDelete:C,includeCustomFields:a,...l})}):null,0===t.privacy_declarations.length?(0,i.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",pl:2,children:"No data uses"}):null]})},T=a(19043);let V=e=>{let[t]=(0,c.dB)(),a=(0,n.pmc)();return{handleUpsertSystem:async(i,s)=>{let n=[{...e,name:i.name,description:i.description}],r=await t(n);(0,T.D4)(r)?a((0,o.Vo)((0,d.e$)(r.error))):(a((0,o.t5)("Successfully saved system info")),s.resetForm({values:i}))},validationSchema:h.Ry().shape({name:h.Z_().required().label("Name"),description:h.Z_().required().label("Description")})}},z={name:"",description:""};var R=e=>{let{system:t}=e,a="/systems/configure/".concat(t.fides_key),{handleUpsertSystem:s,validationSchema:r}=V(t);return(0,i.jsxs)(n.xuv,{children:[(0,i.jsxs)(n.kCb,{alignItems:"center",children:[(0,i.jsx)(n.xvT,{color:"gray.600",size:"md",lineHeight:6,fontWeight:"semibold",marginBottom:2,children:"System details"}),(0,i.jsx)(n.LZC,{}),(0,i.jsxs)(n._pl,{color:"complimentary.500",href:a,children:["View more",(0,i.jsx)(n.h0n,{ml:2})]})]}),(0,i.jsx)(n.xuv,{width:"100%",padding:4,borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:null!=t?t:z,validationSchema:r,onSubmit:s,children:e=>{let{isSubmitting:t,dirty:a,isValid:s}=e;return(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(p.Gt,{id:"SystemInfoDrawer",name:"System Info"}),(0,i.jsx)(n.xuv,{marginTop:3,children:(0,i.jsx)(v.j0,{label:"System name",name:"name",variant:"stacked"})}),(0,i.jsx)(n.xuv,{marginTop:3,children:(0,i.jsx)(v.Ks,{label:"System description",name:"description",variant:"stacked"})}),(0,i.jsx)(n.kCb,{marginTop:6,justifyContent:"flex-end",children:(0,i.jsx)(n.wpx,{htmlType:"submit",disabled:!a||!s,loading:t,type:"primary",children:"Save"})})]})}})})]})},q=e=>{var t;let{selectedSystemId:a,resetSelectedSystemId:d}=e,o=(0,r.useMemo)(()=>!!a,[a]),{isLoading:u,...m}=(0,l.f)({includeDatasets:!1,includeDisabled:!1}),{data:p}=(0,c.rn)(a,{skip:!a});return(0,i.jsx)(n.xuv,{position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,overflow:"hidden",children:(0,i.jsx)(n.Mi4,{transition:{enter:{ease:"easeInOut",duration:.5},exit:{ease:"easeInOut",duration:.5}},direction:"right",in:o,unmountOnExit:!0,style:{zIndex:11,pointerEvents:"none",position:"absolute"},children:(0,i.jsxs)(n.xuv,{position:"absolute",right:"0px",height:"100%",width:"100%",maxWidth:"480px",pointerEvents:"auto",borderWidth:0,boxShadow:"0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)",display:a?"unset":"none",backgroundColor:"white","data-testid":"datamap-drawer",children:[(0,i.jsx)(n.xuv,{id:"drawer-header",borderBottomWidth:1,paddingX:6,paddingY:3,children:(0,i.jsxs)(n.kCb,{children:[(0,i.jsx)(n.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:(0,i.jsx)(n.xvT,{fontWeight:"semibold",fontSize:"lg",lineHeight:"7",color:"gray.900",children:null!==(t=null==p?void 0:p.name)&&void 0!==t?t:"System Information"})}),(0,i.jsx)(n.LZC,{}),(0,i.jsx)(n.kCb,{alignItems:"center",children:(0,i.jsx)(n.wpx,{icon:(0,i.jsx)(n.Two,{}),"aria-label":"Close error message",type:"text",onClick:d,"data-testid":"datamap-drawer-close"})})]})}),(0,i.jsx)(n.xuv,{id:"drawer-body",height:"calc(100% - 46px)",overflowY:"auto",padding:6,style:{scrollbarGutter:"stable"},children:p?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(R,{system:p}),(0,i.jsx)(n.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,children:"Data uses"}),(0,i.jsx)(n.xuv,{borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(n.xuv,{pb:3,children:(0,i.jsx)(D,{system:p,...m})})}),(0,i.jsx)(n.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,paddingBottom:2,children:"Data flow"}),(0,i.jsx)(s.q,{system:p})]}):null})]})})})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9676],{59676:function(e,i,r){r.r(i),r.d(i,{default:function(){return j}});var t=r(24246),s=r(77181),n=r(16134),a=r(27378),l=r(812),o=r(14047),d=r(90867);let u=(0,s.Gpc)((e,i)=>{let{handleBlur:r,subjectRequest:u}=e,c=(0,n.T)(),[f,m]=(0,a.useState)(!1),{errorAlert:h,successAlert:x}=(0,o.V)(),{errorRequests:p}=(0,n.C)(d.fe),[g]=(0,d.JD)(),[j]=(0,d.Fq)(),y=async()=>{m(!0);let e=await g(p);(0,l.D4)(e)?(c((0,d.uT)({checkAll:!1,errorRequests:[]})),h((0,l.e$)(e.error),"DSR batch automation has failed due to the following:",{duration:null})):(e.data.failed.length>0&&h((0,t.jsxs)(s.xuv,{children:["DSR automation has failed for"," ",(0,t.jsx)(s.xvT,{as:"span",fontWeight:"semibold",children:e.data.failed.length})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null}),e.data.succeeded.length>0&&x("Privacy request(s) are now being reprocessed.")),m(!1)},v=async()=>{if(!u)return;m(!0);let e=await j(u);(0,l.D4)(e)?h((0,l.e$)(e.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):x("Privacy request is now being reprocessed."),m(!1),r&&r(i)};return(0,t.jsx)(s.wpx,{disabled:f,loading:f,onClick:u?v:y,ref:i,size:"small",icon:(0,t.jsx)(s.AyE,{}),children:"Reprocess"})});var c=r(34090),f=r(55484);let m=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,h=e=>m.test(e),x=(0,s.Gpc)((e,i)=>{let{isRequired:r=!1,...n}=e,{emails:l}=n.form.values,[o,d]=(0,a.useState)(""),u=e=>l.includes(e),c=e=>{e.map(e=>e.trim()).filter(e=>h(e)&&!u(e)).forEach(e=>n.push(e)),d("")};return(0,t.jsxs)(s.NIc,{alignItems:"baseline",display:"inline-flex",isInvalid:!!n.form.errors[n.name],isRequired:r,children:[(0,t.jsx)(s.lXp,{fontSize:"md",htmlFor:"email",children:"Email"}),(0,t.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:[(0,t.jsx)(s.IIB,{autoComplete:"off",placeholder:"Type or paste email addresses separated by commas and press `Enter` or `Tab`...",onChange:e=>{d(e.target.value)},onKeyDown:e=>{["Enter","Tab",","].includes(e.key)&&(e.preventDefault(),c([o]))},onPaste:e=>{e.preventDefault(),c(e.clipboardData.getData("text").split(","))},ref:i,size:"sm",type:"email",value:o}),(0,t.jsx)(s.J1D,{children:n.form.errors[n.name]}),l.length>0&&(0,t.jsx)(s.Eq9,{spacing:1,mb:3,pt:"8px",children:l.map((e,i)=>(0,t.jsxs)(s.Vp9,{borderRadius:"full",backgroundColor:"primary.400",color:"white",size:"sm",variant:"solid",children:[(0,t.jsx)(s.Sn0,{children:e}),(0,t.jsx)(s.SD9,{onClick:()=>{n.remove(i)}})]},e))})]})]})}),p=f.Ry().shape({emails:f.IX(f.Z_()).when(["notify"],{is:!0,then:()=>f.IX(f.Z_()).min(1,"Must enter at least one valid email").label("Email")}),notify:f.O7(),minErrorCount:f.Rx().required()});var g=()=>{let{isOpen:e,onOpen:i,onClose:r}=(0,s.qY0)(),[n,u]=(0,a.useState)({emails:[],notify:!1,minErrorCount:1}),f=(0,a.useRef)(null),{errorAlert:m,successAlert:h}=(0,o.V)(),[g,j]=(0,a.useState)(!0),{data:y}=(0,d.tE)(void 0,{skip:g}),[v]=(0,d.SC)(),C=async(e,i)=>{i.setSubmitting(!0);let t=await v({email_addresses:e.emails,notify_after_failures:e.notify?e.minErrorCount:0});(0,l.D4)(t)?m((0,l.e$)(t.error),"Configure alerts and notifications has failed to save due to the following:"):h("Configure alerts and notifications saved successfully."),i.setSubmitting(!1),r()};return(0,a.useEffect)(()=>{e&&j(!1),y&&u({emails:y.email_addresses,notify:0!==y.notify_after_failures,minErrorCount:y.notify_after_failures})},[y,e]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.wpx,{onClick:i,title:"Configure alerts","aria-label":"Configure alerts",icon:(0,t.jsx)(s.Dkj,{})}),(0,t.jsx)(c.J9,{enableReinitialize:!0,initialValues:n,onSubmit:C,validationSchema:p,children:i=>(0,t.jsxs)(s.dys,{isOpen:e,placement:"right",initialFocusRef:f,onClose:()=>{i.resetForm(),r()},size:"lg",children:[(0,t.jsx)(s.P1B,{}),(0,t.jsxs)(s.scA,{color:"gray.900",children:[(0,t.jsx)(s.cCv,{}),(0,t.jsxs)(s.OXI,{color:"gray.900",children:[(0,t.jsx)(s.xvT,{fontSize:"2xl",fontWeight:"normal",mb:4,children:"Configure alerts and notifications"}),(0,t.jsx)(s.xuv,{mt:"26px",children:(0,t.jsx)(s.xvT,{fontSize:"md",fontWeight:"normal",children:"Setup your alerts to send you a notification when there are any processing failures. You can also setup a threshold for connector failures for Fides to notify you after X amount of failures have occurred."})})]}),(0,t.jsx)(s.Ng0,{mt:"20px",children:(0,t.jsxs)(c.l0,{id:"configure-alerts-form",noValidate:!0,children:[(0,t.jsx)(s.xvT,{fontSize:"md",children:"Contact details"}),(0,t.jsxs)(s.gCW,{align:"stretch",gap:"29px",mt:"14px",children:[(0,t.jsx)(s.Ugi,{children:(0,t.jsx)(c.F2,{name:"emails",render:e=>(0,t.jsx)(x,{...e,isRequired:i.values.notify,ref:f})})}),(0,t.jsx)(s.Ugi,{children:(0,t.jsx)(c.gN,{id:"notify",name:"notify",children:e=>{let{field:r}=e;return(0,t.jsxs)(s.NIc,{alignItems:"center",display:"flex",mt:"45px",children:[(0,t.jsx)(s.lXp,{fontSize:"md",mb:"0",children:"Notify me immediately if there are any DSR processing errors"}),(0,t.jsx)(s.rAg,{checked:i.values.notify,onChange:(e,t)=>{r.onChange(t),i.setFieldValue(r.name,e),i.setFieldValue("minErrorCount",1),e||setTimeout(()=>{i.setFieldTouched("emails",!1)},0)}})]})}})})]}),(0,t.jsx)(s.xvT,{color:"#757575",fontSize:"sm",mt:"11px",children:"If selected, then Fides will notify you by your chosen method of communication every time the system encounters a data subject request processing error. You can turn this off anytime and setup a more suitable notification method below if you wish."}),i.values.notify&&(0,t.jsx)(s.Ugi,{mt:"34px",children:(0,t.jsx)(c.gN,{id:"minErrorCount",name:"minErrorCount",children:e=>{let{field:r,meta:n}=e;return(0,t.jsxs)(s.NIc,{alignItems:"center",display:"flex",isInvalid:!!(n.error&&n.touched),isRequired:!0,children:[(0,t.jsx)(s.xvT,{children:"Notify me after"}),(0,t.jsxs)(s.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:i.values.minErrorCount||1,min:1,ml:"8px",mr:"8px",onChange:(e,r)=>{i.setFieldValue("minErrorCount",r)},size:"sm",w:"80px",children:[(0,t.jsx)(s.zuI,{...r}),(0,t.jsxs)(s.FiK,{children:[(0,t.jsx)(s.WQu,{}),(0,t.jsx)(s.Y_d,{})]})]}),(0,t.jsx)(s.xvT,{children:"DSR processing errors "})]})}})})]})}),(0,t.jsx)(s.zeN,{justifyContent:"flex-start",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.wpx,{onClick:()=>{i.resetForm(),r()},children:"Cancel"}),(0,t.jsx)(s.wpx,{form:"configure-alerts-form",disabled:i.isSubmitting,loading:i.isSubmitting,htmlType:"submit",children:"Save"})]})})]})]})})]})},j=()=>{let{errorRequests:e}=(0,n.C)(d.fe);return(0,t.jsxs)(s.kCb,{gap:4,children:[(null==e?void 0:e.length)>0&&(0,t.jsx)(u,{}),(0,t.jsx)(g,{})]})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9676],{59676:function(e,i,r){r.r(i),r.d(i,{default:function(){return j}});var t=r(24246),s=r(56078),n=r(16134),a=r(27378),l=r(812),o=r(14047),d=r(90867);let u=(0,s.Gpc)((e,i)=>{let{handleBlur:r,subjectRequest:u}=e,c=(0,n.T)(),[f,m]=(0,a.useState)(!1),{errorAlert:h,successAlert:x}=(0,o.V)(),{errorRequests:p}=(0,n.C)(d.fe),[g]=(0,d.JD)(),[j]=(0,d.Fq)(),y=async()=>{m(!0);let e=await g(p);(0,l.D4)(e)?(c((0,d.uT)({checkAll:!1,errorRequests:[]})),h((0,l.e$)(e.error),"DSR batch automation has failed due to the following:",{duration:null})):(e.data.failed.length>0&&h((0,t.jsxs)(s.xuv,{children:["DSR automation has failed for"," ",(0,t.jsx)(s.xvT,{as:"span",fontWeight:"semibold",children:e.data.failed.length})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null}),e.data.succeeded.length>0&&x("Privacy request(s) are now being reprocessed.")),m(!1)},v=async()=>{if(!u)return;m(!0);let e=await j(u);(0,l.D4)(e)?h((0,l.e$)(e.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):x("Privacy request is now being reprocessed."),m(!1),r&&r(i)};return(0,t.jsx)(s.wpx,{disabled:f,loading:f,onClick:u?v:y,ref:i,size:"small",icon:(0,t.jsx)(s.AyE,{}),children:"Reprocess"})});var c=r(34090),f=r(55484);let m=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,h=e=>m.test(e),x=(0,s.Gpc)((e,i)=>{let{isRequired:r=!1,...n}=e,{emails:l}=n.form.values,[o,d]=(0,a.useState)(""),u=e=>l.includes(e),c=e=>{e.map(e=>e.trim()).filter(e=>h(e)&&!u(e)).forEach(e=>n.push(e)),d("")};return(0,t.jsxs)(s.NIc,{alignItems:"baseline",display:"inline-flex",isInvalid:!!n.form.errors[n.name],isRequired:r,children:[(0,t.jsx)(s.lXp,{fontSize:"md",htmlFor:"email",children:"Email"}),(0,t.jsxs)(s.gCW,{align:"flex-start",w:"inherit",children:[(0,t.jsx)(s.IIB,{autoComplete:"off",placeholder:"Type or paste email addresses separated by commas and press `Enter` or `Tab`...",onChange:e=>{d(e.target.value)},onKeyDown:e=>{["Enter","Tab",","].includes(e.key)&&(e.preventDefault(),c([o]))},onPaste:e=>{e.preventDefault(),c(e.clipboardData.getData("text").split(","))},ref:i,size:"sm",type:"email",value:o}),(0,t.jsx)(s.J1D,{children:n.form.errors[n.name]}),l.length>0&&(0,t.jsx)(s.Eq9,{spacing:1,mb:3,pt:"8px",children:l.map((e,i)=>(0,t.jsxs)(s.Vp9,{borderRadius:"full",backgroundColor:"primary.400",color:"white",size:"sm",variant:"solid",children:[(0,t.jsx)(s.Sn0,{children:e}),(0,t.jsx)(s.SD9,{onClick:()=>{n.remove(i)}})]},e))})]})]})}),p=f.Ry().shape({emails:f.IX(f.Z_()).when(["notify"],{is:!0,then:()=>f.IX(f.Z_()).min(1,"Must enter at least one valid email").label("Email")}),notify:f.O7(),minErrorCount:f.Rx().required()});var g=()=>{let{isOpen:e,onOpen:i,onClose:r}=(0,s.qY0)(),[n,u]=(0,a.useState)({emails:[],notify:!1,minErrorCount:1}),f=(0,a.useRef)(null),{errorAlert:m,successAlert:h}=(0,o.V)(),[g,j]=(0,a.useState)(!0),{data:y}=(0,d.tE)(void 0,{skip:g}),[v]=(0,d.SC)(),C=async(e,i)=>{i.setSubmitting(!0);let t=await v({email_addresses:e.emails,notify_after_failures:e.notify?e.minErrorCount:0});(0,l.D4)(t)?m((0,l.e$)(t.error),"Configure alerts and notifications has failed to save due to the following:"):h("Configure alerts and notifications saved successfully."),i.setSubmitting(!1),r()};return(0,a.useEffect)(()=>{e&&j(!1),y&&u({emails:y.email_addresses,notify:0!==y.notify_after_failures,minErrorCount:y.notify_after_failures})},[y,e]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.wpx,{onClick:i,title:"Configure alerts","aria-label":"Configure alerts",icon:(0,t.jsx)(s.Dkj,{})}),(0,t.jsx)(c.J9,{enableReinitialize:!0,initialValues:n,onSubmit:C,validationSchema:p,children:i=>(0,t.jsxs)(s.dys,{isOpen:e,placement:"right",initialFocusRef:f,onClose:()=>{i.resetForm(),r()},size:"lg",children:[(0,t.jsx)(s.P1B,{}),(0,t.jsxs)(s.scA,{color:"gray.900",children:[(0,t.jsx)(s.cCv,{}),(0,t.jsxs)(s.OXI,{color:"gray.900",children:[(0,t.jsx)(s.xvT,{fontSize:"2xl",fontWeight:"normal",mb:4,children:"Configure alerts and notifications"}),(0,t.jsx)(s.xuv,{mt:"26px",children:(0,t.jsx)(s.xvT,{fontSize:"md",fontWeight:"normal",children:"Setup your alerts to send you a notification when there are any processing failures. You can also setup a threshold for connector failures for Fides to notify you after X amount of failures have occurred."})})]}),(0,t.jsx)(s.Ng0,{mt:"20px",children:(0,t.jsxs)(c.l0,{id:"configure-alerts-form",noValidate:!0,children:[(0,t.jsx)(s.xvT,{fontSize:"md",children:"Contact details"}),(0,t.jsxs)(s.gCW,{align:"stretch",gap:"29px",mt:"14px",children:[(0,t.jsx)(s.Ugi,{children:(0,t.jsx)(c.F2,{name:"emails",render:e=>(0,t.jsx)(x,{...e,isRequired:i.values.notify,ref:f})})}),(0,t.jsx)(s.Ugi,{children:(0,t.jsx)(c.gN,{id:"notify",name:"notify",children:e=>{let{field:r}=e;return(0,t.jsxs)(s.NIc,{alignItems:"center",display:"flex",mt:"45px",children:[(0,t.jsx)(s.lXp,{fontSize:"md",mb:"0",children:"Notify me immediately if there are any DSR processing errors"}),(0,t.jsx)(s.rAg,{checked:i.values.notify,onChange:(e,t)=>{r.onChange(t),i.setFieldValue(r.name,e),i.setFieldValue("minErrorCount",1),e||setTimeout(()=>{i.setFieldTouched("emails",!1)},0)}})]})}})})]}),(0,t.jsx)(s.xvT,{color:"#757575",fontSize:"sm",mt:"11px",children:"If selected, then Fides will notify you by your chosen method of communication every time the system encounters a data subject request processing error. You can turn this off anytime and setup a more suitable notification method below if you wish."}),i.values.notify&&(0,t.jsx)(s.Ugi,{mt:"34px",children:(0,t.jsx)(c.gN,{id:"minErrorCount",name:"minErrorCount",children:e=>{let{field:r,meta:n}=e;return(0,t.jsxs)(s.NIc,{alignItems:"center",display:"flex",isInvalid:!!(n.error&&n.touched),isRequired:!0,children:[(0,t.jsx)(s.xvT,{children:"Notify me after"}),(0,t.jsxs)(s.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:i.values.minErrorCount||1,min:1,ml:"8px",mr:"8px",onChange:(e,r)=>{i.setFieldValue("minErrorCount",r)},size:"sm",w:"80px",children:[(0,t.jsx)(s.zuI,{...r}),(0,t.jsxs)(s.FiK,{children:[(0,t.jsx)(s.WQu,{}),(0,t.jsx)(s.Y_d,{})]})]}),(0,t.jsx)(s.xvT,{children:"DSR processing errors "})]})}})})]})}),(0,t.jsx)(s.zeN,{justifyContent:"flex-start",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.wpx,{onClick:()=>{i.resetForm(),r()},children:"Cancel"}),(0,t.jsx)(s.wpx,{form:"configure-alerts-form",disabled:i.isSubmitting,loading:i.isSubmitting,htmlType:"submit",children:"Save"})]})})]})]})})]})},j=()=>{let{errorRequests:e}=(0,n.C)(d.fe);return(0,t.jsxs)(s.kCb,{gap:4,children:[(null==e?void 0:e.length)>0&&(0,t.jsx)(u,{}),(0,t.jsx)(g,{})]})}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9719],{74833:function(t,e,i){var n=i(56127),r=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(r,""):t}},56127:function(t){var e=/\s/;t.exports=function(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}},66726:function(t,e,i){var n=i(11611),r=i(82846),a=i(91936),l=Math.max,o=Math.min;t.exports=function(t,e,i){var s,c,d,u,p,f,x=0,h=!1,m=!1,v=!0;if("function"!=typeof t)throw TypeError("Expected a function");function b(e){var i=s,n=c;return s=c=void 0,x=e,u=t.apply(n,i)}function g(t){var i=t-f,n=t-x;return void 0===f||i>=e||i<0||m&&n>=d}function j(){var t,i,n,a=r();if(g(a))return y(a);p=setTimeout(j,(t=a-f,i=a-x,n=e-t,m?o(n,d-i):n))}function y(t){return(p=void 0,v&&s)?b(t):(s=c=void 0,u)}function C(){var t,i=r(),n=g(i);if(s=arguments,c=this,f=i,n){if(void 0===p)return x=t=f,p=setTimeout(j,e),h?b(t):u;if(m)return clearTimeout(p),p=setTimeout(j,e),b(f)}return void 0===p&&(p=setTimeout(j,e)),u}return e=a(e)||0,n(i)&&(h=!!i.leading,d=(m="maxWait"in i)?l(a(i.maxWait)||0,e):d,v="trailing"in i?!!i.trailing:v),C.cancel=function(){void 0!==p&&clearTimeout(p),x=0,s=f=c=p=void 0},C.flush=function(){return void 0===p?u:y(r())},C}},82846:function(t,e,i){var n=i(77400);t.exports=function(){return n.Date.now()}},91936:function(t,e,i){var n=i(74833),r=i(11611),a=i(55193),l=0/0,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(a(t))return l;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var i=s.test(t);return i||c.test(t)?d(t.slice(2),i?2:8):o.test(t)?l:+t}},7617:function(t,e,i){"use strict";i.d(e,{q:function(){return a}});var n=i(24246),r=i(56078);let a=t=>{let{label:e,isDisabled:i,...a}=t;return(0,n.jsx)(r.OK9,{"data-testid":"tab-".concat(e),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:a.fontSize,fontWeight:"500",color:"gray.500",isDisabled:i||!1,children:e})};e.Z=t=>{let{data:e,border:i="partial",...l}=t;return(0,n.jsxs)(r.mQc,{colorScheme:"complimentary",...l,children:[(0,n.jsx)(r.tdY,{width:"partial"===i?"max-content":void 0,children:e.map(t=>(0,n.jsx)(a,{label:t.label,isDisabled:t.isDisabled,fontSize:l.fontSize},t.label))}),(0,n.jsx)(r.nPR,{children:e.map(t=>(0,n.jsx)(r.x45,{px:0,"data-testid":"tab-panel-".concat(t.label),children:t.content},t.label))})]})}},66379:function(t,e,i){"use strict";var n=i(24246),r=i(56078),a=i(7617);e.Z=t=>{let{data:e,border:i="partial",borderWidth:l=2,...o}=t;return(0,n.jsx)(r.mQc,{colorScheme:"complimentary",...o,children:(0,n.jsx)(r.tdY,{width:"partial"===i?"max-content":void 0,borderBottomWidth:l,children:e.map(t=>(0,n.jsx)(a.q,{label:t.label,"data-testid":t.label,isDisabled:t.isDisabled,fontSize:o.fontSize},t.label))})})}},30952:function(t,e,i){"use strict";i.d(e,{f:function(){return s}});var n=i(24246),r=i(66726),a=i.n(r),l=i(27378),o=i(26917);let s=t=>{let{value:e,onChange:i,placeholder:r,...s}=t,[c,d]=(0,l.useState)(e),u=a()(i,500),p=(0,l.useCallback)(t=>{d(t),u(t)},[]);return(0,n.jsx)(o.Z,{value:c,onChange:p,onClear:()=>{d(""),i("")},placeholder:r,...s})}},58754:function(t,e,i){"use strict";var n=i(24246),r=i(56078),a=i(70788);e.Z=t=>{let{heading:e,breadcrumbItems:i,isSticky:l=!0,children:o,rightContent:s,style:c,...d}=t;return(0,n.jsxs)("div",{...d,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)(r.jqI,{justify:"space-between",children:["string"==typeof e?(0,n.jsx)(r.X6q,{className:i||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:e}):e,s&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:s})]}),!!i&&(0,n.jsx)(a.m,{className:o?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),o]})}},14047:function(t,e,i){"use strict";i.d(e,{H:function(){return a},V:function(){return n.V}});var n=i(84306),r=i(812);let a=()=>{let{errorAlert:t}=(0,n.V)();return{handleError:e=>{let i="An unexpected error occurred. Please try again.";(0,r.Ot)(e)?i=e.data.detail:(0,r.tB)(e)&&(i=e.data.detail[0].msg),t(i)}}}},84306:function(t,e,i){"use strict";i.d(e,{V:function(){return a}});var n=i(24246),r=i(56078);let a=()=>{let t=(0,r.pmc)();return{errorAlert:(e,i,a)=>{let l={...a,position:(null==a?void 0:a.position)||"top",render:t=>{let{onClose:a}=t;return(0,n.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:e})]}),(0,n.jsx)(r.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&t.isActive(a.id)?t.update(a.id,l):t(l)},successAlert:(e,i,a)=>{let l={...a,position:(null==a?void 0:a.position)||"top",render:t=>{let{onClose:a}=t;return(0,n.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:e})]}),(0,n.jsx)(r.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&t.isActive(a.id)?t.update(a.id,l):t(l)}}}},70788:function(t,e,i){"use strict";i.d(e,{m:function(){return c}});var n=i(24246),r=i(56078),a=i(79894),l=i.n(a),o=i(27378);let{Text:s}=r.AntTypography,c=t=>{let{items:e,...i}=t,a=(0,o.useMemo)(()=>null==e?void 0:e.map((t,i)=>{let a=i===e.length-1,o={...t},c=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(s,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,children:o.title})),c)?o.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,n.jsx)(l(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[e]);return(0,n.jsx)(r.zrq,{items:a,...i})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9767],{7617:function(e,t,n){n.d(t,{q:function(){return a}});var i=n(24246),r=n(56078);let a=e=>{let{label:t,isDisabled:n,...a}=e;return(0,i.jsx)(r.OK9,{"data-testid":"tab-".concat(t),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:a.fontSize,fontWeight:"500",color:"gray.500",isDisabled:n||!1,children:t})};t.Z=e=>{let{data:t,border:n="partial",...s}=e;return(0,i.jsxs)(r.mQc,{colorScheme:"complimentary",...s,children:[(0,i.jsx)(r.tdY,{width:"partial"===n?"max-content":void 0,children:t.map(e=>(0,i.jsx)(a,{label:e.label,isDisabled:e.isDisabled,fontSize:s.fontSize},e.label))}),(0,i.jsx)(r.nPR,{children:t.map(e=>(0,i.jsx)(r.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},97181:function(e,t,n){n.d(t,{d:function(){return d}});var i=n(24246),r=n(56078),a=n(34090),s=n(27378),l=n(46238),o=n(40324);let d=e=>{let{name:t,label:n,labelProps:d,tooltip:c,isRequired:u,layout:x="inline",helperText:h,...m}=e,[p,f,{setValue:g}]=(0,a.U$)(t),v=!!(f.touched&&f.error),[j,y]=(0,s.useState)("");p.value||"tags"!==m.mode&&"multiple"!==m.mode||(p.value=[]),"tags"===m.mode&&"string"==typeof p.value&&(p.value=[p.value]);let b="tags"===m.mode?(e,t)=>e?e.value!==j||p.value.includes(j)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(j,'"'):void 0:m.optionRender||void 0,C=e=>{y(e),m.onSearch&&m.onSearch(e)},_=(e,t)=>{g(e),m.onChange&&m.onChange(e,t)};return"inline"===x?(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,i.jsxs)(r.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,i.jsx)(o.__,{htmlFor:m.id||t,...d,children:n}):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,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?C:void 0,onChange:_,value:p.value||void 0,status:v?"error":void 0}),h&&(0,i.jsx)(r.Q6r,{children:h}),(0,i.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]}),(0,i.jsx)(l.b,{label:c})]})]})}):(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:u,children:(0,i.jsxs)(r.gCW,{alignItems:"start",children:[(0,i.jsxs)(r.jqI,{align:"center",children:[n?(0,i.jsx)(o.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:n}):null,(0,i.jsx)(l.b,{label:c})]}),(0,i.jsx)(r.WPr,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?C:void 0,onChange:_,value:p.value||void 0,status:v?"error":void 0}),h&&(0,i.jsx)(r.Q6r,{style:{marginTop:0},children:h}),(0,i.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]})})}},812:function(e,t,n){n.d(t,{D4:function(){return a.D4},MM:function(){return x},Ot:function(){return d},c6:function(){return r},cj:function(){return m},e$:function(){return l},fn:function(){return o},iC:function(){return h},nU:function(){return u},tB:function(){return c}});var i,r,a=n(19043);let s="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if((0,a.Bw)(e)){if((0,a.hE)(e.data))return e.data.detail;if((0,a.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,a.Dy)(e.data)||404===e.status&&(0,a.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 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:s};if((0,a.oK)(e))return{status:e.originalStatus,message:e.data};if((0,a.Bw)(e)){let{status:n}=e;return{status:n,message:l(e,t.message)}}return t},x=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},m=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,n){n.d(t,{H:function(){return a},V:function(){return i.V}});var i=n(84306),r=n(812);let a=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,r.Ot)(t)?n=t.data.detail:(0,r.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}}},84306:function(e,t,n){n.d(t,{V:function(){return a}});var i=n(24246),r=n(56078);let a=()=>{let e=(0,r.pmc)();return{errorAlert:(t,n,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.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,s):e(s)},successAlert:(t,n,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.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,s):e(s)}}}},39715:function(e,t,n){var i=n(24246),r=n(56078);n(27378),t.Z=e=>{let{isEmptyState:t,yamlError:n}=e;return(0,i.jsx)(r.Rg9,{in:!0,children:(0,i.jsxs)(r.xuv,{w:"fit-content",bg:"white",p:3,borderRadius:3,children:[(0,i.jsxs)(r.Ugi,{children:[(0,i.jsx)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:"YAML"}),(0,i.jsx)(r.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,i.jsx)(r.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,i.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,i.jsx)(r.f9v,{}),t&&(0,i.jsxs)(r.xuv,{children:[(0,i.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,i.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:"Yaml system is required"})]}),n&&(0,i.jsxs)(r.xuv,{children:[(0,i.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,i.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:n.message}),(0,i.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:n.reason}),(0,i.jsxs)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:["Ln ",(0,i.jsx)("b",{children:n.mark.line}),", Col"," ",(0,i.jsx)("b",{children:n.mark.column}),", Pos"," ",(0,i.jsx)("b",{children:n.mark.position})]})]})]})})]})})}},41337:function(e,t,n){var i=n(24246),r=n(56078);n(27378);var a=n(16643),s=n(16394),l=n(14746);let o=l.Ny+l.iW.get(a.Rj.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===a.Rj.WEBSITE;t.Z=e=>{let{data:t,...n}=e;return(0,i.jsx)(r.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(c(t)&&t.encoded_icon)return"data:image/svg+xml;base64,".concat(t.encoded_icon);if(u(t)){var n;let e=null===(n=t.secrets)||void 0===n?void 0:n.url;if(!e)return o;let i=(0,s.ge)(e);return(0,s.tl)(i,100)}if(d(t))e=[...l.iW].find(e=>{var n,i;let[r]=e;return t.connection_type.toString()!==a.Rj.SAAS&&t.connection_type.toString()===r||t.connection_type.toString()===a.Rj.SAAS&&(null===(i=t.saas_config)||void 0===i?void 0:null===(n=i.type)||void 0===n?void 0:n.toString())===r.toString()});else if(c(t)){let{identifier:n}=t;e=[...l.iW].find(e=>{let[t]=e;return t.toLowerCase()===n.toLowerCase()})}return e?l.Ny+e[1]:l.VD})(),fallbackSrc:u(t)?o:l.VD,alt:(()=>{if(d(t)){var e;return null!==(e=t.name)&&void 0!==e?e:t.key}return c(t)?t.human_readable:t})(),...n})}},1226:function(e,t,n){var i=n(24246);n(27378);var r=n(77213);t.Z=e=>{let{children:t}=e;return(0,i.jsx)(r.Z,{title:"Connections",children:t})}},11274:function(e,t,n){n.d(t,{s:function(){return F}});var i=n(24246),r=n(96356),a=n(56078),s=n(86677),l=n(27378),o=n(16134),d=n(77830),c=n(16643),u=n(14047),x=n(84306),h=n(14207),m=n(16125),p=n(33335),f=n(34090),g=n(46238);let v=(e,t)=>{let n={...e};return Object.entries(t.properties).forEach(t=>{let[i,r]=t;if("integer"===r.type){let t=r.default?Number(r.default):e[i];n[i]=t||0}else{var a;let t=null!==(a=r.default)&&void 0!==a?a:e[i];n[i]=null!=t?t:null}}),n},j="#/definitions/FidesDatasetReference";var y=e=>{let{data:t,defaultValues:n,isSubmitting:s=!1,onSaveClick:d,onTestConnectionClick:x,testButtonLabel:m="Test integration"}=e,p=(0,l.useRef)(!1),{handleError:y}=(0,u.H)(),{connection:b,connectionOption:C}=(0,o.C)(r.ZZ),[_,k]=(0,h.h2)(),S=e=>{let t;return(void 0===e||""===e)&&(t="Connection Identifier is required"),e&&(0,a.kEn)(e)&&(t="Connection Identifier must be an alphanumeric value"),t},w=(e,t,n)=>{let i;return(void 0===t||""===t)&&(i="".concat(e," is required")),n===j&&(t.includes(".")?t.split(".").length<3&&(i="Dataset reference must include at least three parts"):i="Dataset reference must be dot delimited"),i},I=(e,t)=>(0,i.jsx)(a.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:t}),z=e=>{var t;if((null===(t=e.allOf)||void 0===t?void 0:t[0].$ref)===j)return"Enter dataset.collection.field"},R=(e,n)=>{var r;return(0,i.jsx)(f.gN,{id:e,name:e,validate:(null!==(r=t.required)&&void 0!==r&&!!r.includes(e)||"integer"===n.type)&&(e=>{var t;return w(n.title,e,null===(t=n.allOf)||void 0===t?void 0:t[0].$ref)}),children:r=>{var s;let{field:l,form:o}=r;return(0,i.jsxs)(a.NIc,{display:"flex",isRequired:null===(s=t.required)||void 0===s?void 0:s.includes(e),isInvalid:o.errors[e]&&o.touched[e],children:[I(e,n.title),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["integer"!==n.type&&(0,i.jsx)(a.IIB,{...l,value:l.value||"",placeholder:z(n),autoComplete:"off",color:"gray.700",size:"sm"}),"integer"===n.type&&(0,i.jsxs)(a.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,i.jsx)(a.zuI,{...l,autoComplete:"off"}),(0,i.jsxs)(a.FiK,{children:[(0,i.jsx)(a.WQu,{}),(0,i.jsx)(a.Y_d,{})]})]}),(0,i.jsx)(a.J1D,{children:o.errors[e]})]}),(0,i.jsx)(a.kCb,{alignItems:"center",h:8,ml:2,children:(0,i.jsx)(g.b,{label:n.description})})]})}},e)},W=async()=>{try{await _(b.key).unwrap()}catch(e){y(e)}};return(0,l.useEffect)(()=>(p.current=!0,k.isSuccess&&x(k),()=>{p.current=!1}),[x,k]),(0,i.jsx)(f.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...n};if(null==b?void 0:b.key){var i,r;e.name=null!==(r=b.name)&&void 0!==r?r:"",e.description=b.description,e.instance_key=b.connection_type===c.Rj.SAAS?null===(i=b.saas_config)||void 0===i?void 0:i.fides_key:b.key}return v(e,t)})(),onSubmit:(e,n)=>{let i={...e};Object.keys(t.properties).forEach(n=>{var r;if((null===(r=t.properties[n].allOf)||void 0===r?void 0:r[0].$ref)===j){let t=e[n].split(".");i[n]={dataset:t.shift(),field:t.join("."),direction:"from"}}}),d(i,n)},validateOnBlur:!1,validateOnChange:!1,children:e=>(0,i.jsx)(f.l0,{noValidate:!0,children:(0,i.jsxs)(a.gCW,{align:"stretch",gap:"16px",children:[(0,i.jsx)(f.gN,{id:"name",name:"name",validate:e=>w("Name",e),children:t=>{let{field:n}=t;return(0,i.jsxs)(a.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.name&&e.touched.name,children:[I("name","Name"),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",mr:"6",children:[(0,i.jsx)(a.IIB,{...n,autoComplete:"off",autoFocus:!0,color:"gray.700",placeholder:"Enter a friendly name for your new ".concat(C.human_readable," connection"),size:"sm","data-testid":"input-name"}),(0,i.jsx)(a.J1D,{children:e.errors.name})]})]})}}),(0,i.jsx)(f.gN,{id:"description",name:"description",children:e=>{let{field:t}=e;return(0,i.jsxs)(a.NIc,{display:"flex",children:[I("description","Description"),(0,i.jsx)(a.gxH,{...t,color:"gray.700",placeholder:"Enter a description for your new ".concat(C.human_readable," connection"),resize:"none",size:"sm",value:t.value||"",mr:"6"})]})}}),(0,i.jsx)(f.gN,{id:"instance_key",name:"instance_key",validate:S,children:t=>{let{field:n}=t;return(0,i.jsxs)(a.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.instance_key&&e.touched.instance_key,children:[I("instance_key","Connection Identifier"),(0,i.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:[(0,i.jsx)(a.IIB,{...n,autoComplete:"off",color:"gray.700",isDisabled:!!(null==b?void 0:b.key),placeholder:"A unique identifier for your new ".concat(C.human_readable," connection"),size:"sm"}),(0,i.jsx)(a.J1D,{children:e.errors.instance_key})]}),(0,i.jsx)(a.kCb,{alignItems:"center",h:8,ml:2,children:(0,i.jsx)(g.b,{label:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this connection."})})]})}}),Object.entries(t.properties).map(e=>{let[t,n]=e;return"advanced_settings"===t?null:R(t,n)}),(0,i.jsxs)(a.kCb,{gap:2,children:[(0,i.jsx)(a.wpx,{disabled:!(null==b?void 0:b.key),loading:k.isLoading||k.isFetching,onClick:W,"data-testid":"test-connection-button",children:m}),(0,i.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:s,loading:s,children:"Save"})]})]})})})};let b=e=>{let{onConnectionCreated:t,data:n}=e,a=(0,m.I0)(),{errorAlert:s,successAlert:d}=(0,x.V)(),{handleError:f}=(0,u.H)(),[g,v]=(0,l.useState)(!1),{connection:j,connectionOption:y}=(0,o.C)(r.ZZ),[b]=(0,h.pH)(),[C]=(0,h.Du)();return{isSubmitting:g,handleSubmit:async e=>{try{var l;v(!0);let o={access:c.uv.WRITE,connection_type:null==y?void 0:y.identifier,description:e.description,disabled:!1,key:(0,p.E)(e.instance_key),name:e.name},u=await b(o).unwrap();if((null===(l=u.failed)||void 0===l?void 0:l.length)>0)s(u.failed[0].message);else{let l={connection_key:u.succeeded[0].key,secrets:{}};Object.entries(n.properties).forEach(t=>{l.secrets[t[0]]=e[t[0]]});let o=await C(l).unwrap();"failed"===o.test_status?s((0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("b",{children:"Message:"})," ",o.msg,(0,i.jsx)("br",{}),(0,i.jsx)("b",{children:"Failure Reason:"})," ",o.failure_reason]})):(a((0,r.lm)(u.succeeded[0])),d("Connector successfully ".concat((null==j?void 0:j.key)?"updated":"added","!")),(null==j?void 0:j.key)||!t||t())}}catch(e){f(e)}finally{v(!1)}},connectionOption:y}},C=e=>{let{data:t,onConnectionCreated:n,onTestConnectionClick:r}=e,{isSubmitting:s,handleSubmit:l,connectionOption:o}=b({onConnectionCreated:n,data:t});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",o.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,i.jsx)(y,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:s,onSaveClick:l,onTestConnectionClick:r})]})},_={description:"",instance_key:"",name:""},k=e=>{let{data:t,onConnectionCreated:n,onTestEmail:r}=e,{connectionOption:s,isSubmitting:l,handleSubmit:o}=b({onConnectionCreated:n,data:t});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Configure your ",s.human_readable," connector by providing the connector name, description and a test email address. Once you have saved the details, you can click test email to check the format of the email."]}),(0,i.jsx)(y,{data:t,defaultValues:_,isSubmitting:l,onSaveClick:e=>{o(e)},onTestConnectionClick:r,testButtonLabel:"Test email"})]})};var S=n(55484),w=n(27259),I=n(67762),z=e=>{let{defaultValues:t,isSubmitting:n=!1,onSaveClick:l}=e,c=(0,s.useRouter)(),{connection:u,connectionOption:x}=(0,o.C)(r.ZZ);return(0,i.jsx)(f.J9,{initialValues:(()=>{if(null==u?void 0:u.key){var e;t.name=null!==(e=u.name)&&void 0!==e?e:"",t.description=u.description}return t})(),onSubmit:(e,t)=>{l(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:S.Ry().shape({name:S.Z_().required("Name is required")}),children:(0,i.jsx)(f.l0,{noValidate:!0,children:(0,i.jsxs)(a.gCW,{align:"stretch",gap:"16px",children:[(0,i.jsx)(w.Z,{autoFocus:!0,disabled:!!(null==u?void 0:u.key),isRequired:!0,label:"Name",name:"name",placeholder:"Enter a friendly name for your new ".concat(x.human_readable," connection")}),(0,i.jsx)(w.Z,{label:"Description",name:"description",placeholder:"Enter a description for your new ".concat(x.human_readable," connection"),type:"textarea"}),(0,i.jsx)(I.h,{isSubmitting:n,onCancelClick:()=>{c.push(d.JR)}})]})})})};let R=e=>{let{onConnectionCreated:t}=e,n=(0,m.I0)(),{errorAlert:s,successAlert:d}=(0,x.V)(),{handleError:p}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:v,connectionOption:j}=(0,o.C)(r.ZZ),[y]=(0,h.pH)(),b=async(e,i)=>{try{var a;g(!0);let i={access:c.uv.WRITE,connection_type:null==j?void 0:j.identifier,description:e.description,disabled:!1,name:e.name,key:null==v?void 0:v.key},l=await y(i).unwrap();(null===(a=l.failed)||void 0===a?void 0:a.length)>0?s(l.failed[0].message):(n((0,r.lm)(l.succeeded[0])),d("Connector successfully ".concat((null==v?void 0:v.key)?"updated":"added","!")),(null==v?void 0:v.key)||!t||t())}catch(e){p(e)}finally{g(!1)}};return(0,i.jsxs)(a.gCW,{align:"stretch",gap:"16px",children:[(0,i.jsxs)(a.xuv,{color:"gray.700",fontSize:"14px",children:["To begin setting up your new ",j.human_readable," ","connector you must first assign a name to the connector and a description.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),"Once you have completed this section you can then progress onto"," ",(0,i.jsx)(a.xvT,{display:"inline-block",fontWeight:"700",children:"DSR customization"})," ","using the menu on the left hand side."]}),(0,i.jsx)(z,{defaultValues:{description:"",name:""},isSubmitting:f,onSaveClick:b})]})},W=e=>{let{data:t,onConnectionCreated:n,onTestConnectionClick:s}=e,d=(0,m.I0)(),{errorAlert:f,successAlert:g}=(0,x.V)(),{handleError:v}=(0,u.H)(),[j,b]=(0,l.useState)(!1),{connection:C,connectionOption:_}=(0,o.C)(r.ZZ),[k]=(0,h.pL)(),[S]=(0,h.pH)(),[w]=(0,h.Du)(),I=async(e,a)=>{try{if(b(!0),C){var s;let n={access:c.uv.WRITE,connection_type:C.connection_type,description:e.description,disabled:!1,key:C.key,name:e.name},a=await S(n).unwrap();if((null===(s=a.failed)||void 0===s?void 0:s.length)>0)f(a.failed[0].message);else{d((0,r.lm)(a.succeeded[0]));let n={connection_key:C.key,secrets:{}};Object.entries(t.properties).forEach(t=>{n.secrets[t[0]]=e[t[0]]});let s=await w(n).unwrap();"failed"===s.test_status?f((0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("b",{children:"Message:"})," ",s.msg,(0,i.jsx)("br",{}),(0,i.jsx)("b",{children:"Failure Reason:"})," ",s.failure_reason]})):g("Connector successfully updated!")}}else{let i={description:e.description,name:e.name,instance_key:(0,p.E)(e.instance_key),saas_connector_type:_.identifier,secrets:{}};Object.entries(t.properties).forEach(t=>{i.secrets[t[0]]=e[t[0]]});let a=await k(i).unwrap();d((0,r.lm)(a.connection)),g("Connector successfully added!"),null==n||n()}}catch(e){v(e)}finally{b(!1)}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",_.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,i.jsx)(y,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:j,onSaveClick:I,onTestConnectionClick:s})]})};var Z=n(16394);let E=e=>{var t,n;let{response:s}=e,{connectionOption:l}=(0,o.C)(r.ZZ);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.izJ,{color:"gray.100"}),(0,i.jsxs)(a.gCW,{align:"flex-start",mt:"16px",children:[(null===(t=s.data)||void 0===t?void 0:t.test_status)==="succeeded"&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.Ugi,{children:[(0,i.jsxs)(a.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Successfully connected to ",l.human_readable]}),(0,i.jsx)(a.Vp9,{colorScheme:"green",size:"sm",variant:"solid",children:"Success"})]}),(0,i.jsx)(a.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,i.jsx)(a.xuv,{bg:"green.100",border:"1px solid",borderColor:"green.300",color:"green.700",mt:"16px",borderRadius:"6px",children:(0,i.jsxs)(a.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,i.jsx)(a.StI,{}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(a.X6q,{as:"h5",color:"green.500",fontWeight:"semibold",size:"xs",children:"Success message:"}),(0,i.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]}),(null===(n=s.data)||void 0===n?void 0:n.test_status)==="failed"&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.Ugi,{children:[(0,i.jsxs)(a.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Output error to ",l.human_readable]}),(0,i.jsx)(a.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,i.jsx)(a.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,i.jsx)(a.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,i.jsxs)(a.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,i.jsx)(a.f9v,{}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(a.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,i.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.failure_reason}),(0,i.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]})]})]})},F=e=>{let{onConnectionCreated:t}=e,n=(0,s.useRouter)(),{connectionOption:u}=(0,o.C)(r.ZZ),x=u&&u.type===c.Zi.MANUAL,{data:h,isFetching:m,isLoading:p,isSuccess:f}=(0,r.n3)(u.identifier,{skip:x}),[g,v]=(0,l.useState)(),j=e=>{v(e)},y=(0,l.useCallback)(()=>{n.push(d.JR)},[n]),b=(0,l.useCallback)(()=>{switch(null==u?void 0:u.type){case c.Zi.DATABASE:if(f&&h)return(0,i.jsx)(C,{data:h,onConnectionCreated:t,onTestConnectionClick:j});break;case c.Zi.MANUAL:return(0,i.jsx)(R,{onConnectionCreated:t});case c.Zi.SAAS:if(f&&h)return(0,i.jsx)(W,{data:h,onConnectionCreated:t,onTestConnectionClick:j});break;case c.Zi.EMAIL:if(f&&h)return(0,i.jsx)(k,{data:h,onConnectionCreated:y,onTestEmail:j})}},[null==u?void 0:u.type,h,f,t,y]);return(0,i.jsxs)(a.kCb,{gap:"97px",children:[(0,i.jsxs)(a.gCW,{w:"579px",gap:"16px",align:"stretch",children:[(m||p)&&(0,i.jsx)(a.M5Y,{children:(0,i.jsx)(a.$jN,{})}),b()]}),g&&(0,i.jsxs)(a.Rg9,{in:!0,children:[" ",(0,i.jsx)(a.xuv,{mt:"16px",maxW:"528px",w:"fit-content",children:(0,i.jsx)(E,{response:g})})]})]})}},38212:function(e,t,n){n.d(t,{Z:function(){return y}});var i=n(24246),r=n(14047),a=n(96356),s=n(14207),l=n(56078),o=n(86677),d=n(27378),c=n(16134),u=n(812),x=n(77830),h=n(41966),m=n(84306),p=n(66527),f=n(41207),g=n(39715),v=e=>{let{data:t=[],isSubmitting:n=!1,onSubmit:r,onCancel:a,disabled:s}=e,o=(0,d.useRef)(null),{errorAlert:c}=(0,m.V)(),u=t.length>0?p.ZP.dump(t):void 0,[x,v]=(0,d.useState)(void 0),[j,y]=(0,d.useState)(!1),[b,C]=(0,d.useState)(!u),_=(0,l.qY0)(),{data:k}=(0,h.NR)(),[S,w]=(0,d.useState)([]),I=e=>{p.ZP.load(e,{json:!0}),v(void 0)},z=()=>{let e=o.current.getValue();r(p.ZP.load(e,{json:!0})),w([])};return(0,i.jsxs)(l.kCb,{gap:"97px",children:[(0,i.jsxs)(l.gCW,{align:"stretch",w:"800px",children:[(0,i.jsx)(f.M,{defaultLanguage:"yaml",defaultValue:u,height:"calc(100vh - 526px)",onChange:e=>{try{y(!0),I(e),C(!!(!e||""===e.trim()))}catch(e){(0,f.F)(e)?v(e):c("Could not parse the supplied YAML")}},onMount:(e,t)=>{o.current=e,o.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0},readOnly:s},theme:"light"}),(0,i.jsxs)(l.Ugi,{justifyContent:"flex-end",pr:6,children:[a&&(0,i.jsx)(l.wpx,{onClick:a,children:"Cancel"}),(0,i.jsx)(l.wpx,{type:"primary",disabled:s||b||!!x||n,loading:n,onClick:()=>{if(k&&k.length){let e=o.current.getValue(),t=k.filter(t=>e.includes("fides_key: ".concat(t.fides_key,"\n"))).map(e=>e.fides_key);if(w(t),t.length){_.onOpen();return}}z()},htmlType:"submit","data-testid":"save-yaml-btn",children:"Save"})]})]}),j&&(b||x)&&(0,i.jsx)(g.Z,{isEmptyState:b,yamlError:x}),(0,i.jsx)(l.cVQ,{isOpen:_.isOpen,onClose:_.onClose,onConfirm:()=>{z(),_.onClose()},title:"Overwrite dataset",message:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l.xvT,{children:["You are about to overwrite the dataset",S.length>1?"s":""," ",S.map((e,t)=>{let n=t===S.length-1;return(0,i.jsxs)(d.Fragment,{children:[(0,i.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),n?".":", "]},e)})]}),(0,i.jsx)(l.xvT,{children:"Are you sure you would like to continue?"})]})})]})};let j=e=>{let{children:t,...n}=e;return(0,i.jsx)(l.xvT,{color:"gray.700",fontSize:"14px",...n,children:t})};var y=()=>{let e=(0,o.useRouter)(),{errorAlert:t,successAlert:n}=(0,r.V)(),{handleError:m}=(0,r.H)(),[p,f]=(0,d.useState)(!1),{connection:g}=(0,c.C)(a.ZZ),{data:y,isFetching:b,isLoading:C,isSuccess:_}=(0,s.Eg)(g.key),[k]=(0,s.Lz)(),[S]=(0,h.EG)(),{data:w,isLoading:I,error:z}=(0,h.NR)(),[R,W]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{y&&y.items.length&&W(y.items[0].ctl_dataset.fides_key)},[y]);let Z=async i=>{var r;let a={connection_key:null==g?void 0:g.key,dataset_pairs:i},s=await k(a).unwrap();(null===(r=s.failed)||void 0===r?void 0:r.length)>0?t(s.failed[0].message):n("Dataset successfully updated!"),e.push(x.JR)},E=async()=>{if(R)try{let e=R;y&&y.items.length&&(e=y.items[0].fides_key);let t=[{fides_key:e,ctl_dataset_fides_key:R}];Z(t)}catch(e){m(e)}},F=async e=>{try{f(!0);let n=Array.isArray(e)?e:[e],i=await S(n);if((0,u.D4)(i)){let e=(0,u.e$)(i.error);t(e);return}let r=n.map(e=>({fides_key:e.fides_key,ctl_dataset_fides_key:e.fides_key}));if(y&&y.items.length){let{items:e}=y;r=e.map((e,t)=>({fides_key:e.fides_key,ctl_dataset_fides_key:n[t].fides_key}))}Z(r)}catch(e){m(e)}finally{f(!1)}},A=""!==R&&void 0!==R;if(b||C||I&&!z)return(0,i.jsx)(l.M5Y,{children:(0,i.jsx)(l.$jN,{})});let N=w&&w.length;return(0,i.jsxs)(l.gCW,{alignItems:"left",gap:4,children:[z&&(0,i.jsx)(j,{color:"red",children:"There was a problem loading existing datasets, please try again."}),(0,i.jsxs)(l.gCW,{alignItems:"flex-start",children:[N&&(0,i.jsx)("div",{children:(0,i.jsx)(l.gCW,{alignSelf:"start",gap:4,children:(0,i.jsxs)(l.xuv,{"data-testid":"dataset-selector-section",children:[(0,i.jsx)(j,{mb:4,children:"Choose a dataset to associate with this connector."}),(0,i.jsxs)(l.Ugi,{children:[(0,i.jsx)(l.WPr,{allowClear:!0,options:w.map(e=>({label:e.fides_key,value:e.fides_key})),className:"w-full",placeholder:"Select",onChange:e=>W(e),value:R,"data-testid":"dataset-selector"}),(0,i.jsx)(l.wpx,{onClick:E,type:"primary",className:"self-start",disabled:!A,"data-testid":"save-dataset-link-btn",children:"Save"})]})]})})}),N&&_&&(null==y?void 0:y.items)&&(0,i.jsx)(l.htM,{plain:!0,children:"or"}),_&&(null==y?void 0:y.items)&&(0,i.jsxs)(l.xuv,{"data-testid":"yaml-editor-section",children:[(0,i.jsx)(j,{mb:4,children:"View your dataset YAML below!"}),(0,i.jsx)(v,{data:y.items.map(e=>e.ctl_dataset),isSubmitting:p,onSubmit:F,disabled:A})]})]})]})}},27259:function(e,t,n){var i=n(24246),r=n(56078),a=n(34090);t.Z=e=>{let{disabled:t=!1,isRequired:n=!1,label:s,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[x,h]=(0,a.U$)(d);return(0,i.jsxs)(r.NIc,{display:"flex",isRequired:n,isInvalid:!!(h.error&&h.touched),children:[s&&(0,i.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:s}),(0,i.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,i.jsxs)(r.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,i.jsx)(r.zuI,{...x,autoComplete:"off",autoFocus:u}),(0,i.jsxs)(r.FiK,{children:[(0,i.jsx)(r.WQu,{}),(0,i.jsx)(r.Y_d,{})]})]}),"text"===o&&(0,i.jsx)(r.IIB,{...x,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:t,placeholder:l,size:"sm"}),"textarea"===o&&(0,i.jsx)(r.gxH,{...x,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:x.value||""}),(0,i.jsx)(r.J1D,{children:h.error})]})]})}},67762:function(e,t,n){n.d(t,{h:function(){return a}});var i=n(24246),r=n(56078);n(27378);let a=e=>{let{isSubmitting:t=!1,onCancelClick:n}=e;return(0,i.jsxs)(r.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,i.jsx)(r.zxk,{onClick:n,variant:"outline",children:"Cancel"}),(0,i.jsx)(r.zxk,{bg:"primary.800",color:"white",isDisabled:t,isLoading:t,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})}},50881:function(e,t,n){n.d(t,{Z:function(){return y}});var i=n(24246),r=n(14047),a=n(96356),s=n(14207),l=n(56078),o=n(86677),d=n(27378),c=n(16134),u=n(77830),x=n(34090),h=n(55484),m=n(97181),p=n(57072),f=n(39864),g=n(27259),v=n(67762),j=e=>{let{data:t=[],isSubmitting:n=!1,onSaveClick:a}=e,{isLoading:s}=(0,p.MO)(),d=(0,c.C)(f.qb),j=(0,o.useRouter)(),{errorAlert:y}=(0,r.V)(),b=()=>{j.push(u.JR)};return s?null:(0,i.jsx)(x.J9,{enableReinitialize:!0,initialValues:{fields:t.length>0?t:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,t)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){y("PII Field must be unique");return}a(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:h.Ry({fields:h.IX().of(h.Ry().shape({pii_field:h.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:h.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:h.IX(h.Z_()).label("Data Categories")}))}),children:e=>(0,i.jsx)(x.l0,{style:{marginTop:0},noValidate:!0,children:(0,i.jsx)(l.gCW,{align:"stretch",children:(0,i.jsx)(x.F2,{name:"fields",render:t=>{let{fields:r}=e.values;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,i.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,i.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,i.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,i.jsx)(l.xuv,{visibility:"hidden",children:(0,i.jsx)(l.lr0,{})})]}),(0,i.jsx)(l.xuv,{children:r&&r.length>0?r.map((e,n)=>(0,i.jsxs)(l.Ugi,{mt:n>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,i.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,i.jsx)(g.Z,{autoFocus:0===n,isRequired:!0,name:"fields.".concat(n,".pii_field")})}),(0,i.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,i.jsx)(g.Z,{isRequired:!0,name:"fields.".concat(n,".dsr_package_label")})}),(0,i.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,i.jsx)(m.d,{name:"fields.".concat(n,".data_categories"),options:d.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,i.jsx)(l.xuv,{h:"57px",visibility:n>0?"visible":"hidden",children:(0,i.jsx)(l.lr0,{onClick:()=>t.remove(n),_hover:{cursor:"pointer"}})})]},n)):null}),(0,i.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{t.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,i.jsx)(v.h,{isSubmitting:n,onCancelClick:b})]})}})})})})},y=()=>{let e=(0,d.useRef)(!1),t=(0,o.useRouter)(),{successAlert:n}=(0,r.V)(),{handleError:x}=(0,r.H)(),[h,m]=(0,d.useState)(!1),[p,f]=(0,d.useState)([]),{connection:g}=(0,c.C)(a.ZZ),{data:v,isFetching:y,isLoading:b,isSuccess:C}=(0,s.QV)(g.key),[_]=(0,s.jF)(),[k]=(0,s._d)(),S=async(e,i)=>{try{m(!0);let i={connection_key:null==g?void 0:g.key,body:{...e}};p.length>0?await k(i).unwrap():await _(i).unwrap(),n("DSR customization ".concat(p.length>0?"updated":"added","!")),t.push(u.JR)}catch(e){x(e)}finally{m(!1)}};return(0,d.useEffect)(()=>(e.current=!0,C&&v&&f(v.fields),()=>{e.current=!1}),[v,C]),(0,i.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,i.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",w:"572px",children:"Customize your PII fields to create a friendly label name for your privacy request packages. This “Package Label” is the label your user will see in their downloaded package."}),(y||b)&&(0,i.jsx)(l.M5Y,{children:(0,i.jsx)(l.$jN,{})}),e.current&&!b?(0,i.jsx)(j,{data:p,isSubmitting:h,onSaveClick:S}):null]})}},33335:function(e,t,n){n.d(t,{E:function(){return i}});let i=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")},19043:function(e,t,n){n.d(t,{Bw:function(){return s},D4:function(){return r},Dy:function(){return o},XD:function(){return d},cz:function(){return c},hE:function(){return l},oK:function(){return a}});var i=n(76649);let r=e=>"error"in e,a=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,s=e=>(0,i.Ln)({status:"number",data:{}},e),l=e=>(0,i.Ln)({detail:"string"},e),o=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){n.d(t,{Ln:function(){return i}});let i=(e,t)=>a(e,t),r=Symbol("SOME"),a=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>a(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>a(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>a(n,t[e]));class s{static narrow(e){return new s(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 s?e.NF:e instanceof Function?e:t=>i(e,t);return new s(e=>t(e)&&n(e))}}new s(e=>!0)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9951],{95492:function(e,t,s){s.d(t,{l:function(){return n}});var i=s(24246);let n=(0,s(77181).IUT)({displayName:"TrashCanSolidIcon",viewBox:"0 0 12 15",path:(0,i.jsx)("path",{d:"M8.37857 1.18083C8.23393 0.892838 7.93661 0.710938 7.6125 0.710938H4.3875C4.06339 0.710938 3.76607 0.892838 3.62143 1.18083L3.42857 1.56094H0.857143C0.383036 1.56094 -1.19209e-07 1.94158 -1.19209e-07 2.41094C-1.19209e-07 2.8803 0.383036 3.26094 0.857143 3.26094H11.1429C11.6162 3.26094 12 2.8803 12 2.41094C12 1.94158 11.6162 1.56094 11.1429 1.56094H8.57143L8.37857 1.18083ZM11.167 4.11094H0.857143V12.6109C0.857143 13.5486 1.62589 14.3109 2.57143 14.3109H9.45268C10.3754 14.3109 11.167 13.5486 11.167 12.6109V4.11094ZM9.02411 6.23594V12.1859C9.02411 12.4197 8.80714 12.6109 8.59554 12.6109C8.33571 12.6109 8.16696 12.4197 8.16696 12.1859V6.23594C8.16696 6.00219 8.33571 5.81094 8.59554 5.81094C8.80714 5.81094 9.02411 6.00219 9.02411 6.23594ZM6.45268 6.23594V12.1859C6.45268 12.4197 6.23571 12.6109 6.02411 12.6109C5.76429 12.6109 5.57143 12.4197 5.57143 12.1859V6.23594C5.57143 6.00219 5.76429 5.81094 6.02411 5.81094C6.23571 5.81094 6.45268 6.00219 6.45268 6.23594ZM3.85714 6.23594V12.1859C3.85714 12.4197 3.66429 12.6109 3.42857 12.6109C3.19286 12.6109 3 12.4197 3 12.1859V6.23594C3 6.00219 3.19286 5.81094 3.42857 5.81094C3.66429 5.81094 3.85714 6.00219 3.85714 6.23594Z",fill:"currentColor"})})},94799:function(e,t,s){s.d(t,{k:function(){return l}});var i=s(76649);let n=e=>(0,i.Ln)({id:"string"},e),l=e=>(null!=e?e:[]).filter(n)},30320:function(e,t,s){s.d(t,{m:function(){return d}});var i=s(27378),n=s(25980),l=s(14047),a=s(32885),r=s(94799);let d=e=>{let{resourceFidesKey:t,resourceType:s}=e,{errorAlert:d}=(0,l.V)(),{plus:o}=(0,n.hz)(),c=(0,i.useMemo)(()=>null!=t?t:"",[]),u=(0,a.YU)(!0,{skip:!o}),m=(0,a.VN)(s,{skip:!o}),{data:f,isLoading:x,error:h,isError:y}=(0,a.PV)(null!=t?t:"",{skip:""!==c&&!(o&&c)}),[p]=(0,a._D)(),g=u.isLoading||m.isLoading||x,C=(0,i.useMemo)(()=>new Map((0,r.k)(u.data).map(e=>{var t;return[e.id,{...e,options:(null!==(t=e.allowed_values)&&void 0!==t?t:[]).map(e=>({value:e,label:e}))}]})),[u.data]),j=(0,i.useMemo)(()=>{var e;return null===(e=m.data)||void 0===e?void 0:e.filter(e=>e.active)},[m.data]),_=(0,i.useMemo)(()=>new Map((0,r.k)(j).map(e=>[e.id,e])),[j]),v=(0,i.useMemo)(()=>y&&(null==h?void 0:h.status)===404?new Map:new Map((0,r.k)(f).map(e=>[e.custom_field_definition_id,e])),[f,y,h]),k=(0,i.useMemo)(()=>{let e=[..._.keys()];return e.sort(),e},[_]),w=(0,i.useMemo)(()=>{let e={};return j&&v&&j.forEach(t=>{let s=v.get(t.id||"");s&&(t.allow_list_id&&"string[]"===t.field_type?e[s.custom_field_definition_id]=s.value:e[s.custom_field_definition_id]=s.value.toString())}),e},[j,v]),S=(0,i.useCallback)(async e=>{if(!o)return;let i="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!i)return;let{customFieldValues:n}=e;if(!n||0===Object.keys(n).length)return;let l=[],a=[];k.forEach(e=>{let t=v.get(e),s=n[e];void 0===s||""===s||Array.isArray(s)&&0===s.length?(null==t?void 0:t.id)&&a.push(t.id):l.push({custom_field_definition_id:e,resource_id:i,id:null==t?void 0:t.id,value:s})});try{await p({resource_type:s,resource_id:i,upsert:l,delete:a})}catch(e){d("One or more custom fields have failed to save, please try again."),console.error(e)}},[o,v,d,t,k,p,s]);return{customFieldValues:w,definitionIdToCustomField:v,idToAllowListWithOptions:C,idToCustomFieldDefinition:_,isEnabled:o,isLoading:g,sortedCustomFieldDefinitionIds:k,upsertCustomFields:S}}},95346:function(e,t,s){s.d(t,{uc:function(){return p},Hn:function(){return d},Uv:function(){return a},C7:function(){return o},mZ:function(){return y.m}});var i,n,l,a,r=s(16643);(i=l||(l={}))[i.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",i[i.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",i[i.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",r.AL.STRING,r.AL.STRING_,(n=a||(a={})).SINGLE_SELECT="singleSelect",n.MULTIPLE_SELECT="multipleSelect",n.OPEN_TEXT="openText";let d=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Open Text",value:"openText"}],o=[{label:"taxonomy:".concat(r.P6.DATA_CATEGORY),value:r.P6.DATA_CATEGORY},{label:"taxonomy:".concat(r.P6.DATA_SUBJECT),value:r.P6.DATA_SUBJECT},{label:"taxonomy:".concat(r.P6.DATA_USE),value:r.P6.DATA_USE},{label:"".concat(r.P6.SYSTEM,":information"),value:r.P6.SYSTEM},{label:"system:data use",value:r.P6.PRIVACY_DECLARATION}];var c=s(24246),u=s(77181),m=s(34090),f=s(30234),x=s(97181),h=s(40324),y=s(30320);let p=e=>{let{resourceFidesKey:t,resourceType:s}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:n,isEnabled:l,isLoading:a,sortedCustomFieldDefinitionIds:d}=(0,y.m)({resourceFidesKey:t,resourceType:s});return l&&0!==d.length?(0,c.jsx)(f.Z,{heading:"Custom fields",children:(0,c.jsx)(u.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(u.kCb,{flexDir:"column",gap:"24px",children:a?(0,c.jsx)(u.M5Y,{children:(0,c.jsx)(u.$jN,{})}):d.length>0&&(0,c.jsx)(u.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:d.map(e=>{let t=n.get(e);if(!t)return null;let s="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===r.AL.STRING)return(0,c.jsx)(m.gN,{name:s,children:e=>{let{field:s}=e;return(0,c.jsx)(h.j0,{...s,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let l=i.get(t.allow_list_id);if(!l)return null;let{options:a}=l;return(0,c.jsx)(x.d,{name:s,allowClear:!0,mode:t.field_type!==r.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};s(94799)},45938:function(e,t,s){s.d(t,{Gt:function(){return m},eB:function(){return f},oI:function(){return u}});var i=s(24246),n=s(34090),l=s(27378),a=s(16134),r=s(38602),d=s(58452);let o=(0,l.createRef)(),c=(0,l.createRef)(),u=()=>{let e=(0,a.T)(),t=(0,a.C)(r.DB),s=(0,l.useCallback)(()=>{c.current=void 0,o.current=void 0},[]),i=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!0),s())},[e,s]),n=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!1),s())},[e,s]);return{attemptAction:(0,l.useCallback)(()=>t?(e((0,r.h7)()),o.current||(o.current=new Promise(e=>{c.current=e})),o.current):Promise.resolve(!0),[t,e]),onConfirm:i,onClose:n}},m=e=>{let{id:t,name:s}=e,{dirty:i}=(0,n.u6)(),d=(0,a.T)();return(0,l.useEffect)(()=>(d((0,r.Zu)({id:t,name:s})),()=>{d((0,r.dz)({id:t}))}),[d,t,s]),(0,l.useEffect)(()=>{d((0,r.$p)({id:t,isDirty:i}))},[i,d,t]),null},f=()=>{let{onConfirm:e,onClose:t}=u(),s=(0,a.C)(r.uv);return(0,i.jsx)(d.Z,{isOpen:s,onClose:t,onConfirm:e,isCentered:!0,title:"Unsaved Changes",message:"You have unsaved changes"})}},84720:function(e,t,s){s.d(t,{q:function(){return j}});var i=s(24246),n=s(77181),l=s(27378),a=s(812),r=s(45938),d=s(14048),o=s(95492),c=s(34090);let u=e=>{let{systems:t,dataFlows:s,onDataFlowSystemChange:l}=e,{setFieldValue:a}=(0,c.u6)(),r=s.map(e=>e.fides_key),d=e=>{let t=s.filter(t=>t.fides_key!==e.fides_key);a("dataFlowSystems",t),l(t)};return(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,i.jsx)(n.hrZ,{children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsx)(n.Th,{})]})}),(0,i.jsx)(n.p3B,{children:t.filter(e=>r.includes(e.fides_key)).map(e=>(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"end",children:(0,i.jsx)(n.wpx,{"aria-label":"Unassign data flow from system",icon:(0,i.jsx)(o.l,{}),onClick:()=>d(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var m=s(86780),f=e=>{let{allSystems:t,dataFlowSystems:s,onChange:l,flowType:a}=e,{setFieldValue:r}=(0,c.u6)(),d=e=>{if(s.find(t=>t.fides_key===e.fides_key)){let t=s.filter(t=>t.fides_key!==e.fides_key);r("dataFlowSystems",t),l(t)}else{let t=[...s,{fides_key:e.fides_key,type:"system"}];r("dataFlowSystems",t),l(t)}};return(0,i.jsx)(n.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,i.jsx)(n.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsxs)(n.Th,{textAlign:"right",children:["Set as ",a]})]})}),(0,i.jsx)(n.p3B,{children:t.map(e=>{let t=!!s.find(t=>t.fides_key===e.fides_key);return(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"right",children:(0,i.jsx)(n.rAg,{checked:t,onChange:()=>d(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let x=(e,t)=>{var s,i;return(null===(s=e.name)||void 0===s?void 0:s.toLocaleLowerCase().includes(t.toLocaleLowerCase()))||(null===(i=e.description)||void 0===i?void 0:i.toLocaleLowerCase().includes(t.toLocaleLowerCase()))};var h=e=>{let{currentSystem:t,systems:s,isOpen:a,onClose:r,dataFlowSystems:d,onDataFlowSystemChange:o,flowType:u}=e,{setFieldValue:h}=(0,c.u6)(),[y,p]=(0,l.useState)(""),[g,C]=(0,l.useState)(d),j=async()=>{o(g),r()},_=0===s.length,v=(0,l.useMemo)(()=>s?s.filter(e=>e.fides_key!==t.fides_key).filter(e=>x(e,y)):[],[s,t.fides_key,y]),k=(0,l.useMemo)(()=>{let e=new Set(g.map(e=>e.fides_key));return v.every(t=>e.has(t.fides_key))},[v,g]);return(0,i.jsxs)(n.u_l,{isOpen:a,onClose:r,size:"2xl",isCentered:!0,children:[(0,i.jsx)(n.ZAr,{}),(0,i.jsxs)(n.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,i.jsxs)(n.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,i.jsxs)(n.xvT,{fontSize:"2xl",lineHeight:8,fontWeight:"semibold",children:["Configure ",u.toLocaleLowerCase()," systems"]}),(0,i.jsxs)(n.j8w,{color:"success",children:["Assigned to ",g.length," systems"]})]}),(0,i.jsx)(n.fef,{"data-testid":"assign-systems-modal-body",children:_?(0,i.jsx)(n.xvT,{children:"No systems found"}):(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Add or remove destination systems from your data map"}),(0,i.jsx)(n.xuv,{children:(0,i.jsxs)(n.NIc,{display:"flex",alignItems:"center",children:[(0,i.jsx)(n.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,i.jsx)(n.rAg,{size:"small",id:"assign-all-systems",checked:k,onChange:e=>{if(e&&s){let e=v.map(e=>({fides_key:e.fides_key,type:"system"}));h("dataFlowSystems",e),C(e)}else C([])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,i.jsx)(m.Z,{search:y,onChange:p,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,i.jsx)(f,{flowType:u,allSystems:v,dataFlowSystems:g,onChange:C})]})}),(0,i.jsxs)(n.mzw,{justifyContent:"flex-start",children:[(0,i.jsx)(n.wpx,{onClick:r,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),!_&&(0,i.jsx)(n.wpx,{type:"primary",onClick:j,"data-testid":"confirm-btn",children:"Confirm"})]})]})]})},y=s(46628),p=s(1315);let g={dataFlowSystems:[]},C=e=>{let{system:t,isIngress:s,isSystemTab:o}=e,m=(0,n.pmc)(),f=s?"Source":"Destination",x="".concat(f,"s"),C=(0,n.qY0)(),[j]=(0,p.qQ)(),{data:_=[]}=(0,p.K3)(),v=(0,l.useMemo)(()=>{let e=s?t.ingress:t.egress;e||(e=[]);let i=_?_.map(e=>e.fides_key):[];return e.filter(e=>i.includes(e.fides_key))},[s,t,_]),[k,w]=(0,l.useState)(v);(0,l.useEffect)(()=>{w(v)},[v]);let S=async(e,i)=>{let{dataFlowSystems:n}=e,{resetForm:l}=i,r={...t,ingress:s?n:t.ingress,egress:s?t.egress:n},d=await j(r);(0,a.D4)(d)?m((0,y.Vo)("Failed to update data flows")):m((0,y.t5)("".concat(x," updated"))),l({values:{dataFlowSystems:n}})};return(0,i.jsxs)(n.Qdk,{children:[(0,i.jsx)(n.KFZ,{height:"68px",paddingLeft:o?6:2,"data-testid":"data-flow-button-".concat(f),children:(0,i.jsxs)(n.kCb,{alignItems:"center",justifyContent:"start",flex:1,textAlign:"left",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"semibold",mr:2,children:x}),(0,i.jsx)(n.Vp9,{ml:2,backgroundColor:"primary.400",borderRadius:"6px",color:"white",children:k.length}),(0,i.jsx)(n.LZC,{}),(0,i.jsx)(n.XEm,{})]})}),(0,i.jsx)(n.Hk3,{backgroundColor:"gray.50",padding:6,"data-testid":"data-flow-panel-".concat(f),children:(0,i.jsx)(n.Kqy,{borderRadius:"md",backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:(0,i.jsx)(c.J9,{initialValues:g,onSubmit:S,children:e=>{let{isSubmitting:s,dirty:l,resetForm:a}=e;return(0,i.jsxs)(c.l0,{children:[(0,i.jsx)(r.Gt,{id:"".concat(t.fides_key,":").concat(f),name:"".concat(f," Data Flow")}),(0,i.jsx)(n.wpx,{onClick:C.onOpen,type:"primary",size:"small",icon:(0,i.jsx)(d.A5,{}),iconPosition:"end",className:"mb-4","data-testid":"assign-systems-btn",children:"Configure ".concat(x.toLocaleLowerCase())}),(0,i.jsx)(u,{systems:_,dataFlows:k,onDataFlowSystemChange:w}),(0,i.jsxs)("div",{className:"mt-6 flex gap-2",children:[(0,i.jsx)(n.wpx,{disabled:!l&&k===v,onClick:()=>{w(v),a({values:{dataFlowSystems:v}})},"data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(n.wpx,{type:"primary",htmlType:"submit",loading:s,disabled:!l&&k===v,"data-testid":"save-btn",children:"Save"})]}),C.isOpen?(0,i.jsx)(h,{currentSystem:t,systems:_,isOpen:C.isOpen,onClose:C.onClose,dataFlowSystems:k,onDataFlowSystemChange:w,flowType:f}):null]})}})})})]})},j=e=>{let{system:t,isSystemTab:s}=e;return(0,i.jsxs)(n.UQy,{allowToggle:!0,"data-testid":"data-flow-accordion",children:[(0,i.jsx)(C,{system:t,isIngress:!0,isSystemTab:s}),(0,i.jsx)(C,{system:t,isSystemTab:s})]})}},30234:function(e,t,s){var i=s(24246),n=s(77181);t.Z=e=>{let{heading:t,HeadingButton:s,children:l}=e;return(0,i.jsx)(n.Kqy,{spacing:4,children:(0,i.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,i.jsxs)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,i.jsx)(n.X6q,{as:"h3",size:"xs",children:t}),s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.LZC,{}),(0,i.jsx)(s,{})]}):null]}),(0,i.jsx)(n.Kqy,{spacing:4,px:6,py:6,children:l})]})})}},52368:function(e,t,s){s.d(t,{f:function(){return d}});var i=s(16134),n=s(30002),l=s(28079),a=s(41966),r=s(57072);let d=e=>{let{includeDatasets:t,includeDisabled:s}=e,{isLoading:d}=(0,r.MO)(),{isLoading:o}=(0,n.te)(),{isLoading:c}=(0,l.fd)(),{isLoading:u}=(0,a.LH)({onlyUnlinkedDatasets:!1},{skip:!t}),m=(0,i.C)(r.qb),f=(0,i.C)(r.Bd),x=(0,i.C)(n.ZL),h=(0,i.C)(n.H7),y=(0,i.C)(l.U3),p=(0,i.C)(l.jp),g=(0,i.C)(a.Q4);return{allDataCategories:s?m:f,allDataSubjects:s?x:h,allDataUses:s?y:p,allDatasets:t?g:void 0,isLoading:d||o||c||u}}},31883:function(e,t,s){s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9951],{95492:function(e,t,s){s.d(t,{l:function(){return n}});var i=s(24246);let n=(0,s(56078).IUT)({displayName:"TrashCanSolidIcon",viewBox:"0 0 12 15",path:(0,i.jsx)("path",{d:"M8.37857 1.18083C8.23393 0.892838 7.93661 0.710938 7.6125 0.710938H4.3875C4.06339 0.710938 3.76607 0.892838 3.62143 1.18083L3.42857 1.56094H0.857143C0.383036 1.56094 -1.19209e-07 1.94158 -1.19209e-07 2.41094C-1.19209e-07 2.8803 0.383036 3.26094 0.857143 3.26094H11.1429C11.6162 3.26094 12 2.8803 12 2.41094C12 1.94158 11.6162 1.56094 11.1429 1.56094H8.57143L8.37857 1.18083ZM11.167 4.11094H0.857143V12.6109C0.857143 13.5486 1.62589 14.3109 2.57143 14.3109H9.45268C10.3754 14.3109 11.167 13.5486 11.167 12.6109V4.11094ZM9.02411 6.23594V12.1859C9.02411 12.4197 8.80714 12.6109 8.59554 12.6109C8.33571 12.6109 8.16696 12.4197 8.16696 12.1859V6.23594C8.16696 6.00219 8.33571 5.81094 8.59554 5.81094C8.80714 5.81094 9.02411 6.00219 9.02411 6.23594ZM6.45268 6.23594V12.1859C6.45268 12.4197 6.23571 12.6109 6.02411 12.6109C5.76429 12.6109 5.57143 12.4197 5.57143 12.1859V6.23594C5.57143 6.00219 5.76429 5.81094 6.02411 5.81094C6.23571 5.81094 6.45268 6.00219 6.45268 6.23594ZM3.85714 6.23594V12.1859C3.85714 12.4197 3.66429 12.6109 3.42857 12.6109C3.19286 12.6109 3 12.4197 3 12.1859V6.23594C3 6.00219 3.19286 5.81094 3.42857 5.81094C3.66429 5.81094 3.85714 6.00219 3.85714 6.23594Z",fill:"currentColor"})})},94799:function(e,t,s){s.d(t,{k:function(){return l}});var i=s(76649);let n=e=>(0,i.Ln)({id:"string"},e),l=e=>(null!=e?e:[]).filter(n)},30320:function(e,t,s){s.d(t,{m:function(){return d}});var i=s(27378),n=s(25980),l=s(14047),a=s(32885),r=s(94799);let d=e=>{let{resourceFidesKey:t,resourceType:s}=e,{errorAlert:d}=(0,l.V)(),{plus:o}=(0,n.hz)(),c=(0,i.useMemo)(()=>null!=t?t:"",[]),u=(0,a.YU)(!0,{skip:!o}),m=(0,a.VN)(s,{skip:!o}),{data:f,isLoading:x,error:h,isError:y}=(0,a.PV)(null!=t?t:"",{skip:""!==c&&!(o&&c)}),[p]=(0,a._D)(),g=u.isLoading||m.isLoading||x,C=(0,i.useMemo)(()=>new Map((0,r.k)(u.data).map(e=>{var t;return[e.id,{...e,options:(null!==(t=e.allowed_values)&&void 0!==t?t:[]).map(e=>({value:e,label:e}))}]})),[u.data]),j=(0,i.useMemo)(()=>{var e;return null===(e=m.data)||void 0===e?void 0:e.filter(e=>e.active)},[m.data]),_=(0,i.useMemo)(()=>new Map((0,r.k)(j).map(e=>[e.id,e])),[j]),v=(0,i.useMemo)(()=>y&&(null==h?void 0:h.status)===404?new Map:new Map((0,r.k)(f).map(e=>[e.custom_field_definition_id,e])),[f,y,h]),k=(0,i.useMemo)(()=>{let e=[..._.keys()];return e.sort(),e},[_]),w=(0,i.useMemo)(()=>{let e={};return j&&v&&j.forEach(t=>{let s=v.get(t.id||"");s&&(t.allow_list_id&&"string[]"===t.field_type?e[s.custom_field_definition_id]=s.value:e[s.custom_field_definition_id]=s.value.toString())}),e},[j,v]),S=(0,i.useCallback)(async e=>{if(!o)return;let i="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!i)return;let{customFieldValues:n}=e;if(!n||0===Object.keys(n).length)return;let l=[],a=[];k.forEach(e=>{let t=v.get(e),s=n[e];void 0===s||""===s||Array.isArray(s)&&0===s.length?(null==t?void 0:t.id)&&a.push(t.id):l.push({custom_field_definition_id:e,resource_id:i,id:null==t?void 0:t.id,value:s})});try{await p({resource_type:s,resource_id:i,upsert:l,delete:a})}catch(e){d("One or more custom fields have failed to save, please try again."),console.error(e)}},[o,v,d,t,k,p,s]);return{customFieldValues:w,definitionIdToCustomField:v,idToAllowListWithOptions:C,idToCustomFieldDefinition:_,isEnabled:o,isLoading:g,sortedCustomFieldDefinitionIds:k,upsertCustomFields:S}}},95346:function(e,t,s){s.d(t,{uc:function(){return p},Hn:function(){return d},Uv:function(){return a},C7:function(){return o},mZ:function(){return y.m}});var i,n,l,a,r=s(16643);(i=l||(l={}))[i.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",i[i.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",i[i.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",r.AL.STRING,r.AL.STRING_,(n=a||(a={})).SINGLE_SELECT="singleSelect",n.MULTIPLE_SELECT="multipleSelect",n.OPEN_TEXT="openText";let d=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Open Text",value:"openText"}],o=[{label:"taxonomy:".concat(r.P6.DATA_CATEGORY),value:r.P6.DATA_CATEGORY},{label:"taxonomy:".concat(r.P6.DATA_SUBJECT),value:r.P6.DATA_SUBJECT},{label:"taxonomy:".concat(r.P6.DATA_USE),value:r.P6.DATA_USE},{label:"".concat(r.P6.SYSTEM,":information"),value:r.P6.SYSTEM},{label:"system:data use",value:r.P6.PRIVACY_DECLARATION}];var c=s(24246),u=s(56078),m=s(34090),f=s(30234),x=s(97181),h=s(40324),y=s(30320);let p=e=>{let{resourceFidesKey:t,resourceType:s}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:n,isEnabled:l,isLoading:a,sortedCustomFieldDefinitionIds:d}=(0,y.m)({resourceFidesKey:t,resourceType:s});return l&&0!==d.length?(0,c.jsx)(f.Z,{heading:"Custom fields",children:(0,c.jsx)(u.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(u.kCb,{flexDir:"column",gap:"24px",children:a?(0,c.jsx)(u.M5Y,{children:(0,c.jsx)(u.$jN,{})}):d.length>0&&(0,c.jsx)(u.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:d.map(e=>{let t=n.get(e);if(!t)return null;let s="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===r.AL.STRING)return(0,c.jsx)(m.gN,{name:s,children:e=>{let{field:s}=e;return(0,c.jsx)(h.j0,{...s,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let l=i.get(t.allow_list_id);if(!l)return null;let{options:a}=l;return(0,c.jsx)(x.d,{name:s,allowClear:!0,mode:t.field_type!==r.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};s(94799)},45938:function(e,t,s){s.d(t,{Gt:function(){return m},eB:function(){return f},oI:function(){return u}});var i=s(24246),n=s(34090),l=s(27378),a=s(16134),r=s(38602),d=s(58452);let o=(0,l.createRef)(),c=(0,l.createRef)(),u=()=>{let e=(0,a.T)(),t=(0,a.C)(r.DB),s=(0,l.useCallback)(()=>{c.current=void 0,o.current=void 0},[]),i=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!0),s())},[e,s]),n=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!1),s())},[e,s]);return{attemptAction:(0,l.useCallback)(()=>t?(e((0,r.h7)()),o.current||(o.current=new Promise(e=>{c.current=e})),o.current):Promise.resolve(!0),[t,e]),onConfirm:i,onClose:n}},m=e=>{let{id:t,name:s}=e,{dirty:i}=(0,n.u6)(),d=(0,a.T)();return(0,l.useEffect)(()=>(d((0,r.Zu)({id:t,name:s})),()=>{d((0,r.dz)({id:t}))}),[d,t,s]),(0,l.useEffect)(()=>{d((0,r.$p)({id:t,isDirty:i}))},[i,d,t]),null},f=()=>{let{onConfirm:e,onClose:t}=u(),s=(0,a.C)(r.uv);return(0,i.jsx)(d.Z,{isOpen:s,onClose:t,onConfirm:e,isCentered:!0,title:"Unsaved Changes",message:"You have unsaved changes"})}},84720:function(e,t,s){s.d(t,{q:function(){return j}});var i=s(24246),n=s(56078),l=s(27378),a=s(812),r=s(45938),d=s(14048),o=s(95492),c=s(34090);let u=e=>{let{systems:t,dataFlows:s,onDataFlowSystemChange:l}=e,{setFieldValue:a}=(0,c.u6)(),r=s.map(e=>e.fides_key),d=e=>{let t=s.filter(t=>t.fides_key!==e.fides_key);a("dataFlowSystems",t),l(t)};return(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,i.jsx)(n.hrZ,{children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsx)(n.Th,{})]})}),(0,i.jsx)(n.p3B,{children:t.filter(e=>r.includes(e.fides_key)).map(e=>(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"end",children:(0,i.jsx)(n.wpx,{"aria-label":"Unassign data flow from system",icon:(0,i.jsx)(o.l,{}),onClick:()=>d(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var m=s(26917),f=e=>{let{allSystems:t,dataFlowSystems:s,onChange:l,flowType:a}=e,{setFieldValue:r}=(0,c.u6)(),d=e=>{if(s.find(t=>t.fides_key===e.fides_key)){let t=s.filter(t=>t.fides_key!==e.fides_key);r("dataFlowSystems",t),l(t)}else{let t=[...s,{fides_key:e.fides_key,type:"system"}];r("dataFlowSystems",t),l(t)}};return(0,i.jsx)(n.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,i.jsx)(n.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsxs)(n.Th,{textAlign:"right",children:["Set as ",a]})]})}),(0,i.jsx)(n.p3B,{children:t.map(e=>{let t=!!s.find(t=>t.fides_key===e.fides_key);return(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"right",children:(0,i.jsx)(n.rAg,{checked:t,onChange:()=>d(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let x=(e,t)=>{var s,i;return(null===(s=e.name)||void 0===s?void 0:s.toLocaleLowerCase().includes(t.toLocaleLowerCase()))||(null===(i=e.description)||void 0===i?void 0:i.toLocaleLowerCase().includes(t.toLocaleLowerCase()))};var h=e=>{let{currentSystem:t,systems:s,isOpen:a,onClose:r,dataFlowSystems:d,onDataFlowSystemChange:o,flowType:u}=e,{setFieldValue:h}=(0,c.u6)(),[y,p]=(0,l.useState)(""),[g,C]=(0,l.useState)(d),j=async()=>{o(g),r()},_=0===s.length,v=(0,l.useMemo)(()=>s?s.filter(e=>e.fides_key!==t.fides_key).filter(e=>x(e,y)):[],[s,t.fides_key,y]),k=(0,l.useMemo)(()=>{let e=new Set(g.map(e=>e.fides_key));return v.every(t=>e.has(t.fides_key))},[v,g]);return(0,i.jsxs)(n.u_l,{isOpen:a,onClose:r,size:"2xl",isCentered:!0,children:[(0,i.jsx)(n.ZAr,{}),(0,i.jsxs)(n.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,i.jsxs)(n.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,i.jsxs)(n.xvT,{fontSize:"2xl",lineHeight:8,fontWeight:"semibold",children:["Configure ",u.toLocaleLowerCase()," systems"]}),(0,i.jsxs)(n.j8w,{color:"success",children:["Assigned to ",g.length," systems"]})]}),(0,i.jsx)(n.fef,{"data-testid":"assign-systems-modal-body",children:_?(0,i.jsx)(n.xvT,{children:"No systems found"}):(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Add or remove destination systems from your data map"}),(0,i.jsx)(n.xuv,{children:(0,i.jsxs)(n.NIc,{display:"flex",alignItems:"center",children:[(0,i.jsx)(n.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,i.jsx)(n.rAg,{size:"small",id:"assign-all-systems",checked:k,onChange:e=>{if(e&&s){let e=v.map(e=>({fides_key:e.fides_key,type:"system"}));h("dataFlowSystems",e),C(e)}else C([])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,i.jsx)(m.Z,{value:y,onChange:p,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,i.jsx)(f,{flowType:u,allSystems:v,dataFlowSystems:g,onChange:C})]})}),(0,i.jsxs)(n.mzw,{justifyContent:"flex-start",children:[(0,i.jsx)(n.wpx,{onClick:r,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),!_&&(0,i.jsx)(n.wpx,{type:"primary",onClick:j,"data-testid":"confirm-btn",children:"Confirm"})]})]})]})},y=s(46628),p=s(1315);let g={dataFlowSystems:[]},C=e=>{let{system:t,isIngress:s,isSystemTab:o}=e,m=(0,n.pmc)(),f=s?"Source":"Destination",x="".concat(f,"s"),C=(0,n.qY0)(),[j]=(0,p.qQ)(),{data:_=[]}=(0,p.K3)(),v=(0,l.useMemo)(()=>{let e=s?t.ingress:t.egress;e||(e=[]);let i=_?_.map(e=>e.fides_key):[];return e.filter(e=>i.includes(e.fides_key))},[s,t,_]),[k,w]=(0,l.useState)(v);(0,l.useEffect)(()=>{w(v)},[v]);let S=async(e,i)=>{let{dataFlowSystems:n}=e,{resetForm:l}=i,r={...t,ingress:s?n:t.ingress,egress:s?t.egress:n},d=await j(r);(0,a.D4)(d)?m((0,y.Vo)("Failed to update data flows")):m((0,y.t5)("".concat(x," updated"))),l({values:{dataFlowSystems:n}})};return(0,i.jsxs)(n.Qdk,{children:[(0,i.jsx)(n.KFZ,{height:"68px",paddingLeft:o?6:2,"data-testid":"data-flow-button-".concat(f),children:(0,i.jsxs)(n.kCb,{alignItems:"center",justifyContent:"start",flex:1,textAlign:"left",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"semibold",mr:2,children:x}),(0,i.jsx)(n.Vp9,{ml:2,backgroundColor:"primary.400",borderRadius:"6px",color:"white",children:k.length}),(0,i.jsx)(n.LZC,{}),(0,i.jsx)(n.XEm,{})]})}),(0,i.jsx)(n.Hk3,{backgroundColor:"gray.50",padding:6,"data-testid":"data-flow-panel-".concat(f),children:(0,i.jsx)(n.Kqy,{borderRadius:"md",backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:(0,i.jsx)(c.J9,{initialValues:g,onSubmit:S,children:e=>{let{isSubmitting:s,dirty:l,resetForm:a}=e;return(0,i.jsxs)(c.l0,{children:[(0,i.jsx)(r.Gt,{id:"".concat(t.fides_key,":").concat(f),name:"".concat(f," Data Flow")}),(0,i.jsx)(n.wpx,{onClick:C.onOpen,type:"primary",size:"small",icon:(0,i.jsx)(d.A5,{}),iconPosition:"end",className:"mb-4","data-testid":"assign-systems-btn",children:"Configure ".concat(x.toLocaleLowerCase())}),(0,i.jsx)(u,{systems:_,dataFlows:k,onDataFlowSystemChange:w}),(0,i.jsxs)("div",{className:"mt-6 flex gap-2",children:[(0,i.jsx)(n.wpx,{disabled:!l&&k===v,onClick:()=>{w(v),a({values:{dataFlowSystems:v}})},"data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(n.wpx,{type:"primary",htmlType:"submit",loading:s,disabled:!l&&k===v,"data-testid":"save-btn",children:"Save"})]}),C.isOpen?(0,i.jsx)(h,{currentSystem:t,systems:_,isOpen:C.isOpen,onClose:C.onClose,dataFlowSystems:k,onDataFlowSystemChange:w,flowType:f}):null]})}})})})]})},j=e=>{let{system:t,isSystemTab:s}=e;return(0,i.jsxs)(n.UQy,{allowToggle:!0,"data-testid":"data-flow-accordion",children:[(0,i.jsx)(C,{system:t,isIngress:!0,isSystemTab:s}),(0,i.jsx)(C,{system:t,isSystemTab:s})]})}},30234:function(e,t,s){var i=s(24246),n=s(56078);t.Z=e=>{let{heading:t,HeadingButton:s,children:l}=e;return(0,i.jsx)(n.Kqy,{spacing:4,children:(0,i.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,i.jsxs)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,i.jsx)(n.X6q,{as:"h3",size:"xs",children:t}),s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.LZC,{}),(0,i.jsx)(s,{})]}):null]}),(0,i.jsx)(n.Kqy,{spacing:4,px:6,py:6,children:l})]})})}},52368:function(e,t,s){s.d(t,{f:function(){return d}});var i=s(16134),n=s(30002),l=s(28079),a=s(41966),r=s(57072);let d=e=>{let{includeDatasets:t,includeDisabled:s}=e,{isLoading:d}=(0,r.MO)(),{isLoading:o}=(0,n.te)(),{isLoading:c}=(0,l.fd)(),{isLoading:u}=(0,a.LH)({onlyUnlinkedDatasets:!1},{skip:!t}),m=(0,i.C)(r.qb),f=(0,i.C)(r.Bd),x=(0,i.C)(n.ZL),h=(0,i.C)(n.H7),y=(0,i.C)(l.U3),p=(0,i.C)(l.jp),g=(0,i.C)(a.Q4);return{allDataCategories:s?m:f,allDataSubjects:s?x:h,allDataUses:s?y:p,allDatasets:t?g:void 0,isLoading:d||o||c||u}}},31883:function(e,t,s){s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9965],{77867:function(e,s,t){var a=t(24246),i=t(56078);s.Z=e=>{let{connected:s,...t}=e,n="red.500";return null==s?n="gray.300":s&&(n="green.500"),(0,a.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...t})}},59301:function(e,s,t){var a=t(24246);let{Link:i}=t(56078).AntTypography;s.Z=e=>(0,a.jsx)(i,{target:"_blank",rel:"noopener noreferrer",...e})},77213:function(e,s,t){t.d(s,{Z:function(){return p}});var a=t(24246),i=t(56078),n=t(88038),r=t.n(n),l=t(86677);t(27378);var o=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,l.useRouter)();return(0,a.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,a.jsxs)(i.xuv,{children:[(0,a.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,a.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,a.jsx)(i.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,a.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:s,title:t,padded:n=!0,mainProps:c}=e,p=(0,o.hz)(),m=(0,l.useRouter)(),h="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,x=!(p.flags.privacyRequestsConfiguration&&h),{data:g}=(0,d.JE)(void 0,{skip:x}),{data:y}=(0,d.PW)(void 0,{skip:x}),f=p.flags.privacyRequestsConfiguration&&(!g||!y)&&h;return(0,a.jsxs)(i.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,a.jsxs)(r(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsxs)(i.kCb,{as:"main",direction:"column",py:n?6:0,px:n?10:0,h:n?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[f?(0,a.jsx)(u,{}):null,s]})]})}},19904:function(e,s,t){t.d(s,{Tg:function(){return r}});var a=t(24246),i=t(16134),n=t(31793);let r=e=>(0,i.C)(n.uu).filter(s=>e.includes(s)).length>0;s.ZP=e=>{let{scopes:s,children:t}=e;return r(s)?(0,a.jsx)(a.Fragment,{children:t}):null}},26089:function(e,s,t){var a=t(24246),i=t(56078);s.Z=e=>{let{onClick:s,children:t}=e;return(0,a.jsx)(i.wpx,{onClick:s,type:"link",role:"link",size:"large",className:"m-0 p-0 font-medium text-gray-700 underline",children:t})}},83099:function(e,s,t){var a=t(24246),i=t(79283),n=t(34929);s.Z=e=>{let{selectedTaxonomies:s,showDisabled:t=!1,...r}=e,{getDataUseDisplayNameProps:l,getDataUses:o}=(0,n.Z)(),d=(t?o():o().filter(e=>e.active)).filter(e=>!s.includes(e.fides_key)).map(e=>{let{name:s,primaryName:t}=l(e.fides_key);return{value:e.fides_key,name:s,primaryName:t,description:e.description||""}});return(0,a.jsx)(i.l,{options:d,...r})}},16220:function(e,s,t){t.d(s,{V:function(){return n}});var a=t(25980),i=t(77830);let n=()=>({systemOrDatamapRoute:(0,a.hz)().plus?i.oG:i.So})},90111:function(e,s,t){var a=t(24246),i=t(56078);s.Z=e=>{let{children:s,...t}=e;return(0,a.jsx)(i.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...t,children:s})}},44553:function(e,s,t){t.d(s,{Z:function(){return g}});var a=t(24246),i=t(56078),n=t(27378),r=t(45277),l=t(16125),o=t(812),d=t(46628),c=t(20682),u=t(54427),p=t(52253),m=t(78780);let{reducer:h}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:x}=m.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let s=new FormData;return s.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:s}},invalidatesTags:()=>["Connection Type"]})})});var g=e=>{let{isOpen:s,onClose:t,testId:u="connector-template-modal"}=e,p=(0,l.I0)(),[m,h]=(0,n.useState)(null),g=(0,i.pmc)(),{getRootProps:y,getInputProps:f,isDragActive:_}=(0,r.uI)({onDrop:e=>{var s;if("zip"!==(null===(s=e[0].name.split(".").pop())||void 0===s?void 0:s.toLowerCase())){g((0,d.Vo)("Only zip files are allowed."));return}h(e[0])}}),[b,{isLoading:v}]=x(),{refetch:j}=(0,c.$I)({search:""},{skip:!1}),k=async()=>{if(m)try{var e;await b(m).unwrap(),g((0,d.t5)("Integration template uploaded successfully."));let{data:s}=await j();p((0,c.fP)(null!==(e=null==s?void 0:s.items)&&void 0!==e?e:[])),t()}catch(e){g((0,d.Vo)((0,o.e$)(e)))}finally{h(null)}};return(0,a.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"2xl",children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,a.jsx)(i.xBx,{children:"Upload integration template"}),(0,a.jsxs)(i.fef,{children:[(0,a.jsx)(i.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,a.jsxs)(i.xuv,{...y(),bg:_?"gray.100":"gray.50",border:"2px dashed",borderColor:_?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,a.jsx)("input",{...f()}),m?(0,a.jsx)(i.xvT,{children:m.name}):_?(0,a.jsx)(i.xvT,{children:"Drop the file here..."}):(0,a.jsx)(i.xvT,{children:"Click or drag and drop your file here."})]}),(0,a.jsx)(i.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,a.jsxs)(i.mzw,{className:"flex w-full justify-end gap-2",children:[(0,a.jsx)(i.wpx,{onClick:t,"data-testid":"cancel-btn",disabled:v,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!m||v,onClick:k,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},3765:function(e,s,t){var a=t(56078),i=t(812),n=t(46628),r=t(1315),l=t(31883);s.Z=e=>{let s=(0,a.pmc)(),[t]=(0,r.qQ)(),o=t=>!!e.privacy_declarations.find(e=>e.data_use===t.data_use&&e.name===t.name)&&(s((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),d=(e,t)=>{if((0,l.D4)(e)){let t=(0,i.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");s((0,n.Vo)(t));return}return s.closeAll(),s((0,n.t5)(t?"Data use deleted":"Data use saved")),e.data.privacy_declarations},c=async(s,a)=>{let i=s.map(e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:""}}),n={...e,privacy_declarations:i};return d(await t(n),a)};return{createDataUse:async t=>{if(!o(t))return s.closeAll(),c([...e.privacy_declarations,t])},updateDataUse:async(s,t)=>{if(!(t.id!==s.id&&o(t)))return c(e.privacy_declarations.map(e=>e.id===s.id?t:e))},deleteDataUse:async s=>c(e.privacy_declarations.filter(e=>e.id!==s.id),!0),deleteDeclarationByDataUse:async s=>c(e.privacy_declarations.filter(e=>e.data_use!==s),!0)}}},41337:function(e,s,t){var a=t(24246),i=t(56078);t(27378);var n=t(16643),r=t(16394),l=t(14746);let o=l.Ny+l.iW.get(n.Rj.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===n.Rj.WEBSITE;s.Z=e=>{let{data:s,...t}=e;return(0,a.jsx)(i.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(c(s)&&s.encoded_icon)return"data:image/svg+xml;base64,".concat(s.encoded_icon);if(u(s)){var t;let e=null===(t=s.secrets)||void 0===t?void 0:t.url;if(!e)return o;let a=(0,r.ge)(e);return(0,r.tl)(a,100)}if(d(s))e=[...l.iW].find(e=>{var t,a;let[i]=e;return s.connection_type.toString()!==n.Rj.SAAS&&s.connection_type.toString()===i||s.connection_type.toString()===n.Rj.SAAS&&(null===(a=s.saas_config)||void 0===a?void 0:null===(t=a.type)||void 0===t?void 0:t.toString())===i.toString()});else if(c(s)){let{identifier:t}=s;e=[...l.iW].find(e=>{let[s]=e;return s.toLowerCase()===t.toLowerCase()})}return e?l.Ny+e[1]:l.VD})(),fallbackSrc:u(s)?o:l.VD,alt:(()=>{if(d(s)){var e;return null!==(e=s.name)&&void 0!==e?e:s.key}return c(s)?s.human_readable:s})(),...t})}},73183:function(e,s,t){var a=t(24246),i=t(56078);t(27378);var n=t(14207);s.Z=e=>{let{connection_key:s,disabled:t,name:r,access_type:l,connection_type:o,isSwitch:d}=e,{isOpen:c,onOpen:u,onClose:p}=(0,i.qY0)(),[m,h]=(0,n.XX)(),x=async()=>{await m({key:s,name:r,disabled:!t,access:l,connection_type:o}),p()},g=()=>{h.isLoading||p()};return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsxs)(i.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,a.jsx)(i.xvT,{fontSize:"sm",children:"Enable integration"}),(0,a.jsx)(i.rAg,{className:"ml-2",checked:!t,onChange:()=>u()})]}):(0,a.jsx)(i.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:u,children:(0,a.jsx)(i.xvT,{fontSize:"sm",children:t?"Enable":"Disable"})}),(0,a.jsxs)(i.u_l,{isCentered:!0,isOpen:c,onClose:g,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{children:[(0,a.jsxs)(i.xBx,{children:[t?"Enable":"Disable"," Connection"]}),(0,a.jsx)(i.olH,{}),(0,a.jsx)(i.fef,{pb:6,children:(0,a.jsx)(i.Kqy,{direction:"column",spacing:"15px",children:(0,a.jsxs)(i.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[t?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,a.jsxs)(i.mzw,{className:"flex gap-4",children:[(0,a.jsx)(i.wpx,{onClick:g,className:"w-1/2",children:"Cancel"}),(0,a.jsxs)(i.wpx,{onClick:x,loading:h.isLoading,className:"w-1/2",children:[t?"Enable":"Disable"," Connection"]})]})]})]})]})}},8627:function(e,s,t){t.d(s,{s:function(){return l}});var a=t(24246),i=t(56078),n=t(77867),r=t(16394);let l=e=>{let{succeeded:s,timestamp:t}=e,l=t?(0,r.p6)(t):"";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{connected:s}),(0,a.jsx)(i.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:t?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},27259:function(e,s,t){var a=t(24246),i=t(56078),n=t(34090);s.Z=e=>{let{disabled:s=!1,isRequired:t=!1,label:r,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[p,m]=(0,n.U$)(d);return(0,a.jsxs)(i.NIc,{display:"flex",isRequired:t,isInvalid:!!(m.error&&m.touched),children:[r&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:r}),(0,a.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,a.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,a.jsx)(i.zuI,{...p,autoComplete:"off",autoFocus:u}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]}),"text"===o&&(0,a.jsx)(i.IIB,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:s,placeholder:l,size:"sm"}),"textarea"===o&&(0,a.jsx)(i.gxH,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:p.value||""}),(0,a.jsx)(i.J1D,{children:m.error})]})]})}},19812:function(e,s,t){t.d(s,{t:function(){return l}});var a=t(14047),i=t(14207),n=t(27378),r=t(41966);let l=e=>{var s,t,l;let{connectionConfig:o}=e,[d]=(0,i.S6)(),{data:c}=(0,i.Eg)(null!==(t=null==o?void 0:o.key)&&void 0!==t?t:""),u=null!==(l=null==c?void 0:null===(s=c.items)||void 0===s?void 0:s.map(e=>e.fides_key))&&void 0!==l?l:[],p=u.map(e=>({label:e,value:e})),{data:m}=(0,r.LH)({onlyUnlinkedDatasets:!0}),h=(0,n.useMemo)(()=>{var e;return null!==(e=null==m?void 0:m.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[m]),{errorAlert:x,successAlert:g}=(0,a.V)();return{dropdownOptions:[...p,...h],initialDatasets:u,patchConnectionDatasetConfig:async function(e,s){var t,a,i;let{showSuccessAlert:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null!==(i=null===(t=e.dataset)||void 0===t?void 0:t.map(e=>({fides_key:e,ctl_dataset_fides_key:e})))&&void 0!==i?i:[],l=await d({connection_key:s,dataset_pairs:r}).unwrap();(null===(a=l.failed)||void 0===a?void 0:a.length)>0?x(l.failed[0].message):n&&g("Dataset successfully updated!")}}}},72774:function(e,s,t){t.d(s,{Z:function(){return r}});var a=t(24246),i=t(56078),n=e=>{let{title:s,description:t,button:n}=e;return(0,a.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:[(0,a.jsx)(i.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,a.jsxs)(i.xuv,{flexGrow:1,children:[(0,a.jsx)(i.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,a.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:t})]}),n]})},r=()=>(0,a.jsx)(i.xuv,{mb:"6",maxW:"720px","data-testid":"locked-for-GVL-notice",children:(0,a.jsx)(n,{title:"This system is part of the TCF Global Vendor List (GVL)",description:(0,a.jsxs)(a.Fragment,{children:["As a result, the system fields are not editable as they come directly from Fides Compass and the Global Vendor List (GVL). In some cases where the legal basis has been declared to be flexible, you may update the legal basis for particular data uses."," ",(0,a.jsx)(i.rUS,{href:"https://fid.es/tcf_gvl",isExternal:!0,color:"complimentary.500",children:"For more information on the Global Vendor List, click here."})]})})})},69525:function(e,s,t){t.d(s,{U:function(){return a}});let a=e=>{var s;let t=e.data_categories.flatMap(e=>e.split(","));return{data_use:e.data_use,data_categories:t,features:e.features,legal_basis_for_processing:e.legal_basis_for_processing,flexible_legal_basis_for_processing:e.flexible_legal_basis_for_processing,retention_period:e.retention_period?e.retention_period:"",cookies:null===(s=e.cookies)||void 0===s?void 0:s.map(e=>({name:e.name,domain:e.domain,path:e.path}))}}},65626:function(e,s,t){t.d(s,{Z:function(){return sH}});var a,i,n=t(24246),r=t(84720),l=t(56078),o=t(79894),d=t.n(o),c=t(86677),u=t.n(c),p=t(27378),m=t(16134),h=t(25980),x=t(45938),g=t(16220),y=t(77830),f=t(46628),_=t(26089),b=t(19904),v=t(16394),j=t(20682),k=t(41337);let w=e=>{let{connectionConfig:s}=e,t=(0,m.C)(j.pw),{data:a}=(0,j.$I)(t),i=(0,p.useMemo)(()=>(null==a?void 0:a.items)||[],[a]),[n,r]=(0,p.useState)(),l=(0,p.useMemo)(()=>[...i].sort((e,s)=>e.human_readable>s.human_readable?1:-1),[i]),o=(0,p.useMemo)(()=>{let e=new Map;return null==l||l.map(s=>e.set(s.human_readable,{value:s})),e},[l]),d=(0,p.useMemo)(()=>{var e;return(null===(e=i.find(e=>e.identifier===(null==s?void 0:s.connection_type)||(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)))||void 0===e?void 0:e.type)||"ethyca"},[s,i]);return(0,p.useMemo)(()=>{let e=i.find(e=>(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)||e.identifier===(null==s?void 0:s.connection_type));e&&r(e)},[s,i]),{dropDownOptions:o,selectedValue:n,setSelectedValue:r,systemType:d}};var C=e=>{var s;let{disabled:t,hasClear:a=!0,label:i,list:r,onChange:o,selectedValue:d}=e,c=(0,p.useRef)(null),[u,m]=(0,p.useState)(!1),[h,x]=(0,p.useState)(""),g=()=>{m(!1)},y=null===(s=[...r].find(e=>{let[,s]=e;return s.value.identifier===(null==d?void 0:d.identifier)}))||void 0===s?void 0:s[0],f=(0,p.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(x(e.target.value),setTimeout(()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},0))},[]),_=(0,p.useMemo)(()=>(0,v.Ds)(f,100),[f]),b=(0,p.useMemo)(()=>[...r].filter(e=>e[0].toLowerCase().includes(h.toLowerCase())),[r,h]);return(0,n.jsxs)(l.v2r,{isLazy:!0,onClose:g,onOpen:()=>{m(!0)},strategy:"fixed",matchWidth:!0,children:[(0,n.jsx)(l.j2t,{"aria-label":null!=y?y:i,as:l.wpx,color:y?"complimentary.500":void 0,disabled:t,icon:(0,n.jsx)(l.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,n.jsx)(l.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=y?y:i})}),u?(0,n.jsxs)(l.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,n.jsx)(l.xuv,{px:"8px",mt:2,children:(0,n.jsxs)(l.BZy,{size:"sm",children:[(0,n.jsx)(l.Z8_,{pointerEvents:"none",children:(0,n.jsx)(l.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,n.jsx)(l.IIB,{"data-testid":"input-search-integrations",ref:c,autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:_,placeholder:"Search integrations",size:"sm",type:"search"})]})}),a&&(0,n.jsx)(l.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,n.jsx)(l.wpx,{onClick:()=>{o(void 0),x(""),g()},size:"small",children:"Clear"})}),(0,n.jsx)(l.xuv,{overflowY:"auto",maxHeight:"272px",children:b.map(e=>{let[s,t]=e;return(0,n.jsx)(l.esZ,{title:t.toolTip,placement:"rightTop",mouseEnterDelay:.5,children:(0,n.jsxs)(l.sNh,{color:d===t.value?"complimentary.500":void 0,isDisabled:t.isDisabled,onClick:()=>o(t.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,n.jsx)(k.Z,{data:t.value}),(0,n.jsx)(l.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},S=t(14047),D=t(1315),T=t(16643),A=t(84306),I=t(14207),E=t(59301),q=(0,l.IUT)({displayName:"RightArrow",viewBox:"0 0 16 16",d:"M10.7814 7.33312L7.20541 3.75712L8.14808 2.81445L13.3334 7.99979L8.14808 13.1851L7.20541 12.2425L10.7814 8.66645H2.66675V7.33312H10.7814Z"}),R=t(19812),z=e=>{let{status:s}=e;return(0,n.jsxs)(n.Fragment,{children:["success"===s&&(0,n.jsx)(l.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"}),"error"===s&&(0,n.jsx)(l.xvT,{"data-testid":"toast-error-msg",children:"Test failed: please check your connection info"})]})},F=t(8627),L=t(32885),O=t(65450),W=t(34090),Z=t(55484),P=t(97181),N=t(57072),V=t(39864),U=t(27259);let M=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,n.jsxs)(l.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(l.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,n.jsx)(l.zxk,{bg:"primary.800",color:"white",isDisabled:s,isLoading:s,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})};var B=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:a,onCancel:i}=e,{isLoading:r}=(0,N.MO)(),o=(0,m.C)(V.qb),{errorAlert:d}=(0,S.V)();return r?null:(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:{fields:s.length>0?s:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,s)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}a(e,s)},validateOnBlur:!1,validateOnChange:!1,validationSchema:Z.Ry({fields:Z.IX().of(Z.Ry().shape({pii_field:Z.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:Z.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:Z.IX(Z.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(W.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(W.F2,{name:"fields",render:s=>{let{fields:a}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(l.xuv,{visibility:"hidden",children:(0,n.jsx)(l.lr0,{})})]}),(0,n.jsx)(l.xuv,{children:a&&a.length>0?a.map((e,t)=>(0,n.jsxs)(l.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(U.Z,{autoFocus:0===t,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(U.Z,{isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(P.d,{name:"fields.".concat(t,".data_categories"),options:o.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{s.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(M,{isSubmitting:t,onCancelClick:i})]})}})})})})},K=e=>{let{connectionConfig:s}=e,t=(0,p.useRef)(!1),{successAlert:a}=(0,S.V)(),{handleError:i}=(0,S.H)(),[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)([]),{isOpen:u,onOpen:m,onClose:h}=(0,l.qY0)(),{data:x,isFetching:g,isLoading:y,isSuccess:f}=(0,I.QV)(s?s.key:"",{skip:!s}),[_]=(0,I.jF)(),[b]=(0,I._d)(),v=async(e,t)=>{try{o(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await b(t).unwrap():await _(t).unwrap(),a("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){i(e)}finally{o(!1)}};(0,p.useEffect)(()=>(t.current=!0,f&&x&&c(x.fields),()=>{t.current=!1}),[x,f]);let j=(0,n.jsx)(l.wpx,{disabled:!s||r,loading:r,onClick:m,children:"Customize DSR"});return(0,n.jsxs)(n.Fragment,{children:[s?j:(0,n.jsx)(l.esZ,{title:"Save an Integration first to customize the DSR",placement:"top",children:j}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:h,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{minWidth:"775px",children:[(0,n.jsx)(l.xBx,{children:"Customize DSR"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",children:'Customize your PII fields to create a friendly label name for your privacy request packages. This "Package Label" is the label your user will see in their downloaded package.'}),(g||y)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),t.current&&!y?(0,n.jsx)(B,{data:d,isSubmitting:r,onSaveClick:v,onCancel:h}):null]})})]})]})]})},H=t(98784),Y=t.n(H),G=t(46238),$=t(73183),J=e=>{let{options:s}=e,[t,{error:a},i]=(0,W.U$)("dataset"),{setValue:r}=i;return(0,n.jsxs)(l.NIc,{display:"flex",children:[(0,n.jsx)(l.lXp,{color:"gray.900",fontWeight:"semibold",fontSize:"sm",htmlFor:"dataset",minWidth:"150px",children:"Datasets"}),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"100%",children:[(0,n.jsx)(l.xuv,{w:"full",children:(0,n.jsx)(l.WPr,{...t,id:"dataset",placeholder:"Select datasets...",options:s,onChange:e=>r(e),mode:"multiple",className:"w-full"})}),(0,n.jsx)(l.J1D,{children:a})]}),(0,n.jsx)("div",{style:{marginLeft:"8px"},children:(0,n.jsx)(G.b,{label:"Select datasets to associate with this integration"})})]})},Q=t(95492),X=e=>{let{onDelete:s,deleteResult:t}=e,{isOpen:a,onOpen:i,onClose:r}=(0,l.qY0)(),o=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&r()};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(l.xvT,{fontSize:"sm",children:"Delete integration"}),(0,n.jsx)(l.wpx,{"aria-label":"Delete integration",icon:(0,n.jsx)(Q.l,{}),disabled:t.isLoading,onClick:i,className:"ml-2"})]})]}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:a,onClose:o,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsx)(l.xBx,{children:"Delete integration"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsx)(l.Kqy,{direction:"column",spacing:"15px",children:(0,n.jsx)(l.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"Deleting an integration may impact any privacy request that is currently in progress. Do you wish to proceed?"})})}),(0,n.jsxs)(l.mzw,{children:[(0,n.jsx)(l.wpx,{onClick:o,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(l.wpx,{onClick:()=>{s()},loading:t.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},ee=t(99792);let es=(e,s)=>{let t={...e};return s&&Object.entries(s.properties).forEach(e=>{let[s,a]=e;if("secrets"in t||(t.secrets={}),"integer"===a.type)t.secrets[s]=a.default?Number(a.default):0;else{var i;t.secrets[s]=null!==(i=a.default)&&void 0!==i?i:""}}),t},et=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===ee.Z.SAAS&&(t+="_api"),t},ea="#/definitions/FidesDatasetReference",ei=e=>{let{secretsSchema:s,defaultValues:t,isSubmitting:a=!1,isAuthorizing:i=!1,onSaveClick:r,onTestConnectionClick:o,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:p,connectionConfig:m,initialDatasets:x,datasetDropdownOptions:g,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[b,{isLoading:v,isFetching:j}]=(0,I.h2)(),{plus:k}=(0,h.hz)(),w=(e,s,t)=>{let a;return(void 0===s||""===s||void 0===s)&&(a="".concat(e," is required")),t===ea&&(s.includes(".")?s.split(".").length<3&&(a="Dataset reference must include at least three parts"):a="Dataset reference must be dot delimited"),a},C=(e,s)=>(0,n.jsx)(l.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:s}),S=e=>{var s;if((null===(s=e.allOf)||void 0===s?void 0:s[0].$ref)===ea)return"Enter dataset.collection.field"},D=e=>{var t,a;return(null==s?void 0:null===(t=s.required)||void 0===t?void 0:t.includes(e))||(null==s?void 0:null===(a=s.properties)||void 0===a?void 0:a[e])!==void 0&&"default"in s.properties[e]},A=(e,s)=>(0,n.jsx)(W.gN,{id:"secrets.".concat(e),name:"secrets.".concat(e),validate:(!!D(e)||"integer"===s.type)&&(e=>{var t;return w(s.title,e,null===(t=s.allOf)||void 0===t?void 0:t[0].$ref)}),children:t=>{var a;let{field:i,form:r}=t,o=r.errors.secrets&&r.errors.secrets[e],d=!!r.touched.secrets&&r.touched.secrets[e],c="boolean"===s.type,u="integer"===s.type;return(0,n.jsxs)(l.NIc,{display:"flex",isRequired:D(e)&&!c,isInvalid:o&&d,children:[C(e,s.title),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[!u&&!c&&(0,n.jsx)(l.IIB,{...i,type:s.sensitive?"password":"text",placeholder:S(s),autoComplete:"off",color:"gray.700",size:"sm"}),c&&(0,n.jsx)(l.WPr,{value:!!i.value,onChange:e=>r.setFieldValue(i.name,e),options:[{label:"False",value:!1},{label:"True",value:!0}]}),u&&(0,n.jsxs)(l.Y2U,{allowMouseWheel:!0,color:"gray.700",onChange:e=>{r.setFieldValue(i.name,e)},value:null!==(a=i.value)&&void 0!==a?a:0,min:0,size:"sm",children:[(0,n.jsx)(l.zuI,{...i,autoComplete:"off"}),(0,n.jsxs)(l.FiK,{children:[(0,n.jsx)(l.WQu,{}),(0,n.jsx)(l.Y_d,{})]})]}),(0,n.jsx)(l.J1D,{children:o})]}),(0,n.jsx)(l.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(G.b,{label:s.description})})]})}},"secrets.".concat(e)),E=e=>{let t=Y().cloneDeep(e);return s&&Object.keys(s.properties).forEach(e=>{var a;if((null===(a=s.properties[e].allOf)||void 0===a?void 0:a[0].$ref)===ea){let s=t.secrets[e].split(".");t.secrets[e]={dataset:s.shift(),field:s.join("."),direction:"from"}}}),t},q=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(E(e))},R=async e=>{Object.keys(await e.validateForm()).length>0||o(await b(m.key))},z=(null==m?void 0:m.disabled)||!1;return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==m?void 0:m.key){var a,i;return e.name=null!==(i=m.name)&&void 0!==i?i:"",e.description=m.description,e.instance_key=m.connection_type===T.Rj.SAAS?null===(a=m.saas_config)||void 0===a?void 0:a.fides_key:m.key,e.enabled_actions=(m.enabled_actions||[]).map(e=>e.toString()),e.secrets=m.secrets?Y().cloneDeep(m.secrets):{},e.dataset=x,(null==s?void 0:s.properties)&&Object.entries(s.properties).forEach(s=>{var t;let[a,i]=s;if((null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)===ea){let s=e.secrets[a];s&&(e.secrets[a]="".concat(s.dataset,".").concat(s.field))}}),e}return Y().isEmpty(e.enabled_actions)&&(e.enabled_actions=p.supported_actions.map(e=>e.toString())),es(e,s)})(),onSubmit:(e,s)=>{r(E(e),s)},validateOnBlur:!1,validateOnChange:!1,children:e=>{var t;let r=!e.dirty&&(null==m?void 0:m.authorized);return(0,n.jsx)(W.l0,{noValidate:!0,children:(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)("div",{className:"flex flex-row",children:[m?(0,n.jsx)($.Z,{connection_key:null==m?void 0:m.key,disabled:z,connection_type:null==m?void 0:m.connection_type,access_type:null==m?void 0:m.access,name:null!==(t=null==m?void 0:m.name)&&void 0!==t?t:m.key,isSwitch:!0}):null,m?(0,n.jsx)(X,{onDelete:f,deleteResult:_}):null]}),!!(null==m?void 0:m.key)&&(0,n.jsx)(W.gN,{id:"instance_key",name:"instance_key",children:s=>{let{field:t}=s;return(0,n.jsxs)(l.NIc,{display:"flex",children:[C("instance_key","Integration identifier"),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(l.IIB,{...t,autoComplete:"off",color:"gray.700",isDisabled:!!(null==m?void 0:m.key),placeholder:"A unique identifier for your new ".concat(p.human_readable," integration"),size:"sm"}),(0,n.jsx)(l.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(l.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(G.b,{label:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this integration."})})]})}}),p.type!==T.Zi.MANUAL&&s?Object.entries(s.properties).map(e=>{let[s,t]=e;return"advanced_settings"===s?null:A(s,t)}):null,k&&(0,n.jsx)(W.gN,{id:"enabled_actions",name:"enabled_actions",validate:e=>{let s;return e&&0!==e.length||(s="At least one request type must be selected"),s},children:s=>{let{field:t,form:a}=s;return(0,n.jsxs)(l.NIc,{"data-testid":"enabled-actions",display:"flex",isInvalid:a.touched.enabled_actions&&a.errors.enabled_actions,isRequired:!0,children:[C("enabled_actions","Request types"),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(l.WPr,{...t,placeholder:"Select...",mode:"multiple",options:p.supported_actions.map(e=>({label:Y().upperFirst(e),value:e})),onChange:e=>{a.setFieldValue(t.name,e)},disabled:1===p.supported_actions.length,className:"w-full"}),(0,n.jsx)(l.J1D,{children:e.errors.enabled_actions})]}),(0,n.jsx)(l.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(G.b,{label:"The request types that are supported for this integration."})})]})}}),T.Zi.DATABASE===p.type&&!y&&(0,n.jsx)(J,{options:g}),(0,n.jsxs)("div",{className:"flex gap-4",children:[!p.authorization_required||r?(0,n.jsx)(l.wpx,{disabled:!(null==m?void 0:m.key)||a||_.isLoading,loading:v||j,onClick:()=>R(e),"data-testid":"test-connection-button",children:u}):null,k&&T.Zi.DATABASE===p.type&&!Y().isEmpty(x)&&(0,n.jsx)(l.wpx,{onClick:()=>d(),children:"Test datasets"}),p.authorization_required&&!r?(0,n.jsx)(l.wpx,{loading:i,onClick:()=>q(e.values,e),children:"Authorize integration"}):null,p.type===T.Zi.MANUAL?(0,n.jsx)(K,{connectionConfig:m}):null,(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit",children:"Save"})]})]})})}})},en=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:et(a,t),saas_connector_type:t.identifier,secrets:{},...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},r={systemFidesKey:a,connectionConfig:n};return Object.entries(s.properties).forEach(s=>{r.connectionConfig.secrets[s[0]]=e.secrets[s[0]]}),await i(r).unwrap()},er=async(e,s,t,a,i)=>{var n;let r=a?a.key:et(t,s),l={access:T.uv.WRITE,connection_type:s.type===T.Zi.SAAS?s.type:s.identifier,description:e.description,key:r,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:t,connectionConfigs:[l]}).unwrap();if((null===(n=o.failed)||void 0===n?void 0:n.length)>0){let e=o.failed[0].message;throw Object.assign(Error(e),{data:{detail:e}})}return o},el=async(e,s,t,a,i)=>{let n={systemFidesKey:t,secrets:{}};return(Object.entries(s.properties).forEach(s=>{s[0]in a&&e.secrets[s[0]]===a[s[0]]||(n.secrets[s[0]]=e.secrets[s[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},eo=e=>{let{secretsSchema:s,systemFidesKey:t,connectionOption:a,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,A.V)(),{handleError:l}=(0,S.H)(),o=(0,m.T)(),[d,c]=(0,p.useState)(!1),[u,x]=(0,p.useState)(!1),{dropdownOptions:g,patchConnectionDatasetConfig:y,initialDatasets:f}=(0,R.t)({connectionConfig:i}),[_]=(0,I.NG)(),[b]=(0,L.IB)(),[v]=(0,I.rO)(),[j]=(0,O.Zh)(),[k]=(0,O.qd)(),[w]=(0,L.kg)(),[C,D]=(0,O._w)(),{plus:E}=(0,h.hz)(),q=(0,p.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]),z=(0,m.C)(O.NC);return{isSubmitting:d,isAuthorizing:u,handleSubmit:async e=>{let n=!i;try{if(c(!0),a.type===T.Zi.SAAS&&n)i=(await en(e,s,a,t,E?b:_)).connection;else{let n=await er(e,a,t,i,E?w:k);i||a.type!==T.Zi.DATABASE||(i=n.succeeded[0]),a.type!==T.Zi.MANUAL&&await el(e,s,t,q,j)}i&&e.dataset&&a.type===T.Zi.DATABASE&&await y(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{c(!1)}},handleAuthorization:async e=>{let n=!i;try{x(!0),n?i=(await en(e,s,a,t,_)).connection:await el(e,s,t,q,j);let r=await v(i.key).unwrap();x(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{x(!1)}},datasetDropdownOptions:g,initialDatasets:f,handleDelete:async()=>{try{await C(t),o((0,O.db)({...z,connection_configs:null})),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:D}},ed=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i}=e,[r,o]=(0,p.useState)(),d=(0,l.pmc)(),c=t.type===T.Zi.MANUAL,{data:m}=(0,j.n3)(t.identifier,{skip:c}),{isSubmitting:h,isAuthorizing:x,handleSubmit:g,handleAuthorization:y,datasetDropdownOptions:_,initialDatasets:b,handleDelete:v,deleteDatastoreConnectionResult:k}=eo({secretsSchema:m,systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i});return m||t.type===T.Zi.MANUAL?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,n.jsxs)("div",{children:["Connect to your ",t.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),t.user_guide&&(0,n.jsx)("div",{style:{marginTop:"12px"},children:(0,n.jsxs)(E.Z,{href:t.user_guide,children:["View docs for help with this integration ",(0,n.jsx)(q,{})]})})]}),(0,n.jsx)(ei,{secretsSchema:m,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:h,isAuthorizing:x,onSaveClick:g,onTestConnectionClick:e=>{var s;o(e);let t=(null===(s=e.data)||void 0===s?void 0:s.test_status)==="succeeded"?"success":"error";d({...f.MA,status:t,description:(0,n.jsx)(z,{status:t})})},onTestDatasetsClick:()=>{u().push("/systems/configure/".concat(s,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:t,connectionConfig:a,datasetDropdownOptions:_,initialDatasets:b,isCreatingConnectionConfig:!a,onDelete:v,deleteResult:k}),a?(0,n.jsxs)(l.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[r&&r.data&&void 0!==r.fulfilledTimeStamp?(0,n.jsx)(F.s,{succeeded:"succeeded"===r.data.test_status,timestamp:r.fulfilledTimeStamp}):(0,n.jsx)(F.s,{succeeded:null==a?void 0:a.last_test_succeeded,timestamp:(null==a?void 0:a.last_test_timestamp)||""}),(0,n.jsx)(l.LZC,{})]}):null]}):null};var ec=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:a,onOpen:i,onClose:r}=(0,l.qY0)(),[o,d]=(0,p.useState)(null),{successAlert:c}=(0,S.V)(),[u,{isLoading:h}]=(0,D.qd)(),x=(0,m.C)(j.pw),{data:g}=(0,j.$I)(x),y=(0,p.useMemo)(()=>(null==g?void 0:g.items)||[],[g]),{handleError:f}=(0,S.H)(),_=()=>{h||(o&&d(null),r())},b=async()=>{try{if(o){var e;let s={...o,instance_key:o.connection_type===T.Rj.SAAS?null===(e=o.saas_config)||void 0===e?void 0:e.fides_key:o.key},a=y.find(e=>(null==o?void 0:o.saas_config)&&e.identifier===(null==o?void 0:o.saas_config.type)||e.identifier===(null==o?void 0:o.connection_type));(await er(s,a,t,o,u)).succeeded[0]&&c("Integration successfully linked!"),d(null),r()}}catch(e){f(e)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.wpx,{onClick:i,children:"Link integration"}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:a,size:"lg",onClose:_,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsx)(l.xBx,{children:"Unlinked Integrations"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsxs)(l.Kqy,{direction:"column",spacing:"15px",children:[(0,n.jsx)(l.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"These are all the integrations that are not linked to a system. Please select an integration to link to a system."}),(0,n.jsx)(l.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,n.jsxs)(l.kCb,{flexDirection:"row",alignItems:"center",_hover:{bg:"gray.100",color:"gray.600"},bg:(null==o?void 0:o.key)===e.key?"gray.100":"unset",color:(null==o?void 0:o.key)===e.key?"gray.600":"unset",cursor:"pointer",onClick:()=>{d(e)},children:[(0,n.jsx)(k.Z,{data:e}),(0,n.jsx)(l.xvT,{children:e.name})]},e.key))})]})}),(0,n.jsxs)(l.mzw,{className:"flex gap-4",children:[(0,n.jsx)(l.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(l.wpx,{onClick:b,loading:h,disabled:!o||h,className:"w-1/2",children:"Link integration"})]})]})]})]})},eu=t(44553),ep=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:a,selectedValue:i,setSelectedValue:r}=w({connectionConfig:s}),o=(0,m.C)(I.dR),{data:d}=(0,I.AZ)({...o,orphaned_from_system:!0}),[c,u]=(0,p.useState)([]);(0,p.useEffect)(()=>{d&&u(d.items)},[d]);let h=(0,l.qY0)();return(0,n.jsxs)(l.xuv,{id:"con-wrapper",px:6,children:[(0,n.jsxs)(l.kCb,{py:5,children:[(0,n.jsxs)(l.Kqy,{direction:{base:"column",lg:"row"},children:[(0,n.jsx)(C,{list:a,label:"Integration type",selectedValue:i,onChange:r,disabled:!!(s&&null!==s)}),!s&&c.length>0?(0,n.jsx)(ec,{connectionConfigs:c,systemFidesKey:t}):null,(0,n.jsx)(b.ZP,{scopes:[T.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,n.jsx)(l.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:h.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,n.jsx)(eu.Z,{isOpen:h.isOpen,onClose:h.onClose})]}),(null==i?void 0:i.type)&&[T.Zi.DATABASE,T.Zi.DATA_CATALOG,T.Zi.SAAS,T.Zi.MANUAL,T.Zi.EMAIL].includes(i.type)?(0,n.jsx)(ed,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:r,systemFidesKey:t}):null]})},em=t(71922),eh=t(31883);let ex=e=>{let{item:s,options:t=[],onNoticeChange:a,isChild:i}=e,{external_id:r,name:o}=s,d="".concat(r,"-notice_id"),[c,,u]=(0,W.U$)(d),{setValue:p}=u;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{flexGrow:1,children:[i&&(0,n.jsx)(l.LqM,{}),(0,n.jsx)(l.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(i?"-child":""),m:0,fontSize:"14px",fontWeight:i?"normal":"semibold",children:o})]}),(0,n.jsx)(l.WPr,{...c,id:d,allowClear:!0,placeholder:"None",options:t,onChange:e=>{p(e),a(s={...s,notice_id:e})},className:"w-full","data-testid":"consentable-item-select"})]})},eg=e=>{let{connectionKey:s,...t}=e,a=(0,l.pmc)(),{data:i,isLoading:r}=(0,L.EQ)(s),[o,{isLoading:d}]=(0,L.Am)(),c=(0,m.C)(em.Zp),u=(0,m.C)(em.G1),{data:h,isLoading:x}=(0,em.J6)({page:c,size:u}),[g,y]=(0,p.useState)(),[_,b]=(0,p.useState)([]),v=(0,p.useMemo)(()=>null==g?void 0:g.reduce((e,s)=>{var t;return s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id),(null===(t=s.children)||void 0===t?void 0:t.length)&&s.children.forEach(s=>{s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id)}),e},{}),[g]),j=e=>{let s=e.notice_id;if(s){let e=null==h?void 0:h.items.filter(e=>e.id===s);if(null==e?void 0:e.length){var t;let s=(null===(t=e[0].children)||void 0===t?void 0:t.map(e=>e.id))||[];return _.filter(e=>s.includes(e.value))}}return _},k=async()=>{let e=await o({connectionKey:s,consentableItems:g});(0,eh.D4)(e)?a((0,f.Vo)("Failed to save consent automation")):a({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,n.jsx)(l.xvT,{"data-testid":"toast-success-msg",children:"Your consent automation settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,p.useEffect)(()=>{i&&y(i)},[i]),(0,p.useEffect)(()=>{h&&b(h.items.map(e=>({label:e.name,value:e.id})))},[h]),r||x)return(0,n.jsx)(l.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(l.OdW,{height:"35px"})});if(!g||!g.length||!h)return null;let w=(e,s)=>{y(g.map(t=>{if(s?t.external_id===s.external_id:t.external_id===e.external_id){if(s){var a;return{...t,children:null===(a=t.children)||void 0===a?void 0:a.map(s=>s.external_id===e.external_id?e:s)}}return e}return t}))};return(0,n.jsx)(l.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(l.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,n.jsxs)(l.Qdk,{border:"none",children:[(0,n.jsxs)(l.KFZ,{children:[(0,n.jsx)(l.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,n.jsx)(l.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Consent automation"})}),(0,n.jsx)(l.XEm,{})]}),(0,n.jsxs)(l.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,n.jsx)(l.xvT,{mb:7,children:"Map consentable items, such as channels and subscriptions, from your integration to Fides privacy notices. This ensures that updates to consent preferences in either location remain accurate and up-to-date."}),(0,n.jsx)(W.J9,{initialValues:v||{},onSubmit:k,children:(0,n.jsxs)(W.l0,{children:[(0,n.jsx)(l.MIq,{columns:2,spacing:3,children:g.map(e=>{var s;return(0,n.jsxs)(p.Fragment,{children:[(0,n.jsx)(ex,{item:e,options:_,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,n.jsx)(ex,{item:s,options:j(e),isChild:!0,onNoticeChange:s=>w(s,e)},s.external_id))]},e.external_id)})}),(0,n.jsx)(l.Ugi,{justifyContent:"flex-end",mt:3,children:(0,n.jsx)(l.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var ey=t(57865),ef=t(3124),e_=t.n(ef),eb=(0,l.IUT)({displayName:"NextArrow",viewBox:"0 0 12 12",d:"M6.58584 5.99999L4.11084 3.52499L4.81784 2.81799L7.99984 5.99999L4.81784 9.18199L4.11084 8.47499L6.58584 5.99999Z"}),ev=(0,l.IUT)({displayName:"PrevArrow",viewBox:"0 0 12 12",d:"M5.414 5.99999L7.889 8.47499L7.182 9.18199L4 5.99999L7.182 2.81799L7.889 3.52499L5.414 5.99999Z"});let ej=e=>{let s=new Date(e),t=navigator.language;return{formattedTime:s.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"}),formattedDate:s.toLocaleDateString(t,{year:"numeric",month:"long",day:"numeric"})}},ek=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,ew=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=ek(t),l=e[t],o=s[t];if("boolean"==typeof l||"boolean"==typeof o||"number"==typeof l||"number"==typeof o){l!==o&&n.push(r);return}!((Y().isNil(l)||Y().isEmpty(l))&&(Y().isNil(o)||Y().isEmpty(o)))&&(Y().isEqual(l,o)||(Y().isNil(l)||Y().isEmpty(l)?a.push(r):Y().isNil(o)||Y().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},eC=e=>{let{edited_by:s,before:t,after:a,created_at:i}=e,r=[],l=[],o=[];t.custom_fields||a.custom_fields?{addedFields:r,removedFields:l,changedFields:o}=ew(t.custom_fields,a.custom_fields):{addedFields:r,removedFields:l,changedFields:o}=ew(t,a);let d=[];if(r.length>0&&d.push(["added ",(0,n.jsx)("b",{children:r.join(", ")})]),l.length>0&&d.push(["removed ",(0,n.jsx)("b",{children:l.join(", ")})]),o.length>0&&d.push(["changed ",(0,n.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let c=d.pop(),u=d.length>0?(0,n.jsxs)(n.Fragment,{children:[d.map((e,s)=>(0,n.jsxs)(p.Fragment,{children:[e,s<d.length-1?", ":""]},s)),d.length>=2?", and ":" and ",c]}):c,{formattedTime:m,formattedDate:h}=ej(i);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:s})," ",u," on ",h," at ",m]})},eS=(e,s)=>{let t=e=>e.map(e=>{let t=s.find(s=>s.fides_key===e.fides_key);return t&&t.name?t.name:e.fides_key}),a={...e.before},i={...e.after};return a.ingress&&(a.ingress=t(a.ingress)),a.egress&&(a.egress=t(a.egress)),i.ingress&&(i.ingress=t(i.ingress)),i&&i.egress&&(i.egress=t(i.egress)),{...e,before:a,after:i}},eD=(e,s)=>{if(Y().isEmpty(s))return e;let t=(e,s)=>{var t,a;return null!==(a=null===(t=s.find(s=>s.value===e))||void 0===t?void 0:t.label)&&void 0!==a?a:e};return{...e,before:{...e.before,vendor_id:t(e.before.vendor_id,s)},after:{...e.after,vendor_id:t(e.after.vendor_id,s)}}},eT=e=>{let s=e.before.privacy_declarations||[],t=e.after.privacy_declarations||[],a=new Set([...s,...t].map(e=>e.data_use)),i=[],n=[];return a.forEach(e=>{let a=s.find(s=>s.data_use===e)||{data_use:"",data_categories:[]},r=t.find(s=>s.data_use===e)||{data_use:"",data_categories:[]};i.push(a),n.push(r)}),{...e,before:{...e.before,privacy_declarations:i},after:{...e.after,privacy_declarations:n}}},eA=e=>{let s={...e.before.custom_fields},t={...e.after.custom_fields};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,custom_fields:s},after:{...e.after,custom_fields:t}}},eI=e=>{if(!e.before.privacy_declarations||!e.before.privacy_declarations[0]||!e.before.privacy_declarations[0].custom_fields)return e;let s={...e.before.privacy_declarations[0].custom_fields},t=e.after.privacy_declarations&&e.after.privacy_declarations[0]?{...e.after.privacy_declarations[0].custom_fields}:{};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,privacy_declarations:[{...e.before.privacy_declarations[0],custom_fields:s}]},after:{...e.after,privacy_declarations:[{...e.after.privacy_declarations[0],custom_fields:t}]}}},eE=(0,p.createContext)(null),eq=()=>(0,p.useContext)(eE);var eR=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,p.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,n.jsx)(eE.Provider,{value:i,children:s})},ez=t(62165),eF=t(30320),eL=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eq(),i=p.Children.toArray(t).filter(e=>{if(p.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=Y().get(null==a?void 0:a.before,s),i=Y().get(null==a?void 0:a.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&Y().isEmpty(t),r="boolean"!=typeof i&&"number"!=typeof i&&Y().isEmpty(i);return!n||!r}return!1});return 0===i.length?null:(0,n.jsx)(l.Kqy,{marginTop:"0px !important",children:(0,n.jsxs)(l.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,n.jsx)(l.X6q,{as:"h3",size:"xs",children:s})}),(0,n.jsx)(l.Kqy,{children:i})]})})},eO=t(40324),eW=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eq(),[d]=(0,W.U$)(i.name),c={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,p.useRef)(null),[m,h]=(0,p.useState)(null),[x,g]=(0,p.useState)([]),[y,f]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=Y().get(null==r?void 0:r.before,i.name)||[],s=Y().get(null==r?void 0:r.after,i.name)||[];f(!Y().isEqual(e,s)),g(e.length>s.length?e:s)},[r,i.name]),(0,p.useEffect)(()=>{u.current&&h(u.current.offsetHeight)},[x]);let _={};return y&&(_="before"===o?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,n.jsx)(l.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,n.jsx)(G.b,{label:a})]}),(0,n.jsx)(l.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(m,"px")},children:(m?c.value:x).map((e,s)=>(0,n.jsx)(l.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},s))}),"before"===o&&y&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eZ=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eq(),[d]=(0,W.U$)(i),c={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,p.useRef)(null),[m,h]=(0,p.useState)(null),[x,g]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=Y().get(null==r?void 0:r.before,i.name)||"",s=Y().get(null==r?void 0:r.after,i.name)||"";g(!Y().isEqual(e,s));let t=e.length>s.length?e:s;u.current&&(u.current.textContent=t,h(u.current.offsetHeight),u.current.textContent=c.value)},[r,i.name,c.value]);let y={};return x&&(y="before"===o?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,n.jsx)(l.NIc,{style:y,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,n.jsx)(G.b,{label:a})]}),(0,n.jsx)(l.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(m,"px")},children:c.value}),"before"===o&&x&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eP=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:a}=(0,eF.m)({resourceType:t}),i=e=>Array.from(a.values()).some(s=>s.name===e&&!!s.allow_list_id),r=t===T.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",l=Object.keys(s).sort();return(0,n.jsx)(eL,{heading:"Custom fields",children:l.map(e=>i(e)?(0,n.jsx)(eW,{label:e,name:"".concat(r,".").concat(e)},e):(0,n.jsx)(eZ,{label:e,name:"".concat(r,".").concat(e)},e))})},eN=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:r}=eq(),[o]=(0,W.U$)(a),d={...o,value:o.value},[c,u]=(0,p.useState)(!1);(0,p.useEffect)(()=>{u(Y().get(null==i?void 0:i.before,a.name)!==Y().get(null==i?void 0:i.after,a.name))},[i,a.name,d.value]);let m={};return c&&(m="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,n.jsx)(l.NIc,{style:m,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",minHeight:"46px",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),(0,n.jsx)(G.b,{label:t})]}),void 0!==d.value&&(0,n.jsx)(l.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===r&&c&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eV=e=>{let{initialValues:s}=e,t=(0,ez.hz)();return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,n.jsx)(W.l0,{children:(0,n.jsxs)(l.Kqy,{children:[(0,n.jsxs)(eL,{heading:"System details",children:[t.dictionaryService?(0,n.jsx)(eZ,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,n.jsx)(eZ,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eZ,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,n.jsx)(eZ,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eW,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,n.jsx)(eL,{heading:"Dataset reference",children:(0,n.jsx)(eW,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,n.jsxs)(eL,{heading:"Data processing properties",children:[(0,n.jsx)(eN,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,n.jsx)(eN,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,n.jsx)(eZ,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,n.jsx)(eN,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,n.jsx)(eW,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,n.jsx)(eN,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,n.jsx)(eW,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,n.jsx)(eN,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,n.jsx)(eZ,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,n.jsxs)(eL,{heading:"Administrative properties",children:[(0,n.jsx)(eZ,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,n.jsx)(eZ,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,n.jsx)(eZ,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,n.jsx)(eZ,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,n.jsx)(eZ,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,n.jsx)(eW,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,n.jsx)(eZ,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,n.jsx)(eZ,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,n.jsx)(eZ,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,n.jsx)(eP,{customFields:s.custom_fields,resourceType:T.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,n.jsxs)(p.Fragment,{children:[(0,n.jsxs)(eL,{heading:"Data use",children:[(0,n.jsx)(eZ,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].legal_basis_for_processing"),label:"Legal basis for processing",tooltip:"What is the legal basis under which personal data is processed for this purpose?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,n.jsx)(eL,{heading:"Features",children:(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,n.jsx)(eL,{heading:"Dataset reference",children:(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,n.jsxs)(eL,{heading:"Special category data",children:[(0,n.jsx)(eN,{name:"privacy_declarations[".concat(t,"].processes_special_category_data"),label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,n.jsxs)(eL,{heading:"Third parties",children:[(0,n.jsx)(eN,{name:"privacy_declarations[".concat(t,"].data_shared_with_third_parties"),label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,n.jsx)(eP,{customFields:s.privacy_declarations[0].custom_fields,resourceType:T.P6.PRIVACY_DECLARATION})]},t)),(0,n.jsxs)(eL,{heading:"Data flow",children:[(0,n.jsx)(eW,{name:"ingress",label:"Sources"}),(0,n.jsx)(eW,{name:"egress",label:"Destinations"})]})]})})})};let eU=(e,s)=>{let t=[],a=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||s.egress||e.ingress||s.ingress)&&t.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||s.privacy_declarations&&s.privacy_declarations.length>0;i&&t.push("Data Uses");let n=[...Object.keys(e),...Object.keys(s)].some(e=>!a.has(e));return!i&&n&&t.unshift("System Information"),t};var eM=e=>{let{selectedHistory:s,isOpen:t,onClose:a}=e;return(0,n.jsxs)(l.u_l,{isOpen:t,onClose:a,size:"4xl",children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsxs)(l.xBx,{backgroundColor:e_().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,n.jsxs)(l.X6q,{size:"xs",children:[(0,n.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),s&&(0,n.jsx)(n.Fragment,{children:eU(s.before,s.after).map((e,s)=>(0,n.jsx)(l.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.olH,{})]})]}),(0,n.jsx)(l.fef,{paddingTop:0,paddingBottom:6,children:(0,n.jsxs)(l.kCb,{justifyContent:"space-between",children:[(0,n.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,n.jsx)(eR,{selectedHistory:s,formType:"before",children:(0,n.jsx)(eV,{initialValues:null==s?void 0:s.before})})}),(0,n.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,n.jsx)(eR,{selectedHistory:s,formType:"after",children:(0,n.jsx)(eV,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eB=e=>{let{system:s}=e,[t,a]=(0,p.useState)(1),{data:i}=(0,L.Xc)({system_key:s.fides_key,page:t,size:10}),[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)(null),u=(0,m.C)(L.o),{data:h=[]}=(0,O.K3)(),x=(null==i?void 0:i.items)||[],g=e=>{c(e=eI(e=eA(e=eS(e=eD(e=eT(e),u),h)))),o(!0)},{formattedTime:y,formattedDate:f}=ej(s.created_at),_=i&&i.total?Math.ceil(i.total/10):0;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.iA_,{ml:"24px",children:[(0,n.jsx)(l.hrZ,{children:(0,n.jsx)(l.Tr,{children:(0,n.jsxs)(l.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:e_().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,n.jsx)(l.p3B,{children:x.map((e,s)=>{let t=eC(e);return t?(0,n.jsx)(l.Tr,{onClick:()=>g(e),style:{cursor:"pointer"},children:(0,n.jsx)(l.Td,{pt:"10px",pb:"10px",pl:"16px",fontSize:"12px",border:"1px solid #E2E8F0",children:t})},s):null})})]}),((null==i?void 0:i.total)||0)>10&&(0,n.jsxs)(l.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,n.jsxs)(l.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"600",paddingX:2,children:[(t-1)*10+1," -"," ",Math.min(10*t,(null==i?void 0:i.total)||0)," of"," ",(null==i?void 0:i.total)||0]}),(0,n.jsx)(l.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&a(t-1)},disabled:1===t,icon:(0,n.jsx)(ev,{})}),(0,n.jsx)(l.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,n.jsx)(eb,{})})]}),(0,n.jsx)(eM,{selectedHistory:d,isOpen:r,onClose:()=>{o(!1),c(null)}})]})},eK=t(52368),eH=t(3765),eY=e=>{let{title:s,description:t,handleAdd:a}=e;return(0,n.jsx)(l.Kqy,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.500",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,n.jsxs)(l.xuv,{children:[(0,n.jsx)(l.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,n.jsx)(l.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,n.jsx)(l.Ugi,{mt:4,children:(0,n.jsx)(l.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:a,icon:(0,n.jsx)(l.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},eG=t(58452);let e$=e=>{let{declaration:s,title:t,handleDelete:a,handleEdit:i}=e,{isOpen:r,onOpen:o,onClose:d}=(0,l.qY0)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,n.jsx)(l.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.AB5,{onClick:()=>i(s),role:"button",tabIndex:0,children:(0,n.jsx)(l.xvT,{children:t||s.data_use})}),(0,n.jsx)(l.LZC,{}),a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:o,"data-testid":"delete-btn",children:(0,n.jsx)(l.pJl,{})}),(0,n.jsx)(eG.Z,{isOpen:r,onClose:d,onConfirm:()=>a(s),title:"Delete data use declaration",message:(0,n.jsxs)(l.xvT,{children:["You are about to delete the data use declaration"," ",(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:t||s.data_use}),", including all its cookies. Are you sure you want to continue?"]}),isCentered:!0})]}):null]})})}),(0,n.jsx)(l.izJ,{})]})},eJ=e=>{let{heading:s,children:t,headerButton:a,footerButton:i}=e;return(0,n.jsx)(l.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,n.jsxs)(l.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,n.jsxs)(l.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,n.jsx)(l.X6q,{as:"h3",size:"xs",children:s}),(0,n.jsx)(l.LZC,{}),a||null]}),(0,n.jsx)(l.Kqy,{spacing:0,children:t}),(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:i||null})]})})},eQ=e=>{let{heading:s,declarations:t,handleAdd:a,handleDelete:i,handleEdit:r,allDataUses:o}=e,d=e=>{let s=o.filter(s=>s.fides_key===e.data_use)[0];return s?e.name?"".concat(s.name," - ").concat(e.name):s.name:""},c=(0,m.C)(ey.gU);return(0,n.jsx)(eJ,{heading:s,footerButton:c?null:(0,n.jsx)(l.wpx,{onClick:a,size:"small",icon:(0,n.jsx)(l.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,n.jsx)(e$,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:r},e.id))})};var eX=t(95346),e0=t(54748),e1=t(28325),e2=t(30234);let e4=Z.Ry().shape({data_categories:Z.IX(Z.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:Z.Z_().required().label("Data use")}),e6={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},id:""},e5=e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:"",special_category_legal_basis:e.processes_special_category_data?e.special_category_legal_basis:void 0,third_parties:e.data_shared_with_third_parties?e.third_parties:void 0,shared_categories:e.data_shared_with_third_parties?e.shared_categories:void 0}},e3=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,values:r,includeCustomFields:o,privacyDeclarationId:d,lockedForGVL:c}=e,u=!!d,{legalBasisOptions:m}=(0,e0.Z)(),{specialCategoryLegalBasisOptions:h}=(0,e1.Z)(),x=(0,p.useMemo)(()=>i?i.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[i]);return(0,n.jsxs)(l.Kqy,{spacing:4,children:[(0,n.jsxs)(e2.Z,{heading:"Data use declaration",children:[(0,n.jsx)(eO.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:u||c,variant:"stacked"}),(0,n.jsx)(P.d,{id:"data_use",label:"Data use",name:"data_use",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:u||c}),(0,n.jsx)(P.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data are collected for this purpose?",mode:"multiple",isRequired:!0,disabled:c,layout:"stacked"}),(0,n.jsx)(P.d,{name:"data_subjects",label:"Data subjects",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",disabled:c,layout:"stacked"}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(P.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:m,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled:c}),(0,n.jsx)(l.UO1,{in:"Legitimate interests"===r.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked",disabled:c})})})]}),(0,n.jsx)(l.xuv,{mt:5,pl:4,children:(0,n.jsx)(eO.w8,{name:"flexible_legal_basis_for_processing",label:"This legal basis is flexible",tooltip:"Has the vendor declared that the legal basis may be overridden?",variant:"stacked",isDisabled:c})}),(0,n.jsx)(eO.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:c})]}),(0,n.jsx)(e2.Z,{heading:"Features",children:(0,n.jsx)(P.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:c,mode:"tags"})}),(0,n.jsx)(e2.Z,{heading:"Dataset reference",children:(0,n.jsx)(P.d,{name:"dataset_references",label:"Dataset references",options:x,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:c})}),(0,n.jsx)(e2.Z,{heading:"Special category data",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.w8,{name:"processes_special_category_data",label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?",variant:"stacked",isDisabled:c}),(0,n.jsx)(l.UO1,{in:r.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(P.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:h,isRequired:r.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked",disabled:c})})})]})}),(0,n.jsx)(e2.Z,{heading:"Third parties",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.w8,{name:"data_shared_with_third_parties",label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?",variant:"stacked",isDisabled:c}),(0,n.jsx)(l.UO1,{in:r.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsxs)(l.Kqy,{mt:4,spacing:4,children:[(0,n.jsx)(eO.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked",disabled:c}),(0,n.jsx)(P.d,{name:"shared_categories",label:"Shared categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data does this system share with third parties?",layout:"stacked",mode:"multiple",disabled:c})]})})]})}),o?(0,n.jsx)(eX.uc,{resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:d}):null]})},e8=(e,s)=>e?{...e,customFieldValues:s||{}}:e6,e7=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,eX.mZ)({resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e5(e),r=await s(i,t);if(r){let s=r.filter(s=>s.data_use===e.data_use&&(!s.name||s.name===e.name));s.length>0&&await n({customFieldValues:a,fides_key:s[0].id})}},initialValues:(0,p.useMemo)(()=>e8(t,i),[t,i])}},e9=e=>{let{onSubmit:s,onCancel:t,initialValues:a,...i}=e,r=null==a?void 0:a.id,{handleSubmit:o,initialValues:d}=e7({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:r}),c=(0,m.C)(ey.gU);return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:d,onSubmit:o,validationSchema:e4,children:e=>{let{dirty:s,values:a}=e;return(0,n.jsxs)(W.l0,{"data-testid":"declaration-form",children:[(0,n.jsx)(x.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,n.jsxs)(l.Kqy,{spacing:4,children:[(0,n.jsx)(e3,{values:a,lockedForGVL:c,privacyDeclarationId:r,...i}),(0,n.jsxs)(l.kCb,{w:"100%",children:[(0,n.jsx)(l.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),c?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",disabled:!s,"data-testid":"save-btn",children:"Save"})]})]})]})]})}})},se=e=>{let{isOpen:s,onClose:t,heading:a,isCentered:i=!1,testId:r="privacy-declaration-modal",children:o}=e;return(0,n.jsxs)(l.u_l,{isOpen:s,onClose:t,isCentered:i,scrollBehavior:"inside",size:"3xl",children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{textAlign:"left",p:0,"data-testid":r,children:[(0,n.jsx)(l.xBx,{p:0,children:(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,n.jsx)(l.X6q,{as:"h3",size:"sm",children:a})})}),(0,n.jsx)(l.fef,{pb:4,children:o})]})]})};var ss=e=>{let{system:s,addButtonProps:t,includeCustomFields:a,...i}=e,{isOpen:r,onClose:o,onOpen:d}=(0,l.qY0)(),[c,u]=(0,p.useState)(void 0),{createDataUse:m,updateDataUse:h,deleteDataUse:x}=(0,eH.Z)(s),g=[...s.privacy_declarations.filter(e=>void 0!==e.cookies).flatMap(e=>e.cookies)],y=s.cookies?s.cookies.filter(e=>0===g.filter(s=>s&&s.name===e.name).length):void 0,f=()=>{o(),u(void 0)},_=()=>{d(),u(void 0)},b=async e=>(f(),c)?h(c,e):m(e);return(0,p.useEffect)(()=>{o()},[o,s.fides_key]),(0,n.jsxs)(l.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===s.privacy_declarations.length?(0,n.jsx)(eY,{title:"You don't have a data use set up for this system yet.",description:'A Data Use is the purpose for which data is used in a system. In Fides, a system may have more than one Data Use. For example, a CRM system may be used both for "Customer Support" and also for "Email Marketing", each of these is a Data Use.',handleAdd:_}):(0,n.jsx)(eQ,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:_,handleEdit:e=>{d(),u(e)},handleDelete:x,allDataUses:i.allDataUses}),y&&y.length>0?(0,n.jsx)(eJ,{heading:"Unassigned cookies",children:y.map(e=>(0,n.jsxs)(p.Fragment,{children:[(0,n.jsx)(l.xuv,{px:6,py:4,children:(0,n.jsx)(l.xvT,{children:e.name})}),(0,n.jsx)(l.izJ,{})]},e.name))}):null,(0,n.jsx)(se,{isOpen:r,onClose:f,heading:"Configure data use",children:(0,n.jsx)(e9,{initialValues:c,onSubmit:b,onCancel:f,includeCustomFields:a,...i})})]})},st=e=>{let{system:s}=e,{isLoading:t,...a}=(0,eK.f)({includeDatasets:!0,includeDisabled:!1}),i=a.allDataCategories.filter(e=>e.active),r=a.allDataUses.filter(e=>e.active),o=a.allDataSubjects.filter(e=>e.active),c={...a,allDataCategories:i,allDataUses:r,allDataSubject:o,cookies:s.cookies};return(0,n.jsxs)(l.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,n.jsx)(l.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,n.jsxs)(l.xvT,{fontSize:"sm",fontWeight:"medium",children:["Data Uses describe the business purpose for which the personal data is processed or collected. Within a Data Use, you assign which categories of personal information are collected for this purpose and for which categories of data subjects. To update the available categories and uses, please visit"," ",(0,n.jsx)(l.rUS,{as:d(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,n.jsx)(l.$jN,{}):(0,n.jsx)(ss,{system:s,includeCustomFields:!0,...c})]})},sa=t(812),si=t(93237),sn=t(69525),sr=t(33335);let sl={system_type:"",fides_key:"",tags:[],name:"",description:"",dataset_references:[],processes_personal_data:!0,exempt_from_privacy_regulations:!1,reason_for_exemption:"",uses_profiling:!1,does_international_transfers:!1,requires_data_protection_assessments:!1,privacy_policy:"",legal_name:"",legal_address:"",administrating_department:"",responsibility:[],joint_controller_info:"",data_security_practices:"",privacy_declarations:[],data_stewards:"",dpo:"",cookie_max_age_seconds:void 0,uses_cookies:!1,cookie_refresh:!1,uses_non_cookie_access:!1,legitimate_interest_disclosure_url:""},so=(e,s)=>{var t;let a=null==e?void 0:null===(t=e.data_stewards)||void 0===t?void 0:t.map(e=>e.username).join(", ");return{...e,customFieldValues:s,description:e.description?e.description:"",legal_address:e.legal_address?e.legal_address:"",dpo:e.dpo?e.dpo:"",cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:"",legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:"",vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,privacy_policy:e.privacy_policy?e.privacy_policy:"",data_security_practices:e.data_security_practices?e.data_security_practices:"",legal_basis_for_profiling:e.legal_basis_for_profiling?e.legal_basis_for_profiling:"",legal_basis_for_transfers:e.legal_basis_for_transfers?e.legal_basis_for_transfers:"",data_stewards:a}},sd=e=>{let s=e.fides_key?e.fides_key:(0,sr.E)(e.name),t=""===e.privacy_policy?void 0:e.privacy_policy,a={system_type:e.system_type,fides_key:s,name:e.name,description:e.description?e.description:"",dataset_references:e.dataset_references,tags:e.tags,processes_personal_data:e.processes_personal_data,exempt_from_privacy_regulations:e.exempt_from_privacy_regulations,reason_for_exemption:e.exempt_from_privacy_regulations?e.reason_for_exemption:void 0,privacy_declarations:e.processes_personal_data?e.privacy_declarations:[],vendor_id:e.vendor_id,ingress:e.ingress,egress:e.egress,meta:e.meta,fidesctl_meta:e.fidesctl_meta,organization_fides_key:e.organization_fides_key,dpa_progress:e.dpa_progress,previous_vendor_id:e.previous_vendor_id,cookies:e.cookies,cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:void 0,uses_cookies:e.uses_cookies,cookie_refresh:e.cookie_refresh,uses_non_cookie_access:e.uses_non_cookie_access,legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:void 0,vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0};return e.processes_personal_data&&(a={...a,dataset_references:e.dataset_references,uses_profiling:e.uses_profiling,legal_basis_for_profiling:e.uses_profiling?e.legal_basis_for_profiling:void 0,does_international_transfers:e.does_international_transfers,legal_basis_for_transfers:e.does_international_transfers?e.legal_basis_for_transfers:void 0,requires_data_protection_assessments:e.requires_data_protection_assessments,dpa_location:e.requires_data_protection_assessments?e.dpa_location:void 0,privacy_policy:t,legal_name:e.legal_name,legal_address:e.legal_address,responsibility:e.responsibility,dpo:e.dpo,data_security_practices:e.data_security_practices},e.administrating_department&&(a.administrating_department=e.administrating_department),e.joint_controller_info&&(a.joint_controller_info=e.joint_controller_info)),a},{useGetSystemAssetsQuery:sc,useAddSystemAssetMutation:su,useUpdateSystemAssetsMutation:sp,useDeleteSystemAssetsMutation:sm,usePopulateSystemAssetsMutation:sh}=t(78780).u.injectEndpoints({endpoints:e=>({getSystemAssets:e.query({query:e=>{let{fides_key:s,...t}=e;return{method:"GET",url:"/plus/system-assets/".concat(s),params:t}},providesTags:["System Assets"]}),addSystemAsset:e.mutation({query:e=>{let{systemKey:s,asset:t}=e;return{method:"POST",url:"/plus/system-assets/".concat(s,"/assets"),body:t}},invalidatesTags:["System Assets"]}),updateSystemAssets:e.mutation({query:e=>{let{systemKey:s,assets:t}=e;return{method:"PUT",url:"/plus/system-assets/".concat(s,"/assets/"),body:t}},invalidatesTags:["System Assets"]}),deleteSystemAssets:e.mutation({query:e=>{let{systemKey:s,asset_ids:t}=e;return{method:"DELETE",url:"/plus/system-assets/".concat(s,"/assets?").concat((0,v.du)(t,"asset_ids"))}},invalidatesTags:["System Assets"]}),populateSystemAssets:e.mutation({query:e=>{let{systemKey:s}=e;return{method:"POST",url:"/plus/dictionary/system-vendors/cookie-assets",body:[s]}}})})});var sx=t(36345);let sg=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sy=[{value:"Adequacy Decision",label:"Adequacy decision"},{value:"Supplementary measures",label:"Supplementary measures"},{value:"SCCs",label:"Standard contractual clauses"},{value:"BCRs",label:"Binding corporate rules"},{value:"Other",label:"Other"}],sf=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),s_=e=>{var s;let{system:t}=e,a=t?null!==(s=t.name)&&void 0!==s?s:"this system":"your new system";return(0,n.jsxs)(l.X6q,{as:"h3",size:"lg",children:["Describe ",a]})};var sb=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:r=[]}=(0,O.K3)(),o=(0,m.T)(),d=(0,eX.mZ)({resourceType:T.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...c}=(0,eK.f)({includeDatasets:!0,includeDisabled:!1}),u=(0,p.useMemo)(()=>t?so(t,d.customFieldValues):sl,[t,d.customFieldValues]),[h]=(0,O.in)(),g=(0,p.useMemo)(()=>Z.Ry().shape({name:Z.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await h({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(e=>e.name!==u.name).some(s=>s.name===e)||s.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})}),privacy_policy:Z.Z_().min(1).url().nullable()}),[h,u.name]),y=(0,ez.hz)(),[_,b]=(0,O.f7)(),[v,j]=(0,O.qQ)(),[k]=sh();(0,L.Rd)(void 0,{skip:!y.dictionaryService});let[w]=(0,L.qz)(),C=(0,m.C)(L.o),S=(0,m.C)(ey.gU),D=(0,p.useMemo)(()=>!!(t&&(null==r?void 0:r.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,r]),A=(0,p.useMemo)(()=>c.allDatasets?c.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[c.allDatasets]),I=(0,l.pmc)(),E=async(e,t)=>{var a;let i,n;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await w({vendor_id:e.vendor_id});if(s.isError){if(!((0,sa.fn)(s.error)&&404===s.error.status)){let e=(0,sa.e$)(s.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.");I((0,f.Vo)(e))}}else s.data&&s.data.items.length>0&&(i=s.data.items.map(e=>{var s;return{...(0,sn.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let r=sd({...e,privacy_declarations:null!=i?i:e.privacy_declarations});if(n=D?await v(r):await _(r),await d.upsertCustomFields(e),!D&&e.vendor_id&&(null===(a=n.data)||void 0===a?void 0:a.fides_key)){let e=await k({systemKey:n.data.fides_key});(0,sa.D4)(e)&&I((0,f.Vo)("An unexpected error occurred while populating the system assets from Compass. Please try again."))}(0,sa.D4)(n)?I({status:"error",description:(0,sa.e$)(n.error,"An unexpected error occurred while ".concat(D?"editing":"creating"," the system. Please try again."))}):(I.closeAll(),t.resetForm({values:e}),s(n.data),o((0,ey.b3)("initial")))},q=e=>{if(y.dictionaryService){if(!e){o((0,ey.b3)("hiding")),o((0,ey.gQ)(!1));return}o((0,ey.b3)("showing")),y.tcf&&(0,sa.cj)(e)===sa.c6.GVL?o((0,ey.gQ)(!0)):o((0,ey.gQ)(!1))}},R=j.isLoading||b.isLoading||d.isLoading;return(0,n.jsx)(W.J9,{initialValues:u,enableReinitialize:!0,onSubmit:E,validationSchema:g,children:e=>{let{dirty:s,values:r,isValid:o}=e;return(0,n.jsxs)(W.l0,{children:[(0,n.jsx)(x.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,n.jsxs)(l.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[a?(0,n.jsx)(s_,{system:t}):null,(0,n.jsx)(l.xvT,{fontSize:"sm",fontWeight:"medium",children:"By providing a small amount of additional context for each system we can make reporting and understanding our tech stack much easier for everyone from engineering to legal teams. So let’s do this now."}),a?(0,n.jsx)(s_,{system:t}):null,(0,n.jsxs)(e2.Z,{heading:"System details",children:[y.dictionaryService?(0,n.jsx)(sx.Z,{label:"System name",options:C,onVendorSelected:q,isCreate:!t,lockedForGVL:S}):(0,n.jsx)(eO.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}),(null==t?void 0:t.fides_key)&&(0,n.jsx)(eO.j0,{id:"fides_key",name:"fides_key",label:"Unique ID",disabled:!0,variant:"stacked",tooltip:"An auto-generated unique ID based on the system name"}),(0,n.jsx)(si.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:S}),(0,n.jsx)(P.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:u.tags?u.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:S})]}),(0,n.jsx)(e2.Z,{heading:"Dataset reference",children:(0,n.jsx)(P.d,{name:"dataset_references",label:"Dataset references",options:A,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:S})}),(0,n.jsx)(e2.Z,{heading:"Data processing properties",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(l.xuv,{mb:4,children:(0,n.jsx)(si.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:S})}),(0,n.jsx)(l.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(si.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!r.processes_personal_data||S}),(0,n.jsx)(l.UO1,{in:r.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:r.exempt_from_privacy_regulations,disabled:S})})})]})}),(0,n.jsx)(l.UO1,{in:r.processes_personal_data&&!r.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,n.jsxs)(l.Kqy,{spacing:4,mt:4,children:[(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(si.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:S}),(0,n.jsx)(l.UO1,{in:r.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(P.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:sg,tooltip:"What is the legal basis under which profiling is performed?",disabled:S,isRequired:r.uses_profiling})})})]}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(si.dQ,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?",disabled:S}),(0,n.jsx)(l.UO1,{in:r.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(P.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sy,tooltip:"What is the legal basis under which the data is transferred?",isRequired:r.does_international_transfers,disabled:S})})})]}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.w8,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?",variant:"stacked",isDisabled:S}),(0,n.jsx)(l.UO1,{in:r.requires_data_protection_assessments,animateOpacity:!0,children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:S,isRequired:r.requires_data_protection_assessments})})})]})]})})]})}),(0,n.jsxs)(l.UO1,{in:r.processes_personal_data&&!r.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,n.jsxs)(e2.Z,{heading:"Cookie properties",children:[(0,n.jsx)(si.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:S}),(0,n.jsx)(si.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:S}),(0,n.jsx)(si.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:S}),(0,n.jsx)(si.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:S})]}),(0,n.jsxs)(e2.Z,{heading:"Administrative properties",children:[(0,n.jsx)(eO.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,n.jsx)(si.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:S}),(0,n.jsx)(si.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?",disabled:S}),(0,n.jsx)(si.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?",disabled:S}),(0,n.jsx)(eO.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||S}),(0,n.jsx)(P.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:sf,tooltip:"What is the role of the business with regard to data processing?",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||S}),(0,n.jsx)(si.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:S}),(0,n.jsx)(eO.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||S}),(0,n.jsx)(si.Yb,{label:"Data security practices",name:"data_security_practices",id:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?",disabled:S}),(0,n.jsx)(si.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:S}),(0,n.jsx)(si.Yb,{label:"Vendor deleted date",name:"vendor_deleted_date",id:"vendor_deleted_date",tooltip:"If this vendor is no longer active, it will be 'soft' deleted. When that occurs, it's deleted date will be recorded here for reporting.",disabled:!0})]}),r.fides_key?(0,n.jsx)(eX.uc,{resourceType:T.P6.SYSTEM,resourceFidesKey:r.fides_key}):null]})]}),(0,n.jsx)(l.xuv,{mt:6,children:(0,n.jsx)(l.wpx,{htmlType:"submit",type:"primary",disabled:R||!s||!o,loading:R,"data-testid":"save-btn",children:"Save"})}),i]})}})},sv=t(59003),sj=t(92222),sk=t(30952),sw=t(14481),sC=t(90111),sS=t(8133),sD=t(83099),sT=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[r,o,{setValue:d,setTouched:c}]=(0,W.U$)(s),u=!!(o.touched&&o.error);return(0,n.jsx)(l.NIc,{isInvalid:u,isRequired:!0,children:(0,n.jsxs)(l.jqI,{vertical:!0,children:[(0,n.jsxs)(l.jqI,{align:"center",children:[t&&(0,n.jsx)(eO.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,n.jsx)(G.b,{label:i})]}),(0,n.jsx)(sD.Z,{...r,mode:"multiple",selectedTaxonomies:[],onChange:e=>{d(e)},onBlur:()=>c(!0),variant:"outlined",autoFocus:!1,status:u?"error":void 0,"data-testid":"controlled-select-".concat(s)}),(0,n.jsx)(eO.Bc,{isInvalid:u,message:o.error,fieldName:s})]})})};(a=i||(i={})).COOKIE="Cookie",a.BROWSER_REQUEST="Browser Request",a.I_FRAME="iFrame",a.JAVASCRIPT_TAG="Javascript tag",a.IMAGE="Image";let sA=Z.Ry().shape({name:Z.Z_().required("Enter a name for this asset"),domain:Z.Z_().required("Enter a valid domain for this asset"),asset_type:Z.Z_().required("Select an asset type"),data_uses:Z.IX().min(1,"Select at least one data use"),base_url:Z.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sI={name:"",description:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sE=e=>{let{isOpen:s,onClose:t,systemKey:a,asset:r,...o}=e,d=!r,[c,{isLoading:u}]=su(),[p,{isLoading:m}]=sp(),h=(0,l.pmc)(),x=async e=>{let s=await c({systemKey:a,asset:e});if((0,sa.D4)(s)){let e=(0,sa.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,f.Vo)(e))}else h((0,f.t5)("Asset added successfully")),t()},g=async e=>{let s=await p({systemKey:a,assets:[e]});if((0,sa.D4)(s)){let e=(0,sa.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,f.Vo)(e))}else h((0,f.t5)("Asset updated successfully")),t()};return(0,n.jsx)(sS.Z,{title:d?"Add asset":"Edit asset",onClose:t,isOpen:s,...o,children:(0,n.jsx)(W.J9,{initialValues:null!=r?r:sI,onSubmit:e=>{d?x(e):g(e)},validationSchema:sA,children:e=>{let{values:s,isValid:a,dirty:r}=e;return(0,n.jsxs)(W.l0,{children:[(0,n.jsxs)(l.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,n.jsx)(sC.Z,{children:(0,n.jsx)(l.xvT,{fontSize:"sm",children:"Create and configure assets (e.g. cookies, pixels, tags) for this system to ensure proper consent enforcement. Adding assets manually allows you to define key attributes, assign categories, and align them with compliance requirements."})}),(0,n.jsxs)(l.jqI,{vertical:!0,gap:20,children:[(0,n.jsx)(eO.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!d}),(0,n.jsx)(P.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,sa.MM)(i),layout:"stacked",disabled:!d}),(0,n.jsx)(sT,{name:"data_uses",label:"Data uses",layout:"stacked"}),(0,n.jsx)(eO.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!d}),(0,n.jsx)(eO.Ks,{id:"description",name:"description",label:"Description",variant:"stacked"}),(0,n.jsx)(l.UO1,{in:!!s.asset_type&&"Cookie"!==s.asset_type,children:(0,n.jsx)(eO.j0,{id:"base_url",name:"base_url",label:"Base URL",variant:"stacked",isRequired:!!s.asset_type&&"Cookie"!==s.asset_type})})]})]}),(0,n.jsxs)(l.jqI,{justify:"space-between",children:[(0,n.jsx)(l.wpx,{onClick:t,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",loading:u||m,disabled:!a||!r,"data-testid":"save-btn",children:"Save"})]})]})}})})},sq=t(8411),sR=t(72625),sz=t(29850),sF=t(77685),sL=e=>{let{systemKey:s,systemName:t,asset:a}=e,[i,r]=(0,p.useState)(!1),[o,d]=(0,p.useState)(),[c,u]=(0,p.useState)(!1),[m,{isLoading:h}]=sp(),{successAlert:x,errorAlert:g}=(0,S.V)(),y=(0,l.qY0)(),{asset_type:f,name:_}=a,b=(0,p.useCallback)(e=>{e.preventDefault(),u(!0)},[]),v=async e=>{if(!e)return;let{newSystemKey:t,newSystemName:i,isNewSystem:n}=e,l=await m({systemKey:s,assets:[{id:a.id,system_key:t}]});(0,eh.D4)(l)?g((0,sa.e$)(l.error)):x(n?"".concat(i," has been added to your system inventory and the ").concat(f,' "').concat(_,'" has been assigned to that system.'):"".concat(f," ").concat(_," has been assigned to ").concat(i)),r(!1),d(void 0)},j=e=>{d(e),y.onOpen()};return(0,n.jsxs)(n.Fragment,{children:[!i&&(0,n.jsxs)(l.j8w,{"data-testid":"system-badge",color:"white",onClick:()=>r(!0),children:[t," ",(0,n.jsx)(l.PJP.I8b,{})]}),!!i&&(0,n.jsx)(sz.R,{variant:"borderless",className:"w-full",autoFocus:!0,defaultOpen:!0,defaultValue:s,onBlur:e=>{var s;(null===(s=e.relatedTarget)||void 0===s?void 0:s.getAttribute("id"))!=="add-new-system"&&r(!1)},onAddSystem:b,onSelect:(e,s)=>j({newSystemKey:e,newSystemName:s.label}),loading:h}),c&&(0,n.jsx)(sF.i,{isOpen:!0,onClose:()=>u(!1),onSuccessfulSubmit:(e,s)=>j({newSystemKey:e,newSystemName:s,isNewSystem:!0})}),(0,n.jsx)(l.cVQ,{isOpen:y.isOpen,onClose:y.onClose,onConfirm:()=>{v(o)},title:"Reassign asset",message:"Are you sure you want to reassign this asset to ".concat(null==o?void 0:o.newSystemName,"?"),isCentered:!0})]})},sO=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:r}]=sm(),o=(0,l.pmc)(),{isOpen:d,onClose:c,onOpen:u}=(0,l.qY0)(),p=async()=>{let e=await i({systemKey:t,asset_ids:[s.id]});(0,eh.D4)(e)?o((0,f.Vo)((0,sa.e$)(e.error,"A problem occurred removing this asset. Please try again"))):o((0,f.t5)("Asset removed successfully"))};return(0,n.jsxs)(l.jqI,{className:"gap-1",children:[(0,n.jsx)(l.wpx,{size:"small",onClick:a,"data-testid":"edit-btn",children:"Edit"}),(0,n.jsx)(l.wpx,{size:"small",onClick:u,loading:r,"data-testid":"remove-btn",children:"Remove"}),(0,n.jsx)(l.cVQ,{isOpen:d,onClose:c,onConfirm:p,title:"Remove asset",message:"Are you sure you want to ignore the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]})},sW=t(34929),sZ=t(26183),sP=e=>{var s,t;let{asset:a,systemId:i}=e,{getDataUseDisplayName:r}=(0,sW.Z)(),[o]=sp(),{errorAlert:d,successAlert:c}=(0,A.V)(),[u,m]=(0,p.useState)(!1),h=async e=>{let s=[...a.data_uses||[],e],t=await o({systemKey:i,assets:[{id:a.id,data_uses:s}]});(0,eh.D4)(t)?d((0,sa.e$)(t.error)):c("Consent category added to ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},x=async e=>{var s;let t=null===(s=a.data_uses)||void 0===s?void 0:s.filter(s=>s!==e),n=await o({systemKey:i,assets:[{id:a.id,data_uses:t}]});(0,eh.D4)(n)?d((0,sa.e$)(n.error)):c("Consent category removed from ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},g=null!==(t=null===(s=a.data_uses)||void 0===s?void 0:s.map(e=>({label:r(e),key:e})))&&void 0!==t?t:[];return(0,n.jsxs)(sZ.Z,{children:[!u&&(0,n.jsxs)(n.Fragment,{children:[g.map(e=>(0,n.jsx)(l.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",closable:!0,onClose:()=>x(e.key),closeButtonLabel:"Remove data use",children:e.label},e.key)),(0,n.jsx)(l.j8w,{onClick:()=>m(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),u&&(0,n.jsx)(l.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,n.jsx)(sD.Z,{selectedTaxonomies:a.data_uses||[],onSelect:h,onBlur:()=>m(!1),open:!0})})]})},sN=e=>{let{systemKey:s,systemName:t,onEditClick:a}=e,i=(0,sj.Cl)();return[i.display({id:"select",cell:e=>{let{row:s}=e;return(0,n.jsx)(sR.k,{isChecked:s.getIsSelected(),onChange:s.getToggleSelectedHandler(),dataTestId:"select-".concat(s.original.name||s.id)})},header:e=>{let{table:s}=e;return(0,n.jsx)(sR.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40,meta:{cellProps:{borderRight:"none",paddingRight:0}}}),i.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(sw.G3,{value:e.getValue()}),header:"Asset"}),i.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,n.jsx)(sw.G3,{value:e.getValue()}),header:"Type"}),i.display({id:"system",cell:e=>(0,n.jsx)(sL,{systemKey:s,systemName:t,asset:e.row.original}),header:"System"}),i.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,n.jsx)(sP,{asset:e.row.original,systemId:s}),header:"Data uses",size:200}),i.accessor(e=>e.locations,{id:"locations",cell:e=>(0,n.jsx)(sR.mb,{values:e.getValue().map(e=>({label:sq.Z8[e],key:e}))}),header:"Locations",size:300}),i.accessor(e=>e.domain,{id:"domain",cell:e=>(0,n.jsx)(sw.G3,{value:e.getValue()}),header:"Domain"}),i.accessor(e=>e.page,{id:"page",cell:e=>(0,n.jsx)(sR.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,n.jsx)(sR.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),i.display({id:"actions",cell:e=>{let{row:t}=e;return(0,n.jsx)(sO,{asset:t.original,systemKey:s,onEditClick:()=>a(t.original)})},header:"Actions"})]},sV=e=>{var s;let{system:t}=e,{PAGE_SIZES:a,pageSize:i,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:m,endRange:h,pageIndex:x,setTotalPages:g,resetPageIndexToDefault:y}=(0,sw.oi)(),[_,b]=(0,p.useState)(""),[v,j]=(0,p.useState)(void 0),[k,w]=(0,p.useState)({}),[C]=sm(),S=(0,l.pmc)(),{data:D,isLoading:T,isFetching:A}=sc({fides_key:t.fides_key,search:_,page:x,size:i}),{isOpen:I,onClose:E,onOpen:q}=(0,l.qY0)(),{isOpen:R,onClose:z,onOpen:F}=(0,l.qY0)();(0,p.useEffect)(()=>{y()},[_,y]),(0,p.useEffect)(()=>{g(null==D?void 0:D.pages)},[D,g]);let L=sN({systemName:null!==(s=t.name)&&void 0!==s?s:t.fides_key,systemKey:t.fides_key,onEditClick:e=>{j(e),q()}}),O=(0,sv.b7)({getCoreRowModel:(0,sj.sC)(),columns:L,manualPagination:!0,data:(null==D?void 0:D.items)||[],columnResizeMode:"onChange",onRowSelectionChange:w,state:{rowSelection:k}}),W=O.getSelectedRowModel().rows.map(e=>e.original.id),Z=async()=>{let e=await C({systemKey:t.fides_key,asset_ids:W});(0,eh.D4)(e)?S((0,f.Vo)((0,sa.e$)(e.error,"A problem occurred removing these assets. Please try again."))):(O.resetRowSelection(),S((0,f.t5)("Assets removed successfully"))),z()};return t?T?(0,n.jsx)(sw.I4,{rowHeight:36,numRows:36}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.xvT,{fontSize:"sm",mb:4,children:"This page displays all assets associated with this system. Use the table below to review and manage these technologies for compliance and detailed insights."}),(0,n.jsxs)(sw.Q$,{children:[(0,n.jsx)(sk.f,{value:_,onChange:b,placeholder:"Search by asset name..."}),(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.mm_,{}),iconPosition:"end",onClick:q,"data-testid":"add-asset-btn",children:"Add asset"}),(0,n.jsx)(sE,{isOpen:I,onClose:()=>{j(void 0),E()},systemKey:t.fides_key,asset:v}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.ZNm,{}),iconPosition:"end",onClick:F,disabled:!W.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,n.jsx)(l.cVQ,{isOpen:R,onClose:z,onConfirm:Z,title:"Remove assets",message:"Are you sure you want to remove the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]}),(0,n.jsx)(sw.ZK,{tableInstance:O,emptyTableNotice:(0,n.jsx)(l.oj8,{image:l.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,n.jsx)(sw.s8,{totalRows:(null==D?void 0:D.total)||0,pageSizes:a,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:d||A,onNextPageClick:c,isNextPageDisabled:u||A,startRange:m,endRange:h})]}):null};let sU={INFORMATION:{index:0,hash:"#information"},DATA_USES:{index:1,hash:"#data-uses"},DATA_FLOW:{index:2,hash:"#data-flow"},INTEGRATIONS:{index:3,hash:"#integrations"},ASSETS:{index:4,hash:"#assets"},HISTORY:{index:5,hash:"#history"}},sM=e=>{let s=e.startsWith("#")?e:"#".concat(e);return Object.values(sU).find(e=>e.hash===s)},sB=e=>Object.values(sU).find(s=>s.index===e),sK=e=>{let{onViewDatamap:s,onAddPrivacyDeclaration:t}=e;return(0,n.jsxs)(l.xuv,{children:[(0,n.jsx)(l.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,n.jsxs)(l.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,n.jsx)(_.Z,{onClick:s,children:"view it now"})," and come back to finish this setup when you’re ready. Or you can progress to"," ",(0,n.jsx)(_.Z,{onClick:t,children:"adding your privacy declarations in the next tab"}),"."]})]})};var sH=e=>{var s,t;let{isCreate:a}=e,i=(0,c.useRouter)(),[o,u]=(0,p.useState)((()=>{var e,s;let t=i.asPath.split("#")[1];return t&&null!==(s=null===(e=sM(t))||void 0===e?void 0:e.index)&&void 0!==s?s:sU.INFORMATION.index})()),[_,b]=(0,p.useState)(!1),{systemOrDatamapRoute:v}=(0,g.V)(),j=(0,l.pmc)(),k=(0,m.T)(),w=(0,m.C)(O.NC),[C,S]=(0,p.useState)(void 0),{plus:D}=(0,h.hz)(),{flags:{dataDiscoveryAndDetection:T}}=(0,h.Vb)(),{plus:A}=(0,h.hz)(),{data:I}=(0,O.rn)(null==w?void 0:w.fides_key,{skip:!w});(0,p.useEffect)(()=>{k((0,O.db)(I))},[I,k]),(0,p.useEffect)(()=>{w&&S(w.processes_personal_data)},[w]);let E=(0,p.useCallback)(e=>{void 0===w&&b(!0),k((0,O.db)(e)),i.push({pathname:y.Dv,query:{id:e.fides_key}});let s={...f.MA,description:(0,n.jsx)(sK,{onViewDatamap:()=>{i.push(v).then(()=>{j.closeAll()})},onAddPrivacyDeclaration:()=>{u(1),j.closeAll()}})};j({...s})},[w,k,i,v,j]);(0,p.useEffect)(()=>(a&&(k((0,O.db)(void 0)),k((0,ey.b3)("initial")),k((0,ey.gQ)(!1))),()=>{k((0,O.db)(void 0))}),[k,a]);let{attemptAction:q}=(0,x.oI)(),R=(0,p.useCallback)(e=>{q().then(async s=>{if(s){let{status:s}=i.query;if(s&&("succeeded"===s?j((0,f.t5)("Integration successfully authorized.")):j((0,f.Vo)("Failed to authorize integration."))),u(e),i.isReady){let s=sB(e);if(s){let e={...i.query};delete e.status,await i.replace({pathname:i.pathname,query:e,hash:s.hash},void 0,{shallow:!0})}}}})},[q,i,j]);(0,p.useEffect)(()=>{let{status:e}=i.query;e&&R(sU.INTEGRATIONS.index)},[i.query,R]);let z=[{label:"Information",content:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xuv,{px:6,mb:9,children:[(0,n.jsx)(x.eB,{}),(0,n.jsx)(sb,{onSuccess:E,system:w})]}),_?(0,n.jsx)(l.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,n.jsxs)(l.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,n.jsx)(l.rUS,{as:d(),href:v,textDecor:"underline",children:"ready to view in your data map"}),". You can return to this setup at any time to add privacy declarations to this system."]})}):null]})},{label:"Data uses",content:w?(0,n.jsx)(l.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,n.jsx)(st,{system:w})}):null,isDisabled:!w||!C},{label:"Data flow",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsxs)(l.xuv,{px:6,paddingBottom:2,children:[(0,n.jsx)(l.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,n.jsx)(l.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"Data flow describes the flow of data between systems in your Data Map. Below, you can configure Source and Destination systems and the corresponding links will be drawn in the Data Map graph. Source systems are systems that send data to this system while Destination systems receive data from this system."})]}),(0,n.jsx)(r.q,{system:w,isSystemTab:!0})]}):null,isDisabled:!w},{label:"Integrations",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(l.xuv,{px:6,paddingBottom:2,children:(0,n.jsx)(l.xvT,{fontSize:"sm",lineHeight:5,children:A&&T?(0,n.jsxs)(n.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,n.jsx)(l.rUS,{href:y.KH,color:"link.900",children:"Integration Management"})," ","to set up monitoring on databases."]}):"Integrations are used to process privacy requests for access erasure, portability, rectification, and consent."})}),(0,n.jsx)(ep,{connectionConfig:w.connection_configs,systemFidesKey:w.fides_key}),(null===(s=w.connection_configs)||void 0===s?void 0:s.key)&&(0,n.jsx)(eg,{m:6,connectionKey:null===(t=w.connection_configs)||void 0===t?void 0:t.key})]}):null,isDisabled:!w}];return D&&z.push({label:"Assets",content:w?(0,n.jsx)(sV,{system:w}):null,isDisabled:!w}),D&&z.push({label:"History",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(l.xuv,{px:6,paddingBottom:6,children:(0,n.jsx)(l.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"All changes to this system are tracked here in this audit table by date and by user. You can inspect the changes by selecting any of the events listed."})}),(0,n.jsx)(eB,{system:w})]}):null,isDisabled:!w}),{tabData:z,tabIndex:o,onTabChange:R}}},54748:function(e,s,t){var a=t(27378),i=t(16643);s.Z=()=>({legalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},28325:function(e,s,t){var a=t(27378),i=t(16643);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2197],{26496:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/404",function(){return n(77030)}])},77030:function(e,i,n){"use strict";n.r(i);var s=n(24246),t=n(72111),r=n(91067),o=n(77181),l=n(86677),c=n(52253);i.default=()=>{let e=(0,l.useRouter)();return(0,s.jsxs)("div",{children:[(0,s.jsx)(t.Z,{}),(0,s.jsx)("main",{children:(0,s.jsxs)(o.Kqy,{minH:"100vh",align:"center",justify:"center",spacing:6,children:[(0,s.jsx)(o.xuv,{bg:"white",py:16,px:[0,0,35],width:["100%","100%",640],borderRadius:4,position:["absolute","absolute","inherit"],top:0,bottom:0,left:0,right:0,boxShadow:"base",children:(0,s.jsxs)(o.Kqy,{align:"center",spacing:9,children:[(0,s.jsxs)(o.Kqy,{align:"center",justify:"center",spacing:3,children:[(0,s.jsx)(o.X6q,{fontSize:"7xl",lineHeight:"1",colorScheme:"primary",color:"gray.700",children:"Error: 404"}),(0,s.jsx)(o.xvT,{fontWeight:"semibold",children:"We’re sorry but this page doesn’t exist"}),(0,s.jsx)(o.wpx,{type:"primary",onClick:()=>e.push(c.gp),className:"w-80",children:"Return to homepage"})]}),(0,s.jsx)(o.xuv,{display:[null,null,"none"],children:(0,s.jsx)(r.Z,{src:"/logo.svg",alt:"Fides logo",width:205,height:46})})]})}),(0,s.jsx)(o.xuv,{display:["none","none","inherit"],children:(0,s.jsx)(r.Z,{src:"/logo.svg",alt:"Fides logo",width:205,height:46})})]})})]})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=26496)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2197],{26496:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/404",function(){return n(77030)}])},77030:function(e,i,n){"use strict";n.r(i);var s=n(24246),t=n(72111),r=n(91067),o=n(56078),l=n(86677),c=n(52253);i.default=()=>{let e=(0,l.useRouter)();return(0,s.jsxs)("div",{children:[(0,s.jsx)(t.Z,{}),(0,s.jsx)("main",{children:(0,s.jsxs)(o.Kqy,{minH:"100vh",align:"center",justify:"center",spacing:6,children:[(0,s.jsx)(o.xuv,{bg:"white",py:16,px:[0,0,35],width:["100%","100%",640],borderRadius:4,position:["absolute","absolute","inherit"],top:0,bottom:0,left:0,right:0,boxShadow:"base",children:(0,s.jsxs)(o.Kqy,{align:"center",spacing:9,children:[(0,s.jsxs)(o.Kqy,{align:"center",justify:"center",spacing:3,children:[(0,s.jsx)(o.X6q,{fontSize:"7xl",lineHeight:"1",colorScheme:"primary",color:"gray.700",children:"Error: 404"}),(0,s.jsx)(o.xvT,{fontWeight:"semibold",children:"We’re sorry but this page doesn’t exist"}),(0,s.jsx)(o.wpx,{type:"primary",onClick:()=>e.push(c.gp),className:"w-80",children:"Return to homepage"})]}),(0,s.jsx)(o.xuv,{display:[null,null,"none"],children:(0,s.jsx)(r.Z,{src:"/logo.svg",alt:"Fides logo",width:205,height:46})})]})}),(0,s.jsx)(o.xuv,{display:["none","none","inherit"],children:(0,s.jsx)(r.Z,{src:"/logo.svg",alt:"Fides logo",width:205,height:46})})]})})]})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=26496)}),_N_E=e.O()}]);