ethyca-fides 2.71.2b0__py2.py3-none-any.whl → 2.72.0rc0__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.

Potentially problematic release.


This version of ethyca-fides might be problematic. Click here for more details.

Files changed (271) hide show
  1. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc0.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc0.dist-info}/RECORD +239 -233
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/4bfbeff34611_add_polling_status.py +45 -12
  5. fides/api/api/v1/endpoints/connection_endpoints.py +38 -45
  6. fides/api/api/v1/endpoints/saas_config_endpoints.py +60 -48
  7. fides/api/api/v1/endpoints/system.py +11 -43
  8. fides/api/api/v1/endpoints/user_endpoints.py +8 -1
  9. fides/api/app_setup.py +1 -3
  10. fides/api/common_exceptions.py +4 -0
  11. fides/api/email_templates/get_email_template.py +3 -0
  12. fides/api/email_templates/template_names.py +1 -0
  13. fides/api/email_templates/templates/manual_task_digest.html +316 -0
  14. fides/api/models/detection_discovery/monitor_task.py +1 -0
  15. fides/api/models/digest/digest_execution.py +11 -1
  16. fides/api/models/event_audit.py +9 -0
  17. fides/api/models/messaging_template.py +7 -0
  18. fides/api/schemas/connection_configuration/connection_config.py +1 -30
  19. fides/api/schemas/messaging/messaging.py +15 -0
  20. fides/api/service/connectors/saas/connector_registry_service.py +1 -138
  21. fides/api/service/deps.py +8 -0
  22. fides/api/service/messaging/message_dispatch_service.py +38 -1
  23. fides/api/tasks/__init__.py +0 -1
  24. fides/api/util/connection_util.py +99 -215
  25. fides/api/util/event_audit_util.py +230 -0
  26. fides/api/util/masking_util.py +31 -0
  27. fides/api/util/saas_config_updater.py +66 -0
  28. fides/service/connection/__init__.py +0 -0
  29. fides/service/connection/connection_service.py +651 -0
  30. fides/service/event_audit_service.py +16 -22
  31. fides/ui-build/static/admin/404.html +1 -1
  32. fides/ui-build/static/admin/_next/static/SnBet3d7BrNVkglIl0ajl/_buildManifest.js +1 -0
  33. fides/ui-build/static/admin/_next/static/chunks/{1437-fb699e9d69c3e325.js → 1437-b49af8562f54a625.js} +1 -1
  34. fides/ui-build/static/admin/_next/static/chunks/155-dd7bf4b1acc077f6.js +1 -0
  35. fides/ui-build/static/admin/_next/static/chunks/{1817-10b392e1dd9c4673.js → 1817-9e4a1b1897e9bf98.js} +1 -1
  36. fides/ui-build/static/admin/_next/static/chunks/{2040-01d5edb1802d3482.js → 2040-68eb3a5d010c1e97.js} +1 -1
  37. fides/ui-build/static/admin/_next/static/chunks/{2397-40506a386a3a469a.js → 2397-fc4d998dd825ec4d.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/3377-d0a01db227febac8.js +1 -0
  39. fides/ui-build/static/admin/_next/static/chunks/{3696-259be222ea12392a.js → 3696-19767df579460115.js} +1 -1
  40. fides/ui-build/static/admin/_next/static/chunks/3700-12cb80d0f957fcc4.js +1 -0
  41. fides/ui-build/static/admin/_next/static/chunks/401-3bcfbf738f028868.js +1 -0
  42. fides/ui-build/static/admin/_next/static/chunks/5185-7474c764ea99f1ca.js +1 -0
  43. fides/ui-build/static/admin/_next/static/chunks/{5258-2d28b2c64acf5de3.js → 5258-f16177770ded638e.js} +1 -1
  44. fides/ui-build/static/admin/_next/static/chunks/{5279-21929b12c927b022.js → 5279-c00fe2f02fb0884a.js} +1 -1
  45. fides/ui-build/static/admin/_next/static/chunks/{5643-7583c1f8dbd83273.js → 5643-d43eaf754759827a.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/{5783-55c0387508e50f3e.js → 5783-38508f27d73ce33d.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/6277-24790943a32f4310.js +1 -0
  48. fides/ui-build/static/admin/_next/static/chunks/{6315-2d4e86a32fc40458.js → 6315-8e75ebd641e72b64.js} +1 -1
  49. fides/ui-build/static/admin/_next/static/chunks/{6853-cb15625a713b3ef9.js → 6853-a9bf7b1e3efc4890.js} +1 -1
  50. fides/ui-build/static/admin/_next/static/chunks/6954-50bacf2850b67baa.js +1 -0
  51. fides/ui-build/static/admin/_next/static/chunks/7245-0fb0a47c8d09b133.js +1 -0
  52. fides/ui-build/static/admin/_next/static/chunks/{7476-f25fce73eeb1f9c6.js → 7476-1ff6e16cd626c709.js} +1 -1
  53. fides/ui-build/static/admin/_next/static/chunks/{7488-df17b592fbeaa1eb.js → 7488-d8dae51cdc7beded.js} +1 -1
  54. fides/ui-build/static/admin/_next/static/chunks/7630-e679419d1b9ccb40.js +1 -0
  55. fides/ui-build/static/admin/_next/static/chunks/{8011-56031d82d5428981.js → 8011-4712e3cd2f4ac324.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/{8373-7f940f5ac9c38b1f.js → 8373-d1e097f06ec2ee69.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/{9046-31b16a7e872c22be.js → 9046-4833f2609581dba5.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/9070-72f484137b9e8c01.js +1 -0
  59. fides/ui-build/static/admin/_next/static/chunks/{9330-cea1bf40f5d27e53.js → 9330-4e0809deb8798d22.js} +1 -1
  60. fides/ui-build/static/admin/_next/static/chunks/{9682-2754256aeae141bb.js → 9682-38892cb66c7f95e3.js} +1 -1
  61. fides/ui-build/static/admin/_next/static/chunks/{9899-15530c468d5656a1.js → 9899-c643484881627fb2.js} +1 -1
  62. fides/ui-build/static/admin/_next/static/chunks/9965-2236fd3e20e82310.js +1 -0
  63. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-9e869a44215709ed.js → _app-2e4cd4b7602e1bb3.js} +43 -43
  64. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-dba951f9d47e999b.js +1 -0
  65. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-42d903108bea604f.js +1 -0
  66. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-f8ecba33126e0c25.js +1 -0
  67. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-224e9981280a4dc5.js +1 -0
  68. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-144f4a5d20e97568.js +1 -0
  69. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-69b429a9d30ebaf1.js → projects-567785f8792366e1.js} +1 -1
  70. fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-a53ef0161235ee47.js → data-catalog-bfd0c20e75b8b920.js} +1 -1
  71. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-b38ccd2e832e49f3.js +1 -0
  72. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/data-explorer-98f2ad49cf056476.js +1 -0
  73. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-ace848575e688200.js → [monitorId]-ce9c88efaa0e1574.js} +1 -1
  74. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-53ca31c50c43007f.js → action-center-ba88a4fb3040868b.js} +1 -1
  75. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-f87e4a0f664f4cde.js → activity-fe2bfdf0311bfef8.js} +1 -1
  76. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-db54d01fd8f6df50.js → new-a942e03888533e9d.js} +1 -1
  77. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-55d312af5228e098.js → dataset-cdc0702d27cf8c33.js} +1 -1
  78. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-488beba62e832660.js → [id]-06012371d6895224.js} +1 -1
  79. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-4aad5495f9bf81ce.js → new-206e6e6d1fe2410f.js} +1 -1
  80. fides/ui-build/static/admin/_next/static/chunks/pages/{index-8a2ba955d92d52ee.js → index-c67367086367c633.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-627a239ad9ee583c.js +1 -0
  82. fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-f69b04d3b4cf43b1.js → integrations-95e69be79db496a8.js} +1 -1
  83. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-f57a7e0fa0980ccd.js +1 -0
  84. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-ffe085b4c4397507.js +1 -0
  85. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-6eaa901f9b870009.js +1 -0
  86. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-f5bce1ceb0502f04.js → FormikAntFormItem-4de259b097029614.js} +1 -1
  87. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-90b4ea9f9deca6e2.js → FormikControlled-8b141c7922fa9ac7.js} +1 -1
  88. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-3bdf46d79cc0109f.js +1 -0
  89. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-fe4ed3ad75151e36.js → [id]-3f0d46ca6f1b519f.js} +1 -1
  90. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-de681c2d022c9e0d.js → storage-8954850d483b26f3.js} +1 -1
  91. fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-cd8ba2eef9085377.js → privacy-requests-454ebb8c7af36486.js} +1 -1
  92. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-9981789c06a174a7.js +1 -0
  93. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-c298a89b006c2646.js +1 -0
  94. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-91efbb5b334823a1.js +1 -0
  95. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-ea9baf24de35d3b1.js → custom-fields-401ed29bd0c5df46.js} +1 -1
  96. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-ee33c5de7339d7d4.js +1 -0
  97. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-33448bf0a1d53870.js → locations-787738296ba93cf2.js} +1 -1
  98. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers-e93333bb5a79dc53.js +1 -0
  99. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-3c315036f1fc9f90.js → organization-7376fc65cbfa9fb4.js} +1 -1
  100. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-085834d81742e278.js +1 -0
  101. fides/ui-build/static/admin/_next/static/chunks/pages/systems-c6317160d10b8f29.js +1 -0
  102. fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-cecea5832cb1f3b0.js → taxonomy-ea7e284bc31a4dc2.js} +1 -1
  103. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-726fbc0a34ffba1f.js → [id]-ba3b6d517ef5de22.js} +1 -1
  104. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-df9b75ab01c1a2ea.js → user-management-ed8df757a8129298.js} +1 -1
  105. fides/ui-build/static/admin/_next/static/css/80cba63bd8a9a6c7.css +1 -0
  106. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  107. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  108. fides/ui-build/static/admin/add-systems.html +1 -1
  109. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  110. fides/ui-build/static/admin/consent/configure.html +1 -1
  111. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  112. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  113. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  114. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  115. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  116. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  117. fides/ui-build/static/admin/consent/properties.html +1 -1
  118. fides/ui-build/static/admin/consent/reporting.html +1 -1
  119. fides/ui-build/static/admin/consent.html +1 -1
  120. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  121. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  122. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  123. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  124. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  125. fides/ui-build/static/admin/data-catalog.html +1 -1
  126. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  127. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/data-explorer.html +1 -1
  128. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  129. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  130. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  131. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  132. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  133. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  134. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  135. fides/ui-build/static/admin/datamap.html +1 -1
  136. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  137. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  138. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  139. fides/ui-build/static/admin/dataset/new.html +1 -1
  140. fides/ui-build/static/admin/dataset.html +1 -1
  141. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  142. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  143. fides/ui-build/static/admin/datastore-connection.html +1 -1
  144. fides/ui-build/static/admin/index.html +1 -1
  145. fides/ui-build/static/admin/integrations/[id].html +1 -1
  146. fides/ui-build/static/admin/integrations.html +1 -1
  147. fides/ui-build/static/admin/login/[provider].html +1 -1
  148. fides/ui-build/static/admin/login.html +1 -1
  149. fides/ui-build/static/admin/messaging/[id].html +1 -1
  150. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  151. fides/ui-build/static/admin/messaging.html +1 -1
  152. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  153. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  154. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  155. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  156. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  157. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  158. fides/ui-build/static/admin/poc/forms.html +1 -1
  159. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  160. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  161. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  162. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  163. fides/ui-build/static/admin/privacy-requests.html +1 -1
  164. fides/ui-build/static/admin/properties/[id].html +1 -1
  165. fides/ui-build/static/admin/properties/add-property.html +1 -1
  166. fides/ui-build/static/admin/properties.html +1 -1
  167. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  168. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  169. fides/ui-build/static/admin/settings/about.html +1 -1
  170. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  171. fides/ui-build/static/admin/settings/consent.html +1 -1
  172. fides/ui-build/static/admin/settings/custom-fields/[id].html +1 -1
  173. fides/ui-build/static/admin/settings/custom-fields/new.html +1 -1
  174. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  175. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  176. fides/ui-build/static/admin/settings/domains.html +1 -1
  177. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  178. fides/ui-build/static/admin/settings/locations.html +1 -1
  179. fides/ui-build/static/admin/settings/messaging-providers/[key].html +1 -1
  180. fides/ui-build/static/admin/settings/messaging-providers/new.html +1 -1
  181. fides/ui-build/static/admin/settings/messaging-providers.html +1 -1
  182. fides/ui-build/static/admin/settings/organization.html +1 -1
  183. fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
  184. fides/ui-build/static/admin/settings/regulations.html +1 -1
  185. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  186. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  187. fides/ui-build/static/admin/systems.html +1 -1
  188. fides/ui-build/static/admin/taxonomy.html +1 -1
  189. fides/ui-build/static/admin/user-management/new.html +1 -1
  190. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  191. fides/ui-build/static/admin/user-management.html +1 -1
  192. fides/ui-build/static/admin/_next/static/chunks/155-3d03f101c662c054.js +0 -1
  193. fides/ui-build/static/admin/_next/static/chunks/3377-4c129258b4c4ea28.js +0 -1
  194. fides/ui-build/static/admin/_next/static/chunks/3700-42976bfaad3b91c9.js +0 -1
  195. fides/ui-build/static/admin/_next/static/chunks/401-5270e3e23b08ab2b.js +0 -1
  196. fides/ui-build/static/admin/_next/static/chunks/5185-325e5435a0c7dcb7.js +0 -1
  197. fides/ui-build/static/admin/_next/static/chunks/6277-ca31d48a33202761.js +0 -1
  198. fides/ui-build/static/admin/_next/static/chunks/6954-08b59d28d7a2a43b.js +0 -1
  199. fides/ui-build/static/admin/_next/static/chunks/7245-895bb7c6a6c797bc.js +0 -1
  200. fides/ui-build/static/admin/_next/static/chunks/7630-71582de0e818e28f.js +0 -1
  201. fides/ui-build/static/admin/_next/static/chunks/9070-13f237db78da586d.js +0 -1
  202. fides/ui-build/static/admin/_next/static/chunks/9965-54037b6c8f36d14b.js +0 -1
  203. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-1c9cef80deccb15d.js +0 -1
  204. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-4adeec3bcec05f7b.js +0 -1
  205. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-4254abef7bb52edd.js +0 -1
  206. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-8e76cbfaf71fdcb9.js +0 -1
  207. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-93730a4316c0d980.js +0 -1
  208. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-f85f4f8fcf1bfbdb.js +0 -1
  209. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/data-explorer-3619e454763dba09.js +0 -1
  210. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-4580f70eb41b6a7d.js +0 -1
  211. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-c7ba755c2e0e2377.js +0 -1
  212. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-f14bfd5890a0e939.js +0 -1
  213. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-e4274a4d5d23eea9.js +0 -1
  214. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-520ba5ae02f47bda.js +0 -1
  215. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-764b6ce8e030d4a1.js +0 -1
  216. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-da78452b3c41b29e.js +0 -1
  217. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-6442e761ecb5c65a.js +0 -1
  218. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-6f61d886aa6f5ce7.js +0 -1
  219. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers-776258bad0941a7d.js +0 -1
  220. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-8067e12227210f48.js +0 -1
  221. fides/ui-build/static/admin/_next/static/chunks/pages/systems-277ea1f34c3714cf.js +0 -1
  222. fides/ui-build/static/admin/_next/static/css/372d6a236c84613f.css +0 -1
  223. fides/ui-build/static/admin/_next/static/zmEQMSpOBih8kmA1t-EWO/_buildManifest.js +0 -1
  224. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc0.dist-info}/WHEEL +0 -0
  225. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc0.dist-info}/entry_points.txt +0 -0
  226. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc0.dist-info}/licenses/LICENSE +0 -0
  227. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0rc0.dist-info}/top_level.txt +0 -0
  228. /fides/ui-build/static/admin/_next/static/{zmEQMSpOBih8kmA1t-EWO → SnBet3d7BrNVkglIl0ajl}/_ssgManifest.js +0 -0
  229. /fides/ui-build/static/admin/_next/static/chunks/{1099-27b2d4e59a569b38.js → 1099-0b3dedca0b088f1a.js} +0 -0
  230. /fides/ui-build/static/admin/_next/static/chunks/{1115-8fb5000847f73ec7.js → 1115-a124adb312fb2699.js} +0 -0
  231. /fides/ui-build/static/admin/_next/static/chunks/{2921-edfdffa353a611e4.js → 2921-d3e9c85cdd7c27ef.js} +0 -0
  232. /fides/ui-build/static/admin/_next/static/chunks/{3772-aa7beafe5df5e656.js → 3772-f110cd525aead279.js} +0 -0
  233. /fides/ui-build/static/admin/_next/static/chunks/{3923-fa1d71afc7dc9e6e.js → 3923-ae843be719d73ef4.js} +0 -0
  234. /fides/ui-build/static/admin/_next/static/chunks/{4817-5f9b9c9bafe888f1.js → 4817-1ec683be64664576.js} +0 -0
  235. /fides/ui-build/static/admin/_next/static/chunks/{549-c3b4c51f45a84a52.js → 549-9892a4d85bcbf7a2.js} +0 -0
  236. /fides/ui-build/static/admin/_next/static/chunks/{7773-98d34d188ae0a694.js → 7773-fcd7875cd98f5f39.js} +0 -0
  237. /fides/ui-build/static/admin/_next/static/chunks/{796-7944f684f8945506.js → 796-f3fc016814418a8b.js} +0 -0
  238. /fides/ui-build/static/admin/_next/static/chunks/{9826-e71887e2c4283249.js → 9826-cbfbfc79b6841f08.js} +0 -0
  239. /fides/ui-build/static/admin/_next/static/chunks/pages/{404-2014144a1a0fa64f.js → 404-aa3982e4f51705df.js} +0 -0
  240. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-4f3ba02774f27795.js → manual-a37865aa5cf14ea2.js} +0 -0
  241. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-f7bdc2da53137ffd.js → add-vendors-611f37b6e9031263.js} +0 -0
  242. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-a27b220fe76bdc8e.js → configure-21123d6de9094ca2.js} +0 -0
  243. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-542fd4a4322122f1.js → [id]-5e5eae30956fea95.js} +0 -0
  244. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-d31d1c233e94dc1f.js → [id]-13e4cc79e134b563.js} +0 -0
  245. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-2ea057e6217993f9.js → new-ba8ee9f3b86763c3.js} +0 -0
  246. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-eb557180eded0abd.js → properties-1585e94b122004f3.js} +0 -0
  247. /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-c64589e53338e59a.js → consent-35925fa8990ec083.js} +0 -0
  248. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-8cd4d1d6ba000333.js → [projectUrn]-ca7f388ecd1601df.js} +0 -0
  249. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-8c7103ebf01d6e6a.js → resources-c3a69a1d0d38cea7.js} +0 -0
  250. /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-ae7a4c1c4eabc0d4.js → datamap-7e3e7bf39b111f66.js} +0 -0
  251. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-179e5d09ccff50c1.js → [...subfieldNames]-a3f64d75bdfe8936.js} +0 -0
  252. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-59466e5e238c59d0.js → [collectionName]-9fe2facc2f232fde.js} +0 -0
  253. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-36d90c8c39fb0d1c.js → [datasetId]-fd69a9c224af3746.js} +0 -0
  254. /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-496ec7ecca8259dc.js → datastore-connection-5efe1b59a50befd8.js} +0 -0
  255. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-d6eed2dc5d27f625.js → [id]-ab70f1fad73df45f.js} +0 -0
  256. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-c7b43fa365f4be10.js → add-template-0f2238b930e6acd8.js} +0 -0
  257. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-d6043ae8dae6ef7d.js → FormikField-25d78a1dbaf785ed.js} +0 -0
  258. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-b46f432b51421fae.js → table-migration-fc3e49b5ee4a4d23.js} +0 -0
  259. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-04ebf2fb6fc4358a.js → configure-948e71f3cfbe304e.js} +0 -0
  260. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-f75a407d78857ab3.js → [id]-180bb94838bca304.js} +0 -0
  261. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-975ff605e1dbc09c.js → add-property-719bbd424816ef58.js} +0 -0
  262. /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-e7fdf3a9a3e8c267.js → properties-ca707af08bca687a.js} +0 -0
  263. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-44d06e280990854d.js → domain-records-e57ee1a08caacb1b.js} +0 -0
  264. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-11148b182370fd83.js → email-templates-3fce669766a3d183.js} +0 -0
  265. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/{[key]-4a18d8135c0dbf2a.js → [key]-ad748b76b1cc69ba.js} +0 -0
  266. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/{new-41957281b8ec26b1.js → new-d962d09f6156484c.js} +0 -0
  267. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{privacy-requests-00917525c9245a90.js → privacy-requests-bf97b87395719636.js} +0 -0
  268. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-5d924b2f1f926b88.js → regulations-2c938cdf5915ff39.js} +0 -0
  269. /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-1a902922759cae76.js → [id]-62015f01f64578b2.js} +0 -0
  270. /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-629c88e90699369b.js → new-789f5ee80227c57b.js} +0 -0
  271. /fides/ui-build/static/admin/_next/static/chunks/{webpack-118fb4723d13c14f.js → webpack-119be8f042eb6b8b.js} +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1500],{50697:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations/[id]",function(){return a(19267)}])},67991:function(e,t,a){"use strict";a.d(t,{Od:function(){return s},QZ:function(){return i}});var n=a(27378);let i=e=>{let{items:t,selected:a,onChange:n}=e,i=t.every(e=>a.includes(e.id))&&!!t.length;return{allSelected:i,someSelected:t.some(e=>a.includes(e.id))&&!!t.length,handleToggleAll:()=>{i?n([]):n(t.map(e=>e.id))},handleToggleSelection:e=>{a.includes(e)?n(a.filter(t=>t!==e)):n([...a,e])}}},s=e=>{let{initialSelected:t,initialExcluded:a,initialAllSelected:i,itemCount:s}=e,[l,r]=(0,n.useState)(t),[o,d]=(0,n.useState)(a),[c,u]=(0,n.useState)(i||l.length===s),m=!!l.length||!!o.length;return{selected:l,excluded:o,allSelected:c,someSelected:m,handleToggleAll:()=>{c?(d([]),o.length||u(!1)):(r([]),u(!0))},handleToggleItemSelected:e=>{if(c)d(o.includes(e)?o.filter(t=>t!==e):[...o,e]);else{let t=l.includes(e)?l.filter(t=>t!==e):[...l,e];r(t),t.length===s&&u(!0)}}}}},90111:function(e,t,a){"use strict";var n=a(24246),i=a(20595);t.Z=e=>{let{children:t,...a}=e;return(0,n.jsx)(i.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...a,children:t})}},8411:function(e,t,a){"use strict";a.d(t,{NA:function(){return s},Z8:function(){return i}});var n=a(85054);let i={[n._F.ER]:"Eritrea",[n._F.DJ]:"Djibouti",[n._F.MR]:"Mauritania",[n._F.NA]:"Namibia",[n._F.GH]:"Ghana",[n._F.SS]:"South Sudan",[n._F.SC]:"Seychelles",[n._F.IO]:"British Indian Ocean Territory",[n._F.GQ]:"Equatorial Guinea",[n._F.AO]:"Angola",[n._F.CG]:"Republic of the Congo",[n._F.BW]:"Botswana",[n._F.BI]:"Burundi",[n._F.DZ]:"Algeria",[n._F.TD]:"Chad",[n._F.NG]:"Nigeria",[n._F.TZ]:"Tanzania",[n._F.EH]:"Western Sahara",[n._F.SN]:"Senegal",[n._F.LR]:"Liberia",[n._F.ZA]:"South Africa",[n._F.CV]:"Cape Verde",[n._F.GM]:"Gambia",[n._F.SD]:"Sudan",[n._F.KM]:"Comoros",[n._F.SZ]:"Eswatini",[n._F.UG]:"Uganda",[n._F.MG]:"Madagascar",[n._F.RW]:"Rwanda",[n._F.CD]:"DR Congo",[n._F.CM]:"Cameroon",[n._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[n._F.TG]:"Togo",[n._F.MU]:"Mauritius",[n._F.NE]:"Niger",[n._F.BJ]:"Benin",[n._F.EG]:"Egypt",[n._F.LS]:"Lesotho",[n._F.ET]:"Ethiopia",[n._F.MA]:"Morocco",[n._F.YT]:"Mayotte",[n._F.BF]:"Burkina Faso",[n._F.RE]:"R\xe9union",[n._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[n._F.CF]:"Central African Republic",[n._F.MZ]:"Mozambique",[n._F.MW]:"Malawi",[n._F.ML]:"Mali",[n._F.ZM]:"Zambia",[n._F.LY]:"Libya",[n._F.GW]:"Guinea-Bissau",[n._F.SO]:"Somalia",[n._F.KE]:"Kenya",[n._F.GN]:"Guinea",[n._F.ZW]:"Zimbabwe",[n._F.TN]:"Tunisia",[n._F.SL]:"Sierra Leone",[n._F.GA]:"Gabon",[n._F.CI]:"Ivory Coast",[n._F.JO]:"Jordan",[n._F.PK]:"Pakistan",[n._F.KP]:"North Korea",[n._F.MO]:"Macau",[n._F.AM]:"Armenia",[n._F.SY]:"Syria",[n._F.TJ]:"Tajikistan",[n._F.SA]:"Saudi Arabia",[n._F.KR]:"South Korea",[n._F.NP]:"Nepal",[n._F.PH]:"Philippines",[n._F.IQ]:"Iraq",[n._F.LB]:"Lebanon",[n._F.MN]:"Mongolia",[n._F.PS]:"Palestine",[n._F.YE]:"Yemen",[n._F.JP]:"Japan",[n._F.KZ]:"Kazakhstan",[n._F.LK]:"Sri Lanka",[n._F.MM]:"Myanmar",[n._F.KG]:"Kyrgyzstan",[n._F.CN]:"China",[n._F.AF]:"Afghanistan",[n._F.OM]:"Oman",[n._F.IN]:"India",[n._F.LA]:"Laos",[n._F.UZ]:"Uzbekistan",[n._F.MV]:"Maldives",[n._F.ID]:"Indonesia",[n._F.VN]:"Vietnam",[n._F.MY]:"Malaysia",[n._F.TW]:"Taiwan",[n._F.KH]:"Cambodia",[n._F.AE]:"United Arab Emirates",[n._F.HK]:"Hong Kong",[n._F.GE]:"Georgia (Country)",[n._F.BD]:"Bangladesh",[n._F.KW]:"Kuwait",[n._F.TM]:"Turkmenistan",[n._F.QA]:"Qatar",[n._F.BH]:"Bahrain",[n._F.BN]:"Brunei",[n._F.TH]:"Thailand",[n._F.BT]:"Bhutan",[n._F.SG]:"Singapore",[n._F.IL]:"Israel",[n._F.AZ]:"Azerbaijan",[n._F.TL]:"Timor-Leste",[n._F.IR]:"Iran",[n._F.TR]:"Turkey",[n._F.MK]:"North Macedonia",[n._F.IE]:"Ireland",[n._F.DK]:"Denmark",[n._F.SK]:"Slovakia",[n._F.MD]:"Moldova",[n._F.AX]:"\xc5land Islands",[n._F.PL]:"Poland",[n._F.BA]:"Bosnia and Herzegovina",[n._F.SM]:"San Marino",[n._F.CZ]:"Czechia",[n._F.EE]:"Estonia",[n._F.XK]:"Kosovo",[n._F.FO]:"Faroe Islands",[n._F.SJ]:"Svalbard and Jan Mayen",[n._F.GG]:"Guernsey",[n._F.FR]:"France",[n._F.NL]:"Netherlands",[n._F.FI]:"Finland",[n._F.PT]:"Portugal",[n._F.DE]:"Germany",[n._F.MT]:"Malta",[n._F.JE]:"Jersey",[n._F.IS]:"Iceland",[n._F.ES]:"Spain",[n._F.GI]:"Gibraltar",[n._F.NO]:"Norway",[n._F.CY]:"Cyprus",[n._F.RS]:"Serbia",[n._F.LT]:"Lithuania",[n._F.MC]:"Monaco",[n._F.LU]:"Luxembourg",[n._F.UA]:"Ukraine",[n._F.IM]:"Isle of Man",[n._F.RO]:"Romania",[n._F.BE]:"Belgium",[n._F.SE]:"Sweden",[n._F.ME]:"Montenegro",[n._F.LV]:"Latvia",[n._F.VA]:"Vatican City",[n._F.AT]:"Austria",[n._F.AL]:"Albania",[n._F.LI]:"Liechtenstein",[n._F.GR]:"Greece",[n._F.IT]:"Italy",[n._F.AD]:"Andorra",[n._F.GB]:"United Kingdom",[n._F.RU]:"Russia",[n._F.SI]:"Slovenia",[n._F.BY]:"Belarus",[n._F.CH]:"Switzerland",[n._F.HU]:"Hungary",[n._F.BG]:"Bulgaria",[n._F.HR]:"Croatia",[n._F.TC]:"Turks and Caicos Islands",[n._F.CW]:"Cura\xe7ao",[n._F.GP]:"Guadeloupe",[n._F.UM]:"United States Minor Outlying Islands",[n._F.GT]:"Guatemala",[n._F.PM]:"Saint Pierre and Miquelon",[n._F.BQ]:"Caribbean Netherlands",[n._F.GL]:"Greenland",[n._F.SX]:"Sint Maarten",[n._F.PA]:"Panama",[n._F.AW]:"Aruba",[n._F.MQ]:"Martinique",[n._F.AG]:"Antigua and Barbuda",[n._F.BM]:"Bermuda",[n._F.CU]:"Cuba",[n._F.GD]:"Grenada",[n._F.NI]:"Nicaragua",[n._F.LC]:"Saint Lucia",[n._F.KN]:"Saint Kitts and Nevis",[n._F.DO]:"Dominican Republic",[n._F.VC]:"Saint Vincent and the Grenadines",[n._F.BZ]:"Belize",[n._F.HT]:"Haiti",[n._F.JM]:"Jamaica",[n._F.BS]:"Bahamas",[n._F.MX]:"Mexico",[n._F.MF]:"Saint Martin",[n._F.SV]:"El Salvador",[n._F.BL]:"Saint Barth\xe9lemy",[n._F.AI]:"Anguilla",[n._F.MS]:"Montserrat",[n._F.VG]:"British Virgin Islands",[n._F.BB]:"Barbados",[n._F.HN]:"Honduras",[n._F.KY]:"Cayman Islands",[n._F.DM]:"Dominica",[n._F.TT]:"Trinidad and Tobago",[n._F.CR]:"Costa Rica",[n._F.SR]:"Suriname",[n._F.CX]:"Christmas Island",[n._F.WS]:"Samoa",[n._F.PF]:"French Polynesia",[n._F.AS]:"American Samoa",[n._F.NC]:"New Caledonia",[n._F.TK]:"Tokelau",[n._F.PW]:"Palau",[n._F.KI]:"Kiribati",[n._F.VU]:"Vanuatu",[n._F.PN]:"Pitcairn Islands",[n._F.CK]:"Cook Islands",[n._F.FJ]:"Fiji",[n._F.PG]:"Papua New Guinea",[n._F.MP]:"Northern Mariana Islands",[n._F.NU]:"Niue",[n._F.TV]:"Tuvalu",[n._F.NF]:"Norfolk Island",[n._F.TO]:"Tonga",[n._F.FM]:"Micronesia",[n._F.SB]:"Solomon Islands",[n._F.NR]:"Nauru",[n._F.WF]:"Wallis and Futuna",[n._F.GU]:"Guam",[n._F.AU]:"Australia",[n._F.NZ]:"New Zealand",[n._F.MH]:"Marshall Islands",[n._F.CC]:"Cocos (Keeling) Islands",[n._F.VE]:"Venezuela",[n._F.PY]:"Paraguay",[n._F.BR]:"Brazil",[n._F.CO]:"Colombia",[n._F.PE]:"Peru",[n._F.CL]:"Chile",[n._F.UY]:"Uruguay",[n._F.AR]:"Argentina",[n._F.GY]:"Guyana",[n._F.BO]:"Bolivia",[n._F.GF]:"French Guiana",[n._F.EC]:"Ecuador",[n._F.FK]:"Falkland Islands",[n._F.US_AL]:"Alabama",[n._F.US_AK]:"Alaska",[n._F.US_AZ]:"Arizona",[n._F.US_AR]:"Arkansas",[n._F.US_CA]:"California",[n._F.US_CO]:"Colorado",[n._F.US_CT]:"Connecticut",[n._F.US_DE]:"Delaware",[n._F.US_DC]:"District of Columbia (DC)",[n._F.US_FL]:"Florida",[n._F.US_GA]:"Georgia",[n._F.US_HI]:"Hawaii",[n._F.US_ID]:"Idaho",[n._F.US_IL]:"Illinois",[n._F.US_IN]:"Indiana",[n._F.US_IA]:"Iowa",[n._F.US_KS]:"Kansas",[n._F.US_KY]:"Kentucky",[n._F.US_LA]:"Louisiana",[n._F.US_ME]:"Maine",[n._F.US_MD]:"Maryland",[n._F.US_MA]:"Massachusetts",[n._F.US_MI]:"Michigan",[n._F.US_MN]:"Minnesota",[n._F.US_MS]:"Mississippi",[n._F.US_MO]:"Missouri",[n._F.US_MT]:"Montana",[n._F.US_NE]:"Nebraska",[n._F.US_NV]:"Nevada",[n._F.US_NH]:"New Hampshire",[n._F.US_NJ]:"New Jersey",[n._F.US_NM]:"New Mexico",[n._F.US_NY]:"New York",[n._F.US_NC]:"North Carolina",[n._F.US_ND]:"North Dakota",[n._F.US_OH]:"Ohio",[n._F.US_OK]:"Oklahoma",[n._F.US_OR]:"Oregon",[n._F.US_PA]:"Pennsylvania",[n._F.US_PR]:"Puerto Rico",[n._F.US_RI]:"Rhode Island",[n._F.US_SC]:"South Carolina",[n._F.US_SD]:"South Dakota",[n._F.US_TN]:"Tennessee",[n._F.US_TX]:"Texas",[n._F.US_UT]:"Utah",[n._F.US_VA]:"Virginia",[n._F.US_VI]:"United States Virgin Islands",[n._F.US_VT]:"Vermont",[n._F.US_WA]:"Washington",[n._F.US_WV]:"West Virginia",[n._F.US_WI]:"Wisconsin",[n._F.US_WY]:"Wyoming",[n._F.CA_AB]:"Alberta",[n._F.CA_BC]:"British Columbia",[n._F.CA_MB]:"Manitoba",[n._F.CA_NB]:"New Brunswick",[n._F.CA_NL]:"Newfoundland and Labrador",[n._F.CA_NS]:"Nova Scotia",[n._F.CA_ON]:"Ontario",[n._F.CA_PE]:"Prince Edward Island",[n._F.CA_QC]:"Quebec",[n._F.CA_SK]:"Saskatchewan",[n._F.CA_NT]:"Northwest Territories",[n._F.CA_NU]:"Nunavut",[n._F.CA_YT]:"Yukon",[n._F.CA]:"Canada",[n._F.US]:"United States",[n._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[n._F.CARIBBEAN]:"Caribbean",[n._F.EEA]:"European Economic Area (EEA)",[n._F.NON_EEA]:"Non European Economic Area",[n._F.GLOBAL]:"Global"},s=new Map(Object.entries(i));Object.entries(i).map(e=>({value:e[0],label:e[1]}))},8125:function(e,t,a){"use strict";a.d(t,{V:function(){return s},o:function(){return d}});var n=a(27378),i=a(32735);let s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{enableSelection:a=!1,getRowKey:s,bulkActions:l,isLoading:r=!1,isFetching:o=!1,dataSource:d=[],totalRows:c=0,currentPage:u,pageSize:m,customTableProps:h={}}=t,p=(0,n.useCallback)(e=>{if(e&&"object"==typeof e){if(e.id)return String(e.id);if(e.key)return String(e.key)}return String(e)},[]),_=s||p,[g,x]=(0,n.useState)([]),[y,f]=(0,n.useState)([]),F=(0,n.useCallback)(()=>{x([]),f([])},[]),v=(0,n.useMemo)(()=>({selectedRowKeys:g,selectedRows:y,resetSelections:F}),[g,y,F]),S=(0,n.useMemo)(()=>{if(a)return{selectedRowKeys:g,onChange:(e,t)=>{x(e),f(t)}}},[a,g]),b=(0,n.useCallback)((t,a,n)=>{var i,s;let l=null!==(i=t.current)&&void 0!==i?i:e.pageIndex,r=null!==(s=t.pageSize)&&void 0!==s?s:e.pageSize,o=l!==e.pageIndex||r!==e.pageSize;o?(t.current&&t.current!==e.pageIndex&&e.updatePageIndex(t.current),t.pageSize&&t.pageSize!==e.pageSize&&e.updatePageSize(t.pageSize)):e.updateFilters(a||{});let d=n&&!Array.isArray(n)?n.field:void 0,c=n&&!Array.isArray(n)&&null!==n.order?n.order:void 0;o||e.updateSorting(d,c)},[e]),j=(0,n.useMemo)(()=>{var t,a,n,s,l;return{current:null!=u?u:e.pageIndex,pageSize:null!=m?m:e.pageSize,total:c,showSizeChanger:null===(s=null===(t=e.paginationConfig)||void 0===t?void 0:t.showSizeChanger)||void 0===s||s,pageSizeOptions:null!==(l=null===(n=e.paginationConfig)||void 0===n?void 0:null===(a=n.pageSizeOptions)||void 0===a?void 0:a.map(String))&&void 0!==l?l:i.VZ}},[u,e.pageIndex,m,e.pageSize,c,e.paginationConfig]),C=(0,n.useMemo)(()=>({dataSource:d,loading:r||o,pagination:j,onChange:b,rowKey:_,scroll:{x:"max-content",scrollToFirstRowOnChange:!0},size:"small",bordered:!0,...h}),[d,r,o,j,b,_,h]),T=g.map(String),k=y.length>0,E=(0,n.useCallback)(e=>{let t=null==l?void 0:l.actions.find(t=>t.key===e);return t?{disabled:!k||!!t.disabled&&t.disabled(y),loading:t.loading||!1,onClick:()=>t.onClick(y)}:{disabled:!0,loading:!1}},[l,k,y]);return(0,n.useMemo)(()=>({tableProps:C,selectionProps:S,selectionState:v,selectedRows:y,selectedKeys:T,hasSelectedRows:k,resetSelections:F,getBulkActionProps:E,isLoadingOrFetching:r||o,hasData:d.length>0}),[C,S,v,y,T,k,F,E,r,o,d.length])};var l=a(40431),r=a(17245);let o=()=>({filters:(0,l.WJ)(e=>e).withDefault({})}),d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{pagination:t={},sorting:a={},search:i={},onStateChange:s}=e,{pageIndex:d,pageSize:c,resetPagination:u,updatePageIndex:m,updatePageSize:h,pageSizeOptions:p,showSizeChanger:_}=(0,r.h0)(t),{sortKey:g,sortOrder:x,updateSorting:y,resetSorting:f}=(0,r.rK)(a),{searchQuery:F,updateSearch:v,resetSearch:S}=(0,r.Rx)(i),b=(0,n.useMemo)(()=>o(),[]),[j,C]=(0,l.XI)(b,{history:"push"}),T=(0,n.useMemo)(()=>{var e;return{pageIndex:d,pageSize:c,sortKey:g,sortOrder:x,columnFilters:null!==(e=j.filters)&&void 0!==e?e:{},searchQuery:F}},[j,d,c,g,x,F]),k=(0,n.useCallback)((e,t)=>{y(e,t),u()},[y,u]),E=(0,n.useCallback)(e=>{let t=Object.fromEntries(Object.entries(e).filter(e=>{let[,t]=e;return null!=t}));C({filters:Object.keys(t).length>0?t:null}),u()},[C,u]),N=(0,n.useCallback)(e=>{v(e),u()},[v,u]),A=(0,n.useCallback)(()=>{C({filters:null}),u(),f(),S()},[C,u,f,S]);return(0,n.useEffect)(()=>{s&&s(T)},[T,s]),{state:T,pageIndex:T.pageIndex,pageSize:T.pageSize,updatePageIndex:m,updatePageSize:h,sortKey:T.sortKey,sortOrder:T.sortOrder,updateSorting:k,columnFilters:T.columnFilters,updateFilters:E,searchQuery:T.searchQuery,updateSearch:N,resetState:A,paginationConfig:{pageSizeOptions:p,showSizeChanger:_}}}},14908:function(e,t,a){"use strict";var n=a(86677),i=a(27378);let s=e=>e.startsWith("#")?e.slice(1):e;t.Z=e=>{let{tabKeys:t,initialTab:a}=e,l=(0,n.useRouter)(),r=l.asPath.split("#")[1]||t[0],[o,d]=(0,i.useState)(r);return(0,i.useEffect)(()=>{a&&t.includes(a)&&d(a)},[a,t,l.isReady]),{activeTab:o,onTabChange:(0,i.useCallback)(async e=>{if(!t.includes(e)){await l.replace({pathname:l.pathname,query:l.query,hash:void 0}),d(t[0]);return}l.isReady&&(await l.replace({pathname:l.pathname,query:l.query,hash:s(e)},void 0,{shallow:!0}),d(e))},[l,t]),setActiveTab:d}}},79494:function(e,t,a){"use strict";var n=a(24246),i=a(20595);t.Z=e=>{let{title:t,icon:a,type:s,...l}=e;return(0,n.jsx)(i.wpx,{size:"small",type:s,"data-testid":"action-".concat(t),icon:a,iconPosition:"start",...l,children:t})}},19267:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return tw}});var n,i,s=a(24246),l=a(20595),r=a(86677),o=a(77213),d=a(77830),c=a(58754),u=a(14908),m=a(20682),h=a(94725),p=a(45216),_=a(38187),g=a(27378);let x=(0,l.IUT)({displayName:"MonitorIcon",viewBox:"0 0 12 12",path:(0,s.jsx)("path",{d:"M1.33333 2.21875C1.15 2.21875 1 2.37344 1 2.5625V5.65625H3.66667C3.84167 5.65625 4.00417 5.75078 4.09583 5.90762L4.62708 6.8207L5.88542 4.22324C5.96667 4.05566 6.13125 3.94609 6.3125 3.93965C6.49375 3.9332 6.66667 4.02773 6.76042 4.18887L7.61458 5.65625H8.83333C9.11042 5.65625 9.33333 5.88613 9.33333 6.17188C9.33333 6.45762 9.11042 6.6875 8.83333 6.6875H7.33333C7.15833 6.6875 6.99583 6.59297 6.90417 6.43613L6.37292 5.52305L5.11458 8.12051C5.03333 8.28809 4.86875 8.39766 4.6875 8.4041C4.50625 8.41055 4.33333 8.31602 4.23958 8.15488L3.38542 6.6875H1V9.4375C1 9.62656 1.15 9.78125 1.33333 9.78125H10.6667C10.85 9.78125 11 9.62656 11 9.4375V2.5625C11 2.37344 10.85 2.21875 10.6667 2.21875H1.33333ZM0 2.5625C0 1.8041 0.597917 1.1875 1.33333 1.1875H10.6667C11.4021 1.1875 12 1.8041 12 2.5625V9.4375C12 10.1959 11.4021 10.8125 10.6667 10.8125H1.33333C0.597917 10.8125 0 10.1959 0 9.4375V2.5625Z",fill:"currentColor"})});var y=a(18225),f=a(812),F=a(17245),v=a(8133),S=a(46628),b=a(70675),j=a(67991),C=a(46238),T=a(92222),k=a(59003),E=a(47935);let N=(0,T.Cl)();var A=e=>{let{items:t,totalItemCount:a,selected:n,excluded:i,allSelected:r,someSelected:o,moreLoading:d,handleToggleSelection:c,handleToggleAll:u,onMoreClick:m}=e,h=t.map(e=>({id:e,isSelected:n.includes(e),isExcluded:i.includes(e)})),p=(0,g.useMemo)(()=>[N.display({id:"select",cell:e=>{let{row:t}=e;return(0,s.jsx)(E.k,{isChecked:t.original.isSelected||r&&!t.original.isExcluded,onChange:()=>c(t.original.id),dataTestId:"".concat(t.original.id,"-checkbox")})},header:()=>(0,s.jsx)(E.k,{isChecked:r,isIndeterminate:o,onChange:u,dataTestId:"select-all-checkbox"}),size:1}),N.accessor(e=>e.id,{id:"id",cell:e=>(0,s.jsx)(E.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(E.Rr,{value:"Scope",...e})})],[c,u,r,o]),_=(0,k.b7)({getCoreRowModel:(0,T.sC)(),getRowId:e=>e.id,manualPagination:!0,data:h,columns:p,columnResizeMode:"onChange"});return(0,s.jsx)(l.kCb,{w:"full",direction:"column",maxH:"lg",children:(0,s.jsx)(E.ZK,{tableInstance:_,onRowClick:e=>c(e.id),footer:!!m&&(0,s.jsx)(E.vr,{totalColumns:2,children:(0,s.jsx)(l.kCb,{justify:"center",children:d?(0,s.jsx)(y.Z,{size:"xs"}):(0,s.jsxs)(l.kCb,{align:"center",children:[(0,s.jsxs)(l.xvT,{fontSize:"xs",mr:4,children:["Showing ",t.length," of ",a]}),(0,s.jsx)(l.wpx,{onClick:m,size:"small","data-testid":"load-more-btn",children:"Load more..."})]})})})})})};let w={items:[],total:1,page:1,size:50,pages:0};var I=(e,t)=>{let[a,n]=(0,g.useState)(2),{data:i,isLoading:s}=(0,b.oN)({page:1,size:25,connection_config_key:e}),l=(0,g.useRef)(s),{items:r,total:o}=null!=i?i:w,d=!!(null==i?void 0:i.pages)&&a>i.pages,[c,u]=(0,g.useState)(r);(0,g.useEffect)(()=>{l.current=s,u(r)},[s,r]),(0,g.useEffect)(()=>{let e=setTimeout(()=>{l.current&&t&&t()},5e3);return()=>clearTimeout(e)},[]);let[m,{isLoading:h,isFetching:p}]=(0,b.j3)(),_=h||p||s,x=async()=>{var t,i;if(d)return;let s=await m({connection_config_key:e,size:25,page:a+1});s.isError||(n(a+1),u([...c,...null!==(i=null===(t=s.data)||void 0===t?void 0:t.items)&&void 0!==i?i:[]]))};return{databases:c,totalDatabases:o,fetchMore:x,initialIsLoading:s,isLoading:_,reachedEnd:d}},M=e=>{var t;let{monitor:a,isEditing:n,isSubmitting:i,integrationKey:r,onSubmit:o,onClose:d}=e,c=(0,l.pmc)(),{databases:u,totalDatabases:m,fetchMore:h,reachedEnd:p,isLoading:_,initialIsLoading:g}=I(r,()=>{o({...a,databases:[]}),c({...S.MA,status:"info",description:"Loading resources is taking longer than expected. The monitor has been saved and is tracking all available resources. You can return later to limit its scope if needed"}),d()}),x=null!==(t=null==a?void 0:a.databases)&&void 0!==t?t:[],{selected:f,excluded:F,allSelected:v,someSelected:b,handleToggleItemSelected:T,handleToggleAll:k}=(0,j.Od)({initialSelected:x,initialExcluded:[],initialAllSelected:n&&!x.length,itemCount:m}),E=!v&&0===f.length;return g?(0,s.jsx)(y.Z,{my:12}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l.kCb,{p:4,direction:"column",children:[(0,s.jsxs)(l.kCb,{direction:"row",mb:4,gap:1,align:"center",children:[(0,s.jsx)(l.xvT,{fontSize:"sm",children:"Select projects to monitor"}),(0,s.jsx)(C.b,{label:"Selecting a project will monitor all current and future datasets within that project."})]}),(0,s.jsx)(A,{items:u,totalItemCount:m,selected:f,excluded:F,allSelected:v,someSelected:b,moreLoading:_,handleToggleSelection:T,handleToggleAll:k,onMoreClick:p?void 0:h})]}),(0,s.jsxs)("div",{className:"mt-4 flex w-full justify-between",children:[(0,s.jsx)(l.wpx,{onClick:d,children:"Cancel"}),(0,s.jsx)(l.esZ,{title:E?"Select one or more projects to save":void 0,children:(0,s.jsx)(l.wpx,{onClick:()=>{o({...a,excluded_databases:F,databases:v?[]:f})},loading:i,type:"primary","data-testid":"save-btn",disabled:E,children:"Save"})})]})]})},P=a(64892),q=a(6680),U=a(54743);function D(e,t){let a,n;let i=()=>(0,q.L)(t?.in,NaN),s=t?.additionalDigits??2,l=function(e){let t;let a={},n=e.split(L.dateTimeDelimiter);if(n.length>2)return a;if(/:/.test(n[0])?t=n[0]:(a.date=n[0],t=n[1],L.timeZoneDelimiter.test(a.date)&&(a.date=e.split(L.timeZoneDelimiter)[0],t=e.substr(a.date.length,e.length))),t){let e=L.timezone.exec(t);e?(a.time=t.replace(e[1],""),a.timezone=e[1]):a.time=t}return a}(e);if(l.date){let e=function(e,t){let a=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(a);if(!n)return{year:NaN,restDateString:""};let i=n[1]?parseInt(n[1]):null,s=n[2]?parseInt(n[2]):null;return{year:null===s?i:100*s,restDateString:e.slice((n[1]||n[2]).length)}}(l.date,s);a=function(e,t){if(null===t)return new Date(NaN);let a=e.match(O);if(!a)return new Date(NaN);let n=!!a[4],i=z(a[1]),s=z(a[2])-1,l=z(a[3]),r=z(a[4]),o=z(a[5])-1;if(n)return r>=1&&r<=53&&o>=0&&o<=6?function(e,t,a){let n=new Date(0);n.setUTCFullYear(e,0,4);let i=n.getUTCDay()||7;return n.setUTCDate(n.getUTCDate()+((t-1)*7+a+1-i)),n}(t,r,o):new Date(NaN);{let e=new Date(0);return s>=0&&s<=11&&l>=1&&l<=(V[s]||(H(t)?29:28))&&i>=1&&i<=(H(t)?366:365)?(e.setUTCFullYear(t,s,Math.max(i,l)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!a||isNaN(+a))return i();let r=+a,o=0;if(l.time&&isNaN(o=function(e){let t=e.match(R);if(!t)return NaN;let a=K(t[1]),n=K(t[2]),i=K(t[3]);return(24===a?0===n&&0===i:i>=0&&i<60&&n>=0&&n<60&&a>=0&&a<25)?a*P.vh+n*P.yJ+1e3*i:NaN}(l.time)))return i();if(l.timezone){if(isNaN(n=function(e){if("Z"===e)return 0;let t=e.match(B);if(!t)return 0;let a="+"===t[1]?-1:1,n=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return i>=0&&i<=59?a*(n*P.vh+i*P.yJ):NaN}(l.timezone)))return i()}else{let e=new Date(r+o),a=(0,U.Q)(0,t?.in);return a.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),a.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),a}return(0,U.Q)(r+o+n,t?.in)}let L={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},O=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,R=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,B=/^([+-])(\d{2})(?::?(\d{2}))?$/;function z(e){return e?parseInt(e):1}function K(e){return e&&parseFloat(e.replace(",","."))||0}let V=[31,null,31,30,31,30,31,31,30,31,30,31];function H(e){return e%400==0||e%4==0&&e%100!=0}var Z=a(96063),G=a(34090),W=a(55484),Y=a(97181),J=a(40324),X=a(11013);let Q=e=>{let{layout:t="stacked",...a}=e,{data:n}=(0,X.eV)({page:1,size:100}),i=null==n?void 0:n.items.map(e=>({label:e.name,value:e.id}));return(0,s.jsx)(Y.d,{tooltip:"If a shared monitor config is selected, the monitor will use the shared config to classify resources",options:i,label:"Shared monitor config",layout:t,...a})};var $=a(85054),ee=e=>{var t,a,n;let{monitor:i,integrationOption:o,isSubmitting:d,databasesAvailable:c,onClose:u,onAdvance:m,onSubmit:h}=e,p=!!i,_=(0,r.useRouter)(),g=Array.isArray(_.query.id)?_.query.id[0]:_.query.id,x=W.Ry().shape({name:W.Z_().required().label("Name"),execution_frequency:W.Z_().nullable().label("Execution frequency"),execution_start_date:W.hT().nullable().label("Execution start date")}),y=(null==i?void 0:i.execution_start_date)?D(i.execution_start_date):Date.now(),F={name:null!==(t=null==i?void 0:i.name)&&void 0!==t?t:"",shared_config_id:null!==(a=null==i?void 0:i.shared_config_id)&&void 0!==a?a:void 0,execution_start_date:(0,Z.WU)(y,"yyyy-MM-dd'T'HH:mm"),execution_frequency:null!==(n=null==i?void 0:i.execution_frequency)&&void 0!==n?n:$.hV.MONTHLY},v=(0,f.MM)($.hV);return(0,s.jsx)(G.J9,{initialValues:F,enableReinitialize:!0,onSubmit:e=>{let t=e.execution_frequency!==$.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:$.hV.NOT_SCHEDULED,execution_start_date:void 0},a=p?{...i,...t,name:e.name,shared_config_id:e.shared_config_id}:{...t,name:e.name,shared_config_id:e.shared_config_id,connection_config_key:g,classify_params:{num_samples:25,num_threads:1}};o.identifier===$.Rj.DYNAMODB&&(a.datasource_params={single_dataset:!1}),c?m(a):h(a)},validationSchema:x,children:e=>{let{values:t,isValid:a,resetForm:n}=e;return(0,s.jsx)(G.l0,{children:(0,s.jsxs)(l.gCW,{alignItems:"start",spacing:6,mt:4,children:[(0,s.jsx)(J.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,s.jsx)(Y.d,{name:"execution_frequency",id:"execution_frequency",tooltip:"Interval to run the monitor automatically after the start date",options:v,label:"Automatic execution frequency",layout:"stacked"}),(0,s.jsx)(Q,{name:"shared_config_id",id:"shared_config_id"}),(0,s.jsx)(J.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:t.execution_frequency===$.hV.NOT_SCHEDULED,id:"execution_start_date"}),(0,s.jsxs)("div",{className:"flex w-full justify-between",children:[(0,s.jsx)(l.wpx,{onClick:()=>{n(),u()},children:"Cancel"}),(0,s.jsx)(l.wpx,{htmlType:"submit",type:"primary",disabled:!a,loading:d,"data-testid":"next-btn",children:c?"Next":"Save"})]})]})})}})},et=a(27693),ea=a.n(et);let en=e=>{let{error:t,touched:a,required:n,tooltip:i,label:r,extra:o,name:d,id:c,...u}=e;return(0,s.jsx)(l.PPS.Item,{validateStatus:a&&t?"error":void 0,help:a&&t,hasFeedback:a&&!!t,required:n,tooltip:i,label:r,extra:o,htmlFor:null!=c?c:d,children:(0,s.jsx)(l.cv2,{id:null!=c?c:d,name:d,"data-testid":"input-".concat(d),style:{width:"100%",...u.style},...u})})},ei=e=>{let{error:t,touched:a,required:n,tooltip:i,label:r,extra:o,name:d,id:c,...u}=e;return(0,s.jsx)(l.PPS.Item,{validateStatus:a&&t?"error":void 0,help:a&&t,hasFeedback:a&&!!t,required:n,tooltip:i,label:r,extra:o,htmlFor:null!=c?c:d,children:(0,s.jsx)(l.AOh,{id:null!=c?c:d,"data-testid":"controlled-select-".concat(d),...u})})},es=e=>{let{error:t,touched:a,required:n,tooltip:i,label:r,extra:o,name:d,id:c,...u}=e,[m,h]=(0,g.useState)(""),p="tags"===u.mode?(e,t)=>{var a;return e?e.value!==m||(null===(a=u.value)||void 0===a?void 0:a.includes(m))?u.optionRender?u.optionRender(e,t):e.label:'Create "'.concat(m,'"'):void 0}:u.optionRender||void 0;return(0,s.jsx)(l.PPS.Item,{validateStatus:a&&t?"error":void 0,help:a&&t,hasFeedback:a&&!!t,required:n,tooltip:i,label:r,extra:o,htmlFor:null!=c?c:d,children:(0,s.jsx)(l.WPr,{id:null!=c?c:d,"data-testid":"controlled-select-".concat(d),...u,optionRender:p,onSearch:"tags"===u.mode?e=>{h(e),u.onSearch&&u.onSearch(e)}:void 0})})},el=e=>{let{error:t,touched:a,required:n,tooltip:i,label:r,extra:o,name:d,id:c,...u}=e;return(0,s.jsx)(l.PPS.Item,{validateStatus:a&&t?"error":void 0,help:a&&t,hasFeedback:a&&!!t,required:n,tooltip:i,label:r,extra:o,htmlFor:null!=c?c:d,children:(0,s.jsx)(l.uFc,{id:c||d,name:d,"data-testid":"input-".concat(d),allowClear:!0,...u})})};var er=a(90111),eo=a(8411),ed=a(64781),ec=a(60325);let eu=e=>{let{data:t}=(0,X.eV)({page:1,size:100}),a=null==t?void 0:t.items.map(e=>({label:e.name,value:e.id}));return(0,s.jsx)(es,{tooltip:"If a shared monitor config is selected, the monitor will use the shared config to classify resources",options:a,label:"Shared monitor config",...e})},em=W.Ry().shape({name:W.Z_().required().label("Name"),execution_frequency:W.Z_().nullable().label("Execution frequency"),execution_start_date:W.hT().nullable().label("Execution start date"),datasource_params:W.Ry().shape({locations:W.IX().label("Locations"),exclude_domains:W.IX().label("Exclude domains"),sitemap_url:W.Z_().nullable().url().label("Sitemap URL")})});var eh=e=>{var t,a,n,i,o,d,c;let{monitor:u,url:m,onClose:h,onSubmit:p}=e,[_,x]=(0,g.useState)(!1),y=(0,r.useRouter)(),F=Array.isArray(y.query.id)?y.query.id[0]:y.query.id,v=(null==u?void 0:u.execution_start_date)?D(u.execution_start_date):Date.now(),{data:S,isLoading:b}=(0,ed.gT)(),j=[...(0,ec.TK)(null!==(i=null==S?void 0:S.locations)&&void 0!==i?i:[]),...(0,ec.TK)(null!==(o=null==S?void 0:S.location_groups)&&void 0!==o?o:[])].map(e=>({value:e,label:eo.Z8[e]})),C={name:(null==u?void 0:u.name)||"",shared_config_id:null!==(d=null==u?void 0:u.shared_config_id)&&void 0!==d?d:void 0,execution_frequency:(null==u?void 0:u.execution_frequency)||$.hV.NOT_SCHEDULED,execution_start_date:(0,Z.WU)(v,"yyyy-MM-dd'T'HH:mm"),url:m,connection_config_key:F,datasource_params:null!==(c=null==u?void 0:u.datasource_params)&&void 0!==c?c:{locations:[],exclude_domains:[]}},T=async e=>{x(!0);let t=e.execution_frequency!==$.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:$.hV.NOT_SCHEDULED,execution_start_date:void 0};p({...u,...e,...t,key:null==u?void 0:u.key,classify_params:(null==u?void 0:u.classify_params)||{},datasource_params:e.datasource_params||{},connection_config_key:F})},{values:k,resetForm:E,handleSubmit:N,errors:A,touched:w,...I}=(0,G.TA)({initialValues:C,onSubmit:T,validationSchema:em}),M=(0,f.MM)($.hV).filter(e=>[$.hV.MONTHLY,$.hV.QUARTERLY,$.hV.YEARLY,$.hV.NOT_SCHEDULED].includes(e.value));return(0,s.jsxs)(l.jqI,{vertical:!0,className:"pt-4",children:[(0,s.jsx)(er.Z,{children:(0,s.jsx)(l.xvT,{fontSize:"sm",children:"This monitor allows you to simulate and verify user consent actions, such as 'accept,' 'reject,' or 'opt-out,' on consent experiences. For each detected activity, the monitor will record whether it occurred before or after the configured user actions, ensuring compliance with user consent choices."})}),(0,s.jsxs)(l.PPS,{onFinish:N,layout:"vertical",children:[(0,s.jsx)(el,{name:"name",id:"name",label:"Name",required:!0,error:A.name,touched:w.name,onChange:I.handleChange,onBlur:I.handleBlur,value:k.name}),(0,s.jsx)(el,{name:"datasource_params.sitemap_url",id:"sitemap_url",label:"Sitemap URL",error:(0,G.u9)(A,"datasource_params.sitemap_url"),touched:(0,G.u9)(w,"datasource_params.sitemap_url"),onChange:I.handleChange,onBlur:I.handleBlur,value:(null===(t=k.datasource_params)||void 0===t?void 0:t.sitemap_url)||""}),(0,s.jsx)(es,{name:"datasource_params.exclude_domains",placeholder:"Enter domains to exclude",id:"exclude_domains",label:"Exclude domains",mode:"tags",options:[],suffixIcon:null,open:!1,error:(0,G.u9)(A,"datasource_params.exclude_domains"),touched:(0,G.u9)(w,"datasource_params.exclude_domains"),onChange:e=>I.setFieldValue("datasource_params.exclude_domains",e),onBlur:I.handleBlur,value:(null===(a=k.datasource_params)||void 0===a?void 0:a.exclude_domains)||[]}),(0,s.jsx)(el,{name:"url",id:"url",label:"URL",required:!0,disabled:!0,error:A.url,touched:w.url,onChange:I.handleChange,onBlur:I.handleBlur,value:k.url||""}),(0,s.jsx)(ei,{id:"locations",name:"datasource_params.locations",label:"Locations",loading:b,options:(0,l.Ky_)(j.map(e=>e.value)),tooltip:"Specify the region(s) to include in the scan. The monitor will scan the same URL across these locations to identify tracking technologies, such as cookies served by ad tech vendors.",mode:"multiple",error:(0,G.u9)(A,"datasource_params.locations"),touched:(0,G.u9)(w,"datasource_params.locations"),onChange:e=>I.setFieldValue("datasource_params.locations",e),onBlur:I.handleBlur,value:null===(n=k.datasource_params)||void 0===n?void 0:n.locations}),(0,s.jsx)(eu,{name:"shared_config_id",id:"shared_config_id",error:A.shared_config_id,touched:w.shared_config_id,onChange:e=>I.setFieldValue("shared_config_id",e),onBlur:I.handleBlur,value:k.shared_config_id}),(0,s.jsx)(es,{name:"execution_frequency",id:"execution_frequency",options:M,label:"Automatic execution frequency",error:A.execution_frequency,touched:w.execution_frequency,onChange:e=>I.setFieldValue("execution_frequency",e),onBlur:I.handleBlur,value:k.execution_frequency}),(0,s.jsx)(en,{name:"execution_start_date",label:"Automatic execution start time",disabled:k.execution_frequency===$.hV.NOT_SCHEDULED,id:"execution_start_date",tooltip:"Set the start time for the scan. For optimal performance and minimal disruption, schedule scans during periods of low traffic.",error:A.execution_start_date,touched:w.execution_start_date,onChange:e=>e&&I.setFieldValue("execution_start_date",e.toISOString()),onBlur:I.handleBlur,value:ea()(k.execution_start_date)}),(0,s.jsxs)(l.jqI,{gap:"small",className:"mt-2",justify:"stretch",children:[(0,s.jsx)(l.wpx,{onClick:()=>{E(),h()},block:!0,children:"Cancel"}),(0,s.jsx)(l.wpx,{type:"primary",htmlType:"submit","data-testid":"save-btn",block:!0,loading:_,children:"Save"})]})]})]})},ep=a(31883),e_=e=>{let{isOpen:t,onClose:a,formStep:n,onAdvance:i,monitor:r,isEditing:o,integration:d,integrationOption:c,isWebsiteMonitor:u}=e,[m,{isLoading:h}]=(0,b.Fy)(),{data:p}=(0,b.oN)({page:1,size:25,connection_config_key:d.key}),_=!!p&&!!p.total,g=(0,l.pmc)(),{successAlert:x,errorAlert:j}=(0,F.VY)(),C=async e=>{let t;let n=setTimeout(()=>{t||(g({...S.MA,status:"info",description:"Saving this monitor is taking longer than expected. Fides will continue processing it in the background, and you can check back later to view the updates."}),a())},5e3);if(t=await m(e)){if(clearTimeout(n),(0,ep.D4)(t)){j((0,f.e$)(t.error),"Error creating monitor");return}if(o){x("Monitor updated successfully"),a();return}if(u){x(e.execution_frequency===$.hV.NOT_SCHEDULED?'Your monitor has been created with no schedule. Select "Scan" in the table below to begin scanning your website.':"Your monitor has been created and is now scanning your website. Once the monitor is finished scanning, results can be found in the action center."),a();return}x("Monitor created successfully"),a()}};return u?(0,s.jsx)(v.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure website monitor",isOpen:t,onClose:a,children:(0,s.jsx)(eh,{monitor:r,url:d.secrets.url,onClose:a,onSubmit:C})}):(0,s.jsxs)(v.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure discovery monitor",isOpen:t,onClose:a,children:[0===n&&(0,s.jsx)(ee,{monitor:r,onClose:a,onAdvance:i,onSubmit:C,isSubmitting:h,databasesAvailable:_,integrationOption:c}),1===n&&(r?(0,s.jsx)(M,{monitor:r,isEditing:o,isSubmitting:h,onSubmit:C,onClose:a,integrationKey:d.key}):(0,s.jsx)(y.Z,{}))]})},eg=a(8125),ex=e=>{let{defaultSuccessMsg:t,defaultErrorMsg:a}=e,{successAlert:n,errorAlert:i}=(0,F.VY)();return{toastResult:e=>{(0,f.D4)(e)?i((0,f.e$)(e.error,a)):n(t)}}},ey=a(58452),ef=a(79494),eF=e=>{let{monitorId:t,isWebsiteMonitor:a,onEditClick:n}=e,{isOpen:i,onOpen:r,onClose:o}=(0,l.qY0)(),[d,{isLoading:c}]=(0,b.Sb)(),{toastResult:u}=ex({defaultErrorMsg:"A problem occurred deleting this monitor",defaultSuccessMsg:"Monitor deleted successfully"}),[m,{isLoading:h}]=(0,b.V9)(),{toastResult:p}=ex({defaultErrorMsg:"A problem occurred initiating monitor execution",defaultSuccessMsg:a?"Scanning your website now. Once the monitor is finished, results can be found in the action center.":"Monitor execution successfully started"});if(!t)return null;let _=async()=>{u(await d({monitor_config_id:t}))},g=async()=>{p(await m({monitor_config_id:t}))};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ey.Z,{isOpen:i,onClose:o,onConfirm:_,title:"Delete monitor",message:"Are you sure you want to delete this discovery monitor?",continueButtonText:"Delete",isCentered:!0,isLoading:c}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.esZ,{title:"Edit",children:(0,s.jsx)(l.wpx,{onClick:n,size:"small",icon:(0,s.jsx)(l.PJP.I8b,{}),"data-testid":"edit-monitor-btn","aria-label":"Edit monitor"})}),(0,s.jsx)(l.esZ,{title:"Delete",children:(0,s.jsx)(l.wpx,{onClick:r,size:"small",icon:(0,s.jsx)(l.PJP.ZNm,{}),"aria-label":"Delete monitor","data-testid":"delete-monitor-btn"})}),(0,s.jsx)(ef.Z,{onClick:g,title:"Scan",loading:h})]})]})},ev=a(51980),eS=a(16394),eb=e=>{var t,a;let{monitor:n}=e,i=null===(t=n.execution_records)||void 0===t?void 0:t[0],{isOpen:r,onOpen:o,onClose:d}=(0,l.qY0)(),c=n.last_monitored?new Date(n.last_monitored):null,u=c?(0,eS.p6)(c):"N/A",m=c?(0,ev.B)(c,new Date,{addSuffix:!0}):"N/A";return i?i.status===$.L2.IN_PROGRESS?c?(0,s.jsx)(l.esZ,{title:"Last scan: ".concat(m),children:(0,s.jsx)(l.j8w,{color:"info",children:"Scanning"})}):(0,s.jsx)(l.j8w,{color:"info",children:"Scanning"}):i.status===$.L2.COMPLETED?(0,s.jsx)(l.esZ,{title:u,children:(0,s.jsx)(l.j8w,{color:"success","data-testid":"tag-success",children:m})}):i.status===$.L2.ERRORED?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.j8w,{color:"error",closeIcon:(0,s.jsx)(l.PJP.daM,{}),closeButtonLabel:"View details",onClose:o,"data-testid":"tag-error",children:"Incomplete"}),(0,s.jsxs)(l.dys,{isOpen:r,onClose:d,size:"md",children:[(0,s.jsx)(l.P1B,{}),(0,s.jsxs)(l.scA,{"data-testid":"error-log-drawer",children:[(0,s.jsx)(l.OXI,{children:"Failure log"}),(0,s.jsx)(l.cCv,{}),(0,s.jsxs)(l.Ng0,{children:[i.completed&&(0,s.jsx)(l.AntTypography.Paragraph,{type:"secondary",children:(0,eS.p6)(new Date(i.completed))}),null===(a=i.messages)||void 0===a?void 0:a.map((e,t)=>(0,s.jsxs)(g.Fragment,{children:[(0,s.jsx)(l.AntTypography.Paragraph,{"data-testid":"error-log-message",children:e}),t<i.messages.length-1&&(0,s.jsx)(l.izJ,{className:"mb-3"})]},t))]})]})]})]}):(0,s.jsx)(l.j8w,{children:"N/A"}):(0,s.jsx)(l.j8w,{children:"N/A"})};let{Text:ej}=l.AntTypography,eC=e=>{let{enabled:t,onToggle:a,title:n,message:i,isDisabled:r,...o}=e,d=(0,l.qY0)(),[c,u]=l.Pg3.useMessage(),m=async e=>{let{enable:t}=e,n=await a(t);(0,ep.D4)(n)&&c.error((0,f.e$)(n.error))},h=async e=>{e?await m({enable:!0}):d.onOpen()};return(0,s.jsxs)(s.Fragment,{children:[u,(0,s.jsx)(l.rAg,{checked:t,onChange:h,disabled:r,"data-testid":"toggle-switch",...o}),(0,s.jsx)(ey.Z,{isOpen:d.isOpen,onClose:d.onClose,onConfirm:()=>{m({enable:!1}),d.onClose()},title:n,message:(0,s.jsx)(ej,{children:i}),continueButtonText:"Confirm",isCentered:!0})]})},eT=e=>{let{record:t}=e,[a]=(0,b.Fy)(),n=async e=>a({...t,enabled:e}),{enabled:i}=t;return(0,s.jsx)(eC,{enabled:!!i,onToggle:n,title:"Disabling monitor",message:"You are about to disable this monitor. If you continue, it will no longer scan automatically."})},{Text:ek}=l.AntTypography;(n=i||(i={})).NAME="name",n.PROJECTS="projects",n.SOURCE_URL="source_url",n.FREQUENCY="frequency",n.MONITOR_STATUS="monitor_status",n.REGIONS="regions",n.STATUS="status",n.ACTION="action";let eE=e=>{var t,a,n;let{integration:i,isWebsiteMonitor:r,onEditMonitor:o}=e,d=(0,eg.o)(),{pageIndex:c,pageSize:u}=d,{isLoading:m,isFetching:h,data:p}=(0,b.Fu)({page:c,size:u,connection_config_key:i.key}),_=(0,g.useMemo)(()=>{var e,t;return{enableSelection:!1,getRowKey:e=>{var t;return null!==(t=e.key)&&void 0!==t?t:e.name},isLoading:m,isFetching:h,dataSource:null!==(e=null==p?void 0:p.items)&&void 0!==e?e:[],totalRows:null!==(t=null==p?void 0:p.total)&&void 0!==t?t:0}},[m,h,null==p?void 0:p.items,null==p?void 0:p.total]),x=(0,eg.V)(d,_);return{columns:(0,g.useMemo)(()=>{let e={title:"Name",dataIndex:"name",key:"name",render:e=>(0,s.jsx)(ek,{ellipsis:{tooltip:e},style:{maxWidth:150},children:e}),fixed:"left"},t={title:"Scan frequency",dataIndex:"frequency",key:"frequency",render:e=>null!=e?e:"Not scheduled"},a={title:"Scan status",key:"monitor_status",render:(e,t)=>(0,s.jsx)(eb,{monitor:t})},n={title:"Status",dataIndex:"status",key:"status",width:100,render:(e,t)=>(0,s.jsx)(eT,{record:t})},d={title:"Actions",key:"action",width:100,render:(e,t)=>(0,s.jsx)(eF,{onEditClick:()=>o(t),isWebsiteMonitor:r,monitorId:t.key}),fixed:"right"};return r?[e,{title:"Source URL",dataIndex:"source_url",key:"source_url",render:()=>{var e;let t=i.secrets;return(0,s.jsx)(ek,{ellipsis:{tooltip:null==t?void 0:t.url},style:{maxWidth:150},children:null!==(e=null==t?void 0:t.url)&&void 0!==e?e:"Not scheduled"})}},t,{title:"Regions",dataIndex:"regions",key:"regions",render:(e,t)=>{let a=t.datasource_params&&"locations"in t.datasource_params&&Array.isArray(t.datasource_params.locations)?t.datasource_params.locations:[];if(0===a.length)return"No regions selected";let n=a.map(e=>{let t=(0,l.QCN)(e);if(t)return(0,l.c1K)({isoEntry:t});let a=Object.entries($._F).find(t=>{let[,a]=t;return a===e});return a&&eo.Z8[a[1]]}).join(", ");return(0,s.jsx)(ek,{ellipsis:{tooltip:n},style:{maxWidth:150},children:n})}},a,n,d]:[e,{title:"Scope",dataIndex:"projects",key:"projects",render:(e,t)=>{var a;let n=null!==(a=t.databases)&&void 0!==a?a:[];return 0===n.length?"All projects":"".concat(n.length," ").concat(1===n.length?"Project":"Projects")}},t,a,n,d]},[i.secrets,r,o]),monitors:null!==(a=null==p?void 0:p.items)&&void 0!==a?a:[],isLoading:m,isFetching:h,totalRows:null!==(n=null==p?void 0:p.total)&&void 0!==n?n:0,tableProps:x.tableProps,hasData:!!(null==p?void 0:null===(t=p.items)||void 0===t?void 0:t.length)}};var eN=a(40774);let eA={[$.Rj.WEBSITE]:"Configure your website monitor to identify active ad tech vendors and tracking technologies across your site. This monitor will analyze selected pages for vendor activity, compliance with privacy requirements, and data collection practices. Set your preferences below to customize the monitor frequency and scan locations.",[$.Rj.OKTA]:"Configure your SSO provider monitor to detect and map systems within your infrastructure. This monitor will analyze connected systems to identify their activity and ensure accurate representation in your data map. Set your preferences below to customize the monitor&apos;s scan frequency and scope. To learn more about monitors, view our docs here."};var ew=e=>{var t,a;let{integration:n,integrationOption:i}=e,r=(null==i?void 0:i.identifier)===$.Rj.WEBSITE,o=(null==i?void 0:i.type)===$.Zi.SAAS,d=(0,l.qY0)(),[c,u]=(0,g.useState)(void 0),[m,h]=(0,g.useState)(!1),[p,_]=(0,g.useState)(0),{columns:y,tableProps:f,monitors:F,isLoading:v}=eE({integration:n,isWebsiteMonitor:r,onEditMonitor:e=>{u(e),h(!0),d.onOpen()}}),S=null!==(t=eA[null==i?void 0:i.identifier])&&void 0!==t?t:"A data discovery monitor observes configured systems for data model changes to proactively discover and classify data risks. Monitors can observe part or all of a project, dataset, table, or API for changes and each can be assigned to a different data steward.",{isDisabled:b,tooltip:j}=o&&F.length>0?{isDisabled:!0,tooltip:"API integrations only use a single monitor"}:n.name||(null===(a=n.saas_config)||void 0===a?void 0:a.type)!=="salesforce"?{isDisabled:!1,tooltip:null}:{isDisabled:!0,tooltip:"This is a legacy connection and cannot be used to create a monitor. Create a new Salesforce integration to use this feature."};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.AntTypography.Paragraph,{className:"mb-6 max-w-3xl","data-testid":"monitor-description",children:S}),(0,s.jsxs)(l.jqI,{justify:"space-between",className:"py-3",children:[(0,s.jsx)(eN.Z,{}),(0,s.jsx)(l.esZ,{title:j,children:(0,s.jsx)("span",{children:(0,s.jsx)(l.wpx,{onClick:d.onOpen,icon:(0,s.jsx)(x,{}),iconPosition:"end","data-testid":"add-monitor-btn",disabled:b,children:"Add monitor"})})})]}),(0,s.jsx)(l.V5H,{...f,loading:v,columns:y}),(0,s.jsx)(e_,{isOpen:d.isOpen,onClose:()=>{u(void 0),h(!1),_(0),d.onClose()},formStep:p,onAdvance:e=>{u(e),_(1)},monitor:c,isEditing:m,integration:n,integrationOption:i,isWebsiteMonitor:r})]})},eI=a(41966),eM=a(32885),eP=e=>{let{integration:t}=e,{data:a}=(0,h.Eg)(t.key),{data:n}=(0,eI.LH)({minimal:!0,connection_type:$.Rj.BIGQUERY}),[i,{isLoading:r}]=(0,eM.Qd)(),o=(0,l.pmc)(),d=async()=>{try{var e,s,l,r,d;let c=null!==(l=null==a?void 0:null===(e=a.items)||void 0===e?void 0:e.map(e=>e.fides_key))&&void 0!==l?l:[],u=null!==(r=null==n?void 0:n.map(e=>e.fides_key))&&void 0!==r?r:[],m=c.length>0?c:u,h=await i({connectionKey:t.key,datasetIds:m}),p=null!==(d=null===(s=h.data)||void 0===s?void 0:s.succeeded.length)&&void 0!==d?d:0,_="Fides has begun syncing with DataHub. There ".concat(1===p?"is":"are"," ").concat(p," dataset").concat(1===p?"":"s"," queued for syncing.");o((0,S.t5)(_))}catch(e){o({title:"Error syncing datasets",description:"There was an error syncing your datasets with DataHub. Please try again.",status:"error",duration:5e3,isClosable:!0})}};return(0,s.jsxs)(l.gCW,{spacing:6,align:"stretch",children:[(0,s.jsxs)(l.gCW,{spacing:4,align:"stretch",children:[(0,s.jsx)(l.xvT,{maxW:"720px",fontSize:"sm","data-testid":"scan-description-1",children:"If you're using DataHub for metadata management, select sync datasets to push data categories from Fides to your DataHub datasets."}),(0,s.jsxs)(l.xvT,{maxW:"720px",fontSize:"sm","data-testid":"scan-description-2",children:["Fides assigns data categories to datasets based on your privacy taxonomy. With this integration, those categories can be added as glossary terms to matching datasets in DataHub-keeping your labeling consistent across systems. To learn more about our DataHub integration, view our docs ",(0,s.jsx)(l.rUS,{href:"https://ethyca.com/docs/user-guides/integrations/saas-integrations/datahub",isExternal:!0,color:"blue.500",textDecoration:"underline",children:"here"}),"."]})]}),(0,s.jsx)(l.zxk,{colorScheme:"primary",onClick:d,"data-testid":"sync-button",width:"fit-content",isLoading:r,loadingText:"Syncing datasets...",children:"Sync Datasets"})]})},eq=a(78780),eU=a(52253);let{useGetManualTaskConfigQuery:eD,useAssignUsersToManualTaskMutation:eL,useUpdateDependencyConditionsMutation:eO}=eq.u.injectEndpoints({endpoints:e=>({getManualTaskConfig:e.query({query:e=>{let{connectionKey:t}=e;return{url:"".concat(eU.Iy,"/").concat(t,"/manual-task"),method:"GET"}},providesTags:()=>["Manual Tasks"]}),assignUsersToManualTask:e.mutation({query:e=>{let{connectionKey:t,userIds:a}=e;return{url:"".concat(eU.Iy,"/").concat(t,"/manual-task/assign-users"),method:"PUT",body:a}},invalidatesTags:()=>["Manual Tasks"]}),updateDependencyConditions:e.mutation({query:e=>{let{connectionKey:t,conditions:a}=e;return{url:"".concat(eU.Iy,"/").concat(t,"/manual-task/dependency-conditions"),method:"PUT",body:a}},invalidatesTags:()=>["Manual Tasks"]})})});var eR=a(20386);let eB=(e,t,a)=>[e,t,a].join(":"),ez=e=>{let[t,a,n]=e.split(":");return{datasetKey:t,collectionName:a,fieldPath:n}},eK=function(e,t,a){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return e.map(e=>{let i=n?"".concat(n).concat(".").concat(e.name):e.name,s=eB(t,a,i),l=e.fields&&e.fields.length>0;return{key:s,title:e.name,fullTitle:"".concat(a).concat(":").concat(i),value:s,isLeaf:!l,selectable:!0,children:l?eK(e.fields,t,a,i):void 0}})},eV=e=>{let{value:t,onChange:a,disabled:n=!1,excludeSaasDataset:i=!0}=e,[r,o]=(0,g.useState)(),[d,c]=(0,g.useState)(),[u,m]=(0,g.useState)([]),{data:h,isLoading:p}=(0,eR.LH)({minimal:!0,exclude_saas_datasets:i}),{data:_}=(0,eR.oM)(r,{skip:!r}),x=(0,g.useMemo)(()=>{var e;return _&&r&&(null===(e=_.collections)||void 0===e?void 0:e.map(e=>({key:"".concat(r).concat(":").concat(e.name),title:e.name,fullTitle:e.name,value:"".concat(r).concat(":").concat(e.name),isLeaf:!1,selectable:!1,children:e.fields?eK(e.fields,r,e.name,""):void 0})))||[]},[_,r]);(0,g.useEffect)(()=>{m(x),r||c(void 0)},[x,r]),(0,g.useEffect)(()=>{if(t){let{datasetKey:e,collectionName:a,fieldPath:n}=ez(t);e&&(o(e),a&&n&&c(t))}else o(void 0),c(void 0)},[t]);let y=(0,g.useMemo)(()=>h?h.map(e=>({value:e.fides_key,label:e.name||e.fides_key})):[],[h]),f=(0,g.useCallback)(e=>{o(e),c(void 0),a&&a(void 0)},[a]),F=(0,g.useCallback)(e=>{c(e),a&&a(e)},[a]);return p||(null==h?void 0:h.length)!==0?(0,s.jsxs)(l.jqI,{gap:8,"data-testid":"dataset-reference-picker",children:[(0,s.jsx)(l.WPr,{value:r,onChange:f,options:y,placeholder:"Select a dataset",disabled:n,loading:p,allowClear:!0,showSearch:!0,style:{width:"50%"},"data-testid":"dataset-select"}),(0,s.jsx)(l.wrJ,{value:d,onChange:F,treeData:u,placeholder:"Select a field",disabled:n||!r,allowClear:!0,showSearch:!0,style:{width:"50%"},treeNodeFilterProp:"title",treeNodeLabelProp:"fullTitle","data-testid":"field-tree-select"})]}):(0,s.jsx)("div",{className:"flex flex-col items-center justify-center py-4 ",children:(0,s.jsx)(l.AntTypography.Text,{children:"No datasets available. Create a dataset to start using this feature"})})},{Text:eH,Title:eZ,Link:eG}=l.AntTypography,eW=()=>(0,s.jsxs)("div",{className:"px-2 text-white",children:[(0,s.jsx)(eZ,{level:5,className:"mb-3",style:{color:"inherit"},children:"Operator Reference"}),(0,s.jsx)(eH,{strong:!0,className:"mb-2 block",style:{color:"inherit"},children:"All data types:"}),(0,s.jsxs)("ul",{className:"ml-2 space-y-1",children:[(0,s.jsx)("li",{children:"Equals: Exact match"}),(0,s.jsx)("li",{children:"Not equals: Does not exactly match"}),(0,s.jsxs)("li",{children:["Exists: Field can be reached"," ",(0,s.jsx)(eG,{href:"https://www.ethyca.com/docs/dev-docs/privacy-requests/execution#graph-building",target:"_blank",style:{color:"inherit",textDecoration:"underline"},children:"by the DAG"})," ","regardless of value"]}),(0,s.jsxs)("li",{children:["Does not exist: Field cannot be reached"," ",(0,s.jsx)(eG,{href:"https://www.ethyca.com/docs/dev-docs/privacy-requests/execution#graph-building",target:"_blank",style:{color:"inherit",textDecoration:"underline"},children:"by the DAG"})]})]}),(0,s.jsx)(eH,{strong:!0,className:"mb-2 mt-4 block",style:{color:"inherit"},children:"Strings/Text:"}),(0,s.jsxs)("ul",{className:"ml-2 space-y-1",children:[(0,s.jsx)("li",{children:"Starts with: Text begins with value"}),(0,s.jsx)("li",{children:"Contains: Text includes value anywhere"})]}),(0,s.jsx)(eH,{strong:!0,className:"mb-2 mt-4 block",style:{color:"inherit"},children:"Numbers:"}),(0,s.jsx)("ul",{className:"ml-2 space-y-1",children:(0,s.jsx)("li",{children:"Equals / Not equals / Greater than / Greater than or equal / Less than / Less than or equal"})}),(0,s.jsx)(eH,{strong:!0,className:"mb-2 mt-4 block",style:{color:"inherit"},children:"Array/List:"}),(0,s.jsxs)("ul",{className:"ml-2 space-y-1",children:[(0,s.jsx)("li",{children:"List contains: Value in list"}),(0,s.jsx)("li",{children:"Not in list: Value not in list"})]})]}),eY=(e,t)=>{if(e===$.EF.EXISTS||e===$.EF.NOT_EXISTS||!(null==t?void 0:t.trim()))return null;if("true"===t.toLowerCase())return!0;if("false"===t.toLowerCase())return!1;let a=Number(t);return Number.isNaN(a)?t:a};var eJ=e=>{var t;let{onAdd:a,onCancel:n,editingCondition:i,isSubmitting:r=!1}=e,[o]=l.PPS.useForm(),d=[{label:"Equals",value:$.EF.EQ},{label:"Not equals",value:$.EF.NEQ},{label:"Greater than",value:$.EF.GT},{label:"Greater than or equal",value:$.EF.GTE},{label:"Less than",value:$.EF.LT},{label:"Less than or equal",value:$.EF.LTE},{label:"Exists",value:$.EF.EXISTS},{label:"Does not exist",value:$.EF.NOT_EXISTS},{label:"List contains",value:$.EF.LIST_CONTAINS},{label:"Not in list",value:$.EF.NOT_IN_LIST},{label:"Starts with",value:$.EF.STARTS_WITH},{label:"Contains",value:$.EF.CONTAINS}],c=i?{fieldAddress:i.field_address,operator:i.operator,value:(null===(t=i.value)||void 0===t?void 0:t.toString())||""}:{},u=(0,g.useCallback)(e=>{a({field_address:e.fieldAddress.trim(),operator:e.operator,value:eY(e.operator,e.value)})},[a]),m=(0,g.useCallback)(()=>{o.resetFields(),n()},[o,n]),h=l.PPS.useWatch("operator",o),p=h===$.EF.EXISTS||h===$.EF.NOT_EXISTS;return(0,g.useEffect)(()=>{p&&o.setFieldValue("value","")},[p,o]),(0,s.jsxs)(l.PPS,{form:o,onFinish:u,layout:"vertical",initialValues:c,children:[(0,s.jsx)(l.PPS.Item,{name:"fieldAddress",label:"Dataset Field",rules:[{required:!0,message:"Dataset field is required"}],tooltip:"Select a field from your datasets to use in the condition",validateTrigger:["onBlur","onSubmit"],children:(0,s.jsx)(eV,{})}),(0,s.jsx)(l.PPS.Item,{name:"operator",label:"Operator",tooltip:{placement:"right",title:(0,s.jsx)(eW,{}),styles:{root:{maxWidth:"500px"}}},rules:[{required:!0,message:"Operator is required"}],children:(0,s.jsx)(l.WPr,{placeholder:"Select operator",options:d,"data-testid":"operator-select"})}),(0,s.jsx)(l.PPS.Item,{name:"value",label:"Value",rules:[{required:!p,message:"Value is required for this operator"}],tooltip:p?"Value is not required for exists/not exists operators":"Enter the value to compare against. Can be text, number, or true/false",children:(0,s.jsx)(l.uFc,{placeholder:p?"Not required":"Enter value (text, number, or true/false)",disabled:p,"data-testid":"value-input"})}),(0,s.jsx)(l.PPS.Item,{children:(0,s.jsxs)(l.kCb,{gap:2,justify:"flex-end",children:[(0,s.jsx)(l.wpx,{onClick:m,disabled:r,"data-testid":"cancel-btn",children:"Cancel"}),(0,s.jsx)(l.wpx,{type:"primary",htmlType:"submit",loading:r,"data-testid":"save-btn",children:i?"Update":"Add"})]})})]})},eX=e=>{let{isOpen:t,onClose:a,onConditionSaved:n,editingCondition:i}=e,{handleError:r}=(0,F.HK)(),[o,d]=(0,g.useState)(!1),c=!!i,u=async e=>{try{d(!0),await n(e),a()}catch(e){r(e)}finally{d(!1)}};return(0,s.jsxs)(l.u_l,{isCentered:!0,isOpen:t,size:"lg",onClose:a,"data-testid":"add-edit-condition-modal",children:[(0,s.jsx)(l.ZAr,{}),(0,s.jsxs)(l.hzk,{minWidth:"650px",children:[(0,s.jsx)(l.xBx,{children:c?"Edit condition":"Add condition"}),(0,s.jsx)(l.olH,{}),(0,s.jsx)(l.fef,{pb:6,children:(0,s.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,s.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",children:c?"Update the condition settings for task creation.":"Configure a new condition that must be met before a task is created. Select a field from your datasets to create the condition."}),(0,s.jsx)(eJ,{onAdd:u,onCancel:()=>{a()},editingCondition:i,isSubmitting:o})]})})]})]})};let eQ={[$.EF.EQ]:"equals",[$.EF.NEQ]:"not equals",[$.EF.LT]:"less than",[$.EF.LTE]:"less than or equal",[$.EF.GT]:"greater than",[$.EF.GTE]:"greater than or equal",[$.EF.EXISTS]:"exists",[$.EF.NOT_EXISTS]:"does not exist",[$.EF.LIST_CONTAINS]:"list contains",[$.EF.NOT_IN_LIST]:"not in list",[$.EF.STARTS_WITH]:"starts with",[$.EF.CONTAINS]:"contains",[$.EF.LIST_INTERSECTS]:"list intersects",[$.EF.LIST_SUBSET]:"list subset",[$.EF.LIST_SUPERSET]:"list superset",[$.EF.LIST_DISJOINT]:"list disjoint",[$.EF.ENDS_WITH]:"ends with"},e$={[$.PF.TEXT]:"Text",[$.PF.CHECKBOX]:"Checkbox",[$.PF.ATTACHMENT]:"Attachment"},e0={[$.k6.ACCESS]:"Access",[$.k6.ERASURE]:"Erasure"},e1=(e,t,a)=>(0,g.useCallback)(async n=>{let i=0===n.length?[]:[{logical_operator:$.RP.AND,conditions:n}];await t({connectionKey:e,conditions:i}).unwrap(),await a()},[e,t,a]),{Paragraph:e3,Text:e2}=l.AntTypography;var e5=e=>{let{connectionKey:t}=e,[a,n]=(0,g.useState)([]),[i,r]=(0,g.useState)(!1),[o,d]=(0,g.useState)(null),[c,u]=(0,g.useState)(null),[m,h]=(0,g.useState)(null),{isOpen:p,onOpen:_,onClose:x}=(0,l.qY0)(),{data:y,isLoading:f,error:F,refetch:v}=eD({connectionKey:t},{skip:!t}),[S]=eO(),b=e1(t,S,v);(0,g.useEffect)(()=>{(null==y?void 0:y.dependency_conditions)&&y.dependency_conditions.length>0?n(y.dependency_conditions[0].conditions.filter(e=>"field_address"in e&&"operator"in e)):n([])},[y]);let j=(0,g.useCallback)(()=>{d(null),u(null),r(!0)},[]),C=(0,g.useCallback)((e,t)=>{d(t),u(e),r(!0)},[]),T=(0,g.useCallback)(()=>{r(!1),d(null),u(null)},[]),k=(0,g.useCallback)(async e=>{let t=[];n(t=null!==c?a.map((t,a)=>a===c?e:t):[...a,e]);try{await b(t),l.Pg3.success(null!==c?"Condition updated successfully!":"Condition added successfully!")}catch(e){throw n(a),e}},[c,a,b]),E=(0,g.useCallback)((e,t)=>{h({index:e,condition:t}),_()},[_]),N=(0,g.useCallback)(async()=>{if(m){let e=a.filter((e,t)=>t!==m.index);n(e);try{await b(e),l.Pg3.success("Condition deleted successfully!")}catch(e){l.Pg3.error("Failed to delete condition. Please try again."),n(a)}h(null)}x()},[m,a,b,x]);return f?(0,s.jsx)("div",{className:"py-4",children:(0,s.jsx)(e2,{className:"text-gray-500",children:"Loading conditions..."})}):F?(0,s.jsx)("div",{className:"py-4",children:(0,s.jsx)(e2,{className:"text-red-500",children:"Failed to load conditions. Please refresh the page and try again."})}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(l.AntTypography.Title,{level:5,children:"Conditional task creation"}),(0,s.jsx)(e3,{className:"mt-2 w-2/3 text-gray-600",children:"Configure conditions that must be met before a task is created. If no conditions are set, manual tasks will be created for every incoming privacy request of the corresponding type (access or erasure)."}),(0,s.jsx)(e3,{className:"mt-2 text-gray-600",children:(0,s.jsx)(e2,{strong:!0,children:"All conditions must be met for the task to be created."})})]}),(0,s.jsx)("div",{className:"mb-4 flex items-center justify-end gap-2",children:(0,s.jsx)(l.wpx,{type:"primary",onClick:j,"data-testid":"add-condition-btn",children:"Add condition"})}),(0,s.jsx)(l.krs,{dataSource:a,"data-testid":"conditions-list",locale:{emptyText:(0,s.jsx)("div",{className:"py-8 text-center",children:(0,s.jsx)(e2,{type:"secondary",children:"No conditions configured. Manual tasks will be created for all privacy requests."})})},renderItem:(e,t)=>(0,s.jsx)(l.krs.Item,{actions:[(0,s.jsx)(l.wpx,{type:"link",onClick:()=>C(t,e),"data-testid":"edit-condition-".concat(t,"-btn"),className:"px-1",children:"Edit"},"edit"),(0,s.jsx)(l.wpx,{type:"link",onClick:()=>E(t,e),"data-testid":"delete-condition-".concat(t,"-btn"),className:"px-1",children:"Delete"},"delete")],children:(0,s.jsx)(l.krs.Item.Meta,{title:(0,s.jsxs)(l.jqI,{gap:8,align:"center",className:"font-normal",children:[(0,s.jsx)("div",{className:"max-w-[300px]",children:(0,s.jsx)(l.esZ,{title:e.field_address,children:(0,s.jsx)(e2,{children:e.field_address.split(":").pop()})})}),(0,s.jsx)(l.j8w,{color:"sandstone",children:eQ[e.operator]}),(0,s.jsx)("div",{className:"max-w-[300px]",children:null!==e.value&&void 0!==e.value&&(0,s.jsx)(e2,{ellipsis:{tooltip:String(e.value)},children:String(e.value)})})]})})},t),className:"mb-4"}),(0,s.jsx)(eX,{isOpen:i,onClose:T,onConditionSaved:k,editingCondition:o}),(0,s.jsx)(ey.Z,{isOpen:p,onClose:()=>{h(null),x()},onConfirm:N,title:"Delete condition","data-testid":"delete-condition-modal",message:(0,s.jsxs)(e2,{className:"text-gray-500",children:["Are you sure you want to delete the condition for “",null==m?void 0:m.condition.field_address,"”? This action cannot be undone."]}),continueButtonText:"Delete",isCentered:!0,icon:(0,s.jsx)(l.aNP,{})})]})},e6=e=>{let{selectedUsers:t,userOptions:a,onUserAssignmentChange:n}=e,i=(0,g.useMemo)(()=>[...a.filter(e=>t.includes(e.value)),...a.filter(e=>!t.includes(e.value))],[a,t]);return(0,s.jsx)("div",{children:(0,s.jsxs)(l.jqI,{align:"center",gap:"middle",children:[(0,s.jsx)(l.AntTypography.Text,{strong:!0,children:"Assign manual tasks to users:"}),(0,s.jsx)(l.WPr,{className:"flex-1",placeholder:"Select users to assign manual tasks to",mode:"multiple",maxTagCount:"responsive",value:t,onChange:n,options:i,optionLabelProp:"displayName",tokenSeparators:[","],"data-testid":"assign-users-select",filterOption:(e,t)=>"string"==typeof(null==t?void 0:t.label)&&t.label.toLowerCase().includes(e.toLowerCase())||!1})]})})};let{useGetManualFieldsQuery:e4,useGetManualFieldQuery:e8,useCreateManualFieldMutation:e7,useUpdateManualFieldMutation:e9,useDeleteManualFieldMutation:te}=eq.u.injectEndpoints({endpoints:e=>({getManualFields:e.query({query:e=>{let{connectionKey:t,requestType:a}=e;return{url:"".concat(eU.Iy,"/").concat(t,"/manual-fields")+(a?"?request_type=".concat(a):""),method:"GET"}},providesTags:()=>["Manual Fields"]}),getManualField:e.query({query:e=>{let{connectionKey:t,manualFieldId:a}=e;return{url:"".concat(eU.Iy,"/").concat(t,"/manual-field/").concat(a),method:"GET"}},providesTags:e=>[{type:"Manual Fields",id:null==e?void 0:e.id}]}),createManualField:e.mutation({query:e=>{let{connectionKey:t,body:a}=e;return{url:"".concat(eU.Iy,"/").concat(t,"/manual-field"),method:"POST",body:a}},invalidatesTags:()=>["Manual Fields"]}),updateManualField:e.mutation({query:e=>{let{connectionKey:t,manualFieldId:a,body:n}=e;return{url:"".concat(eU.Iy,"/").concat(t,"/manual-field/").concat(a),method:"PUT",body:n}},invalidatesTags:()=>["Manual Fields"]}),deleteManualField:e.mutation({query:e=>{let{connectionKey:t,manualFieldId:a}=e;return{url:"".concat(eU.Iy,"/").concat(t,"/manual-field/").concat(a),method:"DELETE"}},invalidatesTags:()=>["Manual Fields"]})})});var tt=a(3124),ta=a.n(tt);let tn=e=>{let{text:t}=e;return(0,s.jsx)(l.esZ,{title:t,children:(0,s.jsx)(l.PJP.daM,{style:{color:ta().FIDESUI_NEUTRAL_500,marginLeft:4,cursor:"help"}})})};var ti=e=>{let{isSubmitting:t,onSaveClick:a,onCancel:n,editingTask:i}=e,[r]=l.PPS.useForm(),o=!!i,d=[{label:e0[$.k6.ACCESS],value:$.k6.ACCESS},{label:e0[$.k6.ERASURE],value:$.k6.ERASURE}],c=l.PPS.useWatch("requestType",r),u=c===$.k6.ACCESS?[{label:e$[$.PF.TEXT],value:$.PF.TEXT},{label:e$[$.PF.ATTACHMENT],value:$.PF.ATTACHMENT}]:c===$.k6.ERASURE?[{label:e$[$.PF.CHECKBOX],value:$.PF.CHECKBOX}]:[],m=!c||c===$.k6.ERASURE;(0,g.useEffect)(()=>{if(o&&i){var e;r.setFieldsValue({key:(null===(e=i.originalField)||void 0===e?void 0:e.key)||"",name:i.name,description:i.description,fieldType:i.fieldType,requestType:i.requestType})}else r.resetFields()},[r,o,i]);let h=async e=>{a(e)};return(0,s.jsxs)(l.PPS,{form:r,layout:"vertical",onFinish:h,onValuesChange:e=>{void 0!==e.requestType&&(e.requestType===$.k6.ERASURE?r.setFieldsValue({fieldType:$.PF.CHECKBOX}):e.requestType===$.k6.ACCESS?r.getFieldValue("fieldType")===$.PF.CHECKBOX&&r.setFieldsValue({fieldType:void 0}):(null===e.requestType||""===e.requestType)&&r.setFieldsValue({fieldType:void 0}))},disabled:t,children:[(0,s.jsx)(l.PPS.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Task name",(0,s.jsx)(tn,{text:"A clear, descriptive name for this manual task. Example: Export user profile data"})]}),name:"name",rules:[{required:!0,message:"Please enter a task name"},{max:100,message:"Task name must be less than 100 characters"}],children:(0,s.jsx)(l.uFc,{placeholder:"Enter task name","data-testid":"input-name"})}),(0,s.jsx)(l.PPS.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Description",(0,s.jsx)(tn,{text:"Detailed instructions for completing this task. Example: Download and attach user's profile data from the customer portal"})]}),name:"description",rules:[{required:!0,message:"Please enter a description"},{max:200,message:"Description must be less than 200 characters"}],children:(0,s.jsx)(l.uFc,{placeholder:"Enter task description","data-testid":"input-description"})}),!o&&(0,s.jsx)(l.PPS.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Key",(0,s.jsx)(tn,{text:"Recommended: Unique identifier for this task that will appear in the DSR package sent to the data subject. If left empty, will be auto-generated from the task name. Example: user_data_export"})]}),name:"key",rules:[{max:50,message:"Key must be less than 50 characters"},{pattern:/^[a-z0-9_]*$/,message:"Key can only contain lowercase letters, numbers, and underscores"}],children:(0,s.jsx)(l.uFc,{placeholder:"Recommended to specify (auto-generated if empty)","data-testid":"input-key"})}),o&&(0,s.jsx)(l.PPS.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Key",(0,s.jsx)(tn,{text:"Unique identifier for this task that appears in the DSR package sent to the data subject."})]}),name:"key",children:(0,s.jsx)(l.uFc,{disabled:!0,"data-testid":"input-key-disabled"})}),(0,s.jsx)(l.PPS.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Request type",(0,s.jsx)(tn,{text:"Whether this task applies to access requests (providing data) or erasure requests (confirming deletion)"})]}),name:"requestType",rules:[{required:!0,message:"Please select a request type"}],children:(0,s.jsx)(l.WPr,{placeholder:"Select request type",options:d,"data-testid":"select-request-type"})}),(0,s.jsx)(l.PPS.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Field type",(0,s.jsx)(tn,{text:"Type of input required: Text (for written responses), Attachment (for file uploads), or Checkbox (for confirmation)"})]}),name:"fieldType",rules:[{required:!0,message:"Please select a field type"}],children:(0,s.jsx)(l.WPr,{placeholder:"Select field type",options:u,disabled:m,"data-testid":"select-field-type"})}),(0,s.jsxs)(l.kCb,{justify:"flex-end",gap:2,children:[(0,s.jsx)(l.wpx,{onClick:n,disabled:t,"data-testid":"cancel-btn",children:"Cancel"}),(0,s.jsx)(l.wpx,{type:"primary",htmlType:"submit",loading:t,"data-testid":"save-btn",children:o?"Update task":"Add task"})]})]})},ts=e=>{let{isOpen:t,onClose:a,integration:n,onTaskAdded:i,editingTask:r}=e,{successAlert:o}=(0,F.VY)(),{handleError:d}=(0,F.HK)(),[c,u]=(0,g.useState)(!1),[m]=e7(),[h]=e9(),p=!!r,_=async e=>{try{if(u(!0),p&&r){let t={label:e.name,help_text:e.description,field_type:e.fieldType,request_type:e.requestType};await h({connectionKey:n.key,manualFieldId:r.id,body:t}).unwrap(),o("Manual task updated successfully!")}else{let t={key:e.key||void 0,label:e.name,help_text:e.description,field_type:e.fieldType,request_type:e.requestType};await m({connectionKey:n.key,body:t}).unwrap(),o("Manual task added successfully!")}i(),a()}catch(e){d(e)}finally{u(!1)}};return(0,s.jsxs)(l.u_l,{isCentered:!0,isOpen:t,size:"lg",onClose:a,children:[(0,s.jsx)(l.ZAr,{}),(0,s.jsxs)(l.hzk,{minWidth:"775px","data-testid":"add-manual-task-modal",children:[(0,s.jsx)(l.xBx,{children:p?"Edit manual task":"Add manual task"}),(0,s.jsx)(l.olH,{}),(0,s.jsx)(l.fef,{pb:6,children:(0,s.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,s.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",children:p?"Update the manual task configuration for this integration.":"Configure a new manual task for this integration. Define the task name, description, and any specific parameters needed for execution."}),(0,s.jsx)(ti,{isSubmitting:c,onSaveClick:_,onCancel:()=>{a()},editingTask:r})]})})]})]})};let tl=e=>{let{integration:t}=e,[a,n]=(0,g.useState)([]),{data:i,refetch:s}=e4({connectionKey:t?t.key:""},{skip:!t}),[r]=te();return(0,g.useEffect)(()=>{i&&n(i.map(e=>({id:e.id,name:e.label,description:e.help_text,fieldType:e.field_type,requestType:e.request_type,originalField:e})))},[i]),{manualTasks:a,deleteManualTask:(0,g.useCallback)(async e=>{try{await r({connectionKey:t.key,manualFieldId:e.id}).unwrap(),s()}catch(e){l.Pg3.error("Failed to delete manual task. Please try again.")}},[r,t.key,s]),refreshManualTasks:(0,g.useCallback)(()=>{s()},[s]),isLoading:!i}};var tr=e=>{let{integration:t}=e,{manualTasks:a,deleteManualTask:n,refreshManualTasks:i}=tl({integration:t}),[r,o]=(0,g.useState)(null),[d,c]=(0,g.useState)(null),[u,m]=(0,g.useState)(!1),[h,p]=(0,g.useState)(!1),_=(0,g.useCallback)(async()=>{d&&await n(d),c(null),p(!1)},[d,n]),x=e=>{o(e),m(!0)},y=e=>{c(e),p(!0)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.jqI,{align:"center",justify:"end",gap:"small",className:"mt-[-25px]",children:(0,s.jsx)(l.wpx,{type:"primary",onClick:()=>{o(null),m(!0)},"data-testid":"add-manual-task-list-btn",children:"Create manual task"})}),(0,s.jsx)(l.krs,{itemLayout:"horizontal",dataSource:a,locale:{emptyText:(0,s.jsx)("div",{className:"px-4 py-2 text-center",children:(0,s.jsxs)(l.AntTypography.Paragraph,{type:"secondary",children:["No manual tasks configured yet. ",(0,s.jsx)("br",{}),'Click "Create manual task" to get started.']})})},renderItem:e=>{let t=e0[e.requestType]||e.requestType;return(0,s.jsx)(l.krs.Item,{actions:[(0,s.jsx)(l.wpx,{type:"link",onClick:()=>x(e),"data-testid":"edit-list-btn",className:"px-1",children:"Edit"},"edit"),(0,s.jsx)(l.wpx,{type:"link",onClick:()=>y(e),"data-testid":"delete-list-btn",className:"px-1",children:"Delete"},"delete")],children:(0,s.jsx)(l.krs.Item.Meta,{title:"".concat(e.name," (").concat(t,")"),description:e.description})},e.id)}}),(0,s.jsx)(ts,{isOpen:u,onClose:()=>{o(null),m(!1)},integration:t,onTaskAdded:i,editingTask:r}),(0,s.jsx)(ey.Z,{isOpen:h,onClose:()=>{c(null),p(!1)},onConfirm:_,title:"Delete manual task",message:(0,s.jsxs)("span",{className:"text-gray-500",children:['Are you sure you want to delete the manual task "',null==d?void 0:d.name,'"? This action cannot be undone.']}),continueButtonText:"Delete",isCentered:!0,icon:(0,s.jsx)(l.aNP,{})})]})},to=a(79894),td=a.n(to);let{useCreateExternalUserMutation:tc}=eq.u.injectEndpoints({endpoints:e=>({createExternalUser:e.mutation({query:e=>({url:"plus/external-user",method:"POST",body:e}),invalidatesTags:["User"]})})}),{Paragraph:tu}=l.AntTypography;var tm=e=>{let{isOpen:t,onClose:a,onUserCreated:n}=e,[i]=l.PPS.useForm(),[r,o]=(0,g.useState)(!1),[c]=tc(),u=(0,l.pmc)(),m=e=>e.split("@")[0].replace(/[^a-zA-Z0-9_]/g,"_"),h=async e=>{o(!0);try{let t=m(e.email_address),a=await c({username:t,email_address:e.email_address,first_name:e.first_name,last_name:e.last_name});if((0,f.D4)(a)){u((0,S.Vo)((0,f.e$)(a.error)));return}u((0,S.t5)("External respondent user created successfully. The user will receive a welcome email with access instructions.")),i.resetFields(),n()}catch(e){u((0,S.Vo)("Failed to create external user. Please try again."))}finally{o(!1)}},p=()=>{i.resetFields(),a()};return(0,s.jsxs)(l.$zI,{title:"Create external respondent user",open:t,onCancel:p,footer:null,width:500,"data-testid":"create-external-user-modal",children:[(0,s.jsxs)("div",{style:{marginBottom:16},children:[(0,s.jsx)(tu,{type:"secondary",children:"Create an external respondent user who can be assigned manual DSR tasks. These users access a secure external task portal to complete assigned tasks without logging into the Fides admin interface."}),(0,s.jsxs)(tu,{type:"secondary",children:["If you need to create an internal user that can log in to the Fides admin interface, please use the"," ",(0,s.jsx)(td(),{href:d.e3,children:"Users page"})," instead."]})]}),(0,s.jsxs)(l.PPS,{form:i,layout:"vertical",onFinish:h,requiredMark:!1,children:[(0,s.jsx)(l.PPS.Item,{name:"email_address",label:"Email Address",rules:[{required:!0,message:"Email address is required"},{type:"email",message:"Please enter a valid email address"}],children:(0,s.jsx)(l.uFc,{placeholder:"user@example.com","data-testid":"input-email_address"})}),(0,s.jsx)(l.PPS.Item,{name:"first_name",label:"First Name",rules:[{required:!0,message:"First name is required"}],children:(0,s.jsx)(l.uFc,{"data-testid":"input-first_name"})}),(0,s.jsx)(l.PPS.Item,{name:"last_name",label:"Last Name",rules:[{required:!0,message:"Last name is required"}],children:(0,s.jsx)(l.uFc,{"data-testid":"input-last_name"})}),(0,s.jsx)(l.PPS.Item,{style:{marginBottom:0,marginTop:24},children:(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[(0,s.jsx)(l.wpx,{onClick:p,disabled:r,"data-testid":"cancel-btn",children:"Cancel"}),(0,s.jsx)(l.wpx,{type:"primary",htmlType:"submit",loading:r,"data-testid":"save-btn",children:"Create User"})]})})]})]})},th=a(65497);let tp=e=>{var t;let{integration:a}=e,[n,i]=(0,g.useState)([]),[s,r]=(0,g.useState)(!1),{isOpen:o,onOpen:d,onClose:c}=(0,l.qY0)(),{data:u}=eD({connectionKey:a?a.key:""},{skip:!a}),{data:m,refetch:h}=(0,th.wv)({page:1,size:100,username:""}),[p]=eL(),_=(null!==(t=null==m?void 0:m.items)&&void 0!==t?t:[]).map(e=>{let t=e.first_name&&e.last_name?"".concat(e.first_name||""," ").concat(e.last_name||""):null,a=t||e.email_address||e.username||"Unknown User";return{label:"".concat(t," (").concat(e.email_address||e.username,")").trim(),value:e.id,displayName:a}});(0,g.useEffect)(()=>{(null==u?void 0:u.assigned_users)&&i(u.assigned_users.map(e=>e.id).filter(e=>null!=e))},[u]);let x=(0,g.useCallback)(async e=>{r(!0);try{await p({connectionKey:a.key,userIds:null!=e?e:n}).unwrap(),l.Pg3.success("Assigned users have been updated")}catch(e){l.Pg3.error("Failed to assign users to manual task. Please try again.")}finally{r(!1)}},[p,a.key,n]);return{selectedUsers:n,userOptions:_,isSavingUsers:s,handleUserAssignmentChange:(0,g.useCallback)(e=>{i(e),x(e)},[x]),handleUserCreated:(0,g.useCallback)(()=>{h()},[h]),isCreateUserOpen:o,onCreateUserOpen:d,onCreateUserClose:c}};var t_=e=>{let{integration:t}=e,{selectedUsers:a,userOptions:n,handleUserAssignmentChange:i,handleUserCreated:r,isCreateUserOpen:o,onCreateUserOpen:d,onCreateUserClose:c}=tp({integration:t});return(0,s.jsx)("div",{children:(0,s.jsxs)(l.jqI,{vertical:!0,gap:"middle",children:[(0,s.jsx)(l.AntTypography.Paragraph,{className:"mt-2 w-2/3",children:"Configure manual tasks for this integration. Manual tasks allow you to define custom data collection or processing steps that require human intervention."}),(0,s.jsx)(tr,{integration:t}),(0,s.jsx)(l.htM,{className:"my-2"}),(0,s.jsx)(e6,{selectedUsers:a,userOptions:n,onUserAssignmentChange:i}),(0,s.jsx)(l.jqI,{justify:"start",children:(0,s.jsx)(l.wpx,{type:"default",onClick:d,"data-testid":"manage-secure-access-btn",children:"Create external user"})}),(0,s.jsx)(tm,{isOpen:o,onClose:c,onUserCreated:()=>{r(),c()}})]})})},tg=a(21365),tx=a(64176),ty=e=>{var t;let{isOpen:a,onClose:n,connection:i,description:r}=e,[o,d]=(0,g.useState)(null),c=(0,tx.Z)(i.connection_type,null==i?void 0:null===(t=i.saas_config)||void 0===t?void 0:t.type),u=(0,s.jsxs)("div",{className:"flex w-full justify-between",children:[(0,s.jsx)(l.wpx,{onClick:n,"data-testid":"cancel-btn",children:"Cancel"}),(0,s.jsx)(l.wpx,{type:"primary",onClick:()=>{o&&o.submitForm&&o.submitForm()},disabled:!o||!o.isValid||!o.dirty,loading:null==o?void 0:o.loading,"data-testid":"save-btn",children:"Save"})]});return(0,s.jsx)(v.Z,{title:"Manage ".concat(null==i?void 0:i.name," integration"),isOpen:a,onClose:n,footer:u,children:(0,s.jsx)(tg.Z,{connection:i,connectionOption:c,onClose:n,description:r,onFormStateChange:d})})},tf=a(41553);let tF=e=>{let{connection:t,enabledFeatures:a,integrationOption:n,testData:i,needsAuthorization:r,handleAuthorize:o,testConnection:d,testIsLoading:c,description:u,overview:m,instructions:h,supportsConnectionTest:p}=e,{onOpen:_,isOpen:x,onClose:y}=(0,l.qY0)();return(0,g.useMemo)(()=>{if(!a||!a.length)return[];let e=[];return(null==a?void 0:a.includes($.qb.WITHOUT_CONNECTION))?e.push({label:"Details",key:"details",children:(0,s.jsxs)(l.xuv,{children:[(0,s.jsx)(l.kCb,{children:(0,s.jsx)(l.wpx,{onClick:_,"data-testid":"manage-btn",children:"Edit integration"})}),(0,s.jsx)(ty,{isOpen:x,onClose:y,connection:t,description:u}),m,h]})}):e.push({label:"Connection",key:"connection",children:(0,s.jsxs)(l.xuv,{children:[p&&(0,s.jsxs)(l.kCb,{borderRadius:"md",outline:"1px solid",outlineColor:"gray.100",align:"center",p:3,children:[(0,s.jsx)(l.kCb,{flexDirection:"column",children:(0,s.jsx)(tf.Z,{testData:i,connectionOption:n})}),(0,s.jsx)(l.LZC,{}),(0,s.jsxs)("div",{className:"flex gap-4",children:[r&&(0,s.jsx)(l.wpx,{onClick:o,"data-testid":"authorize-integration-btn",children:"Authorize integration"}),!r&&(0,s.jsx)(l.wpx,{onClick:d,loading:c,"data-testid":"test-connection-btn",children:"Test connection"}),(0,s.jsx)(l.wpx,{onClick:_,"data-testid":"manage-btn",children:"Manage"})]})]}),(0,s.jsx)(ty,{isOpen:x,onClose:y,connection:t,description:u}),m,h]})}),(null==a?void 0:a.includes($.qb.DATA_SYNC))&&e.push({label:"Data sync",key:"data-sync",children:(0,s.jsx)(eP,{integration:t})}),(null==a?void 0:a.includes($.qb.DATA_DISCOVERY))&&e.push({label:"Data discovery",key:"data-discovery",children:(0,s.jsx)(ew,{integration:t,integrationOption:n})}),(null==a?void 0:a.includes($.qb.TASKS))&&e.push({label:"Manual tasks",key:"manual-tasks",children:(0,s.jsx)(t_,{integration:t})}),(null==a?void 0:a.includes($.qb.CONDITIONS))&&e.push({label:"Conditions",key:"conditions",children:(0,s.jsx)(e5,{connectionKey:t.key})}),e},[t,a,n,i,r,o,d,c,_,x,y,u,m,h,p])};var tv=a(93633),tS=a(75595);let tb=e=>{let{connection:t,connectionOption:a}=e,{data:n}=e4({connectionKey:t?t.key:""},{skip:!t});if((null==a?void 0:a.identifier)!==$.Rj.MANUAL_TASK)return null;let i=n&&n.length>0;return{title:"Add a manual task",description:i?"Manual tasks have been configured":"Configure a manual task for this integration. ",state:i?"finish":"process"}},tj=e=>{let{connection:t,connectionOption:a}=e,{data:n}=eD({connectionKey:t?t.key:""},{skip:!t});if((null==a?void 0:a.identifier)!==$.Rj.MANUAL_TASK)return null;let i=!!((null==n?void 0:n.assigned_users)&&n.assigned_users.length>0);return{title:"Assign the tasks to users",description:i?"Tasks have been assigned to users":"Assign the configured manual tasks to one or more users.",state:i?"finish":"process"}},tC=e=>{let{testData:t,connectionOption:a}=e;return(null==a?void 0:a.authorization_required)?{title:"Authorize integration",description:(0,s.jsx)("span",{children:(null==t?void 0:t.authorized)?"Integration authorized successfully":"Authorize access to your integration"}),state:(null==t?void 0:t.authorized)?"finish":"process"}:null},tT=()=>({title:"Create integration",description:"Integration created successfully",state:"finish"});var tk=a(87174);let tE=e=>{var t,a,n,i;let{enabledFeatures:s}=(0,_.ZP)(e.connection.connection_type,null===(t=e.connection.saas_config)||void 0===t?void 0:t.type),l=null==s?void 0:s.includes(tk.q.DATA_DISCOVERY),{data:r}=(0,b.Fu)({connection_config_key:null===(a=e.testData)||void 0===a?void 0:a.connectionKey,page:1,size:1},{skip:!(null===(n=e.testData)||void 0===n?void 0:n.connectionKey)||!l});if(!l)return null;let o=!!(null==r?void 0:null===(i=r.items)||void 0===i?void 0:i.length);return{title:"Create monitor",description:o?"Data monitor created successfully":"Use the Data discovery tab in this page to add a new monitor",state:o?"finish":"process"}},tN=e=>{let{connection:t}=e,a=!!(null==t?void 0:t.system_key);if((null==t?void 0:t.connection_type)===$.Rj.WEBSITE)return null;let n=a?d.Dv.replace("[id]",t.system_key):d.So;return{title:"Link system",description:a?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(td(),{href:n,passHref:!0,children:(0,s.jsx)(l.FKJ,{children:"System linked"})})," ","successfully"]}):(0,s.jsxs)(s.Fragment,{children:["Link this integration in the"," ",(0,s.jsx)(td(),{href:n,passHref:!0,children:(0,s.jsx)(l.FKJ,{children:"system inventory"})}),'. Navigate to the appropriate system and within the integration tab select "Link integration".']}),state:a?"finish":"process"}},tA=e=>{let{testData:t,testIsLoading:a,connectionOption:n,connection:i}=e,r=tT(),o=tC({testData:t,testIsLoading:a,connection:i,connectionOption:n}),d=tE({testData:t,testIsLoading:a,connection:i,connectionOption:n}),c=tb({testData:t,testIsLoading:a,connection:i,connectionOption:n}),u=tj({testData:t,testIsLoading:a,connection:i,connectionOption:n}),m=tN({testData:t,testIsLoading:a,connection:i,connectionOption:n}),h=(0,g.useMemo)(()=>[r,o,d,c,u,m].filter(e=>null!==e),[r,o,d,c,u,m]),p=(0,g.useMemo)(()=>h.map(e=>({...e,icon:"finish"===e.state?(0,s.jsx)(l.PJP.WzW,{size:24}):void 0})),[h]);return(0,s.jsx)(l.V4A,{title:"Integration setup","data-testid":"integration-setup-card",children:(0,s.jsx)(l.XX8,{direction:"vertical",current:(()=>{let e=h.findIndex(e=>"finish"!==e.state);return -1===e&&h.length>0?h.length-1:e})(),status:(()=>{let e=h.findIndex(e=>"finish"!==e.state);return -1===e?"finish":h[e].state})(),items:p,size:"small"})})};var tw=()=>{var e,t,a,n;let i=(0,r.useRouter)(),g=i.query.id,{data:x,isLoading:y}=(0,h.jA)(g,{skip:!g}),{data:f}=(0,m.$I)({}),F=(null==f?void 0:f.items)||[],v=(0,tx.Z)(null==x?void 0:x.connection_type,null==x?void 0:null===(e=x.saas_config)||void 0===e?void 0:e.type),{testData:S,testConnection:b,isLoading:j}=(0,p.Z)(x),{handleAuthorize:C,needsAuthorization:T}=(0,tv.z)({connection:x,connectionOption:v,testData:S}),k=(0,_.ZP)(null==x?void 0:x.connection_type,null==x?void 0:null===(t=x.saas_config)||void 0===t?void 0:t.type,F),{overview:E,instructions:N,description:A,enabledFeatures:w}=k;x&&!_.jq.includes(x.connection_type)&&i.push(d.KH);let I=(null==x?void 0:x.connection_type)!==$.Rj.MANUAL_TASK,M=tF({connection:x,enabledFeatures:w,integrationOption:v,testData:S,needsAuthorization:T,handleAuthorize:C,testConnection:b,testIsLoading:j,description:A,overview:E,instructions:N,supportsConnectionTest:I}),{activeTab:P,onTabChange:q}=(0,u.Z)({tabKeys:M.map(e=>e.key)});return(0,s.jsxs)(o.Z,{title:"Integrations",children:[(0,s.jsx)(c.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations",href:d.KH},{title:null!==(n=null!==(a=null==x?void 0:x.name)&&void 0!==a?a:null==x?void 0:x.key)&&void 0!==n?n:""}]}),(0,s.jsxs)(l.bue,{wrap:!1,gutter:24,children:[(0,s.jsxs)(l.JGx,{flex:"1 1 auto",children:[(0,s.jsx)(tS.Z,{integration:x,integrationTypeInfo:k,showDeleteButton:!0}),y?(0,s.jsx)(l.$jN,{}):!!x&&(0,s.jsx)(l.A5g,{items:M,activeKey:P,onChange:q})]}),(0,s.jsx)(l.JGx,{flex:"0 0 350px",children:y?(0,s.jsx)(l.$jN,{}):!!x&&(0,s.jsx)(tA,{testData:S,testIsLoading:j,connectionOption:v,connection:x})})]})]})}}},function(e){e.O(0,[431,8765,9278,5163,699,3662,1316,7245,5279,155,2888,9774,179],function(){return e(e.s=50697)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2815],{24081:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/messaging",function(){return s(18504)}])},35287:function(e,t,s){"use strict";var i=s(24246),n=s(20595),a=s(88038),r=s.n(a);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:a}=e;return(0,i.jsxs)(n.kCb,{"data-testid":s,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsx)(n.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...a,children:t})]})}},87361:function(e,t,s){"use strict";var i=s(24246),n=s(20595);t.Z=e=>{let{title:t,text:s,onClose:a}=e;return(0,i.jsxs)(n.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderRadius:"md",justifyContent:"space-between",py:4,pr:6,pl:3,"data-testid":"empty-state",gap:2,position:"relative",children:[a&&(0,i.jsx)(n.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:a}),(0,i.jsx)(n.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,i.jsxs)(n.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,i.jsx)(n.X6q,{fontSize:"md",children:t}),(0,i.jsx)(n.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:s})]})]})}},58754:function(e,t,s){"use strict";var i=s(24246),n=s(20595),a=s(70788);t.Z=e=>{let{heading:t,breadcrumbItems:s,isSticky:r=!0,children:l,rightContent:o,style:c,...d}=e;return(0,i.jsxs)("div",{...d,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,i.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(n.lQT,{className:s||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!s&&(0,i.jsx)(a.m,{className:l?"pb-4":void 0,items:s,"data-testid":"page-breadcrumb"}),l]})}},70788:function(e,t,s){"use strict";s.d(t,{m:function(){return c}});var i=s(24246),n=s(20595),a=s(79894),r=s.n(a),l=s(27378);let{Text:o}=n.AntTypography,c=e=>{let{items:t,...s}=e,a=(0,l.useMemo)(()=>null==t?void 0:t.map((e,s)=>{let a=s===t.length-1,l={...e},c=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,i.jsx)(o,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,id:a?"breadcrumb-current-page":void 0,children:l.title})),c)?l.title=(0,i.jsx)(n.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,i.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,i.jsx)(n.zrq,{items:a,...s})}},67810:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}}),(i=n||(n={})).PRIVACY_REQUEST_REVIEW_APPROVE="privacy_request_review_approve",i.PRIVACY_REQUEST_REVIEW_DENY="privacy_request_review_deny",i.PRIVACY_REQUEST_RECEIPT="privacy_request_receipt",i.PRIVACY_REQUEST_COMPLETE_ACCESS="privacy_request_complete_access",i.PRIVACY_REQUEST_COMPLETE_DELETION="privacy_request_complete_deletion",i.SUBJECT_IDENTITY_VERIFICATION="subject_identity_verification";var i,n,a={[n.PRIVACY_REQUEST_COMPLETE_ACCESS]:"Access request completed",[n.PRIVACY_REQUEST_COMPLETE_DELETION]:"Erasure request completed",[n.PRIVACY_REQUEST_RECEIPT]:"Privacy request received",[n.PRIVACY_REQUEST_REVIEW_APPROVE]:"Privacy request approved",[n.PRIVACY_REQUEST_REVIEW_DENY]:"Privacy request denied",[n.SUBJECT_IDENTITY_VERIFICATION]:"Subject identity verification"}},5058:function(e,t,s){"use strict";s.d(t,{Vw:function(){return a},ms:function(){return i},pS:function(){return n},vm:function(){return r}});let{useGetSummaryMessagingTemplatesQuery:i,usePutMessagingTemplateByIdMutation:n,useCreateMessagingTemplateByTypeMutation:a,usePatchMessagingTemplateByIdMutation:r}=s(78780).u.injectEndpoints({endpoints:e=>({getSummaryMessagingTemplates:e.query({query:e=>({method:"GET",url:"plus/messaging/templates/summary",params:e}),providesTags:()=>["Property-Specific Messaging Templates"]}),putMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:s}=e;return{url:"plus/messaging/templates/".concat(t),method:"PUT",body:s}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),patchMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:s}=e;return{url:"plus/messaging/templates/".concat(t),method:"PATCH",body:s}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),createMessagingTemplateByType:e.mutation({query:e=>{let{templateType:t,template:s}=e;return{url:"plus/messaging/templates/".concat(t),method:"POST",body:s}},invalidatesTags:()=>["Property-Specific Messaging Templates"]})})})},18504:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return N}});var i=s(24246),n=s(92222),a=s(59003),r=s(20595),l=s(95099),o=s.n(l),c=s(86677),d=s(27378),p=s(35287),u=s(71795),m=s(87361),g=s(46238),x=s(77830),h=s(58754),f=s(47935),j=s(42904),y=s(7426),v=s(67810),b=e=>{let{isOpen:t,onClose:s,onAccept:n}=e,[a,l]=(0,d.useState)(void 0),o=Object.keys(v.Z).map(e=>({value:e,label:v.Z[e]}));return(0,i.jsxs)(r.u_l,{isOpen:t,onClose:s,size:"2xl",isCentered:!0,children:[(0,i.jsx)(r.ZAr,{}),(0,i.jsxs)(r.hzk,{"data-testid":"add-messaging-template-modal",children:[(0,i.jsx)(r.xBx,{borderBottomWidth:1,fontWeight:"bold",children:"Select message template"}),(0,i.jsxs)(r.fef,{children:[(0,i.jsx)(r.xvT,{color:"gray.700",fontWeight:"medium",fontSize:"sm",marginBottom:3,marginTop:1,children:"Add a new email message by selecting a template below and clicking accept."}),(0,i.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"medium",marginBottom:2,children:"Choose template:"}),(0,i.jsx)(r.xuv,{"data-testid":"template-type-selector",children:(0,i.jsx)(r.WPr,{options:o,onChange:e=>{l(e)},className:"w-full"})})]}),(0,i.jsx)(r.mzw,{justifyContent:"flex-start",children:(0,i.jsxs)("div",{className:"flex w-full gap-4",children:[(0,i.jsx)(r.wpx,{onClick:s,"data-testid":"cancel-btn",className:"grow",children:"Cancel"}),(0,i.jsx)(r.wpx,{onClick:()=>n(a),type:"primary","data-testid":"confirm-btn",disabled:!a,className:"grow",children:"Next"})]})})]})]})},_=s(5058),E=s(812),C=s(46628),T=s(31883),w=()=>{let e=(0,r.pmc)(),[t]=(0,_.vm)();return{toggleIsTemplateEnabled:(0,d.useCallback)(async s=>{let{isEnabled:i,templateId:n}=s,a=await t({templateId:n,template:{is_enabled:i}});if((0,T.D4)(a)){e((0,C.Vo)((0,E.e$)(a.error)));return}e((0,C.t5)("Messaging template ".concat(i?"enabled":"disabled")))},[t,e])}},R=s(64826);let P=(0,n.Cl)(),I={items:[],total:0,page:1,size:50,pages:1},S=()=>(0,i.jsx)(r.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,i.jsxs)(r.gCW,{children:[(0,i.jsx)(r.xvT,{fontSize:"md",fontWeight:"600",children:"It looks like it’s your first time here!"}),(0,i.jsxs)(r.xvT,{fontSize:"sm",children:["Add new email templates with the ",'"Add message +"'," button.",(0,i.jsx)("br",{})]})]})}),k=()=>{let{isLoading:e,data:t}=(0,R.gz)({page:1,size:100}),s=null==t?void 0:t.items.filter(e=>!e.messaging_templates||0===e.messaging_templates.length),n=!!(!e&&(null==s?void 0:s.length)),a="missing-messages-notice-".concat(null==s?void 0:s.map(e=>e.id).join("-")),[l,o]=(0,u._)("notices.dismissedMessageNoticeId",""),c=a===l;return n&&!c?(0,i.jsx)(r.xuv,{mb:6,"data-testid":"notice-properties-without-messaging-templates",children:(0,i.jsx)(m.Z,{title:"Not all properties have messages configured.",text:(0,i.jsxs)(r.xvT,{as:"span",children:["You have properties that do not have messages configured. Users who submit privacy requests for these properties may not receive the necessary emails regarding their requests."," ",(0,i.jsx)(r.xuv,{as:"span",children:(0,i.jsx)(g.b,{label:null==s?void 0:s.map(e=>e.name).join(", ")})})]}),onClose:()=>{o(a)}})}):null},A=()=>{let{data:e}=(0,y.tB)({api_set:!1});return(null==e?void 0:e.notifications.enable_property_specific_messaging)?null:(0,i.jsx)(r.xuv,{mb:6,"data-testid":"notice-properties-without-messaging-templates",children:(0,i.jsx)(m.Z,{title:"Basic messaging enabled",text:(0,i.jsxs)(r.xvT,{as:"span",children:["In basic messaging mode, you can edit the content of your messages from this screen. Please note that in basic messaging, the “Enable” toggle does not apply. Fides also supports property specific messaging mode. Read our"," ",(0,i.jsx)(r.rUS,{href:"https://fid.es/property-specific-messaging",target:"_blank",rel:"nofollow",textDecoration:"underline",children:"docs"})," ","for more information about property specific mode or contact"," ",(0,i.jsx)(r.rUS,{href:"mailto:support@ethyca.com",textDecoration:"underline",children:"Ethyca support"})," ","to enable this mode on your Fides instance."]})})})};var N=()=>{let e=(0,c.useRouter)(),{toggleIsTemplateEnabled:t}=w(),{PAGE_SIZES:s,pageSize:l,setPageSize:u,onPreviousPageClick:m,isPreviousPageDisabled:g,onNextPageClick:y,isNextPageDisabled:E,startRange:C,endRange:T,pageIndex:R,setTotalPages:N}=(0,f.oi)(),{data:M,isLoading:z,isFetching:V}=(0,_.ms)({page:R,size:l}),{items:q,total:U,pages:O}=(0,d.useMemo)(()=>null!=M?M:I,[M]);(0,d.useEffect)(()=>{N(O)},[O,N]);let[W,B]=(0,d.useState)(!1),Y=(0,d.useMemo)(()=>[P.accessor(e=>e.type,{id:"message",cell:e=>(0,i.jsx)(f.G3,{value:v.Z[e.getValue()]}),header:e=>(0,i.jsx)(f.Rr,{value:"Message",...e}),size:150}),P.accessor(e=>(e.properties||[]).map(e=>e.name),{id:"properties",cell:e=>(0,i.jsx)(f.WP,{suffix:"properties",value:e.getValue(),...e}),header:e=>(0,i.jsx)(f.Rr,{value:"Properties",...e}),meta:{showHeaderMenu:!0},size:250}),P.accessor(e=>e.is_enabled,{id:"is_enabled",cell:e=>(0,i.jsx)(r.kCb,{align:"center",justifyContent:"flex-start",w:"full",h:"full",children:(0,i.jsx)(r.rAg,{checked:e.getValue(),onChange:s=>{t({isEnabled:s,templateId:e.row.original.id})}})}),header:e=>(0,i.jsx)(f.Rr,{value:"Enable",...e}),size:200,meta:{disableRowClick:!0}})],[t]),D=(0,d.useMemo)(()=>o()(q,"id"),[q]),Z=(0,a.b7)({getCoreRowModel:(0,n.sC)(),getFilteredRowModel:(0,n.vL)(),getSortedRowModel:(0,n.tj)(),columns:Y,data:D,columnResizeMode:"onChange"});return(0,i.jsxs)(p.Z,{title:"Messaging",children:[(0,i.jsx)(h.Z,{heading:"Messaging"}),(0,i.jsx)(A,{}),(0,i.jsx)(k,{}),(0,i.jsx)(f.Q$,{children:(0,i.jsx)(r.Ugi,{alignItems:"center",spacing:4,marginLeft:"auto",children:(0,i.jsx)(r.wpx,{type:"primary","data-testid":"add-message-btn",onClick:()=>B(!0),children:"Add message +"})})}),z?(0,i.jsx)(f.I4,{rowHeight:36,numRows:15}):(0,i.jsx)(f.ZK,{tableInstance:Z,onRowClick:t=>{e.push({pathname:x.ax,query:{id:t.id}})},emptyTableNotice:(0,i.jsx)(S,{})}),(0,i.jsx)(j.s8,{totalRows:U||0,pageSizes:s,setPageSize:u,onPreviousPageClick:m,isPreviousPageDisabled:g||V,onNextPageClick:y,isNextPageDisabled:E||V,startRange:C,endRange:T}),(0,i.jsx)(b,{isOpen:W,onClose:()=>B(!1),onAccept:t=>{e.push({pathname:x.sM,query:{templateType:t}})}})]})}},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}},function(e){e.O(0,[8765,9278,346,2888,9774,179],function(){return e(e.s=24081)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1921],{76985:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/ant-components",function(){return s(47002)}])},58754:function(e,l,s){"use strict";var i=s(24246),a=s(20595),n=s(70788);l.Z=e=>{let{heading:l,breadcrumbItems:s,isSticky:r=!0,children:t,rightContent:c,style:d,...o}=e;return(0,i.jsxs)("div",{...o,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,i.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof l?(0,i.jsx)(a.lQT,{className:s||t?"pb-4":void 0,level:1,"data-testid":"page-heading",children:l}):l,c&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:c})]}),!!s&&(0,i.jsx)(n.m,{className:t?"pb-4":void 0,items:s,"data-testid":"page-breadcrumb"}),t]})}},70788:function(e,l,s){"use strict";s.d(l,{m:function(){return d}});var i=s(24246),a=s(20595),n=s(79894),r=s.n(n),t=s(27378);let{Text:c}=a.AntTypography,d=e=>{let{items:l,...s}=e,n=(0,t.useMemo)(()=>null==l?void 0:l.map((e,s)=>{let n=s===l.length-1,t={...e},d=t.onClick&&!t.href;return("string"==typeof t.title&&(t.title=(0,i.jsx)(c,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,id:n?"breadcrumb-current-page":void 0,children:t.title})),d)?t.title=(0,i.jsx)(a.wpx,{type:"text",size:"small",icon:t.icon,onClick:t.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:t.title}):(t.icon&&(t.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:t.icon}),t.title]})),t.href&&t.title&&(t.title=(0,i.jsx)(r(),{href:t.href,className:"ant-breadcrumb-link",children:t.title}),delete t.href)),t}),[l]);return(0,i.jsx)(a.zrq,{items:n,...s})}},47002:function(e,l,s){"use strict";s.r(l);var i=s(24246),a=s(20595),n=s(46238),r=s(58754);let{Content:t}=a.AntLayout,{Link:c,Paragraph:d,Text:o,Title:h}=a.AntTypography,u=[];for(let e=10;e<36;e+=1)u.push({label:e.toString(36)+e,value:e.toString(36)+e});l.default=()=>(0,i.jsx)(a.AntLayout,{children:(0,i.jsxs)(t,{className:"overflow-auto px-10 py-6",children:[(0,i.jsx)(r.Z,{heading:"Ant Design Proof of Concept"}),(0,i.jsxs)(a.bue,{gutter:16,className:"mt-6",children:[(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Button",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.wpx,{type:"primary",children:"Primary Button"}),(0,i.jsx)(a.wpx,{children:"Default Button"}),(0,i.jsx)(a.wpx,{type:"dashed",children:"Dashed Button"}),(0,i.jsx)(a.wpx,{type:"text",children:"Text Button"}),(0,i.jsx)(a.wpx,{type:"link",children:"Link Button"}),(0,i.jsx)(a.wpx,{type:"primary",loading:!0,children:"Loading Button"}),(0,i.jsx)(a.wpx,{type:"primary",disabled:!0,children:"Disabled Button"})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Switch",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.rAg,{defaultChecked:!0}),(0,i.jsx)(a.rAg,{size:"small",defaultChecked:!0}),(0,i.jsx)(a.rAg,{loading:!0,defaultChecked:!0})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Select",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.WPr,{defaultValue:"lucy",className:"w-32",options:[{value:"jack",label:"Jack"},{value:"lucy",label:"Lucy"},{value:"Yiminghe",label:"yiminghe"},{value:"disabled",label:"Disabled",disabled:!0}]}),(0,i.jsx)(a.WPr,{defaultValue:"lucy",className:"w-32",disabled:!0,options:[{value:"lucy",label:"Lucy"}]}),(0,i.jsx)(a.WPr,{defaultValue:"lucy",className:"w-32",loading:!0,options:[{value:"lucy",label:"Lucy"}]}),(0,i.jsx)(a.WPr,{defaultValue:"lucy",className:"w-32",allowClear:!0,options:[{value:"lucy",label:"Lucy"}]}),(0,i.jsx)(a.WPr,{mode:"multiple",allowClear:!0,className:"w-full",placeholder:"Please select",defaultValue:["a10","c12"],options:u}),(0,i.jsx)(a.WPr,{mode:"multiple",disabled:!0,className:"w-full",placeholder:"Please select",defaultValue:["a10","c12"],options:u})]})})})]}),(0,i.jsx)("br",{}),(0,i.jsxs)(a.bue,{gutter:16,children:[(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Checkbox",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.E_O,{children:"Checkbox"}),(0,i.jsx)(a.E_O,{defaultChecked:!0,children:"Checkbox"}),(0,i.jsx)(a.E_O,{disabled:!0,children:"Disabled"}),(0,i.jsx)(a.E_O,{indeterminate:!0,children:"Indeterminate"}),(0,i.jsx)(a.E_O.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange",disabled:!0}],defaultValue:["Apple"]})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Radio",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.y02,{children:"Radio"}),(0,i.jsx)(a.y02,{defaultChecked:!0,children:"Radio"}),(0,i.jsx)(a.y02,{disabled:!0,children:"Disabled"}),(0,i.jsx)(a.y02.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange",disabled:!0}],defaultValue:"Apple"}),(0,i.jsx)(a.y02.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange"}],defaultValue:"Apple",optionType:"button"}),(0,i.jsx)(a.y02.Group,{options:[{label:"Apple",value:"Apple"},{label:"Pear",value:"Pear"},{label:"Orange",value:"Orange"}],defaultValue:"Apple",optionType:"button",buttonStyle:"solid"})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Input",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",size:"middle",children:[(0,i.jsx)(a.vyj.Compact,{children:(0,i.jsx)(a.uFc,{defaultValue:"26888888"})}),(0,i.jsxs)(a.vyj.Compact,{children:[(0,i.jsx)(a.uFc,{className:"w-1/5",defaultValue:"0571"}),(0,i.jsx)(a.uFc,{className:"w-4/5",defaultValue:"26888888"})]}),(0,i.jsx)(a.vyj.Compact,{children:(0,i.jsx)(a.uFc.Search,{addonBefore:"https://",placeholder:"input search text",allowClear:!0})}),(0,i.jsxs)(a.vyj.Compact,{className:"w-full",children:[(0,i.jsx)(a.uFc,{defaultValue:"Combine input and button"}),(0,i.jsx)(a.wpx,{type:"primary",children:"Submit"})]}),(0,i.jsxs)(a.vyj.Compact,{children:[(0,i.jsx)(a.WPr,{defaultValue:"Zhejiang",options:u}),(0,i.jsx)(a.uFc,{defaultValue:"Xihu District, Hangzhou"})]})]})})})]}),(0,i.jsx)("br",{}),(0,i.jsxs)(a.bue,{gutter:16,children:[(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Tooltip",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.esZ,{title:"I'm a tooltip",children:"Hover or focus this text"}),(0,i.jsx)(n.b,{label:"Tooltip will show on mouse enter or focus."}),(0,i.jsx)(a.esZ,{title:"Focus styles don't change for naturally focusable elements like buttons",children:(0,i.jsx)(a.wpx,{children:"Button with tooltip"})})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Alert",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(a.DUx,{message:"Success Tips",type:"success",showIcon:!0}),(0,i.jsx)(a.DUx,{message:"Informational Notes",type:"info",showIcon:!0}),(0,i.jsx)(a.DUx,{message:"Warning",type:"warning",showIcon:!0,closable:!0}),(0,i.jsx)(a.DUx,{message:"Error",type:"error",showIcon:!0})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Tag",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.jqI,{wrap:!0,gap:"small",children:[(0,i.jsx)(a.j8w,{color:"default",children:"default"}),(0,i.jsx)(a.j8w,{color:"corinth",children:"corinth"}),(0,i.jsx)(a.j8w,{color:"minos",children:"minos"}),(0,i.jsx)(a.j8w,{color:"terracotta",children:"terracotta"}),(0,i.jsx)(a.j8w,{color:"olive",children:"olive"}),(0,i.jsx)(a.j8w,{color:"marble",children:"marble"}),(0,i.jsx)(a.j8w,{color:"sandstone",children:"sandstone"}),(0,i.jsx)(a.j8w,{color:"nectar",children:"nectar"}),(0,i.jsx)(a.j8w,{color:"error",children:"error"}),(0,i.jsx)(a.j8w,{color:"warning",children:"warning"}),(0,i.jsx)(a.j8w,{color:"caution",children:"caution"}),(0,i.jsx)(a.j8w,{color:"success",children:"success"}),(0,i.jsx)(a.j8w,{color:"info",children:"info"}),(0,i.jsx)(a.j8w,{color:"alert",children:"alert"}),(0,i.jsx)(a.j8w,{color:"white",children:"white"}),(0,i.jsx)(a.j8w,{closable:!0,onClose:()=>console.log("closed"),children:"Closable Tag"}),(0,i.jsx)(a.j8w,{onClick:()=>console.log("clicked"),addable:!0}),(0,i.jsx)(a.j8w,{onClick:()=>console.log("clicked"),addable:!0,children:"Add More"}),(0,i.jsxs)(a.j8w,{hasSparkle:!0,onClick:()=>console.log("clicked"),children:["Data Use",(0,i.jsx)(a.PJP.I8b,{})]}),(0,i.jsx)(a.j8w,{hasSparkle:!0,onClick:()=>console.log("clicked"),closable:!0,onClose:()=>console.log("closed"),children:"Data Category"})]})})})]}),(0,i.jsx)("br",{}),(0,i.jsxs)(a.bue,{gutter:16,children:[(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Typography Headings",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(h,{level:1,children:"H1 default"}),(0,i.jsx)(h,{level:1,headingSize:2,children:"H1 sized as H2"}),(0,i.jsx)(h,{level:1,headingSize:3,children:"H1 sized as H3"}),(0,i.jsx)(a.htM,{style:{margin:0}}),(0,i.jsx)(h,{level:2,children:"H2 default"}),(0,i.jsx)(h,{level:2,headingSize:1,children:"H2 sized as H1"}),(0,i.jsx)(h,{level:2,headingSize:3,children:"H2 sized as H3"}),(0,i.jsx)(a.htM,{style:{margin:0}}),(0,i.jsx)(h,{level:3,children:"H3 default"}),(0,i.jsx)(h,{level:3,headingSize:1,children:"H3 sized as H1"}),(0,i.jsx)(h,{level:3,headingSize:2,children:"H3 sized as H2"})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Typography Paragraphs",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.AntTypography,{children:[(0,i.jsx)(d,{children:"This paragraph has a bottom margin. Imperdiet ex curae laoreet turpis adipiscing pulvinar erat conubia rhoncus, faucibus dictum porta integer tincidunt iaculis pharetra. Dis praesent egestas curae tortor primis volutpat metus ridiculus sit rutrum vitae ac aenean, nisi dolor a per molestie etiam ad tristique magnis fames laoreet."}),(0,i.jsx)(d,{children:"This paragraph has no bottom margin. Imperdiet ex curae laoreet turpis adipiscing pulvinar erat conubia rhoncus, faucibus dictum porta integer tincidunt iaculis pharetra."}),(0,i.jsx)(d,{type:"secondary",children:"This paragraph uses secondary color. laoreet turpis adipiscing pulvinar erat conubia rhoncus, faucibus dictum porta integer tincidunt iaculis pharetra."})]})})}),(0,i.jsx)(a.JGx,{span:8,children:(0,i.jsx)(a.V4A,{title:"Typography Text & Link",variant:"borderless",className:"h-full",children:(0,i.jsxs)(a.vyj,{direction:"vertical",children:[(0,i.jsx)(o,{children:"Ant Design (default)"}),(0,i.jsx)(o,{size:"sm",children:"Ant Design (small)"}),(0,i.jsx)(o,{size:"lg",children:"Ant Design (large)"}),(0,i.jsx)(o,{type:"secondary",children:"Ant Design (secondary)"}),(0,i.jsx)(o,{type:"success",children:"Ant Design (success)"}),(0,i.jsx)(o,{type:"warning",children:"Ant Design (warning)"}),(0,i.jsx)(o,{type:"danger",children:"Ant Design (danger)"}),(0,i.jsx)(o,{disabled:!0,children:"Ant Design (disabled)"}),(0,i.jsx)(o,{mark:!0,children:"Ant Design (mark)"}),(0,i.jsx)(o,{code:!0,children:"Ant Design (code)"}),(0,i.jsx)(o,{keyboard:!0,children:"Ant Design (keyboard)"}),(0,i.jsx)(o,{underline:!0,children:"Ant Design (underline)"}),(0,i.jsx)(o,{delete:!0,children:"Ant Design (delete)"}),(0,i.jsx)(o,{strong:!0,children:"Ant Design (strong)"}),(0,i.jsx)(o,{italic:!0,children:"Ant Design (italic)"}),(0,i.jsx)(c,{href:"https://ant.design",target:"_blank",children:"Ant Design (Link)"})]})})})]})]})})}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=76985)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5970],{6920:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/form-experiments/AntForm",function(){return n(33396)}])},95813:function(e,l,n){"use strict";n.d(l,{S:function(){return t}});let t={input:"default text",radio:"2",checkbox:!0,switch:!0,select:"2",multiselect:["2"],tags:["1"],date:"",number:12}},33396:function(e,l,n){"use strict";n.r(l),n.d(l,{AntFormPOC:function(){return u}});var t=n(24246),a=n(20595),s=n(3124),r=n.n(s),c=n(27378),i=n(95813);let{Title:o}=a.AntTypography,u=()=>{let[e]=a.PPS.useForm(),[l,n]=(0,c.useState)(i.S);return(0,t.jsxs)(a.bue,{children:[(0,t.jsxs)(a.JGx,{span:12,children:[(0,t.jsx)(o,{level:2,children:"Pure Ant"}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(a.j8w,{color:"green",children:"funcitonal"}),(0,t.jsx)(a.j8w,{color:"green",children:"low effort"})]}),(0,t.jsxs)(a.PPS,{initialValues:{...i.S},form:e,layout:"vertical",onValuesChange:(e,l)=>{n(l)},children:[(0,t.jsx)(a.PPS.Item,{label:"Input",name:"input",children:(0,t.jsx)(a.uFc,{})}),(0,t.jsx)(a.PPS.Item,{name:"radio",children:(0,t.jsxs)(a.y02.Group,{name:"radio",children:[(0,t.jsx)(a.y02,{value:"1",children:"Radio 1"}),(0,t.jsx)(a.y02,{value:"2",children:"Radio 2"})]})}),(0,t.jsx)(a.PPS.Item,{name:"checkbox",valuePropName:"checked",children:(0,t.jsx)(a.E_O,{children:"Checkbox"})}),(0,t.jsx)(a.PPS.Item,{label:"Switch",name:"switch",valuePropName:"checked",children:(0,t.jsx)(a.rAg,{})}),(0,t.jsx)(a.PPS.Item,{label:"Select",name:"select",children:(0,t.jsx)(a.WPr,{allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,t.jsx)(a.PPS.Item,{label:"Multiselect",name:"multiselect",children:(0,t.jsx)(a.WPr,{mode:"multiple",allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,t.jsx)(a.PPS.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(a.WPr,{mode:"tags",allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,t.jsx)(a.PPS.Item,{label:"Date",name:"date",children:(0,t.jsx)(a.cv2,{})}),(0,t.jsx)(a.PPS.Item,{label:"Number",name:"number",children:(0,t.jsx)(a.W7D,{})})]})]}),(0,t.jsxs)(a.JGx,{span:8,offset:4,children:[(0,t.jsx)(o,{level:4,children:"Controlled Values"}),(0,t.jsx)(a.V4A,{style:{backgroundColor:r().FIDESUI_MINOS,color:r().FIDESUI_CORINTH},children:(0,t.jsx)("pre",{children:(0,t.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e.toString(),": ").concat(l[e],"\n")),"}"]})})})]})]})};l.default=u}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=6920)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3316],{36136:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/forms",function(){return n(71252)}])},33396:function(e,l,n){"use strict";n.r(l),n.d(l,{AntFormPOC:function(){return d}});var i=n(24246),s=n(20595),r=n(3124),t=n.n(r),a=n(27378),o=n(95813);let{Title:c}=s.AntTypography,d=()=>{let[e]=s.PPS.useForm(),[l,n]=(0,a.useState)(o.S);return(0,i.jsxs)(s.bue,{children:[(0,i.jsxs)(s.JGx,{span:12,children:[(0,i.jsx)(c,{level:2,children:"Pure Ant"}),(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)(s.j8w,{color:"green",children:"funcitonal"}),(0,i.jsx)(s.j8w,{color:"green",children:"low effort"})]}),(0,i.jsxs)(s.PPS,{initialValues:{...o.S},form:e,layout:"vertical",onValuesChange:(e,l)=>{n(l)},children:[(0,i.jsx)(s.PPS.Item,{label:"Input",name:"input",children:(0,i.jsx)(s.uFc,{})}),(0,i.jsx)(s.PPS.Item,{name:"radio",children:(0,i.jsxs)(s.y02.Group,{name:"radio",children:[(0,i.jsx)(s.y02,{value:"1",children:"Radio 1"}),(0,i.jsx)(s.y02,{value:"2",children:"Radio 2"})]})}),(0,i.jsx)(s.PPS.Item,{name:"checkbox",valuePropName:"checked",children:(0,i.jsx)(s.E_O,{children:"Checkbox"})}),(0,i.jsx)(s.PPS.Item,{label:"Switch",name:"switch",valuePropName:"checked",children:(0,i.jsx)(s.rAg,{})}),(0,i.jsx)(s.PPS.Item,{label:"Select",name:"select",children:(0,i.jsx)(s.WPr,{allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsx)(s.PPS.Item,{label:"Multiselect",name:"multiselect",children:(0,i.jsx)(s.WPr,{mode:"multiple",allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsx)(s.PPS.Item,{label:"Tags",name:"tags",children:(0,i.jsx)(s.WPr,{mode:"tags",allowClear:!0,className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsx)(s.PPS.Item,{label:"Date",name:"date",children:(0,i.jsx)(s.cv2,{})}),(0,i.jsx)(s.PPS.Item,{label:"Number",name:"number",children:(0,i.jsx)(s.W7D,{})})]})]}),(0,i.jsxs)(s.JGx,{span:8,offset:4,children:[(0,i.jsx)(c,{level:4,children:"Controlled Values"}),(0,i.jsx)(s.V4A,{style:{backgroundColor:t().FIDESUI_MINOS,color:t().FIDESUI_CORINTH},children:(0,i.jsx)("pre",{children:(0,i.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e.toString(),": ").concat(l[e],"\n")),"}"]})})})]})]})};l.default=d},35716:function(e,l,n){"use strict";n.r(l),n.d(l,{FormikAntFormItemPOC:function(){return d}});var i=n(24246),s=n(20595),r=n(3124),t=n.n(r),a=n(34090),o=n(95813);let{Title:c}=s.AntTypography,d=()=>(0,i.jsx)(a.J9,{initialValues:{...o.S},onSubmit:console.log,children:e=>{let{values:l,setFieldValue:n}=e;return(0,i.jsxs)(s.bue,{children:[(0,i.jsxs)(s.JGx,{span:12,children:[(0,i.jsx)(c,{level:2,children:"<Formik> + Controlled + Ant's <Form.Item>"}),(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)(s.j8w,{color:"green",children:"funcitonal"}),(0,i.jsx)(s.j8w,{color:"orange",children:"mid effort"})]}),(0,i.jsx)(a.l0,{children:(0,i.jsxs)(s.jqI,{vertical:!0,children:[(0,i.jsx)(s.PPS.Item,{label:"Input",name:"input",layout:"vertical",children:(0,i.jsx)(s.uFc,{onChange:e=>n("input",e.target.value),defaultValue:l.input})}),(0,i.jsxs)(s.y02.Group,{name:"radio",onChange:e=>n("radio",e.target.value),defaultValue:l.radio,children:[(0,i.jsx)(s.y02,{value:"1",children:"Radio 1"}),(0,i.jsx)(s.y02,{value:"2",children:"Radio 2"})]}),(0,i.jsx)(s.PPS.Item,{name:"checkbox",children:(0,i.jsx)(s.E_O,{onChange:e=>n("checkbox",e.target.checked),defaultChecked:l.checkbox,children:"Checkbox"})}),(0,i.jsx)(s.PPS.Item,{label:"Switch",name:"switch",layout:"vertical",children:(0,i.jsx)(s.rAg,{onChange:e=>n("switch",e),defaultChecked:l.switch})}),(0,i.jsx)(s.PPS.Item,{label:"Select",name:"select",layout:"vertical",children:(0,i.jsx)(s.WPr,{allowClear:!0,className:"w-full",defaultValue:l.select,onChange:e=>n("select",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsx)(s.PPS.Item,{label:"Multiselect",name:"multiselect",layout:"vertical",children:(0,i.jsx)(s.WPr,{mode:"multiple",allowClear:!0,className:"w-full",defaultValue:l.multiselect,onChange:e=>n("multiselect",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsx)(s.PPS.Item,{label:"Tags",name:"tags",layout:"vertical",children:(0,i.jsx)(s.WPr,{mode:"tags",allowClear:!0,className:"w-full",defaultValue:l.tags,onChange:e=>n("tags",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsx)(s.PPS.Item,{label:"Date",name:"date",layout:"vertical",children:(0,i.jsx)(s.cv2,{onChange:e=>n("date",e.toISOString())})}),(0,i.jsx)(s.PPS.Item,{label:"Number",name:"number",layout:"vertical",children:(0,i.jsx)(s.W7D,{defaultValue:l.number,onChange:e=>n("number",e)})})]})})]}),(0,i.jsxs)(s.JGx,{span:8,offset:4,children:[(0,i.jsx)(c,{level:4,children:"Controlled Values"}),(0,i.jsx)(s.V4A,{style:{backgroundColor:t().FIDESUI_MINOS,color:t().FIDESUI_CORINTH},children:(0,i.jsx)("pre",{children:(0,i.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e,": ").concat(l[e],"\n")),"}"]})})})]})]})}});l.default=d},15957:function(e,l,n){"use strict";n.r(l),n.d(l,{FormikControlledPOC:function(){return d}});var i=n(24246),s=n(20595),r=n(3124),t=n.n(r),a=n(34090),o=n(95813);let{Title:c}=s.AntTypography,d=()=>(0,i.jsx)(a.J9,{initialValues:{...o.S},onSubmit:console.log,children:e=>{let{values:l,setFieldValue:n}=e;return(0,i.jsxs)(s.bue,{children:[(0,i.jsxs)(s.JGx,{span:12,children:[(0,i.jsx)(c,{level:2,children:"<Formik> + Controlled"}),(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)(s.j8w,{color:"green",children:"funcitonal"}),(0,i.jsx)(s.j8w,{color:"red",children:"high effort"})]}),(0,i.jsx)(a.l0,{children:(0,i.jsxs)(s.jqI,{vertical:!0,gap:16,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"input",children:"Input"}),(0,i.jsx)("div",{children:(0,i.jsx)(s.uFc,{id:"input",onChange:e=>n("input",e.target.value),defaultValue:l.input})})]}),(0,i.jsx)("div",{children:(0,i.jsxs)(s.y02.Group,{name:"radio",onChange:e=>n("radio",e.target.value),defaultValue:l.radio,children:[(0,i.jsx)(s.y02,{value:"1",children:"Radio 1"}),(0,i.jsx)(s.y02,{value:"2",children:"Radio 2"})]})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.E_O,{onChange:e=>n("checkbox",e.target.checked),defaultChecked:l.checkbox,children:"Checkbox"})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"switch",children:"Switch"}),(0,i.jsx)("div",{children:(0,i.jsx)(s.rAg,{id:"switch",onChange:e=>n("switch",e),defaultChecked:l.switch})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"select",children:"Select"}),(0,i.jsx)("div",{children:(0,i.jsx)(s.WPr,{allowClear:!0,id:"select",defaultValue:l.select,onChange:e=>n("select",e),className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"multiselect",children:"Multiselect"}),(0,i.jsx)("div",{children:(0,i.jsx)(s.WPr,{mode:"multiple",allowClear:!0,id:"multiselect",defaultValue:l.multiselect,onChange:e=>n("multiselect",e),className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"tags",children:"Tags"}),(0,i.jsx)("div",{children:(0,i.jsx)(s.WPr,{mode:"tags",allowClear:!0,id:"tags",defaultValue:l.tags,onChange:e=>n("tags",e),className:"w-full",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"date",children:"Date"}),(0,i.jsx)("div",{children:(0,i.jsx)(s.cv2,{id:"date",onChange:e=>n("date",e.toISOString())})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"number",children:"Number"}),(0,i.jsx)("div",{children:(0,i.jsx)(s.W7D,{id:"number",defaultValue:l.number,onChange:e=>n("number",e)})})]})]})})]}),(0,i.jsxs)(s.JGx,{span:8,offset:4,children:[(0,i.jsx)(c,{level:4,children:"Controlled Values"}),(0,i.jsx)(s.V4A,{style:{backgroundColor:t().FIDESUI_MINOS,color:t().FIDESUI_CORINTH},children:(0,i.jsx)("pre",{children:(0,i.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e,": ").concat(l[e],"\n")),"}"]})})})]})]})}});l.default=d},82252:function(e,l,n){"use strict";n.r(l),n.d(l,{FormikFieldPOC:function(){return h}});var i=n(24246),s=n(20595),r=n(3124),t=n.n(r),a=n(34090),o=n(95813);let{Text:c,Title:d}=s.AntTypography,h=()=>(0,i.jsx)(a.J9,{initialValues:{...o.S},onSubmit:console.log,children:e=>{let{values:l}=e;return(0,i.jsxs)(s.bue,{children:[(0,i.jsxs)(s.JGx,{span:12,children:[(0,i.jsx)(d,{level:2,children:"<Formik> + <Field>"}),(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)(s.j8w,{color:"red",children:"non functional"}),(0,i.jsx)(s.j8w,{color:"red",children:"high effort"})]}),(0,i.jsx)(a.l0,{children:(0,i.jsxs)(s.jqI,{vertical:!0,gap:16,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"input",children:"Input"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:s.uFc,id:"input",name:"input",type:"text"})})]}),(0,i.jsx)("div",{children:(0,i.jsxs)(a.gN,{as:s.y02.Group,name:"radio",children:[(0,i.jsx)(s.y02,{value:"1",children:"Radio 1"}),(0,i.jsx)(s.y02,{value:"2",children:"Radio 2"})]})}),(0,i.jsxs)("div",{children:[(0,i.jsx)(a.gN,{as:s.E_O,defaultChecked:l.checkbox,name:"checkbox",children:"Checkbox"}),(0,i.jsx)(c,{type:"warning",children:"Requires additional logic to handle default state"})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"switch",children:"Switch"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:s.rAg,id:"switch",name:"switch"})}),(0,i.jsxs)(c,{type:"danger",children:["Ant Switch's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"select",children:"Select"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:s.WPr,allowClear:!0,id:"select",name:"select",className:"w-full",status:"error",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsxs)(c,{type:"danger",children:["Ant Select's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"multiselect",children:"Multiselect"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:s.WPr,mode:"multiple",allowClear:!0,id:"multiselect",name:"multiselect",className:"w-full",status:"error",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsxs)(c,{type:"danger",children:["Ant Select's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"multiselect",children:"Tags"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:s.WPr,mode:"tags",allowClear:!0,id:"tags",name:"tags",className:"w-full",status:"error",options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,i.jsxs)(c,{type:"danger",children:["Ant Select's onChange is too different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"date",children:"Date"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:s.cv2,id:"date",name:"date",status:"error"})}),(0,i.jsxs)(c,{type:"danger",children:["Ant DatePicker's onChange is different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"number",children:"Number"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.gN,{as:s.W7D,id:"number",name:"number",status:"error"})}),(0,i.jsxs)(c,{type:"danger",children:["Ant InputNumber's onChange is different from Formik, requires to be fully controlled. This will not work with"," ","<Field>"," alone"]})]})]})})]}),(0,i.jsxs)(s.JGx,{span:8,offset:4,children:[(0,i.jsx)(d,{level:4,children:"Controlled Values"}),(0,i.jsx)(s.V4A,{style:{backgroundColor:t().FIDESUI_MINOS,color:t().FIDESUI_CORINTH},children:(0,i.jsx)("pre",{children:(0,i.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>" ".concat(e,": ").concat(l[e],"\n")),"}"]})})})]})]})}});l.default=h},71252:function(e,l,n){"use strict";n.r(l),n.d(l,{FormsPOC:function(){return x}});var i=n(24246),s=n(20595),r=n(33396),t=n(35716),a=n(15957),o=n(82252),c=n(12921);let{Content:d}=s.AntLayout,{Title:h}=s.AntTypography,u=[{key:"1",label:"Formik + Controlled",children:(0,i.jsx)(a.FormikControlledPOC,{})},{key:"2",label:"Formik + Field",children:(0,i.jsx)(o.FormikFieldPOC,{})},{key:"3",label:"Formik + {...field}",children:(0,i.jsx)(c.FormikSpreadFieldPOC,{})},{key:"4",label:"Formik + Ant's Form.Item",children:(0,i.jsx)(t.FormikAntFormItemPOC,{})},{key:"5",label:"Ant Form",children:(0,i.jsx)(r.AntFormPOC,{})}],x=()=>(0,i.jsxs)(d,{className:"overflow-auto px-10 py-6",children:[(0,i.jsx)(s.bue,{children:(0,i.jsx)(h,{children:"Forms POC"})}),(0,i.jsx)(s.A5g,{defaultActiveKey:"1",items:u})]});l.default=x}},function(e){e.O(0,[2921,2888,9774,179],function(){return e(e.s=36136)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9196],{6446:function(e){e.exports=function(e,t,a,s){var r=-1,i=null==e?0:e.length;for(s&&i&&(a=e[++r]);++r<i;)a=t(a,e[r],r,e);return a}},67375:function(e,t,a){var s=a(52033),r=a(80068);e.exports=function(e,t){var a=-1,i=r(e)?Array(e.length):[];return s(e,function(e,s,r){i[++a]=t(e,s,r)}),i}},74833:function(e,t,a){var s=a(56127),r=/^\s+/;e.exports=function(e){return e?e.slice(0,s(e)+1).replace(r,""):e}},56632:function(e,t,a){var s=a(89278),r=a(80068),i=a(50098);e.exports=function(e){return function(t,a,n){var l=Object(t);if(!r(t)){var o=s(a,3);t=i(t),a=function(e){return o(l[e],e,l)}}var c=e(t,a,n);return c>-1?l[o?t[c]:c]:void 0}}},56127:function(e){var t=/\s/;e.exports=function(e){for(var a=e.length;a--&&t.test(e.charAt(a)););return a}},64925:function(e,t,a){var s=a(56632)(a(66259));e.exports=s},66259:function(e,t,a){var s=a(95372),r=a(89278),i=a(47991),n=Math.max;e.exports=function(e,t,a){var l=null==e?0:e.length;if(!l)return -1;var o=null==a?0:i(a);return o<0&&(o=n(l+o,0)),s(e,r(t,3),o)}},55807:function(e,t,a){var s=a(66070),r=a(89278),i=a(67375),n=a(19785);e.exports=function(e,t){return(n(e)?s:i)(e,r(t,3))}},82846:function(e,t,a){var s=a(77400);e.exports=function(){return s.Date.now()}},32526:function(e,t,a){var s=a(68267)(function(e,t,a){return e+(a?"_":"")+t.toLowerCase()});e.exports=s},94919:function(e,t,a){var s=a(91936),r=1/0;e.exports=function(e){return e?(e=s(e))===r||e===-r?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,a){var s=a(94919);e.exports=function(e){var t=s(e),a=t%1;return t==t?a?t-a:t:0}},91936:function(e,t,a){var s=a(74833),r=a(11611),i=a(55193),n=0/0,l=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return n;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var a=o.test(e);return a||c.test(e)?d(e.slice(2),a?2:8):l.test(e)?n:+e}},86548:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reporting/datamap",function(){return a(27901)}])},624:function(e,t,a){"use strict";var s=a(24246),r=a(20595),i=a(27378);let n=e=>{let t=e.split("."),a=[];return t.forEach(e=>{let t=a.length>0?a[a.length-1]:null;t?a.push("".concat(t,".").concat(e)):a.push(e)}),a},l=(e,t)=>{let a=n(t).filter(e=>e!==t);return e.filter(e=>a.includes(e)).length>0},o=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,a)=>{let s=null!=a?a:[];return e.forEach(e=>{e.children&&c(e.children,t,s),o(e.value,t)&&s.push(e)}),s},d=e=>{let{node:t,isChecked:a,onChecked:i,isExpanded:n,onExpanded:l,isIndeterminate:o,isDisabled:c,children:d}=e,{value:u,label:_}=t,p=!!t.children&&t.children.length>0;return(0,s.jsxs)(r.xuv,{children:[(0,s.jsxs)(r.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>l(t),minHeight:8,children:[(0,s.jsx)(r.XZJ,{colorScheme:"complimentary",value:u,isChecked:!o&&a,isIndeterminate:o,isDisabled:c,onChange:()=>i(t),mx:2,"data-testid":"checkbox-".concat(_),children:_}),p?(0,s.jsx)(r.wpx,{"data-testid":"expand-".concat(_),"aria-label":n?"collapse":"expand",icon:(0,s.jsx)(r.v4q,{boxSize:5}),type:"text",onClick:()=>l(t),className:n?"rotate-180":void 0}):null]}),d&&(0,s.jsx)(r.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:a,onSelected:u,..._}=e,[p,m]=(0,i.useState)([]),[E,S]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=Array.from(new Set([...a.map(e=>n(e)).reduce((e,t)=>e.concat(t),[]),...a.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));S(e),m(e)},[a,t]);let g=e=>{let s=[],r=[];p.indexOf(e.value)>=0?(s=p.filter(t=>!o(t,e.value)),r=a.filter(t=>!o(t,e.value))):(s=[...p,...c(t,e.value).map(e=>e.value)],r=[...a,e.value]),m(s),u(r)},f=e=>{E.indexOf(e.value)>=0?S(E.filter(t=>!o(t,e.value))):S([...E,e.value])},h=e=>{if(e.children){let r=p.indexOf(e.value)>=0,n=E.indexOf(e.value)>=0,o=c(t,e.value),u=r&&e.children.length>0&&p.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==o.length,_=l(a,e.value);return(0,s.jsx)(d,{node:e,isChecked:r,onChecked:g,isExpanded:n,onExpanded:f,isDisabled:_,isIndeterminate:u,children:n?e.children.map(e=>(0,s.jsx)(i.Fragment,{children:h(e)},e.value)):void 0})}return null};return(0,s.jsx)(r.xuv,{..._,children:t.map(e=>(0,s.jsx)(r.xuv,{children:h(e)},e.value))})}},35287:function(e,t,a){"use strict";var s=a(24246),r=a(20595),i=a(88038),n=a.n(i);a(27378),t.Z=e=>{let{children:t,title:a,mainProps:i}=e;return(0,s.jsxs)(r.kCb,{"data-testid":a,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,s.jsxs)(n(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",a]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...i,children:t})]})}},19904:function(e,t,a){"use strict";a.d(t,{Tg:function(){return n}});var s=a(24246),r=a(16134),i=a(31793);let n=e=>(0,r.C)(i.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:a}=e;return n(t)?(0,s.jsx)(s.Fragment,{children:a}):null}},34929:function(e,t,a){"use strict";var s=a(24246),r=a(64925),i=a.n(r),n=a(27378),l=a(16134),o=a(30002),c=a(28079),d=a(57072);let u=()=>{let{isLoading:e}=(0,c.fd)(),t=(0,l.C)(c.U3),{isLoading:a}=(0,d.MO)(),s=(0,l.C)(d.qb),{isLoading:r}=(0,o.te)();return{dataUses:t,dataSubjects:(0,l.C)(o.ZL),dataCategories:s,isLoading:e||a||r}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:a,isLoading:r}=u(),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},o=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=t(e);if(!s)return{};let r=t(l(e,a)),i=!!s.parent_key;return{name:s.name||void 0,primaryName:i&&(null==r?void 0:r.name)!==s.name&&(null==r?void 0:r.name)||void 0}},c=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:i}=o(e,t,a);return r?i?(0,s.jsxs)(n.Fragment,{children:[(0,s.jsxs)("strong",{children:[i,":"]})," ",r]},e):(0,s.jsx)("strong",{children:r},e):e},d=t=>i()(e,{fides_key:t}),_=e=>i()(t,{fides_key:e}),p=e=>i()(a,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:d,getDataUseDisplayName:e=>c(e,d,1),getDataUseDisplayNameProps:e=>o(e,d,1),getDataCategories:()=>t,getDataCategoryByKey:_,getDataCategoryDisplayName:e=>c(e,_,2),getDataCategoryDisplayNameProps:e=>o(e,_,2),getDataSubjects:()=>a,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:l,isLoading:r}}},2525:function(e,t,a){"use strict";a.d(t,{Q:function(){return l}});var s=a(24246),r=a(20595),i=a(27378),n=a(3110);let l=e=>{let{values:t,columnState:a,tagProps:l,onTagClose:o,...c}=e,{isExpanded:d,isWrapped:u,version:_}=a||{},[p,m]=(0,i.useState)(!d),[E,S]=(0,i.useState)(!!u),[g,f]=(0,i.useState)(d?t:null==t?void 0:t.slice(0,2));(0,i.useEffect)(()=>{m(!d)},[d,_]),(0,i.useEffect)(()=>{S(!!u)},[u]),(0,i.useEffect)(()=>{(null==t?void 0:t.length)?f(p?t.slice(0,2):t):f(t)},[p,t]);let h=(0,i.useCallback)(()=>{f(null==t?void 0:t.slice(0,2)),m(!0)},[t]),A=(0,i.useCallback)(()=>{m(!1)},[]),T=(0,i.useCallback)(()=>{p?A():h()},[p,A,h]);return(0,i.useMemo)(()=>(null==g?void 0:g.length)?(0,s.jsxs)(r.jqI,{align:p?"center":"start",wrap:E?"wrap":"nowrap",vertical:!p,gap:"small","data-testid":"tag-expandable-cell",style:{overflowX:"auto",...c.style},...c,children:[g.map(e=>(0,s.jsx)(r.j8w,{color:"white","data-testid":e.key,onClose:o?()=>o(e.key):void 0,...l,...e.tagProps,children:(0,s.jsx)(r.lKn,{ellipsis:!!p&&{tooltip:!0},style:{color:"inherit",maxWidth:p?n.TD:void 0},children:e.label})},e.key)),t&&t.length>2&&(0,s.jsx)(r.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),T()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:p?"+".concat(t.length-2," more"):n.T5})]}):(0,s.jsx)("span",{"data-testid":"tag-expandable-cell-empty"}),[g,p,E,c,t,l,o,T])}},3110:function(e,t,a){"use strict";a.d(t,{DI:function(){return l},T5:function(){return i},TD:function(){return n}});var s=a(24246),r=a(20595);let i="show less",n=150,l=[{key:"expand-all",label:"Expand all",icon:(0,s.jsx)(r.PJP.jbG,{})},{key:"collapse-all",label:"Collapse all",icon:(0,s.jsx)(r.PJP.MVB,{})}]},26070:function(e,t,a){"use strict";a.d(t,{v:function(){return o},Q:function(){return c.Q}});var s=a(24246),r=a(20595),i=a(27378),n=a(3110);let{Text:l}=r.AntTypography,o=e=>{let{values:t,valueSuffix:a,columnState:o}=e,{isExpanded:c,version:d}=o||{},[u,_]=(0,i.useState)(!c);(0,i.useEffect)(()=>{_(!c)},[c,d]);let p=(0,i.useCallback)(()=>{_(!0)},[]),m=(0,i.useCallback)(()=>{_(!1)},[]),E=(0,i.useCallback)(()=>{u?m():p()},[u,m,p]);return(0,i.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,s.jsx)(l,{ellipsis:!0,"data-testid":"list-expandable-cell-single",children:t[0]}):(0,s.jsxs)(r.jqI,{align:u?"center":"flex-start",vertical:!u,gap:u?"small":"none","data-testid":"list-expandable-cell",children:[u?(0,s.jsxs)(l,{ellipsis:!0,children:[t.length," ",a]}):(0,s.jsx)(r.krs,{dataSource:t,renderItem:e=>(0,s.jsx)("li",{children:e})}),(0,s.jsx)(r.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),E()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:u?"view":n.T5})]}):null,[u,t,a,E])};var c=a(2525)},22583:function(e,t,a){"use strict";a.d(t,{j:function(){return r}});var s=a(85054);let r={[s.Ej.TAXONOMY_WHITE]:"default",[s.Ej.TAXONOMY_RED]:"error",[s.Ej.TAXONOMY_ORANGE]:"warning",[s.Ej.TAXONOMY_YELLOW]:"caution",[s.Ej.TAXONOMY_GREEN]:"success",[s.Ej.TAXONOMY_BLUE]:"info",[s.Ej.TAXONOMY_PURPLE]:"alert",[s.Ej.SANDSTONE]:"sandstone",[s.Ej.MINOS]:"minos"}},59001:function(e,t,a){"use strict";a.d(t,{Ch:function(){return o},Lo:function(){return n},_g:function(){return c},ac:function(){return i},aq:function(){return d}});var s,r,i,n,l=a(85054);let o="root";(s=i||(i={})).DATA_CATEGORY="data_category",s.DATA_USE="data_use",s.DATA_SUBJECT="data_subject",s.SYSTEM_GROUP="system_group",(r=n||(n={})).DATA_CATEGORIES="Data categories",r.DATA_USES="Data uses",r.DATA_SUBJECTS="Data subjects",r.SYSTEM_GROUPS="System groups";let c=e=>{switch(e){case"data_category":return"Data categories";case"data_use":return"Data uses";case"data_subject":return"Data subjects";case"system_group":return"System groups";default:return e}},d=e=>{switch(e){case"data_category":return{UPDATE:l.Sh.DATA_CATEGORY_UPDATE,CREATE:l.Sh.DATA_CATEGORY_CREATE,DELETE:l.Sh.DATA_CATEGORY_DELETE,READ:l.Sh.DATA_CATEGORY_READ};case"data_use":return{UPDATE:l.Sh.DATA_USE_UPDATE,CREATE:l.Sh.DATA_USE_CREATE,DELETE:l.Sh.DATA_USE_DELETE,READ:l.Sh.DATA_USE_READ};case"data_subject":return{UPDATE:l.Sh.DATA_SUBJECT_UPDATE,CREATE:l.Sh.DATA_SUBJECT_CREATE,DELETE:l.Sh.DATA_SUBJECT_DELETE,READ:l.Sh.DATA_SUBJECT_READ};case"system_group":return{UPDATE:l.Sh.SYSTEM_GROUP_UPDATE,CREATE:l.Sh.SYSTEM_GROUP_CREATE,DELETE:l.Sh.SYSTEM_GROUP_DELETE,READ:l.Sh.SYSTEM_GROUP_READ};default:return{UPDATE:l.Sh.TAXONOMY_UPDATE,CREATE:l.Sh.TAXONOMY_CREATE,DELETE:l.Sh.TAXONOMY_DELETE,READ:l.Sh.TAXONOMY_READ}}}},90673:function(e,t,a){"use strict";a.d(t,{Cd:function(){return i},Xl:function(){return n}});var s=a(85054),r=a(59001);let i=(e,t)=>{let a;if(null==t&&e.every(e=>void 0===e.parent_key))a=e;else{let s=null!=t?t:null;a=e.filter(e=>e.parent_key===s)}return a.map(t=>{var a,s;let r=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:i(e,r),is_default:null!==(a=t.is_default)&&void 0!==a&&a,active:null!==(s=t.active)&&void 0!==s&&s}})},n=e=>{switch(e){case r.ac.DATA_CATEGORY:return s.P6.DATA_CATEGORY;case r.ac.DATA_SUBJECT:return s.P6.DATA_SUBJECT;case r.ac.DATA_USE:return s.P6.DATA_USE;default:return}}},27901:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return eC}});var s,r,i,n,l=a(24246),o=a(27378),c=a(35287),d=a(58754),u=a(71795),_=a(85054);(s=i||(i={})).COLUMN_EXPANSION_STATE="datamap-column-expansion-state",s.COLUMN_NAMES="datamap-column-names",s.COLUMN_ORDER="datamap-column-order",s.COLUMN_SIZING="datamap-column-sizing",s.COLUMN_VISIBILITY="datamap-column-visibility",s.CUSTOM_REPORT_ID="datamap-custom-report-id",s.FILTERS="datamap-filters",s.GROUP_BY="datamap-group-by",s.SORTING_STATE="datamap-sorting-state",s.WRAPPING_COLUMNS="datamap-wrapping-columns",(r=n||(n={})).SYSTEM_NAME="system_name",r.DATA_USE="data_uses",r.DATA_CATEGORY="data_categories",r.DATA_SUBJECT="data_subjects",r.LEGAL_NAME="legal_name",r.DPO="dpo",r.LEGAL_BASIS_FOR_PROCESSING="legal_basis_for_processing",r.ADMINISTRATING_DEPARTMENT="administrating_department",r.COOKIE_MAX_AGE_SECONDS="cookie_max_age_seconds",r.PRIVACY_POLICY="privacy_policy",r.LEGAL_ADDRESS="legal_address",r.COOKIE_REFRESH="cookie_refresh",r.DATA_SECURITY_PRACTICES="data_security_practices",r.DATA_SHARED_WITH_THIRD_PARTIES="data_shared_with_third_parties",r.DATA_STEWARDS="data_stewards",r.DECLARATION_NAME="declaration_name",r.DOES_INTERNATIONAL_TRANSFERS="does_international_transfers",r.DPA_LOCATION="dpa_location",r.DESTINATIONS="egress",r.EXEMPT_FROM_PRIVACY_REGULATIONS="exempt_from_privacy_regulations",r.FEATURES="features",r.FIDES_KEY="fides_key",r.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING="flexible_legal_basis_for_processing",r.IMPACT_ASSESSMENT_LOCATION="impact_assessment_location",r.SOURCES="ingress",r.JOINT_CONTROLLER_INFO="joint_controller_info",r.LEGAL_BASIS_FOR_PROFILING="legal_basis_for_profiling",r.LEGAL_BASIS_FOR_TRANSFERS="legal_basis_for_transfers",r.LEGITIMATE_INTEREST_DISCLOSURE_URL="legitimate_interest_disclosure_url",r.PROCESSES_PERSONAL_DATA="processes_personal_data",r.REASON_FOR_EXEMPTION="reason_for_exemption",r.REQUIRES_DATA_PROTECTION_ASSESSMENTS="requires_data_protection_assessments",r.RESPONSIBILITY="responsibility",r.RETENTION_PERIOD="retention_period",r.SHARED_CATEGORIES="shared_categories",r.SPECIAL_CATEGORY_LEGAL_BASIS="special_category_legal_basis",r.THIRD_PARTIES="third_parties",r.COOKIES="cookies",r.USES_COOKIES="uses_cookies",r.USES_NON_COOKIE_ACCESS="uses_non_cookie_access",r.USES_PROFILING="uses_profiling",r.SYSTEM_UNDECLARED_DATA_CATEGORIES="system_undeclared_data_categories",r.DATA_USE_UNDECLARED_DATA_CATEGORIES="data_use_undeclared_data_categories",r.PROCESSES_SPECIAL_CATEGORY_DATA="processes_special_category_data",r.SYSTEM_GROUPS="system_groups",r.SYSTEM_GROUP="system_group_fides_key",r.SYSTEM_GROUP_DATA_USES="system_group_data_uses";let p={system_name:"System",data_uses:"Data use",data_categories:"Data categories",data_subjects:"Data subject",legal_name:"Legal name",dpo:"Data privacy officer",legal_basis_for_processing:"Legal basis for processing",administrating_department:"Administrating department",cookie_max_age_seconds:"Cookie max age seconds",privacy_policy:"Privacy policy",legal_address:"Legal address",cookie_refresh:"Cookie refresh",data_security_practices:"Data security practices",data_shared_with_third_parties:"Data shared with third parties",data_stewards:"Data stewards",declaration_name:"Declaration name",does_international_transfers:"Does international transfers",dpa_location:"DPA location",egress:"Destination",exempt_from_privacy_regulations:"Exempt from privacy regulations",features:"Features",fides_key:"Fides key",flexible_legal_basis_for_processing:"Flexible legal basis for processing",impact_assessment_location:"Impact assessment location",ingress:"Source",joint_controller_info:"Joint controller info",legal_basis_for_profiling:"Legal basis for profiling",legal_basis_for_transfers:"Legal basis for transfers",legitimate_interest_disclosure_url:"Legitimate interest disclosure URL",processes_personal_data:"Processes personal data",reason_for_exemption:"Reason for exemption",requires_data_protection_assessments:"Requires data protection assessments",responsibility:"Responsibility",retention_period:"Retention period",shared_categories:"Shared categories",special_category_legal_basis:"Special category legal basis",third_parties:"Third parties",system_undeclared_data_categories:"System undeclared data categories",data_use_undeclared_data_categories:"Data use undeclared data categories",cookies:"Cookies",uses_cookies:"Uses cookies",uses_non_cookie_access:"Uses non-cookie access",uses_profiling:"Uses profiling",processes_special_category_data:"Processes special category data",system_groups:"System groups",system_group_fides_key:"System group",system_group_data_uses:"Data uses"},m={[n.SYSTEM_UNDECLARED_DATA_CATEGORIES]:!1,[n.DATA_USE_UNDECLARED_DATA_CATEGORIES]:!1},E={dataUses:[],dataSubjects:[],dataCategories:[]},S=(0,o.createContext)({}),g=e=>{let{children:t}=e,[a,s]=(0,u._)(i.CUSTOM_REPORT_ID,""),[r,n]=(0,u._)(i.GROUP_BY,_.fI.SYSTEM_DATA_USE),[c,d]=(0,u._)(i.FILTERS,E),[p,g]=(0,u._)(i.COLUMN_ORDER,[]),[f,h]=(0,u._)(i.COLUMN_VISIBILITY,m),[A,T]=(0,u._)(i.COLUMN_SIZING,{}),[x,C]=(0,u._)(i.COLUMN_NAMES,{}),v=(0,o.useMemo)(()=>({savedCustomReportId:a,setSavedCustomReportId:s,groupBy:r,setGroupBy:n,selectedFilters:c,setSelectedFilters:d,columnOrder:p,setColumnOrder:g,columnVisibility:f,setColumnVisibility:h,columnSizing:A,setColumnSizing:T,columnNameMapOverrides:x,setColumnNameMapOverrides:C}),[a,s,r,n,c,d,p,g,f,h,A,T,x,C]);return(0,l.jsx)(S.Provider,{value:v,children:t})},f=()=>{let e=(0,o.useContext)(S);if(!e||0===Object.keys(e).length)throw Error("useDatamapReport must be used within a DatamapReportProvider");return e};var h=a(59003),A=a(92222),T=a(47935),x=a(20595),C=a(34090),v=a(66726),O=a.n(v),R=a(16134),y=a(34929),j=a(14048),b=a(19904),D=a(16394),I=a(38943),P=a(35258),N=e=>{let{children:t,heading:a,onCancel:s,onConfirm:r,isLoading:i,cancelButtonText:n,continueButtonText:o,"data-testid":c="standard-dialog",...d}=e,{onClose:u}=d;return(0,l.jsxs)(x.u_l,{closeOnOverlayClick:i,...d,children:[(0,l.jsx)(x.ZAr,{}),(0,l.jsxs)(x.hzk,{"data-testid":c,children:[a&&(0,l.jsx)(x.xBx,{children:a}),(0,l.jsx)(x.olH,{isDisabled:i,"data-testid":"standard-dialog-close-btn"}),t&&(0,l.jsx)(x.fef,{children:t}),(0,l.jsxs)(x.mzw,{gap:3,width:"100%",sx:{"& button":{width:"100%"}},children:[(0,l.jsx)(x.wpx,{onClick:()=>{s&&s(),u()},"data-testid":"".concat(c?"".concat(c,"-"):"","cancel-btn"),disabled:i,children:n||"Cancel"}),(0,l.jsx)(x.wpx,{onClick:r,type:"primary","data-testid":"".concat(c?"".concat(c,"-"):"","continue-btn"),loading:i,children:o||"Continue"})]})]})]})},M=a(22968),w=e=>{let[t,a]=(0,o.useState)(M.T2.csv),{onConfirm:s}=e;return(0,l.jsx)(N,{heading:"Export report",continueButtonText:"Download",size:"xl",...e,onConfirm:()=>s(t),"data-testid":"export-modal",children:(0,l.jsxs)(x.kCb,{direction:"column",gap:3,pb:3,children:[(0,l.jsx)(x.xvT,{textAlign:"left",children:"Export your data map report using the options below. Depending on the number of rows, the file may take a few minutes to process."}),(0,l.jsxs)(x.NIc,{children:[(0,l.jsx)(x.lXp,{htmlFor:"format",children:"Choose Format"}),(0,l.jsx)(x.WPr,{id:"format",value:t,onChange:a,"data-testid":"export-format-select",options:[{value:M.T2.csv,label:"CSV"},{value:M.T2.xlsx,label:"XLSX"}],className:"w-full"})]})]})})},U=a(624),L=a(30002),k=a(28079),G=a(5785),Y=a(90673);let F=e=>{let{label:t,children:a,...s}=e;return(0,l.jsxs)(x.Qdk,{...s,children:[(0,l.jsx)(x.X6q,{children:(0,l.jsxs)(x.KFZ,{height:"100%","data-testid":"filter-modal-accordion-button",textAlign:"left",fontWeight:600,children:[(0,l.jsx)(x.xuv,{flex:1,children:t}),(0,l.jsx)(x.XEm,{boxSize:7})]})}),(0,l.jsx)(x.Hk3,{children:a})]})},H=e=>{let{columnNameMap:t,selectedFilters:a,onFilterChange:s,onClose:r,...i}=e;(0,k.fd)(),(0,L.te)(),(0,G.MO)();let{dataUses:n,dataSubjects:c,dataCategories:d}=a,u=(0,R.C)(k.U3),_=(0,R.C)(L.ZL),p=(0,R.C)(G.qb),[m,E]=(0,o.useState)(n),[S,g]=(0,o.useState)(c),[f,h]=(0,o.useState)(d);(0,o.useEffect)(()=>{E(n)},[n]),(0,o.useEffect)(()=>{g(c)},[c]),(0,o.useEffect)(()=>{h(d)},[d]);let A=(0,o.useMemo)(()=>(0,Y.Cd)(u),[u]),T=(0,o.useMemo)(()=>(0,Y.Cd)(_),[_]),C=(0,o.useMemo)(()=>(0,Y.Cd)(p),[p]);return(0,l.jsx)(N,{heading:"Filter Datamap Report",...i,onCancel:()=>{E([]),g([]),h([]),s({dataUses:[],dataSubjects:[],dataCategories:[]}),r()},onConfirm:()=>{s({dataUses:m,dataSubjects:S,dataCategories:f}),r()},onClose:r,cancelButtonText:"Reset filters",continueButtonText:"Done","data-testid":"datamap-report-filter-modal",children:(0,l.jsxs)(x.UQy,{allowToggle:!0,children:[(0,l.jsx)(F,{label:t.data_uses,children:(0,l.jsx)(U.ZP,{nodes:A,selected:m,onSelected:E,"data-testid":"filter-modal-checkbox-tree-uses"})}),(0,l.jsx)(F,{label:t.data_categories,children:(0,l.jsx)(U.ZP,{nodes:C,selected:f,onSelected:h,"data-testid":"filter-modal-checkbox-tree-categories"})}),(0,l.jsx)(F,{label:t.data_subjects,children:(0,l.jsx)(U.ZP,{nodes:T,selected:S,onSelected:g,"data-testid":"filter-modal-checkbox-tree-subjects"})})]})})};var V=a(32885),z=a(69353),B=a(812);let{useGetMinimalCustomReportsQuery:Z,useLazyGetCustomReportByIdQuery:q,usePostCustomReportMutation:W,useDeleteCustomReportMutation:X}=a(78780).u.injectEndpoints({endpoints:e=>({getMinimalCustomReports:e.query({query:e=>{let{pageIndex:t=1,pageSize:a=50,report_type:s=_.C2.DATAMAP}=e,r="page=".concat(t,"&size=").concat(a,"&report_type=").concat(s);return{url:"plus/custom-report/minimal?".concat(r)}},providesTags:["Custom Reports"]}),getCustomReportById:e.query({query:e=>({url:"plus/custom-report/".concat(e)}),providesTags:(e,t,a)=>[{type:"Custom Reports",id:a}]}),postCustomReport:e.mutation({query:e=>({method:"POST",url:"plus/custom-report",body:e}),invalidatesTags:["Custom Reports"]}),deleteCustomReport:e.mutation({query:e=>({method:"DELETE",url:"plus/custom-report/".concat(e)}),invalidatesTags:["Custom Reports"]})})});var J=a(55484),K=a(40324);let Q="Report name",$=e=>{let{isOpen:t,handleClose:a,tableStateToSave:s,columnMapToSave:r={},unavailableNames:i,onCreateCustomReport:n}=e,c=(0,x.pmc)(),[d]=W(),u=(0,o.useMemo)(()=>J.Ry().shape({reportName:J.Z_().label(Q).required("Please provide a name for this report").test("is-unique","",async(e,t)=>null==i||!i.includes(e)||t.createError({message:"This name already exists"})).max(80,"Report name is too long (max 80 characters)")}),[i]),p=async e=>{var t;let i={};Object.entries(r).forEach(e=>{let[t,a]=e;i[t]={label:a,enabled:!0}}),Object.entries(null!==(t=null==s?void 0:s.columnVisibility)&&void 0!==t?t:{}).forEach(e=>{let[t,a]=e;i[t]||(i[t]={}),i[t].enabled=a});try{let t={name:e.trim(),type:_.C2.DATAMAP,config:{column_map:i,table_state:s}},r=await d(t);if((0,B.D4)(r))throw r.error;n(r.data),a()}catch(e){c({status:"error",description:(0,B.e$)(e,"A problem occurred while creating the report.")})}};return(0,l.jsxs)(x.u_l,{size:"lg",isOpen:t,onClose:a,motionPreset:"none",children:[(0,l.jsx)(x.ZAr,{}),(0,l.jsxs)(x.hzk,{children:[(0,l.jsx)(x.xBx,{pb:0,children:"Create a report"}),(0,l.jsx)(C.J9,{initialValues:{reportName:""},onSubmit:e=>p(e.reportName),onReset:a,validateOnBlur:!1,validationSchema:u,children:e=>{let{dirty:t,isValid:a}=e;return(0,l.jsxs)(C.l0,{"data-testid":"custom-report-form",children:[(0,l.jsxs)(x.fef,{children:[(0,l.jsx)(x.xvT,{fontSize:"sm",color:"gray.600",pb:6,children:"Customize and save your current filter settings for easy access in the future. This saved report will include the column layout and currently applied filter settings."}),(0,l.jsx)(K.j0,{id:"reportName",name:"reportName",isRequired:!0,label:Q,placeholder:"Enter a name for the report...",variant:"stacked",maxLength:80})]}),(0,l.jsxs)(x.mzw,{gap:2,children:[(0,l.jsx)(x.wpx,{size:"small",htmlType:"reset",children:"Cancel"}),(0,l.jsx)(x.wpx,{size:"small",disabled:!t||!a,type:"primary","data-testid":"custom-report-form-submit",htmlType:"submit",children:"Save"})]})]})}})]})]})},ee="Report",et="Reports",ea=e=>{var t;let{reportType:a,savedReportId:s,tableStateToSave:r,currentColumnMap:i,onCustomReportSaved:n,onSavedReportDeleted:c}=e,d=(0,b.Tg)([_.Sh.CUSTOM_REPORT_CREATE]),u=(0,b.Tg)([_.Sh.CUSTOM_REPORT_DELETE]),p=(0,x.pmc)({id:"custom-report-toast"}),{data:m,isLoading:E}=Z({report_type:a}),[S,g]=(0,o.useState)(),[f]=q(),[h]=X(),{isOpen:A,onOpen:T,onClose:v}=(0,x.qY0)(),{isOpen:O,onOpen:R,onClose:y}=(0,x.qY0)(),{isOpen:j,onOpen:D,onClose:I}=(0,x.qY0)(),[P,N]=(0,o.useState)(),[M,w]=(0,o.useState)(),[U,L]=(0,o.useState)(),[k,G]=(0,o.useState)(!1),{resetForm:Y}=(0,C.u6)(),F=(0,o.useMemo)(()=>{var e;let t=null==m?void 0:null===(e=m.items.find(e=>e.id===s))||void 0===e?void 0:e.name;return null!=t?t:et},[null==m?void 0:m.items,s]),H=!E&&!(null==m?void 0:null===(t=m.items)||void 0===t?void 0:t.length),V=e=>{g(null==m?void 0:m.items.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())))},z=async e=>{N(e);let{data:t,isError:a,error:s}=await f(e);if(a){let e=(0,B.e$)(s,"A problem occurred while fetching the ".concat(ee,"."));e.includes("not found")&&c(),p({status:"error",description:e})}else w(t)},W=()=>{N(""),w(void 0),G(!1)},J=()=>{M?(G(!1),M.id!==s&&n(M,Y),v()):P?G(!0):(n(null,Y),v())},K=async e=>{e===(null==M?void 0:M.id)&&(W(),c()),h(e)};(0,o.useEffect)(()=>{m&&g(m.items)},[m]),(0,o.useEffect)(()=>{k&&(G(!1),J())},[M]),(0,o.useEffect)(()=>{s?z(s):W()},[s]),(0,o.useEffect)(()=>{U&&D()},[D,U]);let Q=!M&&!s||(null==M?void 0:M.id)===s,ea=(0,l.jsx)("div",{"data-testid":"custom-reports-popover",children:(0,l.jsx)(C.J9,{initialValues:{},onSubmit:J,onReset:W,children:(0,l.jsxs)(C.l0,{children:[(0,l.jsxs)("div",{className:"relative p-3",style:{borderBottom:"var(--ant-popover-title-border-bottom)"},children:[(0,l.jsx)(x.wpx,{size:"small",disabled:H,htmlType:"reset",className:"absolute left-3 top-3","data-testid":"custom-reports-reset-button",children:"Reset"}),(0,l.jsx)(x.wpx,{type:"text",size:"small",icon:(0,l.jsx)(x.PJP.x8P,{}),className:"absolute right-3 top-3",onClick:()=>{s?z(s):W(),v()},"data-testid":"custom-report-popover-cancel"}),(0,l.jsx)("div",{className:"text-center",style:{color:"var(--ant-color-text-heading)",fontWeight:"var(--ant-font-weight-strong)"},children:et}),(0,l.jsx)("div",{className:"mt-3",children:(0,l.jsx)(x.uFc,{size:"small",placeholder:"Search...",onChange:e=>V(e.target.value)})})]}),(0,l.jsxs)("div",{className:"px-5 pb-1 pt-3",children:[H&&(0,l.jsx)(x.oj8,{image:(0,l.jsx)(x.wpx,{type:"primary",shape:"circle",size:"small","aria-label":"add ".concat(ee),icon:(0,l.jsx)(x.PJP.mm_,{}),onClick:R,"data-testid":"add-report-button"}),description:"No ".concat(et.toLowerCase()," have been created. Start by applying your preferred filter and column settings, then create a ").concat(ee.toLowerCase()," for easy access later."),styles:{image:{height:"24px"}},"data-testid":"custom-reports-empty-state"}),!H&&(E?(0,l.jsx)(x.N_L,{active:!0,paragraph:{rows:3,width:"100%"},title:!1,className:"pt-2"}):(0,l.jsx)(x.y02.Group,{onChange:e=>z(e.target.value),value:P,style:{width:"100%"},children:(0,l.jsx)(x.vyj,{direction:"vertical",className:"w-full",size:"small",children:null==S?void 0:S.map(e=>(0,l.jsxs)(x.jqI,{justify:u?"space-between":"flex-start",align:"center",children:[(0,l.jsx)(x.y02,{value:e.id,name:"custom-report-id","data-testid":"custom-report-item",children:e.name}),u&&(0,l.jsx)(x.wpx,{type:"text",size:"small",icon:(0,l.jsx)(x.PJP.ZNm,{}),onClick:()=>L(e),"data-testid":"delete-report-button"})]},e.id))})}))]}),(0,l.jsxs)(x.jqI,{className:"px-5 py-4",gap:"small",children:[d&&r&&(0,l.jsxs)(x.wpx,{size:"small",onClick:R,className:"flex-1 gap-1 pl-0","data-testid":"create-report-button",htmlType:"button",icon:(0,l.jsx)(x.PJP.mm_,{}),iconPosition:"start",children:["Create ",ee.toLowerCase()]}),(0,l.jsx)(x.wpx,{size:"small",type:"primary",loading:k,disabled:Q,className:"flex-1","data-testid":"apply-report-button",htmlType:"submit",children:"Apply"})]})]})})});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.bPF,{content:ea,trigger:"click",placement:"bottomRight",open:A,onOpenChange:e=>{e?T():J()},styles:{root:{width:"320px","--ant-popover-inner-content-padding":"0"}},zIndex:1400,children:(0,l.jsx)(x.wpx,{className:"max-w-40",icon:(0,l.jsx)(x.v4q,{}),iconPosition:"end","data-testid":"custom-reports-trigger",children:(0,l.jsx)(x.lKn,{ellipsis:!0,children:F})})}),(0,l.jsx)($,{isOpen:O,handleClose:()=>{y(),setTimeout(()=>{T()},100)},tableStateToSave:r,columnMapToSave:i,unavailableNames:null==m?void 0:m.items.map(e=>e.name),onCreateCustomReport:e=>n(e,Y)}),(0,l.jsx)(x.cVQ,{isOpen:j,onClose:()=>{L(void 0),I()},onConfirm:()=>{U&&K(U.id),I()},title:"Delete ".concat(ee),message:(0,l.jsxs)(x.lKn,{children:["You are about to permanently delete the"," ",ee.toLowerCase()," named"," ",(0,l.jsx)("strong",{children:null==U?void 0:U.name}),". Are you sure you would like to continue?"]})})]})};var es=a(19785),er=a.n(es),ei=a(55807),en=a.n(ei),el=a(32526),eo=a.n(el),ec=a(26070),ed=a(72625),eu=a(43862),e_=a(22583);let ep=(0,A.Cl)(),em=(e,t)=>({cell:e=>(0,l.jsx)(T.G3,{value:e.getValue()}),header:a=>{let s={};return Object.keys(e).forEach(t=>{"string"==typeof e[t]?s[t]=e[t]:e[t].label&&(s[t]=e[t].label||"")}),(0,l.jsx)(ed.Hm,{value:(0,eu.AH)({columnId:a.column.id,columnNameMap:s}),defaultValue:p[a.column.id]||(0,eu.AH)({columnId:a.column.id}),isEditing:t,...a})}}),eE=(e,t)=>{var a;let s=(null==e?void 0:null===(a=e.items)||void 0===a?void 0:a.length)?Object.keys(e.items[0]):[],r=Object.values(n);return s.filter(e=>!r.includes(e)).filter(e=>e.startsWith("privacy_declaration_")||e.startsWith("system_")).map(e=>{let a=t.find(t=>e.includes(eo()(t.name)));return ep.accessor(t=>t[e],{id:e,cell:e=>Array.isArray(e.getValue())?(0,l.jsx)(T.WP,{value:e.getValue(),ignoreZero:!0,...e}):(0,l.jsx)(T.G3,{value:e.getValue()}),meta:{showHeaderMenu:(null==a?void 0:a.field_type)==="string[]"}})})},eS=e=>{let{onSelectRow:t,getDataUseDisplayName:a,getDataCategoryDisplayName:s,getDataSubjectDisplayName:r,datamapReport:i,customFields:o,systemGroups:c=[],isRenaming:d=!1,groupBy:u}=e,p=eE(i,o),m=e=>{let t=c.find(t=>t.fides_key===e);return(null==t?void 0:t.label_color)?e_.j[t.label_color]:void 0},E=e=>{if(e&&0!==e.length&&1===e.length)return m(e[0])},S=[ep.accessor(e=>e.system_name,{enableGrouping:!0,id:n.SYSTEM_NAME,meta:{onCellClick:t}}),ep.accessor(e=>e.data_uses,{id:n.DATA_USE,cell:e=>{let t=e.getValue();return(0,l.jsx)(T.WP,{suffix:"data uses",ignoreZero:!0,value:er()(t)?en()(t,a):a(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto"}}),ep.accessor(e=>e.data_categories,{id:n.DATA_CATEGORY,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,l.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.data_subjects,{id:n.DATA_SUBJECT,cell:e=>{let t=e.getValue();return(0,l.jsx)(T.WP,{suffix:"data subjects",ignoreZero:!0,value:er()(t)?en()(t,r):r(t||""),tagProps:{color:"white"},...e})},meta:{showHeaderMenu:!d}}),ep.accessor(e=>e.legal_name,{id:n.LEGAL_NAME}),ep.accessor(e=>e.dpo,{id:n.DPO}),ep.accessor(e=>e.legal_basis_for_processing,{id:n.LEGAL_BASIS_FOR_PROCESSING}),ep.accessor(e=>e.administrating_department,{id:n.ADMINISTRATING_DEPARTMENT}),ep.accessor(e=>e.cookie_max_age_seconds,{id:n.COOKIE_MAX_AGE_SECONDS}),ep.accessor(e=>e.privacy_policy,{id:n.PRIVACY_POLICY}),ep.accessor(e=>e.legal_address,{id:n.LEGAL_ADDRESS}),ep.accessor(e=>e.cookie_refresh,{id:n.COOKIE_REFRESH}),ep.accessor(e=>e.data_security_practices,{id:n.DATA_SECURITY_PRACTICES}),ep.accessor(e=>e.data_shared_with_third_parties,{id:n.DATA_SHARED_WITH_THIRD_PARTIES}),ep.accessor(e=>e.processes_special_category_data,{id:n.PROCESSES_SPECIAL_CATEGORY_DATA}),ep.accessor(e=>e.data_stewards,{id:n.DATA_STEWARDS,cell:e=>(0,l.jsx)(T.WP,{suffix:"data stewards",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.declaration_name,{id:n.DECLARATION_NAME}),ep.accessor(e=>e.does_international_transfers,{id:n.DOES_INTERNATIONAL_TRANSFERS}),ep.accessor(e=>e.dpa_location,{id:n.DPA_LOCATION}),ep.accessor(e=>e.egress,{id:n.DESTINATIONS,cell:e=>(0,l.jsx)(T.WP,{suffix:"destinations",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.exempt_from_privacy_regulations,{id:n.EXEMPT_FROM_PRIVACY_REGULATIONS}),ep.accessor(e=>e.features,{id:n.FEATURES,cell:e=>(0,l.jsx)(T.WP,{suffix:"features",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.fides_key,{id:n.FIDES_KEY}),ep.accessor(e=>e.flexible_legal_basis_for_processing,{id:n.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING}),ep.accessor(e=>e.impact_assessment_location,{id:n.IMPACT_ASSESSMENT_LOCATION}),ep.accessor(e=>e.ingress,{id:n.SOURCES,cell:e=>(0,l.jsx)(T.WP,{suffix:"sources",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.joint_controller_info,{id:n.JOINT_CONTROLLER_INFO}),ep.accessor(e=>e.legal_basis_for_profiling,{id:n.LEGAL_BASIS_FOR_PROFILING,cell:e=>(0,l.jsx)(T.WP,{suffix:"profiles",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.legal_basis_for_transfers,{id:n.LEGAL_BASIS_FOR_TRANSFERS,cell:e=>(0,l.jsx)(T.WP,{suffix:"transfers",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.legitimate_interest_disclosure_url,{id:n.LEGITIMATE_INTEREST_DISCLOSURE_URL}),ep.accessor(e=>e.processes_personal_data,{id:n.PROCESSES_PERSONAL_DATA}),ep.accessor(e=>e.reason_for_exemption,{id:n.REASON_FOR_EXEMPTION}),ep.accessor(e=>e.requires_data_protection_assessments,{id:n.REQUIRES_DATA_PROTECTION_ASSESSMENTS}),ep.accessor(e=>e.responsibility,{id:n.RESPONSIBILITY,cell:e=>(0,l.jsx)(T.WP,{suffix:"responsibilities",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.retention_period,{id:n.RETENTION_PERIOD}),ep.accessor(e=>e.shared_categories,{id:n.SHARED_CATEGORIES,cell:e=>(0,l.jsx)(T.WP,{suffix:"shared categories",ignoreZero:!0,value:e.getValue(),tagProps:{color:"white"},...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.special_category_legal_basis,{id:n.SPECIAL_CATEGORY_LEGAL_BASIS}),ep.accessor(e=>e.third_parties,{id:n.THIRD_PARTIES}),ep.accessor(e=>e.system_undeclared_data_categories,{id:n.SYSTEM_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,l.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.data_use_undeclared_data_categories,{id:n.DATA_USE_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,l.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.cookies,{id:n.COOKIES,cell:e=>(0,l.jsx)(T.WP,{ignoreZero:!0,suffix:"cookies",value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.uses_cookies,{id:n.USES_COOKIES}),ep.accessor(e=>e.uses_non_cookie_access,{id:n.USES_NON_COOKIE_ACCESS}),ep.accessor(e=>e.uses_profiling,{id:n.USES_PROFILING}),ep.accessor(e=>e.system_groups,{id:n.SYSTEM_GROUPS,cell:e=>{let t=e.getValue();if(!t||Array.isArray(t)&&0===t.length)return null;let a=(Array.isArray(t)?t:[t]).map(e=>{let t=c.find(t=>t.fides_key===e);return{label:(null==t?void 0:t.name)||e,key:e,tagProps:{color:(null==t?void 0:t.label_color)?e_.j[t.label_color]:"default",bordered:!1}}});return(0,l.jsx)(ec.Q,{values:a})},meta:{width:"auto"}}),...p],g=[];return u===_.fI.SYSTEM_GROUP&&g.push(ep.accessor(e=>e.system_group_fides_key,{id:n.SYSTEM_GROUP,cell:e=>{var t;let a=e.getValue();if(!a||Array.isArray(a)&&0===a.length)return null;let s=Array.isArray(a)?a.map(e=>{var t;return(null===(t=c.find(t=>t.fides_key===e))||void 0===t?void 0:t.name)||e}):[(null===(t=c.find(e=>e.fides_key===a))||void 0===t?void 0:t.name)||a],r=E(Array.isArray(a)?a:[a]);return(0,l.jsx)(T.WP,{suffix:"system group",ignoreZero:!0,value:s,tagProps:{color:r||"white",bordered:!1},...e})},meta:{width:"auto",showHeaderMenu:!d}}),ep.accessor(e=>e.system_group_data_uses,{id:n.SYSTEM_GROUP_DATA_USES,cell:e=>{let t=e.getValue();return!t||Array.isArray(t)&&0===t.length?null:(0,l.jsx)(T.WP,{suffix:"data uses",ignoreZero:!0,value:er()(t)?en()(t,a):a(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto",showHeaderMenu:!d}})),[...S,...g]},eg=e=>{let{columnNameMapOverrides:t,setColumnNameMapOverrides:a,setSavedCustomReportId:s,setIsRenamingColumns:r}=e,{submitForm:i,resetForm:n}=(0,C.u6)();return(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(x.wpx,{size:"small","data-testid":"rename-columns-reset-btn",onClick:()=>{a({}),s(""),n({values:{}}),r(!1)},children:"Reset all"}),(0,l.jsx)(x.wpx,{size:"small","data-testid":"rename-columns-cancel-btn",onClick:()=>{n({values:t}),r(!1)},children:"Cancel"}),(0,l.jsx)(x.wpx,{size:"small",type:"primary",htmlType:"submit","data-testid":"rename-columns-apply-btn",onClick:i,children:"Apply"})]})},ef=e=>{switch(e){case _.fI.DATA_USE_SYSTEM:return[n.DATA_USE];case _.fI.SYSTEM_GROUP:return[n.SYSTEM_GROUP];default:return[n.SYSTEM_NAME]}},eh=e=>{let t=[];return _.fI.SYSTEM_DATA_USE===e&&(t=[n.SYSTEM_NAME,n.DATA_USE]),_.fI.DATA_USE_SYSTEM===e&&(t=[n.DATA_USE,n.SYSTEM_NAME]),_.fI.SYSTEM_GROUP===e&&(t=[n.SYSTEM_GROUP,n.SYSTEM_GROUP_DATA_USES,n.SYSTEM_NAME,n.DATA_USE]),t},eA=(e,t)=>{let a=eh(e),s=new Set(a);return[...a,...t.filter(e=>!s.has(e))]},eT={items:[],total:0,page:1,size:25,pages:1},ex=()=>{let e=(0,b.Tg)([_.Sh.CUSTOM_REPORT_READ]),{isLoading:t}=(0,V.x8)(),{data:a}=(0,z.QD)(),{PAGE_SIZES:s,pageSize:r,setPageSize:c,onPreviousPageClick:d,isPreviousPageDisabled:u,onNextPageClick:S,isNextPageDisabled:g,startRange:v,endRange:N,pageIndex:M,setTotalPages:U,resetPageIndexToDefault:L}=(0,T.oi)(),k=(0,x.pmc)({id:"datamap-report-toast"}),{isOpen:G,onClose:Y,onOpen:F}=(0,x.qY0)(),{getDataUseDisplayName:B,getDataCategoryDisplayName:Z,getDataSubjectDisplayName:q,isLoading:W}=(0,y.Z)(),[X,J]=(0,o.useState)(),{savedCustomReportId:K,setSavedCustomReportId:Q,groupBy:$,setGroupBy:ee,selectedFilters:et,setSelectedFilters:es,columnOrder:er,setColumnOrder:ei,columnVisibility:en,setColumnVisibility:el,columnSizing:eo,setColumnSizing:ec,columnNameMapOverrides:ed,setColumnNameMapOverrides:eu}=f(),[e_,ep]=(0,o.useState)(!1),eE=e=>{Q(""),ee(e),ep(!0),L()},[ex,eC]=(0,o.useState)(""),ev=(0,o.useCallback)(e=>{L(),eC(e)},[L,eC]),eO={pageIndex:M,pageSize:r,groupBy:$,search:ex,dataUses:(0,D.du)(et.dataUses,"data_uses"),dataSubjects:(0,D.du)(et.dataSubjects,"data_subjects"),dataCategories:(0,D.du)(et.dataCategories,"data_categories")},{data:eR,isLoading:ey,isFetching:ej}=(0,I.tH)(eO),[eb,{isLoading:eD,isError:eI}]=(0,I.Eo)(),{data:eP,totalRows:eN}=(0,o.useMemo)(()=>{let e=eR||eT,t=e.items;return e_&&ep(!1),U(e.pages),{totalRows:e.total,data:t}},[eR]);(0,V.GH)();let eM=(0,R.C)(V.fN),[ew,eU]=(0,o.useState)(!1),eL=(0,o.useMemo)(()=>eR?eS({onSelectRow:e=>J(e.fides_key),getDataUseDisplayName:B,getDataCategoryDisplayName:Z,getDataSubjectDisplayName:q,datamapReport:eR,customFields:eM,systemGroups:a,isRenaming:ew,groupBy:$}):[],[B,q,Z,eR,eM,a,ew,$]),{isOpen:ek,onOpen:eG,onClose:eY}=(0,x.qY0)(),{isOpen:eF,onOpen:eH,onClose:eV}=(0,x.qY0)(),ez=(0,h.b7)({getCoreRowModel:(0,A.sC)(),getGroupedRowModel:(0,A.qe)(),getExpandedRowModel:(0,A.rV)(),manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onChange",columns:eL,defaultColumn:em({...p,...ed},ew),data:eP,initialState:{expanded:!0,columnSizing:eo,columnOrder:er,columnVisibility:en,grouping:ef($)}});(0,o.useEffect)(()=>{$&&ez&&eR&&(0===ez.getState().columnOrder.length?ei(eA($,ez.getAllColumns().map(e=>e.id))):ei(eA($,ez.getState().columnOrder)))},[$,ez,eR]),(0,o.useEffect)(()=>{let e=ef($);eR&&ez.setGrouping(e)},[eR]);let eB=(0,o.useMemo)(()=>O()(ec,300),[ec]);(0,o.useEffect)(()=>{let e=ez.getState().columnSizing;e&&eB(e)},[ez.getState().columnSizing]);let eZ=()=>ed[n.SYSTEM_GROUP]||"System group",eq=(e,t)=>{if(e||K){if(!e){try{Q(""),el(m),ez.toggleAllColumnsVisible(!0),ez.setColumnVisibility(m),ei([]),ez.setColumnOrder([]),ee(_.fI.SYSTEM_DATA_USE),es(E),eu({}),t({values:{}})}catch(e){k({status:"error",description:"There was a problem resetting the report."})}return}try{var a,s,r,i;if(null===(a=e.config)||void 0===a?void 0:a.table_state){let{groupBy:t,filters:a,columnOrder:s}=e.config.table_state,i={};Object.entries(null!==(r=e.config.column_map)&&void 0!==r?r:{}).forEach(e=>{let[t,a]=e;i[t]=a.enabled||!1}),t&&ee(t),a&&es(a),s&&(ei(s),ez.setColumnOrder(s)),i&&(el(i),ez.setColumnVisibility(i))}if(null===(s=e.config)||void 0===s?void 0:s.column_map){let a={};Object.entries(null!==(i=e.config.column_map)&&void 0!==i?i:{}).forEach(e=>{let[t,s]=e;s.label&&(a[t]=s.label)}),eu(a),t({values:a})}Q(e.id),k({status:"success",description:"Report applied successfully."})}catch(e){k({status:"error",description:"There was a problem applying report."})}}};return ey||t||W?(0,l.jsx)(T.I4,{rowHeight:36,numRows:15}):(0,l.jsxs)(x.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,l.jsx)(H,{columnNameMap:{...p,...ed},selectedFilters:et,isOpen:G,onClose:Y,onFilterChange:e=>{Q(""),es(e)}}),(0,l.jsx)(T.F1,{isOpen:ek,onClose:eY,headerText:"Columns",columnNameMap:{...p,...ed},prefixColumns:eh($),tableInstance:ez,savedCustomReportId:K,onColumnOrderChange:e=>{Q(""),ez.setColumnOrder(e),ei(e)},onColumnVisibilityChange:e=>{Q(""),ez.setColumnVisibility(e),el(e)}}),(0,l.jsx)(w,{isOpen:eF,onClose:eV,onConfirm:e=>{let t={};Object.entries(en).forEach(e=>{let[a,s]=e;t[a]={enabled:s}}),Object.entries(ed).forEach(e=>{let[a,s]=e;if(t[a])t[a].label=s;else{var r;t[a]={label:s,enabled:null===(r=en[a])||void 0===r||r}}}),eb({...eO,format:e,report_id:K,report:{name:"",type:"datamap",config:{column_map:t,table_state:{groupBy:$,filters:et,columnOrder:er}}}}).then(()=>{eI||eV()})},isLoading:eD}),(0,l.jsx)(C.J9,{initialValues:ed,onSubmit:e=>{Q(""),eu(e),eU(!1)},children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(T.Q$,{children:[(0,l.jsx)(T.HO,{globalFilter:ex,setGlobalFilter:ev,placeholder:"System name, Fides key, or ID"}),(0,l.jsxs)(x.kCb,{alignItems:"center",gap:2,children:[e&&(0,l.jsx)(ea,{reportType:_.C2.DATAMAP,savedReportId:K,tableStateToSave:{groupBy:$,filters:et,columnOrder:er,columnVisibility:en},currentColumnMap:ed,onCustomReportSaved:(e,t)=>eq(e,t),onSavedReportDeleted:()=>{Q("")}}),(0,l.jsxs)(x.v2r,{children:[(0,l.jsxs)(x.j2t,{as:x.wpx,icon:(0,l.jsx)(x.v4q,{}),iconPosition:"end",loading:e_,"data-testid":"group-by-menu",children:["Group by ",(()=>{switch($){case _.fI.SYSTEM_DATA_USE:return"system";case _.fI.DATA_USE_SYSTEM:return"data use";case _.fI.SYSTEM_GROUP:{let e=eZ();return e.charAt(0).toLowerCase()+e.slice(1)}default:return"system"}})()]}),(0,l.jsxs)(x.qyq,{zIndex:11,"data-testid":"group-by-menu-list",children:[(0,l.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.SYSTEM_DATA_USE)},isChecked:_.fI.SYSTEM_DATA_USE===$,value:_.fI.SYSTEM_DATA_USE,"data-testid":"group-by-system-data-use",children:"System"}),(0,l.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.DATA_USE_SYSTEM)},isChecked:_.fI.DATA_USE_SYSTEM===$,value:_.fI.DATA_USE_SYSTEM,"data-testid":"group-by-data-use-system",children:"Data use"}),(0,l.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.SYSTEM_GROUP)},isChecked:_.fI.SYSTEM_GROUP===$,value:_.fI.SYSTEM_GROUP,"data-testid":"group-by-system-group",children:eZ()})]})]}),(0,l.jsx)(x.wpx,{"data-testid":"filter-multiple-systems-btn",onClick:F,children:"Filter"}),(0,l.jsx)(x.wpx,{"aria-label":"Export report","data-testid":"export-btn",onClick:eH,icon:(0,l.jsx)(j.nM,{ml:"1.5px"})}),(0,l.jsxs)(x.v2r,{placement:"bottom-end",children:[(0,l.jsx)(x.j2t,{as:x.wpx,icon:(0,l.jsx)(x.nXP,{className:"rotate-90"}),"data-testid":"more-menu","aria-label":"More options",className:"w-6 gap-0"}),(0,l.jsxs)(x.qyq,{"data-testid":"more-menu-list",children:[(0,l.jsx)(x.sNh,{onClick:eG,"data-testid":"edit-columns-btn",children:"Edit columns"}),(0,l.jsx)(x.sNh,{onClick:()=>eU(!0),"data-testid":"rename-columns-btn",children:"Rename columns"})]})]}),ew&&(0,l.jsx)(eg,{columnNameMapOverrides:ed,setColumnNameMapOverrides:eu,setSavedCustomReportId:Q,setIsRenamingColumns:eU})]})]}),(0,l.jsx)(C.l0,{children:(0,l.jsx)(T.ZK,{tableInstance:ez,columnExpandStorageKey:i.COLUMN_EXPANSION_STATE,columnWrapStorageKey:i.WRAPPING_COLUMNS})})]})}),(0,l.jsx)(T.s8,{totalRows:eN||0,pageSizes:s,setPageSize:c,onPreviousPageClick:d,isPreviousPageDisabled:u||ej,onNextPageClick:S,isNextPageDisabled:g||ej,startRange:v,endRange:N}),(0,l.jsx)(P.Z,{selectedSystemId:X,resetSelectedSystemId:()=>J(void 0)})]})};var eC=()=>(0,l.jsxs)(c.Z,{title:"Datamap Report",children:[(0,l.jsx)(d.Z,{"data-testid":"datamap-report-heading",heading:"Data map report"}),(0,l.jsx)(g,{children:(0,l.jsx)(ex,{})})]})}},function(e){e.O(0,[431,8765,9278,5163,9187,7245,9899,5258,2888,9774,179],function(){return e(e.s=86548)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5135],{77713:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent/[configuration_id]/[purpose_id]",function(){return i(80758)}])},59301:function(e,t,i){"use strict";var r=i(24246);let{Link:n}=i(20595).AntTypography;t.Z=e=>(0,r.jsx)(n,{target:"_blank",rel:"noopener noreferrer",...e})},35287:function(e,t,i){"use strict";var r=i(24246),n=i(20595),s=i(88038),o=i.n(s);i(27378),t.Z=e=>{let{children:t,title:i,mainProps:s}=e;return(0,r.jsxs)(n.kCb,{"data-testid":i,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,r.jsxs)(o(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsx)(n.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:t})]})}},58754:function(e,t,i){"use strict";var r=i(24246),n=i(20595),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:o=!0,children:d,rightContent:l,style:a,...c}=e;return(0,r.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...a}:{paddingBottom:"24px",...a},children:[(0,r.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(n.lQT,{className:i||d?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!i&&(0,r.jsx)(s.m,{className:d?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),d]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return a}});var r=i(24246),n=i(20595),s=i(34090),o=i(27378),d=i(46238),l=i(40324);let a=e=>{let{name:t,label:i,labelProps:a,tooltip:c,isRequired:u,layout:p="inline",helperText:h,...v}=e,[_,m,{setValue:x}]=(0,s.U$)(t),f=!!(m.touched&&m.error),[g,R]=(0,o.useState)("");_.value||"tags"!==v.mode&&"multiple"!==v.mode||(_.value=[]),"tags"===v.mode&&"string"==typeof _.value&&(_.value=[_.value]);let j="tags"===v.mode?(e,t)=>e?e.value!==g||_.value.includes(g)?v.optionRender?v.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:v.optionRender||void 0,I=e=>{R(e),v.onSearch&&v.onSearch(e)},E=(e,t)=>{x(e),v.onChange&&v.onChange(e,t)};return"inline"===p?(0,r.jsx)(n.NIc,{isInvalid:f,isRequired:u,children:(0,r.jsxs)(n.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,r.jsx)(l.__,{htmlFor:v.id||t,...a,children:i}):null,(0,r.jsxs)(n.jqI,{align:"center",children:[(0,r.jsxs)(n.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(n.WPr,{..._,id:v.id||t,"data-testid":"controlled-select-".concat(_.name),...v,optionRender:j,onSearch:"tags"===v.mode?I:void 0,onChange:E,value:_.value||void 0,status:f?"error":void 0}),h&&(0,r.jsx)(n.Q6r,{children:h}),(0,r.jsx)(l.Bc,{isInvalid:f,message:m.error,fieldName:_.name})]}),(0,r.jsx)(d.b,{label:c,className:f?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(n.NIc,{isInvalid:f,isRequired:u,children:(0,r.jsxs)(n.gCW,{alignItems:"start",children:[(0,r.jsxs)(n.jqI,{align:"center",children:[i?(0,r.jsx)(l.__,{htmlFor:v.id||t,fontSize:"xs",my:0,mr:1,...a,children:i}):null,(0,r.jsx)(d.b,{label:c})]}),(0,r.jsx)(n.WPr,{..._,id:v.id||t,"data-testid":"controlled-select-".concat(_.name),...v,optionRender:j,onSearch:"tags"===v.mode?I:void 0,onChange:E,value:_.value||void 0,status:f?"error":void 0}),h&&(0,r.jsx)(n.Q6r,{style:{marginTop:0},children:h}),(0,r.jsx)(l.Bc,{isInvalid:f,message:m.error,fieldName:_.name})]})})}},8133:function(e,t,i){"use strict";var r=i(24246),n=i(20595);t.Z=e=>{let{title:t,children:i,isOpen:s,onClose:o,modalContentProps:d,showCloseButton:l=!1,footer:a,...c}=e;return(0,r.jsxs)(n.u_l,{isOpen:s,onClose:o,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,r.jsx)(n.ZAr,{}),(0,r.jsxs)(n.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...d,children:[l&&(0,r.jsx)(n.olH,{}),(0,r.jsx)(n.xBx,{p:0,children:(0,r.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,r.jsx)(n.X6q,{as:"h3",size:"sm",children:t})})}),(0,r.jsx)(n.fef,{pb:4,overflow:"auto",children:i}),a&&(0,r.jsx)(n.mzw,{children:a})]})]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return a}});var r=i(24246),n=i(20595),s=i(79894),o=i.n(s),d=i(27378);let{Text:l}=n.AntTypography,a=e=>{let{items:t,...i}=e,s=(0,d.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,d={...e},a=d.onClick&&!d.href;return("string"==typeof d.title&&(d.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,id:s?"breadcrumb-current-page":void 0,children:d.title})),a)?d.title=(0,r.jsx)(n.wpx,{type:"text",size:"small",icon:d.icon,onClick:d.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:d.title}):(d.icon&&(d.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:d.icon}),d.title]})),d.href&&d.title&&(d.title=(0,r.jsx)(o(),{href:d.href,className:"ant-breadcrumb-link",children:d.title}),delete d.href)),d}),[t]);return(0,r.jsx)(n.zrq,{items:s,...i})}},6675:function(e,t,i){"use strict";i.d(t,{ZS:function(){return d},a4:function(){return s}});var r=i(3228);let n=i(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:s}=n,o={purposes:{},special_purposes:{}},d=(0,r.P1)(n.endpoints.getPurposes.select(),e=>{let{data:t}=e;return t||o})},51263:function(e,t,i){"use strict";var r=i(24246),n=i(20595);t.Z=e=>{let{title:t,children:i,...s}=e;return(0,r.jsxs)(n.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(t),...s,children:[(0,r.jsx)(n.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:t}),i]})}},59512:function(e,t,i){"use strict";i.d(t,{Cu:function(){return d},Py:function(){return n},fj:function(){return o},uh:function(){return s}});var r=i(85054);let n=[1,3,4,5,6],s="https://ethyca.com/docs/tutorials/consent-management/consent-management-configuration/configure-tcf#vendor-overrides",o={[r.FF.PURPOSE_RESTRICTION]:"Purpose restriction",[r.FF.REQUIRE_CONSENT]:"Require consent",[r.FF.REQUIRE_LEGITIMATE_INTEREST]:"Require legitimate interest"},d={[r.PY.RESTRICT_ALL_VENDORS]:"Restrict all vendors",[r.PY.RESTRICT_SPECIFIC_VENDORS]:"Restrict specific vendors",[r.PY.ALLOW_SPECIFIC_VENDORS]:"Allow specific vendors"}},80758:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Z}});var r=i(24246),n=i(20595),s=i(86677),o=i(27378),d=i(59301),l=i(35287),a=i(58754),c=i(6675),u=i(51263),p=i(59512),h=i(59003),v=i(92222),_=i(47935),m=i(85054),x=i(34090),f=i(55484),g=i(97181),R=i(812),j=i(8133),I=i(46628),E=i(52955);let y=e=>{if(/^\d+$/.test(e))return!0;let t=e.match(/^(\d+)-(\d+)$/);return!!t&&parseInt(t[1],10)<parseInt(t[2],10)},C=e=>{if(/^\d+$/.test(e)){let t=parseInt(e,10);return{start:t,end:t}}let t=e.match(/^(\d+)-(\d+)$/);return t?{start:parseInt(t[1],10),end:parseInt(t[2],10)}:null},T=(e,t)=>e.end===e.start?e.start>=t.start&&(null===t.end||e.start<=t.end):t.end===t.start?t.start>=e.start&&(null===e.end||t.start<=e.end):null===e.end&&null!==t.end?e.start<=t.end:null===t.end&&null!==e.end?t.start<=e.end:null===e.end&&null===t.end||e.start<=t.end&&e.end>=t.start||t.start<=e.end&&t.end>=e.start,b=(e,t)=>e.end===e.start?e.start>=t.start&&(null===t.end||e.start<=t.end):null===t.end?e.start>=t.start:null!==e.end&&e.start>=t.start&&e.end<=t.end,S=(e,t,i,r)=>{var n;let s=t.filter(e=>e.purpose_id===i&&e.id!==r);if(!(null===(n=e.vendor_ids)||void 0===n?void 0:n.length))return!1;let o=e.vendor_ids.map(C).filter(e=>null!==e);return 0!==o.length&&s.some(t=>{let i=e.vendor_restriction===m.PY.RESTRICT_SPECIFIC_VENDORS&&t.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS||e.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS&&t.vendor_restriction===m.PY.RESTRICT_SPECIFIC_VENDORS,r=t.vendor_ids.map(C).filter(e=>null!==e);return i?e.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS?r.some(e=>o.some(t=>!b(e,t))):o.some(e=>r.some(t=>!b(e,t))):t.vendor_restriction===e.vendor_restriction&&o.some(e=>r.some(t=>T(e,t)))})},N=e=>{if(/^\d+$/.test(e))return{start_vendor_id:parseInt(e,10),end_vendor_id:null};let t=e.match(/^(\d+)-(\d+)$/);if(t){let e=parseInt(t[1],10),i=parseInt(t[2],10);if(e<i)return{start_vendor_id:e,end_vendor_id:i}}return null},F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(N).filter(e=>null!==e)},w="This restriction type is already in use for this purpose",P={restriction_type:"",vendor_restriction:"",vendor_ids:[]},O=e=>{let{isOpen:t,onClose:i,initialValues:s=P,existingRestrictions:o=[],purposeId:d,restrictionId:l,configurationId:a}=e,c=(0,n.pmc)(),[u]=(0,E.a_)(),[h]=(0,E.h3)(),v=!(d&&p.Py.includes(+d)),_=o.filter(e=>e.id!==l).map(e=>e.restriction_type),C=[{value:m.FF.PURPOSE_RESTRICTION,label:p.fj[m.FF.PURPOSE_RESTRICTION],disabled:_.includes(m.FF.PURPOSE_RESTRICTION),title:_.includes(m.FF.PURPOSE_RESTRICTION)?w:void 0},{value:m.FF.REQUIRE_CONSENT,label:p.fj[m.FF.REQUIRE_CONSENT],disabled:_.includes(m.FF.REQUIRE_CONSENT),title:_.includes(m.FF.REQUIRE_CONSENT)?w:void 0},{value:m.FF.REQUIRE_LEGITIMATE_INTEREST,label:p.fj[m.FF.REQUIRE_LEGITIMATE_INTEREST],disabled:_.includes(m.FF.REQUIRE_LEGITIMATE_INTEREST),title:_.includes(m.FF.REQUIRE_LEGITIMATE_INTEREST)?w:void 0}],T=[{value:m.PY.RESTRICT_ALL_VENDORS,label:p.Cu[m.PY.RESTRICT_ALL_VENDORS],disabled:_.length>0,title:_.length>0?"Cannot restrict all vendors when other restrictions exist":void 0},{value:m.PY.RESTRICT_SPECIFIC_VENDORS,label:p.Cu[m.PY.RESTRICT_SPECIFIC_VENDORS]},{value:m.PY.ALLOW_SPECIFIC_VENDORS,label:p.Cu[m.PY.ALLOW_SPECIFIC_VENDORS]}],b=f.Ry().shape({restriction_type:f.Z_().required("Restriction type is required"),vendor_restriction:f.Z_().required("Vendor restriction is required"),vendor_ids:f.IX().when("vendor_restriction",{is:e=>e!==m.PY.RESTRICT_ALL_VENDORS,then:e=>e.required("At least one vendor ID is required").min(1,"At least one vendor ID is required").test("valid-format","Vendor IDs must be numbers or ranges (e.g., 10 or 15-300)",e=>{var t;return null===(t=null==e?void 0:e.every(e=>y(e)))||void 0===t||t}).test("no-conflicts","One or more of these vendors already have a restriction for this purpose. Please update the existing restriction or remove duplicates.",(e,t)=>!S({...t.parent,vendor_ids:e},o,d,l))})}),N=async e=>{try{let t={restriction_type:e.restriction_type,vendor_restriction:e.vendor_restriction,range_entries:e.vendor_restriction!==m.PY.RESTRICT_ALL_VENDORS?F(e.vendor_ids):[]},r={...t,purpose_id:null!=d?d:0};if(l){let e=await h({configuration_id:a,restriction_id:l,restriction:t});if((0,R.D4)(e)){c((0,I.Vo)("Failed to update restriction"));return}c((0,I.t5)("Restriction updated successfully"))}else{let e=await u({configuration_id:a,restriction:r});if((0,R.D4)(e)){c((0,I.Vo)("Failed to create restriction"));return}c((0,I.t5)("Restriction created successfully"))}i()}catch(e){c((0,I.Vo)("Failed to save restriction"))}};return(0,r.jsx)(j.Z,{isOpen:t,onClose:i,title:"Edit restriction",children:(0,r.jsx)(x.J9,{initialValues:{...s,restriction_type:v?s.restriction_type:m.FF.PURPOSE_RESTRICTION},onSubmit:N,validationSchema:b,children:e=>{let{values:t,validateField:s,setTouched:o}=e;return(0,r.jsx)(x.l0,{children:(0,r.jsxs)(n.jqI,{vertical:!0,className:"gap-6",children:[(0,r.jsx)(n.xvT,{className:"text-sm",children:"Define how specific vendors are restricted from processing data for this purpose. Select a restriction type, set whether the listed vendors are restricted or allowed, and specify which vendor IDs the restriction applies to."}),(0,r.jsx)(n.esZ,{title:v?void 0:"Non-flexible purposes only support Purpose restrictions and cannot be restricted by consent or legitimate interest settings.",children:(0,r.jsx)(g.d,{name:"restriction_type",label:"Restriction type",options:C,layout:"stacked",tooltip:"Choose how vendors are permitted to process data for this purpose. This setting overrides the vendor's declared legal basis in the Global Vendor List.",isRequired:!0,disabled:!v,className:"w-full"})}),(0,r.jsx)(g.d,{name:"vendor_restriction",label:"Vendor restriction",options:T,layout:"stacked",tooltip:"Decide if the restriction applies to all vendors, specific vendors, or if only certain vendors are allowed.",isRequired:!0}),(0,r.jsx)(n.UO1,{in:!!t.restriction_type&&!!t.vendor_restriction&&t.vendor_restriction!==m.PY.RESTRICT_ALL_VENDORS,animateOpacity:!0,children:(0,r.jsx)(g.d,{name:"vendor_ids",label:"Vendor IDs",mode:"tags",options:[],layout:"stacked",placeholder:"Enter vendor IDs",open:!1,suffixIcon:(0,r.jsx)("span",{}),tooltip:"List the specific vendors that are restricted or allowed from processing data for this purpose.",disabled:t.vendor_restriction===m.PY.RESTRICT_ALL_VENDORS,tokenSeparators:[","," "],onBlur:()=>{setTimeout(()=>{o({vendor_ids:!0}),s("vendor_ids")},100)},helperText:"Enter IDs (e.g. 123) or ranges (e.g. 1-10) and press enter",isRequired:!0})}),(0,r.jsxs)(n.jqI,{justify:"flex-end",className:"gap-3 pt-4",children:[(0,r.jsx)(n.wpx,{onClick:i,"data-testid":"cancel-restriction-button",children:"Cancel"}),(0,r.jsx)(n.wpx,{type:"primary",htmlType:"submit","data-testid":"save-restriction-button",children:"Save"})]})]})})}})})};var L=i(72625),q=i(58452);let A=e=>{let{currentValues:t,existingRestrictions:i}=e,[d,l]=(0,o.useState)(!1),[a,c]=(0,o.useState)(!1),u=(0,s.useRouter)(),p=(0,n.pmc)(),[h]=(0,E.FC)(),v=u.query.purpose_id?parseInt(u.query.purpose_id,10):void 0,_=u.query.configuration_id,m=async()=>{try{if(!(null==t?void 0:t.id))return;let e=await h({configuration_id:_,restriction_id:t.id});if((0,R.D4)(e)){p((0,I.Vo)("Failed to delete publisher restriction"));return}l(!1),p((0,I.t5)("Publisher restriction deleted successfully"))}catch(e){p((0,I.Vo)("Failed to delete publisher restriction"))}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.vyj,{children:[(0,r.jsx)(n.wpx,{size:"small",onClick:()=>c(!0),"data-testid":"edit-restriction-button",children:"Edit"}),(0,r.jsx)(n.wpx,{size:"small",onClick:()=>l(!0),"data-testid":"delete-restriction-button",children:"Delete"})]}),(0,r.jsx)(O,{isOpen:a,onClose:()=>c(!1),initialValues:t,existingRestrictions:i,purposeId:v,restrictionId:null==t?void 0:t.id,configurationId:_}),(0,r.jsx)(q.Z,{isOpen:d,onClose:()=>l(!1),onConfirm:m,title:"Confirm deletion",message:"Are you sure you want to delete this publisher restriction? This action cannot be undone.",cancelButtonText:"Cancel",continueButtonText:"Delete"})]})},D=(0,v.Cl)(),V=()=>(0,o.useMemo)(()=>[D.accessor(e=>e.restriction_type,{id:"restriction_type",cell:e=>{let{getValue:t}=e,i=t();return(0,r.jsx)(_.G3,{value:p.fj[i]})},header:e=>(0,r.jsx)(_.Rr,{value:"Restriction type",...e})}),D.accessor(e=>e.vendor_restriction,{id:"vendor_restriction",cell:e=>{let{getValue:t}=e,i=t();return(0,r.jsx)(_.G3,{value:p.Cu[i]})},header:e=>(0,r.jsx)(_.Rr,{value:"Vendor restriction",...e})}),D.accessor(e=>e.vendor_ids,{id:"vendor_ids",cell:e=>{let{getValue:t}=e;return(0,r.jsx)(_.G3,{value:t().join(", ")||"All vendors"})},header:e=>(0,r.jsx)(L.vs,{value:"Vendors",helperText:"Specify which vendors the restriction applies to. You can apply restrictions to all vendors, specific vendors by their IDs, or allow only certain vendors while restricting the rest.",...e})}),D.display({id:"actions",cell:e=>(0,r.jsx)(A,{currentValues:e.row.original,existingRestrictions:e.table.getRowModel().rows.map(e=>e.original)}),header:"Actions",size:154,meta:{disableRowClick:!0}})],[]),k=e=>{let{onAdd:t}=e;return(0,r.jsxs)(n.jqI,{vertical:!0,align:"center",className:"mt-6 w-full gap-3 self-center whitespace-normal py-10","data-testid":"empty-table-notice",children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"semibold",children:"Add a restriction"}),(0,r.jsx)(n.xvT,{fontSize:"sm",className:"max-w-[70%]",children:"No restrictions have been added. By default, all vendors follow their declared legal basis unless a restriction is applied—add a restriction to override this behavior."}),(0,r.jsx)(n.wpx,{type:"primary",onClick:t,children:"Add +"})]})},U=()=>{let[e,t]=(0,o.useState)(!1),i=V(),d=(0,s.useRouter)(),l=d.query.purpose_id?parseInt(d.query.purpose_id,10):void 0,a=d.query.configuration_id,{data:c,isFetching:u}=(0,E.a9)({configuration_id:a,purpose_id:null!=l?l:0},{skip:!a||!l}),p=((null==c?void 0:c.items)||[]).map(e=>{var t;return{id:e.id,restriction_type:e.restriction_type,vendor_restriction:e.vendor_restriction,vendor_ids:(null===(t=e.range_entries)||void 0===t?void 0:t.map(e=>e.end_vendor_id?"".concat(e.start_vendor_id,"-").concat(e.end_vendor_id):e.start_vendor_id.toString()))||[],purpose_id:e.purpose_id}}),x=p.some(e=>e.vendor_restriction===m.PY.RESTRICT_ALL_VENDORS),f=Object.values(m.FF).every(e=>p.some(t=>t.restriction_type===e)),g=(0,h.b7)({getCoreRowModel:(0,v.sC)(),columns:i,data:p,columnResizeMode:"onChange",manualPagination:!0}),R=()=>{t(!0)};return(0,r.jsxs)(n.jqI,{vertical:!0,className:"overflow-auto",children:[(0,r.jsxs)(_.Q$,{children:[(0,r.jsx)(n.LZC,{}),(0,r.jsx)(n.esZ,{title:x?'Each vendor must have a unique restriction type. When "Restrict all vendors" is active for any restriction type, no other restrictions can be added.':f?"Each purpose must have a unique restriction type. When all restriction types are active, no other restrictions can be added. Use the 'Edit' button to change the vendor restrictions on each type.":void 0,children:(0,r.jsx)(n.wpx,{type:"primary",onClick:R,disabled:x||f,"data-testid":"add-restriction-button",children:"Add restriction +"})})]}),u?(0,r.jsx)(_.I4,{rowHeight:36,numRows:3}):(0,r.jsx)(_.ZK,{tableInstance:g,emptyTableNotice:(0,r.jsx)(k,{onAdd:R})}),(0,r.jsx)(O,{isOpen:e,onClose:()=>{t(!1)},existingRestrictions:p,purposeId:l,configurationId:a})]})};var Z=()=>{let e=(0,s.useRouter)(),t=decodeURIComponent(e.query.configuration_id),i=decodeURIComponent(e.query.purpose_id),{data:h,isLoading:v}=(0,c.a4)(),{data:_}=(0,E.NZ)(t),m=(0,o.useMemo)(()=>null==h?void 0:h.purposes[i],[h,i]);return(0,r.jsxs)(l.Z,{title:"Consent Configuration",children:[(0,r.jsx)(a.Z,{heading:"Consent configuration",breadcrumbItems:[{title:"Consent settings",href:"/settings/consent"},{title:(null==_?void 0:_.name)||"Configuration"},{title:"TCF purpose ".concat(i)}]}),(0,r.jsxs)(n.vyj,{direction:"vertical",size:"middle",children:[(0,r.jsxs)(n.vyj,{direction:"vertical",size:"middle",children:[(0,r.jsx)(u.Z,{title:"TCF purpose ".concat(i).concat((null==m?void 0:m.name)?": ".concat(null==m?void 0:m.name):""),children:v?(0,r.jsxs)(n.jqI,{vertical:!0,className:"gap-1.5",children:[(0,r.jsx)(n.OdW,{height:"16px",width:"100%"}),(0,r.jsx)(n.OdW,{height:"16px",width:"100%"}),(0,r.jsx)(n.OdW,{height:"16px",width:"30%"})]}):!!m&&(0,r.jsx)(n.xvT,{fontSize:"sm",children:null==m?void 0:m.description})}),(0,r.jsx)(u.Z,{title:(null==_?void 0:_.name)||"Configuration",children:(0,r.jsx)(n.vyj,{direction:"vertical",className:"gap-3",children:(0,r.jsxs)(n.xvT,{fontSize:"sm",children:["Add restrictions to control how vendors process data for specific purposes. For each restriction, choose a restriction type. Then, decide whether the restriction applies to all vendors, specific vendors, or only to a limited set of allowed vendors. You can add multiple restrictions—they'll appear in the table below."," ",(0,r.jsx)(d.Z,{href:p.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]})})})]}),(0,r.jsx)(U,{})]})]})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=77713)}),_N_E=e.O()}]);