ethyca-fides 2.65.0rc11__py2.py3-none-any.whl → 2.65.1__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.
- {ethyca_fides-2.65.0rc11.dist-info → ethyca_fides-2.65.1.dist-info}/METADATA +1 -1
- {ethyca_fides-2.65.0rc11.dist-info → ethyca_fides-2.65.1.dist-info}/RECORD +108 -108
- fides/_version.py +3 -3
- fides/api/api/v1/endpoints/privacy_request_endpoints.py +24 -1
- fides/api/oauth/roles.py +2 -0
- fides/api/schemas/api.py +6 -0
- fides/api/service/connectors/base_email_connector.py +1 -1
- fides/api/service/connectors/base_erasure_email_connector.py +39 -2
- fides/api/service/connectors/consent_email_connector.py +1 -1
- fides/api/service/connectors/dynamic_erasure_email_connector.py +14 -48
- fides/api/service/connectors/erasure_email_connector.py +14 -8
- fides/api/service/privacy_request/email_batch_service.py +68 -52
- fides/api/tasks/scheduled/scheduler.py +5 -0
- fides/api/util/lock.py +3 -0
- fides/common/api/scope_registry.py +4 -0
- fides/common/api/v1/urn_registry.py +3 -0
- fides/config/execution_settings.py +8 -0
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3988-e8e0424b117d813b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-93f0fed887d9e98e.js +1 -0
- fides/ui-build/static/admin/_next/static/css/{5f8af79f94072e0f.css → d522df24a125b46f.css} +1 -1
- fides/ui-build/static/admin/_next/static/e4X4A9FU3w3buLKgvkCKW/_buildManifest.js +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/poc/ant-components.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
- fides/ui-build/static/admin/poc/forms.html +1 -1
- fides/ui-build/static/admin/poc/table-migration.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about/alpha.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/ui-build/static/admin/_next/static/BK56P69fQA7jyWB8H568y/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3988-046b3a2866b5cb99.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-b1772281866cb827.js +0 -1
- {ethyca_fides-2.65.0rc11.dist-info → ethyca_fides-2.65.1.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.65.0rc11.dist-info → ethyca_fides-2.65.1.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.65.0rc11.dist-info → ethyca_fides-2.65.1.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.65.0rc11.dist-info → ethyca_fides-2.65.1.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{_app-3e486cab9a918260.js → _app-be66c01c2b1de442.js} +0 -0
- /fides/ui-build/static/admin/_next/static/{BK56P69fQA7jyWB8H568y → e4X4A9FU3w3buLKgvkCKW}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2369],{1565:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests",function(){return s(27822)}])},35287:function(e,t,s){"use strict";var l=s(24246),i=s(86920),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(86920);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(86920);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(86920),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(68309);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"}},27822:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eE}});var l,i,a=s(24246),r=s(35287),n=s(86920),d=s(65218),o=s.n(d),u=s(27378),c=s(25980),p=s(19904),m=s(86677),h=s(59969),x=s(18225),y=s(77830),v=s(28407),j=s(42904),f=s(16394),_=s(71784),g=s(68309),b=s(45116);let C=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})]})},q=e=>{let{task:t}=e,s=t.request_type===g.k6.ACCESS?g.Us.ACCESS:g.Us.ERASURE,l=_.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)(C,{label:"Name",children:(0,a.jsx)(n.AntTypography.Text,{children:t.name})}),(0,a.jsx)(C,{label:"Description",children:(0,a.jsx)(n.AntTypography.Text,{children:t.description||"-"})}),(0,a.jsx)(C,{label:"Request Type",children:(0,a.jsx)(n.AntTypography.Text,{children:l})}),(0,a.jsx)(C,{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)(C,{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)(C,{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]})},k=e=>{let{isOpen:t,onClose:s,task:l}=e,[i,{isLoading:r}]=(0,b.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===g.PF.TEXT?d:l.input_type===g.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)(q,{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 g.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 g.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 g.PF.TEXT:return d.trim().length>0;case g.PF.CHECKBOX:return c;default:return x.length>0}})(),"data-testid":"complete-modal-save-button",children:"Save"})]})})]})]})},S=e=>{let{isOpen:t,onClose:s,task:l}=e,[i,{isLoading:r}]=(0,b.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)(q,{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"})]})})]})]})},E=e=>{let{task:t}=e,s=(0,m.useRouter)(),{isOpen:l,onOpen:i,onClose:r}=(0,n.qY0)(),{isOpen:d,onOpen:o,onClose:u}=(0,n.qY0)();if(t.status!==g.OS.NEW)return null;let c=[{key:"skip",label:"Skip task",onClick:o},{key:"go-to-request",label:"Go to request",onClick:()=>{s.push({pathname:y.ld,query:{id:t.privacy_request.id}})}}];return(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:c},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)(k,{isOpen:l,onClose:r,task:t}),(0,a.jsx)(S,{isOpen:d,onClose:u,task:t})]})},w={[g.OS.NEW]:{color:"info",label:"New"},[g.OS.COMPLETED]:{color:"success",label:"Completed"},[g.OS.SKIPPED]:{color:"marble",label:"Skipped"}},R=[{text:"New",value:g.OS.NEW},{text:"Completed",value:g.OS.COMPLETED},{text:"Skipped",value:g.OS.SKIPPED}],T=[{text:"Access",value:g.k6.ACCESS},{text:"Erasure",value:g.k6.ERASURE}],P=(e,t,s)=>[{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:w[e].color,"data-testid":"manual-task-status-tag",children:w[e].label}),filters:R,filterMultiple:!1},{title:"System",dataIndex:["system","name"],key:"system_name",width:210,filters:e,filterMultiple:!1},{title:"Type",dataIndex:"request_type",key:"request_type",width:150,render:e=>{let t=e===g.k6.ACCESS?g.Us.ACCESS:g.Us.ERASURE,s=_.rE.get(t)||e;return(0,a.jsx)(n.AntTypography.Text,{children:s})},filters:T,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,f.gJ)(e),value:e.id})),l=e.map(e=>e.id);return(0,a.jsx)(n.d3V,{value:l,options:t,readonly:!0,onTagClick:e=>s(String(e))})},filters:t,filterMultiple:!1},{title:"Days left",dataIndex:["privacy_request","days_left"],key:"days_left",width:140,render:e=>(0,a.jsx)(h.Z,{daysLeft:e||0,includeText:!1,status:g.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)(E,{task:t})}],I=()=>{let e=(0,m.useRouter)(),[t,s]=(0,u.useState)(1),[l,i]=(0,u.useState)(25),[r,d]=(0,u.useState)({}),[o,c]=(0,u.useState)(e.query.privacy_request_id||"");(0,u.useEffect)(()=>{let{privacy_request_id:t}=e.query;t&&"string"==typeof t&&(c(t),d(e=>({...e,privacyRequestId:t})))},[e.query]);let{data:p,isLoading:h,isFetching:_}=(0,b.Ym)({page:t,size:l,status:r.status,systemName:r.systemName,requestType:r.requestType,assignedUserId:r.assignedUsers,privacyRequestId:r.privacyRequestId}),{items:g,total:C,filter_options:q}=(0,u.useMemo)(()=>p||{items:[],total:0,pages:0,filter_options:{assigned_users:[],systems:[]}},[p]),k=(0,u.useMemo)(()=>{var e;return(null==q?void 0:null===(e=q.systems)||void 0===e?void 0:e.map(e=>({text:e.name,value:e.name})))||[]},[null==q?void 0:q.systems]),S=(0,u.useMemo)(()=>{var e;return(null==q?void 0:null===(e=q.assigned_users)||void 0===e?void 0:e.map(e=>({text:(0,f.gJ)(e),value:e.id})))||[]},[null==q?void 0:q.assigned_users]),E=(0,u.useMemo)(()=>P(k,S,t=>{e.push({pathname:y.fw,query:{id:t}})}),[k,S,e]);return h?(0,a.jsx)(x.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)(v.H,{globalFilter:o,setGlobalFilter:e=>{c(e||"");let t={...r};e&&e.trim()?t.privacyRequestId=e.trim():delete t.privacyRequestId,d(t),s(1)},placeholder:"Search by privacy request ID",testid:"privacy-request-id-filter"})}),(0,a.jsx)(n.V5H,{columns:E,dataSource:g,rowKey:e=>"".concat(e.privacy_request.id,"-").concat(e.manual_field_id),pagination:{current:t,pageSize:l,total:C||0,showSizeChanger:!0,pageSizeOptions:j.W3,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," items"),onChange:(e,t)=>{s(e),t!==l&&(i(t),s(1))}},onChange:(e,t)=>{let l={privacyRequestId:r.privacyRequestId};t.status&&([l.status]=t.status),t.system_name&&([l.systemName]=t.system_name),t.request_type&&([l.requestType]=t.request_type),t.assigned_users&&([l.assignedUsers]=t.assigned_users),d(l),s(1)},locale:{emptyText:(0,a.jsx)("div",{"data-testid":"empty-state",children:"No manual tasks available."})},loading:h||_})]})};var A=s(59003),N=s(92222),O=s(16125),D=s(91317),U=s(14048),F=s(47935),z=s(90867);let M={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"}},Z=e=>{let{value:t}=e;return(0,a.jsx)(F.A4,{color:M[t].colorScheme,value:M[t].label,"data-testid":"request-status-badge"})},L=e=>{let t,{daysLeft:s,timeframe:l=45,status:i,includeText:r=!1}=e;if(null==s||i===g.q2.COMPLETE||i===g.q2.CANCELED||i===g.q2.DENIED||i===g.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)(F.A4,{value:r?"".concat(s," days left"):s.toString(),color:t})},V=e=>Array.from(new Set(e.filter(e=>Object.values(g.Us).includes(e.action_type)).map(e=>e.action_type))),B=e=>{let{value:t}=e,s=V(t).map(e=>_.rE.get(e));return(0,a.jsx)(F.WP,{value:s,cellState:{isExpanded:!0}})};var W=s(58452),G=s(57526),Y=s(66548),K=s(45489);let X=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,K.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:[g.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)(G.Z,{isOpen:l.isOpen,isLoading:c,onClose:l.onClose,onApproveRequest:d,subjectRequest:t})}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(Y.Z,{isOpen:i.isOpen,onClose:i.onClose,onDenyRequest:o})}),(0,a.jsx)(W.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 H=(0,N.Cl)(),Q=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return[H.accessor(e=>e.status,{id:"status",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(Z,{value:t()})},header:e=>(0,a.jsx)(F.Rr,{value:"Status",...e})}),H.accessor(e=>e.days_left,{id:"due_date",cell:e=>{let{row:t,getValue:s}=e;return(0,a.jsx)(L,{daysLeft:s(),timeframe:t.original.policy.execution_timeframe,status:t.original.status})},header:e=>(0,a.jsx)(F.Rr,{value:"Days left",...e})}),...e?[H.accessor(e=>e.source,{id:"source",cell:e=>e.getValue()?(0,a.jsx)(F.A4,{value:e.getValue()}):(0,a.jsx)(F.G3,{value:void 0}),header:e=>(0,a.jsx)(F.Rr,{value:"Source",...e}),enableSorting:!1})]:[],H.accessor(e=>e.policy.rules,{id:"request_type",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(B,{value:t()})},header:e=>(0,a.jsx)(F.Rr,{value:"Request type",...e}),enableSorting:!1}),H.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)(F.G3,{value:t()})},header:e=>(0,a.jsx)(F.Rr,{value:"Subject identity",...e}),enableSorting:!1}),H.accessor(e=>e.created_at,{id:"created_at",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(F.G3,{value:(0,f.p6)(t())})},header:e=>(0,a.jsx)(F.Rr,{value:"Time received",...e})}),H.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)(F.G3,{value:t()})},header:e=>(0,a.jsx)(F.Rr,{value:"Reviewed by",...e}),enableSorting:!1}),H.accessor(e=>e.id,{id:"id",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(F.G3,{value:t()})},header:e=>(0,a.jsx)(F.Rr,{value:"Request ID",...e}),enableSorting:!1}),H.display({id:"actions",cell:e=>{let{row:t}=e;return(0,a.jsx)(X,{subjectRequest:t.original})},header:e=>(0,a.jsx)(F.Rr,{value:"Actions",...e}),meta:{disableRowClick:!0}})]},J=e=>{let t=(0,O.v9)(z.dp),s=(0,O.I0)();return{handleStatusChange:t=>{s((0,z.CI)(t)),e()},handleActionTypeChange:t=>{s((0,z.aM)(t)),e()},handleFromChange:t=>{s((0,z.su)(null==t?void 0:t.target.value)),e()},handleToChange:t=>{s((0,z.Ue)(null==t?void 0:t.target.value)),e()},handleClearAllFilters:()=>{s((0,z.Mk)()),e()},...t}};var $=s(96718);let ee=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}=J(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)($.z,{id:"request-status",mode:"multiple",options:_.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)($.z,{id:"request-action-type",mode:"multiple",options:_.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"})]})]})]})},et=e=>{let{...t}=e,{plus:s}=(0,c.hz)(),[l,i]=(0,u.useState)(""),r=(0,O.v9)(z.dp),d=(0,O.v9)(D.rK),o=(0,n.pmc)(),p=(0,m.useRouter)(),h=(0,O.I0)(),{PAGE_SIZES:x,pageSize:y,setPageSize:v,onPreviousPageClick:j,isPreviousPageDisabled:f,onNextPageClick:_,isNextPageDisabled:g,startRange:b,endRange:C,pageIndex:q,setTotalPages:k,resetPageIndexToDefault:S}=(0,F.oi)(),{isOpen:E,onOpen:w,onClose:R}=(0,n.qY0)(),{data:T,isLoading:P,isFetching:I}=(0,z.QA)({...r,page:q,size:y}),{items:M,total:Z}=(0,u.useMemo)(()=>{let e=T||{items:[],total:0,pages:0};return k(e.pages),e},[T,k]),L=(0,u.useCallback)(e=>{h((0,z.mU)(e)),i(e),S()},[h,S,i]),V=async()=>{let e;try{await (0,z.py)({...r,token:d})}catch(t){e=t instanceof Error?t.message:"Unknown error occurred"}e&&o({description:"".concat(e),duration:5e3,status:"error"})},B=e=>{p.push("/privacy-requests/".concat(e))},W=(0,A.b7)({getCoreRowModel:(0,N.sC)(),data:M,columns:(0,u.useMemo)(()=>Q(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)(F.Q$,{children:[(0,a.jsx)(F.HO,{globalFilter:l,setGlobalFilter:L,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:w,children:"Filter"}),(0,a.jsx)(n.wpx,{"aria-label":"Export report","data-testid":"export-btn",icon:(0,a.jsx)(U.nM,{ml:"1.5px"}),onClick:V})]}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(ee,{isOpen:E,onClose:R,onFilterChange:S})})]}),P?(0,a.jsx)(n.xuv,{p:2,borderWidth:1,children:(0,a.jsx)(F.I4,{rowHeight:26,numRows:10})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(F.ZK,{tableInstance:W,onRowClick:e=>B(e.id),onSort:e=>{if(!e){h((0,z.p2)()),S();return}let{id:t,desc:s}=e;h((0,z.PU)(t)),h((0,z.iX)(s?"desc":"asc")),S()}}),(0,a.jsx)(F.s8,{totalRows:Z||0,pageSizes:x,setPageSize:v,onPreviousPageClick:j,isPreviousPageDisabled:f||I,onNextPageClick:_,isNextPageDisabled:g||I,startRange:b,endRange:C})]})]})};var es=s(812),el=s(87361),ei=s(46628),ea=s(32885),er=s(34090),en=s(55484),ed=s(40324);let eo=(e,t)=>null==t?void 0:t.find(t=>t.policy_key===e),eu=e=>{var t,s;if(!e)return en.Ry().shape({policy_key:en.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]:en.Ry().shape({value:s.required&&!s.hidden?en.Z_().required().label(s.label):en.Z_().nullable()})}}).reduce((e,t)=>({...e,...t}),{}):{};return en.Ry().shape({policy_key:en.Z_().required().label("Request type"),identity:en.Ry().shape({email:(null===(t=e.identity_inputs)||void 0===t?void 0:t.email)==="required"?en.Z_().email().required().label("Email address"):en.Z_().nullable(),phone_number:(null===(s=e.identity_inputs)||void 0===s?void 0:s.phone)==="required"?en.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").required().label("Phone number"):en.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").nullable()}),custom_privacy_request_fields:en.Ry().shape(l)})};var ec=s(97181);let ep={is_verified:!1,policy_key:"",identity:{}},em=e=>{let{identityInputs:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[t.email?(0,a.jsx)(ed.j0,{name:"identity.email",label:"User email address",isRequired:"required"===t.email,variant:"stacked"}):null,t.phone?(0,a.jsx)(ed.j0,{name:"identity.phone_number",label:"User phone number",isRequired:"required"===t.phone,variant:"stacked"}):null]}):null},eh=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)(ed.j0,{name:"custom_privacy_request_fields.".concat(t,".value"),label:s.label,isRequired:!!s.required,variant:"stacked"},t)})})},ex=e=>{let{onSubmit:t,onCancel:s,privacyCenterUrl:l}=e,{onCopy:i}=(0,n.VPI)(""),r=(0,n.pmc)();return(0,a.jsx)(er.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:()=>en.Ry().shape({identity:en.Ry().shape({email:en.Z_().email().required().label("Email Address")})}),children:e=>{let{dirty:t,isValid:l}=e;return(0,a.jsx)(er.l0,{children:(0,a.jsxs)(n.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(em,{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 ey=e=>{let{onSubmit:t,onCancel:s}=e,{data:l}=(0,z.xv)();return(0,a.jsx)(er.J9,{initialValues:ep,onSubmit:t,validationSchema:()=>(0,en.Vo)(e=>eu(eo(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=eo(i.policy_key,null==l?void 0:l.actions);return(0,a.jsx)(er.l0,{children:(0,a.jsxs)(n.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(ec.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=eo(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)(em,{identityInputs:null==c?void 0:c.identity_inputs}),(0,a.jsx)(eh,{customFieldInputs:null==c?void 0:c.custom_privacy_request_fields}),(0,a.jsx)(ed.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"})]})]})})}})},ev=s(31883);let ej=e=>{let{isOpen:t,onClose:s}=e,[l]=(0,z.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,ev.D4)(d)?i((0,ei.Vo)((0,es.e$)(d.error,"An error occurred while creating this privacy request. Please try again"))):i((0,ei.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)(el.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)(ey,{onSubmit:r,onCancel:()=>s()})]})})]})]})},ef=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)(ex,{privacyCenterUrl:l,onSubmit:s,onCancel:s})]})]})]})};var e_=()=>{var e;let[t,s]=(0,u.useState)("closed"),l=()=>s("closed"),{data:i}=(0,ea.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)(ef,{isOpen:"create-link"===t,onClose:l,privacyCenterUrl:r}):null,(0,a.jsx)(ej,{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"})]})},eg=s(58754),eb=s(14047);let eC=()=>{let{errorAlert:e}=(0,eb.V)(),[t,s]=(0,u.useState)(!1),[l,i]=(0,u.useState)({count:0,total:0}),[r,d]=(0,u.useState)(!0),o=g.q2.ERROR,{data:c}=(0,z.tE)(),{data:p}=(0,z.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 eq=s(72281);let ek=o()(()=>s.e(9676).then(s.bind(s,59676)),{loadableGenerated:{webpack:()=>[59676]},loading:()=>(0,a.jsx)("div",{children:"Loading..."})});var eS=()=>{let{processing:e}=eC(),{plus:t}=(0,c.hz)(),{activeTab:s,handleTabChange:l,availableTabs:i}=(0,eq.d)();(0,u.useEffect)(()=>{e()},[e]);let r=(0,u.useMemo)(()=>{let e=[{key:eq.G.REQUEST,label:"Request",children:(0,a.jsx)(et,{})}];return i.manualTask&&e.push({key:eq.G.MANUAL_TASK,label:"Manual tasks",children:(0,a.jsx)(I,{})}),e},[i.manualTask]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eg.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests"}],rightContent:(0,a.jsxs)(n.vyj,{children:[t&&(0,a.jsx)(p.ZP,{scopes:[g.Sh.PRIVACY_REQUEST_CREATE],children:(0,a.jsx)(e_,{})}),(0,a.jsx)(ek,{})]}),"data-testid":"privacy-requests"}),(0,a.jsx)(n.A5g,{activeKey:s,onChange:l,items:r})]})},eE=()=>(0,a.jsx)(r.Z,{title:"Privacy Requests",children:(0,a.jsx)(eS,{})})},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,[3988,2888,9774,179],function(){return e(e.s=1565)}),_N_E=e.O()}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|