ethyca-fides 2.65.3b1__py2.py3-none-any.whl → 2.65.3b3__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 (164) hide show
  1. {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b3.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b3.dist-info}/RECORD +155 -155
  3. fides/_version.py +3 -3
  4. fides/api/models/fides_user.py +11 -7
  5. fides/api/models/fides_user_permissions.py +6 -10
  6. fides/api/service/privacy_request/request_runner_service.py +1 -3
  7. fides/api/task/manual/manual_task_graph_task.py +48 -7
  8. fides/api/task/manual/manual_task_utils.py +6 -35
  9. fides/ui-build/static/admin/404.html +1 -1
  10. fides/ui-build/static/admin/_next/static/{779-bFyN2mfyVfR0Jqdxw → UZLS8hRH8R50kojeaBV1Y}/_buildManifest.js +1 -1
  11. fides/ui-build/static/admin/_next/static/chunks/{1817-e2c599fb2c47dbc4.js → 1817-34bd629bf34328ec.js} +1 -1
  12. fides/ui-build/static/admin/_next/static/chunks/203-9e86242bde459a43.js +1 -0
  13. fides/ui-build/static/admin/_next/static/chunks/{3450-ebcffdd4fb437a2e.js → 3450-b7af9fec12e66f7f.js} +1 -1
  14. fides/ui-build/static/admin/_next/static/chunks/{3855-a0783ba28c644d09.js → 3855-b914c1a3124f44ea.js} +1 -1
  15. fides/ui-build/static/admin/_next/static/chunks/{3872-18e5da8bda649ddb.js → 3872-140c8bf8bdb5d511.js} +1 -1
  16. fides/ui-build/static/admin/_next/static/chunks/{4121-23ac086c1aa6a43a.js → 4121-91ab0fdde5204f41.js} +1 -1
  17. fides/ui-build/static/admin/_next/static/chunks/{4230-c4c596fb5534e1b1.js → 4230-d91fc4db148387bc.js} +1 -1
  18. fides/ui-build/static/admin/_next/static/chunks/{431-24380873201c3e1b.js → 431-2a9adafa2689a0f4.js} +1 -1
  19. fides/ui-build/static/admin/_next/static/chunks/{4608-0cd97892fd0b0e41.js → 4608-52674906c7d6a22e.js} +1 -1
  20. fides/ui-build/static/admin/_next/static/chunks/{5309-c8b5165efcc5469f.js → 5309-90d555ba13edaf08.js} +1 -1
  21. fides/ui-build/static/admin/_next/static/chunks/{6084-5bfa390a4c8fad43.js → 6084-1ae40620e79e0cf9.js} +1 -1
  22. fides/ui-build/static/admin/_next/static/chunks/{6662-79eee0bf18775b40.js → 6662-5fa8a1b20b0d3e3c.js} +1 -1
  23. fides/ui-build/static/admin/_next/static/chunks/{6780-8b5772a3a2ef1ca6.js → 6780-4db9fe1ee8860870.js} +1 -1
  24. fides/ui-build/static/admin/_next/static/chunks/{6853-7a089a9fad286bb8.js → 6853-02be83ef65e8853b.js} +1 -1
  25. fides/ui-build/static/admin/_next/static/chunks/{6882-5a251351689ea74b.js → 6882-6f755ee046c9d70a.js} +1 -1
  26. fides/ui-build/static/admin/_next/static/chunks/{6954-3a7b166c8f3b66b4.js → 6954-b242eebbe7c52e5a.js} +1 -1
  27. fides/ui-build/static/admin/_next/static/chunks/7476-c4ccb87fb8dbe2c0.js +1 -0
  28. fides/ui-build/static/admin/_next/static/chunks/{787-cb0154eaf6114c7e.js → 787-a1674f4d14753677.js} +1 -1
  29. fides/ui-build/static/admin/_next/static/chunks/{79-f08e91084d10d6dc.js → 79-056947276803332e.js} +1 -1
  30. fides/ui-build/static/admin/_next/static/chunks/{9046-d4c806aa81ab0bad.js → 9046-f5b180534b2637c3.js} +1 -1
  31. fides/ui-build/static/admin/_next/static/chunks/{9226-f4e70e6f9619e9a9.js → 9226-ce9c651c6ed829dd.js} +1 -1
  32. fides/ui-build/static/admin/_next/static/chunks/{9951-5e744e8addb6e090.js → 9951-e572cda021343eb1.js} +1 -1
  33. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-9a878b14373eec2e.js → _app-ad79168425b75dc6.js} +1 -1
  34. fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-e5ef5be6566f9432.js → add-systems-f068a00278624bc9.js} +1 -1
  35. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-5f2d060952814353.js → privacy-experience-799d2a4a9dd68eea.js} +1 -1
  36. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-232e9ef135b838cf.js → privacy-notices-55d0f8505a7f8692.js} +1 -1
  37. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-5fcacc8e4baf3d03.js → reporting-1103b69bcd90ed6c.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-29cde3b7d27b22cf.js → data-catalog-6d6584fd49026ec2.js} +1 -1
  39. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-caf0c55830fc91b3.js +1 -0
  40. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-5c0b1f15873c90fa.js +1 -0
  41. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-a81165ca06b7c404.js +1 -0
  42. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-f79ec067d906e67f.js → activity-bf3627895c102ae0.js} +1 -1
  43. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-403dc361bffe644d.js → new-17caa948d13ac81c.js} +1 -1
  44. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-52506e743c73fc7d.js → dataset-06d5b6944e2de262.js} +1 -1
  45. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-7d492050fc33a57a.js → [id]-a980e69a921a0dfb.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-6f68e65f01beb8af.js → new-d7160806386bc7e0.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/pages/{index-e92db8bb8c719abc.js → index-7430cfb2a1bf1442.js} +1 -1
  48. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-c245f0b0fd7810c0.js → [id]-e039acfdefb0986e.js} +1 -1
  49. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-61e32a7b8ef6569c.js → [id]-29643fbd5745ac0e.js} +1 -1
  50. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-1f57e4d5715dd5cf.js → messaging-3062ca1a95ede1a3.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-378db5585b89ab5e.js → storage-a67feed389719f52.js} +1 -1
  52. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-1b9c48484ea70264.js +1 -0
  53. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-dc3afcf514d7219a.js → datamap-218f88a99e7f0c04.js} +1 -1
  54. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-aaa2d02b9be2acb1.js → [purpose_id]-738e9c5dd7a4d8f5.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-bed42ecfab4896af.js → consent-d0c5a07b57b6adae.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-82882bc16052ae5b.js → custom-fields-7945aad419e1ba8b.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-068724e9c574974d.js → locations-694ae08fdc73b92b.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-f556688c5fb35f41.js → organization-26db0a2e4ffe2892.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-7ce5dbabf7f1026b.js → test-datasets-ec7efe4e1f09ecb7.js} +1 -1
  60. fides/ui-build/static/admin/_next/static/chunks/pages/{systems-b5f68d37abaa8844.js → systems-8045ae1289ef8ebc.js} +1 -1
  61. fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-103618fab50dfd0d.js → taxonomy-0d17e0de9adb27f8.js} +1 -1
  62. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-564f87da93e398d0.js → [id]-fe32284ce419e921.js} +1 -1
  63. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-f552cb870f8a6a17.js → user-management-9c8200fc2f8b9346.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/css/10994e916bc9a00a.css +1 -0
  65. fides/ui-build/static/admin/_next/static/css/304c6f148886a8d4.css +1 -0
  66. fides/ui-build/static/admin/_next/static/css/4383759407e86f7a.css +1 -0
  67. fides/ui-build/static/admin/_next/static/css/{81642473e38c67a5.css → 5bfb2473e5701527.css} +1 -1
  68. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  69. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  70. fides/ui-build/static/admin/add-systems.html +1 -1
  71. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  72. fides/ui-build/static/admin/consent/configure.html +1 -1
  73. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  74. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  75. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  76. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  77. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  78. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  79. fides/ui-build/static/admin/consent/properties.html +1 -1
  80. fides/ui-build/static/admin/consent/reporting.html +1 -1
  81. fides/ui-build/static/admin/consent.html +1 -1
  82. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  83. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  84. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  85. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  86. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  87. fides/ui-build/static/admin/data-catalog.html +1 -1
  88. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  89. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  90. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  91. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  92. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  93. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  94. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  95. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  96. fides/ui-build/static/admin/datamap.html +1 -1
  97. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  98. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  99. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  100. fides/ui-build/static/admin/dataset/new.html +1 -1
  101. fides/ui-build/static/admin/dataset.html +1 -1
  102. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  103. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  104. fides/ui-build/static/admin/datastore-connection.html +1 -1
  105. fides/ui-build/static/admin/index.html +1 -1
  106. fides/ui-build/static/admin/integrations/[id].html +1 -1
  107. fides/ui-build/static/admin/integrations.html +1 -1
  108. fides/ui-build/static/admin/login/[provider].html +1 -1
  109. fides/ui-build/static/admin/login.html +1 -1
  110. fides/ui-build/static/admin/messaging/[id].html +1 -1
  111. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  112. fides/ui-build/static/admin/messaging.html +1 -1
  113. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  114. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  115. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  116. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  117. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  118. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  119. fides/ui-build/static/admin/poc/forms.html +1 -1
  120. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  121. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  122. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  123. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  124. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  125. fides/ui-build/static/admin/privacy-requests.html +1 -1
  126. fides/ui-build/static/admin/properties/[id].html +1 -1
  127. fides/ui-build/static/admin/properties/add-property.html +1 -1
  128. fides/ui-build/static/admin/properties.html +1 -1
  129. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  130. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  131. fides/ui-build/static/admin/settings/about.html +1 -1
  132. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  133. fides/ui-build/static/admin/settings/consent.html +1 -1
  134. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  135. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  136. fides/ui-build/static/admin/settings/domains.html +1 -1
  137. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  138. fides/ui-build/static/admin/settings/locations.html +1 -1
  139. fides/ui-build/static/admin/settings/organization.html +1 -1
  140. fides/ui-build/static/admin/settings/regulations.html +1 -1
  141. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  142. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  143. fides/ui-build/static/admin/systems.html +1 -1
  144. fides/ui-build/static/admin/taxonomy.html +1 -1
  145. fides/ui-build/static/admin/user-management/new.html +1 -1
  146. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  147. fides/ui-build/static/admin/user-management.html +1 -1
  148. fides/ui-build/static/admin/_next/static/chunks/3988-839f18f04d5144f2.js +0 -1
  149. fides/ui-build/static/admin/_next/static/chunks/7476-d7071697bc665a4f.js +0 -1
  150. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-3ae1ae3844a6e03a.js +0 -1
  151. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-e8dc8320e826e91c.js +0 -1
  152. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-22fe027966edb092.js +0 -1
  153. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-26a48fa6707708af.js +0 -1
  154. fides/ui-build/static/admin/_next/static/css/62867c995b516a24.css +0 -1
  155. fides/ui-build/static/admin/_next/static/css/92fc10cc7ed1aba3.css +0 -1
  156. fides/ui-build/static/admin/_next/static/css/eb46b504bb5d980d.css +0 -1
  157. {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b3.dist-info}/WHEEL +0 -0
  158. {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b3.dist-info}/entry_points.txt +0 -0
  159. {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b3.dist-info}/licenses/LICENSE +0 -0
  160. {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b3.dist-info}/top_level.txt +0 -0
  161. /fides/ui-build/static/admin/_next/static/{779-bFyN2mfyVfR0Jqdxw → UZLS8hRH8R50kojeaBV1Y}/_ssgManifest.js +0 -0
  162. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-12073578f764815e.js → manual-9c25673536d3f2cc.js} +0 -0
  163. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-3ddf2001f4605949.js → regulations-c304e080c391f254.js} +0 -0
  164. /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-ed809e0961891c0c.js → [id]-25589319be47ee83.js} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{13687:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/messaging",function(){return t(61463)}])},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return m}});var s=t(24246),n=t(13577),l=t(88038),r=t.n(l),a=t(86677);t(27378);var o=t(25980),c=t(90867),d=t(77830),u=()=>{let e=(0,a.useRouter)();return(0,s.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(n.xuv,{children:[(0,s.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(n.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,s.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:i,title:t,padded:l=!0,mainProps:d}=e,m=(0,o.hz)(),p=(0,a.useRouter)(),x="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(m.flags.privacyRequestsConfiguration&&x),{data:j}=(0,c.JE)(void 0,{skip:h}),{data:g}=(0,c.PW)(void 0,{skip:h}),y=m.flags.privacyRequestsConfiguration&&(!j||!g)&&x;return(0,s.jsxs)(n.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,s.jsxs)(r(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(n.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[y?(0,s.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var s=t(24246),n=t(13577),l=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:r=!0,children:a,rightContent:o,style:c,...d}=e;return(0,s.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,s.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof i?(0,s.jsx)(n.lQT,{className:t||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!t&&(0,s.jsx)(l.m,{className:a?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),a]})}},14047:function(e,i,t){"use strict";t.d(i,{H:function(){return l},V:function(){return s.V}});var s=t(84306),n=t(812);let l=()=>{let{errorAlert:e}=(0,s.V)();return{handleError:i=>{let t="An unexpected error occurred. Please try again.";(0,n.Ot)(i)?t=i.data.detail:(0,n.tB)(i)&&(t=i.data.detail[0].msg),e(t)}}}},84306:function(e,i,t){"use strict";t.d(i,{V:function(){return l}});var s=t(24246),n=t(13577);let l=()=>{let e=(0,n.pmc)();return{errorAlert:(i,t,l)=>{let r={...l,position:(null==l?void 0:l.position)||"top",render:e=>{let{onClose:l}=e;return(0,s.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(n.zMQ,{}),(0,s.jsxs)(n.xuv,{children:[t&&(0,s.jsx)(n.CdC,{children:t}),(0,s.jsx)(n.XaZ,{children:i})]}),(0,s.jsx)(n.PZ7,{onClick:l,position:"relative",right:0,size:"sm",top:-1})]})}};(null==l?void 0:l.id)&&e.isActive(l.id)?e.update(l.id,r):e(r)},successAlert:(i,t,l)=>{let r={...l,position:(null==l?void 0:l.position)||"top",render:e=>{let{onClose:l}=e;return(0,s.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(n.zMQ,{}),(0,s.jsxs)(n.xuv,{children:[t&&(0,s.jsx)(n.CdC,{children:t}),(0,s.jsx)(n.XaZ,{children:i})]}),(0,s.jsx)(n.PZ7,{onClick:l,position:"relative",right:0,size:"sm",top:-1})]})}};(null==l?void 0:l.id)&&e.isActive(l.id)?e.update(l.id,r):e(r)}}}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return c}});var s=t(24246),n=t(13577),l=t(79894),r=t.n(l),a=t(27378);let{Text:o}=n.AntTypography,c=e=>{let{items:i,...t}=e,l=(0,a.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let l=t===i.length-1,a={...e},c=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:a.title})),c)?a.title=(0,s.jsx)(n.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,s.jsx)(r(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[i]);return(0,s.jsx)(n.zrq,{items:l,...t})}},71784:function(e,i,t){"use strict";t.d(i,{DE:function(){return o},I3:function(){return n},kN:function(){return r},qX:function(){return a},rE:function(){return l}});var s=t(68309);let n=[...new Map([[s.q2.APPROVED,"Approved"],[s.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[s.q2.CANCELED,"Canceled"],[s.q2.COMPLETE,"Completed"],[s.q2.DENIED,"Denied"],[s.q2.ERROR,"Error"],[s.q2.IN_PROCESSING,"In progress"],[s.q2.PENDING,"New"],[s.q2.PAUSED,"Paused"],[s.q2.IDENTITY_UNVERIFIED,"Unverified"],[s.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[i,t]=e;return{label:t,value:i}}),l=new Map([[s.Us.ACCESS,"Access"],[s.Us.ERASURE,"Erasure"],[s.Us.CONSENT,"Consent"],[s.Us.UPDATE,"Update"]]),r=[...l].map(e=>{let[i,t]=e;return{label:t,value:i}}),a={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3",gcs:"gcs"}},61463:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return _}});var s=t(24246),n=t(13577),l=t(27378),r=t(812),a=t(14047),o=t(77213),c=t(77830),d=t(58754),u=t(7426),m=t(71784),p=t(90867),x=t(34090),h=t(40324),j=e=>{let{messagingDetails:i}=e,{successAlert:t}=(0,a.V)(),{handleError:l}=(0,a.H)(),[o]=(0,p.SU)(),c=i.service_type===m.qX.twilio_email||i.service_type===m.qX.mailgun,d=i.service_type===m.qX.twilio_text,u=async e=>{if(c){let i=await o({email:e.email});(0,r.D4)(i)?l(i.error):t("Test message successfully sent.")}if(d){let i=await o({phone_number:e.phone});(0,r.D4)(i)?l(i.error):t("Test message successfully sent.")}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{mt:10}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,mb:5,children:"Test connection"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{email:"",phone:""},onSubmit:u,children:e=>{let{isSubmitting:i,resetForm:t}=e;return(0,s.jsxs)(x.l0,{children:[c?(0,s.jsx)(h.j0,{name:"email",label:"Email",placeholder:"youremail@domain.com",isRequired:!0}):null,d?(0,s.jsx)(h.j0,{name:"phone",label:"Phone",placeholder:"+10000000000",isRequired:!0}):null,(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]})},g=()=>{var e;let{successAlert:i}=(0,a.V)(),[t,o]=(0,l.useState)(""),{handleError:c}=(0,a.H)(),{data:d}=(0,p.S3)({type:m.qX.mailgun}),[u]=(0,p.h9)(),[g]=(0,p.iI)(),y=async e=>{let t=await u({service_type:m.qX.mailgun,details:{is_eu_domain:"false",domain:e.domain}});(0,r.D4)(t)?c(t.error):(i("Mailgun email successfully updated. You can now enter your security key."),o("apiKey"))},v=async e=>{let t=await g({details:{mailgun_api_key:e.api_key},service_type:m.qX.mailgun});(0,r.D4)(t)?c(t.error):(i("Mailgun security key successfully updated."),o("testConnection"))},f={domain:null!==(e=null==d?void 0:d.details.domain)&&void 0!==e?e:""};return(0,s.jsxs)(n.xuv,{children:[(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Mailgun messaging configuration"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:f,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(n.Kqy,{mt:5,spacing:5,children:(0,s.jsx)(h.j0,{name:"domain",label:"Domain",placeholder:"Enter domain","data-testid":"option-twilio-domain",isRequired:!0})}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:t,className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{htmlType:"submit",disabled:i,type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"apiKey"===t||"testConnection"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{mt:10}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:t,className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===t?(0,s.jsx)(j,{messagingDetails:d||{service_type:m.qX.mailgun}}):null]})},y=()=>{var e;let[i,t]=(0,l.useState)(""),{successAlert:o}=(0,a.V)(),{handleError:c}=(0,a.H)(),{data:d}=(0,p.S3)({type:m.qX.twilio_email}),[u]=(0,p.h9)(),[g]=(0,p.iI)(),y=async e=>{let i=await u({service_type:m.qX.twilio_email,details:{twilio_email_from:e.email}});(0,r.D4)(i)?c(i.error):(o("Twilio email successfully updated. You can now enter your security key."),t("configureTwilioEmailSecrets"))},v=async e=>{let i=await g({details:{twilio_api_key:e.api_key},service_type:m.qX.twilio_email});(0,r.D4)(i)?c(i.error):(o("Twilio email secrets successfully updated."),t("testConnection"))},f={email:null!==(e=null==d?void 0:d.details.twilio_email_from)&&void 0!==e?e:""};return(0,s.jsxs)(n.xuv,{children:[(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio Email messaging configuration"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:f,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(n.Kqy,{mt:5,spacing:5,children:(0,s.jsx)(h.j0,{name:"email",label:"Email",placeholder:"Enter email",isRequired:!0})}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"configureTwilioEmailSecrets"===i||"testConnection"===i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{mt:10}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(n.Kqy,{mt:5,spacing:5,children:(0,s.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0})}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===i?(0,s.jsx)(j,{messagingDetails:d||{service_type:m.qX.twilio_email}}):null]})},v=()=>{let{successAlert:e}=(0,a.V)(),{handleError:i}=(0,a.H)(),[t,o]=(0,l.useState)(""),{data:c}=(0,p.S3)({type:"twilio_text"}),[d]=(0,p.iI)(),u=async t=>{let s=await d({details:{twilio_account_sid:t.account_sid,twilio_auth_token:t.auth_token,twilio_messaging_service_sid:t.messaging_service_sid,twilio_sender_phone_number:t.phone},service_type:m.qX.twilio_text});(0,r.D4)(s)?i(s.error):(e("Twilio text secrets successfully updated."),o("testConnection"))};return(0,s.jsxs)(n.xuv,{children:[(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio SMS messaging configuration"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{account_sid:"",auth_token:"",messaging_service_sid:"",phone:""},onSubmit:u,enableReinitialize:!0,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsxs)(n.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(h.j0,{name:"account_sid",label:"Account SID",placeholder:"Enter account SID",isRequired:!0}),(0,s.jsx)(h.j0,{name:"auth_token",label:"Auth token",placeholder:"Enter auth token",type:"password",isRequired:!0}),(0,s.jsx)(h.j0,{name:"messaging_service_sid",label:"Messaging Service SID",placeholder:"Enter messaging service SID"}),(0,s.jsx)(h.j0,{name:"phone",label:"Phone Number",placeholder:"Enter phone number"})]}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"testConnection"===t?(0,s.jsx)(j,{messagingDetails:c||{service_type:m.qX.twilio_text}}):null]})},f=()=>{let{successAlert:e}=(0,a.V)(),{handleError:i}=(0,a.H)(),[t,x]=(0,l.useState)(""),[h]=(0,p.h9)(),[j]=(0,u.L)(),{data:f}=(0,p.JE)();(0,l.useEffect)(()=>{f&&x(null==f?void 0:f.service_type)},[f]);let _=async t=>{let{value:s}=t.target,n=await j({notifications:{notification_service_type:s,send_request_completion_notification:!0,send_request_receipt_notification:!0,send_request_review_notification:!0},execution:{subject_identity_verification_required:!0}});if((0,r.D4)(n))i(n.error);else if(s!==m.qX.twilio_text)x(s);else{let t=await h({service_type:m.qX.twilio_text});(0,r.D4)(t)?i(t.error):(e("Messaging provider saved successfully."),x(s))}};return(0,s.jsxs)(o.Z,{title:"Configure Privacy Requests - Messaging",children:[(0,s.jsx)(d.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Configure requests",href:c.fz},{title:"Messaging"}]}),(0,s.jsx)(n.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure your messaging provider"}),(0,s.jsxs)(n.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,s.jsxs)(n.xuv,{children:["Fides requires a messsaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,s.jsx)(n.xvT,{as:"span",color:"complimentary.500",children:"documentation"})," ","to setup a messaging service that Fides supports. Ensure you have completed the setup for the preferred messaging provider and have the details handy prior to the following steps."]}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose service type to configure"}),(0,s.jsx)(n.y02.Group,{onChange:_,value:t,"data-testid":"privacy-requests-messaging-provider-selection",className:"p-3",children:(0,s.jsxs)(n.jqI,{children:[(0,s.jsx)(n.y02,{value:m.qX.mailgun,"data-testid":"option-mailgun",children:"Mailgun Email"},m.qX.mailgun),(0,s.jsx)(n.y02,{value:m.qX.twilio_email,"data-testid":"option-twilio-email",children:"Twilio Email"},m.qX.twilio_email),(0,s.jsx)(n.y02,{value:m.qX.twilio_text,"data-testid":"option-twilio-sms",children:"Twilio SMS"},m.qX.twilio_text)]})}),t===m.qX.mailgun?(0,s.jsx)(g,{}):null,t===m.qX.twilio_email?(0,s.jsx)(y,{}):null,t===m.qX.twilio_text?(0,s.jsx)(v,{}):null]})]})},_=()=>(0,s.jsx)(f,{})}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=13687)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{13687:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/messaging",function(){return t(61463)}])},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return m}});var s=t(24246),n=t(13577),l=t(88038),r=t.n(l),a=t(86677);t(27378);var o=t(25980),c=t(90867),d=t(77830),u=()=>{let e=(0,a.useRouter)();return(0,s.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(n.xuv,{children:[(0,s.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(n.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,s.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:i,title:t,padded:l=!0,mainProps:d}=e,m=(0,o.hz)(),p=(0,a.useRouter)(),x="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(m.flags.privacyRequestsConfiguration&&x),{data:j}=(0,c.JE)(void 0,{skip:h}),{data:g}=(0,c.PW)(void 0,{skip:h}),y=m.flags.privacyRequestsConfiguration&&(!j||!g)&&x;return(0,s.jsxs)(n.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,s.jsxs)(r(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(n.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[y?(0,s.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var s=t(24246),n=t(13577),l=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:r=!0,children:a,rightContent:o,style:c,...d}=e;return(0,s.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,s.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof i?(0,s.jsx)(n.lQT,{className:t||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!t&&(0,s.jsx)(l.m,{className:a?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),a]})}},14047:function(e,i,t){"use strict";t.d(i,{H:function(){return l},V:function(){return s.V}});var s=t(84306),n=t(812);let l=()=>{let{errorAlert:e}=(0,s.V)();return{handleError:i=>{let t="An unexpected error occurred. Please try again.";(0,n.Ot)(i)?t=i.data.detail:(0,n.tB)(i)&&(t=i.data.detail[0].msg),e(t)}}}},84306:function(e,i,t){"use strict";t.d(i,{V:function(){return l}});var s=t(24246),n=t(13577);let l=()=>{let e=(0,n.pmc)();return{errorAlert:(i,t,l)=>{let r={...l,position:(null==l?void 0:l.position)||"top",render:e=>{let{onClose:l}=e;return(0,s.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(n.zMQ,{}),(0,s.jsxs)(n.xuv,{children:[t&&(0,s.jsx)(n.CdC,{children:t}),(0,s.jsx)(n.XaZ,{children:i})]}),(0,s.jsx)(n.PZ7,{onClick:l,position:"relative",right:0,size:"sm",top:-1})]})}};(null==l?void 0:l.id)&&e.isActive(l.id)?e.update(l.id,r):e(r)},successAlert:(i,t,l)=>{let r={...l,position:(null==l?void 0:l.position)||"top",render:e=>{let{onClose:l}=e;return(0,s.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(n.zMQ,{}),(0,s.jsxs)(n.xuv,{children:[t&&(0,s.jsx)(n.CdC,{children:t}),(0,s.jsx)(n.XaZ,{children:i})]}),(0,s.jsx)(n.PZ7,{onClick:l,position:"relative",right:0,size:"sm",top:-1})]})}};(null==l?void 0:l.id)&&e.isActive(l.id)?e.update(l.id,r):e(r)}}}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return c}});var s=t(24246),n=t(13577),l=t(79894),r=t.n(l),a=t(27378);let{Text:o}=n.AntTypography,c=e=>{let{items:i,...t}=e,l=(0,a.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let l=t===i.length-1,a={...e},c=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:a.title})),c)?a.title=(0,s.jsx)(n.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,s.jsx)(r(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[i]);return(0,s.jsx)(n.zrq,{items:l,...t})}},71784:function(e,i,t){"use strict";t.d(i,{DE:function(){return o},I3:function(){return n},kN:function(){return r},qX:function(){return a},rE:function(){return l}});var s=t(73825);let n=[...new Map([[s.q2.APPROVED,"Approved"],[s.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[s.q2.CANCELED,"Canceled"],[s.q2.COMPLETE,"Completed"],[s.q2.DENIED,"Denied"],[s.q2.ERROR,"Error"],[s.q2.IN_PROCESSING,"In progress"],[s.q2.PENDING,"New"],[s.q2.PAUSED,"Paused"],[s.q2.IDENTITY_UNVERIFIED,"Unverified"],[s.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[i,t]=e;return{label:t,value:i}}),l=new Map([[s.Us.ACCESS,"Access"],[s.Us.ERASURE,"Erasure"],[s.Us.CONSENT,"Consent"],[s.Us.UPDATE,"Update"]]),r=[...l].map(e=>{let[i,t]=e;return{label:t,value:i}}),a={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3",gcs:"gcs"}},61463:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return _}});var s=t(24246),n=t(13577),l=t(27378),r=t(812),a=t(14047),o=t(77213),c=t(77830),d=t(58754),u=t(7426),m=t(71784),p=t(90867),x=t(34090),h=t(40324),j=e=>{let{messagingDetails:i}=e,{successAlert:t}=(0,a.V)(),{handleError:l}=(0,a.H)(),[o]=(0,p.SU)(),c=i.service_type===m.qX.twilio_email||i.service_type===m.qX.mailgun,d=i.service_type===m.qX.twilio_text,u=async e=>{if(c){let i=await o({email:e.email});(0,r.D4)(i)?l(i.error):t("Test message successfully sent.")}if(d){let i=await o({phone_number:e.phone});(0,r.D4)(i)?l(i.error):t("Test message successfully sent.")}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{mt:10}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,mb:5,children:"Test connection"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{email:"",phone:""},onSubmit:u,children:e=>{let{isSubmitting:i,resetForm:t}=e;return(0,s.jsxs)(x.l0,{children:[c?(0,s.jsx)(h.j0,{name:"email",label:"Email",placeholder:"youremail@domain.com",isRequired:!0}):null,d?(0,s.jsx)(h.j0,{name:"phone",label:"Phone",placeholder:"+10000000000",isRequired:!0}):null,(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]})},g=()=>{var e;let{successAlert:i}=(0,a.V)(),[t,o]=(0,l.useState)(""),{handleError:c}=(0,a.H)(),{data:d}=(0,p.S3)({type:m.qX.mailgun}),[u]=(0,p.h9)(),[g]=(0,p.iI)(),y=async e=>{let t=await u({service_type:m.qX.mailgun,details:{is_eu_domain:"false",domain:e.domain}});(0,r.D4)(t)?c(t.error):(i("Mailgun email successfully updated. You can now enter your security key."),o("apiKey"))},v=async e=>{let t=await g({details:{mailgun_api_key:e.api_key},service_type:m.qX.mailgun});(0,r.D4)(t)?c(t.error):(i("Mailgun security key successfully updated."),o("testConnection"))},f={domain:null!==(e=null==d?void 0:d.details.domain)&&void 0!==e?e:""};return(0,s.jsxs)(n.xuv,{children:[(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Mailgun messaging configuration"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:f,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(n.Kqy,{mt:5,spacing:5,children:(0,s.jsx)(h.j0,{name:"domain",label:"Domain",placeholder:"Enter domain","data-testid":"option-twilio-domain",isRequired:!0})}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:t,className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{htmlType:"submit",disabled:i,type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"apiKey"===t||"testConnection"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{mt:10}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:t,className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===t?(0,s.jsx)(j,{messagingDetails:d||{service_type:m.qX.mailgun}}):null]})},y=()=>{var e;let[i,t]=(0,l.useState)(""),{successAlert:o}=(0,a.V)(),{handleError:c}=(0,a.H)(),{data:d}=(0,p.S3)({type:m.qX.twilio_email}),[u]=(0,p.h9)(),[g]=(0,p.iI)(),y=async e=>{let i=await u({service_type:m.qX.twilio_email,details:{twilio_email_from:e.email}});(0,r.D4)(i)?c(i.error):(o("Twilio email successfully updated. You can now enter your security key."),t("configureTwilioEmailSecrets"))},v=async e=>{let i=await g({details:{twilio_api_key:e.api_key},service_type:m.qX.twilio_email});(0,r.D4)(i)?c(i.error):(o("Twilio email secrets successfully updated."),t("testConnection"))},f={email:null!==(e=null==d?void 0:d.details.twilio_email_from)&&void 0!==e?e:""};return(0,s.jsxs)(n.xuv,{children:[(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio Email messaging configuration"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:f,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(n.Kqy,{mt:5,spacing:5,children:(0,s.jsx)(h.j0,{name:"email",label:"Email",placeholder:"Enter email",isRequired:!0})}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"configureTwilioEmailSecrets"===i||"testConnection"===i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{mt:10}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsx)(n.Kqy,{mt:5,spacing:5,children:(0,s.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0})}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===i?(0,s.jsx)(j,{messagingDetails:d||{service_type:m.qX.twilio_email}}):null]})},v=()=>{let{successAlert:e}=(0,a.V)(),{handleError:i}=(0,a.H)(),[t,o]=(0,l.useState)(""),{data:c}=(0,p.S3)({type:"twilio_text"}),[d]=(0,p.iI)(),u=async t=>{let s=await d({details:{twilio_account_sid:t.account_sid,twilio_auth_token:t.auth_token,twilio_messaging_service_sid:t.messaging_service_sid,twilio_sender_phone_number:t.phone},service_type:m.qX.twilio_text});(0,r.D4)(s)?i(s.error):(e("Twilio text secrets successfully updated."),o("testConnection"))};return(0,s.jsxs)(n.xuv,{children:[(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio SMS messaging configuration"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(x.J9,{initialValues:{account_sid:"",auth_token:"",messaging_service_sid:"",phone:""},onSubmit:u,enableReinitialize:!0,children:e=>{let{isSubmitting:i,handleReset:t}=e;return(0,s.jsxs)(x.l0,{children:[(0,s.jsxs)(n.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(h.j0,{name:"account_sid",label:"Account SID",placeholder:"Enter account SID",isRequired:!0}),(0,s.jsx)(h.j0,{name:"auth_token",label:"Auth token",placeholder:"Enter auth token",type:"password",isRequired:!0}),(0,s.jsx)(h.j0,{name:"messaging_service_sid",label:"Messaging Service SID",placeholder:"Enter messaging service SID"}),(0,s.jsx)(h.j0,{name:"phone",label:"Phone Number",placeholder:"Enter phone number"})]}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>t(),className:"mr-2",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:i,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"testConnection"===t?(0,s.jsx)(j,{messagingDetails:c||{service_type:m.qX.twilio_text}}):null]})},f=()=>{let{successAlert:e}=(0,a.V)(),{handleError:i}=(0,a.H)(),[t,x]=(0,l.useState)(""),[h]=(0,p.h9)(),[j]=(0,u.L)(),{data:f}=(0,p.JE)();(0,l.useEffect)(()=>{f&&x(null==f?void 0:f.service_type)},[f]);let _=async t=>{let{value:s}=t.target,n=await j({notifications:{notification_service_type:s,send_request_completion_notification:!0,send_request_receipt_notification:!0,send_request_review_notification:!0},execution:{subject_identity_verification_required:!0}});if((0,r.D4)(n))i(n.error);else if(s!==m.qX.twilio_text)x(s);else{let t=await h({service_type:m.qX.twilio_text});(0,r.D4)(t)?i(t.error):(e("Messaging provider saved successfully."),x(s))}};return(0,s.jsxs)(o.Z,{title:"Configure Privacy Requests - Messaging",children:[(0,s.jsx)(d.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Configure requests",href:c.fz},{title:"Messaging"}]}),(0,s.jsx)(n.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure your messaging provider"}),(0,s.jsxs)(n.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,s.jsxs)(n.xuv,{children:["Fides requires a messsaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,s.jsx)(n.xvT,{as:"span",color:"complimentary.500",children:"documentation"})," ","to setup a messaging service that Fides supports. Ensure you have completed the setup for the preferred messaging provider and have the details handy prior to the following steps."]}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose service type to configure"}),(0,s.jsx)(n.y02.Group,{onChange:_,value:t,"data-testid":"privacy-requests-messaging-provider-selection",className:"p-3",children:(0,s.jsxs)(n.jqI,{children:[(0,s.jsx)(n.y02,{value:m.qX.mailgun,"data-testid":"option-mailgun",children:"Mailgun Email"},m.qX.mailgun),(0,s.jsx)(n.y02,{value:m.qX.twilio_email,"data-testid":"option-twilio-email",children:"Twilio Email"},m.qX.twilio_email),(0,s.jsx)(n.y02,{value:m.qX.twilio_text,"data-testid":"option-twilio-sms",children:"Twilio SMS"},m.qX.twilio_text)]})}),t===m.qX.mailgun?(0,s.jsx)(g,{}):null,t===m.qX.twilio_email?(0,s.jsx)(y,{}):null,t===m.qX.twilio_text?(0,s.jsx)(v,{}):null]})]})},_=()=>(0,s.jsx)(f,{})}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=13687)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return i(64665)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var s=i(24246),a=i(13577),r=i(88038),l=i.n(r),n=i(86677);i(27378);var o=i(25980),d=i(90867),c=i(77830),u=()=>{let e=(0,n.useRouter)();return(0,s.jsx)(a.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(a.xuv,{children:[(0,s.jsxs)(a.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(a.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(a.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,s.jsxs)(a.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:c}=e,m=(0,o.hz)(),h=(0,n.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(m.flags.privacyRequestsConfiguration&&p),{data:j}=(0,d.JE)(void 0,{skip:x}),{data:v}=(0,d.PW)(void 0,{skip:x}),_=m.flags.privacyRequestsConfiguration&&(!j||!v)&&p;return(0,s.jsxs)(a.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(l(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(a.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[_?(0,s.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var s=i(24246),a=i(13577),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:n,rightContent:o,style:d,...c}=e;return(0,s.jsxs)("div",{...c,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,s.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(a.lQT,{className:i||n?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,s.jsx)(r.m,{className:n?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),n]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return d}});var s=i(24246),a=i(13577),r=i(34090),l=i(27378),n=i(46238),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:m="inline",helperText:h,...p}=e,[x,j,{setValue:v}]=(0,r.U$)(t),_=!!(j.touched&&j.error),[g,f]=(0,l.useState)("");x.value||"tags"!==p.mode&&"multiple"!==p.mode||(x.value=[]),"tags"===p.mode&&"string"==typeof x.value&&(x.value=[x.value]);let y="tags"===p.mode?(e,t)=>e?e.value!==g||x.value.includes(g)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:p.optionRender||void 0,b=e=>{f(e),p.onSearch&&p.onSearch(e)},k=(e,t)=>{v(e),p.onChange&&p.onChange(e,t)};return"inline"===m?(0,s.jsx)(a.NIc,{isInvalid:_,isRequired:u,children:(0,s.jsxs)(a.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,s.jsx)(o.__,{htmlFor:p.id||t,...d,children:i}):null,(0,s.jsxs)(a.jqI,{align:"center",children:[(0,s.jsxs)(a.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,s.jsx)(a.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:y,onSearch:"tags"===p.mode?b:void 0,onChange:k,value:x.value||void 0,status:_?"error":void 0}),h&&(0,s.jsx)(a.Q6r,{children:h}),(0,s.jsx)(o.Bc,{isInvalid:_,message:j.error,fieldName:x.name})]}),(0,s.jsx)(n.b,{label:c,className:_?"mt-2 self-start":void 0})]})]})}):(0,s.jsx)(a.NIc,{isInvalid:_,isRequired:u,children:(0,s.jsxs)(a.gCW,{alignItems:"start",children:[(0,s.jsxs)(a.jqI,{align:"center",children:[i?(0,s.jsx)(o.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,(0,s.jsx)(n.b,{label:c})]}),(0,s.jsx)(a.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:y,onSearch:"tags"===p.mode?b:void 0,onChange:k,value:x.value||void 0,status:_?"error":void 0}),h&&(0,s.jsx)(a.Q6r,{style:{marginTop:0},children:h}),(0,s.jsx)(o.Bc,{isInvalid:_,message:j.error,fieldName:x.name})]})})}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return s.V}});var s=i(84306),a=i(812);let r=()=>{let{errorAlert:e}=(0,s.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,a.Ot)(t)?i=t.data.detail:(0,a.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var s=i(24246),a=i(13577);let r=()=>{let e=(0,a.pmc)();return{errorAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(a.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(a.zMQ,{}),(0,s.jsxs)(a.xuv,{children:[i&&(0,s.jsx)(a.CdC,{children:i}),(0,s.jsx)(a.XaZ,{children:t})]}),(0,s.jsx)(a.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)},successAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(a.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(a.zMQ,{}),(0,s.jsxs)(a.xuv,{children:[i&&(0,s.jsx)(a.CdC,{children:i}),(0,s.jsx)(a.XaZ,{children:t})]}),(0,s.jsx)(a.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var s=i(24246),a=i(13577),r=i(79894),l=i.n(r),n=i(27378);let{Text:o}=a.AntTypography,d=e=>{let{items:t,...i}=e,r=(0,n.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,n={...e},d=n.onClick&&!n.href;return("string"==typeof n.title&&(n.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:n.title})),d)?n.title=(0,s.jsx)(a.wpx,{type:"text",size:"small",icon:n.icon,onClick:n.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:n.title}):(n.icon&&(n.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:n.icon}),n.title]})),n.href&&n.title&&(n.title=(0,s.jsx)(l(),{href:n.href,className:"ant-breadcrumb-link",children:n.title}),delete n.href)),n}),[t]);return(0,s.jsx)(a.zrq,{items:r,...i})}},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return a},kN:function(){return l},qX:function(){return n},rE:function(){return r}});var s=i(68309);let a=[...new Map([[s.q2.APPROVED,"Approved"],[s.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[s.q2.CANCELED,"Canceled"],[s.q2.COMPLETE,"Completed"],[s.q2.DENIED,"Denied"],[s.q2.ERROR,"Error"],[s.q2.IN_PROCESSING,"In progress"],[s.q2.PENDING,"New"],[s.q2.PAUSED,"Paused"],[s.q2.IDENTITY_UNVERIFIED,"Unverified"],[s.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[s.Us.ACCESS,"Access"],[s.Us.ERASURE,"Erasure"],[s.Us.CONSENT,"Consent"],[s.Us.UPDATE,"Update"]]),l=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),n={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3",gcs:"gcs"}},64665:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return f}});var s=i(24246),a=i(13577),r=i(27378),l=i(812),n=i(14047),o=i(77213),d=i(77830),c=i(58754),u=i(7426),m=i(71784),h=i(90867),p=i(34090),x=i(97181),j=i(40324),v=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[v,_]=(0,r.useState)(""),[g]=(0,h.gC)(),[f]=(0,h.cf)(),{handleError:y}=(0,n.H)(),{successAlert:b}=(0,n.V)(),k={type:m.DE.gcs,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},C=async e=>{let t=await g({type:m.DE.gcs,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,l.D4)(t)?y(t.error):(_(e.auth_method),b("Google Cloud Storage credentials successfully updated."))},q=async e=>{let t=e.private_key.trim();t.includes("\\n")&&(t=t.replace(/\\n/g,"\n"));let i=await f({details:{type:e.type,project_id:e.project_id,private_key_id:e.private_key_id,private_key:t,client_email:e.client_email,client_id:e.client_id,auth_uri:e.auth_uri,token_uri:e.token_uri,auth_provider_x509_cert_url:e.auth_provider_x509_cert_url,client_x509_cert_url:e.client_x509_cert_url,universe_domain:e.universe_domain},type:m.DE.gcs});(0,l.D4)(i)?y(i.error):b("Google Cloud Storage secrets successfully updated.")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Google Cloud Storage configuration"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:k,onSubmit:C,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(x.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(x.d,{name:"auth_method",label:"Auth method",options:[{label:"Service Account Keys",value:"service_account_keys"},{label:"Application Default Credentials",value:"adc"}],"data-testid":"auth_method",isRequired:!0}),(0,s.jsx)(j.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"service_account_keys"===v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.izJ,{mt:5}),(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:{type:"",project_id:"",private_key_id:"",private_key:"",client_email:"",client_id:"",auth_uri:"",token_uri:"",auth_provider_x509_cert_url:"",client_x509_cert_url:"",universe_domain:""},onSubmit:q,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(j.j0,{name:"type",label:"Type"}),(0,s.jsx)(j.j0,{name:"project_id",label:"Project ID"}),(0,s.jsx)(j.j0,{name:"private_key_id",label:"Private key ID",type:"password"}),(0,s.jsx)(j.j0,{name:"private_key",label:"Private key",type:"password"}),(0,s.jsx)(j.j0,{name:"client_email",label:"Client email"}),(0,s.jsx)(j.j0,{name:"client_id",label:"Client ID"}),(0,s.jsx)(j.j0,{name:"auth_uri",label:"Auth URI"}),(0,s.jsx)(j.j0,{name:"token_uri",label:"Token URI"}),(0,s.jsx)(j.j0,{name:"auth_provider_x509_cert_url",label:"Auth provider x509 cert URL"}),(0,s.jsx)(j.j0,{name:"client_x509_cert_url",label:"Client x509 cert URL"}),(0,s.jsx)(j.j0,{name:"universe_domain",label:"Universe domain"})]}),(0,s.jsxs)(a.xuv,{mt:10,children:[(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]})]})},_=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[v,_]=(0,r.useState)(""),[g]=(0,h.gC)(),[f]=(0,h.cf)(),{handleError:y}=(0,n.H)(),{successAlert:b}=(0,n.V)(),k={type:m.DE.s3,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},C=async e=>{let t=await g({type:m.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,l.D4)(t)?y(t.error):(_(e.auth_method),b("S3 storage credentials successfully updated."))},q=async e=>{let t=await f({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:m.DE.s3});(0,l.D4)(t)?y(t.error):b("S3 storage secrets successfully updated.")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"S3 storage configuration"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:k,onSubmit:C,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(x.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(x.d,{name:"auth_method",label:"Auth method",options:[{label:"secret_keys",value:"secret_keys"},{label:"automatic",value:"automatic"}],"data-testid":"auth_method",isRequired:!0}),(0,s.jsx)(j.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"secret_keys"===v?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.izJ,{mt:5}),(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:q,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(j.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,s.jsx)(j.j0,{name:"aws_secret_access_key",label:"AWS secret access key",type:"password"})]}),(0,s.jsxs)(a.xuv,{mt:10,children:[(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null]})},g=()=>{let{successAlert:e}=(0,n.V)(),{handleError:t}=(0,n.H)(),[i,p]=(0,r.useState)(""),{data:x}=(0,h.PW)(),{data:j}=(0,h.Au)({type:i}),[g,{isLoading:f}]=(0,h.gC)(),[y]=(0,u.L)();(0,r.useEffect)(()=>{x&&p(x.type)},[x]);let b=async i=>{let{value:s}=i.target;if(s===m.DE.local){let i=await g({type:s,details:{},format:"json"});(0,l.D4)(i)?t(i.error):e("Configured storage details successfully.")}let a=await y({storage:{active_default_storage_type:s}});(0,l.D4)(a)?t(a.error):p(s)},k={s3:_,gcs:v}[i];return(0,s.jsxs)(o.Z,{title:"Configure Privacy Requests - Storage",children:[(0,s.jsx)(c.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:d.Jw},{title:"Configure requests",href:d.fz},{title:"Storage"}]}),(0,s.jsx)(a.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure storage"}),(0,s.jsxs)(a.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,s.jsx)(a.xuv,{mb:5,children:"Fides requires a storage destination to store and share the results of privacy requests. For a production setup, it is highly recommended to have S3 as a storage destination. Ensure you have completed the setup for the storage destination and have the details handy prior to the following steps."}),(0,s.jsxs)(a.xuv,{children:["To configure a Storage destination, first choose a method to store your results. Fides currently supports"," ",(0,s.jsx)(a.xvT,{as:"span",color:"complimentary.500",children:"Local"}),", ",(0,s.jsx)(a.xvT,{as:"span",color:"complimentary.500",children:"S3"})," ","and"," ",(0,s.jsx)(a.xvT,{as:"span",color:"complimentary.500",children:"GCS"})," ","storage methods."]}),(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose storage type to configure"}),(0,s.jsx)(a.y02.Group,{disabled:f,onChange:b,value:i,"data-testid":"privacy-requests-storage-selection",className:"p-3",children:(0,s.jsxs)(a.jqI,{children:[(0,s.jsx)(a.y02,{value:"local","data-testid":"option-local",children:"Local"},"local"),(0,s.jsx)(a.y02,{value:"s3","data-testid":"option-s3",children:"S3"},"s3"),(0,s.jsx)(a.y02,{value:"gcs","data-testid":"option-gcs",children:"GCS"},"gcs")]})}),k&&j&&(0,s.jsx)(k,{storageDetails:j})]})]})},f=()=>(0,s.jsx)(g,{})}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return i(64665)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var s=i(24246),a=i(13577),r=i(88038),l=i.n(r),n=i(86677);i(27378);var o=i(25980),d=i(90867),c=i(77830),u=()=>{let e=(0,n.useRouter)();return(0,s.jsx)(a.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(a.xuv,{children:[(0,s.jsxs)(a.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(a.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(a.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,s.jsxs)(a.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:c}=e,m=(0,o.hz)(),h=(0,n.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(m.flags.privacyRequestsConfiguration&&p),{data:j}=(0,d.JE)(void 0,{skip:x}),{data:v}=(0,d.PW)(void 0,{skip:x}),_=m.flags.privacyRequestsConfiguration&&(!j||!v)&&p;return(0,s.jsxs)(a.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(l(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(a.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[_?(0,s.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var s=i(24246),a=i(13577),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:n,rightContent:o,style:d,...c}=e;return(0,s.jsxs)("div",{...c,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,s.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(a.lQT,{className:i||n?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,s.jsx)(r.m,{className:n?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),n]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return d}});var s=i(24246),a=i(13577),r=i(34090),l=i(27378),n=i(46238),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:m="inline",helperText:h,...p}=e,[x,j,{setValue:v}]=(0,r.U$)(t),_=!!(j.touched&&j.error),[g,f]=(0,l.useState)("");x.value||"tags"!==p.mode&&"multiple"!==p.mode||(x.value=[]),"tags"===p.mode&&"string"==typeof x.value&&(x.value=[x.value]);let y="tags"===p.mode?(e,t)=>e?e.value!==g||x.value.includes(g)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:p.optionRender||void 0,b=e=>{f(e),p.onSearch&&p.onSearch(e)},k=(e,t)=>{v(e),p.onChange&&p.onChange(e,t)};return"inline"===m?(0,s.jsx)(a.NIc,{isInvalid:_,isRequired:u,children:(0,s.jsxs)(a.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,s.jsx)(o.__,{htmlFor:p.id||t,...d,children:i}):null,(0,s.jsxs)(a.jqI,{align:"center",children:[(0,s.jsxs)(a.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,s.jsx)(a.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:y,onSearch:"tags"===p.mode?b:void 0,onChange:k,value:x.value||void 0,status:_?"error":void 0}),h&&(0,s.jsx)(a.Q6r,{children:h}),(0,s.jsx)(o.Bc,{isInvalid:_,message:j.error,fieldName:x.name})]}),(0,s.jsx)(n.b,{label:c,className:_?"mt-2 self-start":void 0})]})]})}):(0,s.jsx)(a.NIc,{isInvalid:_,isRequired:u,children:(0,s.jsxs)(a.gCW,{alignItems:"start",children:[(0,s.jsxs)(a.jqI,{align:"center",children:[i?(0,s.jsx)(o.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,(0,s.jsx)(n.b,{label:c})]}),(0,s.jsx)(a.WPr,{...x,id:p.id||t,"data-testid":"controlled-select-".concat(x.name),...p,optionRender:y,onSearch:"tags"===p.mode?b:void 0,onChange:k,value:x.value||void 0,status:_?"error":void 0}),h&&(0,s.jsx)(a.Q6r,{style:{marginTop:0},children:h}),(0,s.jsx)(o.Bc,{isInvalid:_,message:j.error,fieldName:x.name})]})})}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return s.V}});var s=i(84306),a=i(812);let r=()=>{let{errorAlert:e}=(0,s.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,a.Ot)(t)?i=t.data.detail:(0,a.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var s=i(24246),a=i(13577);let r=()=>{let e=(0,a.pmc)();return{errorAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(a.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(a.zMQ,{}),(0,s.jsxs)(a.xuv,{children:[i&&(0,s.jsx)(a.CdC,{children:i}),(0,s.jsx)(a.XaZ,{children:t})]}),(0,s.jsx)(a.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)},successAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(a.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(a.zMQ,{}),(0,s.jsxs)(a.xuv,{children:[i&&(0,s.jsx)(a.CdC,{children:i}),(0,s.jsx)(a.XaZ,{children:t})]}),(0,s.jsx)(a.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var s=i(24246),a=i(13577),r=i(79894),l=i.n(r),n=i(27378);let{Text:o}=a.AntTypography,d=e=>{let{items:t,...i}=e,r=(0,n.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,n={...e},d=n.onClick&&!n.href;return("string"==typeof n.title&&(n.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:n.title})),d)?n.title=(0,s.jsx)(a.wpx,{type:"text",size:"small",icon:n.icon,onClick:n.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:n.title}):(n.icon&&(n.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:n.icon}),n.title]})),n.href&&n.title&&(n.title=(0,s.jsx)(l(),{href:n.href,className:"ant-breadcrumb-link",children:n.title}),delete n.href)),n}),[t]);return(0,s.jsx)(a.zrq,{items:r,...i})}},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return a},kN:function(){return l},qX:function(){return n},rE:function(){return r}});var s=i(73825);let a=[...new Map([[s.q2.APPROVED,"Approved"],[s.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[s.q2.CANCELED,"Canceled"],[s.q2.COMPLETE,"Completed"],[s.q2.DENIED,"Denied"],[s.q2.ERROR,"Error"],[s.q2.IN_PROCESSING,"In progress"],[s.q2.PENDING,"New"],[s.q2.PAUSED,"Paused"],[s.q2.IDENTITY_UNVERIFIED,"Unverified"],[s.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[s.Us.ACCESS,"Access"],[s.Us.ERASURE,"Erasure"],[s.Us.CONSENT,"Consent"],[s.Us.UPDATE,"Update"]]),l=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),n={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3",gcs:"gcs"}},64665:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return f}});var s=i(24246),a=i(13577),r=i(27378),l=i(812),n=i(14047),o=i(77213),d=i(77830),c=i(58754),u=i(7426),m=i(71784),h=i(90867),p=i(34090),x=i(97181),j=i(40324),v=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[v,_]=(0,r.useState)(""),[g]=(0,h.gC)(),[f]=(0,h.cf)(),{handleError:y}=(0,n.H)(),{successAlert:b}=(0,n.V)(),k={type:m.DE.gcs,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},C=async e=>{let t=await g({type:m.DE.gcs,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,l.D4)(t)?y(t.error):(_(e.auth_method),b("Google Cloud Storage credentials successfully updated."))},q=async e=>{let t=e.private_key.trim();t.includes("\\n")&&(t=t.replace(/\\n/g,"\n"));let i=await f({details:{type:e.type,project_id:e.project_id,private_key_id:e.private_key_id,private_key:t,client_email:e.client_email,client_id:e.client_id,auth_uri:e.auth_uri,token_uri:e.token_uri,auth_provider_x509_cert_url:e.auth_provider_x509_cert_url,client_x509_cert_url:e.client_x509_cert_url,universe_domain:e.universe_domain},type:m.DE.gcs});(0,l.D4)(i)?y(i.error):b("Google Cloud Storage secrets successfully updated.")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Google Cloud Storage configuration"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:k,onSubmit:C,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(x.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(x.d,{name:"auth_method",label:"Auth method",options:[{label:"Service Account Keys",value:"service_account_keys"},{label:"Application Default Credentials",value:"adc"}],"data-testid":"auth_method",isRequired:!0}),(0,s.jsx)(j.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"service_account_keys"===v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.izJ,{mt:5}),(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:{type:"",project_id:"",private_key_id:"",private_key:"",client_email:"",client_id:"",auth_uri:"",token_uri:"",auth_provider_x509_cert_url:"",client_x509_cert_url:"",universe_domain:""},onSubmit:q,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(j.j0,{name:"type",label:"Type"}),(0,s.jsx)(j.j0,{name:"project_id",label:"Project ID"}),(0,s.jsx)(j.j0,{name:"private_key_id",label:"Private key ID",type:"password"}),(0,s.jsx)(j.j0,{name:"private_key",label:"Private key",type:"password"}),(0,s.jsx)(j.j0,{name:"client_email",label:"Client email"}),(0,s.jsx)(j.j0,{name:"client_id",label:"Client ID"}),(0,s.jsx)(j.j0,{name:"auth_uri",label:"Auth URI"}),(0,s.jsx)(j.j0,{name:"token_uri",label:"Token URI"}),(0,s.jsx)(j.j0,{name:"auth_provider_x509_cert_url",label:"Auth provider x509 cert URL"}),(0,s.jsx)(j.j0,{name:"client_x509_cert_url",label:"Client x509 cert URL"}),(0,s.jsx)(j.j0,{name:"universe_domain",label:"Universe domain"})]}),(0,s.jsxs)(a.xuv,{mt:10,children:[(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]})]})},_=e=>{var t,i,o,d,c;let{storageDetails:u}=e,[v,_]=(0,r.useState)(""),[g]=(0,h.gC)(),[f]=(0,h.cf)(),{handleError:y}=(0,n.H)(),{successAlert:b}=(0,n.V)(),k={type:m.DE.s3,auth_method:null!==(o=null==u?void 0:null===(t=u.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==u?void 0:null===(i=u.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(c=null==u?void 0:u.format)&&void 0!==c?c:""},C=async e=>{let t=await g({type:m.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,l.D4)(t)?y(t.error):(_(e.auth_method),b("S3 storage credentials successfully updated."))},q=async e=>{let t=await f({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:m.DE.s3});(0,l.D4)(t)?y(t.error):b("S3 storage secrets successfully updated.")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"S3 storage configuration"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:k,onSubmit:C,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(x.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(x.d,{name:"auth_method",label:"Auth method",options:[{label:"secret_keys",value:"secret_keys"},{label:"automatic",value:"automatic"}],"data-testid":"auth_method",isRequired:!0}),(0,s.jsx)(j.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"secret_keys"===v?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.izJ,{mt:5}),(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,s.jsx)(a.Kqy,{children:(0,s.jsx)(p.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:q,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(p.l0,{children:[(0,s.jsxs)(a.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(j.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,s.jsx)(j.j0,{name:"aws_secret_access_key",label:"AWS secret access key",type:"password"})]}),(0,s.jsxs)(a.xuv,{mt:10,children:[(0,s.jsx)(a.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(a.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null]})},g=()=>{let{successAlert:e}=(0,n.V)(),{handleError:t}=(0,n.H)(),[i,p]=(0,r.useState)(""),{data:x}=(0,h.PW)(),{data:j}=(0,h.Au)({type:i}),[g,{isLoading:f}]=(0,h.gC)(),[y]=(0,u.L)();(0,r.useEffect)(()=>{x&&p(x.type)},[x]);let b=async i=>{let{value:s}=i.target;if(s===m.DE.local){let i=await g({type:s,details:{},format:"json"});(0,l.D4)(i)?t(i.error):e("Configured storage details successfully.")}let a=await y({storage:{active_default_storage_type:s}});(0,l.D4)(a)?t(a.error):p(s)},k={s3:_,gcs:v}[i];return(0,s.jsxs)(o.Z,{title:"Configure Privacy Requests - Storage",children:[(0,s.jsx)(c.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:d.Jw},{title:"Configure requests",href:d.fz},{title:"Storage"}]}),(0,s.jsx)(a.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure storage"}),(0,s.jsxs)(a.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,s.jsx)(a.xuv,{mb:5,children:"Fides requires a storage destination to store and share the results of privacy requests. For a production setup, it is highly recommended to have S3 as a storage destination. Ensure you have completed the setup for the storage destination and have the details handy prior to the following steps."}),(0,s.jsxs)(a.xuv,{children:["To configure a Storage destination, first choose a method to store your results. Fides currently supports"," ",(0,s.jsx)(a.xvT,{as:"span",color:"complimentary.500",children:"Local"}),", ",(0,s.jsx)(a.xvT,{as:"span",color:"complimentary.500",children:"S3"})," ","and"," ",(0,s.jsx)(a.xvT,{as:"span",color:"complimentary.500",children:"GCS"})," ","storage methods."]}),(0,s.jsx)(a.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose storage type to configure"}),(0,s.jsx)(a.y02.Group,{disabled:f,onChange:b,value:i,"data-testid":"privacy-requests-storage-selection",className:"p-3",children:(0,s.jsxs)(a.jqI,{children:[(0,s.jsx)(a.y02,{value:"local","data-testid":"option-local",children:"Local"},"local"),(0,s.jsx)(a.y02,{value:"s3","data-testid":"option-s3",children:"S3"},"s3"),(0,s.jsx)(a.y02,{value:"gcs","data-testid":"option-gcs",children:"GCS"},"gcs")]})}),k&&j&&(0,s.jsx)(k,{storageDetails:j})]})]})},f=()=>(0,s.jsx)(g,{})}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2369],{56141:function(e,t,s){var l=s(32866);e.exports=function(e,t){return l(e,t)}},1565:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests",function(){return s(15273)}])},35287:function(e,t,s){"use strict";var l=s(24246),i=s(13577),a=s(88038),r=s.n(a);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:a}=e;return(0,l.jsxs)(i.kCb,{"data-testid":s,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,l.jsxs)(r(),{children:[(0,l.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,l.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,l.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,l.jsx)(i.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 l=s(24246),i=s(13577);t.Z=e=>{let{title:t,text:s,onClose:a}=e;return(0,l.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderRadius:"md",justifyContent:"space-between",py:4,pr:6,pl:3,"data-testid":"empty-state",gap:2,position:"relative",children:[a&&(0,l.jsx)(i.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:a}),(0,l.jsx)(i.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,l.jsxs)(i.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,l.jsx)(i.X6q,{fontSize:"md",children:t}),(0,l.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:s})]})]})}},96718:function(e,t,s){"use strict";s.d(t,{z:function(){return a}});var l=s(24246),i=s(13577);let a=e=>{let{...t}=e,s="multiple"===t.mode;return(0,l.jsx)(i.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,dropdownStyle:s?void 0:{width:"auto",minWidth:"200px"},className:"w-auto","data-testid":"filter-select",...t})}},97181:function(e,t,s){"use strict";s.d(t,{d:function(){return o}});var l=s(24246),i=s(13577),a=s(34090),r=s(27378),n=s(46238),d=s(40324);let o=e=>{let{name:t,label:s,labelProps:o,tooltip:u,isRequired:c,layout:p="inline",helperText:m,...h}=e,[x,y,{setValue:v}]=(0,a.U$)(t),j=!!(y.touched&&y.error),[f,_]=(0,r.useState)("");x.value||"tags"!==h.mode&&"multiple"!==h.mode||(x.value=[]),"tags"===h.mode&&"string"==typeof x.value&&(x.value=[x.value]);let g="tags"===h.mode?(e,t)=>e?e.value!==f||x.value.includes(f)?h.optionRender?h.optionRender(e,t):e.label:'Create "'.concat(f,'"'):void 0:h.optionRender||void 0,b=e=>{_(e),h.onSearch&&h.onSearch(e)},C=(e,t)=>{v(e),h.onChange&&h.onChange(e,t)};return"inline"===p?(0,l.jsx)(i.NIc,{isInvalid:j,isRequired:c,children:(0,l.jsxs)(i.rjZ,{templateColumns:s?"1fr 3fr":"1fr",children:[s?(0,l.jsx)(d.__,{htmlFor:h.id||t,...o,children:s}):null,(0,l.jsxs)(i.jqI,{align:"center",children:[(0,l.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(i.WPr,{...x,id:h.id||t,"data-testid":"controlled-select-".concat(x.name),...h,optionRender:g,onSearch:"tags"===h.mode?b:void 0,onChange:C,value:x.value||void 0,status:j?"error":void 0}),m&&(0,l.jsx)(i.Q6r,{children:m}),(0,l.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:x.name})]}),(0,l.jsx)(n.b,{label:u,className:j?"mt-2 self-start":void 0})]})]})}):(0,l.jsx)(i.NIc,{isInvalid:j,isRequired:c,children:(0,l.jsxs)(i.gCW,{alignItems:"start",children:[(0,l.jsxs)(i.jqI,{align:"center",children:[s?(0,l.jsx)(d.__,{htmlFor:h.id||t,fontSize:"xs",my:0,mr:1,...o,children:s}):null,(0,l.jsx)(n.b,{label:u})]}),(0,l.jsx)(i.WPr,{...x,id:h.id||t,"data-testid":"controlled-select-".concat(x.name),...h,optionRender:g,onSearch:"tags"===h.mode?b:void 0,onChange:C,value:x.value||void 0,status:j?"error":void 0}),m&&(0,l.jsx)(i.Q6r,{style:{marginTop:0},children:m}),(0,l.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:x.name})]})})}},71784:function(e,t,s){"use strict";s.d(t,{DE:function(){return d},I3:function(){return i},kN:function(){return r},qX:function(){return n},rE:function(){return a}});var l=s(73825);let i=[...new Map([[l.q2.APPROVED,"Approved"],[l.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[l.q2.CANCELED,"Canceled"],[l.q2.COMPLETE,"Completed"],[l.q2.DENIED,"Denied"],[l.q2.ERROR,"Error"],[l.q2.IN_PROCESSING,"In progress"],[l.q2.PENDING,"New"],[l.q2.PAUSED,"Paused"],[l.q2.IDENTITY_UNVERIFIED,"Unverified"],[l.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,s]=e;return{label:s,value:t}}),a=new Map([[l.Us.ACCESS,"Access"],[l.Us.ERASURE,"Erasure"],[l.Us.CONSENT,"Consent"],[l.Us.UPDATE,"Update"]]),r=[...a].map(e=>{let[t,s]=e;return{label:s,value:t}}),n={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},d={local:"local",s3:"s3",gcs:"gcs"}},15273:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eT}});var l,i,a=s(24246),r=s(35287),n=s(13577),d=s(65218),o=s.n(d),u=s(27378),c=s(25980),p=s(19904),m=s(56141),h=s.n(m),x=s(86677),y=s(16134),v=s(91317),j=s(18225),f=s(77830),_=s(28407),g=s(42904),b=s(16394),C=s(73825),q=s(59969),k=s(71784),S=s(45116);let E=e=>{let{label:t,children:s}=e;return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"shrink-0 grow-0 basis-1/3 pr-2",children:(0,a.jsxs)(n.AntTypography.Text,{className:"text-gray-700",children:[t,":"]})}),(0,a.jsx)("div",{className:"min-w-0 shrink grow text-gray-600",children:s})]})},w=e=>{let{task:t}=e,s=t.request_type===C.k6.ACCESS?C.Us.ACCESS:C.Us.ERASURE,l=k.rE.get(s)||t.request_type;return(0,a.jsxs)("div",{className:"flex flex-col space-y-3","data-testid":"task-details-container",children:[(0,a.jsx)(E,{label:"Name",children:(0,a.jsx)(n.AntTypography.Text,{children:t.name})}),(0,a.jsx)(E,{label:"Description",children:(0,a.jsx)(n.AntTypography.Text,{children:t.description||"-"})}),(0,a.jsx)(E,{label:"Request Type",children:(0,a.jsx)(n.AntTypography.Text,{children:l})}),(0,a.jsx)(E,{label:"Assigned To",children:t.assigned_users&&t.assigned_users.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-1","data-testid":"assigned-users-tags",children:t.assigned_users.map(e=>(0,a.jsx)(n.j8w,{"data-testid":"assigned-user-tag-".concat(e.id),children:"".concat(e.first_name||""," ").concat(e.last_name||"").trim()||e.email_address||"Unknown User"},e.id))}):(0,a.jsx)(n.AntTypography.Text,{children:"No one assigned"})}),t.privacy_request.subject_identities&&Object.keys(t.privacy_request.subject_identities).length>0?(0,a.jsx)(E,{label:"Subject identities",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:Object.entries(t.privacy_request.subject_identities).map(e=>{let[t,s]=e;return(0,a.jsxs)(n.j8w,{children:[t,": ",String(s)]},t)})})}):null,t.privacy_request.custom_fields&&Object.keys(t.privacy_request.custom_fields).length>0?(0,a.jsx)(E,{label:"Custom fields",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:Object.entries(t.privacy_request.custom_fields).filter(e=>{let[,t]=e;return t}).map(e=>{let[t,s]=e;return(0,a.jsxs)(n.j8w,{children:[t,": ",s]},t)})})}):null]})},R=e=>{let{isOpen:t,onClose:s,task:l}=e,[i,{isLoading:r}]=(0,S.HP)(),[d,o]=(0,u.useState)(""),[c,p]=(0,u.useState)(!1),[m,h]=(0,u.useState)(""),[x,y]=(0,u.useState)([]),v=async()=>{try{await i({privacy_request_id:l.privacy_request.id,manual_field_id:l.manual_field_id,field_key:l.manual_field_id,field_value:l.input_type===C.PF.TEXT?d:l.input_type===C.PF.CHECKBOX?c.toString():void 0,comment_text:m||void 0,attachment:x.length>0?x[0].originFileObj:void 0}).unwrap(),o(""),p(!1),h(""),y([]),s()}catch(e){n.Pg3.error("Failed to complete task. Please try again.")}};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"700px",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{maxWidth:"700px","data-testid":"complete-task-modal",children:[(0,a.jsx)(n.xBx,{children:(0,a.jsx)(n.AntTypography.Title,{level:4,children:"Complete Task"})}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,a.jsx)("div",{children:(0,a.jsx)(w,{task:l})}),(0,a.jsx)(n.htM,{}),(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(()=>{switch(l.input_type){case C.PF.TEXT:return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Subject data"}),(0,a.jsx)(n.uFc.TextArea,{value:d,onChange:e=>o(e.target.value),placeholder:"Enter your response...",rows:4,"data-testid":"complete-modal-text-input"})]});case C.PF.CHECKBOX:return(0,a.jsx)("div",{className:"space-y-2",children:(0,a.jsx)(n.E_O,{checked:c,onChange:e=>p(e.target.checked),"data-testid":"complete-modal-checkbox",children:"The task has been completed"})});default:return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Upload File"}),(0,a.jsx)("div",{children:(0,a.jsx)(n.pMK,{fileList:x,onChange:e=>{let{fileList:t}=e;return y(t)},beforeUpload:()=>!1,"data-testid":"complete-modal-file-upload",children:(0,a.jsx)(n.wpx,{"data-testid":"complete-modal-upload-button",children:"Click to Upload"})})})]})}})(),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Internal comment"}),(0,a.jsx)(n.uFc.TextArea,{value:m,onChange:e=>h(e.target.value),placeholder:"Add any additional comments...",rows:3,"data-testid":"complete-modal-comment-input"})]})]})})]})}),(0,a.jsx)(n.mzw,{children:(0,a.jsxs)(n.vyj,{children:[(0,a.jsx)(n.wpx,{onClick:()=>{o(""),p(!1),h(""),y([]),s()},disabled:r,"data-testid":"complete-modal-cancel-button",children:"Cancel"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:v,loading:r,disabled:!(()=>{switch(l.input_type){case C.PF.TEXT:return d.trim().length>0;case C.PF.CHECKBOX:return c;default:return x.length>0}})(),"data-testid":"complete-modal-save-button",children:"Save"})]})})]})]})},T=e=>{let{isOpen:t,onClose:s,task:l}=e,[i,{isLoading:r}]=(0,S.DA)(),[d,o]=(0,u.useState)(""),c=async()=>{try{await i({privacy_request_id:l.privacy_request.id,manual_field_id:l.manual_field_id,field_key:l.manual_field_id,skip_reason:d}).unwrap(),o(""),s()}catch(e){n.Pg3.error("Failed to skip task. Please try again.")}};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"700px",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{maxWidth:"700px","data-testid":"skip-task-modal",children:[(0,a.jsx)(n.xBx,{children:(0,a.jsx)(n.AntTypography.Title,{level:4,children:"Skip Task"})}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,a.jsx)("div",{children:(0,a.jsx)(w,{task:l})}),(0,a.jsx)(n.htM,{}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"flex flex-col space-y-4",children:(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Reason for skipping (Required)"}),(0,a.jsx)(n.uFc.TextArea,{value:d,onChange:e=>o(e.target.value),placeholder:"Please provide a reason for skipping this task...",rows:4,"data-testid":"skip-modal-comment-input"})]})})})]})}),(0,a.jsx)(n.mzw,{children:(0,a.jsxs)(n.vyj,{children:[(0,a.jsx)(n.wpx,{onClick:()=>{o(""),s()},disabled:r,"data-testid":"skip-modal-cancel-button",children:"Cancel"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:c,loading:r,disabled:!d.trim(),danger:!0,"data-testid":"skip-modal-skip-button",children:"Skip Task"})]})})]})]})},A=e=>{let{task:t}=e,s=(0,x.useRouter)(),{isOpen:l,onOpen:i,onClose:r}=(0,n.qY0)(),{isOpen:d,onOpen:o,onClose:u}=(0,n.qY0)(),c=(0,p.Tg)([C.Sh.PRIVACY_REQUEST_READ]);if(t.status!==C.OS.NEW)return null;let m=[{key:"skip",label:"Skip task",onClick:o}];return c&&m.push({key:"go-to-request",label:"Go to request",onClick:()=>{s.push({pathname:f.ld,query:{id:t.privacy_request.id}})}}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.vyj,{size:"small",children:[(0,a.jsx)(n.wpx,{type:"default",onClick:i,size:"small",children:"Complete"}),(0,a.jsx)(n.S0p,{menu:{items:m},trigger:["click"],placement:"bottomRight",overlayStyle:{minWidth:120},children:(0,a.jsx)(n.wpx,{size:"small",icon:(0,a.jsx)(n.PJP.r43,{}),"aria-label":"More actions"})})]}),(0,a.jsx)(R,{isOpen:l,onClose:r,task:t}),(0,a.jsx)(T,{isOpen:d,onClose:u,task:t})]})},I={[C.OS.NEW]:{color:"info",label:"New"},[C.OS.COMPLETED]:{color:"success",label:"Completed"},[C.OS.SKIPPED]:{color:"marble",label:"Skipped"}},P=[{text:"New",value:C.OS.NEW},{text:"Completed",value:C.OS.COMPLETED},{text:"Skipped",value:C.OS.SKIPPED}],N=[{text:"Access",value:C.k6.ACCESS},{text:"Erasure",value:C.k6.ERASURE}],O=e=>{let{systemFilters:t,userFilters:s,onUserClick:l,currentFilters:i,hasAccessToAllTasks:r}=e,d=[{title:"Task name",dataIndex:"name",key:"name",width:300,render:e=>(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:e},children:e})},{title:"Status",dataIndex:"status",key:"status",width:120,render:e=>(0,a.jsx)(n.j8w,{color:I[e].color,"data-testid":"manual-task-status-tag",children:I[e].label}),filters:P,filterMultiple:!1},{title:"System",dataIndex:["system","name"],key:"system_name",width:210,filters:t,filterMultiple:!1},{title:"Type",dataIndex:"request_type",key:"request_type",width:150,render:e=>{let t=e===C.k6.ACCESS?C.Us.ACCESS:C.Us.ERASURE,s=k.rE.get(t)||e;return(0,a.jsx)(n.AntTypography.Text,{children:s})},filters:N,filterMultiple:!1},{title:"Assigned to",dataIndex:"assigned_users",key:"assigned_users",width:380,render:e=>{if(!e||0===e.length)return(0,a.jsx)(n.AntTypography.Text,{children:"-"});let t=e.map(e=>({label:(0,b.gJ)(e),value:e.id})),s=e.map(e=>e.id);return(0,a.jsx)(n.d3V,{value:s,options:t,readonly:!0,onTagClick:e=>l(String(e))})},filters:s,filterMultiple:!1,defaultFilteredValue:i.assignedUsers?[i.assignedUsers]:void 0},{title:"Days left",dataIndex:["privacy_request","days_left"],key:"days_left",width:140,render:e=>(0,a.jsx)(q.Z,{daysLeft:e||0,includeText:!1,status:C.q2.PENDING})},{title:"Subject identity",dataIndex:["privacy_request","subject_identities"],key:"subject_identities",width:200,render:e=>{if(!e)return(0,a.jsx)(n.AntTypography.Text,{children:"-"});let t=e.email||e.phone_number||"";return(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:t},children:t})}},{title:"Actions",key:"actions",width:120,render:(e,t)=>(0,a.jsx)(A,{task:t})}];return r?d:d.filter(e=>"assigned_users"!==e.key)},U=()=>{let e=(0,x.useRouter)(),t=(0,y.C)(v.dy),[s,l]=(0,u.useState)(1),[i,r]=(0,u.useState)(25),d=(0,p.Tg)([C.Sh.MANUAL_FIELD_READ_ALL]),o=e.query.privacy_request_id||void 0,c=(0,u.useMemo)(()=>{let e={};return(null==t?void 0:t.id)&&!o&&(e.assignedUsers=t.id),o&&"string"==typeof o&&(e.privacyRequestId=o),e},[null==t?void 0:t.id,o]),[m,q]=(0,u.useState)(c),{data:k,isLoading:E,isFetching:w}=(0,S.Ym)({page:s,size:i,status:m.status,systemName:m.systemName,requestType:m.requestType,assignedUserId:m.assignedUsers,privacyRequestId:m.privacyRequestId}),{data:R}=(0,S.Ym)({page:1,size:1}),{items:T,total:A}=(0,u.useMemo)(()=>k||{items:[],total:0,pages:0,filter_options:{assigned_users:[],systems:[]}},[k]),I=(0,u.useMemo)(()=>(null==R?void 0:R.filter_options)||{assigned_users:[],systems:[]},[R]),P=O({systemFilters:(0,u.useMemo)(()=>{var e;return(null==I?void 0:null===(e=I.systems)||void 0===e?void 0:e.map(e=>({text:e.name,value:e.name})))||[]},[null==I?void 0:I.systems]),userFilters:(0,u.useMemo)(()=>{var e;let s=(null==I?void 0:null===(e=I.assigned_users)||void 0===e?void 0:e.map(e=>({text:(0,b.gJ)(e),value:e.id})))||[];return(null==t?void 0:t.id)&&!(null==t?void 0:t.id.startsWith("fid_"))&&s.push({text:(null==t?void 0:t.username)||(null==t?void 0:t.id),value:t.id}),s},[null==I?void 0:I.assigned_users,null==t?void 0:t.id,null==t?void 0:t.username]),onUserClick:t=>{e.push({pathname:f.fw,query:{id:t}})},currentFilters:m,hasAccessToAllTasks:d}),N=(0,u.useMemo)(()=>h()(m,c),[m,c]);return E?(0,a.jsx)(j.Z,{}):(0,a.jsxs)("div",{className:"mt-2 space-y-4",children:[(0,a.jsx)(n.kCb,{gap:3,align:"center",className:"mb-4",children:(0,a.jsx)(_.H,{globalFilter:m.privacyRequestId||"",setGlobalFilter:e=>{let t={...m};e&&e.trim()?t.privacyRequestId=e.trim():delete t.privacyRequestId,q(t),l(1)},placeholder:"Search by privacy request ID",testid:"privacy-request-id-filter"})}),(0,a.jsx)(n.V5H,{columns:P,dataSource:T,rowKey:e=>"".concat(e.privacy_request.id,"-").concat(e.manual_field_id),pagination:{current:s,pageSize:i,total:A||0,showSizeChanger:!0,pageSizeOptions:g.W3,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," items"),onChange:(e,t)=>{l(e),t!==i&&(r(t),l(1))}},onChange:(e,t)=>{let s={privacyRequestId:m.privacyRequestId};t.status&&([s.status]=t.status),t.system_name&&([s.systemName]=t.system_name),t.request_type&&([s.requestType]=t.request_type),t.assigned_users&&([s.assignedUsers]=t.assigned_users),q(s),l(1)},locale:{emptyText:N?(0,a.jsx)("div",{"data-testid":"empty-state-current-user",className:"my-4",children:(0,a.jsx)(n.AntTypography.Paragraph,{children:'You have no tasks assigned. You can modify the "Assigned to" column filter to view tasks assigned to other users.'})}):(0,a.jsx)("div",{"data-testid":"empty-state",className:"my-4",children:"No results found."})},loading:E||w})]})};var D=s(59003),F=s(92222),z=s(16125),M=s(14048),Z=s(47935),L=s(90867);let V={approved:{colorScheme:"success",label:"Approved"},complete:{label:"Completed",colorScheme:"success"},awaiting_email_send:{label:"Awaiting Email Send",colorScheme:"marble"},denied:{label:"Denied",colorScheme:"warning"},canceled:{label:"Canceled",colorScheme:"marble"},error:{label:"Error",colorScheme:"error"},in_processing:{label:"In Progress",colorScheme:"caution"},paused:{label:"Paused",colorScheme:"marble"},pending:{label:"New",colorScheme:"info"},identity_unverified:{label:"Unverified",colorScheme:"marble"},requires_input:{colorScheme:"minos",label:"Requires Input"}},Y=e=>{let{value:t}=e;return(0,a.jsx)(Z.A4,{color:V[t].colorScheme,value:V[t].label,"data-testid":"request-status-badge"})},W=e=>{let t,{daysLeft:s,timeframe:l=45,status:i,includeText:r=!1}=e;if(null==s||i===C.q2.COMPLETE||i===C.q2.CANCELED||i===C.q2.DENIED||i===C.q2.IDENTITY_UNVERIFIED)return null;let n=100*s/l;return n<25?t="error":n>=75?t="success":n>=25&&(t="warning"),(0,a.jsx)(Z.A4,{value:r?"".concat(s," days left"):s.toString(),color:t})},B=e=>Array.from(new Set(e.filter(e=>Object.values(C.Us).includes(e.action_type)).map(e=>e.action_type))),G=e=>{let{value:t}=e,s=B(t).map(e=>k.rE.get(e));return(0,a.jsx)(Z.WP,{value:s,cellState:{isExpanded:!0}})};var K=s(58452),X=s(57526),H=s(66548),Q=s(45489);let J=e=>{let{subjectRequest:t,...s}=e,l=(0,n.qY0)(),i=(0,n.qY0)(),r=(0,n.qY0)(),{handleApproveRequest:d,handleDenyRequest:o,handleDeleteRequest:u,isLoading:c}=(0,Q.Z)({subjectRequest:t});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Ugi,{...s,children:["pending"!==t.status?null:(0,a.jsx)(n.wpx,{title:"Approve","aria-label":"Approve",icon:(0,a.jsx)(n.PJP.MCw,{}),onClick:l.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-approve-btn",size:"small"}),"pending"!==t.status?null:(0,a.jsx)(n.wpx,{title:"Deny","aria-label":"Deny",icon:(0,a.jsx)(n.PJP.x8P,{}),onClick:i.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-deny-btn",size:"small"}),(0,a.jsx)(p.ZP,{scopes:[C.Sh.PRIVACY_REQUEST_DELETE],children:(0,a.jsx)(n.wpx,{title:"Delete","aria-label":"Delete",icon:(0,a.jsx)(n.PJP.ZNm,{size:14}),onClick:r.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-delete-btn",size:"small"})})]}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(X.Z,{isOpen:l.isOpen,isLoading:c,onClose:l.onClose,onApproveRequest:d,subjectRequest:t})}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(H.Z,{isOpen:i.isOpen,onClose:i.onClose,onDenyRequest:o})}),(0,a.jsx)(K.Z,{isOpen:r.isOpen,onClose:r.onClose,onConfirm:u,message:(0,a.jsx)(n.xvT,{children:"You are about to permanently delete the privacy request. Are you sure you would like to continue?"})})]})};(l=i||(i={})).STATUS="status",l.DAYS_LEFT="due_date",l.SOURCE="source",l.REQUEST_TYPE="request_type",l.SUBJECT_IDENTITY="subject_identity",l.TIME_RECEIVED="created_at",l.CREATED_BY="created_by",l.REVIEWER="reviewer",l.ID="id",l.ACTIONS="actions";let $=(0,F.Cl)(),ee=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return[$.accessor(e=>e.status,{id:"status",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(Y,{value:t()})},header:e=>(0,a.jsx)(Z.Rr,{value:"Status",...e})}),$.accessor(e=>e.days_left,{id:"due_date",cell:e=>{let{row:t,getValue:s}=e;return(0,a.jsx)(W,{daysLeft:s(),timeframe:t.original.policy.execution_timeframe,status:t.original.status})},header:e=>(0,a.jsx)(Z.Rr,{value:"Days left",...e})}),...e?[$.accessor(e=>e.source,{id:"source",cell:e=>e.getValue()?(0,a.jsx)(Z.A4,{value:e.getValue()}):(0,a.jsx)(Z.G3,{value:void 0}),header:e=>(0,a.jsx)(Z.Rr,{value:"Source",...e}),enableSorting:!1})]:[],$.accessor(e=>e.policy.rules,{id:"request_type",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(G,{value:t()})},header:e=>(0,a.jsx)(Z.Rr,{value:"Request type",...e}),enableSorting:!1}),$.accessor(e=>{var t,s;return(null===(t=e.identity)||void 0===t?void 0:t.email.value)||(null===(s=e.identity)||void 0===s?void 0:s.phone_number.value)||""},{id:"subject_identity",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(Z.G3,{value:t()})},header:e=>(0,a.jsx)(Z.Rr,{value:"Subject identity",...e}),enableSorting:!1}),$.accessor(e=>e.created_at,{id:"created_at",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(Z.G3,{value:(0,b.p6)(t())})},header:e=>(0,a.jsx)(Z.Rr,{value:"Time received",...e})}),$.accessor(e=>{var t;return(null===(t=e.reviewer)||void 0===t?void 0:t.username)||""},{id:"reviewer",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(Z.G3,{value:t()})},header:e=>(0,a.jsx)(Z.Rr,{value:"Reviewed by",...e}),enableSorting:!1}),$.accessor(e=>e.id,{id:"id",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(Z.G3,{value:t()})},header:e=>(0,a.jsx)(Z.Rr,{value:"Request ID",...e}),enableSorting:!1}),$.display({id:"actions",cell:e=>{let{row:t}=e;return(0,a.jsx)(J,{subjectRequest:t.original})},header:e=>(0,a.jsx)(Z.Rr,{value:"Actions",...e}),meta:{disableRowClick:!0}})]},et=e=>{let t=(0,z.v9)(L.dp),s=(0,z.I0)();return{handleStatusChange:t=>{s((0,L.CI)(t)),e()},handleActionTypeChange:t=>{s((0,L.aM)(t)),e()},handleFromChange:t=>{s((0,L.su)(null==t?void 0:t.target.value)),e()},handleToChange:t=>{s((0,L.Ue)(null==t?void 0:t.target.value)),e()},handleClearAllFilters:()=>{s((0,L.Mk)()),e()},...t}};var es=s(96718);let el=e=>{let{onClose:t,onFilterChange:s,...l}=e,{handleStatusChange:i,handleActionTypeChange:r,handleFromChange:d,handleToChange:o,handleClearAllFilters:u,from:c,to:p,status:m,action_type:h}=et(s);return(0,a.jsxs)(n.u_l,{onClose:t,size:"xl",...l,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsx)(n.xBx,{borderBottomWidth:1,borderBottomColor:"gray.200",children:"All Filters"}),(0,a.jsx)(n.olH,{}),(0,a.jsx)(n.fef,{py:4,sx:{"& label":{mb:0}},children:(0,a.jsxs)(n.Kqy,{gap:4,children:[(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",id:"request-date-range-label",children:"Date range"}),(0,a.jsxs)(n.Ugi,{gap:3,children:[(0,a.jsxs)(n.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(n.UiE,{as:"label",htmlFor:"from-date",borderRadius:"md",children:"From"}),(0,a.jsx)(n.IIB,{type:"date",name:"From",value:c,max:p||void 0,onChange:d,borderRadius:"md",id:"from-date","aria-describedby":"request-date-range-label"})]}),(0,a.jsxs)(n.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(n.UiE,{as:"label",htmlFor:"to-date",borderRadius:"md",children:"To"}),(0,a.jsx)(n.IIB,{type:"date",borderRadius:"md",name:"To",value:p,min:c||void 0,onChange:o,id:"to-date","aria-describedby":"request-date-range-label"})]})]})]}),(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",htmlFor:"request-status",children:"Status"}),(0,a.jsx)(es.z,{id:"request-status",mode:"multiple",options:k.I3,value:m,onChange:i,"data-testid":"request-status-filter"})]}),(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",htmlFor:"request-action-type",children:"Request Type"}),(0,a.jsx)(es.z,{id:"request-action-type",mode:"multiple",options:k.kN,value:h,onChange:r,"data-testid":"request-action-type-filter"})]})]})}),(0,a.jsxs)(n.mzw,{justifyContent:"space-between",children:[(0,a.jsx)(n.wpx,{type:"text",onClick:u,children:"Clear all"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:t,children:"Done"})]})]})]})},ei=e=>{let{...t}=e,{plus:s}=(0,c.hz)(),[l,i]=(0,u.useState)(""),r=(0,z.v9)(L.dp),d=(0,z.v9)(v.rK),o=(0,n.pmc)(),p=(0,x.useRouter)(),m=(0,z.I0)(),{PAGE_SIZES:h,pageSize:y,setPageSize:j,onPreviousPageClick:f,isPreviousPageDisabled:_,onNextPageClick:g,isNextPageDisabled:b,startRange:C,endRange:q,pageIndex:k,setTotalPages:S,resetPageIndexToDefault:E}=(0,Z.oi)(),{isOpen:w,onOpen:R,onClose:T}=(0,n.qY0)(),{data:A,isLoading:I,isFetching:P}=(0,L.QA)({...r,page:k,size:y}),{items:N,total:O}=(0,u.useMemo)(()=>{let e=A||{items:[],total:0,pages:0};return S(e.pages),e},[A,S]),U=(0,u.useCallback)(e=>{m((0,L.mU)(e)),i(e),E()},[m,E,i]),V=async()=>{let e;try{await (0,L.py)({...r,token:d})}catch(t){e=t instanceof Error?t.message:"Unknown error occurred"}e&&o({description:"".concat(e),duration:5e3,status:"error"})},Y=e=>{p.push("/privacy-requests/".concat(e))},W=(0,D.b7)({getCoreRowModel:(0,F.sC)(),data:N,columns:(0,u.useMemo)(()=>ee(s),[s]),getRowId:e=>"".concat(e.status,"-").concat(e.id),manualPagination:!0,columnResizeMode:"onChange"});return(0,a.jsxs)(n.xuv,{...t,children:[(0,a.jsxs)(Z.Q$,{children:[(0,a.jsx)(Z.HO,{globalFilter:l,setGlobalFilter:U,placeholder:"Search by request ID or identity value"}),(0,a.jsxs)(n.Ugi,{alignItems:"center",spacing:2,children:[(0,a.jsx)(n.wpx,{"data-testid":"filter-btn",onClick:R,children:"Filter"}),(0,a.jsx)(n.wpx,{"aria-label":"Export report","data-testid":"export-btn",icon:(0,a.jsx)(M.nM,{ml:"1.5px"}),onClick:V})]}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(el,{isOpen:w,onClose:T,onFilterChange:E})})]}),I?(0,a.jsx)(n.xuv,{p:2,borderWidth:1,children:(0,a.jsx)(Z.I4,{rowHeight:26,numRows:10})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Z.ZK,{tableInstance:W,onRowClick:e=>Y(e.id),onSort:e=>{if(!e){m((0,L.p2)()),E();return}let{id:t,desc:s}=e;m((0,L.PU)(t)),m((0,L.iX)(s?"desc":"asc")),E()}}),(0,a.jsx)(Z.s8,{totalRows:O||0,pageSizes:h,setPageSize:j,onPreviousPageClick:f,isPreviousPageDisabled:_||P,onNextPageClick:g,isNextPageDisabled:b||P,startRange:C,endRange:q})]})]})};var ea=s(812),er=s(87361),en=s(46628),ed=s(32885),eo=s(34090),eu=s(55484),ec=s(40324);let ep=(e,t)=>null==t?void 0:t.find(t=>t.policy_key===e),em=e=>{var t,s;if(!e)return eu.Ry().shape({policy_key:eu.Z_().required().label("Request type")});let l=e.custom_privacy_request_fields?Object.entries(e.custom_privacy_request_fields).map(e=>{let[t,s]=e;return{[t]:eu.Ry().shape({value:s.required&&!s.hidden?eu.Z_().required().label(s.label):eu.Z_().nullable()})}}).reduce((e,t)=>({...e,...t}),{}):{};return eu.Ry().shape({policy_key:eu.Z_().required().label("Request type"),identity:eu.Ry().shape({email:(null===(t=e.identity_inputs)||void 0===t?void 0:t.email)==="required"?eu.Z_().email().required().label("Email address"):eu.Z_().nullable(),phone_number:(null===(s=e.identity_inputs)||void 0===s?void 0:s.phone)==="required"?eu.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").required().label("Phone number"):eu.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").nullable()}),custom_privacy_request_fields:eu.Ry().shape(l)})};var eh=s(97181);let ex={is_verified:!1,policy_key:"",identity:{}},ey=e=>{let{identityInputs:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[t.email?(0,a.jsx)(ec.j0,{name:"identity.email",label:"User email address",isRequired:"required"===t.email,variant:"stacked"}):null,t.phone?(0,a.jsx)(ec.j0,{name:"identity.phone_number",label:"User phone number",isRequired:"required"===t.phone,variant:"stacked"}):null]}):null},ev=e=>{let{customFieldInputs:t}=e;if(!t)return null;let s=Object.entries(t);return(0,a.jsx)(a.Fragment,{children:s.map(e=>{let[t,s]=e;return(0,a.jsx)(ec.j0,{name:"custom_privacy_request_fields.".concat(t,".value"),label:s.label,isRequired:!!s.required,variant:"stacked"},t)})})},ej=e=>{let{onSubmit:t,onCancel:s,privacyCenterUrl:l}=e,{onCopy:i}=(0,n.VPI)(""),r=(0,n.pmc)();return(0,a.jsx)(eo.J9,{initialValues:{identity:{email:""}},onSubmit:e=>{i("".concat(l,"?email=").concat(encodeURIComponent(e.identity.email))),t(e),r({status:"success",description:"DSR Link Copied!"})},validationSchema:()=>eu.Ry().shape({identity:eu.Ry().shape({email:eu.Z_().email().required().label("Email Address")})}),children:e=>{let{dirty:t,isValid:l}=e;return(0,a.jsx)(eo.l0,{children:(0,a.jsxs)(n.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(ey,{identityInputs:{email:"required"}}),(0,a.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,a.jsx)(n.wpx,{onClick:s,children:"Cancel"}),(0,a.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!t||!l,"data-testid":"submit-btn",icon:(0,a.jsx)(n.xPt,{}),children:"Copy"})]})]})})}})};var ef=e=>{let{onSubmit:t,onCancel:s}=e,{data:l}=(0,L.xv)();return(0,a.jsx)(eo.J9,{initialValues:ex,onSubmit:t,validationSchema:()=>(0,eu.Vo)(e=>em(ep(e.policy_key,null==l?void 0:l.actions))),children:e=>{var t;let{values:i,dirty:r,isValid:d,isSubmitting:o,setFieldValue:u}=e,c=ep(i.policy_key,null==l?void 0:l.actions);return(0,a.jsx)(eo.l0,{children:(0,a.jsxs)(n.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(eh.d,{name:"policy_key",label:"Request type",options:null!==(t=null==l?void 0:l.actions.map(e=>({label:e.title,value:e.policy_key})))&&void 0!==t?t:[],onChange:e=>{let t=ep(e,null==l?void 0:l.actions);if(!(null==t?void 0:t.custom_privacy_request_fields)){u("custom_privacy_request_fields",void 0);return}u("custom_privacy_request_fields",Object.entries(t.custom_privacy_request_fields).map(e=>{let[t,s]=e;return{[t]:{label:s.label,value:s.default_value}}}).reduce((e,t)=>({...e,...t}),{}))},layout:"stacked",isRequired:!0}),(0,a.jsx)(ey,{identityInputs:null==c?void 0:c.identity_inputs}),(0,a.jsx)(ev,{customFieldInputs:null==c?void 0:c.custom_privacy_request_fields}),(0,a.jsx)(ec.Xl,{name:"is_verified",label:"I confirm that I have verified this user information"}),(0,a.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,a.jsx)(n.wpx,{onClick:s,children:"Cancel"}),(0,a.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!i.is_verified||!r||!d,loading:o,"data-testid":"submit-btn",children:"Create"})]})]})})}})},e_=s(31883);let eg=e=>{let{isOpen:t,onClose:s}=e,[l]=(0,L.M6)(),i=(0,n.pmc)(),r=async e=>{let{is_verified:t,...a}=e,r=a.custom_privacy_request_fields?Object.entries(a.custom_privacy_request_fields).map(e=>{let[t,s]=e;return s.value?{[t]:s}:{}}).reduce((e,t)=>({...e,...t}),{}):void 0,n={...a,custom_privacy_request_fields:r},d=await l([n]);(0,e_.D4)(d)?i((0,en.Vo)((0,ea.e$)(d.error,"An error occurred while creating this privacy request. Please try again"))):i((0,en.t5)("Privacy request created")),s()};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"2xl",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{"data-testid":"submit-request-modal",maxHeight:"80%",overflowY:"auto",children:[(0,a.jsx)(n.xBx,{children:"Create privacy request"}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)(n.Kqy,{spacing:4,children:[(0,a.jsx)(er.Z,{title:"Warning: You are bypassing identity verification",text:"You are bypassing Fides' built-in identity verification step. Please ensure that you are only entering information on behalf of a verified and approved user's privacy request."}),(0,a.jsx)(ef,{onSubmit:r,onCancel:()=>s()})]})})]})]})},eb=e=>{let{isOpen:t,onClose:s,privacyCenterUrl:l}=e;return(0,a.jsxs)(n.u_l,{size:"md",isOpen:t,onClose:s,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsx)(n.xBx,{children:"Create a Privacy Request Link"}),(0,a.jsxs)(n.fef,{children:[(0,a.jsx)(n.Kqy,{spacing:4}),(0,a.jsx)(ej,{privacyCenterUrl:l,onSubmit:s,onCancel:s})]})]})]})};var eC=()=>{var e;let[t,s]=(0,u.useState)("closed"),l=()=>s("closed"),{data:i}=(0,ed.Vh)(),r=(null!==(e=null==i?void 0:i.privacy_center_url)&&void 0!==e?e:"").trim(),d=r.length>0;return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsx)(eb,{isOpen:"create-link"===t,onClose:l,privacyCenterUrl:r}):null,(0,a.jsx)(eg,{isOpen:"submit-request"===t,onClose:l}),(0,a.jsx)(n.S0p.Button,{type:"primary",onClick:()=>s("submit-request"),"data-testid":"submit-request-btn",menu:{items:[{label:"Create request link",key:"create-request-link",icon:(0,a.jsx)(n.xPt,{}),onClick:()=>s("create-link"),disabled:!d}]},icon:(0,a.jsx)(n.v4q,{}),children:"Create request"})]})},eq=s(58754),ek=s(14047);let eS=()=>{let{errorAlert:e}=(0,ek.V)(),[t,s]=(0,u.useState)(!1),[l,i]=(0,u.useState)({count:0,total:0}),[r,d]=(0,u.useState)(!0),o=C.q2.ERROR,{data:c}=(0,L.tE)(),{data:p}=(0,L.QA)({status:[o]},{pollingInterval:15e3,skip:r});return(0,u.useEffect)(()=>{d(!(c&&c.notify_after_failures>0))},[c]),(0,u.useEffect)(()=>{let e=(null==p?void 0:p.total)||0;e>=((null==c?void 0:c.notify_after_failures)||0)&&e>l.total?(i({count:e-l.total,total:e}),s(!0)):s(!1)},[null==p?void 0:p.total,null==c?void 0:c.notify_after_failures,l.total]),{processing:()=>{t&&e((0,a.jsxs)(n.xuv,{children:["DSR automation has failed for"," ",(0,a.jsx)(n.xvT,{as:"span",fontWeight:"semibold",children:l.count})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null,id:"dsrErrorAlert"})}}};var eE=s(72281);let ew=o()(()=>s.e(9676).then(s.bind(s,59676)),{loadableGenerated:{webpack:()=>[59676]},loading:()=>(0,a.jsx)("div",{children:"Loading..."})});var eR=()=>{let{processing:e}=eS(),{plus:t}=(0,c.hz)(),{activeTab:s,handleTabChange:l,availableTabs:i}=(0,eE.d)();(0,u.useEffect)(()=>{e()},[e]);let r=(0,u.useMemo)(()=>{let e=[];return i.request&&e.push({key:eE.G.REQUEST,label:"Request",children:(0,a.jsx)(ei,{})}),i.manualTask&&e.push({key:eE.G.MANUAL_TASK,label:"Manual tasks",children:(0,a.jsx)(U,{})}),e},[i.manualTask,i.request]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eq.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests"}],rightContent:(0,a.jsxs)(n.vyj,{children:[t&&(0,a.jsx)(p.ZP,{scopes:[C.Sh.PRIVACY_REQUEST_CREATE],children:(0,a.jsx)(eC,{})}),(0,a.jsx)(ew,{})]}),"data-testid":"privacy-requests"}),(0,a.jsx)(n.A5g,{activeKey:s,onChange:l,items:r})]})},eT=()=>(0,a.jsx)(r.Z,{title:"Privacy Requests",children:(0,a.jsx)(eR,{})})},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return l.Bw},D4:function(){return l.D4}});var l=s(19043)},76737:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{default:function(){return n},noSSR:function(){return r}});let l=s(51538);s(24246),s(27378);let i=l._(s(21887));function a(e){return{default:(null==e?void 0:e.default)||e}}function r(e,t){return delete t.webpack,delete t.modules,e(t)}function n(e,t){let s=i.default,l={loading:e=>{let{error:t,isLoading:s,pastDelay:l}=e;return null}};e instanceof Promise?l.loader=()=>e:"function"==typeof e?l.loader=e:"object"==typeof e&&(l={...l,...e});let n=(l={...l,...t}).loader;return(l.loadableGenerated&&(l={...l,...l.loadableGenerated},delete l.loadableGenerated),"boolean"!=typeof l.ssr||l.ssr)?s({...l,loader:()=>null!=n?n().then(a):Promise.resolve(a(()=>null))}):(delete l.webpack,delete l.modules,r(s,l))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28438:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return l}});let l=s(51538)._(s(27378)).default.createContext(null)},21887:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});let l=s(51538)._(s(27378)),i=s(28438),a=[],r=[],n=!1;function d(e){let t=e(),s={loading:!0,loaded:null,error:null};return s.promise=t.then(e=>(s.loading=!1,s.loaded=e,e)).catch(e=>{throw s.loading=!1,s.error=e,e}),s}class o{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let s=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),a=null;function d(){if(!a){let t=new o(e,s);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!n){let e=s.webpack?s.webpack():s.modules;e&&r.push(t=>{for(let s of e)if(t.includes(s))return d()})}function u(e,t){!function(){d();let e=l.default.useContext(i.LoadableContext);e&&Array.isArray(s.modules)&&s.modules.forEach(t=>{e(t)})}();let r=l.default.useSyncExternalStore(a.subscribe,a.getCurrentValue,a.getCurrentValue);return l.default.useImperativeHandle(t,()=>({retry:a.retry}),[]),l.default.useMemo(()=>{var t;return r.loading||r.error?l.default.createElement(s.loading,{isLoading:r.loading,pastDelay:r.pastDelay,timedOut:r.timedOut,error:r.error,retry:a.retry}):r.loaded?l.default.createElement((t=r.loaded)&&t.default?t.default:t,e):null},[e,r])}return u.preload=()=>d(),u.displayName="LoadableComponent",l.default.forwardRef(u)}(d,e)}function c(e,t){let s=[];for(;e.length;){let l=e.pop();s.push(l(t))}return Promise.all(s).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(a).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let s=()=>(n=!0,t());c(r,e).then(s,s)})),window.__NEXT_PRELOADREADY=u.preloadReady;let p=u},65218:function(e,t,s){e.exports=s(76737)}},function(e){e.O(0,[2858,2866,203,2888,9774,179],function(){return e(e.s=1565)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9196],{67375:function(e,t,s){var a=s(52033),r=s(80068);e.exports=function(e,t){var s=-1,i=r(e)?Array(e.length):[];return a(e,function(e,a,r){i[++s]=t(e,a,r)}),i}},55807:function(e,t,s){var a=s(66070),r=s(89278),i=s(67375),o=s(19785);e.exports=function(e,t){return(o(e)?a:i)(e,r(t,3))}},32526:function(e,t,s){var a=s(68267)(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});e.exports=a},86548:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reporting/datamap",function(){return s(27901)}])},624:function(e,t,s){"use strict";var a=s(24246),r=s(13577),i=s(27378);let o=e=>{let t=e.split("."),s=[];return t.forEach(e=>{let t=s.length>0?s[s.length-1]:null;t?s.push("".concat(t,".").concat(e)):s.push(e)}),s},n=(e,t)=>{let s=o(t).filter(e=>e!==t);return e.filter(e=>s.includes(e)).length>0},l=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,s)=>{let a=null!=s?s:[];return e.forEach(e=>{e.children&&c(e.children,t,a),l(e.value,t)&&a.push(e)}),a},d=e=>{let{node:t,isChecked:s,onChecked:i,isExpanded:o,onExpanded:n,isIndeterminate:l,isDisabled:c,children:d}=e,{value:u,label:_}=t,p=!!t.children&&t.children.length>0;return(0,a.jsxs)(r.xuv,{children:[(0,a.jsxs)(r.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>n(t),minHeight:8,children:[(0,a.jsx)(r.XZJ,{colorScheme:"complimentary",value:u,isChecked:!l&&s,isIndeterminate:l,isDisabled:c,onChange:()=>i(t),mx:2,"data-testid":"checkbox-".concat(_),children:_}),p?(0,a.jsx)(r.wpx,{"data-testid":"expand-".concat(_),"aria-label":o?"collapse":"expand",icon:(0,a.jsx)(r.v4q,{boxSize:5}),type:"text",onClick:()=>n(t),className:o?"rotate-180":void 0}):null]}),d&&(0,a.jsx)(r.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:s,onSelected:u,..._}=e,[p,m]=(0,i.useState)([]),[E,S]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=Array.from(new Set([...s.map(e=>o(e)).reduce((e,t)=>e.concat(t),[]),...s.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));S(e),m(e)},[s,t]);let h=e=>{let a=[],r=[];p.indexOf(e.value)>=0?(a=p.filter(t=>!l(t,e.value)),r=s.filter(t=>!l(t,e.value))):(a=[...p,...c(t,e.value).map(e=>e.value)],r=[...s,e.value]),m(a),u(r)},A=e=>{E.indexOf(e.value)>=0?S(E.filter(t=>!l(t,e.value))):S([...E,e.value])},g=e=>{if(e.children){let r=p.indexOf(e.value)>=0,o=E.indexOf(e.value)>=0,l=c(t,e.value),u=r&&e.children.length>0&&p.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==l.length,_=n(s,e.value);return(0,a.jsx)(d,{node:e,isChecked:r,onChecked:h,isExpanded:o,onExpanded:A,isDisabled:_,isIndeterminate:u,children:o?e.children.map(e=>(0,a.jsx)(i.Fragment,{children:g(e)},e.value)):void 0})}return null};return(0,a.jsx)(r.xuv,{..._,children:t.map(e=>(0,a.jsx)(r.xuv,{children:g(e)},e.value))})}},35287:function(e,t,s){"use strict";var a=s(24246),r=s(13577),i=s(88038),o=s.n(i);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:i}=e;return(0,a.jsxs)(r.kCb,{"data-testid":s,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,a.jsxs)(o(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...i,children:t})]})}},56358:function(e,t,s){"use strict";s.d(t,{q:function(){return r}});var a=s(24246);let r=(0,s(13577).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,a.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},19904:function(e,t,s){"use strict";s.d(t,{Tg:function(){return o}});var a=s(24246),r=s(16134),i=s(31793);let o=e=>(0,r.C)(i.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:s}=e;return o(t)?(0,a.jsx)(a.Fragment,{children:s}):null}},70416:function(e,t,s){"use strict";s.d(t,{d:function(){return r}});var a=s(24246);let r=(0,s(13577).IUT)({displayName:"AddIcon",viewBox:"0 0 10 10",path:(0,a.jsx)("path",{d:"M4.33331 4.33398V0.333984H5.66665V4.33398H9.66665V5.66732H5.66665V9.66732H4.33331V5.66732H0.333313V4.33398H4.33331Z",fill:"currentColor"})})},34929:function(e,t,s){"use strict";var a=s(24246),r=s(64925),i=s.n(r),o=s(27378),n=s(16134),l=s(30002),c=s(28079),d=s(57072);let u=()=>{let{isLoading:e}=(0,c.fd)(),t=(0,n.C)(c.U3),{isLoading:s}=(0,d.MO)(),a=(0,n.C)(d.qb),{isLoading:r}=(0,l.te)();return{dataUses:t,dataSubjects:(0,n.C)(l.ZL),dataCategories:a,isLoading:e||s||r}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:s,isLoading:r}=u(),n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},l=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=t(e);if(!a)return{};let r=t(n(e,s)),i=!!a.parent_key;return{name:a.name||void 0,primaryName:i&&(null==r?void 0:r.name)!==a.name&&(null==r?void 0:r.name)||void 0}},c=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:i}=l(e,t,s);return r?i?(0,a.jsxs)(o.Fragment,{children:[(0,a.jsxs)("strong",{children:[i,":"]})," ",r]},e):(0,a.jsx)("strong",{children:r},e):e},d=t=>i()(e,{fides_key:t}),_=e=>i()(t,{fides_key:e}),p=e=>i()(s,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:d,getDataUseDisplayName:e=>c(e,d,1),getDataUseDisplayNameProps:e=>l(e,d,1),getDataCategories:()=>t,getDataCategoryByKey:_,getDataCategoryDisplayName:e=>c(e,_,2),getDataCategoryDisplayNameProps:e=>l(e,_,2),getDataSubjects:()=>s,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:n,isLoading:r}}},59001:function(e,t,s){"use strict";s.d(t,{Ch:function(){return o},Hy:function(){return n},Lo:function(){return r}});var a,r,i=s(68309);let o="root";(a=r||(r={})).DATA_CATEGORIES="Data categories",a.DATA_USES="Data uses",a.DATA_SUBJECTS="Data subjects";let n=e=>{switch(e){case"Data categories":return{UPDATE:i.Sh.DATA_CATEGORY_UPDATE,CREATE:i.Sh.DATA_CATEGORY_CREATE,DELETE:i.Sh.DATA_CATEGORY_DELETE,READ:i.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:i.Sh.DATA_USE_UPDATE,CREATE:i.Sh.DATA_USE_CREATE,DELETE:i.Sh.DATA_USE_DELETE,READ:i.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:i.Sh.DATA_SUBJECT_UPDATE,CREATE:i.Sh.DATA_SUBJECT_CREATE,DELETE:i.Sh.DATA_SUBJECT_DELETE,READ:i.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,s){"use strict";s.d(t,{Cd:function(){return i},Xl:function(){return o}});var a=s(68309),r=s(59001);let i=(e,t)=>{let s;if(null==t&&e.every(e=>void 0===e.parent_key))s=e;else{let a=null!=t?t:null;s=e.filter(e=>e.parent_key===a)}return s.map(t=>{var s,a;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!==(s=t.is_default)&&void 0!==s&&s,active:null!==(a=t.active)&&void 0!==a&&a}})},o=e=>{switch(e){case r.Lo.DATA_CATEGORIES:return a.P6.DATA_CATEGORY;case r.Lo.DATA_SUBJECTS:return a.P6.DATA_SUBJECT;case r.Lo.DATA_USES:return a.P6.DATA_USE;default:return}}},27901:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eC}});var a,r,i,o,n=s(24246),l=s(27378),c=s(35287),d=s(58754),u=s(71795),_=s(68309);(a=i||(i={})).COLUMN_EXPANSION_STATE="datamap-column-expansion-state",a.COLUMN_NAMES="datamap-column-names",a.COLUMN_ORDER="datamap-column-order",a.COLUMN_SIZING="datamap-column-sizing",a.COLUMN_VISIBILITY="datamap-column-visibility",a.CUSTOM_REPORT_ID="datamap-custom-report-id",a.FILTERS="datamap-filters",a.GROUP_BY="datamap-group-by",a.SORTING_STATE="datamap-sorting-state",a.WRAPPING_COLUMNS="datamap-wrapping-columns",(r=o||(o={})).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";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"},m={[o.SYSTEM_UNDECLARED_DATA_CATEGORIES]:!1,[o.DATA_USE_UNDECLARED_DATA_CATEGORIES]:!1},E={dataUses:[],dataSubjects:[],dataCategories:[]},S=(0,l.createContext)({}),h=e=>{let{children:t}=e,[s,a]=(0,u._)(i.CUSTOM_REPORT_ID,""),[r,o]=(0,u._)(i.GROUP_BY,_.fI.SYSTEM_DATA_USE),[c,d]=(0,u._)(i.FILTERS,E),[p,h]=(0,u._)(i.COLUMN_ORDER,[]),[A,g]=(0,u._)(i.COLUMN_VISIBILITY,m),[f,x]=(0,u._)(i.COLUMN_SIZING,{}),[C,T]=(0,u._)(i.COLUMN_NAMES,{}),R=(0,l.useMemo)(()=>({savedCustomReportId:s,setSavedCustomReportId:a,groupBy:r,setGroupBy:o,selectedFilters:c,setSelectedFilters:d,columnOrder:p,setColumnOrder:h,columnVisibility:A,setColumnVisibility:g,columnSizing:f,setColumnSizing:x,columnNameMapOverrides:C,setColumnNameMapOverrides:T}),[s,a,r,o,c,d,p,h,A,g,f,x,C,T]);return(0,n.jsx)(S.Provider,{value:R,children:t})},A=()=>{let e=(0,l.useContext)(S);if(!e||0===Object.keys(e).length)throw Error("useDatamapReport must be used within a DatamapReportProvider");return e};var g=s(59003),f=s(92222),x=s(47935),C=s(13577),T=s(34090),R=s(66726),O=s.n(R),j=s(16134),v=s(34929),b=s(14048),D=s(19904),y=s(16394),I=s(38943),N=s(35258),L=e=>{let{children:t,heading:s,onCancel:a,onConfirm:r,isLoading:i,cancelButtonText:o,continueButtonText:l,"data-testid":c="standard-dialog",...d}=e,{onClose:u}=d;return(0,n.jsxs)(C.u_l,{closeOnOverlayClick:i,...d,children:[(0,n.jsx)(C.ZAr,{}),(0,n.jsxs)(C.hzk,{"data-testid":c,children:[s&&(0,n.jsx)(C.xBx,{children:s}),(0,n.jsx)(C.olH,{isDisabled:i,"data-testid":"standard-dialog-close-btn"}),t&&(0,n.jsx)(C.fef,{children:t}),(0,n.jsxs)(C.mzw,{gap:3,width:"100%",sx:{"& button":{width:"100%"}},children:[(0,n.jsx)(C.wpx,{onClick:()=>{a&&a(),u()},"data-testid":"".concat(c?"".concat(c,"-"):"","cancel-btn"),disabled:i,children:o||"Cancel"}),(0,n.jsx)(C.wpx,{onClick:r,type:"primary","data-testid":"".concat(c?"".concat(c,"-"):"","continue-btn"),loading:i,children:l||"Continue"})]})]})]})},w=s(22968),M=e=>{let[t,s]=(0,l.useState)(w.T2.csv),{onConfirm:a}=e;return(0,n.jsx)(L,{heading:"Export report",continueButtonText:"Download",size:"xl",...e,onConfirm:()=>a(t),"data-testid":"export-modal",children:(0,n.jsxs)(C.kCb,{direction:"column",gap:3,pb:3,children:[(0,n.jsx)(C.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,n.jsxs)(C.NIc,{children:[(0,n.jsx)(C.lXp,{htmlFor:"format",children:"Choose Format"}),(0,n.jsx)(C.WPr,{id:"format",value:t,onChange:s,"data-testid":"export-format-select",options:[{value:w.T2.csv,label:"CSV"},{value:w.T2.xlsx,label:"XLSX"}],className:"w-full"})]})]})})},P=s(624),U=s(30002),k=s(28079),G=s(90673),H=s(39864);let Y=e=>{let{label:t,children:s,...a}=e;return(0,n.jsxs)(C.Qdk,{...a,children:[(0,n.jsx)(C.X6q,{children:(0,n.jsxs)(C.KFZ,{height:"100%","data-testid":"filter-modal-accordion-button",textAlign:"left",fontWeight:600,children:[(0,n.jsx)(C.xuv,{flex:1,children:t}),(0,n.jsx)(C.XEm,{boxSize:7})]})}),(0,n.jsx)(C.Hk3,{children:s})]})},F=e=>{let{columnNameMap:t,selectedFilters:s,onFilterChange:a,onClose:r,...i}=e;(0,k.fd)(),(0,U.te)(),(0,H.MO)();let{dataUses:o,dataSubjects:c,dataCategories:d}=s,u=(0,j.C)(k.U3),_=(0,j.C)(U.ZL),p=(0,j.C)(H.qb),[m,E]=(0,l.useState)(o),[S,h]=(0,l.useState)(c),[A,g]=(0,l.useState)(d);(0,l.useEffect)(()=>{E(o)},[o]),(0,l.useEffect)(()=>{h(c)},[c]),(0,l.useEffect)(()=>{g(d)},[d]);let f=(0,l.useMemo)(()=>(0,G.Cd)(u),[u]),x=(0,l.useMemo)(()=>(0,G.Cd)(_),[_]),T=(0,l.useMemo)(()=>(0,G.Cd)(p),[p]);return(0,n.jsx)(L,{heading:"Filter Datamap Report",...i,onCancel:()=>{E([]),h([]),g([]),a({dataUses:[],dataSubjects:[],dataCategories:[]}),r()},onConfirm:()=>{a({dataUses:m,dataSubjects:S,dataCategories:A}),r()},onClose:r,cancelButtonText:"Reset filters",continueButtonText:"Done","data-testid":"datamap-report-filter-modal",children:(0,n.jsxs)(C.UQy,{allowToggle:!0,children:[(0,n.jsx)(Y,{label:t.data_uses,children:(0,n.jsx)(P.ZP,{nodes:f,selected:m,onSelected:E,"data-testid":"filter-modal-checkbox-tree-uses"})}),(0,n.jsx)(Y,{label:t.data_categories,children:(0,n.jsx)(P.ZP,{nodes:T,selected:A,onSelected:g,"data-testid":"filter-modal-checkbox-tree-categories"})}),(0,n.jsx)(Y,{label:t.data_subjects,children:(0,n.jsx)(P.ZP,{nodes:x,selected:S,onSelected:h,"data-testid":"filter-modal-checkbox-tree-subjects"})})]})})};var V=s(32885),Z=s(70416),B=s(812),z=s(56358);let{useGetMinimalCustomReportsQuery:W,useLazyGetCustomReportByIdQuery:q,usePostCustomReportMutation:X,useDeleteCustomReportMutation:J}=s(78780).u.injectEndpoints({endpoints:e=>({getMinimalCustomReports:e.query({query:e=>{let{pageIndex:t=1,pageSize:s=50,report_type:a=_.C2.DATAMAP}=e,r="page=".concat(t,"&size=").concat(s,"&report_type=").concat(a);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,s)=>[{type:"Custom Reports",id:s}]}),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 K=s(55484),Q=s(40324);let $="Report name",ee=e=>{let{isOpen:t,handleClose:s,tableStateToSave:a,columnMapToSave:r={},unavailableNames:i,onCreateCustomReport:o}=e,c=(0,C.pmc)(),[d]=X(),u=(0,l.useMemo)(()=>K.Ry().shape({reportName:K.Z_().label($).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,s]=e;i[t]={label:s,enabled:!0}}),Object.entries(null!==(t=null==a?void 0:a.columnVisibility)&&void 0!==t?t:{}).forEach(e=>{let[t,s]=e;i[t]||(i[t]={}),i[t].enabled=s});try{let t={name:e.trim(),type:_.C2.DATAMAP,config:{column_map:i,table_state:a}},r=await d(t);if((0,B.D4)(r))throw r.error;o(r.data),s()}catch(e){c({status:"error",description:(0,B.e$)(e,"A problem occurred while creating the report.")})}};return(0,n.jsxs)(C.u_l,{size:"lg",isOpen:t,onClose:s,motionPreset:"none",children:[(0,n.jsx)(C.ZAr,{}),(0,n.jsxs)(C.hzk,{children:[(0,n.jsx)(C.xBx,{pb:0,children:"Create a report"}),(0,n.jsx)(T.J9,{initialValues:{reportName:""},onSubmit:e=>p(e.reportName),onReset:s,validateOnBlur:!1,validationSchema:u,children:e=>{let{dirty:t,isValid:s}=e;return(0,n.jsxs)(T.l0,{"data-testid":"custom-report-form",children:[(0,n.jsxs)(C.fef,{children:[(0,n.jsx)(C.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,n.jsx)(Q.j0,{id:"reportName",name:"reportName",isRequired:!0,label:$,placeholder:"Enter a name for the report...",variant:"stacked",maxLength:80})]}),(0,n.jsxs)(C.mzw,{gap:2,children:[(0,n.jsx)(C.wpx,{size:"small",htmlType:"reset",children:"Cancel"}),(0,n.jsx)(C.wpx,{size:"small",disabled:!t||!s,type:"primary","data-testid":"custom-report-form-submit",htmlType:"submit",children:"Save"})]})]})}})]})]})},et="Report",es="Reports",ea=e=>{var t;let{reportType:s,savedReportId:a,tableStateToSave:r,currentColumnMap:i,onCustomReportSaved:o,onSavedReportDeleted:c}=e,d=(0,D.Tg)([_.Sh.CUSTOM_REPORT_CREATE]),u=(0,D.Tg)([_.Sh.CUSTOM_REPORT_DELETE]),p=(0,C.pmc)({id:"custom-report-toast"}),{data:m,isLoading:E}=W({report_type:s}),[S,h]=(0,l.useState)(),[A]=q(),[g]=J(),{isOpen:f,onToggle:x,onOpen:R,onClose:O}=(0,C.qY0)(),{isOpen:j,onOpen:v,onClose:b}=(0,C.qY0)(),{isOpen:y,onOpen:I,onClose:N}=(0,C.qY0)(),[L,w]=(0,l.useState)(),[M,P]=(0,l.useState)(),[U,k]=(0,l.useState)(),[G,H]=(0,l.useState)(!1),{resetForm:Y}=(0,T.u6)(),F=(0,l.useMemo)(()=>{var e;let t=null==m?void 0:null===(e=m.items.find(e=>e.id===a))||void 0===e?void 0:e.name;return null!=t?t:es},[null==m?void 0:m.items,a]),V=!E&&!(null==m?void 0:null===(t=m.items)||void 0===t?void 0:t.length),X=e=>{h(null==m?void 0:m.items.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())))},K=async e=>{w(e);let{data:t,isError:s,error:a}=await A(e);if(s){let e=(0,B.e$)(a,"A problem occurred while fetching the ".concat(et,"."));e.includes("not found")&&c(),p({status:"error",description:e})}else P(t)},Q=()=>{w(""),P(void 0),H(!1)},$=()=>{M?(H(!1),M.id!==a&&o(M,Y),O()):L?H(!0):(o(null,Y),O())},ea=async e=>{e===(null==M?void 0:M.id)&&(Q(),c()),g(e)};(0,l.useEffect)(()=>{m&&h(m.items)},[m]),(0,l.useEffect)(()=>{G&&(H(!1),$())},[M]),(0,l.useEffect)(()=>{a?K(a):Q()},[a]),(0,l.useEffect)(()=>{U&&I()},[I,U]);let er=!M&&!a||(null==M?void 0:M.id)===a;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(C.J2e,{placement:"bottom-end",isOpen:f,onClose:$,id:"custom-reports-selection",children:[(0,n.jsx)(C.xol,{children:(0,n.jsx)(C.wpx,{className:"max-w-40",icon:(0,n.jsx)(C.v4q,{}),iconPosition:"end","data-testid":"custom-reports-trigger",onClick:x,children:(0,n.jsx)(C.xvT,{noOfLines:1,display:"inline-block",children:F})})}),(0,n.jsx)(C.h_i,{children:(0,n.jsxs)(C.yky,{"data-testid":"custom-reports-popover",children:[(0,n.jsx)(C.QHN,{}),(0,n.jsx)(T.J9,{initialValues:{},onSubmit:$,onReset:Q,children:(0,n.jsxs)(T.l0,{children:[(0,n.jsx)(C.wpx,{size:"small",disabled:V,htmlType:"reset",className:"absolute left-2 top-2","data-testid":"custom-reports-reset-button",children:"Reset"}),(0,n.jsxs)(C.Ytg,{textAlign:"center",children:[(0,n.jsx)(C.xvT,{fontSize:"sm",children:es}),(0,n.jsx)(C.BZy,{size:"sm",mt:3,children:(0,n.jsx)(C.IIB,{type:"text",borderRadius:"md",placeholder:"Search...",onChange:e=>X(e.target.value)})})]}),(0,n.jsx)(C.usR,{top:2,onClick:()=>{a?K(a):Q(),O()},"data-testid":"custom-report-popover-cancel"}),(0,n.jsxs)(C.baG,{px:6,pt:5,pb:1,children:[V&&(0,n.jsxs)(C.gCW,{px:2,pt:6,pb:3,"data-testid":"custom-reports-empty-state",children:[(0,n.jsx)(C.wpx,{type:"primary",size:"small","aria-label":"add ".concat(et),icon:(0,n.jsx)(Z.d,{}),onClick:v,className:"rounded-full","data-testid":"add-report-button"}),(0,n.jsxs)(C.xvT,{fontSize:"sm",textAlign:"center",color:"gray.500",children:["No ",es.toLowerCase()," have been created. Start by applying your preferred filter and column settings, then create a"," ",et.toLowerCase()," for easy access later."]})]}),!V&&(E?(0,n.jsxs)(C.gCW,{pb:2,children:[(0,n.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]}),(0,n.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]}),(0,n.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]})]}):(0,n.jsx)(C.y02.Group,{onChange:e=>K(e.target.value),value:L,className:"flex flex-col gap-2",children:null==S?void 0:S.map(e=>(0,n.jsxs)(C.jqI,{className:u?"justify-between":"justify-start",children:[(0,n.jsx)(C.y02,{value:e.id,name:"custom-report-id","data-testid":"custom-report-item",children:(0,n.jsx)(C.xvT,{fontSize:"sm",children:e.name})}),u&&(0,n.jsx)(C.wpx,{type:"text",size:"small",icon:(0,n.jsx)(z.q,{fontSize:16}),onClick:()=>k(e),"data-testid":"delete-report-button"})]},e.id))}))]}),(0,n.jsx)(C.DT9,{border:"none",px:6,pb:4,pt:4,children:(0,n.jsxs)(C.Ugi,{children:[d&&r&&(0,n.jsxs)(C.wpx,{size:"small",onClick:v,className:"w-full","data-testid":"create-report-button",htmlType:"button",children:["+ Create ",et.toLowerCase()]}),(0,n.jsx)(C.wpx,{size:"small",type:"primary",loading:G,disabled:er,className:"w-full","data-testid":"apply-report-button",htmlType:"submit",children:"Apply"})]})})]})})]})})]}),(0,n.jsx)(ee,{isOpen:j,handleClose:()=>{b(),setTimeout(()=>{R()},100)},tableStateToSave:r,columnMapToSave:i,unavailableNames:null==m?void 0:m.items.map(e=>e.name),onCreateCustomReport:e=>o(e,Y)}),(0,n.jsx)(C.cVQ,{isOpen:y,onClose:()=>{k(void 0),N()},onConfirm:()=>{U&&ea(U.id),N()},title:"Delete ".concat(et),message:(0,n.jsxs)(C.xvT,{children:["You are about to permanently delete the"," ",et.toLowerCase()," named"," ",(0,n.jsx)("strong",{children:null==U?void 0:U.name}),". Are you sure you would like to continue?"]})})]})};var er=s(19785),ei=s.n(er),eo=s(55807),en=s.n(eo),el=s(32526),ec=s.n(el),ed=s(72625),eu=s(43862);let e_=(0,f.Cl)(),ep=(e,t)=>({cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:s=>{let a={};return Object.keys(e).forEach(t=>{"string"==typeof e[t]?a[t]=e[t]:e[t].label&&(a[t]=e[t].label||"")}),(0,n.jsx)(ed.Hm,{value:(0,eu.AH)({columnId:s.column.id,columnNameMap:a}),defaultValue:p[s.column.id]||(0,eu.AH)({columnId:s.column.id}),isEditing:t,...s})}}),em=(e,t)=>{var s;let a=(null==e?void 0:null===(s=e.items)||void 0===s?void 0:s.length)?Object.keys(e.items[0]):[],r=Object.values(o);return a.filter(e=>!r.includes(e)).filter(e=>e.startsWith("privacy_declaration_")||e.startsWith("system_")).map(e=>{let s=t.find(t=>e.includes(ec()(t.name)));return e_.accessor(t=>t[e],{id:e,cell:e=>Array.isArray(e.getValue())?(0,n.jsx)(x.WP,{value:e.getValue(),ignoreZero:!0,...e}):(0,n.jsx)(x.G3,{value:e.getValue()}),meta:{showHeaderMenu:(null==s?void 0:s.field_type)==="string[]"}})})},eE=e=>{let{onSelectRow:t,getDataUseDisplayName:s,getDataCategoryDisplayName:a,getDataSubjectDisplayName:r,datamapReport:i,customFields:l,isRenaming:c=!1}=e,d=em(i,l);return[e_.accessor(e=>e.system_name,{enableGrouping:!0,id:o.SYSTEM_NAME,meta:{onCellClick:t}}),e_.accessor(e=>e.data_uses,{id:o.DATA_USE,cell:e=>{let t=e.getValue();return(0,n.jsx)(x.WP,{suffix:"data uses",ignoreZero:!0,value:ei()(t)?en()(t,s):s(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto"}}),e_.accessor(e=>e.data_categories,{id:o.DATA_CATEGORY,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,n.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_subjects,{id:o.DATA_SUBJECT,cell:e=>{let t=e.getValue();return(0,n.jsx)(x.WP,{suffix:"data subjects",ignoreZero:!0,value:ei()(t)?en()(t,r):r(t||""),tagProps:{color:"white"},...e})},meta:{showHeaderMenu:!c}}),e_.accessor(e=>e.legal_name,{id:o.LEGAL_NAME}),e_.accessor(e=>e.dpo,{id:o.DPO}),e_.accessor(e=>e.legal_basis_for_processing,{id:o.LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.administrating_department,{id:o.ADMINISTRATING_DEPARTMENT}),e_.accessor(e=>e.cookie_max_age_seconds,{id:o.COOKIE_MAX_AGE_SECONDS}),e_.accessor(e=>e.privacy_policy,{id:o.PRIVACY_POLICY}),e_.accessor(e=>e.legal_address,{id:o.LEGAL_ADDRESS}),e_.accessor(e=>e.cookie_refresh,{id:o.COOKIE_REFRESH}),e_.accessor(e=>e.data_security_practices,{id:o.DATA_SECURITY_PRACTICES}),e_.accessor(e=>e.data_shared_with_third_parties,{id:o.DATA_SHARED_WITH_THIRD_PARTIES}),e_.accessor(e=>e.processes_special_category_data,{id:o.PROCESSES_SPECIAL_CATEGORY_DATA}),e_.accessor(e=>e.data_stewards,{id:o.DATA_STEWARDS,cell:e=>(0,n.jsx)(x.WP,{suffix:"data stewards",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.declaration_name,{id:o.DECLARATION_NAME}),e_.accessor(e=>e.does_international_transfers,{id:o.DOES_INTERNATIONAL_TRANSFERS}),e_.accessor(e=>e.dpa_location,{id:o.DPA_LOCATION}),e_.accessor(e=>e.egress,{id:o.DESTINATIONS,cell:e=>(0,n.jsx)(x.WP,{suffix:"destinations",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.exempt_from_privacy_regulations,{id:o.EXEMPT_FROM_PRIVACY_REGULATIONS}),e_.accessor(e=>e.features,{id:o.FEATURES,cell:e=>(0,n.jsx)(x.WP,{suffix:"features",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.fides_key,{id:o.FIDES_KEY}),e_.accessor(e=>e.flexible_legal_basis_for_processing,{id:o.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.impact_assessment_location,{id:o.IMPACT_ASSESSMENT_LOCATION}),e_.accessor(e=>e.ingress,{id:o.SOURCES,cell:e=>(0,n.jsx)(x.WP,{suffix:"sources",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.joint_controller_info,{id:o.JOINT_CONTROLLER_INFO}),e_.accessor(e=>e.legal_basis_for_profiling,{id:o.LEGAL_BASIS_FOR_PROFILING,cell:e=>(0,n.jsx)(x.WP,{suffix:"profiles",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legal_basis_for_transfers,{id:o.LEGAL_BASIS_FOR_TRANSFERS,cell:e=>(0,n.jsx)(x.WP,{suffix:"transfers",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legitimate_interest_disclosure_url,{id:o.LEGITIMATE_INTEREST_DISCLOSURE_URL}),e_.accessor(e=>e.processes_personal_data,{id:o.PROCESSES_PERSONAL_DATA}),e_.accessor(e=>e.reason_for_exemption,{id:o.REASON_FOR_EXEMPTION}),e_.accessor(e=>e.requires_data_protection_assessments,{id:o.REQUIRES_DATA_PROTECTION_ASSESSMENTS}),e_.accessor(e=>e.responsibility,{id:o.RESPONSIBILITY,cell:e=>(0,n.jsx)(x.WP,{suffix:"responsibilities",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.retention_period,{id:o.RETENTION_PERIOD}),e_.accessor(e=>e.shared_categories,{id:o.SHARED_CATEGORIES,cell:e=>(0,n.jsx)(x.WP,{suffix:"shared categories",ignoreZero:!0,value:e.getValue(),tagProps:{color:"white"},...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.special_category_legal_basis,{id:o.SPECIAL_CATEGORY_LEGAL_BASIS}),e_.accessor(e=>e.third_parties,{id:o.THIRD_PARTIES}),e_.accessor(e=>e.system_undeclared_data_categories,{id:o.SYSTEM_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,n.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_use_undeclared_data_categories,{id:o.DATA_USE_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,n.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.cookies,{id:o.COOKIES,cell:e=>(0,n.jsx)(x.WP,{ignoreZero:!0,suffix:"cookies",value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.uses_cookies,{id:o.USES_COOKIES}),e_.accessor(e=>e.uses_non_cookie_access,{id:o.USES_NON_COOKIE_ACCESS}),e_.accessor(e=>e.uses_profiling,{id:o.USES_PROFILING}),...d]},eS=e=>{let{columnNameMapOverrides:t,setColumnNameMapOverrides:s,setSavedCustomReportId:a,setIsRenamingColumns:r}=e,{submitForm:i,resetForm:o}=(0,T.u6)();return(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(C.wpx,{size:"small","data-testid":"rename-columns-reset-btn",onClick:()=>{s({}),a(""),o({values:{}}),r(!1)},children:"Reset all"}),(0,n.jsx)(C.wpx,{size:"small","data-testid":"rename-columns-cancel-btn",onClick:()=>{o({values:t}),r(!1)},children:"Cancel"}),(0,n.jsx)(C.wpx,{size:"small",type:"primary",htmlType:"submit","data-testid":"rename-columns-apply-btn",onClick:i,children:"Apply"})]})},eh=e=>e===_.fI.DATA_USE_SYSTEM?[o.DATA_USE]:[o.SYSTEM_NAME],eA=e=>{let t=[];return _.fI.SYSTEM_DATA_USE===e&&(t=[o.SYSTEM_NAME,o.DATA_USE]),_.fI.DATA_USE_SYSTEM===e&&(t=[o.DATA_USE,o.SYSTEM_NAME]),t},eg=(e,t)=>eA(e).concat(t.filter(e=>e!==o.SYSTEM_NAME&&e!==o.DATA_USE)),ef={items:[],total:0,page:1,size:25,pages:1},ex=()=>{let e=(0,D.Tg)([_.Sh.CUSTOM_REPORT_READ]),{isLoading:t}=(0,V.x8)(),{PAGE_SIZES:s,pageSize:a,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:c,onNextPageClick:d,isNextPageDisabled:u,startRange:S,endRange:h,pageIndex:R,setTotalPages:L,resetPageIndexToDefault:w}=(0,x.oi)(),P=(0,C.pmc)({id:"datamap-report-toast"}),{isOpen:U,onClose:k,onOpen:G}=(0,C.qY0)(),{getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,isLoading:B}=(0,v.Z)(),[z,W]=(0,l.useState)(),{savedCustomReportId:q,setSavedCustomReportId:X,groupBy:J,setGroupBy:K,selectedFilters:Q,setSelectedFilters:$,columnOrder:ee,setColumnOrder:et,columnVisibility:es,setColumnVisibility:er,columnSizing:ei,setColumnSizing:eo,columnNameMapOverrides:en,setColumnNameMapOverrides:el}=A(),[ec,ed]=(0,l.useState)(!1),eu=e=>{X(""),K(e),ed(!0),w()},[e_,em]=(0,l.useState)(""),ex=(0,l.useCallback)(e=>{w(),em(e)},[w,em]),eC={pageIndex:R,pageSize:a,groupBy:J,search:e_,dataUses:(0,y.du)(Q.dataUses,"data_uses"),dataSubjects:(0,y.du)(Q.dataSubjects,"data_subjects"),dataCategories:(0,y.du)(Q.dataCategories,"data_categories")},{data:eT,isLoading:eR,isFetching:eO}=(0,I.tH)(eC),[ej,{isLoading:ev,isError:eb}]=(0,I.Eo)(),{data:eD,totalRows:ey}=(0,l.useMemo)(()=>{let e=eT||ef,t=e.items;return ec&&ed(!1),L(e.pages),{totalRows:e.total,data:t}},[eT]);(0,V.GH)();let eI=(0,j.C)(V.fN),[eN,eL]=(0,l.useState)(!1),ew=(0,l.useMemo)(()=>eT?eE({onSelectRow:e=>W(e.fides_key),getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,datamapReport:eT,customFields:eI,isRenaming:eN}):[],[H,Z,Y,eT,eI,eN]),{isOpen:eM,onOpen:eP,onClose:eU}=(0,C.qY0)(),{isOpen:ek,onOpen:eG,onClose:eH}=(0,C.qY0)(),eY=(0,g.b7)({getCoreRowModel:(0,f.sC)(),getGroupedRowModel:(0,f.qe)(),getExpandedRowModel:(0,f.rV)(),manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onChange",columns:ew,defaultColumn:ep({...p,...en},eN),data:eD,initialState:{expanded:!0,columnSizing:ei,columnOrder:ee,columnVisibility:es,grouping:eh(J)}});(0,l.useEffect)(()=>{J&&eY&&eT&&(0===eY.getState().columnOrder.length?et(eg(J,eY.getAllColumns().map(e=>e.id))):et(eg(J,eY.getState().columnOrder)))},[J,eY,eT]),(0,l.useEffect)(()=>{let e=eh(J);eT&&eY.setGrouping(e)},[eT]);let eF=(0,l.useMemo)(()=>O()(eo,300),[eo]);(0,l.useEffect)(()=>{let e=eY.getState().columnSizing;e&&eF(e)},[eY.getState().columnSizing]);let eV=(e,t)=>{if(e||q){if(!e){try{X(""),er(m),eY.toggleAllColumnsVisible(!0),eY.setColumnVisibility(m),et([]),eY.setColumnOrder([]),K(_.fI.SYSTEM_DATA_USE),$(E),el({}),t({values:{}})}catch(e){P({status:"error",description:"There was a problem resetting the report."})}return}try{var s,a,r,i;if(null===(s=e.config)||void 0===s?void 0:s.table_state){let{groupBy:t,filters:s,columnOrder:a}=e.config.table_state,i={};Object.entries(null!==(r=e.config.column_map)&&void 0!==r?r:{}).forEach(e=>{let[t,s]=e;i[t]=s.enabled||!1}),t&&K(t),s&&$(s),a&&(et(a),eY.setColumnOrder(a)),i&&(er(i),eY.setColumnVisibility(i))}if(null===(a=e.config)||void 0===a?void 0:a.column_map){let s={};Object.entries(null!==(i=e.config.column_map)&&void 0!==i?i:{}).forEach(e=>{let[t,a]=e;a.label&&(s[t]=a.label)}),el(s),t({values:s})}X(e.id),P({status:"success",description:"Report applied successfully."})}catch(e){P({status:"error",description:"There was a problem applying report."})}}};return eR||t||B?(0,n.jsx)(x.I4,{rowHeight:36,numRows:15}):(0,n.jsxs)(C.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,n.jsx)(F,{columnNameMap:{...p,...en},selectedFilters:Q,isOpen:U,onClose:k,onFilterChange:e=>{X(""),$(e)}}),(0,n.jsx)(x.F1,{isOpen:eM,onClose:eU,headerText:"Columns",columnNameMap:{...p,...en},prefixColumns:eA(J),tableInstance:eY,savedCustomReportId:q,onColumnOrderChange:e=>{X(""),eY.setColumnOrder(e),et(e)},onColumnVisibilityChange:e=>{X(""),eY.setColumnVisibility(e),er(e)}}),(0,n.jsx)(M,{isOpen:ek,onClose:eH,onConfirm:e=>{let t={};Object.entries(es).forEach(e=>{let[s,a]=e;t[s]={enabled:a}}),Object.entries(en).forEach(e=>{let[s,a]=e;if(t[s])t[s].label=a;else{var r;t[s]={label:a,enabled:null===(r=es[s])||void 0===r||r}}}),ej({...eC,format:e,report_id:q,report:{name:"",type:"datamap",config:{column_map:t,table_state:{groupBy:J,filters:Q,columnOrder:ee}}}}).then(()=>{eb||eH()})},isLoading:ev}),(0,n.jsx)(T.J9,{initialValues:en,onSubmit:e=>{X(""),el(e),eL(!1)},children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(x.Q$,{children:[(0,n.jsx)(x.HO,{globalFilter:e_,setGlobalFilter:ex,placeholder:"System name, Fides key, or ID"}),(0,n.jsxs)(C.kCb,{alignItems:"center",gap:2,children:[e&&(0,n.jsx)(ea,{reportType:_.C2.DATAMAP,savedReportId:q,tableStateToSave:{groupBy:J,filters:Q,columnOrder:ee,columnVisibility:es},currentColumnMap:en,onCustomReportSaved:(e,t)=>eV(e,t),onSavedReportDeleted:()=>{X("")}}),(0,n.jsxs)(C.v2r,{children:[(0,n.jsxs)(C.j2t,{as:C.wpx,icon:(0,n.jsx)(C.v4q,{}),iconPosition:"end",loading:ec,"data-testid":"group-by-menu",children:["Group by ",(()=>{switch(J){case _.fI.SYSTEM_DATA_USE:return"system";case _.fI.DATA_USE_SYSTEM:return"data use";default:return"system"}})()]}),(0,n.jsxs)(C.qyq,{zIndex:11,"data-testid":"group-by-menu-list",children:[(0,n.jsx)(C.iiZ,{onClick:()=>{eu(_.fI.SYSTEM_DATA_USE)},isChecked:_.fI.SYSTEM_DATA_USE===J,value:_.fI.SYSTEM_DATA_USE,"data-testid":"group-by-system-data-use",children:"System"}),(0,n.jsx)(C.iiZ,{onClick:()=>{eu(_.fI.DATA_USE_SYSTEM)},isChecked:_.fI.DATA_USE_SYSTEM===J,value:_.fI.DATA_USE_SYSTEM,"data-testid":"group-by-data-use-system",children:"Data use"})]})]}),(0,n.jsx)(C.wpx,{"data-testid":"filter-multiple-systems-btn",onClick:G,children:"Filter"}),(0,n.jsx)(C.wpx,{"aria-label":"Export report","data-testid":"export-btn",onClick:eG,icon:(0,n.jsx)(b.nM,{ml:"1.5px"})}),(0,n.jsxs)(C.v2r,{placement:"bottom-end",children:[(0,n.jsx)(C.j2t,{as:C.wpx,icon:(0,n.jsx)(C.nXP,{className:"rotate-90"}),"data-testid":"more-menu","aria-label":"More options",className:"w-6 gap-0"}),(0,n.jsxs)(C.qyq,{"data-testid":"more-menu-list",children:[(0,n.jsx)(C.sNh,{onClick:eP,"data-testid":"edit-columns-btn",children:"Edit columns"}),(0,n.jsx)(C.sNh,{onClick:()=>eL(!0),"data-testid":"rename-columns-btn",children:"Rename columns"})]})]}),eN&&(0,n.jsx)(eS,{columnNameMapOverrides:en,setColumnNameMapOverrides:el,setSavedCustomReportId:X,setIsRenamingColumns:eL})]})]}),(0,n.jsx)(T.l0,{children:(0,n.jsx)(x.ZK,{tableInstance:eY,columnExpandStorageKey:i.COLUMN_EXPANSION_STATE,columnWrapStorageKey:i.WRAPPING_COLUMNS})})]})}),(0,n.jsx)(x.s8,{totalRows:ey||0,pageSizes:s,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:c||eO,onNextPageClick:d,isNextPageDisabled:u||eO,startRange:S,endRange:h}),(0,n.jsx)(N.Z,{selectedSystemId:z,resetSelectedSystemId:()=>W(void 0)})]})};var eC=()=>(0,n.jsxs)(c.Z,{title:"Datamap Report",children:[(0,n.jsx)(d.Z,{"data-testid":"datamap-report-heading",heading:"Data map report"}),(0,n.jsx)(h,{children:(0,n.jsx)(ex,{})})]})}},function(e){e.O(0,[2858,2866,9278,2599,9951,4230,2888,9774,179],function(){return e(e.s=86548)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9196],{67375:function(e,t,s){var a=s(52033),r=s(80068);e.exports=function(e,t){var s=-1,i=r(e)?Array(e.length):[];return a(e,function(e,a,r){i[++s]=t(e,a,r)}),i}},55807:function(e,t,s){var a=s(66070),r=s(89278),i=s(67375),o=s(19785);e.exports=function(e,t){return(o(e)?a:i)(e,r(t,3))}},32526:function(e,t,s){var a=s(68267)(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});e.exports=a},86548:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reporting/datamap",function(){return s(27901)}])},624:function(e,t,s){"use strict";var a=s(24246),r=s(13577),i=s(27378);let o=e=>{let t=e.split("."),s=[];return t.forEach(e=>{let t=s.length>0?s[s.length-1]:null;t?s.push("".concat(t,".").concat(e)):s.push(e)}),s},n=(e,t)=>{let s=o(t).filter(e=>e!==t);return e.filter(e=>s.includes(e)).length>0},l=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,s)=>{let a=null!=s?s:[];return e.forEach(e=>{e.children&&c(e.children,t,a),l(e.value,t)&&a.push(e)}),a},d=e=>{let{node:t,isChecked:s,onChecked:i,isExpanded:o,onExpanded:n,isIndeterminate:l,isDisabled:c,children:d}=e,{value:u,label:_}=t,p=!!t.children&&t.children.length>0;return(0,a.jsxs)(r.xuv,{children:[(0,a.jsxs)(r.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>n(t),minHeight:8,children:[(0,a.jsx)(r.XZJ,{colorScheme:"complimentary",value:u,isChecked:!l&&s,isIndeterminate:l,isDisabled:c,onChange:()=>i(t),mx:2,"data-testid":"checkbox-".concat(_),children:_}),p?(0,a.jsx)(r.wpx,{"data-testid":"expand-".concat(_),"aria-label":o?"collapse":"expand",icon:(0,a.jsx)(r.v4q,{boxSize:5}),type:"text",onClick:()=>n(t),className:o?"rotate-180":void 0}):null]}),d&&(0,a.jsx)(r.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:s,onSelected:u,..._}=e,[p,m]=(0,i.useState)([]),[E,S]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=Array.from(new Set([...s.map(e=>o(e)).reduce((e,t)=>e.concat(t),[]),...s.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));S(e),m(e)},[s,t]);let h=e=>{let a=[],r=[];p.indexOf(e.value)>=0?(a=p.filter(t=>!l(t,e.value)),r=s.filter(t=>!l(t,e.value))):(a=[...p,...c(t,e.value).map(e=>e.value)],r=[...s,e.value]),m(a),u(r)},A=e=>{E.indexOf(e.value)>=0?S(E.filter(t=>!l(t,e.value))):S([...E,e.value])},g=e=>{if(e.children){let r=p.indexOf(e.value)>=0,o=E.indexOf(e.value)>=0,l=c(t,e.value),u=r&&e.children.length>0&&p.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==l.length,_=n(s,e.value);return(0,a.jsx)(d,{node:e,isChecked:r,onChecked:h,isExpanded:o,onExpanded:A,isDisabled:_,isIndeterminate:u,children:o?e.children.map(e=>(0,a.jsx)(i.Fragment,{children:g(e)},e.value)):void 0})}return null};return(0,a.jsx)(r.xuv,{..._,children:t.map(e=>(0,a.jsx)(r.xuv,{children:g(e)},e.value))})}},35287:function(e,t,s){"use strict";var a=s(24246),r=s(13577),i=s(88038),o=s.n(i);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:i}=e;return(0,a.jsxs)(r.kCb,{"data-testid":s,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,a.jsxs)(o(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...i,children:t})]})}},56358:function(e,t,s){"use strict";s.d(t,{q:function(){return r}});var a=s(24246);let r=(0,s(13577).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,a.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},19904:function(e,t,s){"use strict";s.d(t,{Tg:function(){return o}});var a=s(24246),r=s(16134),i=s(31793);let o=e=>(0,r.C)(i.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:s}=e;return o(t)?(0,a.jsx)(a.Fragment,{children:s}):null}},70416:function(e,t,s){"use strict";s.d(t,{d:function(){return r}});var a=s(24246);let r=(0,s(13577).IUT)({displayName:"AddIcon",viewBox:"0 0 10 10",path:(0,a.jsx)("path",{d:"M4.33331 4.33398V0.333984H5.66665V4.33398H9.66665V5.66732H5.66665V9.66732H4.33331V5.66732H0.333313V4.33398H4.33331Z",fill:"currentColor"})})},34929:function(e,t,s){"use strict";var a=s(24246),r=s(64925),i=s.n(r),o=s(27378),n=s(16134),l=s(30002),c=s(28079),d=s(57072);let u=()=>{let{isLoading:e}=(0,c.fd)(),t=(0,n.C)(c.U3),{isLoading:s}=(0,d.MO)(),a=(0,n.C)(d.qb),{isLoading:r}=(0,l.te)();return{dataUses:t,dataSubjects:(0,n.C)(l.ZL),dataCategories:a,isLoading:e||s||r}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:s,isLoading:r}=u(),n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},l=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=t(e);if(!a)return{};let r=t(n(e,s)),i=!!a.parent_key;return{name:a.name||void 0,primaryName:i&&(null==r?void 0:r.name)!==a.name&&(null==r?void 0:r.name)||void 0}},c=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:i}=l(e,t,s);return r?i?(0,a.jsxs)(o.Fragment,{children:[(0,a.jsxs)("strong",{children:[i,":"]})," ",r]},e):(0,a.jsx)("strong",{children:r},e):e},d=t=>i()(e,{fides_key:t}),_=e=>i()(t,{fides_key:e}),p=e=>i()(s,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:d,getDataUseDisplayName:e=>c(e,d,1),getDataUseDisplayNameProps:e=>l(e,d,1),getDataCategories:()=>t,getDataCategoryByKey:_,getDataCategoryDisplayName:e=>c(e,_,2),getDataCategoryDisplayNameProps:e=>l(e,_,2),getDataSubjects:()=>s,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:n,isLoading:r}}},59001:function(e,t,s){"use strict";s.d(t,{Ch:function(){return o},Hy:function(){return n},Lo:function(){return r}});var a,r,i=s(73825);let o="root";(a=r||(r={})).DATA_CATEGORIES="Data categories",a.DATA_USES="Data uses",a.DATA_SUBJECTS="Data subjects";let n=e=>{switch(e){case"Data categories":return{UPDATE:i.Sh.DATA_CATEGORY_UPDATE,CREATE:i.Sh.DATA_CATEGORY_CREATE,DELETE:i.Sh.DATA_CATEGORY_DELETE,READ:i.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:i.Sh.DATA_USE_UPDATE,CREATE:i.Sh.DATA_USE_CREATE,DELETE:i.Sh.DATA_USE_DELETE,READ:i.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:i.Sh.DATA_SUBJECT_UPDATE,CREATE:i.Sh.DATA_SUBJECT_CREATE,DELETE:i.Sh.DATA_SUBJECT_DELETE,READ:i.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,s){"use strict";s.d(t,{Cd:function(){return i},Xl:function(){return o}});var a=s(73825),r=s(59001);let i=(e,t)=>{let s;if(null==t&&e.every(e=>void 0===e.parent_key))s=e;else{let a=null!=t?t:null;s=e.filter(e=>e.parent_key===a)}return s.map(t=>{var s,a;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!==(s=t.is_default)&&void 0!==s&&s,active:null!==(a=t.active)&&void 0!==a&&a}})},o=e=>{switch(e){case r.Lo.DATA_CATEGORIES:return a.P6.DATA_CATEGORY;case r.Lo.DATA_SUBJECTS:return a.P6.DATA_SUBJECT;case r.Lo.DATA_USES:return a.P6.DATA_USE;default:return}}},27901:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eC}});var a,r,i,o,n=s(24246),l=s(27378),c=s(35287),d=s(58754),u=s(71795),_=s(73825);(a=i||(i={})).COLUMN_EXPANSION_STATE="datamap-column-expansion-state",a.COLUMN_NAMES="datamap-column-names",a.COLUMN_ORDER="datamap-column-order",a.COLUMN_SIZING="datamap-column-sizing",a.COLUMN_VISIBILITY="datamap-column-visibility",a.CUSTOM_REPORT_ID="datamap-custom-report-id",a.FILTERS="datamap-filters",a.GROUP_BY="datamap-group-by",a.SORTING_STATE="datamap-sorting-state",a.WRAPPING_COLUMNS="datamap-wrapping-columns",(r=o||(o={})).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";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"},m={[o.SYSTEM_UNDECLARED_DATA_CATEGORIES]:!1,[o.DATA_USE_UNDECLARED_DATA_CATEGORIES]:!1},E={dataUses:[],dataSubjects:[],dataCategories:[]},S=(0,l.createContext)({}),h=e=>{let{children:t}=e,[s,a]=(0,u._)(i.CUSTOM_REPORT_ID,""),[r,o]=(0,u._)(i.GROUP_BY,_.fI.SYSTEM_DATA_USE),[c,d]=(0,u._)(i.FILTERS,E),[p,h]=(0,u._)(i.COLUMN_ORDER,[]),[A,g]=(0,u._)(i.COLUMN_VISIBILITY,m),[f,x]=(0,u._)(i.COLUMN_SIZING,{}),[C,T]=(0,u._)(i.COLUMN_NAMES,{}),R=(0,l.useMemo)(()=>({savedCustomReportId:s,setSavedCustomReportId:a,groupBy:r,setGroupBy:o,selectedFilters:c,setSelectedFilters:d,columnOrder:p,setColumnOrder:h,columnVisibility:A,setColumnVisibility:g,columnSizing:f,setColumnSizing:x,columnNameMapOverrides:C,setColumnNameMapOverrides:T}),[s,a,r,o,c,d,p,h,A,g,f,x,C,T]);return(0,n.jsx)(S.Provider,{value:R,children:t})},A=()=>{let e=(0,l.useContext)(S);if(!e||0===Object.keys(e).length)throw Error("useDatamapReport must be used within a DatamapReportProvider");return e};var g=s(59003),f=s(92222),x=s(47935),C=s(13577),T=s(34090),R=s(66726),O=s.n(R),j=s(16134),v=s(34929),b=s(14048),D=s(19904),y=s(16394),I=s(38943),N=s(35258),L=e=>{let{children:t,heading:s,onCancel:a,onConfirm:r,isLoading:i,cancelButtonText:o,continueButtonText:l,"data-testid":c="standard-dialog",...d}=e,{onClose:u}=d;return(0,n.jsxs)(C.u_l,{closeOnOverlayClick:i,...d,children:[(0,n.jsx)(C.ZAr,{}),(0,n.jsxs)(C.hzk,{"data-testid":c,children:[s&&(0,n.jsx)(C.xBx,{children:s}),(0,n.jsx)(C.olH,{isDisabled:i,"data-testid":"standard-dialog-close-btn"}),t&&(0,n.jsx)(C.fef,{children:t}),(0,n.jsxs)(C.mzw,{gap:3,width:"100%",sx:{"& button":{width:"100%"}},children:[(0,n.jsx)(C.wpx,{onClick:()=>{a&&a(),u()},"data-testid":"".concat(c?"".concat(c,"-"):"","cancel-btn"),disabled:i,children:o||"Cancel"}),(0,n.jsx)(C.wpx,{onClick:r,type:"primary","data-testid":"".concat(c?"".concat(c,"-"):"","continue-btn"),loading:i,children:l||"Continue"})]})]})]})},w=s(22968),M=e=>{let[t,s]=(0,l.useState)(w.T2.csv),{onConfirm:a}=e;return(0,n.jsx)(L,{heading:"Export report",continueButtonText:"Download",size:"xl",...e,onConfirm:()=>a(t),"data-testid":"export-modal",children:(0,n.jsxs)(C.kCb,{direction:"column",gap:3,pb:3,children:[(0,n.jsx)(C.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,n.jsxs)(C.NIc,{children:[(0,n.jsx)(C.lXp,{htmlFor:"format",children:"Choose Format"}),(0,n.jsx)(C.WPr,{id:"format",value:t,onChange:s,"data-testid":"export-format-select",options:[{value:w.T2.csv,label:"CSV"},{value:w.T2.xlsx,label:"XLSX"}],className:"w-full"})]})]})})},P=s(624),U=s(30002),k=s(28079),G=s(90673),H=s(39864);let Y=e=>{let{label:t,children:s,...a}=e;return(0,n.jsxs)(C.Qdk,{...a,children:[(0,n.jsx)(C.X6q,{children:(0,n.jsxs)(C.KFZ,{height:"100%","data-testid":"filter-modal-accordion-button",textAlign:"left",fontWeight:600,children:[(0,n.jsx)(C.xuv,{flex:1,children:t}),(0,n.jsx)(C.XEm,{boxSize:7})]})}),(0,n.jsx)(C.Hk3,{children:s})]})},F=e=>{let{columnNameMap:t,selectedFilters:s,onFilterChange:a,onClose:r,...i}=e;(0,k.fd)(),(0,U.te)(),(0,H.MO)();let{dataUses:o,dataSubjects:c,dataCategories:d}=s,u=(0,j.C)(k.U3),_=(0,j.C)(U.ZL),p=(0,j.C)(H.qb),[m,E]=(0,l.useState)(o),[S,h]=(0,l.useState)(c),[A,g]=(0,l.useState)(d);(0,l.useEffect)(()=>{E(o)},[o]),(0,l.useEffect)(()=>{h(c)},[c]),(0,l.useEffect)(()=>{g(d)},[d]);let f=(0,l.useMemo)(()=>(0,G.Cd)(u),[u]),x=(0,l.useMemo)(()=>(0,G.Cd)(_),[_]),T=(0,l.useMemo)(()=>(0,G.Cd)(p),[p]);return(0,n.jsx)(L,{heading:"Filter Datamap Report",...i,onCancel:()=>{E([]),h([]),g([]),a({dataUses:[],dataSubjects:[],dataCategories:[]}),r()},onConfirm:()=>{a({dataUses:m,dataSubjects:S,dataCategories:A}),r()},onClose:r,cancelButtonText:"Reset filters",continueButtonText:"Done","data-testid":"datamap-report-filter-modal",children:(0,n.jsxs)(C.UQy,{allowToggle:!0,children:[(0,n.jsx)(Y,{label:t.data_uses,children:(0,n.jsx)(P.ZP,{nodes:f,selected:m,onSelected:E,"data-testid":"filter-modal-checkbox-tree-uses"})}),(0,n.jsx)(Y,{label:t.data_categories,children:(0,n.jsx)(P.ZP,{nodes:T,selected:A,onSelected:g,"data-testid":"filter-modal-checkbox-tree-categories"})}),(0,n.jsx)(Y,{label:t.data_subjects,children:(0,n.jsx)(P.ZP,{nodes:x,selected:S,onSelected:h,"data-testid":"filter-modal-checkbox-tree-subjects"})})]})})};var V=s(32885),Z=s(70416),B=s(812),z=s(56358);let{useGetMinimalCustomReportsQuery:W,useLazyGetCustomReportByIdQuery:q,usePostCustomReportMutation:X,useDeleteCustomReportMutation:J}=s(78780).u.injectEndpoints({endpoints:e=>({getMinimalCustomReports:e.query({query:e=>{let{pageIndex:t=1,pageSize:s=50,report_type:a=_.C2.DATAMAP}=e,r="page=".concat(t,"&size=").concat(s,"&report_type=").concat(a);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,s)=>[{type:"Custom Reports",id:s}]}),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 K=s(55484),Q=s(40324);let $="Report name",ee=e=>{let{isOpen:t,handleClose:s,tableStateToSave:a,columnMapToSave:r={},unavailableNames:i,onCreateCustomReport:o}=e,c=(0,C.pmc)(),[d]=X(),u=(0,l.useMemo)(()=>K.Ry().shape({reportName:K.Z_().label($).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,s]=e;i[t]={label:s,enabled:!0}}),Object.entries(null!==(t=null==a?void 0:a.columnVisibility)&&void 0!==t?t:{}).forEach(e=>{let[t,s]=e;i[t]||(i[t]={}),i[t].enabled=s});try{let t={name:e.trim(),type:_.C2.DATAMAP,config:{column_map:i,table_state:a}},r=await d(t);if((0,B.D4)(r))throw r.error;o(r.data),s()}catch(e){c({status:"error",description:(0,B.e$)(e,"A problem occurred while creating the report.")})}};return(0,n.jsxs)(C.u_l,{size:"lg",isOpen:t,onClose:s,motionPreset:"none",children:[(0,n.jsx)(C.ZAr,{}),(0,n.jsxs)(C.hzk,{children:[(0,n.jsx)(C.xBx,{pb:0,children:"Create a report"}),(0,n.jsx)(T.J9,{initialValues:{reportName:""},onSubmit:e=>p(e.reportName),onReset:s,validateOnBlur:!1,validationSchema:u,children:e=>{let{dirty:t,isValid:s}=e;return(0,n.jsxs)(T.l0,{"data-testid":"custom-report-form",children:[(0,n.jsxs)(C.fef,{children:[(0,n.jsx)(C.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,n.jsx)(Q.j0,{id:"reportName",name:"reportName",isRequired:!0,label:$,placeholder:"Enter a name for the report...",variant:"stacked",maxLength:80})]}),(0,n.jsxs)(C.mzw,{gap:2,children:[(0,n.jsx)(C.wpx,{size:"small",htmlType:"reset",children:"Cancel"}),(0,n.jsx)(C.wpx,{size:"small",disabled:!t||!s,type:"primary","data-testid":"custom-report-form-submit",htmlType:"submit",children:"Save"})]})]})}})]})]})},et="Report",es="Reports",ea=e=>{var t;let{reportType:s,savedReportId:a,tableStateToSave:r,currentColumnMap:i,onCustomReportSaved:o,onSavedReportDeleted:c}=e,d=(0,D.Tg)([_.Sh.CUSTOM_REPORT_CREATE]),u=(0,D.Tg)([_.Sh.CUSTOM_REPORT_DELETE]),p=(0,C.pmc)({id:"custom-report-toast"}),{data:m,isLoading:E}=W({report_type:s}),[S,h]=(0,l.useState)(),[A]=q(),[g]=J(),{isOpen:f,onToggle:x,onOpen:R,onClose:O}=(0,C.qY0)(),{isOpen:j,onOpen:v,onClose:b}=(0,C.qY0)(),{isOpen:y,onOpen:I,onClose:N}=(0,C.qY0)(),[L,w]=(0,l.useState)(),[M,P]=(0,l.useState)(),[U,k]=(0,l.useState)(),[G,H]=(0,l.useState)(!1),{resetForm:Y}=(0,T.u6)(),F=(0,l.useMemo)(()=>{var e;let t=null==m?void 0:null===(e=m.items.find(e=>e.id===a))||void 0===e?void 0:e.name;return null!=t?t:es},[null==m?void 0:m.items,a]),V=!E&&!(null==m?void 0:null===(t=m.items)||void 0===t?void 0:t.length),X=e=>{h(null==m?void 0:m.items.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())))},K=async e=>{w(e);let{data:t,isError:s,error:a}=await A(e);if(s){let e=(0,B.e$)(a,"A problem occurred while fetching the ".concat(et,"."));e.includes("not found")&&c(),p({status:"error",description:e})}else P(t)},Q=()=>{w(""),P(void 0),H(!1)},$=()=>{M?(H(!1),M.id!==a&&o(M,Y),O()):L?H(!0):(o(null,Y),O())},ea=async e=>{e===(null==M?void 0:M.id)&&(Q(),c()),g(e)};(0,l.useEffect)(()=>{m&&h(m.items)},[m]),(0,l.useEffect)(()=>{G&&(H(!1),$())},[M]),(0,l.useEffect)(()=>{a?K(a):Q()},[a]),(0,l.useEffect)(()=>{U&&I()},[I,U]);let er=!M&&!a||(null==M?void 0:M.id)===a;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(C.J2e,{placement:"bottom-end",isOpen:f,onClose:$,id:"custom-reports-selection",children:[(0,n.jsx)(C.xol,{children:(0,n.jsx)(C.wpx,{className:"max-w-40",icon:(0,n.jsx)(C.v4q,{}),iconPosition:"end","data-testid":"custom-reports-trigger",onClick:x,children:(0,n.jsx)(C.xvT,{noOfLines:1,display:"inline-block",children:F})})}),(0,n.jsx)(C.h_i,{children:(0,n.jsxs)(C.yky,{"data-testid":"custom-reports-popover",children:[(0,n.jsx)(C.QHN,{}),(0,n.jsx)(T.J9,{initialValues:{},onSubmit:$,onReset:Q,children:(0,n.jsxs)(T.l0,{children:[(0,n.jsx)(C.wpx,{size:"small",disabled:V,htmlType:"reset",className:"absolute left-2 top-2","data-testid":"custom-reports-reset-button",children:"Reset"}),(0,n.jsxs)(C.Ytg,{textAlign:"center",children:[(0,n.jsx)(C.xvT,{fontSize:"sm",children:es}),(0,n.jsx)(C.BZy,{size:"sm",mt:3,children:(0,n.jsx)(C.IIB,{type:"text",borderRadius:"md",placeholder:"Search...",onChange:e=>X(e.target.value)})})]}),(0,n.jsx)(C.usR,{top:2,onClick:()=>{a?K(a):Q(),O()},"data-testid":"custom-report-popover-cancel"}),(0,n.jsxs)(C.baG,{px:6,pt:5,pb:1,children:[V&&(0,n.jsxs)(C.gCW,{px:2,pt:6,pb:3,"data-testid":"custom-reports-empty-state",children:[(0,n.jsx)(C.wpx,{type:"primary",size:"small","aria-label":"add ".concat(et),icon:(0,n.jsx)(Z.d,{}),onClick:v,className:"rounded-full","data-testid":"add-report-button"}),(0,n.jsxs)(C.xvT,{fontSize:"sm",textAlign:"center",color:"gray.500",children:["No ",es.toLowerCase()," have been created. Start by applying your preferred filter and column settings, then create a"," ",et.toLowerCase()," for easy access later."]})]}),!V&&(E?(0,n.jsxs)(C.gCW,{pb:2,children:[(0,n.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]}),(0,n.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]}),(0,n.jsx)(C.OdW,{width:"100%",height:C.rSc.space[4]})]}):(0,n.jsx)(C.y02.Group,{onChange:e=>K(e.target.value),value:L,className:"flex flex-col gap-2",children:null==S?void 0:S.map(e=>(0,n.jsxs)(C.jqI,{className:u?"justify-between":"justify-start",children:[(0,n.jsx)(C.y02,{value:e.id,name:"custom-report-id","data-testid":"custom-report-item",children:(0,n.jsx)(C.xvT,{fontSize:"sm",children:e.name})}),u&&(0,n.jsx)(C.wpx,{type:"text",size:"small",icon:(0,n.jsx)(z.q,{fontSize:16}),onClick:()=>k(e),"data-testid":"delete-report-button"})]},e.id))}))]}),(0,n.jsx)(C.DT9,{border:"none",px:6,pb:4,pt:4,children:(0,n.jsxs)(C.Ugi,{children:[d&&r&&(0,n.jsxs)(C.wpx,{size:"small",onClick:v,className:"w-full","data-testid":"create-report-button",htmlType:"button",children:["+ Create ",et.toLowerCase()]}),(0,n.jsx)(C.wpx,{size:"small",type:"primary",loading:G,disabled:er,className:"w-full","data-testid":"apply-report-button",htmlType:"submit",children:"Apply"})]})})]})})]})})]}),(0,n.jsx)(ee,{isOpen:j,handleClose:()=>{b(),setTimeout(()=>{R()},100)},tableStateToSave:r,columnMapToSave:i,unavailableNames:null==m?void 0:m.items.map(e=>e.name),onCreateCustomReport:e=>o(e,Y)}),(0,n.jsx)(C.cVQ,{isOpen:y,onClose:()=>{k(void 0),N()},onConfirm:()=>{U&&ea(U.id),N()},title:"Delete ".concat(et),message:(0,n.jsxs)(C.xvT,{children:["You are about to permanently delete the"," ",et.toLowerCase()," named"," ",(0,n.jsx)("strong",{children:null==U?void 0:U.name}),". Are you sure you would like to continue?"]})})]})};var er=s(19785),ei=s.n(er),eo=s(55807),en=s.n(eo),el=s(32526),ec=s.n(el),ed=s(72625),eu=s(43862);let e_=(0,f.Cl)(),ep=(e,t)=>({cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:s=>{let a={};return Object.keys(e).forEach(t=>{"string"==typeof e[t]?a[t]=e[t]:e[t].label&&(a[t]=e[t].label||"")}),(0,n.jsx)(ed.Hm,{value:(0,eu.AH)({columnId:s.column.id,columnNameMap:a}),defaultValue:p[s.column.id]||(0,eu.AH)({columnId:s.column.id}),isEditing:t,...s})}}),em=(e,t)=>{var s;let a=(null==e?void 0:null===(s=e.items)||void 0===s?void 0:s.length)?Object.keys(e.items[0]):[],r=Object.values(o);return a.filter(e=>!r.includes(e)).filter(e=>e.startsWith("privacy_declaration_")||e.startsWith("system_")).map(e=>{let s=t.find(t=>e.includes(ec()(t.name)));return e_.accessor(t=>t[e],{id:e,cell:e=>Array.isArray(e.getValue())?(0,n.jsx)(x.WP,{value:e.getValue(),ignoreZero:!0,...e}):(0,n.jsx)(x.G3,{value:e.getValue()}),meta:{showHeaderMenu:(null==s?void 0:s.field_type)==="string[]"}})})},eE=e=>{let{onSelectRow:t,getDataUseDisplayName:s,getDataCategoryDisplayName:a,getDataSubjectDisplayName:r,datamapReport:i,customFields:l,isRenaming:c=!1}=e,d=em(i,l);return[e_.accessor(e=>e.system_name,{enableGrouping:!0,id:o.SYSTEM_NAME,meta:{onCellClick:t}}),e_.accessor(e=>e.data_uses,{id:o.DATA_USE,cell:e=>{let t=e.getValue();return(0,n.jsx)(x.WP,{suffix:"data uses",ignoreZero:!0,value:ei()(t)?en()(t,s):s(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto"}}),e_.accessor(e=>e.data_categories,{id:o.DATA_CATEGORY,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,n.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_subjects,{id:o.DATA_SUBJECT,cell:e=>{let t=e.getValue();return(0,n.jsx)(x.WP,{suffix:"data subjects",ignoreZero:!0,value:ei()(t)?en()(t,r):r(t||""),tagProps:{color:"white"},...e})},meta:{showHeaderMenu:!c}}),e_.accessor(e=>e.legal_name,{id:o.LEGAL_NAME}),e_.accessor(e=>e.dpo,{id:o.DPO}),e_.accessor(e=>e.legal_basis_for_processing,{id:o.LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.administrating_department,{id:o.ADMINISTRATING_DEPARTMENT}),e_.accessor(e=>e.cookie_max_age_seconds,{id:o.COOKIE_MAX_AGE_SECONDS}),e_.accessor(e=>e.privacy_policy,{id:o.PRIVACY_POLICY}),e_.accessor(e=>e.legal_address,{id:o.LEGAL_ADDRESS}),e_.accessor(e=>e.cookie_refresh,{id:o.COOKIE_REFRESH}),e_.accessor(e=>e.data_security_practices,{id:o.DATA_SECURITY_PRACTICES}),e_.accessor(e=>e.data_shared_with_third_parties,{id:o.DATA_SHARED_WITH_THIRD_PARTIES}),e_.accessor(e=>e.processes_special_category_data,{id:o.PROCESSES_SPECIAL_CATEGORY_DATA}),e_.accessor(e=>e.data_stewards,{id:o.DATA_STEWARDS,cell:e=>(0,n.jsx)(x.WP,{suffix:"data stewards",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.declaration_name,{id:o.DECLARATION_NAME}),e_.accessor(e=>e.does_international_transfers,{id:o.DOES_INTERNATIONAL_TRANSFERS}),e_.accessor(e=>e.dpa_location,{id:o.DPA_LOCATION}),e_.accessor(e=>e.egress,{id:o.DESTINATIONS,cell:e=>(0,n.jsx)(x.WP,{suffix:"destinations",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.exempt_from_privacy_regulations,{id:o.EXEMPT_FROM_PRIVACY_REGULATIONS}),e_.accessor(e=>e.features,{id:o.FEATURES,cell:e=>(0,n.jsx)(x.WP,{suffix:"features",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.fides_key,{id:o.FIDES_KEY}),e_.accessor(e=>e.flexible_legal_basis_for_processing,{id:o.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING}),e_.accessor(e=>e.impact_assessment_location,{id:o.IMPACT_ASSESSMENT_LOCATION}),e_.accessor(e=>e.ingress,{id:o.SOURCES,cell:e=>(0,n.jsx)(x.WP,{suffix:"sources",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.joint_controller_info,{id:o.JOINT_CONTROLLER_INFO}),e_.accessor(e=>e.legal_basis_for_profiling,{id:o.LEGAL_BASIS_FOR_PROFILING,cell:e=>(0,n.jsx)(x.WP,{suffix:"profiles",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legal_basis_for_transfers,{id:o.LEGAL_BASIS_FOR_TRANSFERS,cell:e=>(0,n.jsx)(x.WP,{suffix:"transfers",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.legitimate_interest_disclosure_url,{id:o.LEGITIMATE_INTEREST_DISCLOSURE_URL}),e_.accessor(e=>e.processes_personal_data,{id:o.PROCESSES_PERSONAL_DATA}),e_.accessor(e=>e.reason_for_exemption,{id:o.REASON_FOR_EXEMPTION}),e_.accessor(e=>e.requires_data_protection_assessments,{id:o.REQUIRES_DATA_PROTECTION_ASSESSMENTS}),e_.accessor(e=>e.responsibility,{id:o.RESPONSIBILITY,cell:e=>(0,n.jsx)(x.WP,{suffix:"responsibilities",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.retention_period,{id:o.RETENTION_PERIOD}),e_.accessor(e=>e.shared_categories,{id:o.SHARED_CATEGORIES,cell:e=>(0,n.jsx)(x.WP,{suffix:"shared categories",ignoreZero:!0,value:e.getValue(),tagProps:{color:"white"},...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.special_category_legal_basis,{id:o.SPECIAL_CATEGORY_LEGAL_BASIS}),e_.accessor(e=>e.third_parties,{id:o.THIRD_PARTIES}),e_.accessor(e=>e.system_undeclared_data_categories,{id:o.SYSTEM_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,n.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.data_use_undeclared_data_categories,{id:o.DATA_USE_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let s=ei()(t)?t.map(e=>({label:a(e),key:e})):[{label:a(t),key:t}];return(0,n.jsx)(ed.mb,{values:s,cellProps:e})},meta:{showHeaderMenu:!c,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),e_.accessor(e=>e.cookies,{id:o.COOKIES,cell:e=>(0,n.jsx)(x.WP,{ignoreZero:!0,suffix:"cookies",value:e.getValue(),...e}),meta:{showHeaderMenu:!c,width:"auto"}}),e_.accessor(e=>e.uses_cookies,{id:o.USES_COOKIES}),e_.accessor(e=>e.uses_non_cookie_access,{id:o.USES_NON_COOKIE_ACCESS}),e_.accessor(e=>e.uses_profiling,{id:o.USES_PROFILING}),...d]},eS=e=>{let{columnNameMapOverrides:t,setColumnNameMapOverrides:s,setSavedCustomReportId:a,setIsRenamingColumns:r}=e,{submitForm:i,resetForm:o}=(0,T.u6)();return(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(C.wpx,{size:"small","data-testid":"rename-columns-reset-btn",onClick:()=>{s({}),a(""),o({values:{}}),r(!1)},children:"Reset all"}),(0,n.jsx)(C.wpx,{size:"small","data-testid":"rename-columns-cancel-btn",onClick:()=>{o({values:t}),r(!1)},children:"Cancel"}),(0,n.jsx)(C.wpx,{size:"small",type:"primary",htmlType:"submit","data-testid":"rename-columns-apply-btn",onClick:i,children:"Apply"})]})},eh=e=>e===_.fI.DATA_USE_SYSTEM?[o.DATA_USE]:[o.SYSTEM_NAME],eA=e=>{let t=[];return _.fI.SYSTEM_DATA_USE===e&&(t=[o.SYSTEM_NAME,o.DATA_USE]),_.fI.DATA_USE_SYSTEM===e&&(t=[o.DATA_USE,o.SYSTEM_NAME]),t},eg=(e,t)=>eA(e).concat(t.filter(e=>e!==o.SYSTEM_NAME&&e!==o.DATA_USE)),ef={items:[],total:0,page:1,size:25,pages:1},ex=()=>{let e=(0,D.Tg)([_.Sh.CUSTOM_REPORT_READ]),{isLoading:t}=(0,V.x8)(),{PAGE_SIZES:s,pageSize:a,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:c,onNextPageClick:d,isNextPageDisabled:u,startRange:S,endRange:h,pageIndex:R,setTotalPages:L,resetPageIndexToDefault:w}=(0,x.oi)(),P=(0,C.pmc)({id:"datamap-report-toast"}),{isOpen:U,onClose:k,onOpen:G}=(0,C.qY0)(),{getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,isLoading:B}=(0,v.Z)(),[z,W]=(0,l.useState)(),{savedCustomReportId:q,setSavedCustomReportId:X,groupBy:J,setGroupBy:K,selectedFilters:Q,setSelectedFilters:$,columnOrder:ee,setColumnOrder:et,columnVisibility:es,setColumnVisibility:er,columnSizing:ei,setColumnSizing:eo,columnNameMapOverrides:en,setColumnNameMapOverrides:el}=A(),[ec,ed]=(0,l.useState)(!1),eu=e=>{X(""),K(e),ed(!0),w()},[e_,em]=(0,l.useState)(""),ex=(0,l.useCallback)(e=>{w(),em(e)},[w,em]),eC={pageIndex:R,pageSize:a,groupBy:J,search:e_,dataUses:(0,y.du)(Q.dataUses,"data_uses"),dataSubjects:(0,y.du)(Q.dataSubjects,"data_subjects"),dataCategories:(0,y.du)(Q.dataCategories,"data_categories")},{data:eT,isLoading:eR,isFetching:eO}=(0,I.tH)(eC),[ej,{isLoading:ev,isError:eb}]=(0,I.Eo)(),{data:eD,totalRows:ey}=(0,l.useMemo)(()=>{let e=eT||ef,t=e.items;return ec&&ed(!1),L(e.pages),{totalRows:e.total,data:t}},[eT]);(0,V.GH)();let eI=(0,j.C)(V.fN),[eN,eL]=(0,l.useState)(!1),ew=(0,l.useMemo)(()=>eT?eE({onSelectRow:e=>W(e.fides_key),getDataUseDisplayName:H,getDataCategoryDisplayName:Y,getDataSubjectDisplayName:Z,datamapReport:eT,customFields:eI,isRenaming:eN}):[],[H,Z,Y,eT,eI,eN]),{isOpen:eM,onOpen:eP,onClose:eU}=(0,C.qY0)(),{isOpen:ek,onOpen:eG,onClose:eH}=(0,C.qY0)(),eY=(0,g.b7)({getCoreRowModel:(0,f.sC)(),getGroupedRowModel:(0,f.qe)(),getExpandedRowModel:(0,f.rV)(),manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onChange",columns:ew,defaultColumn:ep({...p,...en},eN),data:eD,initialState:{expanded:!0,columnSizing:ei,columnOrder:ee,columnVisibility:es,grouping:eh(J)}});(0,l.useEffect)(()=>{J&&eY&&eT&&(0===eY.getState().columnOrder.length?et(eg(J,eY.getAllColumns().map(e=>e.id))):et(eg(J,eY.getState().columnOrder)))},[J,eY,eT]),(0,l.useEffect)(()=>{let e=eh(J);eT&&eY.setGrouping(e)},[eT]);let eF=(0,l.useMemo)(()=>O()(eo,300),[eo]);(0,l.useEffect)(()=>{let e=eY.getState().columnSizing;e&&eF(e)},[eY.getState().columnSizing]);let eV=(e,t)=>{if(e||q){if(!e){try{X(""),er(m),eY.toggleAllColumnsVisible(!0),eY.setColumnVisibility(m),et([]),eY.setColumnOrder([]),K(_.fI.SYSTEM_DATA_USE),$(E),el({}),t({values:{}})}catch(e){P({status:"error",description:"There was a problem resetting the report."})}return}try{var s,a,r,i;if(null===(s=e.config)||void 0===s?void 0:s.table_state){let{groupBy:t,filters:s,columnOrder:a}=e.config.table_state,i={};Object.entries(null!==(r=e.config.column_map)&&void 0!==r?r:{}).forEach(e=>{let[t,s]=e;i[t]=s.enabled||!1}),t&&K(t),s&&$(s),a&&(et(a),eY.setColumnOrder(a)),i&&(er(i),eY.setColumnVisibility(i))}if(null===(a=e.config)||void 0===a?void 0:a.column_map){let s={};Object.entries(null!==(i=e.config.column_map)&&void 0!==i?i:{}).forEach(e=>{let[t,a]=e;a.label&&(s[t]=a.label)}),el(s),t({values:s})}X(e.id),P({status:"success",description:"Report applied successfully."})}catch(e){P({status:"error",description:"There was a problem applying report."})}}};return eR||t||B?(0,n.jsx)(x.I4,{rowHeight:36,numRows:15}):(0,n.jsxs)(C.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,n.jsx)(F,{columnNameMap:{...p,...en},selectedFilters:Q,isOpen:U,onClose:k,onFilterChange:e=>{X(""),$(e)}}),(0,n.jsx)(x.F1,{isOpen:eM,onClose:eU,headerText:"Columns",columnNameMap:{...p,...en},prefixColumns:eA(J),tableInstance:eY,savedCustomReportId:q,onColumnOrderChange:e=>{X(""),eY.setColumnOrder(e),et(e)},onColumnVisibilityChange:e=>{X(""),eY.setColumnVisibility(e),er(e)}}),(0,n.jsx)(M,{isOpen:ek,onClose:eH,onConfirm:e=>{let t={};Object.entries(es).forEach(e=>{let[s,a]=e;t[s]={enabled:a}}),Object.entries(en).forEach(e=>{let[s,a]=e;if(t[s])t[s].label=a;else{var r;t[s]={label:a,enabled:null===(r=es[s])||void 0===r||r}}}),ej({...eC,format:e,report_id:q,report:{name:"",type:"datamap",config:{column_map:t,table_state:{groupBy:J,filters:Q,columnOrder:ee}}}}).then(()=>{eb||eH()})},isLoading:ev}),(0,n.jsx)(T.J9,{initialValues:en,onSubmit:e=>{X(""),el(e),eL(!1)},children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(x.Q$,{children:[(0,n.jsx)(x.HO,{globalFilter:e_,setGlobalFilter:ex,placeholder:"System name, Fides key, or ID"}),(0,n.jsxs)(C.kCb,{alignItems:"center",gap:2,children:[e&&(0,n.jsx)(ea,{reportType:_.C2.DATAMAP,savedReportId:q,tableStateToSave:{groupBy:J,filters:Q,columnOrder:ee,columnVisibility:es},currentColumnMap:en,onCustomReportSaved:(e,t)=>eV(e,t),onSavedReportDeleted:()=>{X("")}}),(0,n.jsxs)(C.v2r,{children:[(0,n.jsxs)(C.j2t,{as:C.wpx,icon:(0,n.jsx)(C.v4q,{}),iconPosition:"end",loading:ec,"data-testid":"group-by-menu",children:["Group by ",(()=>{switch(J){case _.fI.SYSTEM_DATA_USE:return"system";case _.fI.DATA_USE_SYSTEM:return"data use";default:return"system"}})()]}),(0,n.jsxs)(C.qyq,{zIndex:11,"data-testid":"group-by-menu-list",children:[(0,n.jsx)(C.iiZ,{onClick:()=>{eu(_.fI.SYSTEM_DATA_USE)},isChecked:_.fI.SYSTEM_DATA_USE===J,value:_.fI.SYSTEM_DATA_USE,"data-testid":"group-by-system-data-use",children:"System"}),(0,n.jsx)(C.iiZ,{onClick:()=>{eu(_.fI.DATA_USE_SYSTEM)},isChecked:_.fI.DATA_USE_SYSTEM===J,value:_.fI.DATA_USE_SYSTEM,"data-testid":"group-by-data-use-system",children:"Data use"})]})]}),(0,n.jsx)(C.wpx,{"data-testid":"filter-multiple-systems-btn",onClick:G,children:"Filter"}),(0,n.jsx)(C.wpx,{"aria-label":"Export report","data-testid":"export-btn",onClick:eG,icon:(0,n.jsx)(b.nM,{ml:"1.5px"})}),(0,n.jsxs)(C.v2r,{placement:"bottom-end",children:[(0,n.jsx)(C.j2t,{as:C.wpx,icon:(0,n.jsx)(C.nXP,{className:"rotate-90"}),"data-testid":"more-menu","aria-label":"More options",className:"w-6 gap-0"}),(0,n.jsxs)(C.qyq,{"data-testid":"more-menu-list",children:[(0,n.jsx)(C.sNh,{onClick:eP,"data-testid":"edit-columns-btn",children:"Edit columns"}),(0,n.jsx)(C.sNh,{onClick:()=>eL(!0),"data-testid":"rename-columns-btn",children:"Rename columns"})]})]}),eN&&(0,n.jsx)(eS,{columnNameMapOverrides:en,setColumnNameMapOverrides:el,setSavedCustomReportId:X,setIsRenamingColumns:eL})]})]}),(0,n.jsx)(T.l0,{children:(0,n.jsx)(x.ZK,{tableInstance:eY,columnExpandStorageKey:i.COLUMN_EXPANSION_STATE,columnWrapStorageKey:i.WRAPPING_COLUMNS})})]})}),(0,n.jsx)(x.s8,{totalRows:ey||0,pageSizes:s,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:c||eO,onNextPageClick:d,isNextPageDisabled:u||eO,startRange:S,endRange:h}),(0,n.jsx)(N.Z,{selectedSystemId:z,resetSelectedSystemId:()=>W(void 0)})]})};var eC=()=>(0,n.jsxs)(c.Z,{title:"Datamap Report",children:[(0,n.jsx)(d.Z,{"data-testid":"datamap-report-heading",heading:"Data map report"}),(0,n.jsx)(h,{children:(0,n.jsx)(ex,{})})]})}},function(e){e.O(0,[2858,2866,9278,2599,9951,4230,2888,9774,179],function(){return e(e.s=86548)}),_N_E=e.O()}]);