ethyca-fides 2.58.2b5__py2.py3-none-any.whl → 2.58.2rc0__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 (213) hide show
  1. {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/METADATA +11 -20
  2. {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/RECORD +178 -188
  3. {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/WHEEL +1 -1
  4. {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/entry_points.txt +1 -0
  5. fides/_version.py +3 -3
  6. fides/api/api/deps.py +2 -8
  7. fides/api/api/v1/endpoints/user_endpoints.py +12 -8
  8. fides/api/cryptography/identity_salt.py +13 -12
  9. fides/api/custom_types.py +1 -6
  10. fides/api/db/base.py +0 -5
  11. fides/api/db/system.py +3 -1
  12. fides/api/migrations/hash_migration_job.py +2 -2
  13. fides/api/models/attachment.py +11 -80
  14. fides/api/models/comment.py +15 -45
  15. fides/api/models/detection_discovery.py +0 -31
  16. fides/api/models/fides_user.py +9 -26
  17. fides/api/models/fides_user_invite.py +0 -2
  18. fides/api/models/privacy_experience.py +0 -68
  19. fides/api/models/privacy_request/privacy_request.py +6 -23
  20. fides/api/schemas/connection_configuration/connection_config.py +16 -30
  21. fides/api/schemas/user.py +1 -5
  22. fides/api/service/deps.py +0 -9
  23. fides/api/service/storage/s3.py +1 -14
  24. fides/api/service/user/fides_user_service.py +128 -0
  25. fides/api/task/graph_task.py +1 -1
  26. fides/api/util/collection_util.py +9 -48
  27. fides/cli/commands/pull.py +13 -77
  28. fides/core/api.py +1 -2
  29. fides/core/pull.py +7 -38
  30. fides/ui-build/static/admin/404.html +1 -1
  31. fides/ui-build/static/admin/_next/static/chunks/1150-035a721a04f4451e.js +1 -0
  32. fides/ui-build/static/admin/_next/static/chunks/1376-5cea5ef9362215e8.js +1 -0
  33. fides/ui-build/static/admin/_next/static/chunks/{2397-0d1c289b788fcc11.js → 2397-ee53235fb21b5e97.js} +1 -1
  34. fides/ui-build/static/admin/_next/static/chunks/3412-7ec8751b8182e1bf.js +1 -0
  35. fides/ui-build/static/admin/_next/static/chunks/{3855-63495367531cb776.js → 3855-b6b7865dedd7bc2a.js} +1 -1
  36. fides/ui-build/static/admin/_next/static/chunks/{3872-472bb47eb34d8fdb.js → 3872-4e053c20d546f027.js} +1 -1
  37. fides/ui-build/static/admin/_next/static/chunks/{4060-53a5c6347690a8fa.js → 4060-8d165e1236ea521a.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/4450-36234280bee624ff.js +1 -0
  39. fides/ui-build/static/admin/_next/static/chunks/4481-aab99ff80f707473.js +1 -0
  40. fides/ui-build/static/admin/_next/static/chunks/{5258-cf7b27ef51f38392.js → 5258-0658dc2274df6832.js} +1 -1
  41. fides/ui-build/static/admin/_next/static/chunks/{5480-52dc446be40725f5.js → 5480-f49696df5e8ae500.js} +1 -1
  42. fides/ui-build/static/admin/_next/static/chunks/{5487-8678d75ee1d1ef09.js → 5487-3ad50d21cdbc9209.js} +1 -1
  43. fides/ui-build/static/admin/_next/static/chunks/5973-52aee296edc44f7e.js +1 -0
  44. fides/ui-build/static/admin/_next/static/chunks/6315-fa1519cdf080f42d.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/{6372-e0bb9f8d07cc3b04.js → 6372-ca9c12ac8902365b.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/{6853-09e831e9dff7fd3b.js → 6853-8941824350c3c1a8.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/{6954-ec5276bb464d42b2.js → 6954-3b887fb444f9228c.js} +1 -1
  48. fides/ui-build/static/admin/_next/static/chunks/7453-39761c38da31257e.js +1 -0
  49. fides/ui-build/static/admin/_next/static/chunks/{7751-a70fe0e5f67f5538.js → 7751-a8f31c062d4cb09d.js} +1 -1
  50. fides/ui-build/static/admin/_next/static/chunks/{79-8e060d36d36c752c.js → 79-f9b948ebb186900f.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/{7980-72f745bff9fabcc9.js → 7980-4bd08957448dea32.js} +1 -1
  52. fides/ui-build/static/admin/_next/static/chunks/{9046-a69fa8f99c414570.js → 9046-04bd7becea207cb1.js} +1 -1
  53. fides/ui-build/static/admin/_next/static/chunks/9767-1a23925d2cb27b51.js +1 -0
  54. fides/ui-build/static/admin/_next/static/chunks/{main-090643377c8254e6.js → main-24f422f93845a596.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/{main-app-59156a9331ac7bce.js → main-app-94a0711202e08b15.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-0c1548ca3b158123.js → _app-fc89ce7bed454c84.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-9f9500c639362aa6.js → manual-9acaab973dfe86e2.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-fac606150b65d494.js → add-systems-d258f0c25fa020bf.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-fb75fa0aea77678d.js +1 -0
  60. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-c02b14c50b19bd91.js → new-a9d9402c219d13e5.js} +1 -1
  61. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-c946b33b0322b8ad.js +1 -0
  62. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-ea57f9d6ad17e957.js +1 -0
  63. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-100234c23a85d235.js → reporting-788cf0e34829af46.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-49bffaf07973fead.js → data-catalog-900004e402c31797.js} +1 -1
  65. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-727f1f5d06be674b.js → [systemId]-b66831fdafcdf67c.js} +1 -1
  66. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-5f9ef1f99818117c.js +1 -0
  67. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-d001337d1bb73bd1.js +1 -0
  68. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-11b3ce9f61d9bfe9.js +1 -0
  69. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-4d4a31d0186a4a5b.js → new-803c1b577ab17ae3.js} +1 -1
  70. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-29317d18ce34adfe.js → dataset-fa743ddc7f89d76b.js} +1 -1
  71. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-14c57e5069e9cccd.js → [id]-bbe1ca2793798e6b.js} +1 -1
  72. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-f0a4e385c1ad8fee.js → new-abc17fef69cd951b.js} +1 -1
  73. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-a78a73b65929853a.js +1 -0
  74. fides/ui-build/static/admin/_next/static/chunks/pages/{index-b70def65e264270e.js → index-bfaacdb55a5a6c9f.js} +1 -1
  75. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-d4329043219fed9b.js +1 -0
  76. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-1e60754abec1ee6b.js +1 -0
  77. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-72d64a02b7ef175e.js → [id]-fe765154315782cf.js} +1 -1
  78. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-f5f7a8069909ef24.js +1 -0
  79. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-9f7eaad05e5b9292.js +1 -0
  80. fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-fd81714d811db7b3.js → privacy-requests-d85c0d16ba09ba35.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-f035cddf17f4d898.js → datamap-afedc48ef4e7f858.js} +1 -1
  82. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-89524101b7279f6e.js +1 -0
  83. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-dfcd7a4b6aa773bd.js → custom-fields-52d030b1db2ca1b9.js} +1 -1
  84. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-24cba38685dc872c.js +1 -0
  85. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-0e0aa552f520f913.js → organization-a08693d0d1e10bc8.js} +1 -1
  86. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-1d83d5178b3eb216.js → test-datasets-151571cff4e85894.js} +1 -1
  87. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-a158fa77df288523.js → [id]-4f5a28226575c976.js} +1 -1
  88. fides/ui-build/static/admin/_next/static/chunks/pages/{systems-8490aaaee9d76a4a.js → systems-abd68fc5ddde5482.js} +1 -1
  89. fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-be1ffe267b1602e1.js → taxonomy-16b4d75c49276add.js} +1 -1
  90. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-082c3156175f9267.js → new-be690621a944bfe2.js} +1 -1
  91. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-78eaf933f755bfe8.js +1 -0
  92. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-a1db56f1cbfba373.js → user-management-6c9ad62479a7d03e.js} +1 -1
  93. fides/ui-build/static/admin/_next/static/css/{cf2744a40308fc4a.css → 113d823fe71f6af0.css} +1 -1
  94. fides/ui-build/static/admin/_next/static/o0mKeH0cB6eAYV6qOlVD0/_buildManifest.js +1 -0
  95. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  96. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  97. fides/ui-build/static/admin/add-systems.html +1 -1
  98. fides/ui-build/static/admin/ant-poc.html +1 -1
  99. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  100. fides/ui-build/static/admin/consent/configure.html +1 -1
  101. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  102. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  103. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  104. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  105. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  106. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  107. fides/ui-build/static/admin/consent/properties.html +1 -1
  108. fides/ui-build/static/admin/consent/reporting.html +1 -1
  109. fides/ui-build/static/admin/consent.html +1 -1
  110. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  111. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  112. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  113. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  114. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  115. fides/ui-build/static/admin/data-catalog.html +1 -1
  116. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  117. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  118. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  119. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  120. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  121. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  122. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  123. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  124. fides/ui-build/static/admin/datamap.html +1 -1
  125. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  126. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  127. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  128. fides/ui-build/static/admin/dataset/new.html +1 -1
  129. fides/ui-build/static/admin/dataset.html +1 -1
  130. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  131. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  132. fides/ui-build/static/admin/datastore-connection.html +1 -1
  133. fides/ui-build/static/admin/index.html +1 -1
  134. fides/ui-build/static/admin/integrations/[id].html +1 -1
  135. fides/ui-build/static/admin/integrations.html +1 -1
  136. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  137. fides/ui-build/static/admin/lib/fides-headless.js +1 -1
  138. fides/ui-build/static/admin/lib/fides-tcf.js +4 -4
  139. fides/ui-build/static/admin/lib/fides.js +3 -3
  140. fides/ui-build/static/admin/login/[provider].html +1 -1
  141. fides/ui-build/static/admin/login.html +1 -1
  142. fides/ui-build/static/admin/messaging/[id].html +1 -1
  143. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  144. fides/ui-build/static/admin/messaging.html +1 -1
  145. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  146. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  147. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  148. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  149. fides/ui-build/static/admin/privacy-requests.html +1 -1
  150. fides/ui-build/static/admin/properties/[id].html +1 -1
  151. fides/ui-build/static/admin/properties/add-property.html +1 -1
  152. fides/ui-build/static/admin/properties.html +1 -1
  153. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  154. fides/ui-build/static/admin/settings/about.html +1 -1
  155. fides/ui-build/static/admin/settings/consent.html +1 -1
  156. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  157. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  158. fides/ui-build/static/admin/settings/domains.html +1 -1
  159. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  160. fides/ui-build/static/admin/settings/locations.html +1 -1
  161. fides/ui-build/static/admin/settings/organization.html +1 -1
  162. fides/ui-build/static/admin/settings/regulations.html +1 -1
  163. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  164. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  165. fides/ui-build/static/admin/systems.html +1 -1
  166. fides/ui-build/static/admin/taxonomy.html +1 -1
  167. fides/ui-build/static/admin/user-management/new.html +1 -1
  168. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  169. fides/ui-build/static/admin/user-management.html +1 -1
  170. fides/api/alembic/migrations/versions/67d01c4e124e_add_reject_all_mechanism_to_privacy_.py +0 -56
  171. fides/api/alembic/migrations/versions/6e565c16dae1_add_tcf_publisher_restrictions.py +0 -107
  172. fides/api/alembic/migrations/versions/9288f729cac4_add_tcf_configuration_fk_to_experience_.py +0 -62
  173. fides/api/alembic/migrations/versions/99c603c1b8f9_add_password_login_enabled_and_totp_secret_to_fidesuser.py +0 -45
  174. fides/api/models/tcf_publisher_restrictions.py +0 -465
  175. fides/service/error_handling/__init__.py +0 -0
  176. fides/service/error_handling/error_handler.py +0 -202
  177. fides/service/user/__init__.py +0 -0
  178. fides/service/user/user_service.py +0 -140
  179. fides/ui-build/static/admin/_next/static/_o6WH0hDzNEhnUJyvLex7/_buildManifest.js +0 -1
  180. fides/ui-build/static/admin/_next/static/chunks/1376-87058e04584cff20.js +0 -1
  181. fides/ui-build/static/admin/_next/static/chunks/146-0ae2d30ec71fce09.js +0 -1
  182. fides/ui-build/static/admin/_next/static/chunks/1817-48e1c9d3504e18f0.js +0 -1
  183. fides/ui-build/static/admin/_next/static/chunks/3938-6a1c07d06a80cf4c.js +0 -1
  184. fides/ui-build/static/admin/_next/static/chunks/4121-4d5273d7a354994d.js +0 -1
  185. fides/ui-build/static/admin/_next/static/chunks/4450-9c3086ccb55c66aa.js +0 -1
  186. fides/ui-build/static/admin/_next/static/chunks/4481-275aa9f4c10bce53.js +0 -1
  187. fides/ui-build/static/admin/_next/static/chunks/5973-d3d3872692c1d0fa.js +0 -1
  188. fides/ui-build/static/admin/_next/static/chunks/6315-24a0483ee1cab6cc.js +0 -1
  189. fides/ui-build/static/admin/_next/static/chunks/9767-8179ce7336727141.js +0 -1
  190. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-ab3ef485f6101697.js +0 -1
  191. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-ba5325035c71a97e.js +0 -1
  192. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-ef31c181cac86c64.js +0 -1
  193. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-53efbed54d230f07.js +0 -1
  194. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-17d1525551d8904f.js +0 -1
  195. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-7d2cb947eee11262.js +0 -1
  196. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-d2f88a8fc68944db.js +0 -1
  197. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-b75ab4ee677f118d.js +0 -1
  198. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-26407674949bcbc4.js +0 -1
  199. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-28d4bdf060ec8cb2.js +0 -1
  200. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-208e49ef43361d6f.js +0 -1
  201. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-ff1985f72d50ef47.js +0 -1
  202. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-5a0b10ec955097d4.js +0 -1
  203. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-af83245e9373a064.js +0 -1
  204. fides/ui-build/static/admin/images/connector-logos/website.svg +0 -10
  205. {ethyca_fides-2.58.2b5.dist-info/licenses → ethyca_fides-2.58.2rc0.dist-info}/LICENSE +0 -0
  206. {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/top_level.txt +0 -0
  207. /fides/ui-build/static/admin/_next/static/chunks/{4723-1dd1d16f404d56a2.js → 4723-0a3c5e2ce143a7d0.js} +0 -0
  208. /fides/ui-build/static/admin/_next/static/chunks/{5826-ef0aa43ffad83acc.js → 5826-e5dcb4e68cfe6289.js} +0 -0
  209. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-a4e636eecaba5324.js → configure-723cc3d4f5740ea6.js} +0 -0
  210. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-606457ef5bd1eb04.js → [id]-72251b48e2e03a1e.js} +0 -0
  211. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-2ae030f3a28f057a.js → about-a49d0f84cf0cf05e.js} +0 -0
  212. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-72ec54ee8755a503.js → domain-records-fa42d8f18df44927.js} +0 -0
  213. /fides/ui-build/static/admin/_next/static/{_o6WH0hDzNEhnUJyvLex7 → o0mKeH0cB6eAYV6qOlVD0}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[79],{56358:function(e,t,n){n.d(t,{q:function(){return i}});var s=n(24246);let i=(0,n(77181).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,s.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,n){n.d(t,{Z:function(){return u}});var s=n(24246),i=n(77181),r=n(88038),a=n.n(r),o=n(86677);n(27378);var l=n(25980),c=n(90867),d=n(77830),p=()=>{let e=(0,o.useRouter)();return(0,s.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(i.xuv,{children:[(0,s.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(i.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,s.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},u=e=>{let{children:t,title:n,padded:r=!0,mainProps:d}=e,u=(0,l.hz)(),x=(0,o.useRouter)(),h="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,g=!(u.flags.privacyRequestsConfiguration&&h),{data:m}=(0,c.JE)(void 0,{skip:g}),{data:j}=(0,c.PW)(void 0,{skip:g}),f=u.flags.privacyRequestsConfiguration&&(!m||!j)&&h;return(0,s.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,s.jsxs)(a(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(i.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[f?(0,s.jsx)(p,{}):null,t]})]})}},58754:function(e,t,n){var s=n(24246),i=n(77181),r=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:c,...d}=e;return(0,s.jsxs)("div",{...d,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,s.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(i.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,s.jsx)(r.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,t,n){n.d(t,{Tg:function(){return a}});var s=n(24246),i=n(16134),r=n(31793);let a=e=>(0,i.C)(r.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,s.jsx)(s.Fragment,{children:n}):null}},70788:function(e,t,n){n.d(t,{m:function(){return c}});var s=n(24246),i=n(77181),r=n(79894),a=n.n(r),o=n(27378);let{Text:l}=i.AntTypography,c=e=>{let{items:t,...n}=e,r=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let r=n===t.length-1,o={...e},c=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,s.jsx)(l,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:o.title})),c)?o.title=(0,s.jsx)(i.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,s.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,s.jsx)(i.zrq,{items:r,...n})}},3642:function(e,t,n){var s=n(24246),i=n(77181),r=n(86677),a=n.n(r),o=n(27378),l=n(812),c=n(58452),d=n(77830),p=n(19904),u=n(46628),x=n(98795),h=n(28120);t.Z=e=>{let{property:t,triggerComponent:n}=e,r=(0,i.pmc)(),g=(0,i.qY0)(),[m]=(0,x.YW)(),j=t.experiences.length>0,f=async()=>{g.onClose();let e=await m(t.id);if((0,l.D4)(e)){r((0,u.Vo)((0,l.e$)(e.error)));return}a().push("".concat(d.ru)),r((0,u.t5)("Property ".concat(t.name," deleted successfully")))};return(0,s.jsxs)(p.ZP,{scopes:[h.Sh.PROPERTY_DELETE],children:[(0,s.jsx)(i.ua7,{label:"All of the experiences on this property must be unlinked before the property can be deleted.",placement:"right",isDisabled:!j,children:(0,s.jsx)("span",{children:o.cloneElement(n,{onClick:e=>{e.stopPropagation(),j||g.onOpen()},disabled:j})})}),(0,s.jsx)(c.Z,{isOpen:g.isOpen,onClose:g.onClose,onConfirm:f,title:"Delete ".concat(t.name),message:(0,s.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,s.jsx)(i.aNP,{})})]})}},25783:function(e,t,n){n.d(t,{V:function(){return M}});var s=n(24246),i=n(92222),r=n(59003),a=n(14481),o=n(77181),l=n(98784),c=n.n(l),d=n(86677),p=n(27378),u=n(77830),x=n(19904),h=n(32885),g=n(98795),m=n(28120),j=e=>{let{buttonLabel:t,buttonProps:n}=e,i=(0,d.useRouter)();return(0,s.jsx)(o.wpx,{onClick:()=>i.push(u.B9),"data-testid":"add-property-button",...n,children:t})},f=n(56358),y=n(88340),C=n(25980),b=n(14048);let v="{privacy-center-hostname-and-path}",w="{property-unique-id}",P='<script src="https://'.concat(v,"/fides.js?property_id=").concat(w,'"></script>'),R="<script>Fides.gtm()</script>";var T=e=>{let{property:t}=e,n=(0,o.qY0)(),i=(0,p.useRef)(null),{fidesCloud:r}=(0,C.hz)(),{data:a,isSuccess:l}=(0,h.Vh)(void 0,{skip:!r}),c=(0,p.useMemo)(()=>{let e=P.replace(w,t.id.toString());return r&&l&&(null==a?void 0:a.privacy_center_url)&&e.replace(v,a.privacy_center_url),e},[null==a?void 0:a.privacy_center_url,r,l,t]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.wpx,{"aria-label":"Install property",size:"small",className:"mr-[10px]",icon:(0,s.jsx)(b.A5,{}),onClick:e=>{e.stopPropagation(),n.onOpen()}}),(0,s.jsxs)(o.u_l,{isOpen:n.isOpen,onClose:n.onClose,isCentered:!0,size:"xl",initialFocusRef:i,children:[(0,s.jsx)(o.ZAr,{}),(0,s.jsxs)(o.hzk,{"data-testid":"copy-js-tag-modal",children:[(0,s.jsx)(o.xBx,{tabIndex:-1,ref:i,pb:0,children:"Install Fides Consent Manager"}),(0,s.jsx)(o.fef,{pt:3,pb:6,fontSize:"14px",fontWeight:500,children:(0,s.jsxs)(o.Kqy,{spacing:3,children:[(0,s.jsxs)(o.xvT,{children:["Copy the code below and paste it onto every page of the"," ",t.name," property."]}),(0,s.jsxs)(o.xvT,{children:["1. Paste this code as high in the ",(0,s.jsx)("b",{children:"<head>"})," of the page as possible:"]}),(0,s.jsxs)(o.EKh,{display:"flex",justifyContent:"space-between",alignItems:"top",p:0,children:[(0,s.jsx)(o.xvT,{p:4,children:c}),(0,s.jsx)(y.Z,{copyText:c})]}),(0,s.jsx)(o.xvT,{children:"2. Optionally, you can enable Google Tag Manager for managing tags on your website by including the script tag below along with the Fides.js tag. Place it below the Fides.js script tag."}),(0,s.jsxs)(o.EKh,{display:"flex",justifyContent:"space-between",alignItems:"center",p:0,children:[(0,s.jsx)(o.xvT,{p:4,children:R}),(0,s.jsx)(y.Z,{copyText:R})]}),(0,s.jsxs)(o.xvT,{children:["For more information about adding a JavaScript tag to your website, please visit"," ",(0,s.jsx)(o.rUS,{color:"complimentary.500",href:"https://docs.ethyca.com/tutorials/consent-management-configuration/install-fides#install-fidesjs-script-on-your-website",isExternal:!0,children:"docs.ethyca.com"})]})]})})]})]})]})},k=n(3642),E=e=>{let{property:t}=e,n=(0,d.useRouter)(),i=()=>{n.push("".concat(u.ru,"/").concat(t.id))};return(0,s.jsxs)(o.xuv,{py:2,children:[(0,s.jsx)(T,{property:t}),(0,s.jsx)(x.ZP,{scopes:[m.Sh.PROPERTY_UPDATE],children:(0,s.jsx)(o.wpx,{"aria-label":"Edit property","data-testid":"edit-property-button",size:"small",className:"mr-[10px]",icon:(0,s.jsx)(o.dY8,{}),onClick:e=>{e.stopPropagation(),i()}})}),(0,s.jsx)(k.Z,{property:t,triggerComponent:(0,s.jsx)(o.wpx,{"aria-label":"Delete property","data-testid":"delete-property-button",size:"small",className:"mr-[10px]",icon:(0,s.jsx)(f.q,{})})})]})};let z=(0,i.Cl)(),Z={items:[],total:0,page:1,size:25,pages:1},H=()=>(0,s.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,s.jsxs)(o.gCW,{children:[(0,s.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No properties found."}),(0,s.jsxs)(x.ZP,{scopes:[m.Sh.PROPERTY_CREATE],children:[(0,s.jsx)(o.xvT,{fontSize:"sm",children:"Click “Add property” to add your first property to Fides."}),(0,s.jsx)(j,{buttonLabel:"Add property",buttonProps:{type:"primary"}})]})]})}),M=()=>{let{isLoading:e}=(0,h.x8)(),t=(0,x.Tg)([m.Sh.PROPERTY_UPDATE]),{PAGE_SIZES:n,pageSize:l,setPageSize:f,onPreviousPageClick:y,isPreviousPageDisabled:C,onNextPageClick:b,isNextPageDisabled:v,startRange:w,endRange:P,pageIndex:R,setTotalPages:T,resetPageIndexToDefault:k}=(0,a.oi)(),M=(0,d.useRouter)(),[S,V]=(0,p.useState)(),_=(0,p.useCallback)(e=>{k(),V(e)},[k,V]),{isFetching:q,isLoading:N,data:O}=(0,g.gz)({page:R,size:l,search:S}),{items:A,total:F,pages:I}=(0,p.useMemo)(()=>O||Z,[O]);(0,p.useEffect)(()=>{T(I)},[I,T]);let L=(0,p.useMemo)(()=>[z.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(a.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(a.Rr,{value:"Property",...e})}),z.accessor(e=>e.type,{id:"type",cell:e=>(0,s.jsx)(a.G3,{value:c().capitalize(e.getValue())}),header:e=>(0,s.jsx)(a.Rr,{value:"Type",...e})}),z.accessor(e=>e.experiences.map(e=>e.name),{id:"experiences",cell:e=>(0,s.jsx)(a.WP,{suffix:"experiences",value:e.getValue(),...e}),header:e=>(0,s.jsx)(a.Rr,{value:"Experience",...e}),meta:{showHeaderMenu:!0}}),z.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e;return(0,s.jsx)(E,{property:t.original})}})],[]),W=(0,r.b7)({getCoreRowModel:(0,i.sC)(),getGroupedRowModel:(0,i.qe)(),getExpandedRowModel:(0,i.rV)(),columns:L,manualPagination:!0,data:A,state:{expanded:!0},columnResizeMode:"onChange"});return N||e?(0,s.jsx)(a.I4,{rowHeight:36,numRows:15}):(0,s.jsx)("div",{children:(0,s.jsxs)(o.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,s.jsxs)(a.Q$,{children:[(0,s.jsx)(a.HO,{globalFilter:S,setGlobalFilter:_,placeholder:"Search property"}),(0,s.jsx)(o.Ugi,{alignItems:"center",spacing:4,children:(0,s.jsx)(x.ZP,{scopes:[m.Sh.PROPERTY_CREATE],children:(0,s.jsx)(j,{buttonLabel:"Add property"})})})]}),(0,s.jsx)(a.ZK,{tableInstance:W,onRowClick:e=>{t&&M.push({pathname:u.D3,query:{id:e.id}})},emptyTableNotice:(0,s.jsx)(H,{})}),(0,s.jsx)(a.s8,{totalRows:F||0,pageSizes:n,setPageSize:f,onPreviousPageClick:y,isPreviousPageDisabled:C||q,onNextPageClick:b,isNextPageDisabled:v||q,startRange:w,endRange:P})]})})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[79],{56358:function(e,t,n){n.d(t,{q:function(){return i}});var s=n(24246);let i=(0,n(77181).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,s.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,n){n.d(t,{Z:function(){return u}});var s=n(24246),i=n(77181),r=n(88038),a=n.n(r),o=n(86677);n(27378);var l=n(25980),c=n(90867),d=n(77830),p=()=>{let e=(0,o.useRouter)();return(0,s.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(i.xuv,{children:[(0,s.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(i.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,s.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},u=e=>{let{children:t,title:n,padded:r=!0,mainProps:d}=e,u=(0,l.hz)(),x=(0,o.useRouter)(),h="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,g=!(u.flags.privacyRequestsConfiguration&&h),{data:m}=(0,c.JE)(void 0,{skip:g}),{data:j}=(0,c.PW)(void 0,{skip:g}),f=u.flags.privacyRequestsConfiguration&&(!m||!j)&&h;return(0,s.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,s.jsxs)(a(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(i.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[f?(0,s.jsx)(p,{}):null,t]})]})}},58754:function(e,t,n){var s=n(24246),i=n(77181),r=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:c,...d}=e;return(0,s.jsxs)("div",{...d,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,s.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(i.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,s.jsx)(r.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,t,n){n.d(t,{Tg:function(){return a}});var s=n(24246),i=n(16134),r=n(31793);let a=e=>(0,i.C)(r.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,s.jsx)(s.Fragment,{children:n}):null}},70788:function(e,t,n){n.d(t,{m:function(){return c}});var s=n(24246),i=n(77181),r=n(79894),a=n.n(r),o=n(27378);let{Text:l}=i.AntTypography,c=e=>{let{items:t,...n}=e,r=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let r=n===t.length-1,o={...e},c=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,s.jsx)(l,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:o.title})),c)?o.title=(0,s.jsx)(i.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,s.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,s.jsx)(i.zrq,{items:r,...n})}},3642:function(e,t,n){var s=n(24246),i=n(77181),r=n(86677),a=n.n(r),o=n(27378),l=n(812),c=n(58452),d=n(77830),p=n(19904),u=n(46628),x=n(98795),h=n(21702);t.Z=e=>{let{property:t,triggerComponent:n}=e,r=(0,i.pmc)(),g=(0,i.qY0)(),[m]=(0,x.YW)(),j=t.experiences.length>0,f=async()=>{g.onClose();let e=await m(t.id);if((0,l.D4)(e)){r((0,u.Vo)((0,l.e$)(e.error)));return}a().push("".concat(d.ru)),r((0,u.t5)("Property ".concat(t.name," deleted successfully")))};return(0,s.jsxs)(p.ZP,{scopes:[h.Sh.PROPERTY_DELETE],children:[(0,s.jsx)(i.ua7,{label:"All of the experiences on this property must be unlinked before the property can be deleted.",placement:"right",isDisabled:!j,children:(0,s.jsx)("span",{children:o.cloneElement(n,{onClick:e=>{e.stopPropagation(),j||g.onOpen()},disabled:j})})}),(0,s.jsx)(c.Z,{isOpen:g.isOpen,onClose:g.onClose,onConfirm:f,title:"Delete ".concat(t.name),message:(0,s.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,s.jsx)(i.aNP,{})})]})}},25783:function(e,t,n){n.d(t,{V:function(){return M}});var s=n(24246),i=n(92222),r=n(59003),a=n(14481),o=n(77181),l=n(98784),c=n.n(l),d=n(86677),p=n(27378),u=n(77830),x=n(19904),h=n(32885),g=n(98795),m=n(21702),j=e=>{let{buttonLabel:t,buttonProps:n}=e,i=(0,d.useRouter)();return(0,s.jsx)(o.wpx,{onClick:()=>i.push(u.B9),"data-testid":"add-property-button",...n,children:t})},f=n(56358),y=n(88340),C=n(25980),b=n(14048);let v="{privacy-center-hostname-and-path}",w="{property-unique-id}",P='<script src="https://'.concat(v,"/fides.js?property_id=").concat(w,'"></script>'),R="<script>Fides.gtm()</script>";var T=e=>{let{property:t}=e,n=(0,o.qY0)(),i=(0,p.useRef)(null),{fidesCloud:r}=(0,C.hz)(),{data:a,isSuccess:l}=(0,h.Vh)(void 0,{skip:!r}),c=(0,p.useMemo)(()=>{let e=P.replace(w,t.id.toString());return r&&l&&(null==a?void 0:a.privacy_center_url)&&e.replace(v,a.privacy_center_url),e},[null==a?void 0:a.privacy_center_url,r,l,t]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.wpx,{"aria-label":"Install property",size:"small",className:"mr-[10px]",icon:(0,s.jsx)(b.A5,{}),onClick:e=>{e.stopPropagation(),n.onOpen()}}),(0,s.jsxs)(o.u_l,{isOpen:n.isOpen,onClose:n.onClose,isCentered:!0,size:"xl",initialFocusRef:i,children:[(0,s.jsx)(o.ZAr,{}),(0,s.jsxs)(o.hzk,{"data-testid":"copy-js-tag-modal",children:[(0,s.jsx)(o.xBx,{tabIndex:-1,ref:i,pb:0,children:"Install Fides Consent Manager"}),(0,s.jsx)(o.fef,{pt:3,pb:6,fontSize:"14px",fontWeight:500,children:(0,s.jsxs)(o.Kqy,{spacing:3,children:[(0,s.jsxs)(o.xvT,{children:["Copy the code below and paste it onto every page of the"," ",t.name," property."]}),(0,s.jsxs)(o.xvT,{children:["1. Paste this code as high in the ",(0,s.jsx)("b",{children:"<head>"})," of the page as possible:"]}),(0,s.jsxs)(o.EKh,{display:"flex",justifyContent:"space-between",alignItems:"top",p:0,children:[(0,s.jsx)(o.xvT,{p:4,children:c}),(0,s.jsx)(y.Z,{copyText:c})]}),(0,s.jsx)(o.xvT,{children:"2. Optionally, you can enable Google Tag Manager for managing tags on your website by including the script tag below along with the Fides.js tag. Place it below the Fides.js script tag."}),(0,s.jsxs)(o.EKh,{display:"flex",justifyContent:"space-between",alignItems:"center",p:0,children:[(0,s.jsx)(o.xvT,{p:4,children:R}),(0,s.jsx)(y.Z,{copyText:R})]}),(0,s.jsxs)(o.xvT,{children:["For more information about adding a JavaScript tag to your website, please visit"," ",(0,s.jsx)(o.rUS,{color:"complimentary.500",href:"https://docs.ethyca.com/tutorials/consent-management-configuration/install-fides#install-fidesjs-script-on-your-website",isExternal:!0,children:"docs.ethyca.com"})]})]})})]})]})]})},k=n(3642),E=e=>{let{property:t}=e,n=(0,d.useRouter)(),i=()=>{n.push("".concat(u.ru,"/").concat(t.id))};return(0,s.jsxs)(o.xuv,{py:2,children:[(0,s.jsx)(T,{property:t}),(0,s.jsx)(x.ZP,{scopes:[m.Sh.PROPERTY_UPDATE],children:(0,s.jsx)(o.wpx,{"aria-label":"Edit property","data-testid":"edit-property-button",size:"small",className:"mr-[10px]",icon:(0,s.jsx)(o.dY8,{}),onClick:e=>{e.stopPropagation(),i()}})}),(0,s.jsx)(k.Z,{property:t,triggerComponent:(0,s.jsx)(o.wpx,{"aria-label":"Delete property","data-testid":"delete-property-button",size:"small",className:"mr-[10px]",icon:(0,s.jsx)(f.q,{})})})]})};let z=(0,i.Cl)(),Z={items:[],total:0,page:1,size:25,pages:1},H=()=>(0,s.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,s.jsxs)(o.gCW,{children:[(0,s.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No properties found."}),(0,s.jsxs)(x.ZP,{scopes:[m.Sh.PROPERTY_CREATE],children:[(0,s.jsx)(o.xvT,{fontSize:"sm",children:"Click “Add property” to add your first property to Fides."}),(0,s.jsx)(j,{buttonLabel:"Add property",buttonProps:{type:"primary"}})]})]})}),M=()=>{let{isLoading:e}=(0,h.x8)(),t=(0,x.Tg)([m.Sh.PROPERTY_UPDATE]),{PAGE_SIZES:n,pageSize:l,setPageSize:f,onPreviousPageClick:y,isPreviousPageDisabled:C,onNextPageClick:b,isNextPageDisabled:v,startRange:w,endRange:P,pageIndex:R,setTotalPages:T,resetPageIndexToDefault:k}=(0,a.oi)(),M=(0,d.useRouter)(),[S,V]=(0,p.useState)(),_=(0,p.useCallback)(e=>{k(),V(e)},[k,V]),{isFetching:q,isLoading:N,data:O}=(0,g.gz)({page:R,size:l,search:S}),{items:A,total:F,pages:I}=(0,p.useMemo)(()=>O||Z,[O]);(0,p.useEffect)(()=>{T(I)},[I,T]);let L=(0,p.useMemo)(()=>[z.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(a.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(a.Rr,{value:"Property",...e})}),z.accessor(e=>e.type,{id:"type",cell:e=>(0,s.jsx)(a.G3,{value:c().capitalize(e.getValue())}),header:e=>(0,s.jsx)(a.Rr,{value:"Type",...e})}),z.accessor(e=>e.experiences.map(e=>e.name),{id:"experiences",cell:e=>(0,s.jsx)(a.WP,{suffix:"experiences",value:e.getValue(),...e}),header:e=>(0,s.jsx)(a.Rr,{value:"Experience",...e}),meta:{showHeaderMenu:!0}}),z.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e;return(0,s.jsx)(E,{property:t.original})}})],[]),W=(0,r.b7)({getCoreRowModel:(0,i.sC)(),getGroupedRowModel:(0,i.qe)(),getExpandedRowModel:(0,i.rV)(),columns:L,manualPagination:!0,data:A,state:{expanded:!0},columnResizeMode:"onChange"});return N||e?(0,s.jsx)(a.I4,{rowHeight:36,numRows:15}):(0,s.jsx)("div",{children:(0,s.jsxs)(o.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,s.jsxs)(a.Q$,{children:[(0,s.jsx)(a.HO,{globalFilter:S,setGlobalFilter:_,placeholder:"Search property"}),(0,s.jsx)(o.Ugi,{alignItems:"center",spacing:4,children:(0,s.jsx)(x.ZP,{scopes:[m.Sh.PROPERTY_CREATE],children:(0,s.jsx)(j,{buttonLabel:"Add property"})})})]}),(0,s.jsx)(a.ZK,{tableInstance:W,onRowClick:e=>{t&&M.push({pathname:u.D3,query:{id:e.id}})},emptyTableNotice:(0,s.jsx)(H,{})}),(0,s.jsx)(a.s8,{totalRows:F||0,pageSizes:n,setPageSize:f,onPreviousPageClick:y,isPreviousPageDisabled:C||q,onNextPageClick:b,isNextPageDisabled:v||q,startRange:w,endRange:P})]})})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7980],{58754:function(e,t,i){var l=i(24246),n=i(77181),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:a=!0,children:s,rightContent:o,style:d,...u}=e;return(0,l.jsxs)("div",{...u,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,l.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,l.jsx)(n.X6q,{className:i||s?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,o&&(0,l.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,l.jsx)(r.m,{className:s?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),s]})}},94799:function(e,t,i){i.d(t,{k:function(){return r}});var l=i(76649);let n=e=>(0,l.Ln)({id:"string"},e),r=e=>(null!=e?e:[]).filter(n)},30320:function(e,t,i){i.d(t,{m:function(){return o}});var l=i(27378),n=i(25980),r=i(14047),a=i(32885),s=i(94799);let o=e=>{let{resourceFidesKey:t,resourceType:i}=e,{errorAlert:o}=(0,r.V)(),{plus:d}=(0,n.hz)(),u=(0,l.useMemo)(()=>null!=t?t:"",[]),c=(0,a.YU)(!0,{skip:!d}),p=(0,a.VN)(i,{skip:!d}),{data:m,isLoading:x,error:h,isError:v}=(0,a.PV)(null!=t?t:"",{skip:""!==u&&!(d&&u)}),[f]=(0,a._D)(),g=c.isLoading||p.isLoading||x,j=(0,l.useMemo)(()=>new Map((0,s.k)(c.data).map(e=>{var t;return[e.id,{...e,options:(null!==(t=e.allowed_values)&&void 0!==t?t:[]).map(e=>({value:e,label:e}))}]})),[c.data]),_=(0,l.useMemo)(()=>{var e;return null===(e=p.data)||void 0===e?void 0:e.filter(e=>e.active)},[p.data]),C=(0,l.useMemo)(()=>new Map((0,s.k)(_).map(e=>[e.id,e])),[_]),b=(0,l.useMemo)(()=>v&&(null==h?void 0:h.status)===404?new Map:new Map((0,s.k)(m).map(e=>[e.custom_field_definition_id,e])),[m,v,h]),S=(0,l.useMemo)(()=>{let e=[...C.keys()];return e.sort(),e},[C]),y=(0,l.useMemo)(()=>{let e={};return _&&b&&_.forEach(t=>{let i=b.get(t.id||"");i&&(t.allow_list_id&&"string[]"===t.field_type?e[i.custom_field_definition_id]=i.value:e[i.custom_field_definition_id]=i.value.toString())}),e},[_,b]),T=(0,l.useCallback)(async e=>{if(!d)return;let l="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!l)return;let{customFieldValues:n}=e;if(!n||0===Object.keys(n).length)return;let r=[],a=[];S.forEach(e=>{let t=b.get(e),i=n[e];void 0===i||""===i||Array.isArray(i)&&0===i.length?(null==t?void 0:t.id)&&a.push(t.id):r.push({custom_field_definition_id:e,resource_id:l,id:null==t?void 0:t.id,value:i})});try{await f({resource_type:i,resource_id:l,upsert:r,delete:a})}catch(e){o("One or more custom fields have failed to save, please try again."),console.error(e)}},[d,b,o,t,S,f,i]);return{customFieldValues:y,definitionIdToCustomField:b,idToAllowListWithOptions:j,idToCustomFieldDefinition:C,isEnabled:d,isLoading:g,sortedCustomFieldDefinitionIds:S,upsertCustomFields:T}}},95346:function(e,t,i){i.d(t,{uc:function(){return f},Hn:function(){return o},Uv:function(){return a},C7:function(){return d},mZ:function(){return v.m}});var l,n,r,a,s=i(28120);(l=r||(r={}))[l.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",l[l.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",l[l.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",s.AL.STRING,s.AL.STRING_,(n=a||(a={})).SINGLE_SELECT="singleSelect",n.MULTIPLE_SELECT="multipleSelect",n.OPEN_TEXT="openText";let o=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Open Text",value:"openText"}],d=[{label:"taxonomy:".concat(s.P6.DATA_CATEGORY),value:s.P6.DATA_CATEGORY},{label:"taxonomy:".concat(s.P6.DATA_SUBJECT),value:s.P6.DATA_SUBJECT},{label:"taxonomy:".concat(s.P6.DATA_USE),value:s.P6.DATA_USE},{label:"".concat(s.P6.SYSTEM,":information"),value:s.P6.SYSTEM},{label:"system:data use",value:s.P6.PRIVACY_DECLARATION}];var u=i(24246),c=i(77181),p=i(34090),m=i(30234),x=i(97181),h=i(40324),v=i(30320);let f=e=>{let{resourceFidesKey:t,resourceType:i}=e,{idToAllowListWithOptions:l,idToCustomFieldDefinition:n,isEnabled:r,isLoading:a,sortedCustomFieldDefinitionIds:o}=(0,v.m)({resourceFidesKey:t,resourceType:i});return r&&0!==o.length?(0,u.jsx)(m.Z,{heading:"Custom fields",children:(0,u.jsx)(c.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,u.jsx)(c.kCb,{flexDir:"column",gap:"24px",children:a?(0,u.jsx)(c.M5Y,{children:(0,u.jsx)(c.$jN,{})}):o.length>0&&(0,u.jsx)(c.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:o.map(e=>{let t=n.get(e);if(!t)return null;let i="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===s.AL.STRING)return(0,u.jsx)(p.gN,{name:i,children:e=>{let{field:i}=e;return(0,u.jsx)(h.j0,{...i,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let r=l.get(t.allow_list_id);if(!r)return null;let{options:a}=r;return(0,u.jsx)(x.d,{name:i,allowClear:!0,mode:t.field_type!==s.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};i(94799)},97181:function(e,t,i){i.d(t,{d:function(){return d}});var l=i(24246),n=i(77181),r=i(34090),a=i(27378),s=i(91613),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:u,isRequired:c,layout:p="inline",...m}=e,[x,h,{setValue:v}]=(0,r.U$)(t),f=!!(h.touched&&h.error),[g,j]=(0,a.useState)("");x.value||"tags"!==m.mode&&"multiple"!==m.mode||(x.value=[]),"tags"===m.mode&&"string"==typeof x.value&&(x.value=[x.value]);let _="tags"===m.mode?(e,t)=>e?e.value!==g||x.value.includes(g)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:m.optionRender||void 0,C=e=>{j(e),m.onSearch&&m.onSearch(e)},b=(e,t)=>{v(e),m.onChange&&m.onChange(e,t)};return"inline"===p?(0,l.jsx)(n.NIc,{isInvalid:f,isRequired:c,children:(0,l.jsxs)(n.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,l.jsx)(o.__,{htmlFor:m.id||t,...d,children:i}):null,(0,l.jsxs)(n.jqI,{align:"center",children:[(0,l.jsxs)(n.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(n.WPr,{...x,id:m.id||t,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:_,onSearch:"tags"===m.mode?C:void 0,onChange:b,value:x.value||void 0,status:f?"error":void 0}),(0,l.jsx)(o.Bc,{isInvalid:f,message:h.error,fieldName:x.name})]}),u?(0,l.jsx)(s.Z,{label:u}):null]})]})}):(0,l.jsx)(n.NIc,{isInvalid:f,isRequired:c,children:(0,l.jsxs)(n.gCW,{alignItems:"start",children:[(0,l.jsxs)(n.jqI,{align:"center",children:[i?(0,l.jsx)(o.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,u?(0,l.jsx)(s.Z,{label:u}):null]}),(0,l.jsx)(n.WPr,{...x,id:m.id||t,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:_,onSearch:"tags"===m.mode?C:void 0,onChange:b,value:x.value||void 0,status:f?"error":void 0}),(0,l.jsx)(o.Bc,{isInvalid:f,message:h.error,fieldName:x.name})]})})}},14047:function(e,t,i){i.d(t,{H:function(){return r},V:function(){return l.V}});var l=i(84306),n=i(812);let r=()=>{let{errorAlert:e}=(0,l.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){i.d(t,{V:function(){return r}});var l=i(24246),n=i(77181);let r=()=>{let e=(0,n.pmc)();return{errorAlert:(t,i,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,l.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,l.jsx)(n.zMQ,{}),(0,l.jsxs)(n.xuv,{children:[i&&(0,l.jsx)(n.CdC,{children:i}),(0,l.jsx)(n.XaZ,{children:t})]}),(0,l.jsx)(n.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(t,i,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,l.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,l.jsx)(n.zMQ,{}),(0,l.jsxs)(n.xuv,{children:[i&&(0,l.jsx)(n.CdC,{children:i}),(0,l.jsx)(n.XaZ,{children:t})]}),(0,l.jsx)(n.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},70788:function(e,t,i){i.d(t,{m:function(){return d}});var l=i(24246),n=i(77181),r=i(79894),a=i.n(r),s=i(27378);let{Text:o}=n.AntTypography,d=e=>{let{items:t,...i}=e,r=(0,s.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,s={...e},d=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,l.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:s.title})),d)?s.title=(0,l.jsx)(n.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,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,l.jsx)(a(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[t]);return(0,l.jsx)(n.zrq,{items:r,...i})}},30234:function(e,t,i){var l=i(24246),n=i(77181);t.Z=e=>{let{heading:t,HeadingButton:i,children:r}=e;return(0,l.jsx)(n.Kqy,{spacing:4,children:(0,l.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,l.jsxs)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,l.jsx)(n.X6q,{as:"h3",size:"xs",children:t}),i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.LZC,{}),(0,l.jsx)(i,{})]}):null]}),(0,l.jsx)(n.Kqy,{spacing:4,px:6,py:6,children:r})]})})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7980],{58754:function(e,t,i){var l=i(24246),n=i(77181),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:a=!0,children:s,rightContent:o,style:d,...u}=e;return(0,l.jsxs)("div",{...u,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,l.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,l.jsx)(n.X6q,{className:i||s?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,o&&(0,l.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,l.jsx)(r.m,{className:s?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),s]})}},94799:function(e,t,i){i.d(t,{k:function(){return r}});var l=i(76649);let n=e=>(0,l.Ln)({id:"string"},e),r=e=>(null!=e?e:[]).filter(n)},30320:function(e,t,i){i.d(t,{m:function(){return o}});var l=i(27378),n=i(25980),r=i(14047),a=i(32885),s=i(94799);let o=e=>{let{resourceFidesKey:t,resourceType:i}=e,{errorAlert:o}=(0,r.V)(),{plus:d}=(0,n.hz)(),u=(0,l.useMemo)(()=>null!=t?t:"",[]),c=(0,a.YU)(!0,{skip:!d}),p=(0,a.VN)(i,{skip:!d}),{data:m,isLoading:x,error:h,isError:v}=(0,a.PV)(null!=t?t:"",{skip:""!==u&&!(d&&u)}),[f]=(0,a._D)(),g=c.isLoading||p.isLoading||x,j=(0,l.useMemo)(()=>new Map((0,s.k)(c.data).map(e=>{var t;return[e.id,{...e,options:(null!==(t=e.allowed_values)&&void 0!==t?t:[]).map(e=>({value:e,label:e}))}]})),[c.data]),_=(0,l.useMemo)(()=>{var e;return null===(e=p.data)||void 0===e?void 0:e.filter(e=>e.active)},[p.data]),C=(0,l.useMemo)(()=>new Map((0,s.k)(_).map(e=>[e.id,e])),[_]),b=(0,l.useMemo)(()=>v&&(null==h?void 0:h.status)===404?new Map:new Map((0,s.k)(m).map(e=>[e.custom_field_definition_id,e])),[m,v,h]),S=(0,l.useMemo)(()=>{let e=[...C.keys()];return e.sort(),e},[C]),y=(0,l.useMemo)(()=>{let e={};return _&&b&&_.forEach(t=>{let i=b.get(t.id||"");i&&(t.allow_list_id&&"string[]"===t.field_type?e[i.custom_field_definition_id]=i.value:e[i.custom_field_definition_id]=i.value.toString())}),e},[_,b]),T=(0,l.useCallback)(async e=>{if(!d)return;let l="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!l)return;let{customFieldValues:n}=e;if(!n||0===Object.keys(n).length)return;let r=[],a=[];S.forEach(e=>{let t=b.get(e),i=n[e];void 0===i||""===i||Array.isArray(i)&&0===i.length?(null==t?void 0:t.id)&&a.push(t.id):r.push({custom_field_definition_id:e,resource_id:l,id:null==t?void 0:t.id,value:i})});try{await f({resource_type:i,resource_id:l,upsert:r,delete:a})}catch(e){o("One or more custom fields have failed to save, please try again."),console.error(e)}},[d,b,o,t,S,f,i]);return{customFieldValues:y,definitionIdToCustomField:b,idToAllowListWithOptions:j,idToCustomFieldDefinition:C,isEnabled:d,isLoading:g,sortedCustomFieldDefinitionIds:S,upsertCustomFields:T}}},95346:function(e,t,i){i.d(t,{uc:function(){return f},Hn:function(){return o},Uv:function(){return a},C7:function(){return d},mZ:function(){return v.m}});var l,n,r,a,s=i(21702);(l=r||(r={}))[l.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",l[l.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",l[l.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",s.AL.STRING,s.AL.STRING_,(n=a||(a={})).SINGLE_SELECT="singleSelect",n.MULTIPLE_SELECT="multipleSelect",n.OPEN_TEXT="openText";let o=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Open Text",value:"openText"}],d=[{label:"taxonomy:".concat(s.P6.DATA_CATEGORY),value:s.P6.DATA_CATEGORY},{label:"taxonomy:".concat(s.P6.DATA_SUBJECT),value:s.P6.DATA_SUBJECT},{label:"taxonomy:".concat(s.P6.DATA_USE),value:s.P6.DATA_USE},{label:"".concat(s.P6.SYSTEM,":information"),value:s.P6.SYSTEM},{label:"system:data use",value:s.P6.PRIVACY_DECLARATION}];var u=i(24246),c=i(77181),p=i(34090),m=i(30234),x=i(97181),h=i(40324),v=i(30320);let f=e=>{let{resourceFidesKey:t,resourceType:i}=e,{idToAllowListWithOptions:l,idToCustomFieldDefinition:n,isEnabled:r,isLoading:a,sortedCustomFieldDefinitionIds:o}=(0,v.m)({resourceFidesKey:t,resourceType:i});return r&&0!==o.length?(0,u.jsx)(m.Z,{heading:"Custom fields",children:(0,u.jsx)(c.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,u.jsx)(c.kCb,{flexDir:"column",gap:"24px",children:a?(0,u.jsx)(c.M5Y,{children:(0,u.jsx)(c.$jN,{})}):o.length>0&&(0,u.jsx)(c.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:o.map(e=>{let t=n.get(e);if(!t)return null;let i="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===s.AL.STRING)return(0,u.jsx)(p.gN,{name:i,children:e=>{let{field:i}=e;return(0,u.jsx)(h.j0,{...i,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let r=l.get(t.allow_list_id);if(!r)return null;let{options:a}=r;return(0,u.jsx)(x.d,{name:i,allowClear:!0,mode:t.field_type!==s.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};i(94799)},97181:function(e,t,i){i.d(t,{d:function(){return d}});var l=i(24246),n=i(77181),r=i(34090),a=i(27378),s=i(91613),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:u,isRequired:c,layout:p="inline",...m}=e,[x,h,{setValue:v}]=(0,r.U$)(t),f=!!(h.touched&&h.error),[g,j]=(0,a.useState)("");x.value||"tags"!==m.mode&&"multiple"!==m.mode||(x.value=[]),"tags"===m.mode&&"string"==typeof x.value&&(x.value=[x.value]);let _="tags"===m.mode?(e,t)=>e?e.value!==g||x.value.includes(g)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:m.optionRender||void 0,C=e=>{j(e),m.onSearch&&m.onSearch(e)},b=(e,t)=>{v(e),m.onChange&&m.onChange(e,t)};return"inline"===p?(0,l.jsx)(n.NIc,{isInvalid:f,isRequired:c,children:(0,l.jsxs)(n.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,l.jsx)(o.__,{htmlFor:m.id||t,...d,children:i}):null,(0,l.jsxs)(n.jqI,{align:"center",children:[(0,l.jsxs)(n.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(n.WPr,{...x,id:m.id||t,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:_,onSearch:"tags"===m.mode?C:void 0,onChange:b,value:x.value||void 0,status:f?"error":void 0}),(0,l.jsx)(o.Bc,{isInvalid:f,message:h.error,fieldName:x.name})]}),u?(0,l.jsx)(s.Z,{label:u}):null]})]})}):(0,l.jsx)(n.NIc,{isInvalid:f,isRequired:c,children:(0,l.jsxs)(n.gCW,{alignItems:"start",children:[(0,l.jsxs)(n.jqI,{align:"center",children:[i?(0,l.jsx)(o.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,u?(0,l.jsx)(s.Z,{label:u}):null]}),(0,l.jsx)(n.WPr,{...x,id:m.id||t,"data-testid":"controlled-select-".concat(x.name),...m,optionRender:_,onSearch:"tags"===m.mode?C:void 0,onChange:b,value:x.value||void 0,status:f?"error":void 0}),(0,l.jsx)(o.Bc,{isInvalid:f,message:h.error,fieldName:x.name})]})})}},14047:function(e,t,i){i.d(t,{H:function(){return r},V:function(){return l.V}});var l=i(84306),n=i(812);let r=()=>{let{errorAlert:e}=(0,l.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){i.d(t,{V:function(){return r}});var l=i(24246),n=i(77181);let r=()=>{let e=(0,n.pmc)();return{errorAlert:(t,i,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,l.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,l.jsx)(n.zMQ,{}),(0,l.jsxs)(n.xuv,{children:[i&&(0,l.jsx)(n.CdC,{children:i}),(0,l.jsx)(n.XaZ,{children:t})]}),(0,l.jsx)(n.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(t,i,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,l.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,l.jsx)(n.zMQ,{}),(0,l.jsxs)(n.xuv,{children:[i&&(0,l.jsx)(n.CdC,{children:i}),(0,l.jsx)(n.XaZ,{children:t})]}),(0,l.jsx)(n.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},70788:function(e,t,i){i.d(t,{m:function(){return d}});var l=i(24246),n=i(77181),r=i(79894),a=i.n(r),s=i(27378);let{Text:o}=n.AntTypography,d=e=>{let{items:t,...i}=e,r=(0,s.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,s={...e},d=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,l.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:s.title})),d)?s.title=(0,l.jsx)(n.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,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,l.jsx)(a(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[t]);return(0,l.jsx)(n.zrq,{items:r,...i})}},30234:function(e,t,i){var l=i(24246),n=i(77181);t.Z=e=>{let{heading:t,HeadingButton:i,children:r}=e;return(0,l.jsx)(n.Kqy,{spacing:4,children:(0,l.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,l.jsxs)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,l.jsx)(n.X6q,{as:"h3",size:"xs",children:t}),i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.LZC,{}),(0,l.jsx)(i,{})]}):null]}),(0,l.jsx)(n.Kqy,{spacing:4,px:6,py:6,children:r})]})})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9046],{7617:function(e,s,t){t.d(s,{q:function(){return l}});var i=t(24246),a=t(77181);let l=e=>{let{label:s,isDisabled:t,...l}=e;return(0,i.jsx)(a.OK9,{"data-testid":"tab-".concat(s),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:l.fontSize,fontWeight:"500",color:"gray.500",isDisabled:t||!1,children:s})};s.Z=e=>{let{data:s,border:t="partial",...r}=e;return(0,i.jsxs)(a.mQc,{colorScheme:"complimentary",...r,children:[(0,i.jsx)(a.tdY,{width:"partial"===t?"max-content":void 0,children:s.map(e=>(0,i.jsx)(l,{label:e.label,isDisabled:e.isDisabled,fontSize:r.fontSize},e.label))}),(0,i.jsx)(a.nPR,{children:s.map(e=>(0,i.jsx)(a.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},66379:function(e,s,t){var i=t(24246),a=t(77181),l=t(7617);s.Z=e=>{let{data:s,border:t="partial",borderWidth:r=2,...n}=e;return(0,i.jsx)(a.mQc,{colorScheme:"complimentary",...n,children:(0,i.jsx)(a.tdY,{width:"partial"===t?"max-content":void 0,borderBottomWidth:r,children:s.map(e=>(0,i.jsx)(l.q,{label:e.label,"data-testid":e.label,isDisabled:e.isDisabled,fontSize:n.fontSize},e.label))})})}},79494:function(e,s,t){var i=t(24246),a=t(77181);s.Z=e=>{let{title:s,icon:t,type:l,...r}=e;return(0,i.jsx)(a.wpx,{size:"small",type:l,"data-testid":"action-".concat(s),icon:t,iconPosition:"start",...r,children:s})}},45896:function(e,s,t){var i=t(24246),a=t(66379);s.Z=e=>{let{filterTabs:s,onChange:t,filterTabIndex:l}=e;return(0,i.jsx)(a.Z,{border:"full-width",mb:5,size:"sm",data:s,borderWidth:1,index:l,onChange:t})}},69828:function(e,s,t){t.d(s,{Y:function(){return r}});var i=t(24246),a=t(77181),l=t(70788);let r=[(0,i.jsx)(a.PJP.S9g,{},"layers"),(0,i.jsx)(a.PJP.ehp,{},"dataset"),(0,i.jsx)(a.PJP.iA_,{},"table"),(0,i.jsx)(a.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];s.Z=e=>{let{resourceUrn:s,parentLink:t,onPathClick:a=()=>{}}=e,n=[];if(s||n.push({title:"All activity"}),s){n.push({title:"All activity",href:t});let e=s.split(".");e.forEach((s,t)=>{0!==t&&n.push({title:s,icon:r[t-1],onClick:s=>{s.preventDefault(),a(e.slice(0,t+1).join("."))}})})}return(0,i.jsx)(l.m,{"data-testid":"results-breadcrumb",items:n})}},38347:function(e,s,t){var i=t(24246),a=t(77181),l=t(56839);s.Z=()=>(0,i.jsxs)(a.J2e,{isLazy:!0,trigger:"hover",children:[(0,i.jsx)(a.xol,{children:(0,i.jsx)(a.UOT,{color:"gray.400"})}),(0,i.jsxs)(a.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,i.jsx)(a.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,i.jsx)(a.QHN,{bgColor:"gray.800"}),(0,i.jsx)(a.baG,{border:"none",children:(0,i.jsxs)(a.MIq,{columns:2,spacing:2,children:[(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.Rv,{})," Change detected"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.$P,{})," Data labeled"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.zj,{})," Monitoring"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.dK,{})," Addition detected"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.Kr,{})," Unmonitored"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.q1,{})," Removal detected"]})]})})]})]})},47182:function(e,s,t){var i=t(86677),a=t(77830);s.Z=()=>{let e=(0,i.useRouter)();return{monitorId:e.query.monitorId,resourceUrn:e.query.resourceUrn,navigateToDetectionResults:s=>{let{resourceUrn:t,filterTabIndex:i}=s;e.push({pathname:a.dS,query:{resourceUrn:t,filterTabIndex:i}})},navigateToDiscoveryResults:s=>{let{resourceUrn:t,filterTabIndex:i}=s;e.push({pathname:a.Sj,query:{resourceUrn:t,filterTabIndex:i}})}}}},11904:function(e,s,t){t.d(s,{Z:function(){return F}});var i,a,l=t(24246),r=t(59003),n=t(92222),o=t(77181),d=t(86677),c=t(27378),u=t(14481),x=t(45896),g=t(70675),h=t(72625),j=t(79947),f=t(50169),I=t(28278),m=t(74241),v=t(28120),L=t(91761),C=t(61099),p=t(87667),S=e=>{let{resourceType:s}=e,t=(0,n.Cl)();return s===v.D$.SCHEMA?{columns:[t.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(p.Z,{result:e.row.original,changeTypeOverride:I.E.CLASSIFICATION}),header:e=>(0,l.jsx)(u.Rr,{value:"Name",...e}),size:300}),t.accessor(e=>e.urn,{id:"project",cell:e=>(0,l.jsx)(u.G3,{value:(0,m.Z)(e.getValue())}),header:e=>(0,l.jsx)(u.Rr,{value:"Project",...e})}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.accessor(e=>e.system,{id:"system",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"System",...e})}),t.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Detected by",...e})}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),t.display({id:"action",cell:e=>e.row.original.diff_status!==v.LL.MUTED?(0,l.jsx)(L.Z,{resource:e.row.original}):(0,l.jsx)(u.G3,{value:"--"}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===v.D$.TABLE?{columns:[t.display({id:"select",cell:e=>{var s;let{row:t}=e;return(0,l.jsx)(h.k,{isChecked:t.getIsSelected(),onChange:t.getToggleSelectedHandler(),dataTestId:"select-".concat(null!==(s=t.original.name)&&void 0!==s?s:t.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(h.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40}),t.accessor(e=>e.name,{id:"tables",cell:e=>(0,l.jsx)(p.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Table name",...e}),size:300}),t.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Table"}),header:"Type"}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:"Time"}),t.display({id:"actions",cell:e=>(0,l.jsx)(L.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===v.D$.FIELD?{columns:[t.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(p.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Field name",...e}),size:300}),t.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,l.jsx)(j.Z,{type:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Data type",...e})}),t.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Field"}),header:"Type"}),t.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(C.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),t.display({id:"actions",cell:e=>(0,l.jsx)(L.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:{columns:[]}};(i=a||(a={}))[i.ACTION_REQUIRED=0]="ACTION_REQUIRED",i[i.UNMONITORED=1]="UNMONITORED";var _=e=>{let{initialFilterTabIndex:s=0}=e,[t,i]=(0,c.useState)(s),a=(0,c.useMemo)(()=>[{label:"Action Required",filters:[v.LL.CLASSIFICATION_ADDITION,v.LL.CLASSIFICATION_UPDATE],childFilters:[v.LL.CLASSIFICATION_ADDITION,v.LL.CLASSIFICATION_UPDATE]},{label:"In progress",filters:[v.LL.CLASSIFYING,v.LL.CLASSIFICATION_QUEUED],childFilters:[v.LL.CLASSIFYING,v.LL.CLASSIFICATION_QUEUED]},{label:"Unmonitored",filters:[v.LL.MUTED],childFilters:[]}],[]);return{filterTabs:a,filterTabIndex:t,setFilterTabIndex:i,activeDiffFilters:a[t].filters,activeChildDiffFilters:a[t].childFilters}},b=t(47182),y=t(38347),A=t(79494),T=e=>{let{resourceUrn:s}=e,[t,{isLoading:i}]=(0,g.Hf)(),[a,{isLoading:r}]=(0,g.zV)(),n=i||r,d=async e=>{await a({staged_resource_urns:e})},c=async e=>{await t({staged_resource_urns:e})};return(0,l.jsx)(o.jqI,{"data-testid":"bulk-actions-menu",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(A.Z,{title:"Confirm all",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>c([s]),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(A.Z,{title:"Ignore all",icon:(0,l.jsx)(o.tpL,{}),onClick:()=>d([s]),disabled:n,loading:r,size:"middle"})]})})},D=e=>{let{selectedUrns:s}=e,[t,{isLoading:i}]=(0,g.Hf)(),[a,{isLoading:r}]=(0,g.zV)(),n=i||r,d=async e=>{await t({staged_resource_urns:e})},c=async e=>{await a({staged_resource_urns:e})};return s.length?(0,l.jsxs)(o.jqI,{className:"items-center","data-testid":"bulk-actions-menu",children:[(0,l.jsx)(o.xvT,{fontSize:"xs",fontWeight:"semibold",minW:16,mr:4,children:"".concat(s.length," selected")}),(0,l.jsxs)(o.jqI,{className:"gap-2",children:[(0,l.jsx)(A.Z,{title:"Confirm",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>d(s),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(A.Z,{title:"Ignore",icon:(0,l.jsx)(o.tpL,{}),disabled:n,loading:r,onClick:()=>c(s),size:"middle"})]})]}):null},E=t(7940),R=t(80285),N=t(36168),w=t(57454);let O={items:[],total:0,page:1,size:50,pages:1},Z=()=>(0,l.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,l.jsxs)(o.gCW,{children:[(0,l.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,l.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var F=e=>{var s,t;let{resourceUrn:i}=e,h=(0,d.useRouter)(),[j,f]=(0,c.useState)(""),{filterTabs:I,setFilterTabIndex:m,filterTabIndex:L,activeDiffFilters:C,activeChildDiffFilters:p}=_({initialFilterTabIndex:(null===(s=h.query)||void 0===s?void 0:s.filterTabIndex)?Number(null===(t=h.query)||void 0===t?void 0:t.filterTabIndex):void 0}),[A,F]=(0,c.useState)({}),{PAGE_SIZES:z,pageSize:k,setPageSize:P,onPreviousPageClick:U,isPreviousPageDisabled:M,onNextPageClick:G,isNextPageDisabled:q,startRange:V,endRange:Q,pageIndex:W,setTotalPages:$,resetPageIndexToDefault:H}=(0,u.oi)();(0,c.useEffect)(()=>{H()},[i,j,H,C,p]);let{isFetching:Y,isLoading:J,data:K}=(0,g.z8)({staged_resource_urn:i,page:W,size:k,child_diff_status:p,diff_status:C,search:j}),B=(0,E.G)(null==K?void 0:K.items[0]),{items:X,total:ee,pages:es}=(0,c.useMemo)(()=>null!=K?K:O,[K]);(0,c.useEffect)(()=>{$(es)},[es,$]);let{columns:et}=S({resourceType:B}),ei=(0,c.useMemo)(()=>et,[et]),{navigateToDiscoveryResults:ea}=(0,b.Z)(),el=(0,r.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),columns:ei,manualPagination:!0,onRowSelectionChange:F,state:{rowSelection:A},getRowId:R.Z,data:X,columnResizeMode:"onChange"}),er=Object.keys(A).filter(e=>A[e]);return J?(0,l.jsx)(u.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.Z,{filterTabs:I,filterTabIndex:L,onChange:m}),(0,l.jsxs)(u.Q$,{children:[(0,l.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,l.jsx)(o.xuv,{flexShrink:0,children:(0,l.jsx)(w.M,{value:j,onChange:f})}),(0,l.jsx)(y.Z,{})]}),B===v.D$.TABLE&&!!er.length&&(0,l.jsx)(D,{selectedUrns:er}),B===v.D$.FIELD&&L!==a.UNMONITORED&&(0,l.jsx)(T,{resourceUrn:i})]}),(0,l.jsx)(u.ZK,{tableInstance:el,onRowClick:e=>ea({resourceUrn:e.urn,filterTabIndex:L}),getRowIsClickable:e=>B!==v.D$.FIELD||(0,N.Z)(e),emptyTableNotice:(0,l.jsx)(Z,{})}),(0,l.jsx)(u.s8,{totalRows:ee||0,pageSizes:z,setPageSize:P,onPreviousPageClick:U,isPreviousPageDisabled:M||Y,onNextPageClick:G,isNextPageDisabled:q||Y,startRange:V,endRange:Q})]})}},91761:function(e,s,t){var i=t(24246),a=t(77181),l=t(812),r=t(14047),n=t(7940),o=t(98559),d=t(28120),c=t(79494),u=t(70675);s.Z=e=>{let{resource:s}=e,[t,{isLoading:x}]=(0,u.v8)(),[g,{isLoading:h}]=(0,u.cM)(),[j,{isLoading:f}]=(0,u.vi)(),I=h||f||x,{diff_status:m,child_diff_statuses:v,top_level_field_name:L}=s,{successAlert:C,errorAlert:p}=(0,r.V)(),S=m===d.LL.CLASSIFICATION_ADDITION||m===d.LL.CLASSIFICATION_UPDATE,_=v&&(v[d.LL.CLASSIFICATION_ADDITION]||v[d.LL.CLASSIFICATION_UPDATE]),b=(S||_)&&!L,y=S||_,A=(0,n.G)(s)!==d.D$.FIELD,T=b&&y&&A,D=async()=>{let e=await g({staged_resource_urn:s.urn});(0,l.D4)(e)?p((0,l.e$)(e.error),"Failed to promote resource"):C('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},E=async()=>{let e=await j({staged_resource_urn:s.urn});(0,l.D4)(e)?p((0,l.e$)(e.error),"Failed to mute resource"):C("Ignored changes will not be added to a Fides dataset.","".concat(s.name||"Changes"," ignored"))},R=async()=>{let e=await t({staged_resource_urn:s.urn,monitor_config_id:s.monitor_config_id,start_classification:!0,classify_monitored_resources:!0});(0,l.D4)(e)?p((0,l.e$)(e.error),"Failed to reclassify resource"):C("Reclassification of ".concat((0,o.Z)(s)||"the resource"," has begun. The results may take some time to appear in the “Data discovery“ tab."),"Reclassification started")};return(0,i.jsxs)(a.Ugi,{gap:2,children:[b&&(0,i.jsx)(c.Z,{title:"Confirm",icon:(0,i.jsx)(a.nQG,{}),onClick:D,disabled:I,loading:h}),y&&(0,i.jsx)(c.Z,{title:"Ignore",icon:(0,i.jsx)(a.tpL,{}),onClick:E,disabled:I,loading:f}),A&&!T&&(0,i.jsx)(c.Z,{title:"Reclassify",icon:(0,i.jsx)(a.nyI,{}),onClick:R,disabled:I,loading:x}),T&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.LZC,{}),(0,i.jsxs)(a.v2r,{children:[(0,i.jsx)(a.j2t,{as:a.wpx,size:"small",type:"text",icon:(0,i.jsx)(a.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-overflow-btn"}),(0,i.jsx)(a.qyq,{children:(0,i.jsx)(a.sNh,{onClick:R,icon:(0,i.jsx)(a.nyI,{}),"data-testid":"action-reclassify",children:"Reclassify"})})]})]})]})}},79947:function(e,s,t){var i=t(24246),a=t(77181);s.Z=e=>{let{type:s}=e;return(0,i.jsx)(a.kCb,{align:"center",h:"full",children:!!s&&(0,i.jsx)(a.j8w,{children:s})})}},87667:function(e,s,t){var i=t(24246),a=t(77181),l=t(56839),r=t(20449),n=t(98559),o=t(80356);s.Z=e=>{let{result:s,changeTypeOverride:t}=e,d=null!=t?t:(0,r.Z)(s);return(0,i.jsxs)(a.kCb,{alignItems:"center",height:"100%",children:[(0,i.jsx)(a.ua7,{label:d,children:(0,i.jsx)("span",{children:l.QL[d]})}),(0,i.jsx)(a.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,o.Z)(s)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,n.Z)(s)})]})}},50169:function(e,s,t){var i=t(24246),a=t(14481),l=t(28278),r=t(20449);let n={[l.E.MUTED]:{color:"marble",label:"Unmonitored"},[l.E.MONITORED]:{color:"success",label:"Monitoring"},[l.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};s.Z=e=>{var s,t,l,o,d;let{result:c,changeTypeOverride:u}=e;if(null===(s=c.user_assigned_data_categories)||void 0===s?void 0:s.length)return(0,i.jsx)(a.A4,{color:"success",value:"Reviewed"});let x=null!=u?u:(0,r.Z)(c);return(0,i.jsx)(a.A4,{color:null!==(o=null===(t=n[x])||void 0===t?void 0:t.color)&&void 0!==o?o:"warning",value:null!==(d=null===(l=n[x])||void 0===l?void 0:l.label)&&void 0!==d?d:"Pending review"})}},74241:function(e,s){s.Z=e=>{let s=e.split(".");return s.length>1?s[1]:""}},20449:function(e,s,t){var i=t(28278),a=t(28120);s.Z=e=>e.diff_status===a.LL.ADDITION?i.E.ADDITION:e.diff_status===a.LL.REMOVAL?i.E.REMOVAL:e.diff_status===a.LL.CLASSIFYING||e.diff_status===a.LL.CLASSIFICATION_QUEUED?i.E.IN_PROGRESS:e.diff_status===a.LL.CLASSIFICATION_ADDITION||e.diff_status===a.LL.CLASSIFICATION_UPDATE?i.E.CLASSIFICATION:e.child_diff_statuses?e.child_diff_statuses[a.LL.CLASSIFYING]||e.child_diff_statuses[a.LL.CLASSIFICATION_QUEUED]?i.E.IN_PROGRESS:e.child_diff_statuses[a.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[a.LL.CLASSIFICATION_UPDATE]?i.E.CLASSIFICATION:e.child_diff_statuses[a.LL.ADDITION]||e.child_diff_statuses[a.LL.REMOVAL]?i.E.CHANGE:e.diff_status===a.LL.MONITORED?i.E.MONITORED:e.diff_status===a.LL.MUTED?i.E.MUTED:i.E.NONE:i.E.NONE},80285:function(e,s){s.Z=e=>e.urn}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9046],{7617:function(e,s,t){t.d(s,{q:function(){return l}});var i=t(24246),a=t(77181);let l=e=>{let{label:s,isDisabled:t,...l}=e;return(0,i.jsx)(a.OK9,{"data-testid":"tab-".concat(s),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:l.fontSize,fontWeight:"500",color:"gray.500",isDisabled:t||!1,children:s})};s.Z=e=>{let{data:s,border:t="partial",...r}=e;return(0,i.jsxs)(a.mQc,{colorScheme:"complimentary",...r,children:[(0,i.jsx)(a.tdY,{width:"partial"===t?"max-content":void 0,children:s.map(e=>(0,i.jsx)(l,{label:e.label,isDisabled:e.isDisabled,fontSize:r.fontSize},e.label))}),(0,i.jsx)(a.nPR,{children:s.map(e=>(0,i.jsx)(a.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},66379:function(e,s,t){var i=t(24246),a=t(77181),l=t(7617);s.Z=e=>{let{data:s,border:t="partial",borderWidth:r=2,...n}=e;return(0,i.jsx)(a.mQc,{colorScheme:"complimentary",...n,children:(0,i.jsx)(a.tdY,{width:"partial"===t?"max-content":void 0,borderBottomWidth:r,children:s.map(e=>(0,i.jsx)(l.q,{label:e.label,"data-testid":e.label,isDisabled:e.isDisabled,fontSize:n.fontSize},e.label))})})}},79494:function(e,s,t){var i=t(24246),a=t(77181);s.Z=e=>{let{title:s,icon:t,type:l,...r}=e;return(0,i.jsx)(a.wpx,{size:"small",type:l,"data-testid":"action-".concat(s),icon:t,iconPosition:"start",...r,children:s})}},45896:function(e,s,t){var i=t(24246),a=t(66379);s.Z=e=>{let{filterTabs:s,onChange:t,filterTabIndex:l}=e;return(0,i.jsx)(a.Z,{border:"full-width",mb:5,size:"sm",data:s,borderWidth:1,index:l,onChange:t})}},69828:function(e,s,t){t.d(s,{Y:function(){return r}});var i=t(24246),a=t(77181),l=t(70788);let r=[(0,i.jsx)(a.PJP.S9g,{},"layers"),(0,i.jsx)(a.PJP.ehp,{},"dataset"),(0,i.jsx)(a.PJP.iA_,{},"table"),(0,i.jsx)(a.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];s.Z=e=>{let{resourceUrn:s,parentLink:t,onPathClick:a=()=>{}}=e,n=[];if(s||n.push({title:"All activity"}),s){n.push({title:"All activity",href:t});let e=s.split(".");e.forEach((s,t)=>{0!==t&&n.push({title:s,icon:r[t-1],onClick:s=>{s.preventDefault(),a(e.slice(0,t+1).join("."))}})})}return(0,i.jsx)(l.m,{"data-testid":"results-breadcrumb",items:n})}},38347:function(e,s,t){var i=t(24246),a=t(77181),l=t(56839);s.Z=()=>(0,i.jsxs)(a.J2e,{isLazy:!0,trigger:"hover",children:[(0,i.jsx)(a.xol,{children:(0,i.jsx)(a.UOT,{color:"gray.400"})}),(0,i.jsxs)(a.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,i.jsx)(a.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,i.jsx)(a.QHN,{bgColor:"gray.800"}),(0,i.jsx)(a.baG,{border:"none",children:(0,i.jsxs)(a.MIq,{columns:2,spacing:2,children:[(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.Rv,{})," Change detected"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.$P,{})," Data labeled"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.zj,{})," Monitoring"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.dK,{})," Addition detected"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.Kr,{})," Unmonitored"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.q1,{})," Removal detected"]})]})})]})]})},47182:function(e,s,t){var i=t(86677),a=t(77830);s.Z=()=>{let e=(0,i.useRouter)();return{monitorId:e.query.monitorId,resourceUrn:e.query.resourceUrn,navigateToDetectionResults:s=>{let{resourceUrn:t,filterTabIndex:i}=s;e.push({pathname:a.dS,query:{resourceUrn:t,filterTabIndex:i}})},navigateToDiscoveryResults:s=>{let{resourceUrn:t,filterTabIndex:i}=s;e.push({pathname:a.Sj,query:{resourceUrn:t,filterTabIndex:i}})}}}},11904:function(e,s,t){t.d(s,{Z:function(){return F}});var i,a,l=t(24246),r=t(59003),n=t(92222),o=t(77181),d=t(86677),c=t(27378),u=t(14481),x=t(45896),g=t(70675),h=t(72625),j=t(79947),f=t(50169),I=t(28278),m=t(74241),v=t(21702),L=t(91761),C=t(61099),p=t(87667),S=e=>{let{resourceType:s}=e,t=(0,n.Cl)();return s===v.D$.SCHEMA?{columns:[t.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(p.Z,{result:e.row.original,changeTypeOverride:I.E.CLASSIFICATION}),header:e=>(0,l.jsx)(u.Rr,{value:"Name",...e}),size:300}),t.accessor(e=>e.urn,{id:"project",cell:e=>(0,l.jsx)(u.G3,{value:(0,m.Z)(e.getValue())}),header:e=>(0,l.jsx)(u.Rr,{value:"Project",...e})}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.accessor(e=>e.system,{id:"system",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"System",...e})}),t.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Detected by",...e})}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),t.display({id:"action",cell:e=>e.row.original.diff_status!==v.LL.MUTED?(0,l.jsx)(L.Z,{resource:e.row.original}):(0,l.jsx)(u.G3,{value:"--"}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===v.D$.TABLE?{columns:[t.display({id:"select",cell:e=>{var s;let{row:t}=e;return(0,l.jsx)(h.k,{isChecked:t.getIsSelected(),onChange:t.getToggleSelectedHandler(),dataTestId:"select-".concat(null!==(s=t.original.name)&&void 0!==s?s:t.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(h.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40}),t.accessor(e=>e.name,{id:"tables",cell:e=>(0,l.jsx)(p.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Table name",...e}),size:300}),t.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Table"}),header:"Type"}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:"Time"}),t.display({id:"actions",cell:e=>(0,l.jsx)(L.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===v.D$.FIELD?{columns:[t.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(p.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Field name",...e}),size:300}),t.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,l.jsx)(j.Z,{type:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Data type",...e})}),t.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Field"}),header:"Type"}),t.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(C.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),t.display({id:"actions",cell:e=>(0,l.jsx)(L.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:{columns:[]}};(i=a||(a={}))[i.ACTION_REQUIRED=0]="ACTION_REQUIRED",i[i.UNMONITORED=1]="UNMONITORED";var _=e=>{let{initialFilterTabIndex:s=0}=e,[t,i]=(0,c.useState)(s),a=(0,c.useMemo)(()=>[{label:"Action Required",filters:[v.LL.CLASSIFICATION_ADDITION,v.LL.CLASSIFICATION_UPDATE],childFilters:[v.LL.CLASSIFICATION_ADDITION,v.LL.CLASSIFICATION_UPDATE]},{label:"In progress",filters:[v.LL.CLASSIFYING,v.LL.CLASSIFICATION_QUEUED],childFilters:[v.LL.CLASSIFYING,v.LL.CLASSIFICATION_QUEUED]},{label:"Unmonitored",filters:[v.LL.MUTED],childFilters:[]}],[]);return{filterTabs:a,filterTabIndex:t,setFilterTabIndex:i,activeDiffFilters:a[t].filters,activeChildDiffFilters:a[t].childFilters}},b=t(47182),A=t(38347),y=t(79494),T=e=>{let{resourceUrn:s}=e,[t,{isLoading:i}]=(0,g.Hf)(),[a,{isLoading:r}]=(0,g.zV)(),n=i||r,d=async e=>{await a({staged_resource_urns:e})},c=async e=>{await t({staged_resource_urns:e})};return(0,l.jsx)(o.jqI,{"data-testid":"bulk-actions-menu",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(y.Z,{title:"Confirm all",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>c([s]),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(y.Z,{title:"Ignore all",icon:(0,l.jsx)(o.tpL,{}),onClick:()=>d([s]),disabled:n,loading:r,size:"middle"})]})})},D=e=>{let{selectedUrns:s}=e,[t,{isLoading:i}]=(0,g.Hf)(),[a,{isLoading:r}]=(0,g.zV)(),n=i||r,d=async e=>{await t({staged_resource_urns:e})},c=async e=>{await a({staged_resource_urns:e})};return s.length?(0,l.jsxs)(o.jqI,{className:"items-center","data-testid":"bulk-actions-menu",children:[(0,l.jsx)(o.xvT,{fontSize:"xs",fontWeight:"semibold",minW:16,mr:4,children:"".concat(s.length," selected")}),(0,l.jsxs)(o.jqI,{className:"gap-2",children:[(0,l.jsx)(y.Z,{title:"Confirm",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>d(s),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(y.Z,{title:"Ignore",icon:(0,l.jsx)(o.tpL,{}),disabled:n,loading:r,onClick:()=>c(s),size:"middle"})]})]}):null},R=t(7940),E=t(80285),N=t(36168),w=t(57454);let O={items:[],total:0,page:1,size:50,pages:1},Z=()=>(0,l.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,l.jsxs)(o.gCW,{children:[(0,l.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,l.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var F=e=>{var s,t;let{resourceUrn:i}=e,h=(0,d.useRouter)(),[j,f]=(0,c.useState)(""),{filterTabs:I,setFilterTabIndex:m,filterTabIndex:L,activeDiffFilters:C,activeChildDiffFilters:p}=_({initialFilterTabIndex:(null===(s=h.query)||void 0===s?void 0:s.filterTabIndex)?Number(null===(t=h.query)||void 0===t?void 0:t.filterTabIndex):void 0}),[y,F]=(0,c.useState)({}),{PAGE_SIZES:z,pageSize:k,setPageSize:P,onPreviousPageClick:U,isPreviousPageDisabled:M,onNextPageClick:G,isNextPageDisabled:q,startRange:V,endRange:Q,pageIndex:W,setTotalPages:H,resetPageIndexToDefault:Y}=(0,u.oi)();(0,c.useEffect)(()=>{Y()},[i,j,Y,C,p]);let{isFetching:$,isLoading:J,data:K}=(0,g.z8)({staged_resource_urn:i,page:W,size:k,child_diff_status:p,diff_status:C,search:j}),B=(0,R.G)(null==K?void 0:K.items[0]),{items:X,total:ee,pages:es}=(0,c.useMemo)(()=>null!=K?K:O,[K]);(0,c.useEffect)(()=>{H(es)},[es,H]);let{columns:et}=S({resourceType:B}),ei=(0,c.useMemo)(()=>et,[et]),{navigateToDiscoveryResults:ea}=(0,b.Z)(),el=(0,r.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),columns:ei,manualPagination:!0,onRowSelectionChange:F,state:{rowSelection:y},getRowId:E.Z,data:X,columnResizeMode:"onChange"}),er=Object.keys(y).filter(e=>y[e]);return J?(0,l.jsx)(u.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.Z,{filterTabs:I,filterTabIndex:L,onChange:m}),(0,l.jsxs)(u.Q$,{children:[(0,l.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,l.jsx)(o.xuv,{flexShrink:0,children:(0,l.jsx)(w.M,{value:j,onChange:f})}),(0,l.jsx)(A.Z,{})]}),B===v.D$.TABLE&&!!er.length&&(0,l.jsx)(D,{selectedUrns:er}),B===v.D$.FIELD&&L!==a.UNMONITORED&&(0,l.jsx)(T,{resourceUrn:i})]}),(0,l.jsx)(u.ZK,{tableInstance:el,onRowClick:e=>ea({resourceUrn:e.urn,filterTabIndex:L}),getRowIsClickable:e=>B!==v.D$.FIELD||(0,N.Z)(e),emptyTableNotice:(0,l.jsx)(Z,{})}),(0,l.jsx)(u.s8,{totalRows:ee||0,pageSizes:z,setPageSize:P,onPreviousPageClick:U,isPreviousPageDisabled:M||$,onNextPageClick:G,isNextPageDisabled:q||$,startRange:V,endRange:Q})]})}},91761:function(e,s,t){var i=t(24246),a=t(77181),l=t(14047),r=t(98559),n=t(21702),o=t(79494),d=t(70675);s.Z=e=>{let{resource:s}=e,[t,{isLoading:c}]=(0,d.v8)(),[u,{isLoading:x}]=(0,d.cM)(),[g,{isLoading:h}]=(0,d.vi)(),j=x||h||c,{diff_status:f,child_diff_statuses:I,top_level_field_name:m}=s,{successAlert:v}=(0,l.V)(),L=f===n.LL.CLASSIFICATION_ADDITION||f===n.LL.CLASSIFICATION_UPDATE,C=I&&(I[n.LL.CLASSIFICATION_ADDITION]||I[n.LL.CLASSIFICATION_UPDATE]),p=(L||C)&&!m,S=L||C,_=p&&S,b=async()=>{await u({staged_resource_urn:s.urn}),v('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},A=async()=>{await g({staged_resource_urn:s.urn}),v("Ignored changes will not be added to a Fides dataset.","".concat(s.name||"Changes"," ignored"))},y=async()=>{await t({staged_resource_urn:s.urn,monitor_config_id:s.monitor_config_id,start_classification:!0,classify_monitored_resources:!0}),v("Reclassification of ".concat((0,r.Z)(s)||"the resource"," has begun. The results may take some time to appear in the “Data discovery“ tab."),"Reclassification started")};return(0,i.jsxs)(a.Ugi,{gap:2,children:[p&&(0,i.jsx)(o.Z,{title:"Confirm",icon:(0,i.jsx)(a.nQG,{}),onClick:b,disabled:j,loading:x}),S&&(0,i.jsx)(o.Z,{title:"Ignore",icon:(0,i.jsx)(a.tpL,{}),onClick:A,disabled:j,loading:h}),!_&&(0,i.jsx)(o.Z,{title:"Reclassify",icon:(0,i.jsx)(a.nyI,{}),onClick:y,disabled:j,loading:c}),(0,i.jsx)(a.LZC,{}),_&&(0,i.jsxs)(a.v2r,{children:[(0,i.jsx)(a.j2t,{as:a.wpx,size:"small",type:"text",icon:(0,i.jsx)(a.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-overflow-btn"}),(0,i.jsx)(a.qyq,{children:(0,i.jsx)(a.sNh,{onClick:y,icon:(0,i.jsx)(a.nyI,{}),"data-testid":"action-reclassify",children:"Reclassify"})})]})]})}},79947:function(e,s,t){var i=t(24246),a=t(77181);s.Z=e=>{let{type:s}=e;return(0,i.jsx)(a.kCb,{align:"center",h:"full",children:!!s&&(0,i.jsx)(a.j8w,{children:s})})}},87667:function(e,s,t){var i=t(24246),a=t(77181),l=t(56839),r=t(20449),n=t(98559),o=t(80356);s.Z=e=>{let{result:s,changeTypeOverride:t}=e,d=null!=t?t:(0,r.Z)(s);return(0,i.jsxs)(a.kCb,{alignItems:"center",height:"100%",children:[(0,i.jsx)(a.ua7,{label:d,children:(0,i.jsx)("span",{children:l.QL[d]})}),(0,i.jsx)(a.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,o.Z)(s)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,n.Z)(s)})]})}},50169:function(e,s,t){var i=t(24246),a=t(14481),l=t(28278),r=t(20449);let n={[l.E.MUTED]:{color:"marble",label:"Unmonitored"},[l.E.MONITORED]:{color:"success",label:"Monitoring"},[l.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};s.Z=e=>{var s,t,l,o,d;let{result:c,changeTypeOverride:u}=e;if(null===(s=c.user_assigned_data_categories)||void 0===s?void 0:s.length)return(0,i.jsx)(a.A4,{color:"success",value:"Reviewed"});let x=null!=u?u:(0,r.Z)(c);return(0,i.jsx)(a.A4,{color:null!==(o=null===(t=n[x])||void 0===t?void 0:t.color)&&void 0!==o?o:"warning",value:null!==(d=null===(l=n[x])||void 0===l?void 0:l.label)&&void 0!==d?d:"Pending review"})}},74241:function(e,s){s.Z=e=>{let s=e.split(".");return s.length>1?s[1]:""}},20449:function(e,s,t){var i=t(28278),a=t(21702);s.Z=e=>e.diff_status===a.LL.ADDITION?i.E.ADDITION:e.diff_status===a.LL.REMOVAL?i.E.REMOVAL:e.diff_status===a.LL.CLASSIFYING||e.diff_status===a.LL.CLASSIFICATION_QUEUED?i.E.IN_PROGRESS:e.diff_status===a.LL.CLASSIFICATION_ADDITION||e.diff_status===a.LL.CLASSIFICATION_UPDATE?i.E.CLASSIFICATION:e.child_diff_statuses?e.child_diff_statuses[a.LL.CLASSIFYING]||e.child_diff_statuses[a.LL.CLASSIFICATION_QUEUED]?i.E.IN_PROGRESS:e.child_diff_statuses[a.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[a.LL.CLASSIFICATION_UPDATE]?i.E.CLASSIFICATION:e.child_diff_statuses[a.LL.ADDITION]||e.child_diff_statuses[a.LL.REMOVAL]?i.E.CHANGE:e.diff_status===a.LL.MONITORED?i.E.MONITORED:e.diff_status===a.LL.MUTED?i.E.MUTED:i.E.NONE:i.E.NONE},80285:function(e,s){s.Z=e=>e.urn}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9767],{7617:function(e,t,i){i.d(t,{q:function(){return a}});var n=i(24246),r=i(77181);let a=e=>{let{label:t,isDisabled:i,...a}=e;return(0,n.jsx)(r.OK9,{"data-testid":"tab-".concat(t),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:a.fontSize,fontWeight:"500",color:"gray.500",isDisabled:i||!1,children:t})};t.Z=e=>{let{data:t,border:i="partial",...s}=e;return(0,n.jsxs)(r.mQc,{colorScheme:"complimentary",...s,children:[(0,n.jsx)(r.tdY,{width:"partial"===i?"max-content":void 0,children:t.map(e=>(0,n.jsx)(a,{label:e.label,isDisabled:e.isDisabled,fontSize:s.fontSize},e.label))}),(0,n.jsx)(r.nPR,{children:t.map(e=>(0,n.jsx)(r.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},97181:function(e,t,i){i.d(t,{d:function(){return d}});var n=i(24246),r=i(77181),a=i(34090),s=i(27378),l=i(91613),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:h="inline",...x}=e,[p,m,{setValue:f}]=(0,a.U$)(t),g=!!(m.touched&&m.error),[v,j]=(0,s.useState)("");p.value||"tags"!==x.mode&&"multiple"!==x.mode||(p.value=[]),"tags"===x.mode&&"string"==typeof p.value&&(p.value=[p.value]);let y="tags"===x.mode?(e,t)=>e?e.value!==v||p.value.includes(v)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(v,'"'):void 0:x.optionRender||void 0,b=e=>{j(e),x.onSearch&&x.onSearch(e)},C=(e,t)=>{f(e),x.onChange&&x.onChange(e,t)};return"inline"===h?(0,n.jsx)(r.NIc,{isInvalid:g,isRequired:u,children:(0,n.jsxs)(r.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,n.jsx)(o.__,{htmlFor:x.id||t,...d,children:i}):null,(0,n.jsxs)(r.jqI,{align:"center",children:[(0,n.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(r.WPr,{...p,id:x.id||t,"data-testid":"controlled-select-".concat(p.name),...x,optionRender:y,onSearch:"tags"===x.mode?b:void 0,onChange:C,value:p.value||void 0,status:g?"error":void 0}),(0,n.jsx)(o.Bc,{isInvalid:g,message:m.error,fieldName:p.name})]}),c?(0,n.jsx)(l.Z,{label:c}):null]})]})}):(0,n.jsx)(r.NIc,{isInvalid:g,isRequired:u,children:(0,n.jsxs)(r.gCW,{alignItems:"start",children:[(0,n.jsxs)(r.jqI,{align:"center",children:[i?(0,n.jsx)(o.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,c?(0,n.jsx)(l.Z,{label:c}):null]}),(0,n.jsx)(r.WPr,{...p,id:x.id||t,"data-testid":"controlled-select-".concat(p.name),...x,optionRender:y,onSearch:"tags"===x.mode?b:void 0,onChange:C,value:p.value||void 0,status:g?"error":void 0}),(0,n.jsx)(o.Bc,{isInvalid:g,message:m.error,fieldName:p.name})]})})}},812:function(e,t,i){i.d(t,{D4:function(){return a.D4},MM:function(){return h},Ot:function(){return d},c6:function(){return r},cj:function(){return p},e$:function(){return l},fn:function(){return o},iC:function(){return x},nU:function(){return u},tB:function(){return c}});var n,r,a=i(19043);let s="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if((0,a.Bw)(e)){if((0,a.hE)(e.data))return e.data.detail;if((0,a.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,a.Dy)(e.data)||404===e.status&&(0,a.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:s};if((0,a.oK)(e))return{status:e.originalStatus,message:e.data};if((0,a.Bw)(e)){let{status:i}=e;return{status:i,message:l(e,t.message)}}return t},h=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=r||(r={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let x={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,i){i.d(t,{H:function(){return a},V:function(){return n.V}});var n=i(84306),r=i(812);let a=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,r.Ot)(t)?i=t.data.detail:(0,r.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){i.d(t,{V:function(){return a}});var n=i(24246),r=i(77181);let a=()=>{let e=(0,r.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,n.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:t})]}),(0,n.jsx)(r.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)},successAlert:(t,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,n.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:t})]}),(0,n.jsx)(r.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)}}}},39715:function(e,t,i){var n=i(24246),r=i(77181);i(27378),t.Z=e=>{let{isEmptyState:t,yamlError:i}=e;return(0,n.jsx)(r.Rg9,{in:!0,children:(0,n.jsxs)(r.xuv,{w:"fit-content",bg:"white",p:3,borderRadius:3,children:[(0,n.jsxs)(r.Ugi,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:"YAML"}),(0,n.jsx)(r.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(r.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(r.f9v,{}),t&&(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:"Yaml system is required"})]}),i&&(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:i.message}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:i.reason}),(0,n.jsxs)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:["Ln ",(0,n.jsx)("b",{children:i.mark.line}),", Col"," ",(0,n.jsx)("b",{children:i.mark.column}),", Pos"," ",(0,n.jsx)("b",{children:i.mark.position})]})]})]})})]})})}},41337:function(e,t,i){var n=i(24246),r=i(77181);i(27378);var a=i(21702),s=i(14746);let l=e=>void 0!==e.connection_type,o=e=>void 0!==e.encoded_icon;t.Z=e=>{let{data:t,...i}=e;return(0,n.jsx)(r.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(o(t)&&t.encoded_icon)return"data:image/svg+xml;base64,".concat(t.encoded_icon);if(l(t))e=[...s.iW].find(e=>{var i,n;let[r]=e;return t.connection_type.toString()!==a.Rj.SAAS&&t.connection_type.toString()===r||t.connection_type.toString()===a.Rj.SAAS&&(null===(n=t.saas_config)||void 0===n?void 0:null===(i=n.type)||void 0===i?void 0:i.toString())===r.toString()});else if(o(t)){let{identifier:i}=t;e=[...s.iW].find(e=>{let[t]=e;return t.toLowerCase()===i.toLowerCase()})}return e?s.Ny+e[1]:s.VD})(),fallbackSrc:s.VD,alt:(()=>{if(l(t)){var e;return null!==(e=t.name)&&void 0!==e?e:t.key}return o(t)?t.human_readable:t})(),...i})}},1226:function(e,t,i){var n=i(24246);i(27378);var r=i(77213);t.Z=e=>{let{children:t}=e;return(0,n.jsx)(r.Z,{title:"Connections",children:t})}},11274:function(e,t,i){i.d(t,{s:function(){return F}});var n=i(24246),r=i(96356),a=i(77181),s=i(86677),l=i(27378),o=i(16134),d=i(77830),c=i(21702),u=i(14047),h=i(84306),x=i(14207),p=i(16125),m=i(34090);let f=(e,t)=>{let i={...e};return Object.entries(t.properties).forEach(t=>{let[n,r]=t;if("integer"===r.type){let t=r.default?Number(r.default):e[n];i[n]=t||0}else{var a;let t=null!==(a=r.default)&&void 0!==a?a:e[n];i[n]=null!=t?t:null}}),i},g="#/definitions/FidesDatasetReference";var v=e=>{let{data:t,defaultValues:i,isSubmitting:s=!1,onSaveClick:d,onTestConnectionClick:h,testButtonLabel:p="Test integration"}=e,v=(0,l.useRef)(!1),{handleError:j}=(0,u.H)(),{connection:y,connectionOption:b}=(0,o.C)(r.ZZ),[C,_]=(0,x.h2)(),k=e=>{let t;return(void 0===e||""===e)&&(t="Connection Identifier is required"),e&&(0,a.kEn)(e)&&(t="Connection Identifier must be an alphanumeric value"),t},S=(e,t,i)=>{let n;return(void 0===t||""===t)&&(n="".concat(e," is required")),i===g&&(t.includes(".")?t.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},w=(e,t)=>(0,n.jsx)(a.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:t}),I=e=>{var t;if((null===(t=e.allOf)||void 0===t?void 0:t[0].$ref)===g)return"Enter dataset.collection.field"},z=(e,i)=>{var r;return(0,n.jsx)(m.gN,{id:e,name:e,validate:(null!==(r=t.required)&&void 0!==r&&!!r.includes(e)||"integer"===i.type)&&(e=>{var t;return S(i.title,e,null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)}),children:r=>{var s;let{field:l,form:o}=r;return(0,n.jsxs)(a.NIc,{display:"flex",isRequired:null===(s=t.required)||void 0===s?void 0:s.includes(e),isInvalid:o.errors[e]&&o.touched[e],children:[w(e,i.title),(0,n.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["integer"!==i.type&&(0,n.jsx)(a.IIB,{...l,value:l.value||"",placeholder:I(i),autoComplete:"off",color:"gray.700",size:"sm"}),"integer"===i.type&&(0,n.jsxs)(a.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(a.zuI,{...l,autoComplete:"off"}),(0,n.jsxs)(a.FiK,{children:[(0,n.jsx)(a.WQu,{}),(0,n.jsx)(a.Y_d,{})]})]}),(0,n.jsx)(a.J1D,{children:o.errors[e]})]}),(0,n.jsx)(a.ua7,{"aria-label":i.description,hasArrow:!0,label:i.description,placement:"right-start",openDelay:500,children:(0,n.jsx)(a.kCb,{alignItems:"center",h:"32px",visibility:i.description?"visible":"hidden",children:(0,n.jsx)(a.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}},e)},R=async()=>{try{await C(y.key).unwrap()}catch(e){j(e)}};return(0,l.useEffect)(()=>(v.current=!0,_.isSuccess&&h(_),()=>{v.current=!1}),[h,_]),(0,n.jsx)(m.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...i};if(null==y?void 0:y.key){var n,r;e.name=null!==(r=y.name)&&void 0!==r?r:"",e.description=y.description,e.instance_key=y.connection_type===c.Rj.SAAS?null===(n=y.saas_config)||void 0===n?void 0:n.fides_key:y.key}return f(e,t)})(),onSubmit:(e,i)=>{let n={...e};Object.keys(t.properties).forEach(i=>{var r;if((null===(r=t.properties[i].allOf)||void 0===r?void 0:r[0].$ref)===g){let t=e[i].split(".");n[i]={dataset:t.shift(),field:t.join("."),direction:"from"}}}),d(n,i)},validateOnBlur:!1,validateOnChange:!1,children:e=>(0,n.jsx)(m.l0,{noValidate:!0,children:(0,n.jsxs)(a.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(m.gN,{id:"name",name:"name",validate:e=>S("Name",e),children:t=>{let{field:i}=t;return(0,n.jsxs)(a.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.name&&e.touched.name,children:[w("name","Name"),(0,n.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(a.IIB,{...i,autoComplete:"off",autoFocus:!0,color:"gray.700",placeholder:"Enter a friendly name for your new ".concat(b.human_readable," connection"),size:"sm","data-testid":"input-name"}),(0,n.jsx)(a.J1D,{children:e.errors.name})]}),(0,n.jsx)(a.kCb,{alignItems:"center",h:"32px",visibility:"hidden",children:(0,n.jsx)(a.ITP,{marginLeft:"8px"})})]})}}),(0,n.jsx)(m.gN,{id:"description",name:"description",children:e=>{let{field:t}=e;return(0,n.jsxs)(a.NIc,{display:"flex",children:[w("description","Description"),(0,n.jsx)(a.gxH,{...t,color:"gray.700",placeholder:"Enter a description for your new ".concat(b.human_readable," connection"),resize:"none",size:"sm",value:t.value||""}),(0,n.jsx)(a.kCb,{alignItems:"center",h:"32px",visibility:"hidden",children:(0,n.jsx)(a.ITP,{marginLeft:"8px"})})]})}}),(0,n.jsx)(m.gN,{id:"instance_key",name:"instance_key",validate:k,children:t=>{let{field:i}=t;return(0,n.jsxs)(a.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.instance_key&&e.touched.instance_key,children:[w("instance_key","Connection Identifier"),(0,n.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(a.IIB,{...i,autoComplete:"off",color:"gray.700",isDisabled:!!(null==y?void 0:y.key),placeholder:"A unique identifier for your new ".concat(b.human_readable," connection"),size:"sm"}),(0,n.jsx)(a.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(a.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 connection.",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 connection.",placement:"right-start",openDelay:500,children:(0,n.jsx)(a.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(a.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),Object.entries(t.properties).map(e=>{let[t,i]=e;return"advanced_settings"===t?null:z(t,i)}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(a.wpx,{disabled:!(null==y?void 0:y.key),loading:_.isLoading||_.isFetching,onClick:R,"data-testid":"test-connection-button",children:p}),(0,n.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:s,loading:s,children:"Save"})]})]})})})},j=i(3968);let y=e=>{let{onConnectionCreated:t,data:i}=e,a=(0,p.I0)(),{errorAlert:s,successAlert:d}=(0,h.V)(),{handleError:m}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:v,connectionOption:y}=(0,o.C)(r.ZZ),[b]=(0,x.pH)(),[C]=(0,x.Du)();return{isSubmitting:f,handleSubmit:async e=>{try{var l;g(!0);let o={access:c.uv.WRITE,connection_type:null==y?void 0:y.identifier,description:e.description,disabled:!1,key:(0,j.E)(e.instance_key),name:e.name},u=await b(o).unwrap();if((null===(l=u.failed)||void 0===l?void 0:l.length)>0)s(u.failed[0].message);else{let l={connection_key:u.succeeded[0].key,secrets:{}};Object.entries(i.properties).forEach(t=>{l.secrets[t[0]]=e[t[0]]});let o=await C(l).unwrap();"failed"===o.test_status?s((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",o.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",o.failure_reason]})):(a((0,r.lm)(u.succeeded[0])),d("Connector successfully ".concat((null==v?void 0:v.key)?"updated":"added","!")),(null==v?void 0:v.key)||!t||t())}}catch(e){m(e)}finally{g(!1)}},connectionOption:y}},b=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:r}=e,{isSubmitting:s,handleSubmit:l,connectionOption:o}=y({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",o.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(v,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:s,onSaveClick:l,onTestConnectionClick:r})]})},C={description:"",instance_key:"",name:""},_=e=>{let{data:t,onConnectionCreated:i,onTestEmail:r}=e,{connectionOption:s,isSubmitting:l,handleSubmit:o}=y({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Configure your ",s.human_readable," connector by providing the connector name, description and a test email address. Once you have saved the details, you can click test email to check the format of the email."]}),(0,n.jsx)(v,{data:t,defaultValues:C,isSubmitting:l,onSaveClick:e=>{o(e)},onTestConnectionClick:r,testButtonLabel:"Test email"})]})};var k=i(55484),S=i(27259),w=i(67762),I=e=>{let{defaultValues:t,isSubmitting:i=!1,onSaveClick:l}=e,c=(0,s.useRouter)(),{connection:u,connectionOption:h}=(0,o.C)(r.ZZ);return(0,n.jsx)(m.J9,{initialValues:(()=>{if(null==u?void 0:u.key){var e;t.name=null!==(e=u.name)&&void 0!==e?e:"",t.description=u.description}return t})(),onSubmit:(e,t)=>{l(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:k.Ry().shape({name:k.Z_().required("Name is required")}),children:(0,n.jsx)(m.l0,{noValidate:!0,children:(0,n.jsxs)(a.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(S.Z,{autoFocus:!0,disabled:!!(null==u?void 0:u.key),isRequired:!0,label:"Name",name:"name",placeholder:"Enter a friendly name for your new ".concat(h.human_readable," connection")}),(0,n.jsx)(S.Z,{label:"Description",name:"description",placeholder:"Enter a description for your new ".concat(h.human_readable," connection"),type:"textarea"}),(0,n.jsx)(w.h,{isSubmitting:i,onCancelClick:()=>{c.push(d.JR)}})]})})})};let z=e=>{let{onConnectionCreated:t}=e,i=(0,p.I0)(),{errorAlert:s,successAlert:d}=(0,h.V)(),{handleError:m}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:v,connectionOption:j}=(0,o.C)(r.ZZ),[y]=(0,x.pH)(),b=async(e,n)=>{try{var a;g(!0);let n={access:c.uv.WRITE,connection_type:null==j?void 0:j.identifier,description:e.description,disabled:!1,name:e.name,key:null==v?void 0:v.key},l=await y(n).unwrap();(null===(a=l.failed)||void 0===a?void 0:a.length)>0?s(l.failed[0].message):(i((0,r.lm)(l.succeeded[0])),d("Connector successfully ".concat((null==v?void 0:v.key)?"updated":"added","!")),(null==v?void 0:v.key)||!t||t())}catch(e){m(e)}finally{g(!1)}};return(0,n.jsxs)(a.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)(a.xuv,{color:"gray.700",fontSize:"14px",children:["To begin setting up your new ",j.human_readable," ","connector you must first assign a name to the connector and a description.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Once you have completed this section you can then progress onto"," ",(0,n.jsx)(a.xvT,{display:"inline-block",fontWeight:"700",children:"DSR customization"})," ","using the menu on the left hand side."]}),(0,n.jsx)(I,{defaultValues:{description:"",name:""},isSubmitting:f,onSaveClick:b})]})},R=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:s}=e,d=(0,p.I0)(),{errorAlert:m,successAlert:f}=(0,h.V)(),{handleError:g}=(0,u.H)(),[y,b]=(0,l.useState)(!1),{connection:C,connectionOption:_}=(0,o.C)(r.ZZ),[k]=(0,x.pL)(),[S]=(0,x.pH)(),[w]=(0,x.Du)(),I=async(e,a)=>{try{if(b(!0),C){var s;let i={access:c.uv.WRITE,connection_type:C.connection_type,description:e.description,disabled:!1,key:C.key,name:e.name},a=await S(i).unwrap();if((null===(s=a.failed)||void 0===s?void 0:s.length)>0)m(a.failed[0].message);else{d((0,r.lm)(a.succeeded[0]));let i={connection_key:C.key,secrets:{}};Object.entries(t.properties).forEach(t=>{i.secrets[t[0]]=e[t[0]]});let s=await w(i).unwrap();"failed"===s.test_status?m((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",s.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",s.failure_reason]})):f("Connector successfully updated!")}}else{let n={description:e.description,name:e.name,instance_key:(0,j.E)(e.instance_key),saas_connector_type:_.identifier,secrets:{}};Object.entries(t.properties).forEach(t=>{n.secrets[t[0]]=e[t[0]]});let a=await k(n).unwrap();d((0,r.lm)(a.connection)),f("Connector successfully added!"),null==i||i()}}catch(e){g(e)}finally{b(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",_.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(v,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:y,onSaveClick:I,onTestConnectionClick:s})]})};var Z=i(16394);let W=e=>{var t,i;let{response:s}=e,{connectionOption:l}=(0,o.C)(r.ZZ);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.izJ,{color:"gray.100"}),(0,n.jsxs)(a.gCW,{align:"flex-start",mt:"16px",children:[(null===(t=s.data)||void 0===t?void 0:t.test_status)==="succeeded"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Ugi,{children:[(0,n.jsxs)(a.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Successfully connected to ",l.human_readable]}),(0,n.jsx)(a.Vp9,{colorScheme:"green",size:"sm",variant:"solid",children:"Success"})]}),(0,n.jsx)(a.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,n.jsx)(a.xuv,{bg:"green.100",border:"1px solid",borderColor:"green.300",color:"green.700",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(a.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(a.StI,{}),(0,n.jsxs)(a.xuv,{children:[(0,n.jsx)(a.X6q,{as:"h5",color:"green.500",fontWeight:"semibold",size:"xs",children:"Success message:"}),(0,n.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]}),(null===(i=s.data)||void 0===i?void 0:i.test_status)==="failed"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Ugi,{children:[(0,n.jsxs)(a.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Output error to ",l.human_readable]}),(0,n.jsx)(a.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(a.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,n.jsx)(a.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(a.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(a.f9v,{}),(0,n.jsxs)(a.xuv,{children:[(0,n.jsx)(a.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.failure_reason}),(0,n.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]})]})]})},F=e=>{let{onConnectionCreated:t}=e,i=(0,s.useRouter)(),{connectionOption:u}=(0,o.C)(r.ZZ),h=u&&u.type===c.Zi.MANUAL,{data:x,isFetching:p,isLoading:m,isSuccess:f}=(0,r.n3)(u.identifier,{skip:h}),[g,v]=(0,l.useState)(),j=e=>{v(e)},y=(0,l.useCallback)(()=>{i.push(d.JR)},[i]),C=(0,l.useCallback)(()=>{switch(null==u?void 0:u.type){case c.Zi.DATABASE:if(f&&x)return(0,n.jsx)(b,{data:x,onConnectionCreated:t,onTestConnectionClick:j});break;case c.Zi.MANUAL:return(0,n.jsx)(z,{onConnectionCreated:t});case c.Zi.SAAS:if(f&&x)return(0,n.jsx)(R,{data:x,onConnectionCreated:t,onTestConnectionClick:j});break;case c.Zi.EMAIL:if(f&&x)return(0,n.jsx)(_,{data:x,onConnectionCreated:y,onTestEmail:j})}},[null==u?void 0:u.type,x,f,t,y]);return(0,n.jsxs)(a.kCb,{gap:"97px",children:[(0,n.jsxs)(a.gCW,{w:"579px",gap:"16px",align:"stretch",children:[(p||m)&&(0,n.jsx)(a.M5Y,{children:(0,n.jsx)(a.$jN,{})}),C()]}),g&&(0,n.jsxs)(a.Rg9,{in:!0,children:[" ",(0,n.jsx)(a.xuv,{mt:"16px",maxW:"528px",w:"fit-content",children:(0,n.jsx)(W,{response:g})})]})]})}},38212:function(e,t,i){i.d(t,{Z:function(){return y}});var n=i(24246),r=i(14047),a=i(96356),s=i(14207),l=i(77181),o=i(86677),d=i(27378),c=i(16134),u=i(812),h=i(77830),x=i(41966),p=i(84306),m=i(66527),f=i(41207),g=i(39715),v=e=>{let{data:t=[],isSubmitting:i=!1,onSubmit:r,onCancel:a,disabled:s}=e,o=(0,d.useRef)(null),{errorAlert:c}=(0,p.V)(),u=t.length>0?m.ZP.dump(t):void 0,[h,v]=(0,d.useState)(void 0),[j,y]=(0,d.useState)(!1),[b,C]=(0,d.useState)(!u),_=(0,l.qY0)(),{data:k}=(0,x.NR)(),[S,w]=(0,d.useState)([]),I=e=>{m.ZP.load(e,{json:!0}),v(void 0)},z=()=>{let e=o.current.getValue();r(m.ZP.load(e,{json:!0})),w([])};return(0,n.jsxs)(l.kCb,{gap:"97px",children:[(0,n.jsxs)(l.gCW,{align:"stretch",w:"800px",children:[(0,n.jsx)(f.M,{defaultLanguage:"yaml",defaultValue:u,height:"calc(100vh - 526px)",onChange:e=>{try{y(!0),I(e),C(!!(!e||""===e.trim()))}catch(e){(0,f.F)(e)?v(e):c("Could not parse the supplied YAML")}},onMount:(e,t)=>{o.current=e,o.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0},readOnly:s},theme:"light"}),(0,n.jsxs)(l.Ugi,{justifyContent:"flex-end",pr:6,children:[a&&(0,n.jsx)(l.wpx,{onClick:a,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",disabled:s||b||!!h||i,loading:i,onClick:()=>{if(k&&k.length){let e=o.current.getValue(),t=k.filter(t=>e.includes("fides_key: ".concat(t.fides_key,"\n"))).map(e=>e.fides_key);if(w(t),t.length){_.onOpen();return}}z()},htmlType:"submit","data-testid":"save-yaml-btn",children:"Save"})]})]}),j&&(b||h)&&(0,n.jsx)(g.Z,{isEmptyState:b,yamlError:h}),(0,n.jsx)(l.cVQ,{isOpen:_.isOpen,onClose:_.onClose,onConfirm:()=>{z(),_.onClose()},title:"Overwrite dataset",message:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xvT,{children:["You are about to overwrite the dataset",S.length>1?"s":""," ",S.map((e,t)=>{let i=t===S.length-1;return(0,n.jsxs)(d.Fragment,{children:[(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),i?".":", "]},e)})]}),(0,n.jsx)(l.xvT,{children:"Are you sure you would like to continue?"})]})})]})};let j=e=>{let{children:t,...i}=e;return(0,n.jsx)(l.xvT,{color:"gray.700",fontSize:"14px",...i,children:t})};var y=()=>{let e=(0,o.useRouter)(),{errorAlert:t,successAlert:i}=(0,r.V)(),{handleError:p}=(0,r.H)(),[m,f]=(0,d.useState)(!1),{connection:g}=(0,c.C)(a.ZZ),{data:y,isFetching:b,isLoading:C,isSuccess:_}=(0,s.Eg)(g.key),[k]=(0,s.Lz)(),[S]=(0,x.EG)(),{data:w,isLoading:I,error:z}=(0,x.NR)(),[R,Z]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{y&&y.items.length&&Z(y.items[0].ctl_dataset.fides_key)},[y]);let W=async n=>{var r;let a={connection_key:null==g?void 0:g.key,dataset_pairs:n},s=await k(a).unwrap();(null===(r=s.failed)||void 0===r?void 0:r.length)>0?t(s.failed[0].message):i("Dataset successfully updated!"),e.push(h.JR)},F=async()=>{if(R)try{let e=R;y&&y.items.length&&(e=y.items[0].fides_key);let t=[{fides_key:e,ctl_dataset_fides_key:R}];W(t)}catch(e){p(e)}},A=async e=>{try{f(!0);let i=Array.isArray(e)?e:[e],n=await S(i);if((0,u.D4)(n)){let e=(0,u.e$)(n.error);t(e);return}let r=i.map(e=>({fides_key:e.fides_key,ctl_dataset_fides_key:e.fides_key}));if(y&&y.items.length){let{items:e}=y;r=e.map((e,t)=>({fides_key:e.fides_key,ctl_dataset_fides_key:i[t].fides_key}))}W(r)}catch(e){p(e)}finally{f(!1)}},T=""!==R&&void 0!==R;if(b||C||I&&!z)return(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})});let L=w&&w.length;return(0,n.jsxs)(l.gCW,{alignItems:"left",gap:4,children:[z&&(0,n.jsx)(j,{color:"red",children:"There was a problem loading existing datasets, please try again."}),(0,n.jsxs)(l.gCW,{alignItems:"flex-start",children:[L&&(0,n.jsx)("div",{children:(0,n.jsx)(l.gCW,{alignSelf:"start",gap:4,children:(0,n.jsxs)(l.xuv,{"data-testid":"dataset-selector-section",children:[(0,n.jsx)(j,{mb:4,children:"Choose a dataset to associate with this connector."}),(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.WPr,{allowClear:!0,options:w.map(e=>({label:e.fides_key,value:e.fides_key})),className:"w-full",placeholder:"Select",onChange:e=>Z(e),value:R,"data-testid":"dataset-selector"}),(0,n.jsx)(l.wpx,{onClick:F,type:"primary",className:"self-start",disabled:!T,"data-testid":"save-dataset-link-btn",children:"Save"})]})]})})}),L&&_&&(null==y?void 0:y.items)&&(0,n.jsx)(l.htM,{plain:!0,children:"or"}),_&&(null==y?void 0:y.items)&&(0,n.jsxs)(l.xuv,{"data-testid":"yaml-editor-section",children:[(0,n.jsx)(j,{mb:4,children:"View your dataset YAML below!"}),(0,n.jsx)(v,{data:y.items.map(e=>e.ctl_dataset),isSubmitting:m,onSubmit:A,disabled:T})]})]})]})}},27259:function(e,t,i){var n=i(24246),r=i(77181),a=i(34090);t.Z=e=>{let{disabled:t=!1,displayHelpIcon:i=!0,helpIconVisibility:s=!1,isRequired:l=!1,label:o,placeholder:d,type:c="text",...u}=e,{id:h,autoFocus:x}=u,[p,m]=(0,a.U$)(u);return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:l,isInvalid:!!(m.error&&m.touched),children:[o&&(0,n.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:h,minWidth:"150px",children:o}),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:["number"===c&&(0,n.jsxs)(r.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(r.zuI,{...p,autoComplete:"off",autoFocus:x}),(0,n.jsxs)(r.FiK,{children:[(0,n.jsx)(r.WQu,{}),(0,n.jsx)(r.Y_d,{})]})]}),"text"===c&&(0,n.jsx)(r.IIB,{...p,autoComplete:"off",autoFocus:x,color:"gray.700",isDisabled:t,placeholder:d,size:"sm"}),"textarea"===c&&(0,n.jsx)(r.gxH,{...p,autoComplete:"off",autoFocus:x,color:"gray.700",placeholder:d,resize:"none",size:"sm",value:p.value||""}),(0,n.jsx)(r.J1D,{children:m.error})]}),i&&(0,n.jsx)(r.kCb,{alignContent:"center",h:"32px",visibility:s?"visible":"hidden",children:(0,n.jsx)(r.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})]})}},3968:function(e,t,i){i.d(t,{E:function(){return n},S:function(){return r}});let n=e=>e.toLowerCase().replace(/ |\./g,"_"),r=(e,t)=>{let i="".concat(window.location.origin+t,"&key=").concat(e);window.location.href.toLowerCase()!==i.toLowerCase()&&window.history.replaceState(null,"",i)}},67762:function(e,t,i){i.d(t,{h:function(){return a}});var n=i(24246),r=i(77181);i(27378);let a=e=>{let{isSubmitting:t=!1,onCancelClick:i}=e;return(0,n.jsxs)(r.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(r.zxk,{onClick:i,variant:"outline",children:"Cancel"}),(0,n.jsx)(r.zxk,{bg:"primary.800",color:"white",isDisabled:t,isLoading:t,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})}},50881:function(e,t,i){i.d(t,{Z:function(){return y}});var n=i(24246),r=i(14047),a=i(96356),s=i(14207),l=i(77181),o=i(86677),d=i(27378),c=i(16134),u=i(77830),h=i(34090),x=i(55484),p=i(97181),m=i(57072),f=i(39864),g=i(27259),v=i(67762),j=e=>{let{data:t=[],isSubmitting:i=!1,onSaveClick:a}=e,{isLoading:s}=(0,m.MO)(),d=(0,c.C)(f.qb),j=(0,o.useRouter)(),{errorAlert:y}=(0,r.V)(),b=()=>{j.push(u.JR)};return s?null:(0,n.jsx)(h.J9,{enableReinitialize:!0,initialValues:{fields:t.length>0?t:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,t)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){y("PII Field must be unique");return}a(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:x.Ry({fields:x.IX().of(x.Ry().shape({pii_field:x.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:x.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:x.IX(x.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(h.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(h.F2,{name:"fields",render:t=>{let{fields:r}=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:r&&r.length>0?r.map((e,i)=>(0,n.jsxs)(l.Ugi,{mt:i>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{autoFocus:0===i,displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(i,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(i,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(p.d,{name:"fields.".concat(i,".data_categories"),options:d.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:i>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>t.remove(i),_hover:{cursor:"pointer"}})})]},i)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{t.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(v.h,{isSubmitting:i,onCancelClick:b})]})}})})})})},y=()=>{let e=(0,d.useRef)(!1),t=(0,o.useRouter)(),{successAlert:i}=(0,r.V)(),{handleError:h}=(0,r.H)(),[x,p]=(0,d.useState)(!1),[m,f]=(0,d.useState)([]),{connection:g}=(0,c.C)(a.ZZ),{data:v,isFetching:y,isLoading:b,isSuccess:C}=(0,s.QV)(g.key),[_]=(0,s.jF)(),[k]=(0,s._d)(),S=async(e,n)=>{try{p(!0);let n={connection_key:null==g?void 0:g.key,body:{...e}};m.length>0?await k(n).unwrap():await _(n).unwrap(),i("DSR customization ".concat(m.length>0?"updated":"added","!")),t.push(u.JR)}catch(e){h(e)}finally{p(!1)}};return(0,d.useEffect)(()=>(e.current=!0,C&&v&&f(v.fields),()=>{e.current=!1}),[v,C]),(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",w:"572px",children:"Customize your PII fields to create a friendly label name for your privacy request packages. This “Package Label” is the label your user will see in their downloaded package."}),(y||b)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),e.current&&!b?(0,n.jsx)(j,{data:m,isSubmitting:x,onSaveClick:S}):null]})}},19043:function(e,t,i){i.d(t,{Bw:function(){return s},D4:function(){return r},Dy:function(){return o},XD:function(){return d},cz:function(){return c},hE:function(){return l},oK:function(){return a}});var n=i(76649);let r=e=>"error"in e,a=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,s=e=>(0,n.Ln)({status:"number",data:{}},e),l=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){i.d(t,{Ln:function(){return n}});let n=(e,t)=>a(e,t),r=Symbol("SOME"),a=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>a(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>a(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>a(i,t[e]));class s{static narrow(e){return new s(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof s?e.NF:e instanceof Function?e:t=>n(e,t);return new s(e=>t(e)&&i(e))}}new s(e=>!0)}}]);