ethyca-fides 2.59.1rc0__py2.py3-none-any.whl → 2.59.2b1__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 (230) hide show
  1. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/METADATA +2 -2
  2. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/RECORD +202 -198
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/c9c72b3d550b_data_migration_cookie_asset.py +218 -0
  5. fides/api/api/v1/endpoints/storage_endpoints.py +5 -4
  6. fides/api/db/system.py +1 -121
  7. fides/api/models/asset.py +1 -2
  8. fides/api/models/fides_user.py +1 -0
  9. fides/api/models/privacy_notice.py +14 -19
  10. fides/api/models/sql_models.py +0 -51
  11. fides/api/schemas/application_config.py +1 -0
  12. fides/api/schemas/connection_configuration/connection_secrets_datahub.py +3 -3
  13. fides/api/schemas/connection_configuration/connection_secrets_postgres.py +7 -7
  14. fides/api/schemas/messaging/messaging.py +9 -2
  15. fides/api/schemas/storage/storage.py +35 -1
  16. fides/api/schemas/storage/storage_secrets_docs_only.py +8 -2
  17. fides/api/schemas/system.py +1 -2
  18. fides/api/service/connectors/postgres_connector.py +1 -0
  19. fides/api/service/storage/gcs.py +38 -0
  20. fides/api/service/storage/storage_authenticator_service.py +28 -0
  21. fides/api/service/storage/storage_uploader_service.py +25 -1
  22. fides/api/tasks/storage.py +45 -1
  23. fides/api/util/storage_util.py +2 -0
  24. fides/service/messaging/aws_ses_service.py +25 -16
  25. fides/ui-build/static/admin/404.html +1 -1
  26. fides/ui-build/static/admin/_next/static/4ZsbAUsCLedx18AUPZCUU/_buildManifest.js +1 -0
  27. fides/ui-build/static/admin/_next/static/chunks/146-106021bf1ae6e912.js +1 -0
  28. fides/ui-build/static/admin/_next/static/chunks/{1817-6abbe957a53026d7.js → 1817-11bb237f57d9ad27.js} +1 -1
  29. fides/ui-build/static/admin/_next/static/chunks/{1904-281183a117e26585.js → 1904-3c40738cb0fd2a7c.js} +1 -1
  30. fides/ui-build/static/admin/_next/static/chunks/{2479-b4f7a1c7c711cb65.js → 2479-50f431c0e2c0de3c.js} +1 -1
  31. fides/ui-build/static/admin/_next/static/chunks/3244-4b76482dcc5d576f.js +1 -0
  32. fides/ui-build/static/admin/_next/static/chunks/{3702-3d814671c31eaca3.js → 3702-31d37a0217f82615.js} +1 -1
  33. fides/ui-build/static/admin/_next/static/chunks/{3855-237afbbea7f54707.js → 3855-da54ef27afd56c46.js} +1 -1
  34. fides/ui-build/static/admin/_next/static/chunks/{3872-c53d74aebd12cfd3.js → 3872-68b4ceba8f632bc0.js} +1 -1
  35. fides/ui-build/static/admin/_next/static/chunks/401-49cdd118a89cc343.js +1 -0
  36. fides/ui-build/static/admin/_next/static/chunks/4060-bad5f07013c7bb49.js +1 -0
  37. fides/ui-build/static/admin/_next/static/chunks/{4121-476f657b03a78965.js → 4121-4914fb77e60d31f4.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/4481-7a992683e9191bc9.js +1 -0
  39. fides/ui-build/static/admin/_next/static/chunks/{5480-1623dbacdf4e6794.js → 5480-d177a83facd21738.js} +1 -1
  40. fides/ui-build/static/admin/_next/static/chunks/{5487-9a2aecb0ec63d567.js → 5487-22de631f1d186527.js} +1 -1
  41. fides/ui-build/static/admin/_next/static/chunks/5973-1020589bef6dd253.js +1 -0
  42. fides/ui-build/static/admin/_next/static/chunks/6277-c46c9eb59177b850.js +1 -0
  43. fides/ui-build/static/admin/_next/static/chunks/{6372-2aee10b79089521a.js → 6372-0ca1b9521b5489fd.js} +1 -1
  44. fides/ui-build/static/admin/_next/static/chunks/6853-7d7eb22f19d3806c.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/{6954-127745bfdc5bc0b3.js → 6954-981a8a444780bedb.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/{7751-3913b8c055f599e5.js → 7751-09c6424d673d8aa4.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/{79-77cfed02164241ca.js → 79-7ca48fb1a0b52f96.js} +1 -1
  48. fides/ui-build/static/admin/_next/static/chunks/9572-8f5947db1a6da260.js +1 -0
  49. fides/ui-build/static/admin/_next/static/chunks/9767-162b0f8524990149.js +1 -0
  50. fides/ui-build/static/admin/_next/static/chunks/{9951-66aad0602aadfbe2.js → 9951-8ceba69296972ce9.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-13a604eb8d39dffc.js → _app-fc9e922ec354be47.js} +46 -46
  52. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a8c51c7bdbb405e2.js +1 -0
  53. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-78de4bde88e18b0f.js → [id]-7122d8a8c20e7cd2.js} +1 -1
  54. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-c02b14c50b19bd91.js → new-300fd2800c417d0b.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-85ddbe3ae50c7527.js +1 -0
  56. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-75c2ed6ba3de48cd.js → [id]-5a9269aa00a16596.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-487ae57dc7e2ded2.js → new-78808c75ba86c0be.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-65091908d6296afc.js → privacy-notices-047c409bc5e12d1a.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-01d1371e690ae190.js +1 -0
  60. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-d08a38d4f198691a.js +1 -0
  61. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-6b3d1fe762c747d8.js → [systemId]-cc5431e4fbd6d39e.js} +1 -1
  62. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-61eafb8444bffb76.js → [monitorId]-f073ddcfb916988e.js} +1 -1
  63. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-e7869f658e3017b9.js → activity-73025c2ac5a00347.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-5aff1d01c6c30ad6.js → new-f3a6dd67f012b005.js} +1 -1
  65. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-f4d57b3432c57112.js → dataset-3b703775de1ca75e.js} +1 -1
  66. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-b2b1168d0361baa8.js → [id]-b905c75f68786c2f.js} +1 -1
  67. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-c804349a417a888b.js → new-abd92bec98bdbb66.js} +1 -1
  68. fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-0faa9b3c4555e585.js → datastore-connection-52c3f076edb49944.js} +1 -1
  69. fides/ui-build/static/admin/_next/static/chunks/pages/{index-e72904e316ede1b0.js → index-1bccf315f995267a.js} +1 -1
  70. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-afcf73fd0337dde0.js +1 -0
  71. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-2ce76b506ba8404a.js +1 -0
  72. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-54ea39f203182c53.js → [id]-2fc14bda8d314449.js} +1 -1
  73. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-3219ddeb37d46398.js +1 -0
  74. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-8e17802ab6b2d3fd.js +1 -0
  75. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-9d71495b42f34038.js +1 -0
  76. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-a36cf070c98a6cbd.js +1 -0
  77. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-7986cf3b36456353.js +1 -0
  78. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-f6d6e3d9d556387c.js +1 -0
  79. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-e6c477f2ac098e0b.js +1 -0
  80. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-255655d6c367faad.js +1 -0
  81. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-c01d24583e9485f0.js +1 -0
  82. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-0b47ff26897c1d9a.js → test-datasets-d5f777510ab8dfd2.js} +1 -1
  83. fides/ui-build/static/admin/_next/static/chunks/pages/{systems-820893393f1516ee.js → systems-e9a111ef0c32161e.js} +1 -1
  84. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-517419b35435604a.js +1 -0
  85. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-d527d1d1635541df.js → [id]-32ec340d4b390d07.js} +1 -1
  86. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-facb8c0128a44cb1.js → user-management-c8ca51efbeccf39b.js} +1 -1
  87. fides/ui-build/static/admin/_next/static/chunks/webpack-01277b766c8eb076.js +1 -0
  88. fides/ui-build/static/admin/_next/static/css/72caf4a266697967.css +1 -0
  89. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  90. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  91. fides/ui-build/static/admin/add-systems.html +1 -1
  92. fides/ui-build/static/admin/ant-poc.html +1 -1
  93. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  94. fides/ui-build/static/admin/consent/configure.html +1 -1
  95. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  96. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  97. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  98. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  99. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  100. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  101. fides/ui-build/static/admin/consent/properties.html +1 -1
  102. fides/ui-build/static/admin/consent/reporting.html +1 -1
  103. fides/ui-build/static/admin/consent.html +1 -1
  104. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  105. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  106. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  107. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  108. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  109. fides/ui-build/static/admin/data-catalog.html +1 -1
  110. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  111. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  112. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  113. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  114. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  115. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  116. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  117. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  118. fides/ui-build/static/admin/datamap.html +1 -1
  119. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  120. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  121. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  122. fides/ui-build/static/admin/dataset/new.html +1 -1
  123. fides/ui-build/static/admin/dataset.html +1 -1
  124. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  125. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  126. fides/ui-build/static/admin/datastore-connection.html +1 -1
  127. fides/ui-build/static/admin/index.html +1 -1
  128. fides/ui-build/static/admin/integrations/[id].html +1 -1
  129. fides/ui-build/static/admin/integrations.html +1 -1
  130. fides/ui-build/static/admin/login/[provider].html +1 -1
  131. fides/ui-build/static/admin/login.html +1 -1
  132. fides/ui-build/static/admin/messaging/[id].html +1 -1
  133. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  134. fides/ui-build/static/admin/messaging.html +1 -1
  135. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  136. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  137. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  138. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  139. fides/ui-build/static/admin/privacy-requests.html +1 -1
  140. fides/ui-build/static/admin/properties/[id].html +1 -1
  141. fides/ui-build/static/admin/properties/add-property.html +1 -1
  142. fides/ui-build/static/admin/properties.html +1 -1
  143. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  144. fides/ui-build/static/admin/settings/about.html +1 -1
  145. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -0
  146. fides/ui-build/static/admin/settings/consent.html +1 -1
  147. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  148. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  149. fides/ui-build/static/admin/settings/domains.html +1 -1
  150. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  151. fides/ui-build/static/admin/settings/locations.html +1 -1
  152. fides/ui-build/static/admin/settings/organization.html +1 -1
  153. fides/ui-build/static/admin/settings/regulations.html +1 -1
  154. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  155. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  156. fides/ui-build/static/admin/systems.html +1 -1
  157. fides/ui-build/static/admin/taxonomy.html +1 -1
  158. fides/ui-build/static/admin/user-management/new.html +1 -1
  159. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  160. fides/ui-build/static/admin/user-management.html +1 -1
  161. fides/ui-build/static/admin/_next/static/chunks/1376-92890c17ce39ca0d.js +0 -1
  162. fides/ui-build/static/admin/_next/static/chunks/146-d1820217dc36d46d.js +0 -1
  163. fides/ui-build/static/admin/_next/static/chunks/3244-3d94bf3393366412.js +0 -1
  164. fides/ui-build/static/admin/_next/static/chunks/401-50974f107c2712fc.js +0 -1
  165. fides/ui-build/static/admin/_next/static/chunks/4060-52fd85fb1e15a2b8.js +0 -1
  166. fides/ui-build/static/admin/_next/static/chunks/4481-288d74a33473cff7.js +0 -1
  167. fides/ui-build/static/admin/_next/static/chunks/5973-2db5181149073311.js +0 -1
  168. fides/ui-build/static/admin/_next/static/chunks/6853-ca5dacd25c9ccb7c.js +0 -1
  169. fides/ui-build/static/admin/_next/static/chunks/9572-2b9b10e146130c85.js +0 -1
  170. fides/ui-build/static/admin/_next/static/chunks/9767-bf415d0daea960cd.js +0 -1
  171. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a6926f7ec7ad10cf.js +0 -1
  172. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-7eeeee3769e73f78.js +0 -1
  173. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-7a1976c0d1aca8b6.js +0 -1
  174. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-75989f9732d90793.js +0 -1
  175. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-59d30d48fcae067c.js +0 -1
  176. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-373fb3a596099fc9.js +0 -1
  177. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-d889076067104e56.js +0 -1
  178. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-3355b4803b2916f3.js +0 -1
  179. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-3ac47981f1e2b0aa.js +0 -1
  180. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-fe743440d7eb007b.js +0 -1
  181. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-cdc866af93898716.js +0 -1
  182. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-a7dc8113067dff42.js +0 -1
  183. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-2f03e981234c40ad.js +0 -1
  184. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-5bcc7a6976e01a56.js +0 -1
  185. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-8fccd670220dbf60.js +0 -1
  186. fides/ui-build/static/admin/_next/static/chunks/webpack-03e375f6d6b2c71b.js +0 -1
  187. fides/ui-build/static/admin/_next/static/css/687135955af5b7e1.css +0 -1
  188. fides/ui-build/static/admin/_next/static/rE0VXR2bXlzSJjVNbhHjr/_buildManifest.js +0 -1
  189. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/WHEEL +0 -0
  190. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/entry_points.txt +0 -0
  191. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/licenses/LICENSE +0 -0
  192. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/top_level.txt +0 -0
  193. /fides/ui-build/static/admin/_next/static/{rE0VXR2bXlzSJjVNbhHjr → 4ZsbAUsCLedx18AUPZCUU}/_ssgManifest.js +0 -0
  194. /fides/ui-build/static/admin/_next/static/chunks/{1100-45c0634b4f51d10c.js → 1100-22c375e757f23150.js} +0 -0
  195. /fides/ui-build/static/admin/_next/static/chunks/{3086-d1ba90bc6ac9174b.js → 3086-ffd15c92ea81b3d6.js} +0 -0
  196. /fides/ui-build/static/admin/_next/static/chunks/{5102-626b9ff42e904276.js → 5102-3acf312a8f0d7720.js} +0 -0
  197. /fides/ui-build/static/admin/_next/static/chunks/{5826-1f4f74bf3b5348e4.js → 5826-226c8843e715b6ad.js} +0 -0
  198. /fides/ui-build/static/admin/_next/static/chunks/{6395-4224d6d26d1e8bb7.js → 6395-04041b53946664b1.js} +0 -0
  199. /fides/ui-build/static/admin/_next/static/chunks/{8433-c4c765833ab9cc07.js → 8433-dd6d8dae02275d66.js} +0 -0
  200. /fides/ui-build/static/admin/_next/static/chunks/{8934-ffa2b0509bc7a845.js → 8934-6881185f0c5c0f6d.js} +0 -0
  201. /fides/ui-build/static/admin/_next/static/chunks/{9282-1a48b10b114d01f4.js → 9282-23b38e03f897722f.js} +0 -0
  202. /fides/ui-build/static/admin/_next/static/chunks/{9327-4970d356f7000c0b.js → 9327-fb7ef941b5176077.js} +0 -0
  203. /fides/ui-build/static/admin/_next/static/chunks/pages/{404-29560aa2e6a60963.js → 404-a3c57a06ff67cf1f.js} +0 -0
  204. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-58e9256e86916ecd.js → manual-c4c0c42bbe0f5548.js} +0 -0
  205. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-2392e3a101fae073.js → multiple-93907c53f342831f.js} +0 -0
  206. /fides/ui-build/static/admin/_next/static/chunks/pages/{ant-poc-404f3c9018952800.js → ant-poc-8fcf312148606e7e.js} +0 -0
  207. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-7dfe37b9f0ff9a3c.js → add-vendors-5e83ee7792c0f75f.js} +0 -0
  208. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-dba7848b760ba227.js → configure-ea7b2c628260c84c.js} +0 -0
  209. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-f67fda6a71d0a46b.js → properties-893753088b9729a3.js} +0 -0
  210. /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-75395dfc224cf44b.js → consent-7e5adfec9134a268.js} +0 -0
  211. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-fa65c67ec8c4b5e6.js → [projectUrn]-4b2c10ff79e46e50.js} +0 -0
  212. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-e76a07ee6ee8d55f.js → projects-05bbb01e37766b80.js} +0 -0
  213. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-38476c697da53480.js → action-center-cf48ed7dc04c3af2.js} +0 -0
  214. /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-423172d31de8e9c6.js → datamap-6c63a6295668ed4e.js} +0 -0
  215. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-704553f5329fb9d4.js → [...subfieldNames]-7a99a6c5c2fc2abe.js} +0 -0
  216. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-06c19dca941edb14.js → [collectionName]-39aab1de4df0660d.js} +0 -0
  217. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-eac517f43d5f53a8.js → [datasetId]-2cf04998a7521a7d.js} +0 -0
  218. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-66f5fbadd8455805.js → [id]-8950b4aff799099c.js} +0 -0
  219. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-d441abb1f045940f.js → add-template-4cad85d5b6d52734.js} +0 -0
  220. /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-eef56c95b08aa24c.js → messaging-57c7aa44af163623.js} +0 -0
  221. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-b8c94b10ab90b061.js → configure-d8d23d06ce1d9dae.js} +0 -0
  222. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-f4fb941df069b7bf.js → [id]-6cca2c8ebbff78aa.js} +0 -0
  223. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-bccb6ffab25aa214.js → add-property-f09f98007725fa51.js} +0 -0
  224. /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-9a7ac623370b7c00.js → properties-9034bab3d7200d9b.js} +0 -0
  225. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-4412a7b468b6d4bf.js → about-92dada8329e89092.js} +0 -0
  226. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-d9088f5cd9fb2822.js → domain-records-368a4183139ea5e0.js} +0 -0
  227. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-cf09ad896c7396a6.js → email-templates-e4498b6310074705.js} +0 -0
  228. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-759564ca0ae62840.js → locations-18f56b6b76abb71d.js} +0 -0
  229. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-2dce4501fca920b3.js → regulations-0350314337abff11.js} +0 -0
  230. /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-dd053a3bf2a9ca6c.js → [id]-022910a52efbad76.js} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2479],{11611:function(e){e.exports=function(e){var i=typeof e;return null!=e&&("object"==i||"function"==i)}},55193:function(e,i,t){var r=t(99736),a=t(92360);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},1039:function(e,i,t){"use strict";t.d(i,{Z:function(){return C}});var r=t(24246),a=t(59003),s=t(92222),n=t(77181),o=t(86677),l=t(27378),c=t(14481),d=t(45896),u=t(70675),g=t(72625),h=t(54409),m=t(79947),L=t(87667),x=t(50169),v=t(28278),f=t(62656),p=t(74241),j=e=>{let{resourceType:i,changeTypeOverride:t}=e,a=(0,s.Cl)(),n=[];return i?i===f.D$.SCHEMA?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Name",...e}),size:300}),a.accessor(e=>e.urn,{id:"project",cell:e=>(0,r.jsx)(c.G3,{value:(0,p.Z)(e.getValue())}),header:e=>(0,r.jsx)(c.Rr,{value:"Project",...e})}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.system,{id:"system",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"System",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{ignoreChildActions:t===v.E.MONITORED||t===v.E.MUTED,resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:i===f.D$.TABLE?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Table name",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,r.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:i===f.D$.FIELD?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Field name",...e}),size:300}),a.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,r.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Data type",...e})}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,r.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:{columns:n}:{columns:n}},_=e=>{let{initialFilterTabIndex:i=0}=e,[t,r]=(0,l.useState)(i),a=(0,l.useMemo)(()=>[{label:"Action Required",filters:[f.LL.ADDITION,f.LL.REMOVAL],childFilters:[f.LL.ADDITION,f.LL.REMOVAL]},{label:"Monitored",filters:[f.LL.MONITORED],childFilters:[],changeTypeOverride:v.E.MONITORED},{label:"Unmonitored",filters:[f.LL.MUTED],childFilters:[],changeTypeOverride:v.E.MUTED}],[]);return{filterTabs:a,filterTabIndex:t,setFilterTabIndex:r,activeDiffFilters:a[t].filters,activeChildDiffFilters:a[t].childFilters,activeChangeTypeOverride:a[t].changeTypeOverride}},y=t(47182),D=t(38347),b=t(7940),T=t(80285),w=t(36168),R=t(57454);let H={items:[],total:0,page:1,size:50,pages:1},M=()=>(0,r.jsx)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,r.jsxs)(n.gCW,{children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,r.jsx)(n.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var C=e=>{var i,t;let{resourceUrn:g}=e,h=(0,o.useRouter)(),[m,L]=(0,l.useState)(""),{filterTabs:x,setFilterTabIndex:v,filterTabIndex:p,activeDiffFilters:C,activeChildDiffFilters:Z,activeChangeTypeOverride:E}=_({initialFilterTabIndex:(null===(i=h.query)||void 0===i?void 0:i.filterTabIndex)?Number(null===(t=h.query)||void 0===t?void 0:t.filterTabIndex):void 0}),{PAGE_SIZES:I,pageSize:O,setPageSize:F,onPreviousPageClick:k,isPreviousPageDisabled:A,onNextPageClick:V,isNextPageDisabled:N,startRange:S,endRange:$,pageIndex:z,setTotalPages:G,resetPageIndexToDefault:P}=(0,c.oi)();(0,l.useEffect)(()=>{P()},[g,m,P,C,Z]);let{isFetching:U,isLoading:B,data:W}=(0,u.z8)({staged_resource_urn:g,page:z,size:O,child_diff_status:Z,diff_status:C,search:m}),q=(0,b.G)(null==W?void 0:W.items[0]),{columns:Q}=j({resourceType:q,changeTypeOverride:E}),{items:K,total:Y,pages:J}=(0,l.useMemo)(()=>null!=W?W:H,[W]);(0,l.useEffect)(()=>{G(J)},[J,G]);let X=(0,l.useMemo)(()=>Q,[Q]),{navigateToDetectionResults:ee}=(0,y.Z)(),ei=(0,a.b7)({getCoreRowModel:(0,s.sC)(),getGroupedRowModel:(0,s.qe)(),getExpandedRowModel:(0,s.rV)(),getRowId:T.Z,columns:X,manualPagination:!0,data:K,columnResizeMode:"onChange"});return B?(0,r.jsx)(c.I4,{rowHeight:36,numRows:36}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{filterTabs:x,filterTabIndex:p,onChange:v}),(0,r.jsx)(c.Q$,{children:(0,r.jsx)(n.kCb,{direction:"row",alignItems:"center",justifyContent:"space-between",width:"full",children:(0,r.jsxs)(n.kCb,{gap:6,align:"center",children:[(0,r.jsx)(n.xuv,{flexShrink:0,children:(0,r.jsx)(R.M,{value:m,onChange:L})}),(0,r.jsx)(D.Z,{})]})})}),(0,r.jsx)(c.ZK,{tableInstance:ei,onRowClick:e=>ee({resourceUrn:e.urn,filterTabIndex:p}),getRowIsClickable:e=>q!==f.D$.FIELD||(0,w.Z)(e),emptyTableNotice:(0,r.jsx)(M,{})}),(0,r.jsx)(c.s8,{totalRows:Y||0,pageSizes:I,setPageSize:F,onPreviousPageClick:k,isPreviousPageDisabled:A||U,onNextPageClick:V,isNextPageDisabled:N||U,startRange:S,endRange:$})]})}},54409:function(e,i,t){"use strict";t.d(i,{Z:function(){return m}});var r=t(24246),a=t(77181),s=t(812),n=t(14047),o=t(62656),l=t(31883);let c=(0,a.IUT)({displayName:"MonitorOffIcon",viewBox:"0 0 12 12",path:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.47125 1H5.85H6.15H6.51188L6.58875 1.36914L7.52062 5.83268L6.42408 4.98635L6.03375 3.11719L5.8038 4.50761L4.99323 3.882L5.40562 1.38867L5.47125 1ZM4.80795 5.0022L4.67675 5.79545L5.48735 6.42109L5.61854 5.62783L4.80795 5.0022ZM6.73856 6.49227L6.96125 7.55866L8.42407 8.6877L8.69498 8.00228L7.94864 7.42624L7.88625 7.58398L7.83501 7.33853L6.73856 6.49227ZM8.33138 6.45844L9.07755 7.03434L9.30188 6.4668H11.55H12V5.5293H11.55H9H8.69812L8.58375 5.82031L8.33138 6.45844ZM7.27551 9.06443L7.35399 9.125H7.28813L7.27551 9.06443ZM4.49147 6.91566L5.30209 7.54131L4.79437 10.6113L4.72875 11H4.35H4.05H3.69563L3.61313 10.6406L2.64563 6.46875H0.45H0V5.53125H0.45H2.69777L3.49646 6.1477L4.15125 8.97266L4.49147 6.91566Z",fill:"currentColor"}),(0,r.jsx)("g",{"clip-path":"url(#clip0_341_3102)",children:(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.6755 10.4168L0.164222 2.304L0.775218 1.51237L11.2865 9.62517L10.6755 10.4168Z",fill:"currentColor"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_341_3102",children:(0,r.jsx)("rect",{width:"11.5",height:"9",fill:"white",transform:"translate(0 1.5)"})})})]})}),d=(0,a.IUT)({displayName:"MonitorOnIcon",viewBox:"0 0 12 10",path:(0,r.jsx)("path",{d:"M5.47125 0H5.85H6.15H6.51188L6.58875 0.369141L7.88625 6.58398L8.58375 4.82031L8.69812 4.5293H9H11.55H12V5.4668H11.55H9.30188L8.36625 7.83398L8.25188 8.125H7.95H7.65H7.28813L7.21125 7.75586L6.03375 2.11719L4.79437 9.61133L4.72875 10H4.35H4.05H3.69563L3.61313 9.64062L2.64563 5.46875H0.45H0V4.53125H0.45H3H3.35438L3.43688 4.89062L4.15125 7.97266L5.40562 0.388672L5.47125 0Z",fill:"currentColor"})});var u=t(79494),g=t(70675),h=t(7940),m=e=>{let{resource:i,ignoreChildActions:t=!1}=e,m=(0,h.G)(i),[L,{isLoading:x}]=(0,g.v8)(),[v,{isLoading:f}]=(0,g.vi)(),[p,{isLoading:j}]=(0,g.Tl)(),{successAlert:_,errorAlert:y}=(0,n.V)(),D=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id});(0,l.D4)(e)?y((0,s.e$)(e.error,"Failed to confirm resource")):_("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(i.name||"The resource"," is now being monitored."))},b=async()=>{let e=await p({staged_resource_urn:i.urn});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to un-mute resource"):_("".concat(i.name||"The resource"," has been un-muted and is now being monitored."))},T=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to un-mute resource"):_("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(i.name||"The resource"," is now being monitored."))},w=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to confirm resource"):_('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},R=async()=>{let e=await v({staged_resource_urn:i.urn});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to mute resource"):_("Ignored data will not be monitored for changes or added to Fides datasets.","".concat(i.name||"Resource"," ignored"))},H=x||f||j,{diff_status:M,child_diff_statuses:C}=i,Z=m===o.D$.SCHEMA,E=m===o.D$.FIELD,I=Z&&void 0===M||!E&&M===o.LL.ADDITION,O=M!==o.LL.MUTED,F=M===o.LL.MUTED&&!E,k=M===o.LL.MUTED&&E,A=C&&(C[o.LL.ADDITION]||C[o.LL.REMOVAL]),V=M===o.LL.MONITORED&&!t&&A;return(0,r.jsxs)(a.Ugi,{children:[I&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:D,disabled:H,loading:x}),k&&(0,r.jsx)(u.Z,{title:"Un-Mute",icon:(0,r.jsx)(d,{}),onClick:b,disabled:H,loading:x}),F&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:T,disabled:H,loading:x}),V&&(0,r.jsx)(u.Z,{title:"Confirm",icon:(0,r.jsx)(a.nQG,{}),onClick:w,disabled:H,loading:x}),O&&(0,r.jsx)(u.Z,{title:"Ignore",icon:(0,r.jsx)(c,{}),onClick:R,disabled:H,loading:f})]})}},7940:function(e,i,t){"use strict";t.d(i,{G:function(){return a}});var r=t(62656);let a=e=>{var i,t,a;return e?e.resource_type?e.resource_type:(null===(i=e.schemas)||void 0===i?void 0:i.length)?r.D$.DATABASE:(null===(t=e.tables)||void 0===t?void 0:t.length)?r.D$.SCHEMA:(null===(a=e.fields)||void 0===a?void 0:a.length)?r.D$.TABLE:r.D$.FIELD:void 0}},98559:function(e,i){"use strict";i.Z=e=>{let{name:i,urn:t,monitor_config_id:r,database_name:a,schema_name:s,table_name:n,top_level_field_name:o,top_level_field_urn:l}=e;if(!o)return i;let c=t.split(".");return l?t.replace("".concat(l).concat("."),""):([r,a,s,n,o].forEach(e=>{if(e){let i=c.indexOf(e);i>-1&&c.splice(i,1)}}),c.join("."))}},36168:function(e,i){"use strict";i.Z=e=>{var i;return!!e.parent_table_urn&&null!==(i=e.sub_field_urns)&&void 0!==i&&!!i.length&&!e.top_level_field_name}},80356:function(e,i,t){"use strict";var r=t(7940),a=t(36168),s=t(62656);i.Z=e=>(0,r.G)(e)!==s.D$.FIELD||(0,a.Z)(e)},31883:function(e,i,t){"use strict";t.d(i,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=t(19043)}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2479],{11611:function(e){e.exports=function(e){var i=typeof e;return null!=e&&("object"==i||"function"==i)}},55193:function(e,i,t){var r=t(99736),a=t(92360);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},1039:function(e,i,t){"use strict";t.d(i,{Z:function(){return C}});var r=t(24246),a=t(59003),s=t(92222),n=t(77181),o=t(86677),l=t(27378),c=t(14481),d=t(45896),u=t(70675),g=t(72625),h=t(54409),m=t(79947),L=t(87667),x=t(50169),v=t(28278),f=t(16643),p=t(74241),j=e=>{let{resourceType:i,changeTypeOverride:t}=e,a=(0,s.Cl)(),n=[];return i?i===f.D$.SCHEMA?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Name",...e}),size:300}),a.accessor(e=>e.urn,{id:"project",cell:e=>(0,r.jsx)(c.G3,{value:(0,p.Z)(e.getValue())}),header:e=>(0,r.jsx)(c.Rr,{value:"Project",...e})}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.system,{id:"system",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"System",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{ignoreChildActions:t===v.E.MONITORED||t===v.E.MUTED,resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:i===f.D$.TABLE?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Table name",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,r.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:i===f.D$.FIELD?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(L.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Field name",...e}),size:300}),a.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,r.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Data type",...e})}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,r.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,r.jsx)(x.Z,{changeTypeOverride:t,result:e.row.original}),header:e=>(0,r.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,r.jsx)(h.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:{columns:n}:{columns:n}},_=e=>{let{initialFilterTabIndex:i=0}=e,[t,r]=(0,l.useState)(i),a=(0,l.useMemo)(()=>[{label:"Action Required",filters:[f.LL.ADDITION,f.LL.REMOVAL],childFilters:[f.LL.ADDITION,f.LL.REMOVAL]},{label:"Monitored",filters:[f.LL.MONITORED],childFilters:[],changeTypeOverride:v.E.MONITORED},{label:"Unmonitored",filters:[f.LL.MUTED],childFilters:[],changeTypeOverride:v.E.MUTED}],[]);return{filterTabs:a,filterTabIndex:t,setFilterTabIndex:r,activeDiffFilters:a[t].filters,activeChildDiffFilters:a[t].childFilters,activeChangeTypeOverride:a[t].changeTypeOverride}},y=t(47182),D=t(38347),b=t(7940),T=t(80285),w=t(36168),R=t(57454);let H={items:[],total:0,page:1,size:50,pages:1},M=()=>(0,r.jsx)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,r.jsxs)(n.gCW,{children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,r.jsx)(n.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var C=e=>{var i,t;let{resourceUrn:g}=e,h=(0,o.useRouter)(),[m,L]=(0,l.useState)(""),{filterTabs:x,setFilterTabIndex:v,filterTabIndex:p,activeDiffFilters:C,activeChildDiffFilters:Z,activeChangeTypeOverride:E}=_({initialFilterTabIndex:(null===(i=h.query)||void 0===i?void 0:i.filterTabIndex)?Number(null===(t=h.query)||void 0===t?void 0:t.filterTabIndex):void 0}),{PAGE_SIZES:I,pageSize:O,setPageSize:F,onPreviousPageClick:k,isPreviousPageDisabled:A,onNextPageClick:V,isNextPageDisabled:N,startRange:S,endRange:$,pageIndex:z,setTotalPages:G,resetPageIndexToDefault:P}=(0,c.oi)();(0,l.useEffect)(()=>{P()},[g,m,P,C,Z]);let{isFetching:U,isLoading:B,data:W}=(0,u.z8)({staged_resource_urn:g,page:z,size:O,child_diff_status:Z,diff_status:C,search:m}),q=(0,b.G)(null==W?void 0:W.items[0]),{columns:Q}=j({resourceType:q,changeTypeOverride:E}),{items:K,total:Y,pages:J}=(0,l.useMemo)(()=>null!=W?W:H,[W]);(0,l.useEffect)(()=>{G(J)},[J,G]);let X=(0,l.useMemo)(()=>Q,[Q]),{navigateToDetectionResults:ee}=(0,y.Z)(),ei=(0,a.b7)({getCoreRowModel:(0,s.sC)(),getGroupedRowModel:(0,s.qe)(),getExpandedRowModel:(0,s.rV)(),getRowId:T.Z,columns:X,manualPagination:!0,data:K,columnResizeMode:"onChange"});return B?(0,r.jsx)(c.I4,{rowHeight:36,numRows:36}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{filterTabs:x,filterTabIndex:p,onChange:v}),(0,r.jsx)(c.Q$,{children:(0,r.jsx)(n.kCb,{direction:"row",alignItems:"center",justifyContent:"space-between",width:"full",children:(0,r.jsxs)(n.kCb,{gap:6,align:"center",children:[(0,r.jsx)(n.xuv,{flexShrink:0,children:(0,r.jsx)(R.M,{value:m,onChange:L})}),(0,r.jsx)(D.Z,{})]})})}),(0,r.jsx)(c.ZK,{tableInstance:ei,onRowClick:e=>ee({resourceUrn:e.urn,filterTabIndex:p}),getRowIsClickable:e=>q!==f.D$.FIELD||(0,w.Z)(e),emptyTableNotice:(0,r.jsx)(M,{})}),(0,r.jsx)(c.s8,{totalRows:Y||0,pageSizes:I,setPageSize:F,onPreviousPageClick:k,isPreviousPageDisabled:A||U,onNextPageClick:V,isNextPageDisabled:N||U,startRange:S,endRange:$})]})}},54409:function(e,i,t){"use strict";t.d(i,{Z:function(){return m}});var r=t(24246),a=t(77181),s=t(812),n=t(14047),o=t(16643),l=t(31883);let c=(0,a.IUT)({displayName:"MonitorOffIcon",viewBox:"0 0 12 12",path:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.47125 1H5.85H6.15H6.51188L6.58875 1.36914L7.52062 5.83268L6.42408 4.98635L6.03375 3.11719L5.8038 4.50761L4.99323 3.882L5.40562 1.38867L5.47125 1ZM4.80795 5.0022L4.67675 5.79545L5.48735 6.42109L5.61854 5.62783L4.80795 5.0022ZM6.73856 6.49227L6.96125 7.55866L8.42407 8.6877L8.69498 8.00228L7.94864 7.42624L7.88625 7.58398L7.83501 7.33853L6.73856 6.49227ZM8.33138 6.45844L9.07755 7.03434L9.30188 6.4668H11.55H12V5.5293H11.55H9H8.69812L8.58375 5.82031L8.33138 6.45844ZM7.27551 9.06443L7.35399 9.125H7.28813L7.27551 9.06443ZM4.49147 6.91566L5.30209 7.54131L4.79437 10.6113L4.72875 11H4.35H4.05H3.69563L3.61313 10.6406L2.64563 6.46875H0.45H0V5.53125H0.45H2.69777L3.49646 6.1477L4.15125 8.97266L4.49147 6.91566Z",fill:"currentColor"}),(0,r.jsx)("g",{"clip-path":"url(#clip0_341_3102)",children:(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.6755 10.4168L0.164222 2.304L0.775218 1.51237L11.2865 9.62517L10.6755 10.4168Z",fill:"currentColor"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_341_3102",children:(0,r.jsx)("rect",{width:"11.5",height:"9",fill:"white",transform:"translate(0 1.5)"})})})]})}),d=(0,a.IUT)({displayName:"MonitorOnIcon",viewBox:"0 0 12 10",path:(0,r.jsx)("path",{d:"M5.47125 0H5.85H6.15H6.51188L6.58875 0.369141L7.88625 6.58398L8.58375 4.82031L8.69812 4.5293H9H11.55H12V5.4668H11.55H9.30188L8.36625 7.83398L8.25188 8.125H7.95H7.65H7.28813L7.21125 7.75586L6.03375 2.11719L4.79437 9.61133L4.72875 10H4.35H4.05H3.69563L3.61313 9.64062L2.64563 5.46875H0.45H0V4.53125H0.45H3H3.35438L3.43688 4.89062L4.15125 7.97266L5.40562 0.388672L5.47125 0Z",fill:"currentColor"})});var u=t(79494),g=t(70675),h=t(7940),m=e=>{let{resource:i,ignoreChildActions:t=!1}=e,m=(0,h.G)(i),[L,{isLoading:x}]=(0,g.v8)(),[v,{isLoading:f}]=(0,g.vi)(),[p,{isLoading:j}]=(0,g.Tl)(),{successAlert:_,errorAlert:y}=(0,n.V)(),D=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id});(0,l.D4)(e)?y((0,s.e$)(e.error,"Failed to confirm resource")):_("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(i.name||"The resource"," is now being monitored."))},b=async()=>{let e=await p({staged_resource_urn:i.urn});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to un-mute resource"):_("".concat(i.name||"The resource"," has been un-muted and is now being monitored."))},T=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to un-mute resource"):_("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(i.name||"The resource"," is now being monitored."))},w=async()=>{let e=await L({staged_resource_urn:i.urn,monitor_config_id:i.monitor_config_id});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to confirm resource"):_('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},R=async()=>{let e=await v({staged_resource_urn:i.urn});(0,l.D4)(e)?y((0,s.e$)(e.error),"Failed to mute resource"):_("Ignored data will not be monitored for changes or added to Fides datasets.","".concat(i.name||"Resource"," ignored"))},H=x||f||j,{diff_status:M,child_diff_statuses:C}=i,Z=m===o.D$.SCHEMA,E=m===o.D$.FIELD,I=Z&&void 0===M||!E&&M===o.LL.ADDITION,O=M!==o.LL.MUTED,F=M===o.LL.MUTED&&!E,k=M===o.LL.MUTED&&E,A=C&&(C[o.LL.ADDITION]||C[o.LL.REMOVAL]),V=M===o.LL.MONITORED&&!t&&A;return(0,r.jsxs)(a.Ugi,{children:[I&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:D,disabled:H,loading:x}),k&&(0,r.jsx)(u.Z,{title:"Un-Mute",icon:(0,r.jsx)(d,{}),onClick:b,disabled:H,loading:x}),F&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:T,disabled:H,loading:x}),V&&(0,r.jsx)(u.Z,{title:"Confirm",icon:(0,r.jsx)(a.nQG,{}),onClick:w,disabled:H,loading:x}),O&&(0,r.jsx)(u.Z,{title:"Ignore",icon:(0,r.jsx)(c,{}),onClick:R,disabled:H,loading:f})]})}},7940:function(e,i,t){"use strict";t.d(i,{G:function(){return a}});var r=t(16643);let a=e=>{var i,t,a;return e?e.resource_type?e.resource_type:(null===(i=e.schemas)||void 0===i?void 0:i.length)?r.D$.DATABASE:(null===(t=e.tables)||void 0===t?void 0:t.length)?r.D$.SCHEMA:(null===(a=e.fields)||void 0===a?void 0:a.length)?r.D$.TABLE:r.D$.FIELD:void 0}},98559:function(e,i){"use strict";i.Z=e=>{let{name:i,urn:t,monitor_config_id:r,database_name:a,schema_name:s,table_name:n,top_level_field_name:o,top_level_field_urn:l}=e;if(!o)return i;let c=t.split(".");return l?t.replace("".concat(l).concat("."),""):([r,a,s,n,o].forEach(e=>{if(e){let i=c.indexOf(e);i>-1&&c.splice(i,1)}}),c.join("."))}},36168:function(e,i){"use strict";i.Z=e=>{var i;return!!e.parent_table_urn&&null!==(i=e.sub_field_urns)&&void 0!==i&&!!i.length&&!e.top_level_field_name}},80356:function(e,i,t){"use strict";var r=t(7940),a=t(36168),s=t(16643);i.Z=e=>(0,r.G)(e)!==s.D$.FIELD||(0,a.Z)(e)},31883:function(e,i,t){"use strict";t.d(i,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=t(19043)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3244],{77867:function(e,s,t){var a=t(24246),i=t(77181);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(77181).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(77181),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)(),h=(0,l.useRouter)(),m="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(p.flags.privacyRequestsConfiguration&&m),{data:g}=(0,d.JE)(void 0,{skip:x}),{data:y}=(0,d.PW)(void 0,{skip:x}),f=p.flags.privacyRequestsConfiguration&&(!g||!y)&&m;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(77181);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})}},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(77181);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(77181),n=t(27378),r=t(45277),l=t(16125),o=t(812),d=t(46628),c=t(20682),u=t(54427),p=t(52253),h=t(78780);let{reducer:m}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:x}=h.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)(),[h,m]=(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}m(e[0])}}),[v,{isLoading:b}]=x(),{refetch:j}=(0,c.$I)({search:""},{skip:!1}),k=async()=>{if(h)try{var e;await v(h).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{m(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()}),h?(0,a.jsx)(i.xvT,{children:h.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:b,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!h||b,onClick:k,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},3765:function(e,s,t){var a=t(77181),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(77181);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(77181);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)(),[h,m]=(0,n.XX)(),x=async()=>{await h({key:s,name:r,disabled:!t,access:l,connection_type:o}),p()},g=()=>{m.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:m.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(77181),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(77181),n=t(34090);s.Z=e=>{let{disabled:s=!1,displayHelpIcon:t=!0,helpIconVisibility:r=!1,isRequired:l=!1,label:o,placeholder:d,type:c="text",...u}=e,{id:p,autoFocus:h}=u,[m,x]=(0,n.U$)(u);return(0,a.jsxs)(i.NIc,{display:"flex",isRequired:l,isInvalid:!!(x.error&&x.touched),children:[o&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:p,minWidth:"150px",children:o}),(0,a.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===c&&(0,a.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,a.jsx)(i.zuI,{...m,autoComplete:"off",autoFocus:h}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]}),"text"===c&&(0,a.jsx)(i.IIB,{...m,autoComplete:"off",autoFocus:h,color:"gray.700",isDisabled:s,placeholder:d,size:"sm"}),"textarea"===c&&(0,a.jsx)(i.gxH,{...m,autoComplete:"off",autoFocus:h,color:"gray.700",placeholder:d,resize:"none",size:"sm",value:m.value||""}),(0,a.jsx)(i.J1D,{children:x.error})]}),t&&(0,a.jsx)(i.kCb,{alignContent:"center",h:"32px",visibility:r?"visible":"hidden",children:(0,a.jsx)(i.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})]})}},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:h}=(0,r.LH)({onlyUnlinkedDatasets:!0}),m=(0,n.useMemo)(()=>{var e;return null!==(e=null==h?void 0:h.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[h]),{errorAlert:x,successAlert:g}=(0,a.V)();return{dropdownOptions:[...p,...m],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(77181),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}))}}},84450:function(e,s,t){t.d(s,{Z:function(){return sY}});var a,i,n=t(24246),r=t(84720),l=t(77181),o=t(79894),d=t.n(o),c=t(86677),u=t.n(c),p=t(27378),h=t(16134),m=t(25980),x=t(45938),g=t(16220),y=t(77830),f=t(46628),_=t(26089),v=t(19904),b=t(16394),j=t(20682),k=t(41337);let w=e=>{let{connectionConfig:s}=e,t=(0,h.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,h]=(0,p.useState)(!1),[m,x]=(0,p.useState)(""),g=()=>{h(!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,b.Ds)(f,100),[f]),v=(0,p.useMemo)(()=>[...r].filter(e=>e[0].toLowerCase().includes(m.toLowerCase())),[r,m]);return(0,n.jsxs)(l.v2r,{isLazy:!0,onClose:g,onOpen:()=>{h(!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:v.map(e=>{let[s,t]=e;return(0,n.jsx)(l.ua7,{"aria-label":t.toolTip,hasArrow:!0,label:t.toolTip,placement:"auto-start",openDelay:500,shouldWrapChildren:!0,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,h.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,displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(U.Z,{displayHelpIcon:!1,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:h,onClose:m}=(0,l.qY0)(),{data:x,isFetching:g,isLoading:y,isSuccess:f}=(0,I.QV)(s?s.key:"",{skip:!s}),[_]=(0,I.jF)(),[v]=(0,I._d)(),b=async(e,t)=>{try{o(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await v(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:h,children:"Customize DSR"});return(0,n.jsxs)(n.Fragment,{children:[s?j:(0,n.jsx)(l.ua7,{label:"Save an Integration first to customize the DSR",placement:"top",shouldWrapChildren:!0,children:j}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:m,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:b,onCancel:m}):null]})})]})]})]})},H=t(98784),Y=t.n(H),G=t(73183),$=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)(l.ua7,{"aria-label":"Select datasets to associate with this integration",hasArrow:!0,label:"Select datasets to associate with this integration",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})},J=t(95492),Q=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)(J.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"})]})]})]})]})},X=t(99792);let ee=(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},es=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===X.Z.SAAS&&(t+="_api"),t},et="#/definitions/FidesDatasetReference",ea=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:h,initialDatasets:x,datasetDropdownOptions:g,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[v,{isLoading:b,isFetching:j}]=(0,I.h2)(),{plus:k}=(0,m.hz)(),w=(e,s,t)=>{let a;return(void 0===s||""===s||void 0===s)&&(a="".concat(e," is required")),t===et&&(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)===et)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.ua7,{"aria-label":s.description,hasArrow:!0,label:s.description,placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",visibility:s.description?"visible":"hidden",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}},"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)===et){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 v(h.key))},z=(null==h?void 0:h.disabled)||!1;return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==h?void 0:h.key){var a,i;return e.name=null!==(i=h.name)&&void 0!==i?i:"",e.description=h.description,e.instance_key=h.connection_type===T.Rj.SAAS?null===(a=h.saas_config)||void 0===a?void 0:a.fides_key:h.key,e.enabled_actions=(h.enabled_actions||[]).map(e=>e.toString()),e.secrets=h.secrets?Y().cloneDeep(h.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)===et){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())),ee(e,s)})(),onSubmit:(e,s)=>{r(E(e),s)},validateOnBlur:!1,validateOnChange:!1,children:e=>{var t;let r=!e.dirty&&(null==h?void 0:h.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:[h?(0,n.jsx)(G.Z,{connection_key:null==h?void 0:h.key,disabled:z,connection_type:null==h?void 0:h.connection_type,access_type:null==h?void 0:h.access,name:null!==(t=null==h?void 0:h.name)&&void 0!==t?t:h.key,isSwitch:!0}):null,h?(0,n.jsx)(Q,{onDelete:f,deleteResult:_}):null]}),!!(null==h?void 0:h.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==h?void 0:h.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.ua7,{"aria-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.",hasArrow:!0,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.",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),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.ua7,{"aria-label":"The request types that are supported for this integration.",hasArrow:!0,label:"The request types that are supported for this integration.",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),T.Zi.DATABASE===p.type&&!y&&(0,n.jsx)($,{options:g}),(0,n.jsxs)("div",{className:"flex gap-4",children:[!p.authorization_required||r?(0,n.jsx)(l.wpx,{disabled:!(null==h?void 0:h.key)||a||_.isLoading,loading:b||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:h}):null,(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit",children:"Save"})]})]})})}})},ei=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:es(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()},en=async(e,s,t,a,i)=>{var n;let r=a?a.key:es(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},er=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()},el=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,h.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)(),[v]=(0,L.IB)(),[b]=(0,I.rO)(),[j]=(0,O.Zh)(),[k]=(0,O.qd)(),[w]=(0,L.kg)(),[C,D]=(0,O._w)(),{plus:E}=(0,m.hz)(),q=(0,p.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]),z=(0,h.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 ei(e,s,a,t,E?v:_)).connection;else{let n=await en(e,a,t,i,E?w:k);i||a.type!==T.Zi.DATABASE||(i=n.succeeded[0]),a.type!==T.Zi.MANUAL&&await er(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 ei(e,s,a,t,_)).connection:await er(e,s,t,q,j);let r=await b(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}},eo=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:h}=(0,j.n3)(t.identifier,{skip:c}),{isSubmitting:m,isAuthorizing:x,handleSubmit:g,handleAuthorization:y,datasetDropdownOptions:_,initialDatasets:v,handleDelete:b,deleteDatastoreConnectionResult:k}=el({secretsSchema:h,systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i});return h||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)(ea,{secretsSchema:h,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:m,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:v,isCreatingConnectionConfig:!a,onDelete:b,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 ed=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:m}]=(0,D.qd)(),x=(0,h.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)(),_=()=>{m||(o&&d(null),r())},v=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 en(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:v,loading:m,disabled:!o||m,className:"w-1/2",children:"Link integration"})]})]})]})]})},ec=t(44553),eu=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:a,selectedValue:i,setSelectedValue:r}=w({connectionConfig:s}),o=(0,h.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 m=(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)(ed,{connectionConfigs:c,systemFidesKey:t}):null,(0,n.jsx)(v.ZP,{scopes:[T.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,n.jsx)(l.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:m.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,n.jsx)(ec.Z,{isOpen:m.isOpen,onClose:m.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)(eo,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:r,systemFidesKey:t}):null]})},ep=t(71922),eh=t(31883);let em=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"})]})},ex=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,h.C)(ep.Zp),u=(0,h.C)(ep.G1),{data:m,isLoading:x}=(0,ep.J6)({page:c,size:u}),[g,y]=(0,p.useState)(),[_,v]=(0,p.useState)([]),b=(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==m?void 0:m.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)(()=>{m&&v(m.items.map(e=>({label:e.name,value:e.id})))},[m]),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||!m)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:b||{},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)(em,{item:e,options:_,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,n.jsx)(em,{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 eg=t(57865),ey=t(3124),ef=t.n(ey),e_=(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 eb=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"})}},ej=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,ek=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=ej(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}},ew=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}=ek(t.custom_fields,a.custom_fields):{addedFields:r,removedFields:l,changedFields:o}=ek(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:h,formattedDate:m}=eb(i);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:s})," ",u," on ",m," at ",h]})},eC=(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}},eS=(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)}}},eD=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}}},eT=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}}},eA=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}]}}},eI=(0,p.createContext)(null),eE=()=>(0,p.useContext)(eI);var eq=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,p.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,n.jsx)(eI.Provider,{value:i,children:s})},eR=t(62165),ez=t(30320),eF=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eE(),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})]})})},eL=t(40324),eO=t(91613),eW=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eE(),[d]=(0,W.U$)(i.name),c={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,p.useRef)(null),[h,m]=(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&&m(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)(eL.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),a?(0,n.jsx)(eO.Z,{label:a}):null]}),(0,n.jsx)(l.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(h,"px")},children:(h?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}=eE(),[d]=(0,W.U$)(i),c={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,p.useRef)(null),[h,m]=(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,m(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)(eL.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),a?(0,n.jsx)(eO.Z,{label:a}):null]}),(0,n.jsx)(l.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(h,"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,ez.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)(eF,{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}=eE(),[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 h={};return c&&(h="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:h,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)(eL.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),t?(0,n.jsx)(eO.Z,{label:t}):null]}),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,eR.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)(eF,{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)(eF,{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)(eF,{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)(eF,{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)(eF,{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)(eF,{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)(eF,{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)(eF,{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)(eF,{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)(eF,{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:ef().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)(eq,{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)(eq,{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,h.C)(L.o),{data:m=[]}=(0,O.K3)(),x=(null==i?void 0:i.items)||[],g=e=>{c(e=eA(e=eT(e=eC(e=eS(e=eD(e),u),m)))),o(!0)},{formattedTime:y,formattedDate:f}=eb(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:ef().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,n.jsx)(l.p3B,{children:x.map((e,s)=>{let t=ew(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)(e_,{})})]}),(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,h.C)(eg.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),e4=t(30234);let e2=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")}),e3={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}},e7=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,values:r,includeCustomFields:o,privacyDeclarationId:d,lockedForGVL:c}=e,u=!!d,{legalBasisOptions:h}=(0,e0.Z)(),{specialCategoryLegalBasisOptions:m}=(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)(e4.Z,{heading:"Data use declaration",children:[(0,n.jsx)(eL.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:h,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)(eL.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)(eL.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)(eL.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)(e4.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)(e4.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)(e4.Z,{heading:"Special category data",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eL.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:m,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)(e4.Z,{heading:"Third parties",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eL.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)(eL.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||{}}:e3,e6=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}=e6({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:r}),c=(0,h.C)(eg.gU);return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:d,onSubmit:o,validationSchema:e2,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)(e7,{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:h,updateDataUse:m,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)},v=async e=>(f(),c)?m(c,e):h(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:v,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:sh,usePopulateSystemAssetsMutation:sm}=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,b.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 sv=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:r=[]}=(0,O.K3)(),o=(0,h.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]),[m]=(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 m({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()}),[m,u.name]),y=(0,eR.hz)(),[_,v]=(0,O.f7)(),[b,j]=(0,O.qQ)(),[k]=sm();(0,L.Rd)(void 0,{skip:!y.dictionaryService});let[w]=(0,L.qz)(),C=(0,h.C)(L.o),S=(0,h.C)(eg.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 b(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,eg.b3)("initial")))},q=e=>{if(y.dictionaryService){if(!e){o((0,eg.b3)("hiding")),o((0,eg.gQ)(!1));return}o((0,eg.b3)("showing")),y.tcf&&(0,sa.cj)(e)===sa.c6.GVL?o((0,eg.gQ)(!0)):o((0,eg.gQ)(!1))}},R=j.isLoading||v.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)(e4.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)(eL.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)(eL.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)(e4.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)(e4.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)(eL.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)(eL.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)(eL.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)(e4.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)(e4.Z,{heading:"Administrative properties",children:[(0,n.jsx)(eL.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)(eL.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)(eL.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]})}})},sb=t(59003),sj=t(92222),sk=t(14481),sw=t(57454),sC=t(90111),sS=t(8133),sD=t(78238),sT=t(70682),sA=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)(eL.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,n.jsx)(eO.Z,{label:i})]}),(0,n.jsx)(sT.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)(eL.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 sI=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 category of consent"),base_url:Z.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sE={name:"",description:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sq=e=>{var s;let{isOpen:t,onClose:a,systemKey:r,asset:o,...d}=e,c=!o,[u,{isLoading:p}]=su(),[h,{isLoading:m}]=sp(),x=(0,l.pmc)(),g=async e=>{let s=await u({systemKey:r,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.");x((0,f.Vo)(e))}else x((0,f.t5)("Asset added successfully")),a()},y=async e=>{var s,t,i;let n=null!==(t=null==o?void 0:null===(s=o.data_uses)||void 0===s?void 0:s.filter(e=>!(0,sD.Z)(e)))&&void 0!==t?t:[],l={...e,data_uses:[...null!==(i=e.data_uses)&&void 0!==i?i:[],...n]},d=await h({systemKey:r,assets:[l]});if((0,sa.D4)(d)){let e=(0,sa.e$)(d.error,"An unexpected error occurred while saving this asset. Please try again.");x((0,f.Vo)(e))}else x((0,f.t5)("Asset updated successfully")),a()},_=o?{...o,data_uses:null==o?void 0:null===(s=o.data_uses)||void 0===s?void 0:s.filter(e=>(0,sD.Z)(e))}:sE;return(0,n.jsx)(sS.Z,{title:c?"Add asset":"Edit asset",onClose:a,isOpen:t,...d,children:(0,n.jsx)(W.J9,{initialValues:_,onSubmit:e=>{c?g(e):y(e)},validationSchema:sI,children:e=>{let{values:s,isValid:t,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)(eL.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!c}),(0,n.jsx)(P.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,sa.MM)(i),layout:"stacked",disabled:!c}),(0,n.jsx)(sA,{name:"data_uses",label:"Categories of consent",layout:"stacked"}),(0,n.jsx)(eL.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!c}),(0,n.jsx)(eL.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)(eL.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:a,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",loading:p||m,disabled:!t||!r,"data-testid":"save-btn",children:"Save"})]})]})}})})},sR=t(8411),sz=t(72625),sF=t(29850),sL=t(77685),sO=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),[h,{isLoading:m}]=sp(),{successAlert:x,errorAlert:g}=(0,S.V)(),y=(0,l.qY0)(),{asset_type:f,name:_}=a,v=(0,p.useCallback)(e=>{e.preventDefault(),u(!0)},[]),b=async e=>{if(!e)return;let{newSystemKey:t,newSystemName:i,isNewSystem:n}=e,l=await h({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)(sF.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:v,onSelect:(e,s)=>j({newSystemKey:e,newSystemName:s.label}),loading:m}),c&&(0,n.jsx)(sL.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:()=>{b(o)},title:"Reassign asset",message:"Are you sure you want to reassign this asset to ".concat(null==o?void 0:o.newSystemName,"?"),isCentered:!0})]})},sW=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:r}]=sh(),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})]})},sZ=t(34929),sP=t(26183),sN=e=>{var s,t;let{asset:a,systemId:i}=e,{getDataUseDisplayName:r}=(0,sZ.Z)(),[o]=sp(),{errorAlert:d,successAlert:c}=(0,A.V)(),[u,h]=(0,p.useState)(!1),m=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.filter(e=>(0,sD.Z)(e)).map(e=>({label:r(e),key:e})))&&void 0!==t?t:[];return(0,n.jsxs)(sP.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:()=>h(!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)(sT.Z,{selectedTaxonomies:a.data_uses||[],onSelect:m,onBlur:()=>h(!1),open:!0})})]})},sV=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)(sz.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)(sz.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)(sk.G3,{value:e.getValue()}),header:"Asset"}),i.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,n.jsx)(sk.G3,{value:e.getValue()}),header:"Type"}),i.display({id:"system",cell:e=>(0,n.jsx)(sO,{systemKey:s,systemName:t,asset:e.row.original}),header:"System"}),i.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,n.jsx)(sN,{asset:e.row.original,systemId:s}),header:"Categories of consent",size:200}),i.accessor(e=>e.locations,{id:"locations",cell:e=>(0,n.jsx)(sz.mb,{values:e.getValue().map(e=>({label:sR.Z8[e],key:e}))}),header:"Locations",size:300}),i.accessor(e=>e.domain,{id:"domain",cell:e=>(0,n.jsx)(sk.G3,{value:e.getValue()}),header:"Domain"}),i.accessor(e=>e.page,{id:"page",cell:e=>(0,n.jsx)(sz.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,n.jsx)(sz.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),i.display({id:"actions",cell:e=>{let{row:t}=e;return(0,n.jsx)(sW,{asset:t.original,systemKey:s,onEditClick:()=>a(t.original)})},header:"Actions"})]},sU=e=>{var s;let{system:t}=e,{PAGE_SIZES:a,pageSize:i,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:h,endRange:m,pageIndex:x,setTotalPages:g,resetPageIndexToDefault:y}=(0,sk.oi)(),[_,v]=(0,p.useState)(""),[b,j]=(0,p.useState)(void 0),[k,w]=(0,p.useState)({}),[C]=sh(),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=sV({systemName:null!==(s=t.name)&&void 0!==s?s:t.fides_key,systemKey:t.fides_key,onEditClick:e=>{j(e),q()}}),O=(0,sb.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)(sk.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)(sk.Q$,{children:[(0,n.jsx)(sw.M,{value:_,onChange:v}),(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)(sq,{isOpen:I,onClose:()=>{j(void 0),E()},systemKey:t.fides_key,asset:b}),(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)(sk.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)(sk.s8,{totalRows:(null==D?void 0:D.total)||0,pageSizes:a,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:d||A,onNextPageClick:c,isNextPageDisabled:u||A,startRange:h,endRange:m})]}):null};let sM={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"}},sB=e=>{let s=e.startsWith("#")?e:"#".concat(e);return Object.values(sM).find(e=>e.hash===s)},sK=e=>Object.values(sM).find(s=>s.index===e),sH=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 sY=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=sB(t))||void 0===e?void 0:e.index)&&void 0!==s?s:sM.INFORMATION.index})()),[_,v]=(0,p.useState)(!1),{systemOrDatamapRoute:b}=(0,g.V)(),j=(0,l.pmc)(),k=(0,h.T)(),w=(0,h.C)(O.NC),[C,S]=(0,p.useState)(void 0),{plus:D}=(0,m.hz)(),{flags:{dataDiscoveryAndDetection:T}}=(0,m.Vb)(),{plus:A}=(0,m.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&&v(!0),k((0,O.db)(e)),i.push({pathname:y.Dv,query:{id:e.fides_key}});let s={...f.MA,description:(0,n.jsx)(sH,{onViewDatamap:()=>{i.push(b).then(()=>{j.closeAll()})},onAddPrivacyDeclaration:()=>{u(1),j.closeAll()}})};j({...s})},[w,k,i,b,j]);(0,p.useEffect)(()=>(a&&(k((0,O.db)(void 0)),k((0,eg.b3)("initial")),k((0,eg.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=sK(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(sM.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)(sv,{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:b,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)(eu,{connectionConfig:w.connection_configs,systemFidesKey:w.fides_key}),(null===(s=w.connection_configs)||void 0===s?void 0:s.key)&&(0,n.jsx)(ex,{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)(sU,{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
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3702],{35287:function(e,t,i){var n=i(24246),r=i(77181),s=i(88038),o=i.n(s);i(27378),t.Z=e=>{let{children:t,title:i,mainProps:s}=e;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:t})]})}},79494:function(e,t,i){var n=i(24246),r=i(77181);t.Z=e=>{let{title:t,icon:i,type:s,...o}=e;return(0,n.jsx)(r.wpx,{size:"small",type:s,"data-testid":"action-".concat(t),icon:i,iconPosition:"start",...o,children:t})}},45896:function(e,t,i){var n=i(24246),r=i(66379);t.Z=e=>{let{filterTabs:t,onChange:i,filterTabIndex:s}=e;return(0,n.jsx)(r.Z,{border:"full-width",mb:5,size:"sm",data:t,borderWidth:1,index:s,onChange:i})}},69828:function(e,t,i){i.d(t,{Y:function(){return o}});var n=i(24246),r=i(77181),s=i(70788);let o=[(0,n.jsx)(r.PJP.S9g,{},"layers"),(0,n.jsx)(r.PJP.ehp,{},"dataset"),(0,n.jsx)(r.PJP.iA_,{},"table"),(0,n.jsx)(r.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];t.Z=e=>{let{resourceUrn:t,parentLink:i,onPathClick:r=()=>{}}=e,l=[];if(t||l.push({title:"All activity"}),t){l.push({title:"All activity",href:i});let e=t.split(".");e.forEach((t,i)=>{0!==i&&l.push({title:t,icon:o[i-1],onClick:t=>{t.preventDefault(),r(e.slice(0,i+1).join("."))}})})}return(0,n.jsx)(s.m,{"data-testid":"results-breadcrumb",items:l})}},38347:function(e,t,i){var n=i(24246),r=i(77181),s=i(56839);t.Z=()=>(0,n.jsxs)(r.J2e,{isLazy:!0,trigger:"hover",children:[(0,n.jsx)(r.xol,{children:(0,n.jsx)(r.UOT,{color:"gray.400"})}),(0,n.jsxs)(r.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,n.jsx)(r.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,n.jsx)(r.QHN,{bgColor:"gray.800"}),(0,n.jsx)(r.baG,{border:"none",children:(0,n.jsxs)(r.MIq,{columns:2,spacing:2,children:[(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Rv,{})," Change detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.$P,{})," Data labeled"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.zj,{})," Monitoring"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.dK,{})," Addition detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Kr,{})," Unmonitored"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.q1,{})," Removal detected"]})]})})]})]})},47182:function(e,t,i){var n=i(86677),r=i(77830);t.Z=()=>{let e=(0,n.useRouter)();return{monitorId:e.query.monitorId,resourceUrn:e.query.resourceUrn,navigateToDetectionResults:t=>{let{resourceUrn:i,filterTabIndex:n}=t;e.push({pathname:r.dS,query:{resourceUrn:i,filterTabIndex:n}})},navigateToDiscoveryResults:t=>{let{resourceUrn:i,filterTabIndex:n}=t;e.push({pathname:r.Sj,query:{resourceUrn:i,filterTabIndex:n}})}}}},56839:function(e,t,i){i.d(t,{dK:function(){return c},Rv:function(){return f},$P:function(){return x},zj:function(){return h},Kr:function(){return I},q1:function(){return u},QL:function(){return j}});var n=i(24246),r=i(77181);let s=(0,r.IUT)({displayName:"CircleIcon",viewBox:"0 0 200 200",path:(0,n.jsx)("path",{fill:"currentColor",d:"M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"})}),o=(0,r.IUT)({displayName:"RightDownArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 8H8V7.23192V1.85539V1.08731H6.46385V1.85539V5.37654L1.62976 0.544855L1.08731 0L0 1.08731L0.542454 1.62976L5.37654 6.46385H1.85539H1.08731V8H1.85539H7.23192Z"})}),l=(0,r.IUT)({displayName:"RightUpArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 0H8V0.768077V6.14461V6.91269H6.46385V6.14461V2.62346L1.62976 7.45515L1.08731 8L0 6.91269L0.542454 6.37024L5.37654 1.53615H1.85539H1.08731V0H1.85539H7.23192Z"})}),a=(0,r.IUT)({displayName:"TagIcon",viewBox:"0 0 9 10",path:(0,n.jsx)("path",{fill:"currentColor",d:"M0 0.5V5L4.5 9.5L9 5L4.5 0.5H0ZM2.25 2.10714C2.4205 2.10714 2.58401 2.17487 2.70457 2.29543C2.82513 2.41599 2.89286 2.5795 2.89286 2.75C2.89286 2.9205 2.82513 3.08401 2.70457 3.20457C2.58401 3.32513 2.4205 3.39286 2.25 3.39286C2.0795 3.39286 1.91599 3.32513 1.79543 3.20457C1.67487 3.08401 1.60714 2.9205 1.60714 2.75C1.60714 2.5795 1.67487 2.41599 1.79543 2.29543C1.91599 2.17487 2.0795 2.10714 2.25 2.10714Z"})});var d=i(28278);let c=()=>(0,n.jsx)(l,{color:"green.400",boxSize:2,mr:2,"data-testid":"add-icon"}),u=()=>(0,n.jsx)(o,{color:"red.400",boxSize:2,mr:2,"data-testid":"remove-icon"}),x=()=>(0,n.jsx)(a,{color:"orange.400",boxSize:3,mr:1,"data-testid":"classify-icon"}),f=()=>(0,n.jsx)(s,{color:"blue.400",boxSize:2.5,mb:"2px",mr:"6px","data-testid":"change-icon"}),h=()=>(0,n.jsx)(s,{color:"green.400",boxSize:2,mr:2,"data-testid":"monitored-icon"}),I=()=>(0,n.jsx)(s,{color:"red.400",boxSize:2,mr:2,"data-testid":"muted-icon"}),j={[d.E.ADDITION]:(0,n.jsx)(c,{}),[d.E.REMOVAL]:(0,n.jsx)(u,{}),[d.E.CLASSIFICATION]:(0,n.jsx)(x,{}),[d.E.CHANGE]:(0,n.jsx)(f,{}),[d.E.MONITORED]:(0,n.jsx)(h,{}),[d.E.MUTED]:(0,n.jsx)(I,{}),[d.E.IN_PROGRESS]:(0,n.jsx)(()=>(0,n.jsx)(s,{color:"orange.400",boxSize:2,mr:2,"data-testid":"in-progress-icon"}),{}),[d.E.NONE]:null}},79947:function(e,t,i){var n=i(24246),r=i(77181);t.Z=e=>{let{type:t}=e;return(0,n.jsx)(r.kCb,{align:"center",h:"full",children:!!t&&(0,n.jsx)(r.j8w,{children:t})})}},87667:function(e,t,i){var n=i(24246),r=i(77181),s=i(56839),o=i(20449),l=i(98559),a=i(80356);t.Z=e=>{let{result:t,changeTypeOverride:i}=e,d=null!=i?i:(0,o.Z)(t);return(0,n.jsxs)(r.kCb,{alignItems:"center",height:"100%",children:[(0,n.jsx)(r.ua7,{label:d,children:(0,n.jsx)("span",{children:s.QL[d]})}),(0,n.jsx)(r.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,a.Z)(t)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,l.Z)(t)})]})}},50169:function(e,t,i){var n=i(24246),r=i(14481),s=i(28278),o=i(20449);let l={[s.E.MUTED]:{color:"marble",label:"Unmonitored"},[s.E.MONITORED]:{color:"success",label:"Monitoring"},[s.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};t.Z=e=>{var t,i,s,a,d;let{result:c,changeTypeOverride:u}=e;if(null===(t=c.user_assigned_data_categories)||void 0===t?void 0:t.length)return(0,n.jsx)(r.A4,{color:"success",value:"Reviewed"});let x=null!=u?u:(0,o.Z)(c);return(0,n.jsx)(r.A4,{color:null!==(a=null===(i=l[x])||void 0===i?void 0:i.color)&&void 0!==a?a:"warning",value:null!==(d=null===(s=l[x])||void 0===s?void 0:s.label)&&void 0!==d?d:"Pending review"})}},28278:function(e,t,i){var n,r;i.d(t,{E:function(){return n}}),(r=n||(n={})).ADDITION="Addition",r.CHANGE="Change",r.REMOVAL="Removal",r.CLASSIFICATION="Classification",r.IN_PROGRESS="Classifying",r.MONITORED="Monitoring",r.MUTED="Unmonitored",r.NONE="--"},74241:function(e,t){t.Z=e=>{let t=e.split(".");return t.length>1?t[1]:""}},20449:function(e,t,i){var n=i(28278),r=i(62656);t.Z=e=>e.diff_status===r.LL.ADDITION?n.E.ADDITION:e.diff_status===r.LL.REMOVAL?n.E.REMOVAL:e.diff_status===r.LL.CLASSIFYING||e.diff_status===r.LL.CLASSIFICATION_QUEUED?n.E.IN_PROGRESS:e.diff_status===r.LL.CLASSIFICATION_ADDITION||e.diff_status===r.LL.CLASSIFICATION_UPDATE?n.E.CLASSIFICATION:e.child_diff_statuses?e.child_diff_statuses[r.LL.CLASSIFYING]||e.child_diff_statuses[r.LL.CLASSIFICATION_QUEUED]?n.E.IN_PROGRESS:e.child_diff_statuses[r.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[r.LL.CLASSIFICATION_UPDATE]?n.E.CLASSIFICATION:e.child_diff_statuses[r.LL.ADDITION]||e.child_diff_statuses[r.LL.REMOVAL]?n.E.CHANGE:e.diff_status===r.LL.MONITORED?n.E.MONITORED:e.diff_status===r.LL.MUTED?n.E.MUTED:n.E.NONE:n.E.NONE},80285:function(e,t){t.Z=e=>e.urn}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3702],{35287:function(e,t,i){var n=i(24246),r=i(77181),s=i(88038),o=i.n(s);i(27378),t.Z=e=>{let{children:t,title:i,mainProps:s}=e;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:t})]})}},79494:function(e,t,i){var n=i(24246),r=i(77181);t.Z=e=>{let{title:t,icon:i,type:s,...o}=e;return(0,n.jsx)(r.wpx,{size:"small",type:s,"data-testid":"action-".concat(t),icon:i,iconPosition:"start",...o,children:t})}},45896:function(e,t,i){var n=i(24246),r=i(66379);t.Z=e=>{let{filterTabs:t,onChange:i,filterTabIndex:s}=e;return(0,n.jsx)(r.Z,{border:"full-width",mb:5,size:"sm",data:t,borderWidth:1,index:s,onChange:i})}},69828:function(e,t,i){i.d(t,{Y:function(){return o}});var n=i(24246),r=i(77181),s=i(70788);let o=[(0,n.jsx)(r.PJP.S9g,{},"layers"),(0,n.jsx)(r.PJP.ehp,{},"dataset"),(0,n.jsx)(r.PJP.iA_,{},"table"),(0,n.jsx)(r.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];t.Z=e=>{let{resourceUrn:t,parentLink:i,onPathClick:r=()=>{}}=e,l=[];if(t||l.push({title:"All activity"}),t){l.push({title:"All activity",href:i});let e=t.split(".");e.forEach((t,i)=>{0!==i&&l.push({title:t,icon:o[i-1],onClick:t=>{t.preventDefault(),r(e.slice(0,i+1).join("."))}})})}return(0,n.jsx)(s.m,{"data-testid":"results-breadcrumb",items:l})}},38347:function(e,t,i){var n=i(24246),r=i(77181),s=i(56839);t.Z=()=>(0,n.jsxs)(r.J2e,{isLazy:!0,trigger:"hover",children:[(0,n.jsx)(r.xol,{children:(0,n.jsx)(r.UOT,{color:"gray.400"})}),(0,n.jsxs)(r.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,n.jsx)(r.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,n.jsx)(r.QHN,{bgColor:"gray.800"}),(0,n.jsx)(r.baG,{border:"none",children:(0,n.jsxs)(r.MIq,{columns:2,spacing:2,children:[(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Rv,{})," Change detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.$P,{})," Data labeled"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.zj,{})," Monitoring"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.dK,{})," Addition detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Kr,{})," Unmonitored"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.q1,{})," Removal detected"]})]})})]})]})},47182:function(e,t,i){var n=i(86677),r=i(77830);t.Z=()=>{let e=(0,n.useRouter)();return{monitorId:e.query.monitorId,resourceUrn:e.query.resourceUrn,navigateToDetectionResults:t=>{let{resourceUrn:i,filterTabIndex:n}=t;e.push({pathname:r.dS,query:{resourceUrn:i,filterTabIndex:n}})},navigateToDiscoveryResults:t=>{let{resourceUrn:i,filterTabIndex:n}=t;e.push({pathname:r.Sj,query:{resourceUrn:i,filterTabIndex:n}})}}}},56839:function(e,t,i){i.d(t,{dK:function(){return c},Rv:function(){return f},$P:function(){return x},zj:function(){return h},Kr:function(){return I},q1:function(){return u},QL:function(){return j}});var n=i(24246),r=i(77181);let s=(0,r.IUT)({displayName:"CircleIcon",viewBox:"0 0 200 200",path:(0,n.jsx)("path",{fill:"currentColor",d:"M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"})}),o=(0,r.IUT)({displayName:"RightDownArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 8H8V7.23192V1.85539V1.08731H6.46385V1.85539V5.37654L1.62976 0.544855L1.08731 0L0 1.08731L0.542454 1.62976L5.37654 6.46385H1.85539H1.08731V8H1.85539H7.23192Z"})}),l=(0,r.IUT)({displayName:"RightUpArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 0H8V0.768077V6.14461V6.91269H6.46385V6.14461V2.62346L1.62976 7.45515L1.08731 8L0 6.91269L0.542454 6.37024L5.37654 1.53615H1.85539H1.08731V0H1.85539H7.23192Z"})}),a=(0,r.IUT)({displayName:"TagIcon",viewBox:"0 0 9 10",path:(0,n.jsx)("path",{fill:"currentColor",d:"M0 0.5V5L4.5 9.5L9 5L4.5 0.5H0ZM2.25 2.10714C2.4205 2.10714 2.58401 2.17487 2.70457 2.29543C2.82513 2.41599 2.89286 2.5795 2.89286 2.75C2.89286 2.9205 2.82513 3.08401 2.70457 3.20457C2.58401 3.32513 2.4205 3.39286 2.25 3.39286C2.0795 3.39286 1.91599 3.32513 1.79543 3.20457C1.67487 3.08401 1.60714 2.9205 1.60714 2.75C1.60714 2.5795 1.67487 2.41599 1.79543 2.29543C1.91599 2.17487 2.0795 2.10714 2.25 2.10714Z"})});var d=i(28278);let c=()=>(0,n.jsx)(l,{color:"green.400",boxSize:2,mr:2,"data-testid":"add-icon"}),u=()=>(0,n.jsx)(o,{color:"red.400",boxSize:2,mr:2,"data-testid":"remove-icon"}),x=()=>(0,n.jsx)(a,{color:"orange.400",boxSize:3,mr:1,"data-testid":"classify-icon"}),f=()=>(0,n.jsx)(s,{color:"blue.400",boxSize:2.5,mb:"2px",mr:"6px","data-testid":"change-icon"}),h=()=>(0,n.jsx)(s,{color:"green.400",boxSize:2,mr:2,"data-testid":"monitored-icon"}),I=()=>(0,n.jsx)(s,{color:"red.400",boxSize:2,mr:2,"data-testid":"muted-icon"}),j={[d.E.ADDITION]:(0,n.jsx)(c,{}),[d.E.REMOVAL]:(0,n.jsx)(u,{}),[d.E.CLASSIFICATION]:(0,n.jsx)(x,{}),[d.E.CHANGE]:(0,n.jsx)(f,{}),[d.E.MONITORED]:(0,n.jsx)(h,{}),[d.E.MUTED]:(0,n.jsx)(I,{}),[d.E.IN_PROGRESS]:(0,n.jsx)(()=>(0,n.jsx)(s,{color:"orange.400",boxSize:2,mr:2,"data-testid":"in-progress-icon"}),{}),[d.E.NONE]:null}},79947:function(e,t,i){var n=i(24246),r=i(77181);t.Z=e=>{let{type:t}=e;return(0,n.jsx)(r.kCb,{align:"center",h:"full",children:!!t&&(0,n.jsx)(r.j8w,{children:t})})}},87667:function(e,t,i){var n=i(24246),r=i(77181),s=i(56839),o=i(20449),l=i(98559),a=i(80356);t.Z=e=>{let{result:t,changeTypeOverride:i}=e,d=null!=i?i:(0,o.Z)(t);return(0,n.jsxs)(r.kCb,{alignItems:"center",height:"100%",children:[(0,n.jsx)(r.ua7,{label:d,children:(0,n.jsx)("span",{children:s.QL[d]})}),(0,n.jsx)(r.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,a.Z)(t)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,l.Z)(t)})]})}},50169:function(e,t,i){var n=i(24246),r=i(14481),s=i(28278),o=i(20449);let l={[s.E.MUTED]:{color:"marble",label:"Unmonitored"},[s.E.MONITORED]:{color:"success",label:"Monitoring"},[s.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};t.Z=e=>{var t,i,s,a,d;let{result:c,changeTypeOverride:u}=e;if(null===(t=c.user_assigned_data_categories)||void 0===t?void 0:t.length)return(0,n.jsx)(r.A4,{color:"success",value:"Reviewed"});let x=null!=u?u:(0,o.Z)(c);return(0,n.jsx)(r.A4,{color:null!==(a=null===(i=l[x])||void 0===i?void 0:i.color)&&void 0!==a?a:"warning",value:null!==(d=null===(s=l[x])||void 0===s?void 0:s.label)&&void 0!==d?d:"Pending review"})}},28278:function(e,t,i){var n,r;i.d(t,{E:function(){return n}}),(r=n||(n={})).ADDITION="Addition",r.CHANGE="Change",r.REMOVAL="Removal",r.CLASSIFICATION="Classification",r.IN_PROGRESS="Classifying",r.MONITORED="Monitoring",r.MUTED="Unmonitored",r.NONE="--"},74241:function(e,t){t.Z=e=>{let t=e.split(".");return t.length>1?t[1]:""}},20449:function(e,t,i){var n=i(28278),r=i(16643);t.Z=e=>e.diff_status===r.LL.ADDITION?n.E.ADDITION:e.diff_status===r.LL.REMOVAL?n.E.REMOVAL:e.diff_status===r.LL.CLASSIFYING||e.diff_status===r.LL.CLASSIFICATION_QUEUED?n.E.IN_PROGRESS:e.diff_status===r.LL.CLASSIFICATION_ADDITION||e.diff_status===r.LL.CLASSIFICATION_UPDATE?n.E.CLASSIFICATION:e.child_diff_statuses?e.child_diff_statuses[r.LL.CLASSIFYING]||e.child_diff_statuses[r.LL.CLASSIFICATION_QUEUED]?n.E.IN_PROGRESS:e.child_diff_statuses[r.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[r.LL.CLASSIFICATION_UPDATE]?n.E.CLASSIFICATION:e.child_diff_statuses[r.LL.ADDITION]||e.child_diff_statuses[r.LL.REMOVAL]?n.E.CHANGE:e.diff_status===r.LL.MONITORED?n.E.MONITORED:e.diff_status===r.LL.MUTED?n.E.MUTED:n.E.NONE:n.E.NONE},80285:function(e,t){t.Z=e=>e.urn}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3855],{66726:function(e,t,i){var r=i(11611),n=i(82846),a=i(91936),s=Math.max,l=Math.min;e.exports=function(e,t,i){var o,c,u,d,p,g,x=0,f=!1,h=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function j(t){var i=o,r=c;return o=c=void 0,x=t,d=e.apply(r,i)}function m(e){var i=e-g,r=e-x;return void 0===g||i>=t||i<0||h&&r>=u}function C(){var e,i,r,a=n();if(m(a))return y(a);p=setTimeout(C,(e=a-g,i=a-x,r=t-e,h?l(r,u-i):r))}function y(e){return(p=void 0,v&&o)?j(e):(o=c=void 0,d)}function I(){var e,i=n(),r=m(i);if(o=arguments,c=this,g=i,r){if(void 0===p)return x=e=g,p=setTimeout(C,t),f?j(e):d;if(h)return clearTimeout(p),p=setTimeout(C,t),j(g)}return void 0===p&&(p=setTimeout(C,t)),d}return t=a(t)||0,r(i)&&(f=!!i.leading,u=(h="maxWait"in i)?s(a(i.maxWait)||0,t):u,v="trailing"in i?!!i.trailing:v),I.cancel=function(){void 0!==p&&clearTimeout(p),x=0,o=g=c=p=void 0},I.flush=function(){return void 0===p?d:y(n())},I}},82846:function(e,t,i){var r=i(77400);e.exports=function(){return r.Date.now()}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return a},V:function(){return r.V}});var r=i(84306),n=i(812);let a=()=>{let{errorAlert:e}=(0,r.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,n.Ot)(t)?i=t.data.detail:(0,n.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return a}});var r=i(24246),n=i(77181);let a=()=>{let e=(0,n.pmc)();return{errorAlert:(t,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.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,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.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)}}}},81406:function(e,t,i){"use strict";var r=i(24246),n=i(77181);t.Z=()=>(0,r.jsxs)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,r.jsx)(n.xvT,{fontSize:"sm",children:"You're up to date!"})]})},25077:function(e,t,i){"use strict";i.d(t,{Z:function(){return A}});var r=i(24246),n=i(59003),a=i(92222),s=i(77181),l=i(27378),o=i(14481),c=i(81406),u=i(99763),d=i(72625),p=i(14047),g=i(28976),x=i(8151),f=i(70675),h=e=>{let{resource:t,onDetailClick:i}=e,{successAlert:n}=(0,p.V)(),a=(0,x.u)(t),[l,{isLoading:o}]=(0,f.v8)(),[c,{isLoading:u}]=(0,f.cM)(),[d,{isLoading:h}]=(0,f.vi)(),v=async()=>{var e;await l({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0}),n("Started classification on ".concat(null!==(e=t.name)&&void 0!==e?e:"this resource"))},j=async()=>{var e;await c({staged_resource_urn:t.urn}),n("Approved ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},m=async()=>{var e;await d({staged_resource_urn:t.urn}),n("Hid ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},C=o||u||h;return(0,r.jsxs)(s.kCb,{gap:2,justify:"space-between",children:[a===x.e.ATTENTION_REQUIRED&&(0,r.jsx)(s.wpx,{size:"small",onClick:v,loading:o,disabled:C,"data-testid":"classify-btn",children:"Classify"}),a===x.e.IN_REVIEW&&(0,r.jsx)(s.wpx,{size:"small",onClick:j,loading:u,disabled:C,"data-testid":"approve-btn",children:"Approve"}),(0,r.jsx)(s.LZC,{}),(0,r.jsx)(g.Z,{onHideClick:m,onDetailClick:i})]})},v=i(89200),j=i(5945),m=i(61099),C=i(79947),y=i(62656);let I=(0,a.Cl)();var L=(e,t)=>{let i=[];return e?e===y.D$.TABLE?[I.display({id:"name",cell:e=>{let{row:t}=e;return(0,r.jsx)(v.Z,{resource:t.original})},header:"Table"}),I.display({id:"status",cell:e=>{let{row:t}=e;return(0,r.jsx)(j.Z,{status:(0,x.u)(t.original)})},header:"Status"}),I.display({id:"category",cell:e=>{let{row:t}=e;return(0,r.jsx)(m.Z,{resource:t.original})},header:"Data categories",minSize:280,meta:{disableRowClick:!0}}),I.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(o.G3,{value:e.getValue()}),header:"Description"}),I.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,r.jsx)(d.Cy,{time:e.getValue()}),header:"Updated"}),I.display({id:"actions",cell:e=>{let{row:i}=e;return(0,r.jsx)(h,{resource:i.original,onDetailClick:()=>t(i.original)})},header:"Actions",meta:{disableRowClick:!0}})]:e===y.D$.FIELD?[I.display({id:"name",cell:e=>{let{row:t}=e;return(0,r.jsx)(v.Z,{resource:t.original})},header:"Field"}),I.display({id:"status",cell:e=>{let{row:t}=e;return(0,r.jsx)(j.Z,{status:(0,x.u)(t.original)})},header:"Status"}),I.accessor(e=>e.data_type,{id:"dataType",cell:e=>(0,r.jsx)(C.Z,{type:e.getValue()}),header:"Data type"}),I.display({id:"category",cell:e=>{let{row:t}=e;return(0,r.jsx)(m.Z,{resource:t.original})},header:"Data categories",minSize:280,meta:{disableRowClick:!0}}),I.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(o.G3,{value:e.getValue()}),header:"Description"}),I.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,r.jsx)(d.Cy,{time:e.getValue()}),header:"Updated"}),I.display({id:"actions",cell:e=>{let{row:i}=e;return(0,r.jsx)(h,{resource:i.original,onDetailClick:()=>t(i.original)})},header:"Actions",meta:{disableRowClick:!0}})]:i:i},_=i(57454),b=i(7940),k=i(80356);let w=[y.LL.ADDITION,y.LL.CLASSIFYING,y.LL.CLASSIFICATION_ADDITION,y.LL.CLASSIFICATION_QUEUED,y.LL.CLASSIFICATION_UPDATE,y.LL.MONITORED,y.LL.PROMOTING,y.LL.REMOVAL,y.LL.REMOVING],T={items:[],total:0,page:1,size:50,pages:1};var A=e=>{let{resourceUrn:t,onRowClick:i}=e,{PAGE_SIZES:d,pageSize:p,setPageSize:g,onPreviousPageClick:x,isPreviousPageDisabled:h,onNextPageClick:v,isNextPageDisabled:j,startRange:m,endRange:C,pageIndex:y,setTotalPages:I,resetPageIndexToDefault:A}=(0,o.oi)(),[R,S]=(0,l.useState)("");(0,l.useEffect)(()=>{A()},[t,A]);let{isFetching:Z,isLoading:D,data:E}=(0,f.z8)({staged_resource_urn:t,page:y,size:p,diff_status:w,search:R}),{items:P,total:N,pages:z}=(0,l.useMemo)(()=>null!=E?E:T,[E]);(0,l.useEffect)(()=>{I(z)},[z,I]);let[M,V]=(0,l.useState)(void 0),O=L((0,b.G)(P[0]),V),U=(0,n.b7)({getCoreRowModel:(0,a.sC)(),getGroupedRowModel:(0,a.qe)(),getExpandedRowModel:(0,a.rV)(),columns:O,manualPagination:!0,data:P,columnResizeMode:"onChange",getRowId:e=>e.urn});return D||Z?(0,r.jsx)(o.I4,{rowHeight:36,numRows:36}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Q$,{children:(0,r.jsx)(s.kCb,{gap:6,align:"center",children:(0,r.jsx)(s.xuv,{flexShrink:0,children:(0,r.jsx)(_.M,{value:R,onChange:S})})})}),(0,r.jsx)(o.ZK,{tableInstance:U,emptyTableNotice:(0,r.jsx)(c.Z,{}),getRowIsClickable:e=>(0,k.Z)(e),onRowClick:i}),(0,r.jsx)(o.s8,{totalRows:N||0,pageSizes:d,setPageSize:g,onPreviousPageClick:x,isPreviousPageDisabled:h,onNextPageClick:v,isNextPageDisabled:j,startRange:m,endRange:C}),(0,r.jsx)(u.Z,{resource:M,onClose:()=>V(void 0)})]})}},94780:function(e,t,i){"use strict";i.d(t,{X5:function(){return l},pN:function(){return o},sv:function(){return a}});var r=i(24246),n=i(77181);let a=e=>e.split(".")[1],s=[(0,r.jsx)(n.PJP.S9g,{},"layers"),(0,r.jsx)(n.PJP.iA_,{},"table"),(0,r.jsx)(n.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")],l=(e,t)=>{if(!e)return[];let i=e.split(".");if(i.length<2)return[];let l=i.splice(0,2).join("."),o=[];return i.reduce((e,r,n)=>{let a=n===i.length-1,c="".concat(e).concat(".").concat(r);return o.push({title:r,href:a?void 0:"".concat(t,"/").concat(l,"/").concat(c),icon:s[n]}),c},l),[{title:a(l),href:"".concat(t,"/").concat(l),icon:(0,r.jsx)(n.PJP.ehp,{})},...o]},o=(e,t)=>{if(!e)return[];let i=e.split(".");if(i.length<2)return[];let r=i.shift(),n=[];return i.reduce((e,r,a)=>{let l=a===i.length-1,o="".concat(e).concat(".").concat(r);return n.push({title:r,href:l?void 0:"".concat(t,"/").concat(o),icon:s[a]}),o},r),n}},57454:function(e,t,i){"use strict";i.d(t,{M:function(){return o}});var r=i(24246),n=i(66726),a=i.n(n),s=i(27378),l=i(86780);let o=e=>{let{value:t,onChange:i}=e,[n,o]=(0,s.useState)(t),c=a()(i,500),u=(0,s.useCallback)(e=>{o(e),c(e)},[]);return(0,r.jsx)(l.Z,{search:n,onChange:u,onClear:()=>{o(""),i("")}})}},79947:function(e,t,i){"use strict";var r=i(24246),n=i(77181);t.Z=e=>{let{type:t}=e;return(0,r.jsx)(n.kCb,{align:"center",h:"full",children:!!t&&(0,r.jsx)(n.j8w,{children:t})})}}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3855],{66726:function(e,t,i){var r=i(11611),n=i(82846),a=i(91936),s=Math.max,l=Math.min;e.exports=function(e,t,i){var o,c,u,d,p,g,x=0,f=!1,h=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function j(t){var i=o,r=c;return o=c=void 0,x=t,d=e.apply(r,i)}function m(e){var i=e-g,r=e-x;return void 0===g||i>=t||i<0||h&&r>=u}function C(){var e,i,r,a=n();if(m(a))return y(a);p=setTimeout(C,(e=a-g,i=a-x,r=t-e,h?l(r,u-i):r))}function y(e){return(p=void 0,v&&o)?j(e):(o=c=void 0,d)}function I(){var e,i=n(),r=m(i);if(o=arguments,c=this,g=i,r){if(void 0===p)return x=e=g,p=setTimeout(C,t),f?j(e):d;if(h)return clearTimeout(p),p=setTimeout(C,t),j(g)}return void 0===p&&(p=setTimeout(C,t)),d}return t=a(t)||0,r(i)&&(f=!!i.leading,u=(h="maxWait"in i)?s(a(i.maxWait)||0,t):u,v="trailing"in i?!!i.trailing:v),I.cancel=function(){void 0!==p&&clearTimeout(p),x=0,o=g=c=p=void 0},I.flush=function(){return void 0===p?d:y(n())},I}},82846:function(e,t,i){var r=i(77400);e.exports=function(){return r.Date.now()}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return a},V:function(){return r.V}});var r=i(84306),n=i(812);let a=()=>{let{errorAlert:e}=(0,r.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,n.Ot)(t)?i=t.data.detail:(0,n.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return a}});var r=i(24246),n=i(77181);let a=()=>{let e=(0,n.pmc)();return{errorAlert:(t,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.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,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.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)}}}},81406:function(e,t,i){"use strict";var r=i(24246),n=i(77181);t.Z=()=>(0,r.jsxs)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,r.jsx)(n.xvT,{fontSize:"sm",children:"You're up to date!"})]})},25077:function(e,t,i){"use strict";i.d(t,{Z:function(){return A}});var r=i(24246),n=i(59003),a=i(92222),s=i(77181),l=i(27378),o=i(14481),c=i(81406),u=i(99763),d=i(72625),p=i(14047),g=i(28976),x=i(8151),f=i(70675),h=e=>{let{resource:t,onDetailClick:i}=e,{successAlert:n}=(0,p.V)(),a=(0,x.u)(t),[l,{isLoading:o}]=(0,f.v8)(),[c,{isLoading:u}]=(0,f.cM)(),[d,{isLoading:h}]=(0,f.vi)(),v=async()=>{var e;await l({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0}),n("Started classification on ".concat(null!==(e=t.name)&&void 0!==e?e:"this resource"))},j=async()=>{var e;await c({staged_resource_urn:t.urn}),n("Approved ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},m=async()=>{var e;await d({staged_resource_urn:t.urn}),n("Hid ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},C=o||u||h;return(0,r.jsxs)(s.kCb,{gap:2,justify:"space-between",children:[a===x.e.ATTENTION_REQUIRED&&(0,r.jsx)(s.wpx,{size:"small",onClick:v,loading:o,disabled:C,"data-testid":"classify-btn",children:"Classify"}),a===x.e.IN_REVIEW&&(0,r.jsx)(s.wpx,{size:"small",onClick:j,loading:u,disabled:C,"data-testid":"approve-btn",children:"Approve"}),(0,r.jsx)(s.LZC,{}),(0,r.jsx)(g.Z,{onHideClick:m,onDetailClick:i})]})},v=i(89200),j=i(5945),m=i(61099),C=i(79947),y=i(16643);let I=(0,a.Cl)();var L=(e,t)=>{let i=[];return e?e===y.D$.TABLE?[I.display({id:"name",cell:e=>{let{row:t}=e;return(0,r.jsx)(v.Z,{resource:t.original})},header:"Table"}),I.display({id:"status",cell:e=>{let{row:t}=e;return(0,r.jsx)(j.Z,{status:(0,x.u)(t.original)})},header:"Status"}),I.display({id:"category",cell:e=>{let{row:t}=e;return(0,r.jsx)(m.Z,{resource:t.original})},header:"Data categories",minSize:280,meta:{disableRowClick:!0}}),I.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(o.G3,{value:e.getValue()}),header:"Description"}),I.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,r.jsx)(d.Cy,{time:e.getValue()}),header:"Updated"}),I.display({id:"actions",cell:e=>{let{row:i}=e;return(0,r.jsx)(h,{resource:i.original,onDetailClick:()=>t(i.original)})},header:"Actions",meta:{disableRowClick:!0}})]:e===y.D$.FIELD?[I.display({id:"name",cell:e=>{let{row:t}=e;return(0,r.jsx)(v.Z,{resource:t.original})},header:"Field"}),I.display({id:"status",cell:e=>{let{row:t}=e;return(0,r.jsx)(j.Z,{status:(0,x.u)(t.original)})},header:"Status"}),I.accessor(e=>e.data_type,{id:"dataType",cell:e=>(0,r.jsx)(C.Z,{type:e.getValue()}),header:"Data type"}),I.display({id:"category",cell:e=>{let{row:t}=e;return(0,r.jsx)(m.Z,{resource:t.original})},header:"Data categories",minSize:280,meta:{disableRowClick:!0}}),I.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(o.G3,{value:e.getValue()}),header:"Description"}),I.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,r.jsx)(d.Cy,{time:e.getValue()}),header:"Updated"}),I.display({id:"actions",cell:e=>{let{row:i}=e;return(0,r.jsx)(h,{resource:i.original,onDetailClick:()=>t(i.original)})},header:"Actions",meta:{disableRowClick:!0}})]:i:i},_=i(57454),b=i(7940),k=i(80356);let w=[y.LL.ADDITION,y.LL.CLASSIFYING,y.LL.CLASSIFICATION_ADDITION,y.LL.CLASSIFICATION_QUEUED,y.LL.CLASSIFICATION_UPDATE,y.LL.MONITORED,y.LL.PROMOTING,y.LL.REMOVAL,y.LL.REMOVING],T={items:[],total:0,page:1,size:50,pages:1};var A=e=>{let{resourceUrn:t,onRowClick:i}=e,{PAGE_SIZES:d,pageSize:p,setPageSize:g,onPreviousPageClick:x,isPreviousPageDisabled:h,onNextPageClick:v,isNextPageDisabled:j,startRange:m,endRange:C,pageIndex:y,setTotalPages:I,resetPageIndexToDefault:A}=(0,o.oi)(),[R,S]=(0,l.useState)("");(0,l.useEffect)(()=>{A()},[t,A]);let{isFetching:Z,isLoading:D,data:E}=(0,f.z8)({staged_resource_urn:t,page:y,size:p,diff_status:w,search:R}),{items:P,total:N,pages:z}=(0,l.useMemo)(()=>null!=E?E:T,[E]);(0,l.useEffect)(()=>{I(z)},[z,I]);let[M,V]=(0,l.useState)(void 0),O=L((0,b.G)(P[0]),V),U=(0,n.b7)({getCoreRowModel:(0,a.sC)(),getGroupedRowModel:(0,a.qe)(),getExpandedRowModel:(0,a.rV)(),columns:O,manualPagination:!0,data:P,columnResizeMode:"onChange",getRowId:e=>e.urn});return D||Z?(0,r.jsx)(o.I4,{rowHeight:36,numRows:36}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Q$,{children:(0,r.jsx)(s.kCb,{gap:6,align:"center",children:(0,r.jsx)(s.xuv,{flexShrink:0,children:(0,r.jsx)(_.M,{value:R,onChange:S})})})}),(0,r.jsx)(o.ZK,{tableInstance:U,emptyTableNotice:(0,r.jsx)(c.Z,{}),getRowIsClickable:e=>(0,k.Z)(e),onRowClick:i}),(0,r.jsx)(o.s8,{totalRows:N||0,pageSizes:d,setPageSize:g,onPreviousPageClick:x,isPreviousPageDisabled:h,onNextPageClick:v,isNextPageDisabled:j,startRange:m,endRange:C}),(0,r.jsx)(u.Z,{resource:M,onClose:()=>V(void 0)})]})}},94780:function(e,t,i){"use strict";i.d(t,{X5:function(){return l},pN:function(){return o},sv:function(){return a}});var r=i(24246),n=i(77181);let a=e=>e.split(".")[1],s=[(0,r.jsx)(n.PJP.S9g,{},"layers"),(0,r.jsx)(n.PJP.iA_,{},"table"),(0,r.jsx)(n.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")],l=(e,t)=>{if(!e)return[];let i=e.split(".");if(i.length<2)return[];let l=i.splice(0,2).join("."),o=[];return i.reduce((e,r,n)=>{let a=n===i.length-1,c="".concat(e).concat(".").concat(r);return o.push({title:r,href:a?void 0:"".concat(t,"/").concat(l,"/").concat(c),icon:s[n]}),c},l),[{title:a(l),href:"".concat(t,"/").concat(l),icon:(0,r.jsx)(n.PJP.ehp,{})},...o]},o=(e,t)=>{if(!e)return[];let i=e.split(".");if(i.length<2)return[];let r=i.shift(),n=[];return i.reduce((e,r,a)=>{let l=a===i.length-1,o="".concat(e).concat(".").concat(r);return n.push({title:r,href:l?void 0:"".concat(t,"/").concat(o),icon:s[a]}),o},r),n}},57454:function(e,t,i){"use strict";i.d(t,{M:function(){return o}});var r=i(24246),n=i(66726),a=i.n(n),s=i(27378),l=i(86780);let o=e=>{let{value:t,onChange:i}=e,[n,o]=(0,s.useState)(t),c=a()(i,500),u=(0,s.useCallback)(e=>{o(e),c(e)},[]);return(0,r.jsx)(l.Z,{search:n,onChange:u,onClear:()=>{o(""),i("")}})}},79947:function(e,t,i){"use strict";var r=i(24246),n=i(77181);t.Z=e=>{let{type:t}=e;return(0,r.jsx)(n.kCb,{align:"center",h:"full",children:!!t&&(0,r.jsx)(n.j8w,{children:t})})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3872],{77213:function(e,t,i){i.d(t,{Z:function(){return f}});var n=i(24246),r=i(77181),s=i(88038),l=i.n(s),d=i(86677);i(27378);var a=i(25980),o=i(90867),c=i(77830),u=()=>{let e=(0,d.useRouter)();return(0,n.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(r.xuv,{children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},f=e=>{let{children:t,title:i,padded:s=!0,mainProps:c}=e,f=(0,a.hz)(),x=(0,d.useRouter)(),h="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,p=!(f.flags.privacyRequestsConfiguration&&h),{data:m}=(0,o.JE)(void 0,{skip:p}),{data:j}=(0,o.PW)(void 0,{skip:p}),v=f.flags.privacyRequestsConfiguration&&(!m||!j)&&h;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){var n=i(24246),r=i(77181),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:d,rightContent:a,style:o,...c}=e;return(0,n.jsxs)("div",{...c,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",...o}:{paddingBottom:"24px",...o},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(r.X6q,{className:i||d?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!i&&(0,n.jsx)(s.m,{className:d?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),d]})}},79789:function(e,t,i){i.d(t,{Hn:function(){return d},XU:function(){return l},Z5:function(){return a},aG:function(){return u},cB:function(){return s},hX:function(){return c},vQ:function(){return o}});var n=i(24246),r=i(77181);let s=e=>{let{text:t,...i}=e;return(0,n.jsx)(r.X6q,{fontSize:"sm",mt:4,mb:1,...i,children:t})},l=e=>{let{children:t}=e;return(0,n.jsx)(r.xvT,{fontSize:"14px",mb:4,children:t})},d=e=>{let{children:t,href:i}=e;return(0,n.jsx)(r.rUS,{href:i,textDecoration:"underline",isExternal:!0,children:t})},a=e=>{let{children:t}=e;return(0,n.jsx)(r.QI$,{fontSize:"14px",mb:4,children:t})},o=e=>{let{children:t}=e;return(0,n.jsx)(r.GSI,{fontSize:"14px",mb:4,ml:6,children:t})},c=e=>{let{children:t}=e;return(0,n.jsx)(r.EKh,{display:"block",whiteSpace:"pre",p:4,mb:4,overflowX:"scroll",children:t})},u=e=>{let{data:t}=e;return(0,n.jsxs)(r.iA_,{fontSize:"14px",children:[(0,n.jsx)(r.hrZ,{children:(0,n.jsxs)(r.Tr,{children:[(0,n.jsx)(r.Th,{children:"Permission"}),(0,n.jsx)(r.Th,{children:"Description"})]})}),(0,n.jsx)(r.p3B,{children:t.map(e=>(0,n.jsxs)(r.Tr,{children:[(0,n.jsx)(r.Td,{children:(0,n.jsx)(r.Vp9,{children:e.permission})}),(0,n.jsx)(r.Td,{children:e.description})]},e.permission))})]})}},70788:function(e,t,i){i.d(t,{m:function(){return o}});var n=i(24246),r=i(77181),s=i(79894),l=i.n(s),d=i(27378);let{Text:a}=r.AntTypography,o=e=>{let{items:t,...i}=e,s=(0,d.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,d={...e},o=d.onClick&&!d.href;return("string"==typeof d.title&&(d.title=(0,n.jsx)(a,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:d.title})),o)?d.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:d.icon,onClick:d.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:d.title}):(d.icon&&(d.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:d.icon}),d.title]})),d.href&&d.title&&(d.title=(0,n.jsx)(l(),{href:d.href,className:"ant-breadcrumb-link",children:d.title}),delete d.href)),d}),[t]);return(0,n.jsx)(r.zrq,{items:s,...i})}},89200:function(e,t,i){var n=i(24246),r=i(14481),s=i(98559),l=i(80356);t.Z=e=>{let{resource:t}=e;return(0,n.jsx)(r.G3,{value:(0,s.Z)(t),fontWeight:(0,l.Z)(t)?"semibold":"normal"})}},5945:function(e,t,i){var n=i(24246),r=i(14481),s=i(8151);let l={[s.e.ATTENTION_REQUIRED]:"error",[s.e.APPROVED]:"success",[s.e.IN_REVIEW]:"warning",[s.e.CLASSIFYING]:"info",[s.e.NONE]:"marble"};t.Z=e=>{let{status:t}=e;return(0,n.jsx)(r.A4,{color:l[t],value:t})}},98800:function(e,t,i){var n=i(24246),r=i(77181),s=i(79789);t.Z=e=>{var t;let{dataset:i,onClose:l}=e;return(0,n.jsxs)(r.dys,{isOpen:!!i,onClose:l,size:"md",children:[(0,n.jsx)(r.P1B,{}),(0,n.jsxs)(r.scA,{children:[(0,n.jsx)(r.OXI,{children:(null==i?void 0:i.name)||(null==i?void 0:i.urn)}),(0,n.jsx)(r.cCv,{}),(0,n.jsxs)(r.Ng0,{children:[(0,n.jsx)(s.cB,{text:"Title",mt:0}),(0,n.jsx)(s.XU,{children:null!==(t=null==i?void 0:i.name)&&void 0!==t?t:null==i?void 0:i.urn}),(null==i?void 0:i.description)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.cB,{text:"Description"}),(0,n.jsx)(s.XU,{children:null==i?void 0:i.description})]})]})]})]})}},81406:function(e,t,i){var n=i(24246),r=i(77181);t.Z=()=>(0,n.jsxs)(r.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,n.jsx)(r.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,n.jsx)(r.xvT,{fontSize:"sm",children:"You're up to date!"})]})},69172:function(e,t,i){var n=i(24246),r=i(92222),s=i(77181),l=i(27378),d=i(14481),a=i(72625),o=i(89200),c=i(5945),u=i(8151);let f=(0,r.Cl)(),x=e=>{let{onDetailClick:t}=e;return(0,n.jsxs)(s.v2r,{children:[(0,n.jsx)(s.j2t,{as:s.wpx,size:"small",type:"text",icon:(0,n.jsx)(s.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"dataset-actions"}),(0,n.jsx)(s.qyq,{children:(0,n.jsx)(s.sNh,{"data-testid":"view-dataset-details",onClick:t,children:"View details"})})]})};t.Z=e=>{let{onDetailClick:t}=e;return(0,l.useMemo)(()=>[f.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(o.Z,{resource:e.row.original}),header:"Dataset"}),f.display({id:"status",cell:e=>{let{row:t}=e;return(0,n.jsx)(c.Z,{status:(0,u.u)(t.original)})},header:"Status"}),f.accessor(e=>e.description,{id:"description",cell:e=>(0,n.jsx)(d.G3,{value:e.getValue()}),header:"Description"}),f.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,n.jsx)(a.Cy,{time:e.getValue()}),header:"Updated"}),f.display({id:"actions",cell:e=>{let{row:i}=e;return(0,n.jsx)(x,{onDetailClick:()=>t(i.original)})},size:25,meta:{disableRowClick:!0}})],[t])}},8151:function(e,t,i){i.d(t,{e:function(){return r},u:function(){return l}});var n,r,s=i(62656);(n=r||(r={})).ATTENTION_REQUIRED="Attention required",n.IN_REVIEW="In review",n.APPROVED="Approved",n.CLASSIFYING="Classifying",n.NONE="None";let l=e=>{if(!e)return"Approved";let t=e.diff_status===s.LL.ADDITION||e.diff_status===s.LL.REMOVAL,i=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.ADDITION]||e.child_diff_statuses[s.LL.REMOVAL]);if(t||i)return"Attention required";let n=e.diff_status===s.LL.CLASSIFICATION_QUEUED||e.diff_status===s.LL.CLASSIFYING,r=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.CLASSIFICATION_QUEUED]||e.child_diff_statuses[s.LL.CLASSIFYING]);if(n||r)return"Classifying";let l=e.diff_status===s.LL.CLASSIFICATION_ADDITION||e.diff_status===s.LL.CLASSIFICATION_UPDATE,d=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[s.LL.CLASSIFICATION_UPDATE]);return l||d?"In review":"Approved"}},7940:function(e,t,i){i.d(t,{G:function(){return r}});var n=i(62656);let r=e=>{var t,i,r;return e?e.resource_type?e.resource_type:(null===(t=e.schemas)||void 0===t?void 0:t.length)?n.D$.DATABASE:(null===(i=e.tables)||void 0===i?void 0:i.length)?n.D$.SCHEMA:(null===(r=e.fields)||void 0===r?void 0:r.length)?n.D$.TABLE:n.D$.FIELD:void 0}},98559:function(e,t){t.Z=e=>{let{name:t,urn:i,monitor_config_id:n,database_name:r,schema_name:s,table_name:l,top_level_field_name:d,top_level_field_urn:a}=e;if(!d)return t;let o=i.split(".");return a?i.replace("".concat(a).concat("."),""):([n,r,s,l,d].forEach(e=>{if(e){let t=o.indexOf(e);t>-1&&o.splice(t,1)}}),o.join("."))}},36168:function(e,t){t.Z=e=>{var t;return!!e.parent_table_urn&&null!==(t=e.sub_field_urns)&&void 0!==t&&!!t.length&&!e.top_level_field_name}},80356:function(e,t,i){var n=i(7940),r=i(36168),s=i(62656);t.Z=e=>(0,n.G)(e)!==s.D$.FIELD||(0,r.Z)(e)}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3872],{77213:function(e,t,i){i.d(t,{Z:function(){return f}});var n=i(24246),r=i(77181),s=i(88038),l=i.n(s),d=i(86677);i(27378);var a=i(25980),o=i(90867),c=i(77830),u=()=>{let e=(0,d.useRouter)();return(0,n.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(r.xuv,{children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},f=e=>{let{children:t,title:i,padded:s=!0,mainProps:c}=e,f=(0,a.hz)(),x=(0,d.useRouter)(),h="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,p=!(f.flags.privacyRequestsConfiguration&&h),{data:m}=(0,o.JE)(void 0,{skip:p}),{data:j}=(0,o.PW)(void 0,{skip:p}),v=f.flags.privacyRequestsConfiguration&&(!m||!j)&&h;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){var n=i(24246),r=i(77181),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:d,rightContent:a,style:o,...c}=e;return(0,n.jsxs)("div",{...c,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",...o}:{paddingBottom:"24px",...o},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(r.X6q,{className:i||d?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!i&&(0,n.jsx)(s.m,{className:d?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),d]})}},79789:function(e,t,i){i.d(t,{Hn:function(){return d},XU:function(){return l},Z5:function(){return a},aG:function(){return u},cB:function(){return s},hX:function(){return c},vQ:function(){return o}});var n=i(24246),r=i(77181);let s=e=>{let{text:t,...i}=e;return(0,n.jsx)(r.X6q,{fontSize:"sm",mt:4,mb:1,...i,children:t})},l=e=>{let{children:t}=e;return(0,n.jsx)(r.xvT,{fontSize:"14px",mb:4,children:t})},d=e=>{let{children:t,href:i}=e;return(0,n.jsx)(r.rUS,{href:i,textDecoration:"underline",isExternal:!0,children:t})},a=e=>{let{children:t}=e;return(0,n.jsx)(r.QI$,{fontSize:"14px",mb:4,children:t})},o=e=>{let{children:t}=e;return(0,n.jsx)(r.GSI,{fontSize:"14px",mb:4,ml:6,children:t})},c=e=>{let{children:t}=e;return(0,n.jsx)(r.EKh,{display:"block",whiteSpace:"pre",p:4,mb:4,overflowX:"scroll",children:t})},u=e=>{let{data:t}=e;return(0,n.jsxs)(r.iA_,{fontSize:"14px",children:[(0,n.jsx)(r.hrZ,{children:(0,n.jsxs)(r.Tr,{children:[(0,n.jsx)(r.Th,{children:"Permission"}),(0,n.jsx)(r.Th,{children:"Description"})]})}),(0,n.jsx)(r.p3B,{children:t.map(e=>(0,n.jsxs)(r.Tr,{children:[(0,n.jsx)(r.Td,{children:(0,n.jsx)(r.Vp9,{children:e.permission})}),(0,n.jsx)(r.Td,{children:e.description})]},e.permission))})]})}},70788:function(e,t,i){i.d(t,{m:function(){return o}});var n=i(24246),r=i(77181),s=i(79894),l=i.n(s),d=i(27378);let{Text:a}=r.AntTypography,o=e=>{let{items:t,...i}=e,s=(0,d.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,d={...e},o=d.onClick&&!d.href;return("string"==typeof d.title&&(d.title=(0,n.jsx)(a,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:d.title})),o)?d.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:d.icon,onClick:d.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:d.title}):(d.icon&&(d.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:d.icon}),d.title]})),d.href&&d.title&&(d.title=(0,n.jsx)(l(),{href:d.href,className:"ant-breadcrumb-link",children:d.title}),delete d.href)),d}),[t]);return(0,n.jsx)(r.zrq,{items:s,...i})}},89200:function(e,t,i){var n=i(24246),r=i(14481),s=i(98559),l=i(80356);t.Z=e=>{let{resource:t}=e;return(0,n.jsx)(r.G3,{value:(0,s.Z)(t),fontWeight:(0,l.Z)(t)?"semibold":"normal"})}},5945:function(e,t,i){var n=i(24246),r=i(14481),s=i(8151);let l={[s.e.ATTENTION_REQUIRED]:"error",[s.e.APPROVED]:"success",[s.e.IN_REVIEW]:"warning",[s.e.CLASSIFYING]:"info",[s.e.NONE]:"marble"};t.Z=e=>{let{status:t}=e;return(0,n.jsx)(r.A4,{color:l[t],value:t})}},98800:function(e,t,i){var n=i(24246),r=i(77181),s=i(79789);t.Z=e=>{var t;let{dataset:i,onClose:l}=e;return(0,n.jsxs)(r.dys,{isOpen:!!i,onClose:l,size:"md",children:[(0,n.jsx)(r.P1B,{}),(0,n.jsxs)(r.scA,{children:[(0,n.jsx)(r.OXI,{children:(null==i?void 0:i.name)||(null==i?void 0:i.urn)}),(0,n.jsx)(r.cCv,{}),(0,n.jsxs)(r.Ng0,{children:[(0,n.jsx)(s.cB,{text:"Title",mt:0}),(0,n.jsx)(s.XU,{children:null!==(t=null==i?void 0:i.name)&&void 0!==t?t:null==i?void 0:i.urn}),(null==i?void 0:i.description)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.cB,{text:"Description"}),(0,n.jsx)(s.XU,{children:null==i?void 0:i.description})]})]})]})]})}},81406:function(e,t,i){var n=i(24246),r=i(77181);t.Z=()=>(0,n.jsxs)(r.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,n.jsx)(r.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,n.jsx)(r.xvT,{fontSize:"sm",children:"You're up to date!"})]})},69172:function(e,t,i){var n=i(24246),r=i(92222),s=i(77181),l=i(27378),d=i(14481),a=i(72625),o=i(89200),c=i(5945),u=i(8151);let f=(0,r.Cl)(),x=e=>{let{onDetailClick:t}=e;return(0,n.jsxs)(s.v2r,{children:[(0,n.jsx)(s.j2t,{as:s.wpx,size:"small",type:"text",icon:(0,n.jsx)(s.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"dataset-actions"}),(0,n.jsx)(s.qyq,{children:(0,n.jsx)(s.sNh,{"data-testid":"view-dataset-details",onClick:t,children:"View details"})})]})};t.Z=e=>{let{onDetailClick:t}=e;return(0,l.useMemo)(()=>[f.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(o.Z,{resource:e.row.original}),header:"Dataset"}),f.display({id:"status",cell:e=>{let{row:t}=e;return(0,n.jsx)(c.Z,{status:(0,u.u)(t.original)})},header:"Status"}),f.accessor(e=>e.description,{id:"description",cell:e=>(0,n.jsx)(d.G3,{value:e.getValue()}),header:"Description"}),f.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,n.jsx)(a.Cy,{time:e.getValue()}),header:"Updated"}),f.display({id:"actions",cell:e=>{let{row:i}=e;return(0,n.jsx)(x,{onDetailClick:()=>t(i.original)})},size:25,meta:{disableRowClick:!0}})],[t])}},8151:function(e,t,i){i.d(t,{e:function(){return r},u:function(){return l}});var n,r,s=i(16643);(n=r||(r={})).ATTENTION_REQUIRED="Attention required",n.IN_REVIEW="In review",n.APPROVED="Approved",n.CLASSIFYING="Classifying",n.NONE="None";let l=e=>{if(!e)return"Approved";let t=e.diff_status===s.LL.ADDITION||e.diff_status===s.LL.REMOVAL,i=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.ADDITION]||e.child_diff_statuses[s.LL.REMOVAL]);if(t||i)return"Attention required";let n=e.diff_status===s.LL.CLASSIFICATION_QUEUED||e.diff_status===s.LL.CLASSIFYING,r=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.CLASSIFICATION_QUEUED]||e.child_diff_statuses[s.LL.CLASSIFYING]);if(n||r)return"Classifying";let l=e.diff_status===s.LL.CLASSIFICATION_ADDITION||e.diff_status===s.LL.CLASSIFICATION_UPDATE,d=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[s.LL.CLASSIFICATION_UPDATE]);return l||d?"In review":"Approved"}},7940:function(e,t,i){i.d(t,{G:function(){return r}});var n=i(16643);let r=e=>{var t,i,r;return e?e.resource_type?e.resource_type:(null===(t=e.schemas)||void 0===t?void 0:t.length)?n.D$.DATABASE:(null===(i=e.tables)||void 0===i?void 0:i.length)?n.D$.SCHEMA:(null===(r=e.fields)||void 0===r?void 0:r.length)?n.D$.TABLE:n.D$.FIELD:void 0}},98559:function(e,t){t.Z=e=>{let{name:t,urn:i,monitor_config_id:n,database_name:r,schema_name:s,table_name:l,top_level_field_name:d,top_level_field_urn:a}=e;if(!d)return t;let o=i.split(".");return a?i.replace("".concat(a).concat("."),""):([n,r,s,l,d].forEach(e=>{if(e){let t=o.indexOf(e);t>-1&&o.splice(t,1)}}),o.join("."))}},36168:function(e,t){t.Z=e=>{var t;return!!e.parent_table_urn&&null!==(t=e.sub_field_urns)&&void 0!==t&&!!t.length&&!e.top_level_field_name}},80356:function(e,t,i){var n=i(7940),r=i(36168),s=i(16643);t.Z=e=>(0,n.G)(e)!==s.D$.FIELD||(0,r.Z)(e)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[401],{97181:function(e,a,n){n.d(a,{d:function(){return d}});var l=n(24246),t=n(77181),i=n(34090),s=n(27378),r=n(91613),o=n(40324);let d=e=>{let{name:a,label:n,labelProps:d,tooltip:c,isRequired:u,layout:v="inline",helperText:h,...m}=e,[x,g,{setValue:j}]=(0,i.U$)(a),p=!!(g.touched&&g.error),[f,b]=(0,s.useState)("");x.value||"tags"!==m.mode&&"multiple"!==m.mode||(x.value=[]),"tags"===m.mode&&"string"==typeof x.value&&(x.value=[x.value]);let C="tags"===m.mode?(e,a)=>e?e.value!==f||x.value.includes(f)?m.optionRender?m.optionRender(e,a):e.label:'Create "'.concat(f,'"'):void 0:m.optionRender||void 0,y=e=>{b(e),m.onSearch&&m.onSearch(e)},_=(e,a)=>{j(e),m.onChange&&m.onChange(e,a)};return"inline"===v?(0,l.jsx)(t.NIc,{isInvalid:p,isRequired:u,children:(0,l.jsxs)(t.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,l.jsx)(o.__,{htmlFor:m.id||a,...d,children:n}):null,(0,l.jsxs)(t.jqI,{align:"center",children:[(0,l.jsxs)(t.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(t.WPr,{...x,id:m.id||a,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:C,onSearch:"tags"===m.mode?y:void 0,onChange:_,value:x.value||void 0,status:p?"error":void 0}),h&&(0,l.jsx)(t.Q6r,{children:h}),(0,l.jsx)(o.Bc,{isInvalid:p,message:g.error,fieldName:x.name})]}),c?(0,l.jsx)(r.Z,{label:c}):null]})]})}):(0,l.jsx)(t.NIc,{isInvalid:p,isRequired:u,children:(0,l.jsxs)(t.gCW,{alignItems:"start",children:[(0,l.jsxs)(t.jqI,{align:"center",children:[n?(0,l.jsx)(o.__,{htmlFor:m.id||a,fontSize:"xs",my:0,mr:1,...d,children:n}):null,c?(0,l.jsx)(r.Z,{label:c}):null]}),(0,l.jsx)(t.WPr,{...x,id:m.id||a,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:C,onSearch:"tags"===m.mode?y:void 0,onChange:_,value:x.value||void 0,status:p?"error":void 0}),h&&(0,l.jsx)(t.Q6r,{style:{marginTop:0},children:h}),(0,l.jsx)(o.Bc,{isInvalid:p,message:g.error,fieldName:x.name})]})})}},8133:function(e,a,n){var l=n(24246),t=n(77181);a.Z=e=>{let{title:a,children:n,isOpen:i,onClose:s,...r}=e;return(0,l.jsxs)(t.u_l,{isOpen:i,onClose:s,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...r,children:[(0,l.jsx)(t.ZAr,{}),(0,l.jsxs)(t.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,l.jsx)(t.xBx,{p:0,children:(0,l.jsx)(t.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,l.jsx)(t.X6q,{as:"h3",size:"sm",children:a})})}),(0,l.jsx)(t.fef,{pb:4,overflow:"auto",children:n})]})]})}},33335:function(e,a,n){n.d(a,{E:function(){return l}});let l=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")},36345:function(e,a,n){n.d(a,{Z:function(){return g}});var l=n(24246),t=n(77181),i=n(34090),s=n(27378),r=n(16134),o=n(40324);let d=(0,t.IUT)({displayName:"CompassIcon",viewBox:"0 0 512 512",path:(0,l.jsx)("path",{fill:"currentColor",d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm306.7 69.1L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})});var c=n(91613),u=n(57865);let{Text:v}=t.AntTypography,h=e=>{let{searchText:a,suggestion:n,...t}=e;return a&&n?(0,l.jsxs)(v,{"aria-hidden":!0,style:{pointerEvents:"none",position:"absolute",zIndex:10,top:"var(--ant-line-width)",bottom:"var(--ant-line-width)",left:"var(--ant-padding-sm)",lineHeight:"calc(var(--ant-control-height) - var(--ant-line-width))"},...t,children:[(0,l.jsx)(v,{className:"text-transparent",children:a}),(0,l.jsx)(v,{type:"secondary",children:n.substring(a.length)})]}):null},m="Create new system",x=e=>{let{active:a,disabled:n,onRefreshSuggestions:i}=e,s={bg:a?"complimentary.500":"gray.100"};return(0,l.jsxs)(t.gCW,{children:[(0,l.jsx)(t.LZC,{minHeight:"18px"}),(0,l.jsxs)(t.v2r,{children:[(0,l.jsx)(t.j2t,{as:t.hU,size:"sm",isDisabled:n,icon:(0,l.jsx)(d,{color:a?"white":"gray.700",boxSize:4}),"aria-label":"Update information from Compass","data-testid":"refresh-suggestions-btn",_hover:{_disabled:s},...s}),(0,l.jsx)(t.qyq,{children:(0,l.jsx)(t.sNh,{onClick:i,children:(0,l.jsx)(t.xvT,{fontSize:"xs",lineHeight:4,children:"Reset to Compass defaults"})})})]})]})};var g=e=>{var a,n;let{label:d,isCreate:v,lockedForGVL:g,options:j,isLoading:p,onVendorSelected:f}=e,b=(0,r.C)(u.bN),[C,y,{setValue:_}]=(0,i.U$)("name"),w=!!(y.touched&&y.error),I={...C,value:null!==(a=C.value)&&void 0!==a?a:""},{touched:N,values:z,setTouched:S,setFieldValue:R,validateForm:k}=(0,i.u6)(),[q,E]=(0,s.useState)(!0),Z=null!==(n=j.find(e=>e.value===I.value))&&void 0!==n?n:{label:I.value,value:I.value,description:""},W=(e,a)=>!!(null==a?void 0:a.label.toLowerCase().startsWith(e.toLowerCase())),[B,T]=(0,s.useState)(""),U=(0,s.useMemo)(()=>j.filter(e=>W(B,e)),[j,B]),A=(0,s.useMemo)(()=>{let e=j;return v&&B&&(e=[...j,{label:"".concat(m,' "').concat(B,'"...'),value:B}]),e},[v,j,B]),F=!!B&&U.length>0,L=g&&!v;(0,s.useEffect)(()=>{E(!I.value&&!z.vendor_id)},[I.value,z.vendor_id,E]),(0,s.useEffect)(()=>{k()},[q,k]);let M=async()=>{T(""),R("vendor_id",void 0),await _(""),S({...N,vendor_id:!1,name:!1}),f(void 0)},P=async e=>{if(e){let a=j.some(a=>a.value===e.value)?e.value:void 0;R("vendor_id",a),await _(e.label.startsWith(m)?e.value:e.label),S({...N,vendor_id:!0,name:!0}),f(a)}},D=async e=>{I.onBlur(e),B&&await _(B),S({...N,name:!0})},H=async e=>{U.length>0&&B!==U[0].label?(e.preventDefault(),T(U[0].label),R("vendor_id",U[0].value),await _(U[0].label),f(U[0].value)):(R("vendor_id",void 0),await _(B)),S({...N,name:!0})},O=(0,l.jsx)(t.NIc,{isInvalid:w,isRequired:!0,width:"100%",children:(0,l.jsxs)(t.gCW,{alignItems:"start",position:"relative",width:"100%",children:[(0,l.jsxs)(t.Ugi,{spacing:1,children:[(0,l.jsx)(o.__,{htmlFor:"vendorName",fontSize:"xs",my:0,mr:1,children:d}),(0,l.jsx)(c.Z,{label:"Enter the system name"})]}),(0,l.jsxs)(t.xuv,{width:"100%",className:"relative",children:[(0,l.jsx)(t.WPr,{id:"vendorName",labelInValue:!0,autoFocus:!0,allowClear:!0,options:A,loading:p,filterOption:(e,a)=>W(e,a)||!!(null==a?void 0:a.label.startsWith(m)),optionFilterProp:"label",value:Z,placeholder:"Enter system name...",disabled:L,onChange:P,onSearch:T,onClear:M,onBlur:D,onInputKeyDown:e=>{B&&"Tab"===e.key&&H(e)},status:w?"error":void 0,"data-testid":"vendor-name-select"}),(0,l.jsx)(h,{searchText:B,suggestion:U.length?U[0].label:""})]}),(0,l.jsx)(o.Bc,{isInvalid:w,message:y.error,fieldName:"name"})]})});return(0,l.jsxs)(t.Ugi,{alignItems:"flex-start",width:"full",children:[q?O:(0,l.jsx)(o.j0,{autoFocus:!0,id:"name",name:"name",label:"System name",tooltip:"Enter the system name",variant:"stacked",disabled:L,isRequired:!0,inputRightElement:L?null:(0,l.jsx)(t.PZ7,{onClick:M,size:"sm","data-testid":"clear-btn"})}),(0,l.jsx)(x,{active:!!z.vendor_id||F,disabled:!z.vendor_id||"showing"===b,onRefreshSuggestions:()=>f(z.vendor_id)})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4060],{58754:function(e,t,n){var r=n(24246),i=n(77181),l=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:o=!0,children:s,rightContent:a,style:d,...c}=e;return(0,r.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,r.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(i.X6q,{className:n||s?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,a&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!n&&(0,r.jsx)(l.m,{className:s?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),s]})}},19904:function(e,t,n){n.d(t,{Tg:function(){return o}});var r=n(24246),i=n(16134),l=n(31793);let o=e=>(0,i.C)(l.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return o(t)?(0,r.jsx)(r.Fragment,{children:n}):null}},97181:function(e,t,n){n.d(t,{d:function(){return d}});var r=n(24246),i=n(77181),l=n(34090),o=n(27378),s=n(91613),a=n(40324);let d=e=>{let{name:t,label:n,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:x,...h}=e,[m,f,{setValue:g}]=(0,l.U$)(t),y=!!(f.touched&&f.error),[j,v]=(0,o.useState)("");m.value||"tags"!==h.mode&&"multiple"!==h.mode||(m.value=[]),"tags"===h.mode&&"string"==typeof m.value&&(m.value=[m.value]);let b="tags"===h.mode?(e,t)=>e?e.value!==j||m.value.includes(j)?h.optionRender?h.optionRender(e,t):e.label:'Create "'.concat(j,'"'):void 0:h.optionRender||void 0,C=e=>{v(e),h.onSearch&&h.onSearch(e)},w=(e,t)=>{g(e),h.onChange&&h.onChange(e,t)};return"inline"===p?(0,r.jsx)(i.NIc,{isInvalid:y,isRequired:u,children:(0,r.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,r.jsx)(a.__,{htmlFor:h.id||t,...d,children:n}):null,(0,r.jsxs)(i.jqI,{align:"center",children:[(0,r.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(i.WPr,{...m,id:h.id||t,"data-testid":"controlled-select-".concat(m.name),...h,optionRender:b,onSearch:"tags"===h.mode?C:void 0,onChange:w,value:m.value||void 0,status:y?"error":void 0}),x&&(0,r.jsx)(i.Q6r,{children:x}),(0,r.jsx)(a.Bc,{isInvalid:y,message:f.error,fieldName:m.name})]}),c?(0,r.jsx)(s.Z,{label:c}):null]})]})}):(0,r.jsx)(i.NIc,{isInvalid:y,isRequired:u,children:(0,r.jsxs)(i.gCW,{alignItems:"start",children:[(0,r.jsxs)(i.jqI,{align:"center",children:[n?(0,r.jsx)(a.__,{htmlFor:h.id||t,fontSize:"xs",my:0,mr:1,...d,children:n}):null,c?(0,r.jsx)(s.Z,{label:c}):null]}),(0,r.jsx)(i.WPr,{...m,id:h.id||t,"data-testid":"controlled-select-".concat(m.name),...h,optionRender:b,onSearch:"tags"===h.mode?C:void 0,onChange:w,value:m.value||void 0,status:y?"error":void 0}),x&&(0,r.jsx)(i.Q6r,{style:{marginTop:0},children:x}),(0,r.jsx)(a.Bc,{isInvalid:y,message:f.error,fieldName:m.name})]})})}},10342:function(e,t,n){var r=n(24246),i=n(77181),l=n(91613);t.Z=e=>{let{title:t,tooltip:n,children:o,...s}=e;return(0,r.jsxs)(i.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...s,children:[(0,r.jsxs)(i.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[t,n?(0,r.jsx)(i.xvT,{as:"span",mx:1,children:(0,r.jsx)(l.Z,{label:n})}):void 0]}),(0,r.jsx)(i.Kqy,{p:6,spacing:6,children:o})]})}},58452:function(e,t,n){var r=n(24246),i=n(77181);t.Z=e=>{let{isOpen:t,onClose:n,onConfirm:l,onCancel:o,title:s,message:a,cancelButtonText:d,continueButtonText:c,isLoading:u,returnFocusOnClose:p,isCentered:x,testId:h="confirmation-modal",icon:m}=e;return(0,r.jsxs)(i.u_l,{isOpen:t,onClose:n,size:"lg",returnFocusOnClose:null==p||p,isCentered:x,children:[(0,r.jsx)(i.ZAr,{}),(0,r.jsxs)(i.hzk,{textAlign:"center",p:6,"data-testid":h,children:[m?(0,r.jsx)(i.M5Y,{mb:2,children:m}):null,s?(0,r.jsx)(i.xBx,{fontWeight:"medium",pb:0,children:s}):null,a?(0,r.jsx)(i.fef,{children:a}):null,(0,r.jsx)(i.mzw,{children:(0,r.jsxs)(i.MIq,{columns:2,width:"100%",children:[(0,r.jsx)(i.wpx,{onClick:()=>{o&&o(),n()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:u,children:d||"Cancel"}),(0,r.jsx)(i.wpx,{type:"primary",size:"large",onClick:l,"data-testid":"continue-btn",loading:u,children:c||"Continue"})]})})]})]})}},70788:function(e,t,n){n.d(t,{m:function(){return d}});var r=n(24246),i=n(77181),l=n(79894),o=n.n(l),s=n(27378);let{Text:a}=i.AntTypography,d=e=>{let{items:t,...n}=e,l=(0,s.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let l=n===t.length-1,s={...e},d=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,r.jsx)(a,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:s.title})),d)?s.title=(0,r.jsx)(i.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,r.jsx)(o(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[t]);return(0,r.jsx)(i.zrq,{items:l,...n})}},3642:function(e,t,n){var r=n(24246),i=n(77181),l=n(86677),o=n.n(l),s=n(27378),a=n(812),d=n(58452),c=n(77830),u=n(19904),p=n(46628),x=n(98795),h=n(16643);t.Z=e=>{let{property:t,triggerComponent:n}=e,l=(0,i.pmc)(),m=(0,i.qY0)(),[f]=(0,x.YW)(),g=t.experiences.length>0,y=async()=>{m.onClose();let e=await f(t.id);if((0,a.D4)(e)){l((0,p.Vo)((0,a.e$)(e.error)));return}o().push("".concat(c.ru)),l((0,p.t5)("Property ".concat(t.name," deleted successfully")))};return(0,r.jsxs)(u.ZP,{scopes:[h.Sh.PROPERTY_DELETE],children:[(0,r.jsx)(i.ua7,{label:"All of the experiences on this property must be unlinked before the property can be deleted.",placement:"right",isDisabled:!g,children:(0,r.jsx)("span",{children:s.cloneElement(n,{onClick:e=>{e.stopPropagation(),g||m.onOpen()},disabled:g})})}),(0,r.jsx)(d.Z,{isOpen:m.isOpen,onClose:m.onClose,onConfirm:y,title:"Delete ".concat(t.name),message:(0,r.jsxs)(i.xvT,{color:"gray.500",children:["You are about to delete property ",t.name,". This action is not reversible and will result in ",t.name," no longer being available for your data governance. Are you sure you want to proceed?"]}),continueButtonText:"Ok",isCentered:!0,icon:(0,r.jsx)(i.aNP,{})})]})}},18880:function(e,t,n){var r=n(24246),i=n(77181),l=n(34090),o=n(86677),s=n(27378),a=n(16134),d=n(10342),c=n(40324),u=n(812),p=n(77830),x=n(51472),h=n(94315),m=n(16643),f=n(97181),g=n(3642);let y=()=>{var e;let t=(0,a.C)(h.Zp),n=(0,a.C)(h.G1);(0,h.cq)({page:t,size:n});let i=(0,a.C)(h.w4),{values:o,setFieldValue:s}=(0,l.u6)();return(0,r.jsx)(d.Z,{title:"Experiences",children:(0,r.jsx)(x.Z,{addButtonLabel:"Add experience",idField:"id",nameField:"name",allItems:i.map(e=>({id:e.id,name:e.name})),values:null!==(e=o.experiences)&&void 0!==e?e:[],setValues:e=>s("experiences",e),draggable:!0,baseTestId:"experience"})})};t.Z=e=>{let{property:t,handleSubmit:n}=e,a=(0,o.useRouter)(),x=()=>{a.push(p.ru)},h=(0,s.useMemo)(()=>t||{name:"",type:m.uS.WEBSITE,experiences:[],messaging_templates:[],paths:[]},[t]);return(0,r.jsx)(l.J9,{enableReinitialize:!0,initialValues:h,onSubmit:n,children:e=>{let{dirty:n,isValid:o,isSubmitting:s}=e;return(0,r.jsxs)(l.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,r.jsx)(i.xuv,{py:3,children:(0,r.jsxs)(d.Z,{title:"Property details",children:[(0,r.jsx)(c.j0,{isRequired:!0,label:"Property name",name:"name",tooltip:"Unique name to identify this property",variant:"stacked"}),(0,r.jsx)(f.d,{isRequired:!0,label:"Type",name:"type",options:(0,u.MM)(m.uS),layout:"stacked"})]})}),(0,r.jsx)(i.xuv,{py:3,children:(0,r.jsx)(y,{})}),t&&(0,r.jsx)(i.xuv,{py:3,children:(0,r.jsx)(d.Z,{title:"Advanced settings",children:(0,r.jsx)(c.Io,{label:"Property ID",name:"id",tooltip:"Automatically generated unique ID for this property, used for developer configurations",variant:"stacked",readOnly:!0})})}),(0,r.jsxs)(i.kCb,{justifyContent:"space-between",width:"100%",paddingTop:2,children:[t&&(0,r.jsx)(g.Z,{property:t,triggerComponent:(0,r.jsx)(i.wpx,{"data-testid":"delete-property-button",loading:!1,className:"mr-3",children:"Delete"})}),(0,r.jsxs)(i.kCb,{justifyContent:"right",width:"100%",paddingTop:2,children:[(0,r.jsx)(i.wpx,{onClick:x,loading:!1,className:"mr-3",children:"Cancel"}),(0,r.jsx)(i.wpx,{htmlType:"submit",type:"primary",disabled:s||!n||!o,loading:s,children:"Save"})]})]})]})}})}},31883:function(e,t,n){n.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=n(19043)},11055:function(e,t,n){n.d(t,{M:function(){return u}});var r=n(24246),i=n(29427),l=n(27378),o=n(40976),s=n(18397),a=n(42308),d=n(25431),c=n(39556);let u=(0,l.forwardRef)(function({children:e,as:t="ul",axis:n="y",onReorder:u,values:h,...m},f){let g=(0,a.h)(()=>s.E[t]),y=[],j=(0,l.useRef)(!1);return(0,i.k)(!!h,"Reorder.Group must be provided a values prop"),(0,l.useEffect)(()=>{j.current=!1}),(0,r.jsx)(g,{...m,ref:f,ignoreStrict:!0,children:(0,r.jsx)(o.Y.Provider,{value:{axis:n,registerItem:(e,t)=>{let r=y.findIndex(t=>e===t.value);-1!==r?y[r].layout=t[n]:y.push({value:e,layout:t[n]}),y.sort(x)},updateOrder:(e,t,n)=>{if(j.current)return;let r=function(e,t,n,r){if(!r)return e;let i=e.findIndex(e=>e.value===t);if(-1===i)return e;let l=r>0?1:-1,o=e[i+l];if(!o)return e;let s=e[i],a=o.layout,u=(0,c.t)(a.min,a.max,.5);return 1===l&&s.layout.max+n>u||-1===l&&s.layout.min+n<u?(0,d.uo)(e,i,i+l):e}(y,e,t,n);y!==r&&(j.current=!0,u(r.map(p).filter(e=>-1!==h.indexOf(e))))}},children:e})})});function p(e){return e.value}function x(e,t){return e.layout.min-t.layout.min}},7078:function(e,t,n){n.d(t,{e:function(){return b}});var r=n(24246),i=n(29427),l=n(27378),o=n(40976),s=n(18397),a=n(42308),d=n(69222),c=n(67412);function u(e){let t=(0,a.h)(()=>(0,d.BX)(e)),{isStatic:n}=(0,l.useContext)(c._);if(n){let[,n]=(0,l.useState)(e);(0,l.useEffect)(()=>t.on("change",n),[])}return t}var p=n(13998);let x=e=>e&&"object"==typeof e&&e.mix,h=e=>x(e)?e.mix:void 0;var m=n(64306),f=n(95984);function g(e,t){let n=u(t()),r=()=>n.set(t());return r(),(0,m.L)(()=>{let t=()=>f.Wi.preRender(r,!1,!0),n=e.map(e=>e.on("change",t));return()=>{n.forEach(e=>e()),(0,f.Pn)(r)}}),n}function y(e,t){let n=(0,a.h)(()=>[]);return g(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}var j=n(3522);function v(e,t=0){return(0,j.i)(e)?e:u(t)}let b=(0,l.forwardRef)(function({children:e,style:t={},value:n,as:c="li",onDrag:u,layout:x=!0,...m},f){let j=(0,a.h)(()=>s.E[c]),b=(0,l.useContext)(o.Y),C={x:v(t.x),y:v(t.y)},w=function(e,t,n,r){if("function"==typeof e)return function(e){d.S1.current=[],e();let t=g(d.S1.current,e);return d.S1.current=void 0,t}(e);let i="function"==typeof t?t:function(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],l=e[2+n],o=e[3+n],s=(0,p.s)(i,l,{mixer:h(l[0]),...o});return t?s(r):s}(t,void 0,void 0);return Array.isArray(e)?y(e,i):y([e],([e])=>i(e))}([C.x,C.y],([e,t])=>e||t?1:"unset");(0,i.k)(!!b,"Reorder.Item must be a child of Reorder.Group");let{axis:k,registerItem:R,updateOrder:S}=b;return(0,r.jsx)(j,{drag:k,...m,dragSnapToOrigin:!0,style:{...t,x:C.x,y:C.y,zIndex:w},layout:x,onDrag:(e,t)=>{let{velocity:r}=t;r[k]&&S(n,C[k].get(),r[k]),u&&u(e,t)},onLayoutMeasure:e=>R(n,e),ref:f,ignoreStrict:!0,children:e})})},40976:function(e,t,n){n.d(t,{Y:function(){return r}});let r=(0,n(27378).createContext)(null)},47397:function(e,t,n){n.d(t,{o:function(){return o}});var r=n(42308);class i{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(n=>{n.start(e.nativeEvent||e,t)})}}let l=()=>new i;function o(){return(0,r.h)(l)}},76649:function(e,t,n){n.d(t,{Ln:function(){return r}});let r=(e,t)=>l(e,t),i=Symbol("SOME"),l=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?i in e?e.some(e=>l(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>l(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>l(n,t[e]));class o{static narrow(e){return new o(t=>r(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof o?e.NF:e instanceof Function?e:t=>r(e,t);return new o(e=>t(e)&&n(e))}}new o(e=>!0)}}]);