@viswa-test/creative-workspace-ui-component 0.0.83 → 0.0.84

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),i=require("react"),n=require("lucide-react"),t=require("@mui/material/Checkbox"),r=require("@mui/material"),l=require("framer-motion"),a=require("@mui/x-date-pickers"),o=require("@mui/x-date-pickers/AdapterDayjs"),d=require("./components/ReminderFrequencyAutocomplete.js"),c=require("./components/AssigneeCalendarView.js"),u=require("dayjs"),y=require("./styles/ManageReminder.style.js");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=_(t),v=_(u),g=["Assignee 1","Assignee 2","Assignee 3"],h=[{bg:"#FDF2FA",text:"#C11574"},{bg:"#EEF4FF",text:"#3538CD"},{bg:"#F1F5F9",text:"#344054"}],x=[{bg:"#FDF2FA",text:"#C93185"},{bg:"#EEF2FF",text:"#6366F1"},{bg:"#FFF4E5",text:"#FF6058"}],f=[],p=[{bg:"#DBEAFE",text:"#1E40AF"},{bg:"#CCFBF1",text:"#0D9488"},{bg:"#DCFCE7",text:"#166534"}],j=[],C=function(e){var s,i,n,t,r,l,a,o;return(null==e?void 0:e.is_escalation_reminder)&&(null===(s=null==e?void 0:e.days)||void 0===s?void 0:s.value)&&"undefined"!==(null===(i=null==e?void 0:e.days)||void 0===i?void 0:i.value)&&(null===(n=null==e?void 0:e.escalation_reminder_frequency)||void 0===n?void 0:n.value)&&"undefined"!==(null===(t=null==e?void 0:e.escalation_reminder_frequency)||void 0===t?void 0:t.value)?"Start notifying ".concat((null===(r=null==e?void 0:e.days)||void 0===r?void 0:r.value.includes("day"))?null===(l=null==e?void 0:e.days)||void 0===l?void 0:l.value:"".concat(null===(a=null==e?void 0:e.days)||void 0===a?void 0:a.value," ").concat(1===Number(null===(o=null==e?void 0:e.days)||void 0===o?void 0:o.value)?"day":"days")," ").concat(null==e?void 0:e.before_or_after," the due date"):"Notify until successful document upload"},b={"& .MuiInputBase-root":{height:"28px",borderRadius:"4px",fontSize:"11px"}};exports.ManageReminders=function(t){var u=t.data,_=t.schedules,k=t.setSchedules,R=t.remainderOwners,F=t.setRemainderOwners,S=t.labels,I=void 0===S?g:S,E=t.colors,w=void 0===E?h:E,D=t.chipColor,A=void 0===D?x:D,T=t.assignees,q=void 0===T?f:T,B=t.fallbackRecipients,L=void 0===B?j:B,P=t.recipientsColor,M=void 0===P?p:P,O=t.manualReminderTitle,Y=void 0===O?"Send Manual Reminder Now":O,N=t.manualReminderDescription,H=void 0===N?"Immediately notify the assignees about this document.":N;t.lastReminderText;var z=t.selectRecipientsLabel,W=void 0===z?"Select recipients:":z,G=t.previewEmailButtonLabel,V=void 0===G?"Preview Email":G,U=t.sendNowButtonLabel,Z=void 0===U?"Send Now":U,J=t.reminderSuccessTitle,K=void 0===J?"Reminder sent successfully!":J,Q=t.reminderSuccessDescription,X=void 0===Q?"Email notification sent to assignees.":Q,$=t.escalationTitle,ee=void 0===$?"Escalation and Auto Reminder Setup":$;t.escalationTitleTooltip;var se=t.escalationDescription,ie=void 0===se?"Configure Auto reminder settings for all assignees.":se;t.configureAutoReminderText;var ne=t.getDynamicStatement,te=void 0===ne?C:ne,re=t.reminderStartDateLabel,le=void 0===re?"Reminder Start Date":re,ae=t.documentDueDateLabel,oe=void 0===ae?"Document Due Date":ae,de=t.reminderFrequencyLabel,ce=void 0===de?"Reminder Frequency":de,ue=t.escalationRemindersLabel,ye=void 0===ue?"Escalation Reminders":ue;t.escalationTooltip;var _e=t.escalationConditionText,me=void 0===_e?"If the document is still pending, start escalation reminders":_e,ve=t.daysText,ge=void 0===ve?"days":ve,he=t.dueDataAndRepeatText,xe=void 0===he?"due date and repeat every":he,fe=t.reminderFrequencyOptions,pe=void 0===fe?["12 hours","24 hours","48 hours","72 hours","Custom"]:fe,je=t.escalationFrequencyOptions,Ce=void 0===je?["1/2 hour","1 hour","4 hours","6 hours","12 hours","Custom"]:je,be=t.beforeAfterOptions,ke=void 0===be?["After","Before"]:be,Re=t.handelSendNow,Fe=t.showPreviewEmail,Se=void 0===Fe||Fe,Ie=i.useState(!1),Ee=Ie[0],we=Ie[1],De=i.useState(!1),Ae=De[0],Te=De[1],qe=i.useState(!1),Be=qe[0],Le=qe[1],Pe=i.useState(!0),Me=Pe[0],Oe=Pe[1],Ye=i.useState(L),Ne=Ye[0],He=Ye[1];l.useDragControls();var ze=function(s,i,n){F(function(t){return t.map(function(t,r){var l;return r===s?e.__assign(e.__assign({},t),((l={})[i]=n,l)):t})})},We=function(e,s){ze(e,"reminder_start_date",s)},Ge=function(e){var s;if(!e)return null;if("custom"===e.type)return Number(e.value)<=0?null:60*Number(e.value)*60*1e3;return null!==(s={"1/2 hour":18e5,"1 hour":36e5,"4 hours":144e5,"6 hours":216e5,"12 hours":432e5,"24 hours":864e5,"48 hours":1728e5,"72 hours":2592e5,"96 hours":3456e5,"1/2 day":432e5,"1 day":864e5,"2 days":1728e5,"3 days":2592e5,"4 days":3456e5}[e.value])&&void 0!==s?s:null},Ve=function(e,s,i){if(!e||!i)return[];var n=Ge(i);if(!n||n<=0)return[];for(var t=[],r=v.default(e).valueOf(),l=s?v.default(s).valueOf():v.default(e).add(45,"day").valueOf(),a=0;r<=l&&a<150;)t.push(v.default(r).toISOString()),r+=n,a++;return t},Ue=function(e,s,i,n){if(!(e&&s&&n&&i))return[];var t=Ge(n);if(!t)return[];var r,l=v.default(e),a="custom"===s.type?Number(s.value):Number("1/2"===s.value.split(" ")[0]?.5:Number(s.value.split(" ")[0])),o=[];switch(i){case"Before":r=l.subtract(a,"day");break;case"After":r=l.add(a,"day");break;default:return[]}for(var d=r.valueOf(),c=0;c<150;c++)o.push(v.default(d).toISOString()),d+=t;return o},Ze=function(e){return e?e.split(" ").map(function(e){return e[0]}).join("").toUpperCase():""};i.useEffect(function(){var e=(null==u?void 0:u.due_at)||"",s=Object.values((null==u?void 0:u.assignee)||{}).filter(function(e){return null==e?void 0:e.name}),i=(s.length>0?(R||[]).slice(0,s.length):[]).map(function(i,n){var t,r=s[n]||q.find(function(e){return e.id===String(i.id)}),l=(null===(t=null==w?void 0:w[n%w.length])||void 0===t?void 0:t.text)||"#C11574";return{ownerId:i.id||n+1,ownerName:(null==r?void 0:r.name)||i.name,ownerColor:(null==r?void 0:r.color)||l,reminders:Ve(i.reminder_start_date,e,i.reminder_frequency),escalations:Ue(e,i.days,i.before_or_after,i.escalation_reminder_frequency)}});k(i)},[R,null==u?void 0:u.due_at,null==u?void 0:u.assignee]),i.useEffect(function(){(null==u?void 0:u.assignee)&&He(function(e){var s=Object.values(u.assignee).filter(function(e){return e&&Object.keys(e).length>0}).map(function(s,i){var n,t,r=e.find(function(e){return e.name===s.name});return{id:null!==(n=s.id)&&void 0!==n?n:i+1,name:s.name,email:null!==(t=s.email)&&void 0!==t?t:"",checked:!!r&&r.checked,recipientsColor:(null==M?void 0:M[i])||p[i%p.length]}});return s})},[null==u?void 0:u.assignee,null==u?void 0:u.due_at]);var Je=Object.values((null==u?void 0:u.assignee)||{}).filter(function(e){return null==e?void 0:e.name}),Ke=Je.length>0?(R||[]).slice(0,Je.length):[],Qe=Ne.filter(function(e){return e.checked}),Xe=0===Qe.length;return s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},y.styles.mrContainer),{width:"100%",minWidth:"850px"})},{children:[Je.length>0&&s.jsxs("div",e.__assign({style:y.styles.mrSectionBox},{children:[s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},y.styles.mrSectionHeader),{cursor:"pointer"}),onClick:function(){Ee||we(!0)}},{children:[s.jsxs("div",e.__assign({style:y.styles.mrSectionHeaderContent},{children:[s.jsxs("div",e.__assign({style:y.styles.mrSectionHeaderLeft},{children:[s.jsxs("div",e.__assign({style:y.styles.mrSectionTitleWrapper},{children:[s.jsx("div",e.__assign({style:y.styles.mrSectionTitleIcon},{children:s.jsx(n.Send,{style:y.styles.mrIconSmall})})),s.jsx("div",e.__assign({style:y.styles.mrSectionTitle},{children:Y}))]})),s.jsx("div",e.__assign({style:y.styles.mrSectionDescription},{children:H}))]})),s.jsx("div",e.__assign({style:y.styles.mrSectionHeaderRight},{children:s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),we(function(e){return!e})},style:y.styles.mrChevronButton},{children:s.jsx(n.ChevronDown,{style:e.__assign(e.__assign({},y.styles.mrChevronIcon),Ee?y.styles.mrChevronRotated:{})})}))}))]})),s.jsx(l.AnimatePresence,{children:Be&&s.jsxs(l.motion.div,e.__assign({initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},style:y.styles.mrSuccessMessage},{children:[s.jsx("div",e.__assign({style:y.styles.mrSuccessIcon},{children:s.jsx("div",e.__assign({style:y.styles.mrSuccessIconInner},{children:s.jsx(n.CircleCheckBigIcon,{style:y.styles.mrIconSuccess})}))})),s.jsxs("div",e.__assign({style:y.styles.mrSuccessText},{children:[s.jsx("div",e.__assign({style:y.styles.mrSuccessTitle},{children:K})),s.jsx("div",e.__assign({style:y.styles.mrSuccessDescription},{children:X}))]}))]}))})]})),s.jsx(l.AnimatePresence,{children:Ee&&s.jsxs(l.motion.div,e.__assign({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:e.__assign(e.__assign({},y.styles.mrHiddenSection),{pointerEvents:Ee?"auto":"none"})},{children:[s.jsxs("div",e.__assign({style:y.styles.mrRecipientsSection},{children:[s.jsx("div",e.__assign({style:y.styles.mrRecipientsLabel},{children:W})),s.jsx("div",e.__assign({style:y.styles.mrRecipientsGrid},{children:Ne.map(function(i,n){var t,r,l,a,o=(null===(t=null==i?void 0:i.recipientsColor)||void 0===t?void 0:t.bg)||(null==i?void 0:i.bg)||(null===(r=p[n%p.length])||void 0===r?void 0:r.bg)||"#DBEAFE",d=(null===(l=null==i?void 0:i.recipientsColor)||void 0===l?void 0:l.text)||(null==i?void 0:i.text)||(null===(a=p[n%p.length])||void 0===a?void 0:a.text)||"#1E40AF";return s.jsxs("div",e.__assign({style:y.styles.mrRecipientItem},{children:[s.jsx(m.default,{checked:i.checked,onChange:function(){return s=i.name,void He(function(i){return i.map(function(i){return i.name===s?e.__assign(e.__assign({},i),{checked:!i.checked}):i})});var s},onClick:function(e){return e.stopPropagation()},size:"small",disableRipple:!0,icon:s.jsx("div",{style:y.styles.mrCheckboxUnchecked}),checkedIcon:s.jsx("div",e.__assign({style:y.styles.mrCheckboxChecked},{children:s.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:y.styles.mrCheckboxIcon},{children:s.jsx("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),s.jsxs("div",e.__assign({style:y.styles.mrRecipientInfo},{children:[s.jsx("div",e.__assign({style:e.__assign(e.__assign({},y.styles.mrRecipientAvatar),{backgroundColor:o,color:d})},{children:Ze(i.name)})),s.jsx("div",e.__assign({style:y.styles.mrRecipientName},{children:i.name}))]}))]}),i.name)})}))]})),s.jsxs("div",e.__assign({style:y.styles.mrActionsSection},{children:[Se&&s.jsxs("button",e.__assign({onClick:function(e){e.stopPropagation()},type:"button",style:e.__assign(e.__assign({},y.styles.mrActionButton),y.styles.mrActionButtonSecondary)},{children:[s.jsx(n.Mail,{style:y.styles.mrIconAction}),V]})),s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Xe||(Le(!0),setTimeout(function(){return Le(!1)},3e3),Re(_,Ke.filter(function(e){return Qe.some(function(s){return s.id===e.id||s.email===e.email||s.name===e.name})})))},disabled:Xe,style:e.__assign(e.__assign(e.__assign({},y.styles.mrActionButton),y.styles.mrActionButtonPrimary),Xe?{opacity:.55,cursor:"not-allowed"}:{})},{children:Z}))]}))]}))})]})),Je.length>0&&s.jsxs("div",e.__assign({style:y.styles.mrMainContent},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationContainer},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationHeaderWrapper,onClick:function(e){e.stopPropagation(),Ae||Te(!0)}},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationHeader},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationTitleWrapper},{children:[s.jsx("div",e.__assign({style:y.styles.mrEscalationTitleText},{children:ee})),s.jsx("div",e.__assign({style:y.styles.mrTooltipIcon},{children:s.jsx(n.InfoIcon,{stroke:"#64748B",style:y.styles.mrIconInfo})}))]})),s.jsxs("div",e.__assign({style:y.styles.mrEscalationActions},{children:[Se&&s.jsxs("button",e.__assign({style:y.styles.mrEscalationPreviewButton},{children:[s.jsx("div",e.__assign({style:y.styles.mrEscalationPreviewIcon},{children:s.jsx(n.Mail,{style:y.styles.mrIconPreview})})),s.jsx("span",e.__assign({style:y.styles.mrEscalationPreviewText},{children:V}))]})),s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Te(function(e){return!e})},style:y.styles.mrChevronButton},{children:s.jsx(n.ChevronDown,{style:e.__assign(e.__assign({},y.styles.mrChevronIcon),Ae?y.styles.mrChevronRotated:{})})}))]}))]})),s.jsx("div",e.__assign({style:y.styles.mrEscalationDescription},{children:ie}))]})),s.jsx(l.AnimatePresence,e.__assign({initial:!1},{children:Ae&&s.jsx(l.motion.div,e.__assign({layout:!0,initial:{opacity:0,scaleY:.96},animate:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.96},transition:{duration:.3,ease:"easeInOut"},style:{transformOrigin:"top",overflow:"hidden"}},{children:s.jsx(l.Reorder.Group,e.__assign({axis:"y",values:Ke,onReorder:function(e){F(e)},layoutScroll:!0,style:y.styles.mrReorderGroup},{children:Ke.map(function(i,t){var c,_,g,h,x=Je[t]||L[t],f=(null===(c=null==w?void 0:w[t])||void 0===c?void 0:c.bg)||"#FDF2FA",p=(null===(_=null==w?void 0:w[t])||void 0===_?void 0:_.text)||"#C11574",j=(null===(g=null==A?void 0:A[t])||void 0===g?void 0:g.bg)||"transparent",C=(null===(h=null==A?void 0:A[t])||void 0===h?void 0:h.text)||"inherit";return s.jsxs("div",e.__assign({style:y.styles.mrReminderItem},{children:[s.jsx("div",e.__assign({style:y.styles.mrReminderLabelBox},{children:s.jsx("div",e.__assign({style:y.styles.mrReminderLabelInner},{children:s.jsx(r.Chip,{label:(null==I?void 0:I[t])||"Assignee ".concat(t+1),sx:{backgroundColor:f,minWidth:90,color:p,fontWeight:500}})}))})),s.jsxs("div",e.__assign({style:y.styles.mrReminderContent},{children:[s.jsx("div",{style:y.styles.mrDragHandle}),s.jsx(r.Box,e.__assign({display:"flex",alignItems:"center",gap:2,border:"1px solid #E5E7EB",sx:{background:"#fff"},style:y.styles.mrReminderBox},{children:s.jsxs("div",e.__assign({style:y.styles.mrReminderFields},{children:[s.jsxs("div",e.__assign({style:y.styles.mrReminderHeader},{children:[s.jsxs("div",e.__assign({style:y.styles.mrReminderAssignee},{children:[s.jsx("div",e.__assign({style:y.styles.mrReminderAvatar},{children:s.jsx("span",e.__assign({style:y.styles.mrReminderInitials},{children:Ze(null==x?void 0:x.name)}))})),s.jsx("span",e.__assign({style:y.styles.mrReminderName},{children:null==x?void 0:x.name}))]})),s.jsx("div",e.__assign({style:e.__assign(e.__assign({},y.styles.mrReminderStatement),{backgroundColor:j})},{children:s.jsx("span",e.__assign({style:e.__assign(e.__assign({},y.styles.mrReminderStatementText),{color:C})},{children:te(i)}))}))]})),s.jsxs("div",e.__assign({style:y.styles.mrReminderDateFields},{children:[s.jsxs("div",e.__assign({style:y.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:y.styles.mrReminderFieldLabel},{children:le})),s.jsxs("div",e.__assign({style:y.styles.mrReminderDatePicker},{children:[s.jsx(a.LocalizationProvider,e.__assign({dateAdapter:o.AdapterDayjs},{children:s.jsx(a.DatePicker,{value:i.reminder_start_date?v.default(i.reminder_start_date):null,disablePast:!0,format:"MM/DD/YYYY",onChange:function(e){if(e&&v.default(e).isValid()){if(v.default(e).isBefore(v.default(),"day"))return;We(t,v.default(e).toISOString())}else We(t,"")},slotProps:{actionBar:{actions:["clear"]},textField:{fullWidth:!0,size:"small",sx:b,placeholder:"MM/DD/YYYY"},openPickerButton:{id:"trial-start-date-picker-icon","data-testid":"trial-start-date-picker-icon",size:"small"},openPickerIcon:{sx:{fontSize:"14px"}}}})})),s.jsx(n.ArrowRight,{style:y.styles.mrIconArrow})]}))]})),s.jsxs("div",e.__assign({style:y.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:y.styles.mrReminderFieldLabel},{children:oe})),s.jsx("div",e.__assign({style:y.styles.mrReminderDueDate},{children:(null==u?void 0:u.due_at)?v.default(u.due_at).format("MM/DD/YYYY"):""}))]})),s.jsxs("div",e.__assign({style:y.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:y.styles.mrReminderFieldLabel},{children:ce})),s.jsxs("div",e.__assign({style:y.styles.mrReminderFrequency},{children:[s.jsx("span",e.__assign({style:y.styles.mrReminderFrequencyText},{children:"Every"})),s.jsx(d.default,{value:i.reminder_frequency,onChange:function(e){return function(e,s){ze(e,"reminder_frequency",s)}(t,e)},options:pe,suffix:"hours"})]}))]}))]})),s.jsxs("div",e.__assign({style:y.styles.mrEscalationCheckbox},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationCheckboxHeader},{children:[s.jsx(m.default,{size:"small",disableRipple:!0,checked:i.is_escalation_reminder,onChange:function(e){return function(e,s){ze(e,"is_escalation_reminder",s),s||(ze(e,"days",{type:"preset",value:""}),ze(e,"escalation_reminder_frequency",{type:"preset",value:""}),ze(e,"before_or_after",""))}(t,e.target.checked)},icon:s.jsx("div",{style:y.styles.mrCheckboxUnchecked}),checkedIcon:s.jsx("div",e.__assign({style:y.styles.mrCheckboxChecked},{children:s.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:y.styles.mrCheckboxIcon},{children:s.jsx("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),ye,s.jsx("div",e.__assign({style:y.styles.mrTooltipIcon},{children:s.jsx(n.InfoIcon,{stroke:"#64748B",style:y.styles.mrIconInfo})}))]})),s.jsx(l.AnimatePresence,{children:i.is_escalation_reminder&&s.jsxs(l.motion.div,e.__assign({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:y.styles.mrEscalationContent},{children:[s.jsx("div",e.__assign({style:y.styles.mrEscalationCondition},{children:me})),s.jsxs("div",e.__assign({style:y.styles.mrEscalationFields},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationFieldGroup},{children:[s.jsx(d.default,{value:i.days,onChange:function(e){return function(e,s){ze(e,"days",s)}(t,e)}}),s.jsx("div",e.__assign({style:y.styles.mrEscalationFieldText},{children:ge}))]})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},y.styles.mrEscalationFieldGroup),y.styles.mrEscalationFieldGroupLarge)},{children:[s.jsx(r.Autocomplete,{size:"small",options:ke,value:i.before_or_after,onChange:function(e,s){return function(e,s){ze(e,"before_or_after",s)}(t,s||"")},popupIcon:s.jsx(n.ChevronDown,{style:y.styles.mrIconDropdown}),slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"12px",minHeight:"32px"}}},clearIndicator:{sx:{"& svg":{fontSize:12}}}},renderInput:function(i){return s.jsx(r.TextField,e.__assign({},i,{placeholder:"Select value",sx:b}))},sx:{width:"100%"}}),s.jsx("div",e.__assign({style:y.styles.mrEscalationFieldText},{children:xe}))]})),s.jsx("div",e.__assign({style:y.styles.mrEscalationFieldGroupSmall},{children:s.jsx(d.default,{value:i.escalation_reminder_frequency,onChange:function(e){return function(e,s){ze(e,"escalation_reminder_frequency",s)}(t,e)},options:Ce,suffix:"hours"})}))]}))]}))})]}))]}))}))]}))]}))})}))}))}))]})),Ae&&s.jsxs(l.motion.div,e.__assign({initial:{width:Me?"345px":"43px"},animate:{width:Me?"345px":"43px"},transition:{duration:.3},style:y.styles.mrCalendarPanel},{children:[Me?s.jsx(c.default,{assignees:_}):s.jsx("div",e.__assign({style:y.styles.mrCalendarCollapsed},{children:s.jsx(n.CalendarIcon,{style:y.styles.mrIconCalendar})})),s.jsxs("button",e.__assign({onClick:function(){return Oe(function(e){return!e})},style:y.styles.mrCalendarToggle},{children:[s.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"19",height:"50",viewBox:"0 0 19 50",fill:"none"},{children:s.jsx("path",{d:"M3.94434 9.65137C1.79601 11.031 0.49707 13.4087 0.49707 15.9619V35.1436C0.49707 37.8496 1.95476 40.346 4.31152 41.6758L17.5469 49.1426V0.915039L3.94434 9.65137Z",fill:"white",stroke:"#E0E0E0"})})),Me?s.jsx(n.ChevronRight,{style:y.styles.mrIconChevronToggle}):s.jsx(n.ChevronLeft,{style:y.styles.mrIconChevronToggle})]}))]}))]}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),i=require("react"),n=require("lucide-react"),t=require("@mui/material/Checkbox"),r=require("@mui/material"),l=require("framer-motion"),a=require("@mui/x-date-pickers"),o=require("@mui/x-date-pickers/AdapterDayjs"),d=require("./components/ReminderFrequencyAutocomplete.js"),c=require("./components/AssigneeCalendarView.js"),u=require("dayjs"),y=require("./styles/ManageReminder.style.js");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=_(t),v=_(u),g=["Assignee 1","Assignee 2","Assignee 3"],h=[{bg:"#FDF2FA",text:"#C11574"},{bg:"#EEF4FF",text:"#3538CD"},{bg:"#F1F5F9",text:"#344054"}],x=[{bg:"#FDF2FA",text:"#C93185"},{bg:"#EEF2FF",text:"#6366F1"},{bg:"#FFF4E5",text:"#FF6058"}],p=[],f=[{bg:"#DBEAFE",text:"#1E40AF"},{bg:"#CCFBF1",text:"#0D9488"},{bg:"#DCFCE7",text:"#166534"}],j=[],C=function(e){var s,i,n,t,r,l,a,o;return(null==e?void 0:e.is_escalation_reminder)&&(null===(s=null==e?void 0:e.days)||void 0===s?void 0:s.value)&&"undefined"!==(null===(i=null==e?void 0:e.days)||void 0===i?void 0:i.value)&&(null===(n=null==e?void 0:e.escalation_reminder_frequency)||void 0===n?void 0:n.value)&&"undefined"!==(null===(t=null==e?void 0:e.escalation_reminder_frequency)||void 0===t?void 0:t.value)?"Start notifying ".concat((null===(r=null==e?void 0:e.days)||void 0===r?void 0:r.value.includes("day"))?null===(l=null==e?void 0:e.days)||void 0===l?void 0:l.value:"".concat(null===(a=null==e?void 0:e.days)||void 0===a?void 0:a.value," ").concat(1===Number(null===(o=null==e?void 0:e.days)||void 0===o?void 0:o.value)?"day":"days")," ").concat(null==e?void 0:e.before_or_after," the due date"):"Notify until successful document upload"},b={"& .MuiInputBase-root":{height:"28px",borderRadius:"4px",fontSize:"11px"}};exports.ManageReminders=function(t){var u=t.data,_=t.schedules,k=t.setSchedules,R=t.remainderOwners,F=t.setRemainderOwners,S=t.labels,E=void 0===S?g:S,I=t.colors,w=void 0===I?h:I,A=t.chipColor,D=void 0===A?x:A,T=t.assignees,B=void 0===T?p:T,q=t.fallbackRecipients,L=void 0===q?j:q,P=t.recipientsColor,M=void 0===P?f:P,O=t.manualReminderTitle,Y=void 0===O?"Send Manual Reminder Now":O,N=t.manualReminderDescription,z=void 0===N?"Immediately notify the assignees about this document.":N;t.lastReminderText;var H=t.selectRecipientsLabel,W=void 0===H?"Select recipients:":H,G=t.previewEmailButtonLabel,V=void 0===G?"Preview Email":G,U=t.sendNowButtonLabel,Z=void 0===U?"Send Now":U,J=t.reminderSuccessTitle,K=void 0===J?"Reminder sent successfully!":J,Q=t.reminderSuccessDescription,X=void 0===Q?"Email notification sent to assignees.":Q,$=t.escalationTitle,ee=void 0===$?"Escalation and Auto Reminder Setup":$;t.escalationTitleTooltip;var se=t.escalationDescription,ie=void 0===se?"Configure Auto reminder settings for all assignees.":se;t.configureAutoReminderText;var ne=t.getDynamicStatement,te=void 0===ne?C:ne,re=t.reminderStartDateLabel,le=void 0===re?"Reminder Start Date":re,ae=t.documentDueDateLabel,oe=void 0===ae?"Document Due Date":ae,de=t.reminderFrequencyLabel,ce=void 0===de?"Reminder Frequency":de,ue=t.escalationRemindersLabel,ye=void 0===ue?"Escalation Reminders":ue;t.escalationTooltip;var _e=t.escalationConditionText,me=void 0===_e?"If the document is still pending, start escalation reminders":_e,ve=t.daysText,ge=void 0===ve?"days":ve,he=t.dueDataAndRepeatText,xe=void 0===he?"due date and repeat every":he,pe=t.reminderFrequencyOptions,fe=void 0===pe?["12 hours","24 hours","48 hours","72 hours","Custom"]:pe,je=t.escalationFrequencyOptions,Ce=void 0===je?["1/2 hour","1 hour","4 hours","6 hours","12 hours","Custom"]:je,be=t.beforeAfterOptions,ke=void 0===be?["After","Before"]:be,Re=t.handelSendNow,Fe=t.showPreviewEmail,Se=void 0===Fe||Fe,Ee=i.useState(!1),Ie=Ee[0],we=Ee[1],Ae=i.useState(!1),De=Ae[0],Te=Ae[1],Be=i.useState(!1),qe=Be[0],Le=Be[1],Pe=i.useState(!0),Me=Pe[0],Oe=Pe[1],Ye=i.useState(L),Ne=Ye[0],ze=Ye[1];l.useDragControls();var He=function(s,i,n){F(function(t){return t.map(function(t,r){var l;return r===s?e.__assign(e.__assign({},t),((l={})[i]=n,l)):t})})},We=function(e,s){He(e,"reminder_start_date",s)},Ge=function(e){var s;if(!e)return null;if("custom"===e.type)return Number(e.value)<=0?null:60*Number(e.value)*60*1e3;return null!==(s={"1/2 hour":18e5,"1 hour":36e5,"4 hours":144e5,"6 hours":216e5,"12 hours":432e5,"24 hours":864e5,"48 hours":1728e5,"72 hours":2592e5,"96 hours":3456e5,"1/2 day":432e5,"1 day":864e5,"2 days":1728e5,"3 days":2592e5,"4 days":3456e5}[e.value])&&void 0!==s?s:null},Ve=function(e,s,i){if(!e||!i)return[];var n=Ge(i);if(!n||n<=0)return[];for(var t=[],r=v.default(e).valueOf(),l=s?v.default(s).valueOf():v.default(e).add(45,"day").valueOf(),a=0;r<=l&&a<150;)t.push(v.default(r).toISOString()),r+=n,a++;return t},Ue=function(e,s,i,n){if(!(e&&s&&n&&i))return[];var t=Ge(n);if(!t)return[];var r,l=v.default(e),a="custom"===s.type?Number(s.value):Number("1/2"===s.value.split(" ")[0]?.5:Number(s.value.split(" ")[0])),o=[];switch(i){case"Before":r=l.subtract(a,"day");break;case"After":r=l.add(a,"day");break;default:return[]}for(var d=r.valueOf(),c=0;c<150;c++)o.push(v.default(d).toISOString()),d+=t;return o},Ze=function(e){return e?e.split(" ").map(function(e){return e[0]}).join("").toUpperCase():""};i.useEffect(function(){var e=(null==u?void 0:u.due_at)||"",s=Object.values((null==u?void 0:u.assignee)||{}).filter(function(e){return null==e?void 0:e.name}),i=(s.length>0?(R||[]).slice(0,s.length):[]).map(function(i,n){var t,r=s[n]||B.find(function(e){return e.id===String(i.id)}),l=(null===(t=null==w?void 0:w[n%w.length])||void 0===t?void 0:t.text)||"#C11574";return{ownerId:i.id||n+1,ownerName:(null==r?void 0:r.name)||i.name,ownerColor:(null==r?void 0:r.color)||l,reminders:Ve(i.reminder_start_date,e,i.reminder_frequency),escalations:Ue(e,i.days,i.before_or_after,i.escalation_reminder_frequency)}});k(i)},[R,null==u?void 0:u.due_at,null==u?void 0:u.assignee]),i.useEffect(function(){(null==u?void 0:u.assignee)&&ze(function(e){var s=Object.values(u.assignee).filter(function(e){return e&&Object.keys(e).length>0}).map(function(s,i){var n,t,r=e.find(function(e){return e.name===s.name});return{id:null!==(n=s.id)&&void 0!==n?n:i+1,name:s.name,email:null!==(t=s.email)&&void 0!==t?t:"",checked:!!r&&r.checked,recipientsColor:(null==M?void 0:M[i])||f[i%f.length]}});return s})},[null==u?void 0:u.assignee,null==u?void 0:u.due_at]);var Je=Object.values((null==u?void 0:u.assignee)||{}).filter(function(e){return null==e?void 0:e.name}),Ke=Je.length>0?(R||[]).slice(0,Je.length):[],Qe=Ne.filter(function(e){return e.checked}),Xe=0===Qe.length;return s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},y.styles.mrContainer),{width:"100%",minWidth:"850px"})},{children:[0===Je.length&&s.jsx("div",e.__assign({style:{width:"100%",border:"1px solid #E5E7EB",borderRadius:"10px",backgroundColor:"#F8FAFC",padding:"24px",textAlign:"center",color:"#475569",fontSize:"14px",fontWeight:500}},{children:"Add users to manage their reminders."})),Je.length>0&&s.jsxs("div",e.__assign({style:y.styles.mrSectionBox},{children:[s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},y.styles.mrSectionHeader),{cursor:"pointer"}),onClick:function(){Ie||we(!0)}},{children:[s.jsxs("div",e.__assign({style:y.styles.mrSectionHeaderContent},{children:[s.jsxs("div",e.__assign({style:y.styles.mrSectionHeaderLeft},{children:[s.jsxs("div",e.__assign({style:y.styles.mrSectionTitleWrapper},{children:[s.jsx("div",e.__assign({style:y.styles.mrSectionTitleIcon},{children:s.jsx(n.Send,{style:y.styles.mrIconSmall})})),s.jsx("div",e.__assign({style:y.styles.mrSectionTitle},{children:Y}))]})),s.jsx("div",e.__assign({style:y.styles.mrSectionDescription},{children:z}))]})),s.jsx("div",e.__assign({style:y.styles.mrSectionHeaderRight},{children:s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),we(function(e){return!e})},style:y.styles.mrChevronButton},{children:s.jsx(n.ChevronDown,{style:e.__assign(e.__assign({},y.styles.mrChevronIcon),Ie?y.styles.mrChevronRotated:{})})}))}))]})),s.jsx(l.AnimatePresence,{children:qe&&s.jsxs(l.motion.div,e.__assign({initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},style:y.styles.mrSuccessMessage},{children:[s.jsx("div",e.__assign({style:y.styles.mrSuccessIcon},{children:s.jsx("div",e.__assign({style:y.styles.mrSuccessIconInner},{children:s.jsx(n.CircleCheckBigIcon,{style:y.styles.mrIconSuccess})}))})),s.jsxs("div",e.__assign({style:y.styles.mrSuccessText},{children:[s.jsx("div",e.__assign({style:y.styles.mrSuccessTitle},{children:K})),s.jsx("div",e.__assign({style:y.styles.mrSuccessDescription},{children:X}))]}))]}))})]})),s.jsx(l.AnimatePresence,{children:Ie&&s.jsxs(l.motion.div,e.__assign({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:e.__assign(e.__assign({},y.styles.mrHiddenSection),{pointerEvents:Ie?"auto":"none"})},{children:[s.jsxs("div",e.__assign({style:y.styles.mrRecipientsSection},{children:[s.jsx("div",e.__assign({style:y.styles.mrRecipientsLabel},{children:W})),s.jsx("div",e.__assign({style:y.styles.mrRecipientsGrid},{children:Ne.map(function(i,n){var t,r,l,a,o=(null===(t=null==i?void 0:i.recipientsColor)||void 0===t?void 0:t.bg)||(null==i?void 0:i.bg)||(null===(r=f[n%f.length])||void 0===r?void 0:r.bg)||"#DBEAFE",d=(null===(l=null==i?void 0:i.recipientsColor)||void 0===l?void 0:l.text)||(null==i?void 0:i.text)||(null===(a=f[n%f.length])||void 0===a?void 0:a.text)||"#1E40AF";return s.jsxs("div",e.__assign({style:y.styles.mrRecipientItem},{children:[s.jsx(m.default,{checked:i.checked,onChange:function(){return s=i.name,void ze(function(i){return i.map(function(i){return i.name===s?e.__assign(e.__assign({},i),{checked:!i.checked}):i})});var s},onClick:function(e){return e.stopPropagation()},size:"small",disableRipple:!0,icon:s.jsx("div",{style:y.styles.mrCheckboxUnchecked}),checkedIcon:s.jsx("div",e.__assign({style:y.styles.mrCheckboxChecked},{children:s.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:y.styles.mrCheckboxIcon},{children:s.jsx("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),s.jsxs("div",e.__assign({style:y.styles.mrRecipientInfo},{children:[s.jsx("div",e.__assign({style:e.__assign(e.__assign({},y.styles.mrRecipientAvatar),{backgroundColor:o,color:d})},{children:Ze(i.name)})),s.jsx("div",e.__assign({style:y.styles.mrRecipientName},{children:i.name}))]}))]}),i.name)})}))]})),s.jsxs("div",e.__assign({style:y.styles.mrActionsSection},{children:[Se&&s.jsxs("button",e.__assign({onClick:function(e){e.stopPropagation()},type:"button",style:e.__assign(e.__assign({},y.styles.mrActionButton),y.styles.mrActionButtonSecondary)},{children:[s.jsx(n.Mail,{style:y.styles.mrIconAction}),V]})),s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Xe||(Le(!0),setTimeout(function(){return Le(!1)},3e3),Re(_,Ke.filter(function(e){return Qe.some(function(s){return s.id===e.id||s.email===e.email||s.name===e.name})})))},disabled:Xe,style:e.__assign(e.__assign(e.__assign({},y.styles.mrActionButton),y.styles.mrActionButtonPrimary),Xe?{opacity:.55,cursor:"not-allowed"}:{})},{children:Z}))]}))]}))})]})),Je.length>0&&s.jsxs("div",e.__assign({style:y.styles.mrMainContent},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationContainer},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationHeaderWrapper,onClick:function(e){e.stopPropagation(),De||Te(!0)}},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationHeader},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationTitleWrapper},{children:[s.jsx("div",e.__assign({style:y.styles.mrEscalationTitleText},{children:ee})),s.jsx("div",e.__assign({style:y.styles.mrTooltipIcon},{children:s.jsx(n.InfoIcon,{stroke:"#64748B",style:y.styles.mrIconInfo})}))]})),s.jsxs("div",e.__assign({style:y.styles.mrEscalationActions},{children:[Se&&s.jsxs("button",e.__assign({style:y.styles.mrEscalationPreviewButton},{children:[s.jsx("div",e.__assign({style:y.styles.mrEscalationPreviewIcon},{children:s.jsx(n.Mail,{style:y.styles.mrIconPreview})})),s.jsx("span",e.__assign({style:y.styles.mrEscalationPreviewText},{children:V}))]})),s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Te(function(e){return!e})},style:y.styles.mrChevronButton},{children:s.jsx(n.ChevronDown,{style:e.__assign(e.__assign({},y.styles.mrChevronIcon),De?y.styles.mrChevronRotated:{})})}))]}))]})),s.jsx("div",e.__assign({style:y.styles.mrEscalationDescription},{children:ie}))]})),s.jsx(l.AnimatePresence,e.__assign({initial:!1},{children:De&&s.jsx(l.motion.div,e.__assign({layout:!0,initial:{opacity:0,scaleY:.96},animate:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.96},transition:{duration:.3,ease:"easeInOut"},style:{transformOrigin:"top",overflow:"hidden"}},{children:s.jsx(l.Reorder.Group,e.__assign({axis:"y",values:Ke,onReorder:function(e){F(e)},layoutScroll:!0,style:y.styles.mrReorderGroup},{children:Ke.map(function(i,t){var c,_,g,h,x=Je[t]||L[t],p=(null===(c=null==w?void 0:w[t])||void 0===c?void 0:c.bg)||"#FDF2FA",f=(null===(_=null==w?void 0:w[t])||void 0===_?void 0:_.text)||"#C11574",j=(null===(g=null==D?void 0:D[t])||void 0===g?void 0:g.bg)||"transparent",C=(null===(h=null==D?void 0:D[t])||void 0===h?void 0:h.text)||"inherit";return s.jsxs("div",e.__assign({style:y.styles.mrReminderItem},{children:[s.jsx("div",e.__assign({style:y.styles.mrReminderLabelBox},{children:s.jsx("div",e.__assign({style:y.styles.mrReminderLabelInner},{children:s.jsx(r.Chip,{label:(null==E?void 0:E[t])||"Assignee ".concat(t+1),sx:{backgroundColor:p,minWidth:90,color:f,fontWeight:500}})}))})),s.jsxs("div",e.__assign({style:y.styles.mrReminderContent},{children:[s.jsx("div",{style:y.styles.mrDragHandle}),s.jsx(r.Box,e.__assign({display:"flex",alignItems:"center",gap:2,border:"1px solid #E5E7EB",sx:{background:"#fff"},style:y.styles.mrReminderBox},{children:s.jsxs("div",e.__assign({style:y.styles.mrReminderFields},{children:[s.jsxs("div",e.__assign({style:y.styles.mrReminderHeader},{children:[s.jsxs("div",e.__assign({style:y.styles.mrReminderAssignee},{children:[s.jsx("div",e.__assign({style:y.styles.mrReminderAvatar},{children:s.jsx("span",e.__assign({style:y.styles.mrReminderInitials},{children:Ze(null==x?void 0:x.name)}))})),s.jsx("span",e.__assign({style:y.styles.mrReminderName},{children:null==x?void 0:x.name}))]})),s.jsx("div",e.__assign({style:e.__assign(e.__assign({},y.styles.mrReminderStatement),{backgroundColor:j})},{children:s.jsx("span",e.__assign({style:e.__assign(e.__assign({},y.styles.mrReminderStatementText),{color:C})},{children:te(i)}))}))]})),s.jsxs("div",e.__assign({style:y.styles.mrReminderDateFields},{children:[s.jsxs("div",e.__assign({style:y.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:y.styles.mrReminderFieldLabel},{children:le})),s.jsxs("div",e.__assign({style:y.styles.mrReminderDatePicker},{children:[s.jsx(a.LocalizationProvider,e.__assign({dateAdapter:o.AdapterDayjs},{children:s.jsx(a.DatePicker,{value:i.reminder_start_date?v.default(i.reminder_start_date):null,disablePast:!0,format:"MM/DD/YYYY",onChange:function(e){if(e&&v.default(e).isValid()){if(v.default(e).isBefore(v.default(),"day"))return;We(t,v.default(e).toISOString())}else We(t,"")},slotProps:{actionBar:{actions:["clear"]},textField:{fullWidth:!0,size:"small",sx:b,placeholder:"MM/DD/YYYY"},openPickerButton:{id:"trial-start-date-picker-icon","data-testid":"trial-start-date-picker-icon",size:"small"},openPickerIcon:{sx:{fontSize:"14px"}}}})})),s.jsx(n.ArrowRight,{style:y.styles.mrIconArrow})]}))]})),s.jsxs("div",e.__assign({style:y.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:y.styles.mrReminderFieldLabel},{children:oe})),s.jsx("div",e.__assign({style:y.styles.mrReminderDueDate},{children:(null==u?void 0:u.due_at)?v.default(u.due_at).format("MM/DD/YYYY"):""}))]})),s.jsxs("div",e.__assign({style:y.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:y.styles.mrReminderFieldLabel},{children:ce})),s.jsxs("div",e.__assign({style:y.styles.mrReminderFrequency},{children:[s.jsx("span",e.__assign({style:y.styles.mrReminderFrequencyText},{children:"Every"})),s.jsx(d.default,{value:i.reminder_frequency,onChange:function(e){return function(e,s){He(e,"reminder_frequency",s)}(t,e)},options:fe,suffix:"hours"})]}))]}))]})),s.jsxs("div",e.__assign({style:y.styles.mrEscalationCheckbox},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationCheckboxHeader},{children:[s.jsx(m.default,{size:"small",disableRipple:!0,checked:i.is_escalation_reminder,onChange:function(e){return function(e,s){He(e,"is_escalation_reminder",s),s||(He(e,"days",{type:"preset",value:""}),He(e,"escalation_reminder_frequency",{type:"preset",value:""}),He(e,"before_or_after",""))}(t,e.target.checked)},icon:s.jsx("div",{style:y.styles.mrCheckboxUnchecked}),checkedIcon:s.jsx("div",e.__assign({style:y.styles.mrCheckboxChecked},{children:s.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:y.styles.mrCheckboxIcon},{children:s.jsx("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),ye,s.jsx("div",e.__assign({style:y.styles.mrTooltipIcon},{children:s.jsx(n.InfoIcon,{stroke:"#64748B",style:y.styles.mrIconInfo})}))]})),s.jsx(l.AnimatePresence,{children:i.is_escalation_reminder&&s.jsxs(l.motion.div,e.__assign({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:y.styles.mrEscalationContent},{children:[s.jsx("div",e.__assign({style:y.styles.mrEscalationCondition},{children:me})),s.jsxs("div",e.__assign({style:y.styles.mrEscalationFields},{children:[s.jsxs("div",e.__assign({style:y.styles.mrEscalationFieldGroup},{children:[s.jsx(d.default,{value:i.days,onChange:function(e){return function(e,s){He(e,"days",s)}(t,e)}}),s.jsx("div",e.__assign({style:y.styles.mrEscalationFieldText},{children:ge}))]})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},y.styles.mrEscalationFieldGroup),y.styles.mrEscalationFieldGroupLarge)},{children:[s.jsx(r.Autocomplete,{size:"small",options:ke,value:i.before_or_after,onChange:function(e,s){return function(e,s){He(e,"before_or_after",s)}(t,s||"")},popupIcon:s.jsx(n.ChevronDown,{style:y.styles.mrIconDropdown}),slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"12px",minHeight:"32px"}}},clearIndicator:{sx:{"& svg":{fontSize:12}}}},renderInput:function(i){return s.jsx(r.TextField,e.__assign({},i,{placeholder:"Select value",sx:b}))},sx:{width:"100%"}}),s.jsx("div",e.__assign({style:y.styles.mrEscalationFieldText},{children:xe}))]})),s.jsx("div",e.__assign({style:y.styles.mrEscalationFieldGroupSmall},{children:s.jsx(d.default,{value:i.escalation_reminder_frequency,onChange:function(e){return function(e,s){He(e,"escalation_reminder_frequency",s)}(t,e)},options:Ce,suffix:"hours"})}))]}))]}))})]}))]}))}))]}))]}))})}))}))}))]})),De&&s.jsxs(l.motion.div,e.__assign({initial:{width:Me?"345px":"43px"},animate:{width:Me?"345px":"43px"},transition:{duration:.3},style:y.styles.mrCalendarPanel},{children:[Me?s.jsx(c.default,{assignees:_}):s.jsx("div",e.__assign({style:y.styles.mrCalendarCollapsed},{children:s.jsx(n.CalendarIcon,{style:y.styles.mrIconCalendar})})),s.jsxs("button",e.__assign({onClick:function(){return Oe(function(e){return!e})},style:y.styles.mrCalendarToggle},{children:[s.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"19",height:"50",viewBox:"0 0 19 50",fill:"none"},{children:s.jsx("path",{d:"M3.94434 9.65137C1.79601 11.031 0.49707 13.4087 0.49707 15.9619V35.1436C0.49707 37.8496 1.95476 40.346 4.31152 41.6758L17.5469 49.1426V0.915039L3.94434 9.65137Z",fill:"white",stroke:"#E0E0E0"})})),Me?s.jsx(n.ChevronRight,{style:y.styles.mrIconChevronToggle}):s.jsx(n.ChevronLeft,{style:y.styles.mrIconChevronToggle})]}))]}))]}))]}))};
2
2
  //# sourceMappingURL=ManageReminders.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../_virtual/_tslib.js";import{jsxs as i,jsx as n}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{Send as o,ChevronDown as l,CircleCheckBigIcon as d,Mail as a,InfoIcon as s,ArrowRight as c,CalendarIcon as u,ChevronRight as m,ChevronLeft as v}from"lucide-react";import h from"@mui/material/Checkbox";import{Chip as y,Box as p,Autocomplete as f,TextField as g}from"@mui/material";import{useDragControls as b,AnimatePresence as x,motion as C,Reorder as k}from"framer-motion";import{LocalizationProvider as R,DatePicker as F}from"@mui/x-date-pickers";import{AdapterDayjs as S}from"@mui/x-date-pickers/AdapterDayjs";import _ from"./components/ReminderFrequencyAutocomplete.js";import E from"./components/AssigneeCalendarView.js";import w from"dayjs";import{styles as I}from"./styles/ManageReminder.style.js";var D=["Assignee 1","Assignee 2","Assignee 3"],A=[{bg:"#FDF2FA",text:"#C11574"},{bg:"#EEF4FF",text:"#3538CD"},{bg:"#F1F5F9",text:"#344054"}],T=[{bg:"#FDF2FA",text:"#C93185"},{bg:"#EEF2FF",text:"#6366F1"},{bg:"#FFF4E5",text:"#FF6058"}],B=[],L=[{bg:"#DBEAFE",text:"#1E40AF"},{bg:"#CCFBF1",text:"#0D9488"},{bg:"#DCFCE7",text:"#166534"}],P=[],O=function(e){var i,n,t,r,o,l,d,a;return(null==e?void 0:e.is_escalation_reminder)&&(null===(i=null==e?void 0:e.days)||void 0===i?void 0:i.value)&&"undefined"!==(null===(n=null==e?void 0:e.days)||void 0===n?void 0:n.value)&&(null===(t=null==e?void 0:e.escalation_reminder_frequency)||void 0===t?void 0:t.value)&&"undefined"!==(null===(r=null==e?void 0:e.escalation_reminder_frequency)||void 0===r?void 0:r.value)?"Start notifying ".concat((null===(o=null==e?void 0:e.days)||void 0===o?void 0:o.value.includes("day"))?null===(l=null==e?void 0:e.days)||void 0===l?void 0:l.value:"".concat(null===(d=null==e?void 0:e.days)||void 0===d?void 0:d.value," ").concat(1===Number(null===(a=null==e?void 0:e.days)||void 0===a?void 0:a.value)?"day":"days")," ").concat(null==e?void 0:e.before_or_after," the due date"):"Notify until successful document upload"},q={"& .MuiInputBase-root":{height:"28px",borderRadius:"4px",fontSize:"11px"}},M=function(M){var Y=M.data,j=M.schedules,N=M.setSchedules,H=M.remainderOwners,z=M.setRemainderOwners,W=M.labels,G=void 0===W?D:W,V=M.colors,U=void 0===V?A:V,Z=M.chipColor,J=void 0===Z?T:Z,K=M.assignees,Q=void 0===K?B:K,X=M.fallbackRecipients,$=void 0===X?P:X,ee=M.recipientsColor,ie=void 0===ee?L:ee,ne=M.manualReminderTitle,te=void 0===ne?"Send Manual Reminder Now":ne,re=M.manualReminderDescription,oe=void 0===re?"Immediately notify the assignees about this document.":re;M.lastReminderText;var le=M.selectRecipientsLabel,de=void 0===le?"Select recipients:":le,ae=M.previewEmailButtonLabel,se=void 0===ae?"Preview Email":ae,ce=M.sendNowButtonLabel,ue=void 0===ce?"Send Now":ce,me=M.reminderSuccessTitle,ve=void 0===me?"Reminder sent successfully!":me,he=M.reminderSuccessDescription,ye=void 0===he?"Email notification sent to assignees.":he,pe=M.escalationTitle,fe=void 0===pe?"Escalation and Auto Reminder Setup":pe;M.escalationTitleTooltip;var ge=M.escalationDescription,be=void 0===ge?"Configure Auto reminder settings for all assignees.":ge;M.configureAutoReminderText;var xe=M.getDynamicStatement,Ce=void 0===xe?O:xe,ke=M.reminderStartDateLabel,Re=void 0===ke?"Reminder Start Date":ke,Fe=M.documentDueDateLabel,Se=void 0===Fe?"Document Due Date":Fe,_e=M.reminderFrequencyLabel,Ee=void 0===_e?"Reminder Frequency":_e,we=M.escalationRemindersLabel,Ie=void 0===we?"Escalation Reminders":we;M.escalationTooltip;var De=M.escalationConditionText,Ae=void 0===De?"If the document is still pending, start escalation reminders":De,Te=M.daysText,Be=void 0===Te?"days":Te,Le=M.dueDataAndRepeatText,Pe=void 0===Le?"due date and repeat every":Le,Oe=M.reminderFrequencyOptions,qe=void 0===Oe?["12 hours","24 hours","48 hours","72 hours","Custom"]:Oe,Me=M.escalationFrequencyOptions,Ye=void 0===Me?["1/2 hour","1 hour","4 hours","6 hours","12 hours","Custom"]:Me,je=M.beforeAfterOptions,Ne=void 0===je?["After","Before"]:je,He=M.handelSendNow,ze=M.showPreviewEmail,We=void 0===ze||ze,Ge=t(!1),Ve=Ge[0],Ue=Ge[1],Ze=t(!1),Je=Ze[0],Ke=Ze[1],Qe=t(!1),Xe=Qe[0],$e=Qe[1],ei=t(!0),ii=ei[0],ni=ei[1],ti=t($),ri=ti[0],oi=ti[1];b();var li=function(i,n,t){z(function(r){return r.map(function(r,o){var l;return o===i?e(e({},r),((l={})[n]=t,l)):r})})},di=function(e,i){li(e,"reminder_start_date",i)},ai=function(e){var i;if(!e)return null;if("custom"===e.type)return Number(e.value)<=0?null:60*Number(e.value)*60*1e3;return null!==(i={"1/2 hour":18e5,"1 hour":36e5,"4 hours":144e5,"6 hours":216e5,"12 hours":432e5,"24 hours":864e5,"48 hours":1728e5,"72 hours":2592e5,"96 hours":3456e5,"1/2 day":432e5,"1 day":864e5,"2 days":1728e5,"3 days":2592e5,"4 days":3456e5}[e.value])&&void 0!==i?i:null},si=function(e,i,n){if(!e||!n)return[];var t=ai(n);if(!t||t<=0)return[];for(var r=[],o=w(e).valueOf(),l=i?w(i).valueOf():w(e).add(45,"day").valueOf(),d=0;o<=l&&d<150;)r.push(w(o).toISOString()),o+=t,d++;return r},ci=function(e,i,n,t){if(!(e&&i&&t&&n))return[];var r=ai(t);if(!r)return[];var o,l=w(e),d="custom"===i.type?Number(i.value):Number("1/2"===i.value.split(" ")[0]?.5:Number(i.value.split(" ")[0])),a=[];switch(n){case"Before":o=l.subtract(d,"day");break;case"After":o=l.add(d,"day");break;default:return[]}for(var s=o.valueOf(),c=0;c<150;c++)a.push(w(s).toISOString()),s+=r;return a},ui=function(e){return e?e.split(" ").map(function(e){return e[0]}).join("").toUpperCase():""};r(function(){var e=(null==Y?void 0:Y.due_at)||"",i=Object.values((null==Y?void 0:Y.assignee)||{}).filter(function(e){return null==e?void 0:e.name}),n=(i.length>0?(H||[]).slice(0,i.length):[]).map(function(n,t){var r,o=i[t]||Q.find(function(e){return e.id===String(n.id)}),l=(null===(r=null==U?void 0:U[t%U.length])||void 0===r?void 0:r.text)||"#C11574";return{ownerId:n.id||t+1,ownerName:(null==o?void 0:o.name)||n.name,ownerColor:(null==o?void 0:o.color)||l,reminders:si(n.reminder_start_date,e,n.reminder_frequency),escalations:ci(e,n.days,n.before_or_after,n.escalation_reminder_frequency)}});N(n)},[H,null==Y?void 0:Y.due_at,null==Y?void 0:Y.assignee]),r(function(){(null==Y?void 0:Y.assignee)&&oi(function(e){var i=Object.values(Y.assignee).filter(function(e){return e&&Object.keys(e).length>0}).map(function(i,n){var t,r,o=e.find(function(e){return e.name===i.name});return{id:null!==(t=i.id)&&void 0!==t?t:n+1,name:i.name,email:null!==(r=i.email)&&void 0!==r?r:"",checked:!!o&&o.checked,recipientsColor:(null==ie?void 0:ie[n])||L[n%L.length]}});return i})},[null==Y?void 0:Y.assignee,null==Y?void 0:Y.due_at]);var mi=Object.values((null==Y?void 0:Y.assignee)||{}).filter(function(e){return null==e?void 0:e.name}),vi=mi.length>0?(H||[]).slice(0,mi.length):[],hi=ri.filter(function(e){return e.checked}),yi=0===hi.length;return i("div",e({style:e(e({},I.mrContainer),{width:"100%",minWidth:"850px"})},{children:[mi.length>0&&i("div",e({style:I.mrSectionBox},{children:[i("div",e({style:e(e({},I.mrSectionHeader),{cursor:"pointer"}),onClick:function(){Ve||Ue(!0)}},{children:[i("div",e({style:I.mrSectionHeaderContent},{children:[i("div",e({style:I.mrSectionHeaderLeft},{children:[i("div",e({style:I.mrSectionTitleWrapper},{children:[n("div",e({style:I.mrSectionTitleIcon},{children:n(o,{style:I.mrIconSmall})})),n("div",e({style:I.mrSectionTitle},{children:te}))]})),n("div",e({style:I.mrSectionDescription},{children:oe}))]})),n("div",e({style:I.mrSectionHeaderRight},{children:n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Ue(function(e){return!e})},style:I.mrChevronButton},{children:n(l,{style:e(e({},I.mrChevronIcon),Ve?I.mrChevronRotated:{})})}))}))]})),n(x,{children:Xe&&i(C.div,e({initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},style:I.mrSuccessMessage},{children:[n("div",e({style:I.mrSuccessIcon},{children:n("div",e({style:I.mrSuccessIconInner},{children:n(d,{style:I.mrIconSuccess})}))})),i("div",e({style:I.mrSuccessText},{children:[n("div",e({style:I.mrSuccessTitle},{children:ve})),n("div",e({style:I.mrSuccessDescription},{children:ye}))]}))]}))})]})),n(x,{children:Ve&&i(C.div,e({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:e(e({},I.mrHiddenSection),{pointerEvents:Ve?"auto":"none"})},{children:[i("div",e({style:I.mrRecipientsSection},{children:[n("div",e({style:I.mrRecipientsLabel},{children:de})),n("div",e({style:I.mrRecipientsGrid},{children:ri.map(function(t,r){var o,l,d,a,s=(null===(o=null==t?void 0:t.recipientsColor)||void 0===o?void 0:o.bg)||(null==t?void 0:t.bg)||(null===(l=L[r%L.length])||void 0===l?void 0:l.bg)||"#DBEAFE",c=(null===(d=null==t?void 0:t.recipientsColor)||void 0===d?void 0:d.text)||(null==t?void 0:t.text)||(null===(a=L[r%L.length])||void 0===a?void 0:a.text)||"#1E40AF";return i("div",e({style:I.mrRecipientItem},{children:[n(h,{checked:t.checked,onChange:function(){return i=t.name,void oi(function(n){return n.map(function(n){return n.name===i?e(e({},n),{checked:!n.checked}):n})});var i},onClick:function(e){return e.stopPropagation()},size:"small",disableRipple:!0,icon:n("div",{style:I.mrCheckboxUnchecked}),checkedIcon:n("div",e({style:I.mrCheckboxChecked},{children:n("svg",e({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:I.mrCheckboxIcon},{children:n("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),i("div",e({style:I.mrRecipientInfo},{children:[n("div",e({style:e(e({},I.mrRecipientAvatar),{backgroundColor:s,color:c})},{children:ui(t.name)})),n("div",e({style:I.mrRecipientName},{children:t.name}))]}))]}),t.name)})}))]})),i("div",e({style:I.mrActionsSection},{children:[We&&i("button",e({onClick:function(e){e.stopPropagation()},type:"button",style:e(e({},I.mrActionButton),I.mrActionButtonSecondary)},{children:[n(a,{style:I.mrIconAction}),se]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),yi||($e(!0),setTimeout(function(){return $e(!1)},3e3),He(j,vi.filter(function(e){return hi.some(function(i){return i.id===e.id||i.email===e.email||i.name===e.name})})))},disabled:yi,style:e(e(e({},I.mrActionButton),I.mrActionButtonPrimary),yi?{opacity:.55,cursor:"not-allowed"}:{})},{children:ue}))]}))]}))})]})),mi.length>0&&i("div",e({style:I.mrMainContent},{children:[i("div",e({style:I.mrEscalationContainer},{children:[i("div",e({style:I.mrEscalationHeaderWrapper,onClick:function(e){e.stopPropagation(),Je||Ke(!0)}},{children:[i("div",e({style:I.mrEscalationHeader},{children:[i("div",e({style:I.mrEscalationTitleWrapper},{children:[n("div",e({style:I.mrEscalationTitleText},{children:fe})),n("div",e({style:I.mrTooltipIcon},{children:n(s,{stroke:"#64748B",style:I.mrIconInfo})}))]})),i("div",e({style:I.mrEscalationActions},{children:[We&&i("button",e({style:I.mrEscalationPreviewButton},{children:[n("div",e({style:I.mrEscalationPreviewIcon},{children:n(a,{style:I.mrIconPreview})})),n("span",e({style:I.mrEscalationPreviewText},{children:se}))]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Ke(function(e){return!e})},style:I.mrChevronButton},{children:n(l,{style:e(e({},I.mrChevronIcon),Je?I.mrChevronRotated:{})})}))]}))]})),n("div",e({style:I.mrEscalationDescription},{children:be}))]})),n(x,e({initial:!1},{children:Je&&n(C.div,e({layout:!0,initial:{opacity:0,scaleY:.96},animate:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.96},transition:{duration:.3,ease:"easeInOut"},style:{transformOrigin:"top",overflow:"hidden"}},{children:n(k.Group,e({axis:"y",values:vi,onReorder:function(e){z(e)},layoutScroll:!0,style:I.mrReorderGroup},{children:vi.map(function(t,r){var o,d,a,u,m=mi[r]||$[r],v=(null===(o=null==U?void 0:U[r])||void 0===o?void 0:o.bg)||"#FDF2FA",b=(null===(d=null==U?void 0:U[r])||void 0===d?void 0:d.text)||"#C11574",k=(null===(a=null==J?void 0:J[r])||void 0===a?void 0:a.bg)||"transparent",E=(null===(u=null==J?void 0:J[r])||void 0===u?void 0:u.text)||"inherit";return i("div",e({style:I.mrReminderItem},{children:[n("div",e({style:I.mrReminderLabelBox},{children:n("div",e({style:I.mrReminderLabelInner},{children:n(y,{label:(null==G?void 0:G[r])||"Assignee ".concat(r+1),sx:{backgroundColor:v,minWidth:90,color:b,fontWeight:500}})}))})),i("div",e({style:I.mrReminderContent},{children:[n("div",{style:I.mrDragHandle}),n(p,e({display:"flex",alignItems:"center",gap:2,border:"1px solid #E5E7EB",sx:{background:"#fff"},style:I.mrReminderBox},{children:i("div",e({style:I.mrReminderFields},{children:[i("div",e({style:I.mrReminderHeader},{children:[i("div",e({style:I.mrReminderAssignee},{children:[n("div",e({style:I.mrReminderAvatar},{children:n("span",e({style:I.mrReminderInitials},{children:ui(null==m?void 0:m.name)}))})),n("span",e({style:I.mrReminderName},{children:null==m?void 0:m.name}))]})),n("div",e({style:e(e({},I.mrReminderStatement),{backgroundColor:k})},{children:n("span",e({style:e(e({},I.mrReminderStatementText),{color:E})},{children:Ce(t)}))}))]})),i("div",e({style:I.mrReminderDateFields},{children:[i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:Re})),i("div",e({style:I.mrReminderDatePicker},{children:[n(R,e({dateAdapter:S},{children:n(F,{value:t.reminder_start_date?w(t.reminder_start_date):null,disablePast:!0,format:"MM/DD/YYYY",onChange:function(e){if(e&&w(e).isValid()){if(w(e).isBefore(w(),"day"))return;di(r,w(e).toISOString())}else di(r,"")},slotProps:{actionBar:{actions:["clear"]},textField:{fullWidth:!0,size:"small",sx:q,placeholder:"MM/DD/YYYY"},openPickerButton:{id:"trial-start-date-picker-icon","data-testid":"trial-start-date-picker-icon",size:"small"},openPickerIcon:{sx:{fontSize:"14px"}}}})})),n(c,{style:I.mrIconArrow})]}))]})),i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:Se})),n("div",e({style:I.mrReminderDueDate},{children:(null==Y?void 0:Y.due_at)?w(Y.due_at).format("MM/DD/YYYY"):""}))]})),i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:Ee})),i("div",e({style:I.mrReminderFrequency},{children:[n("span",e({style:I.mrReminderFrequencyText},{children:"Every"})),n(_,{value:t.reminder_frequency,onChange:function(e){return function(e,i){li(e,"reminder_frequency",i)}(r,e)},options:qe,suffix:"hours"})]}))]}))]})),i("div",e({style:I.mrEscalationCheckbox},{children:[i("div",e({style:I.mrEscalationCheckboxHeader},{children:[n(h,{size:"small",disableRipple:!0,checked:t.is_escalation_reminder,onChange:function(e){return function(e,i){li(e,"is_escalation_reminder",i),i||(li(e,"days",{type:"preset",value:""}),li(e,"escalation_reminder_frequency",{type:"preset",value:""}),li(e,"before_or_after",""))}(r,e.target.checked)},icon:n("div",{style:I.mrCheckboxUnchecked}),checkedIcon:n("div",e({style:I.mrCheckboxChecked},{children:n("svg",e({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:I.mrCheckboxIcon},{children:n("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),Ie,n("div",e({style:I.mrTooltipIcon},{children:n(s,{stroke:"#64748B",style:I.mrIconInfo})}))]})),n(x,{children:t.is_escalation_reminder&&i(C.div,e({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:I.mrEscalationContent},{children:[n("div",e({style:I.mrEscalationCondition},{children:Ae})),i("div",e({style:I.mrEscalationFields},{children:[i("div",e({style:I.mrEscalationFieldGroup},{children:[n(_,{value:t.days,onChange:function(e){return function(e,i){li(e,"days",i)}(r,e)}}),n("div",e({style:I.mrEscalationFieldText},{children:Be}))]})),i("div",e({style:e(e({},I.mrEscalationFieldGroup),I.mrEscalationFieldGroupLarge)},{children:[n(f,{size:"small",options:Ne,value:t.before_or_after,onChange:function(e,i){return function(e,i){li(e,"before_or_after",i)}(r,i||"")},popupIcon:n(l,{style:I.mrIconDropdown}),slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"12px",minHeight:"32px"}}},clearIndicator:{sx:{"& svg":{fontSize:12}}}},renderInput:function(i){return n(g,e({},i,{placeholder:"Select value",sx:q}))},sx:{width:"100%"}}),n("div",e({style:I.mrEscalationFieldText},{children:Pe}))]})),n("div",e({style:I.mrEscalationFieldGroupSmall},{children:n(_,{value:t.escalation_reminder_frequency,onChange:function(e){return function(e,i){li(e,"escalation_reminder_frequency",i)}(r,e)},options:Ye,suffix:"hours"})}))]}))]}))})]}))]}))}))]}))]}))})}))}))}))]})),Je&&i(C.div,e({initial:{width:ii?"345px":"43px"},animate:{width:ii?"345px":"43px"},transition:{duration:.3},style:I.mrCalendarPanel},{children:[ii?n(E,{assignees:j}):n("div",e({style:I.mrCalendarCollapsed},{children:n(u,{style:I.mrIconCalendar})})),i("button",e({onClick:function(){return ni(function(e){return!e})},style:I.mrCalendarToggle},{children:[n("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"19",height:"50",viewBox:"0 0 19 50",fill:"none"},{children:n("path",{d:"M3.94434 9.65137C1.79601 11.031 0.49707 13.4087 0.49707 15.9619V35.1436C0.49707 37.8496 1.95476 40.346 4.31152 41.6758L17.5469 49.1426V0.915039L3.94434 9.65137Z",fill:"white",stroke:"#E0E0E0"})})),n(ii?m:v,{style:I.mrIconChevronToggle})]}))]}))]}))]}))};export{M as ManageReminders};
1
+ import{__assign as e}from"../../_virtual/_tslib.js";import{jsxs as i,jsx as n}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{Send as o,ChevronDown as l,CircleCheckBigIcon as d,Mail as a,InfoIcon as s,ArrowRight as c,CalendarIcon as u,ChevronRight as m,ChevronLeft as v}from"lucide-react";import h from"@mui/material/Checkbox";import{Chip as y,Box as p,Autocomplete as f,TextField as g}from"@mui/material";import{useDragControls as x,AnimatePresence as b,motion as C,Reorder as k}from"framer-motion";import{LocalizationProvider as F,DatePicker as R}from"@mui/x-date-pickers";import{AdapterDayjs as E}from"@mui/x-date-pickers/AdapterDayjs";import S from"./components/ReminderFrequencyAutocomplete.js";import _ from"./components/AssigneeCalendarView.js";import w from"dayjs";import{styles as I}from"./styles/ManageReminder.style.js";var D=["Assignee 1","Assignee 2","Assignee 3"],A=[{bg:"#FDF2FA",text:"#C11574"},{bg:"#EEF4FF",text:"#3538CD"},{bg:"#F1F5F9",text:"#344054"}],T=[{bg:"#FDF2FA",text:"#C93185"},{bg:"#EEF2FF",text:"#6366F1"},{bg:"#FFF4E5",text:"#FF6058"}],B=[],L=[{bg:"#DBEAFE",text:"#1E40AF"},{bg:"#CCFBF1",text:"#0D9488"},{bg:"#DCFCE7",text:"#166534"}],P=[],O=function(e){var i,n,t,r,o,l,d,a;return(null==e?void 0:e.is_escalation_reminder)&&(null===(i=null==e?void 0:e.days)||void 0===i?void 0:i.value)&&"undefined"!==(null===(n=null==e?void 0:e.days)||void 0===n?void 0:n.value)&&(null===(t=null==e?void 0:e.escalation_reminder_frequency)||void 0===t?void 0:t.value)&&"undefined"!==(null===(r=null==e?void 0:e.escalation_reminder_frequency)||void 0===r?void 0:r.value)?"Start notifying ".concat((null===(o=null==e?void 0:e.days)||void 0===o?void 0:o.value.includes("day"))?null===(l=null==e?void 0:e.days)||void 0===l?void 0:l.value:"".concat(null===(d=null==e?void 0:e.days)||void 0===d?void 0:d.value," ").concat(1===Number(null===(a=null==e?void 0:e.days)||void 0===a?void 0:a.value)?"day":"days")," ").concat(null==e?void 0:e.before_or_after," the due date"):"Notify until successful document upload"},q={"& .MuiInputBase-root":{height:"28px",borderRadius:"4px",fontSize:"11px"}},M=function(M){var Y=M.data,j=M.schedules,N=M.setSchedules,H=M.remainderOwners,z=M.setRemainderOwners,W=M.labels,G=void 0===W?D:W,V=M.colors,U=void 0===V?A:V,Z=M.chipColor,J=void 0===Z?T:Z,K=M.assignees,Q=void 0===K?B:K,X=M.fallbackRecipients,$=void 0===X?P:X,ee=M.recipientsColor,ie=void 0===ee?L:ee,ne=M.manualReminderTitle,te=void 0===ne?"Send Manual Reminder Now":ne,re=M.manualReminderDescription,oe=void 0===re?"Immediately notify the assignees about this document.":re;M.lastReminderText;var le=M.selectRecipientsLabel,de=void 0===le?"Select recipients:":le,ae=M.previewEmailButtonLabel,se=void 0===ae?"Preview Email":ae,ce=M.sendNowButtonLabel,ue=void 0===ce?"Send Now":ce,me=M.reminderSuccessTitle,ve=void 0===me?"Reminder sent successfully!":me,he=M.reminderSuccessDescription,ye=void 0===he?"Email notification sent to assignees.":he,pe=M.escalationTitle,fe=void 0===pe?"Escalation and Auto Reminder Setup":pe;M.escalationTitleTooltip;var ge=M.escalationDescription,xe=void 0===ge?"Configure Auto reminder settings for all assignees.":ge;M.configureAutoReminderText;var be=M.getDynamicStatement,Ce=void 0===be?O:be,ke=M.reminderStartDateLabel,Fe=void 0===ke?"Reminder Start Date":ke,Re=M.documentDueDateLabel,Ee=void 0===Re?"Document Due Date":Re,Se=M.reminderFrequencyLabel,_e=void 0===Se?"Reminder Frequency":Se,we=M.escalationRemindersLabel,Ie=void 0===we?"Escalation Reminders":we;M.escalationTooltip;var De=M.escalationConditionText,Ae=void 0===De?"If the document is still pending, start escalation reminders":De,Te=M.daysText,Be=void 0===Te?"days":Te,Le=M.dueDataAndRepeatText,Pe=void 0===Le?"due date and repeat every":Le,Oe=M.reminderFrequencyOptions,qe=void 0===Oe?["12 hours","24 hours","48 hours","72 hours","Custom"]:Oe,Me=M.escalationFrequencyOptions,Ye=void 0===Me?["1/2 hour","1 hour","4 hours","6 hours","12 hours","Custom"]:Me,je=M.beforeAfterOptions,Ne=void 0===je?["After","Before"]:je,He=M.handelSendNow,ze=M.showPreviewEmail,We=void 0===ze||ze,Ge=t(!1),Ve=Ge[0],Ue=Ge[1],Ze=t(!1),Je=Ze[0],Ke=Ze[1],Qe=t(!1),Xe=Qe[0],$e=Qe[1],ei=t(!0),ii=ei[0],ni=ei[1],ti=t($),ri=ti[0],oi=ti[1];x();var li=function(i,n,t){z(function(r){return r.map(function(r,o){var l;return o===i?e(e({},r),((l={})[n]=t,l)):r})})},di=function(e,i){li(e,"reminder_start_date",i)},ai=function(e){var i;if(!e)return null;if("custom"===e.type)return Number(e.value)<=0?null:60*Number(e.value)*60*1e3;return null!==(i={"1/2 hour":18e5,"1 hour":36e5,"4 hours":144e5,"6 hours":216e5,"12 hours":432e5,"24 hours":864e5,"48 hours":1728e5,"72 hours":2592e5,"96 hours":3456e5,"1/2 day":432e5,"1 day":864e5,"2 days":1728e5,"3 days":2592e5,"4 days":3456e5}[e.value])&&void 0!==i?i:null},si=function(e,i,n){if(!e||!n)return[];var t=ai(n);if(!t||t<=0)return[];for(var r=[],o=w(e).valueOf(),l=i?w(i).valueOf():w(e).add(45,"day").valueOf(),d=0;o<=l&&d<150;)r.push(w(o).toISOString()),o+=t,d++;return r},ci=function(e,i,n,t){if(!(e&&i&&t&&n))return[];var r=ai(t);if(!r)return[];var o,l=w(e),d="custom"===i.type?Number(i.value):Number("1/2"===i.value.split(" ")[0]?.5:Number(i.value.split(" ")[0])),a=[];switch(n){case"Before":o=l.subtract(d,"day");break;case"After":o=l.add(d,"day");break;default:return[]}for(var s=o.valueOf(),c=0;c<150;c++)a.push(w(s).toISOString()),s+=r;return a},ui=function(e){return e?e.split(" ").map(function(e){return e[0]}).join("").toUpperCase():""};r(function(){var e=(null==Y?void 0:Y.due_at)||"",i=Object.values((null==Y?void 0:Y.assignee)||{}).filter(function(e){return null==e?void 0:e.name}),n=(i.length>0?(H||[]).slice(0,i.length):[]).map(function(n,t){var r,o=i[t]||Q.find(function(e){return e.id===String(n.id)}),l=(null===(r=null==U?void 0:U[t%U.length])||void 0===r?void 0:r.text)||"#C11574";return{ownerId:n.id||t+1,ownerName:(null==o?void 0:o.name)||n.name,ownerColor:(null==o?void 0:o.color)||l,reminders:si(n.reminder_start_date,e,n.reminder_frequency),escalations:ci(e,n.days,n.before_or_after,n.escalation_reminder_frequency)}});N(n)},[H,null==Y?void 0:Y.due_at,null==Y?void 0:Y.assignee]),r(function(){(null==Y?void 0:Y.assignee)&&oi(function(e){var i=Object.values(Y.assignee).filter(function(e){return e&&Object.keys(e).length>0}).map(function(i,n){var t,r,o=e.find(function(e){return e.name===i.name});return{id:null!==(t=i.id)&&void 0!==t?t:n+1,name:i.name,email:null!==(r=i.email)&&void 0!==r?r:"",checked:!!o&&o.checked,recipientsColor:(null==ie?void 0:ie[n])||L[n%L.length]}});return i})},[null==Y?void 0:Y.assignee,null==Y?void 0:Y.due_at]);var mi=Object.values((null==Y?void 0:Y.assignee)||{}).filter(function(e){return null==e?void 0:e.name}),vi=mi.length>0?(H||[]).slice(0,mi.length):[],hi=ri.filter(function(e){return e.checked}),yi=0===hi.length;return i("div",e({style:e(e({},I.mrContainer),{width:"100%",minWidth:"850px"})},{children:[0===mi.length&&n("div",e({style:{width:"100%",border:"1px solid #E5E7EB",borderRadius:"10px",backgroundColor:"#F8FAFC",padding:"24px",textAlign:"center",color:"#475569",fontSize:"14px",fontWeight:500}},{children:"Add users to manage their reminders."})),mi.length>0&&i("div",e({style:I.mrSectionBox},{children:[i("div",e({style:e(e({},I.mrSectionHeader),{cursor:"pointer"}),onClick:function(){Ve||Ue(!0)}},{children:[i("div",e({style:I.mrSectionHeaderContent},{children:[i("div",e({style:I.mrSectionHeaderLeft},{children:[i("div",e({style:I.mrSectionTitleWrapper},{children:[n("div",e({style:I.mrSectionTitleIcon},{children:n(o,{style:I.mrIconSmall})})),n("div",e({style:I.mrSectionTitle},{children:te}))]})),n("div",e({style:I.mrSectionDescription},{children:oe}))]})),n("div",e({style:I.mrSectionHeaderRight},{children:n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Ue(function(e){return!e})},style:I.mrChevronButton},{children:n(l,{style:e(e({},I.mrChevronIcon),Ve?I.mrChevronRotated:{})})}))}))]})),n(b,{children:Xe&&i(C.div,e({initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},style:I.mrSuccessMessage},{children:[n("div",e({style:I.mrSuccessIcon},{children:n("div",e({style:I.mrSuccessIconInner},{children:n(d,{style:I.mrIconSuccess})}))})),i("div",e({style:I.mrSuccessText},{children:[n("div",e({style:I.mrSuccessTitle},{children:ve})),n("div",e({style:I.mrSuccessDescription},{children:ye}))]}))]}))})]})),n(b,{children:Ve&&i(C.div,e({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:e(e({},I.mrHiddenSection),{pointerEvents:Ve?"auto":"none"})},{children:[i("div",e({style:I.mrRecipientsSection},{children:[n("div",e({style:I.mrRecipientsLabel},{children:de})),n("div",e({style:I.mrRecipientsGrid},{children:ri.map(function(t,r){var o,l,d,a,s=(null===(o=null==t?void 0:t.recipientsColor)||void 0===o?void 0:o.bg)||(null==t?void 0:t.bg)||(null===(l=L[r%L.length])||void 0===l?void 0:l.bg)||"#DBEAFE",c=(null===(d=null==t?void 0:t.recipientsColor)||void 0===d?void 0:d.text)||(null==t?void 0:t.text)||(null===(a=L[r%L.length])||void 0===a?void 0:a.text)||"#1E40AF";return i("div",e({style:I.mrRecipientItem},{children:[n(h,{checked:t.checked,onChange:function(){return i=t.name,void oi(function(n){return n.map(function(n){return n.name===i?e(e({},n),{checked:!n.checked}):n})});var i},onClick:function(e){return e.stopPropagation()},size:"small",disableRipple:!0,icon:n("div",{style:I.mrCheckboxUnchecked}),checkedIcon:n("div",e({style:I.mrCheckboxChecked},{children:n("svg",e({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:I.mrCheckboxIcon},{children:n("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),i("div",e({style:I.mrRecipientInfo},{children:[n("div",e({style:e(e({},I.mrRecipientAvatar),{backgroundColor:s,color:c})},{children:ui(t.name)})),n("div",e({style:I.mrRecipientName},{children:t.name}))]}))]}),t.name)})}))]})),i("div",e({style:I.mrActionsSection},{children:[We&&i("button",e({onClick:function(e){e.stopPropagation()},type:"button",style:e(e({},I.mrActionButton),I.mrActionButtonSecondary)},{children:[n(a,{style:I.mrIconAction}),se]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),yi||($e(!0),setTimeout(function(){return $e(!1)},3e3),He(j,vi.filter(function(e){return hi.some(function(i){return i.id===e.id||i.email===e.email||i.name===e.name})})))},disabled:yi,style:e(e(e({},I.mrActionButton),I.mrActionButtonPrimary),yi?{opacity:.55,cursor:"not-allowed"}:{})},{children:ue}))]}))]}))})]})),mi.length>0&&i("div",e({style:I.mrMainContent},{children:[i("div",e({style:I.mrEscalationContainer},{children:[i("div",e({style:I.mrEscalationHeaderWrapper,onClick:function(e){e.stopPropagation(),Je||Ke(!0)}},{children:[i("div",e({style:I.mrEscalationHeader},{children:[i("div",e({style:I.mrEscalationTitleWrapper},{children:[n("div",e({style:I.mrEscalationTitleText},{children:fe})),n("div",e({style:I.mrTooltipIcon},{children:n(s,{stroke:"#64748B",style:I.mrIconInfo})}))]})),i("div",e({style:I.mrEscalationActions},{children:[We&&i("button",e({style:I.mrEscalationPreviewButton},{children:[n("div",e({style:I.mrEscalationPreviewIcon},{children:n(a,{style:I.mrIconPreview})})),n("span",e({style:I.mrEscalationPreviewText},{children:se}))]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Ke(function(e){return!e})},style:I.mrChevronButton},{children:n(l,{style:e(e({},I.mrChevronIcon),Je?I.mrChevronRotated:{})})}))]}))]})),n("div",e({style:I.mrEscalationDescription},{children:xe}))]})),n(b,e({initial:!1},{children:Je&&n(C.div,e({layout:!0,initial:{opacity:0,scaleY:.96},animate:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.96},transition:{duration:.3,ease:"easeInOut"},style:{transformOrigin:"top",overflow:"hidden"}},{children:n(k.Group,e({axis:"y",values:vi,onReorder:function(e){z(e)},layoutScroll:!0,style:I.mrReorderGroup},{children:vi.map(function(t,r){var o,d,a,u,m=mi[r]||$[r],v=(null===(o=null==U?void 0:U[r])||void 0===o?void 0:o.bg)||"#FDF2FA",x=(null===(d=null==U?void 0:U[r])||void 0===d?void 0:d.text)||"#C11574",k=(null===(a=null==J?void 0:J[r])||void 0===a?void 0:a.bg)||"transparent",_=(null===(u=null==J?void 0:J[r])||void 0===u?void 0:u.text)||"inherit";return i("div",e({style:I.mrReminderItem},{children:[n("div",e({style:I.mrReminderLabelBox},{children:n("div",e({style:I.mrReminderLabelInner},{children:n(y,{label:(null==G?void 0:G[r])||"Assignee ".concat(r+1),sx:{backgroundColor:v,minWidth:90,color:x,fontWeight:500}})}))})),i("div",e({style:I.mrReminderContent},{children:[n("div",{style:I.mrDragHandle}),n(p,e({display:"flex",alignItems:"center",gap:2,border:"1px solid #E5E7EB",sx:{background:"#fff"},style:I.mrReminderBox},{children:i("div",e({style:I.mrReminderFields},{children:[i("div",e({style:I.mrReminderHeader},{children:[i("div",e({style:I.mrReminderAssignee},{children:[n("div",e({style:I.mrReminderAvatar},{children:n("span",e({style:I.mrReminderInitials},{children:ui(null==m?void 0:m.name)}))})),n("span",e({style:I.mrReminderName},{children:null==m?void 0:m.name}))]})),n("div",e({style:e(e({},I.mrReminderStatement),{backgroundColor:k})},{children:n("span",e({style:e(e({},I.mrReminderStatementText),{color:_})},{children:Ce(t)}))}))]})),i("div",e({style:I.mrReminderDateFields},{children:[i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:Fe})),i("div",e({style:I.mrReminderDatePicker},{children:[n(F,e({dateAdapter:E},{children:n(R,{value:t.reminder_start_date?w(t.reminder_start_date):null,disablePast:!0,format:"MM/DD/YYYY",onChange:function(e){if(e&&w(e).isValid()){if(w(e).isBefore(w(),"day"))return;di(r,w(e).toISOString())}else di(r,"")},slotProps:{actionBar:{actions:["clear"]},textField:{fullWidth:!0,size:"small",sx:q,placeholder:"MM/DD/YYYY"},openPickerButton:{id:"trial-start-date-picker-icon","data-testid":"trial-start-date-picker-icon",size:"small"},openPickerIcon:{sx:{fontSize:"14px"}}}})})),n(c,{style:I.mrIconArrow})]}))]})),i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:Ee})),n("div",e({style:I.mrReminderDueDate},{children:(null==Y?void 0:Y.due_at)?w(Y.due_at).format("MM/DD/YYYY"):""}))]})),i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:_e})),i("div",e({style:I.mrReminderFrequency},{children:[n("span",e({style:I.mrReminderFrequencyText},{children:"Every"})),n(S,{value:t.reminder_frequency,onChange:function(e){return function(e,i){li(e,"reminder_frequency",i)}(r,e)},options:qe,suffix:"hours"})]}))]}))]})),i("div",e({style:I.mrEscalationCheckbox},{children:[i("div",e({style:I.mrEscalationCheckboxHeader},{children:[n(h,{size:"small",disableRipple:!0,checked:t.is_escalation_reminder,onChange:function(e){return function(e,i){li(e,"is_escalation_reminder",i),i||(li(e,"days",{type:"preset",value:""}),li(e,"escalation_reminder_frequency",{type:"preset",value:""}),li(e,"before_or_after",""))}(r,e.target.checked)},icon:n("div",{style:I.mrCheckboxUnchecked}),checkedIcon:n("div",e({style:I.mrCheckboxChecked},{children:n("svg",e({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:I.mrCheckboxIcon},{children:n("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),Ie,n("div",e({style:I.mrTooltipIcon},{children:n(s,{stroke:"#64748B",style:I.mrIconInfo})}))]})),n(b,{children:t.is_escalation_reminder&&i(C.div,e({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:I.mrEscalationContent},{children:[n("div",e({style:I.mrEscalationCondition},{children:Ae})),i("div",e({style:I.mrEscalationFields},{children:[i("div",e({style:I.mrEscalationFieldGroup},{children:[n(S,{value:t.days,onChange:function(e){return function(e,i){li(e,"days",i)}(r,e)}}),n("div",e({style:I.mrEscalationFieldText},{children:Be}))]})),i("div",e({style:e(e({},I.mrEscalationFieldGroup),I.mrEscalationFieldGroupLarge)},{children:[n(f,{size:"small",options:Ne,value:t.before_or_after,onChange:function(e,i){return function(e,i){li(e,"before_or_after",i)}(r,i||"")},popupIcon:n(l,{style:I.mrIconDropdown}),slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"12px",minHeight:"32px"}}},clearIndicator:{sx:{"& svg":{fontSize:12}}}},renderInput:function(i){return n(g,e({},i,{placeholder:"Select value",sx:q}))},sx:{width:"100%"}}),n("div",e({style:I.mrEscalationFieldText},{children:Pe}))]})),n("div",e({style:I.mrEscalationFieldGroupSmall},{children:n(S,{value:t.escalation_reminder_frequency,onChange:function(e){return function(e,i){li(e,"escalation_reminder_frequency",i)}(r,e)},options:Ye,suffix:"hours"})}))]}))]}))})]}))]}))}))]}))]}))})}))}))}))]})),Je&&i(C.div,e({initial:{width:ii?"345px":"43px"},animate:{width:ii?"345px":"43px"},transition:{duration:.3},style:I.mrCalendarPanel},{children:[ii?n(_,{assignees:j}):n("div",e({style:I.mrCalendarCollapsed},{children:n(u,{style:I.mrIconCalendar})})),i("button",e({onClick:function(){return ni(function(e){return!e})},style:I.mrCalendarToggle},{children:[n("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"19",height:"50",viewBox:"0 0 19 50",fill:"none"},{children:n("path",{d:"M3.94434 9.65137C1.79601 11.031 0.49707 13.4087 0.49707 15.9619V35.1436C0.49707 37.8496 1.95476 40.346 4.31152 41.6758L17.5469 49.1426V0.915039L3.94434 9.65137Z",fill:"white",stroke:"#E0E0E0"})})),n(ii?m:v,{style:I.mrIconChevronToggle})]}))]}))]}))]}))};export{M as ManageReminders};
2
2
  //# sourceMappingURL=ManageReminders.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ManageReminders.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/ManageReminders.tsx"],"names":[],"mappings":";AA2BA,OAAO,EACL,cAAc,EACd,mBAAmB,EAEnB,eAAe,EACf,WAAW,EACZ,MAAM,eAAe,CAAC;AAGvB,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,EAAE,GAAG,EAAE,CAAC;IACjB,YAAY,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,mBAAmB,EAAE,CAAC;IACvC,kBAAkB,EAAE,KAAK,CAAC,QAAQ,CAChC,KAAK,CAAC,cAAc,CAAC,mBAAmB,EAAE,CAAC,CAC5C,CAAC;IAEF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,kBAAkB,CAAC,EAAE,eAAe,EAAE,CAAC;IACvC,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC;IAEhC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAEpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE;QACvB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,mBAAmB,KAAK,MAAM,CAAC;IAEnE,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,iBAAiB,CAAC,EAAE;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAC;IACtC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B,aAAa,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,eAAe,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IAClF,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAqDD,eAAO,MAAM,eAAe,stBAiDzB,oBAAoB,gCAymBtB,CAAC"}
1
+ {"version":3,"file":"ManageReminders.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/ManageReminders.tsx"],"names":[],"mappings":";AA2BA,OAAO,EACL,cAAc,EACd,mBAAmB,EAEnB,eAAe,EACf,WAAW,EACZ,MAAM,eAAe,CAAC;AAGvB,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,EAAE,GAAG,EAAE,CAAC;IACjB,YAAY,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,mBAAmB,EAAE,CAAC;IACvC,kBAAkB,EAAE,KAAK,CAAC,QAAQ,CAChC,KAAK,CAAC,cAAc,CAAC,mBAAmB,EAAE,CAAC,CAC5C,CAAC;IAEF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,kBAAkB,CAAC,EAAE,eAAe,EAAE,CAAC;IACvC,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC;IAEhC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAEpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE;QACvB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,mBAAmB,KAAK,MAAM,CAAC;IAEnE,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,iBAAiB,CAAC,EAAE;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAC;IACtC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B,aAAa,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,eAAe,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IAClF,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAqDD,eAAO,MAAM,eAAe,stBAiDzB,oBAAoB,gCA2nBtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viswa-test/creative-workspace-ui-component",
3
- "version": "0.0.83",
3
+ "version": "0.0.84",
4
4
  "author": "Viswa Koduru",
5
5
  "description": "",
6
6
  "license": "MIT",