@viswa-test/creative-workspace-ui-component 0.0.55 → 0.0.57
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.
- package/dist/cjs/components/AssignReminders/AssignLevelAccordions.js +1 -1
- package/dist/cjs/components/AssignReminders/AssignReminderLevels.js +1 -1
- package/dist/cjs/components/AssignReminders/AssignReminderWrapper.js +1 -1
- package/dist/cjs/components/AssignReminders/ManageReminders.js +1 -1
- package/dist/cjs/components/AssignReminders/components/AddUserPopup.js +1 -1
- package/dist/cjs/components/AssignReminders/components/AssignLevelsDatePicker.js +1 -1
- package/dist/cjs/components/AssignReminders/components/CustomDatePicker.js +1 -1
- package/dist/cjs/components/AssignReminders/components/CustomDropdown.js +1 -1
- package/dist/cjs/components/AssignReminders/components/LevelData.js +1 -1
- package/dist/components/AssignReminders/AssignLevelAccordions.js +1 -1
- package/dist/components/AssignReminders/AssignReminderLevels.js +1 -1
- package/dist/components/AssignReminders/AssignReminderWrapper.js +1 -1
- package/dist/components/AssignReminders/ManageReminders.js +1 -1
- package/dist/components/AssignReminders/components/AddUserPopup.js +1 -1
- package/dist/components/AssignReminders/components/AssignLevelsDatePicker.js +1 -1
- package/dist/components/AssignReminders/components/CustomDatePicker.js +1 -1
- package/dist/components/AssignReminders/components/CustomDropdown.js +1 -1
- package/dist/components/AssignReminders/components/LevelData.js +1 -1
- package/dist/types/App.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/AssignLevelAccordions.d.ts +1 -1
- package/dist/types/components/AssignReminders/AssignLevelAccordions.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/AssignReminderLevels.d.ts +1 -1
- package/dist/types/components/AssignReminders/AssignReminderLevels.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/AssignReminderWrapper.d.ts +1 -1
- package/dist/types/components/AssignReminders/AssignReminderWrapper.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/components/AddUserPopup.d.ts +1 -2
- package/dist/types/components/AssignReminders/components/AddUserPopup.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/components/AssignLevelsDatePicker.d.ts +1 -2
- package/dist/types/components/AssignReminders/components/AssignLevelsDatePicker.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/components/CustomDatePicker.d.ts +1 -2
- package/dist/types/components/AssignReminders/components/CustomDatePicker.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/components/CustomDropdown.d.ts +1 -2
- package/dist/types/components/AssignReminders/components/CustomDropdown.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/components/LevelData.d.ts +1 -1
- package/dist/types/components/AssignReminders/components/LevelData.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/types/levelData.type.d.ts +1 -2
- package/dist/types/components/AssignReminders/types/levelData.type.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/types/types.d.ts +0 -11
- package/dist/types/components/AssignReminders/types/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),t=require("lucide-react"),i=require("./utils/generateRandomColorsPair.js"),o=require("./assets/VerticalLine.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),t=require("lucide-react"),i=require("./utils/generateRandomColorsPair.js"),o=require("./assets/VerticalLine.js"),r=require("./components/AssignLevelsDatePicker.js"),a=require("./components/LevelData.js");exports.default=function(l){var d,u,p,c,g=l.level,x=l.id,h=l.accessLevelOptions,f=l.fetchUsers,y=l.onToggleMandatory,_=l.onDueDateChange,v=l.onAssigneesChange,j=l.onTitleChange,b=l.finalApprovalDueDate,m=s.useMemo(function(){return i.getRandomColorPair()},[]),C="0"===x||(null!==(u=null===(d=g.assignees)||void 0===d?void 0:d.length)&&void 0!==u?u:0)>0,D=s.useState(C),k=D[0],F=D[1],S=s.useState(!1),w=S[0],q=S[1];return s.useEffect(function(){var e,n;(null!==(n=null===(e=g.assignees)||void 0===e?void 0:e.length)&&void 0!==n?n:0)>0&&F(!0)},[g.assignees]),n.jsxs("div",e.__assign({style:{width:"100%",border:"1.5px solid #E2E8F0",borderRadius:"5px"}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#F8FAFC",padding:"0px 10px",minHeight:"48px"}},{children:[n.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center",gap:10,paddingLeft:"20px"}},{children:[n.jsx("span",e.__assign({style:{backgroundColor:m.backgroundColor,borderRadius:"10px",padding:"3px 12px",color:m.color,fontSize:"13px",fontWeight:500}},{children:g.headerName})),w?n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("input",{type:"text",value:g.title||"",onChange:function(e){return null==j?void 0:j(e.target.value)},onBlur:function(){return q(!1)},onKeyDown:function(e){return"Enter"===e.key&&q(!1)},autoFocus:!0,style:{border:"none",borderBottom:"2px solid #3B82F6",outline:"none",fontSize:"13px",fontWeight:500,color:"#374151",background:"transparent",padding:"0 2px",width:"150px"}}),n.jsx("button",e.__assign({type:"button",onMouseDown:function(e){return e.preventDefault()},onClick:function(e){e.stopPropagation(),q(!1)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"}},{children:n.jsx(t.Check,{size:16,color:"#10B981"})}))]})):n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("span",e.__assign({style:{fontSize:"13px",fontWeight:500,color:"#374151"}},{children:g.title})),n.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),q(!0)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"},title:"Edit Title"},{children:n.jsx(t.Edit2,{size:14,color:"#6B7280"})}))]}))]})),n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:16,marginLeft:"auto"}},{children:[n.jsxs(n.Fragment,{children:[n.jsxs("span",e.__assign({style:{color:"#6B7280"}},{children:["Due Date: ",g.isMandatory&&n.jsx("sup",e.__assign({style:{color:"red"}},{children:"*"}))]})),n.jsx(r.default,{value:null!==(p=g.dueDate)&&void 0!==p?p:null,onSet:_,id:x,maxDate:null!=b?b:null}),n.jsx(o.default,{})]}),n.jsx("div",e.__assign({style:{display:"flex",alignItems:"center"}},{children:n.jsxs("button",e.__assign({type:"button",onClick:y,disabled:"0"===x,style:{position:"relative",width:"88px",height:"26px",border:"none",borderRadius:"999px",backgroundColor:g.isMandatory?"#5B4FE9":"#D1D5DB",cursor:"pointer",opacity:"0"===x?"50%":"100%",display:"flex",alignItems:"center",padding:"0 10px",transition:"all 0.2s ease",flexShrink:0}},{children:[n.jsx("span",{style:{position:"absolute",top:"3px",left:g.isMandatory?"65px":"3px",width:"20px",height:"20px",borderRadius:"50%",background:"#FFF",transition:"all 0.2s ease",boxShadow:"0 1px 3px rgba(0,0,0,0.15)"}}),n.jsx("span",e.__assign({style:{color:"#FFF",fontSize:"10px",fontWeight:500,userSelect:"none",paddingLeft:g.isMandatory?"0":"18px",paddingRight:g.isMandatory?"18px":"0"}},{children:"Required"}))]}))})),n.jsx(t.ChevronDown,{size:20,onClick:function(e){e.stopPropagation(),F(function(e){return!e})},style:{cursor:"pointer",flexShrink:0,transition:"transform 0.2s ease",transform:k?"rotate(180deg)":"rotate(0deg)"}})]}))]})),k&&n.jsx("div",e.__assign({style:{width:"100%",height:"auto"}},{children:n.jsx(a.default,{assignees:null!==(c=g.assignees)&&void 0!==c?c:[],onAssigneeChange:v,accessLevelOptions:h,levelDetails:{head:g.headerName,title:g.title},fetchUsers:f})}))]}))};
|
|
2
2
|
//# sourceMappingURL=AssignLevelAccordions.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),i=require("lucide-react"),t=require("./AssignLevelAccordions.js"),r=require("./components/CustomCheckbox.js"),a=require("./assets/FileCheckCorner.js"),l=require("./styles/AssignReminderStyles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(s),d=[{label:"Edit",icon:n.jsx(i.PenLine,{size:14})},{label:"Approve",icon:n.jsx(i.UserRoundCheck,{size:14})},{label:"Edit & Approve",icon:n.jsx(a.default,{})},{label:"Notify",icon:n.jsx(i.Bell,{size:14})}];exports.AssignReminderLevels=function(s){var a=s.title,o=s.levels,c=void 0===o?[]:o,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),i=require("lucide-react"),t=require("./AssignLevelAccordions.js"),r=require("./components/CustomCheckbox.js"),a=require("./assets/FileCheckCorner.js"),l=require("./styles/AssignReminderStyles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(s),d=[{label:"Edit",icon:n.jsx(i.PenLine,{size:14})},{label:"Approve",icon:n.jsx(i.UserRoundCheck,{size:14})},{label:"Edit & Approve",icon:n.jsx(a.default,{})},{label:"Notify",icon:n.jsx(i.Bell,{size:14})}];exports.AssignReminderLevels=function(s){var a=s.title,o=s.levels,c=void 0===o?[]:o,_=s.requireFinalApproval,p=void 0!==_&&_,f=s.additionalInfo,g=s.setLevels,v=s.setRequireFinalApproval,x=s.fetchUsers,h=s.accessLevelOptions,j=void 0===h?d:h,A=s.customInfoIcon,y=s.onValidationError,S=s.customStyles,E=void 0===S?{}:S,L=s.totalLevels,m=s.finalApprovalDueDate,D=u.default.useState(!1),I=D[0],b=D[1],F=u.default.useMemo(function(){return Array.from({length:null!=L?L:3},function(e,n){var s;return null!==(s=c[n])&&void 0!==s?s:{title:"Level ".concat(n+1),headerName:"L ".concat(n+1),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0}})},[c,L]),R=(c.length>0?c:F).filter(function(e){return!e.isHidden});return n.jsxs("div",e.__assign({style:e.__assign({padding:"8px",display:"flex",flexDirection:"column",gap:"18px"},E.container)},{children:[n.jsxs("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.header),E.levelsHeader)},{children:[n.jsx("span",{children:null!=a?a:"Assignee Levels"}),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.infoIconWrapper),E.infoIconWrapper),onMouseEnter:function(){return b(!0)},onMouseLeave:function(){return b(!1)}},{children:[null!=A?A:n.jsx(i.InfoIcon,{width:18,height:18}),n.jsx("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.tooltip),E.tooltip),I?e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.tooltipVisible),E.tooltipVisible):{})},{children:f||n.jsxs("span",{children:[n.jsx("b",{children:"How it works:"}),n.jsx("br",{}),"Level 1 is required by default, Enable Level 2 and Level 3 to add sequential approval steps for the review"]})}))]}))]})),n.jsx("div",e.__assign({style:e.__assign({display:"flex",flexDirection:"column",gap:"16px"},E.accordionsContainer)},{children:R.map(function(s,i){return n.jsx(t.default,{level:s,id:String(i),accessLevelOptions:j,fetchUsers:x,onToggleMandatory:function(){return n=i,void(null==g||g(function(s){return s.map(function(s,i){return i===n?e.__assign(e.__assign({},s),{isMandatory:!s.isMandatory}):s})}));var n},onDueDateChange:function(n){return function(n,s){var i;if(n>0&&s){var t=null===(i=c[n-1])||void 0===i?void 0:i.dueDate;if(t&&s<t)return void(null==y||y("Level ".concat(n+1," due date cannot be before Level ").concat(n," due date")))}null==g||g(function(i){return i.map(function(i,t){return t===n?e.__assign(e.__assign({},i),{dueDate:s}):i})})}(i,n)},onAssigneesChange:function(n){return s=i,t=n,void(null==g||g(function(n){return n.map(function(n,i){return i===s?e.__assign(e.__assign({},n),{assignees:t}):n})}));var s,t},onTitleChange:function(n){return function(n,s){null==g||g(function(i){return i.map(function(i,t){return t===n?e.__assign(e.__assign({},i),{title:s}):i})})}(i,n)},finalApprovalDueDate:m},i)})})),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.finalApprovalBox),E.finalApprovalBox)},{children:[n.jsx(r.default,{getter:p,setter:null!=v?v:function(){}}),n.jsxs("div",e.__assign({style:e.__assign({display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400},E.finalApprovalTextWrapper)},{children:[n.jsx("span",e.__assign({style:e.__assign({fontWeight:500},E.finalApprovalTitle)},{children:"Require Final Approval"})),n.jsx("span",e.__assign({style:E.finalApprovalDesc},{children:"After all assignees approve, you (the owner) will be notified to give final sign-off before the redline is settled."}))]}))]})),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.currentApprovalFlow),E.currentApprovalFlow)},{children:[n.jsx("span",e.__assign({style:e.__assign({fontSize:"14px",fontWeight:600},E.currentApprovalFlowTitle)},{children:"Current Approval Flow"})),function(){var s=c.filter(function(e){var n,s;return(null!==(s=null===(n=e.assignees)||void 0===n?void 0:n.length)&&void 0!==s?s:0)>0});return n.jsx("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"},E.approvalFlowItemsWrapper)},{children:s.map(function(t,r){var a,l=t.isHidden,o=!t.isMandatory&&!l,d=t.assignees.map(function(e){return e.name}).join(" / "),c=l?n.jsx(i.User,{size:16}):function(e){switch(e){case 0:return n.jsx(i.Edit2,{size:16});case 1:return n.jsx(i.FileCheck,{size:16});case 2:return n.jsx(i.User,{size:16});default:return n.jsx(i.CheckSquare,{size:16})}}(r);return n.jsxs(u.default.Fragment,{children:[n.jsxs("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,color:o?"#64748B":"#374151",border:o?"1px dashed #CBD5E1":void 0,borderRadius:o?"6px":void 0,padding:o?"2px 6px":void 0},E.approvalFlowItem),title:t.title||"Level ".concat(r+1)},{children:[c,n.jsxs("span",{children:[d,o&&" (Optional)"]})]})),r<s.length-1&&n.jsx(i.ArrowRight,{size:16,color:"#9CA3AF"})]},null!==(a=t.id)&&void 0!==a?a:r)})}))}()]}))]}))};
|
|
2
2
|
//# sourceMappingURL=AssignReminderLevels.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),s=require("lucide-react"),n=require("react"),a=require("./AssignReminderLevels.js"),r=require("./AssignReminderTest.js"),t=require("./components/ReviewStatus.js"),l=require("./components/CustomDatePicker.js"),o=require("./ManageReminders.js"),d=require("./styles/AssignReminderWrapperStyles.js");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=_(n),c=[{tabName:"Assignees & Approvers",tabIcon:i.jsxs("svg",e.__assign({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},{children:[i.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),i.jsx("circle",{cx:"9",cy:"7",r:"4"}),i.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),i.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}))},{tabName:"Manage Reminders",tabIcon:i.jsx(s.Bell,{size:15})},{tabName:"Review Status",tabIcon:i.jsx(s.ClipboardList,{size:15})}],v=[{id:1,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}},{id:2,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}},{id:3,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}}];exports.AssignReminderWrapper=function(_){var m,p,S,g=_.metadata,E=void 0===g?{}:g,R=_.reviewData,f=void 0===R?{}:R,A=_.levels,D=_.setLevels,y=_.requireFinalApproval,L=_.setRequireFinalApproval,T=_.approvalDueDate,b=_.setApprovalDueDate,h=_.onClose,N=_.fetchUsers,I=_.onSave,x=_.onValidationError,P=_.totalLevels,j=_.customStyles,F=void 0===j?{}:j,w=_.isSaving,q=void 0!==w&&w,M=_.displayConfig,C=void 0===M?{}:M,W=_.onRequireFinalApproval,U=_.isOwner,B=void 0===U||U;_.remindersData;var Y,G=_.remainderOwners,O=_.setRemainderOwners,k=_.schedules,H=_.setSchedules,z=_.handelSendNow,V=_.showPreviewEmail,X=_.tabName,J=_.reminderLabels,K=_.reminderColors,Q=_.reminderChipColor,Z=_.reminderAssignees,$=_.reminderFallbackRecipients,ee=_.reminderRecipientsColor,ie=_.manualReminderTitle,se=_.manualReminderDescription,ne=_.lastReminderText,ae=_.selectRecipientsLabel,re=_.previewEmailButtonLabel,te=_.sendNowButtonLabel,le=_.reminderSuccessTitle,oe=_.reminderSuccessDescription,de=_.escalationTitle,_e=_.escalationTitleTooltip,ue=_.escalationDescription,ce=_.configureAutoReminderText,ve=_.getDynamicStatement,me=_.reminderStartDateLabel,pe=_.documentDueDateLabel,Se=_.reminderFrequencyLabel,ge=_.escalationRemindersLabel,Ee=_.escalationTooltip,Re=_.escalationConditionText,fe=_.daysText,Ae=_.dueDataAndRepeatText,De=_.reminderFrequencyOptions,ye=_.escalationFrequencyOptions,Le=_.beforeAfterOptions,Te=(null===(m=E.tabData)||void 0===m?void 0:m.length)?E.tabData:c,be=B?Te:Te.filter(function(e,i){return 0!==i}),he=n.useState(null!==(S=null===(p=be[0])||void 0===p?void 0:p.tabName)&&void 0!==S?S:""),Ne=he[0],Ie=he[1],xe=(Y=Ne.toLowerCase()).includes("reminder")?"reminders":Y.includes("review")?"review":"assignees",Pe=n.useState(A||r.INITIAL_LEVELS),je=Pe[0],Fe=Pe[1],we=n.useState(y||!1),qe=we[0],Me=we[1],Ce=n.useState(T||null),We=Ce[0],Ue=Ce[1],Be=n.useState(null),Ye=Be[0],Ge=Be[1],Oe=n.useState([]),ke=Oe[0],He=Oe[1],ze=n.useState(G||v),Ve=ze[0],Xe=ze[1],Je=void 0!==k?k:ke,Ke=void 0!==H?H:He,Qe=void 0!==G?G:Ve,Ze=u.default.useMemo(function(){return{due_at:We?We.toISOString():"",assignee:je.filter(function(e){return!e.isHidden}).flatMap(function(e){return e.assignees||[]}).reduce(function(i,s,n){var a;return e.__assign(e.__assign({},i),((a={})[n]=s,a))},{})}},[We,je]);n.useEffect(function(){void 0!==G&&Xe(G)},[G]),n.useEffect(function(){W&&W().then(function(e){Array.isArray(e)&&e.length>0?Ge(e[0]):e&&!Array.isArray(e)&&Ge(e)}).catch(function(e){return console.error("Failed to fetch user:",e)})},[]),n.useEffect(function(){X&&Ie(X)},[X]),n.useEffect(function(){var e,i;be.some(function(e){return e.tabName===Ne})||Ie(null!==(i=null===(e=be[0])||void 0===e?void 0:e.tabName)&&void 0!==i?i:"")},[be,Ne]),n.useEffect(function(){A&&Fe(function(i){var s=i.find(function(e){return e.isHidden});return s?e.__spreadArray(e.__spreadArray([],A,!0),[s],!1):A})},[A]),n.useEffect(function(){void 0!==y&&Me(y)},[y]),n.useEffect(function(){void 0!==T&&Ue(T)},[T]),n.useEffect(function(){Fe(function(i){var s=i.filter(function(e){return!e.isHidden});if(qe){var n={headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==Ye?void 0:Ye.id)||"me",email:(null==Ye?void 0:Ye.email)||"",name:(null==Ye?void 0:Ye.name)?"".concat(Ye.name," (You)"):"Username (You)",accessLevel:"Approve"}]};return e.__spreadArray(e.__spreadArray([],s,!0),[n],!1)}return s})},[qe,Ye]),n.useEffect(function(){var e=je.flatMap(function(e){return e.assignees||[]}).filter(function(e){return e.email});Xe(function(i){var s=i.length===e.length&&e.every(function(e,s){var n;return(null===(n=i[s])||void 0===n?void 0:n.email)===e.email});return s?i:e.map(function(e,s){var n=i.find(function(i){return i.email===e.email});return n||{id:s+1,name:e.name,email:e.email,reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}}})})},[je]);var $e=E.wrapperTitle||"Assign Redline and Manage Reminders",ei=E.wrapperSubTitle||"Sec 4.1 - Technical Security Information",ii=E.wrapperPriority||"High",si=E.wrapperPriorityStyles||{backgroundColor:"#DC262618",color:"#DC2626",border:"1px solid #DC262640"};return i.jsx("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.overlay),F.overlay)},{children:i.jsxs("div",e.__assign({style:e.__assign(e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.modal),{transition:"width 0.3s ease, max-width 0.3s ease"}),"reminders"===xe?{width:"1400px",maxWidth:"95vw"}:{}),F.modal)},{children:[i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.header),F.header)},{children:[i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.headerLeft),F.headerLeft)},{children:[i.jsx("span",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.modalTitle),F.modalTitle)},{children:$e})),i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineRow),F.redlineRow)},{children:[i.jsx("span",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineName),F.redlineName)},{children:ei})),i.jsx("span",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineBadge),si),F.redlineBadge)},{children:ii}))]}))]})),i.jsx("button",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.closeBtn),F.closeBtn),onClick:h},{children:i.jsx(s.X,{size:20,color:"#6B7280"})}))]})),i.jsx("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tabBar),F.tabBar)},{children:be.map(function(s){var n=Ne===s.tabName;return i.jsxs("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tab),F.tab),n?e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tabActive),F.tabActive):{}),onClick:function(){return Ie(s.tabName)}},{children:[s.tabIcon," ",s.tabName]}),s.tabName)})})),i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.body),F.body)},{children:["assignees"===xe&&i.jsxs(i.Fragment,{children:[!1!==E.showFinalApprovalDueDate&&i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateBar),F.dueDateBar)},{children:[i.jsxs("span",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateLabel),F.dueDateLabel)},{children:["Final Approval due date"," ",i.jsx("sup",e.__assign({style:{color:"#DC2626",marginLeft:2}},{children:"*"}))]})),i.jsx("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateInputWrap),F.dueDateInputWrap)},{children:i.jsx(l.default,{value:We?We.toISOString().slice(0,10):"",onChange:Ue,disabled:C.disableDueDates})})),i.jsxs("span",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.requiredToProceeed),F.requiredToProceeed)},{children:[i.jsx(s.CircleAlert,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),i.jsx(a.AssignReminderLevels,{levels:je,totalLevels:P,requireFinalApproval:qe,setLevels:Fe,setRequireFinalApproval:function(e){Me(e)},fetchUsers:N,onValidationError:x,customStyles:F,finalApprovalDueDate:We,displayConfig:C})]}),"reminders"===xe&&i.jsx(o.ManageReminders,e.__assign({data:Ze,schedules:Je,setSchedules:Ke,remainderOwners:Qe,setRemainderOwners:function(e){var i="function"==typeof e?e(Qe):e;O?O(i):Xe(i)},handelSendNow:function(e,i){z&&z(e||Je,i||Qe)},showPreviewEmail:null!=V&&V},void 0!==J&&{labels:J},void 0!==K&&{colors:K},void 0!==Q&&{chipColor:Q},void 0!==Z&&{assignees:Z},void 0!==$&&{fallbackRecipients:$},void 0!==ee&&{recipientsColor:ee},void 0!==ie&&{manualReminderTitle:ie},void 0!==se&&{manualReminderDescription:se},void 0!==ne&&{lastReminderText:ne},void 0!==ae&&{selectRecipientsLabel:ae},void 0!==re&&{previewEmailButtonLabel:re},void 0!==te&&{sendNowButtonLabel:te},void 0!==le&&{reminderSuccessTitle:le},void 0!==oe&&{reminderSuccessDescription:oe},void 0!==de&&{escalationTitle:de},void 0!==_e&&{escalationTitleTooltip:_e},void 0!==ue&&{escalationDescription:ue},void 0!==ce&&{configureAutoReminderText:ce},void 0!==ve&&{getDynamicStatement:ve},void 0!==me&&{reminderStartDateLabel:me},void 0!==pe&&{documentDueDateLabel:pe},void 0!==Se&&{reminderFrequencyLabel:Se},void 0!==ge&&{escalationRemindersLabel:ge},void 0!==Ee&&{escalationTooltip:Ee},void 0!==Re&&{escalationConditionText:Re},void 0!==fe&&{daysText:fe},void 0!==Ae&&{dueDataAndRepeatText:Ae},void 0!==De&&{reminderFrequencyOptions:De},void 0!==ye&&{escalationFrequencyOptions:ye},void 0!==Le&&{beforeAfterOptions:Le})),"review"===xe&&i.jsx(t.default,{levels:je,reviewData:f})]})),i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.footer),F.footer)},{children:[i.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.clearBtn),F.clearBtn),q?F.actionBtnDisabled:{}),onClick:function(){Fe(r.INITIAL_LEVELS.map(function(i){return e.__assign(e.__assign({},i),{assignees:[],dueDate:null})})),Me(!1),Ue(null)},disabled:q},{children:"Clear"})),i.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.saveBtn),F.saveBtn),q||C.disableSaveChanges?e.__assign({opacity:.6,cursor:"not-allowed"},F.actionBtnDisabled):{}),onClick:function(){if(!C.disableSaveChanges){var e=je.filter(function(e){return!e.isHidden});null==D||D(e),null==L||L(qe),null==b||b(We),null==I||I({levels:e,requireFinalApproval:qe,finalApprovalDueDate:We,activeTab:xe,schedules:Je,remainderOwners:Qe})}},disabled:q||C.disableSaveChanges},{children:"Save Changes"}))]}))]}))}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),n=require("lucide-react"),s=require("react"),a=require("./AssignReminderLevels.js"),r=require("./AssignReminderTest.js"),t=require("./components/ReviewStatus.js"),l=require("./components/CustomDatePicker.js"),o=require("./ManageReminders.js"),d=require("./styles/AssignReminderWrapperStyles.js");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=_(s),c=[{tabName:"Assignees & Approvers",tabIcon:i.jsxs("svg",e.__assign({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},{children:[i.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),i.jsx("circle",{cx:"9",cy:"7",r:"4"}),i.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),i.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}))},{tabName:"Manage Reminders",tabIcon:i.jsx(n.Bell,{size:15})},{tabName:"Review Status",tabIcon:i.jsx(n.ClipboardList,{size:15})}],v=[{id:1,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}},{id:2,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}},{id:3,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}}];exports.AssignReminderWrapper=function(_){var m,p,f,g=_.metadata,E=void 0===g?{}:g,R=_.reviewData,S=void 0===R?{}:R,A=_.levels,D=_.setLevels,y=_.requireFinalApproval,L=_.setRequireFinalApproval,T=_.approvalDueDate,b=_.setApprovalDueDate,h=_.onClose,N=_.fetchUsers,I=_.onSave,x=_.onValidationError,P=_.totalLevels,j=_.customStyles,F=void 0===j?{}:j,w=_.isSaving,q=void 0!==w&&w,M=_.onRequireFinalApproval,C=_.isOwner,W=void 0===C||C;_.remindersData;var B,U=_.remainderOwners,Y=_.setRemainderOwners,G=_.schedules,O=_.setSchedules,k=_.handelSendNow,H=_.showPreviewEmail,z=_.tabName,V=_.reminderLabels,X=_.reminderColors,J=_.reminderChipColor,K=_.reminderAssignees,Q=_.reminderFallbackRecipients,Z=_.reminderRecipientsColor,$=_.manualReminderTitle,ee=_.manualReminderDescription,ie=_.lastReminderText,ne=_.selectRecipientsLabel,se=_.previewEmailButtonLabel,ae=_.sendNowButtonLabel,re=_.reminderSuccessTitle,te=_.reminderSuccessDescription,le=_.escalationTitle,oe=_.escalationTitleTooltip,de=_.escalationDescription,_e=_.configureAutoReminderText,ue=_.getDynamicStatement,ce=_.reminderStartDateLabel,ve=_.documentDueDateLabel,me=_.reminderFrequencyLabel,pe=_.escalationRemindersLabel,fe=_.escalationTooltip,ge=_.escalationConditionText,Ee=_.daysText,Re=_.dueDataAndRepeatText,Se=_.reminderFrequencyOptions,Ae=_.escalationFrequencyOptions,De=_.beforeAfterOptions,ye=(null===(m=E.tabData)||void 0===m?void 0:m.length)?E.tabData:c,Le=W?ye:ye.filter(function(e,i){return 0!==i}),Te=s.useState(null!==(f=null===(p=Le[0])||void 0===p?void 0:p.tabName)&&void 0!==f?f:""),be=Te[0],he=Te[1],Ne=(B=be.toLowerCase()).includes("reminder")?"reminders":B.includes("review")?"review":"assignees",Ie=s.useState(A||r.INITIAL_LEVELS),xe=Ie[0],Pe=Ie[1],je=s.useState(y||!1),Fe=je[0],we=je[1],qe=s.useState(T||null),Me=qe[0],Ce=qe[1],We=s.useState(null),Be=We[0],Ue=We[1],Ye=s.useState([]),Ge=Ye[0],Oe=Ye[1],ke=s.useState(U||v),He=ke[0],ze=ke[1],Ve=void 0!==G?G:Ge,Xe=void 0!==O?O:Oe,Je=void 0!==U?U:He,Ke=function(i){return i.map(function(i,n){return 0!==n||i.isHidden?i:e.__assign(e.__assign({},i),{isMandatory:!0,hasDueDate:!0})})},Qe=u.default.useMemo(function(){return{due_at:Me?Me.toISOString():"",assignee:xe.filter(function(e){return!e.isHidden}).flatMap(function(e){return e.assignees||[]}).reduce(function(i,n,s){var a;return e.__assign(e.__assign({},i),((a={})[s]=n,a))},{})}},[Me,xe]);s.useEffect(function(){void 0!==U&&ze(U)},[U]),s.useEffect(function(){M&&M().then(function(e){Array.isArray(e)&&e.length>0?Ue(e[0]):e&&!Array.isArray(e)&&Ue(e)}).catch(function(e){return console.error("Failed to fetch user:",e)})},[]),s.useEffect(function(){z&&he(z)},[z]),s.useEffect(function(){var e,i;Le.some(function(e){return e.tabName===be})||he(null!==(i=null===(e=Le[0])||void 0===e?void 0:e.tabName)&&void 0!==i?i:"")},[Le,be]),s.useEffect(function(){A&&Pe(function(i){var n=i.find(function(e){return e.isHidden}),s=n?e.__spreadArray(e.__spreadArray([],A,!0),[n],!1):A;return Ke(s)})},[A]),s.useEffect(function(){void 0!==y&&we(y)},[y]),s.useEffect(function(){void 0!==T&&Ce(T)},[T]),s.useEffect(function(){Pe(function(i){var n=i.filter(function(e){return!e.isHidden});if(Fe){var s={headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==Be?void 0:Be.id)||"me",email:(null==Be?void 0:Be.email)||"",name:(null==Be?void 0:Be.name)?"".concat(Be.name," (You)"):"Username (You)",accessLevel:"Approve"}]};return e.__spreadArray(e.__spreadArray([],n,!0),[s],!1)}return n})},[Fe,Be]),s.useEffect(function(){var e=xe.flatMap(function(e){return e.assignees||[]}).filter(function(e){return e.email});ze(function(i){var n=i.length===e.length&&e.every(function(e,n){var s;return(null===(s=i[n])||void 0===s?void 0:s.email)===e.email});return n?i:e.map(function(e,n){var s=i.find(function(i){return i.email===e.email});return s||{id:n+1,name:e.name,email:e.email,reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}}})})},[xe]);var Ze=xe.filter(function(e){return!e.isHidden}),$e=Ze.find(function(e,i){if(!(0===i||e.isMandatory))return!1;var n=!!e.dueDate,s=(e.assignees||[]).some(function(e){return!!(null==e?void 0:e.email)||!!(null==e?void 0:e.id)});return!n||!s}),ei=!1!==E.showFinalApprovalDueDate,ii=q||(!!$e||ei&&!Me),ni=E.wrapperTitle||"Assign Redline and Manage Reminders",si=E.wrapperSubTitle||"Sec 4.1 - Technical Security Information",ai=E.wrapperPriority||"High",ri=E.wrapperPriorityStyles||{backgroundColor:"#DC262618",color:"#DC2626",border:"1px solid #DC262640"};return i.jsx("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.overlay),F.overlay)},{children:i.jsxs("div",e.__assign({style:e.__assign(e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.modal),{transition:"width 0.3s ease, max-width 0.3s ease"}),"reminders"===Ne?{width:"1400px",maxWidth:"95vw"}:{}),F.modal)},{children:[i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.header),F.header)},{children:[i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.headerLeft),F.headerLeft)},{children:[i.jsx("span",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.modalTitle),F.modalTitle)},{children:ni})),i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineRow),F.redlineRow)},{children:[i.jsx("span",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineName),F.redlineName)},{children:si})),i.jsx("span",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineBadge),ri),F.redlineBadge)},{children:ai}))]}))]})),i.jsx("button",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.closeBtn),F.closeBtn),onClick:h},{children:i.jsx(n.X,{size:20,color:"#6B7280"})}))]})),i.jsx("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tabBar),F.tabBar)},{children:Le.map(function(n){var s=be===n.tabName;return i.jsxs("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tab),F.tab),s?e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tabActive),F.tabActive):{}),onClick:function(){return he(n.tabName)}},{children:[n.tabIcon," ",n.tabName]}),n.tabName)})})),i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.body),F.body)},{children:["assignees"===Ne&&i.jsxs(i.Fragment,{children:[!1!==E.showFinalApprovalDueDate&&i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateBar),F.dueDateBar)},{children:[i.jsxs("span",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateLabel),F.dueDateLabel)},{children:["Final Approval due date"," ",i.jsx("sup",e.__assign({style:{color:"#DC2626",marginLeft:2}},{children:"*"}))]})),i.jsx("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateInputWrap),F.dueDateInputWrap)},{children:i.jsx(l.default,{value:Me?Me.toISOString().slice(0,10):"",onChange:Ce})})),i.jsxs("span",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.requiredToProceeed),F.requiredToProceeed)},{children:[i.jsx(n.CircleAlert,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),i.jsx(a.AssignReminderLevels,{levels:xe,totalLevels:P,requireFinalApproval:Fe,setLevels:Pe,setRequireFinalApproval:function(e){we(e)},fetchUsers:N,onValidationError:x,customStyles:F,finalApprovalDueDate:Me})]}),"reminders"===Ne&&i.jsx(o.ManageReminders,e.__assign({data:Qe,schedules:Ve,setSchedules:Xe,remainderOwners:Je,setRemainderOwners:function(e){var i="function"==typeof e?e(Je):e;Y?Y(i):ze(i)},handelSendNow:function(e,i){k&&k(e||Ve,i||Je)},showPreviewEmail:null!=H&&H},void 0!==V&&{labels:V},void 0!==X&&{colors:X},void 0!==J&&{chipColor:J},void 0!==K&&{assignees:K},void 0!==Q&&{fallbackRecipients:Q},void 0!==Z&&{recipientsColor:Z},void 0!==$&&{manualReminderTitle:$},void 0!==ee&&{manualReminderDescription:ee},void 0!==ie&&{lastReminderText:ie},void 0!==ne&&{selectRecipientsLabel:ne},void 0!==se&&{previewEmailButtonLabel:se},void 0!==ae&&{sendNowButtonLabel:ae},void 0!==re&&{reminderSuccessTitle:re},void 0!==te&&{reminderSuccessDescription:te},void 0!==le&&{escalationTitle:le},void 0!==oe&&{escalationTitleTooltip:oe},void 0!==de&&{escalationDescription:de},void 0!==_e&&{configureAutoReminderText:_e},void 0!==ue&&{getDynamicStatement:ue},void 0!==ce&&{reminderStartDateLabel:ce},void 0!==ve&&{documentDueDateLabel:ve},void 0!==me&&{reminderFrequencyLabel:me},void 0!==pe&&{escalationRemindersLabel:pe},void 0!==fe&&{escalationTooltip:fe},void 0!==ge&&{escalationConditionText:ge},void 0!==Ee&&{daysText:Ee},void 0!==Re&&{dueDataAndRepeatText:Re},void 0!==Se&&{reminderFrequencyOptions:Se},void 0!==Ae&&{escalationFrequencyOptions:Ae},void 0!==De&&{beforeAfterOptions:De})),"review"===Ne&&i.jsx(t.default,{levels:xe,reviewData:S})]})),i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.footer),F.footer)},{children:[i.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.clearBtn),F.clearBtn),q?F.actionBtnDisabled:{}),onClick:function(){Pe(Ke(r.INITIAL_LEVELS.map(function(i){return e.__assign(e.__assign({},i),{assignees:[],dueDate:null})}))),we(!1),Ce(null)},disabled:q},{children:"Clear"})),i.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.saveBtn),F.saveBtn),ii?e.__assign({opacity:.55,cursor:"not-allowed"},F.actionBtnDisabled):{}),onClick:function(){if(ii)q||null==x||x(function(){if(ei&&!Me)return"Final approval due date is required";if(!$e)return"Please fill all required fields before saving";var e=Ze.indexOf($e)+1,i=[$e.dueDate?null:"due date",($e.assignees||[]).some(function(e){return!!(null==e?void 0:e.email)||!!(null==e?void 0:e.id)})?null:"assignee"].filter(Boolean);return"Level ".concat(e," ").concat(i.join(" and ")," ").concat(i.length>1?"are":"is"," required")}());else{var e=xe.filter(function(e){return!e.isHidden});null==D||D(e),null==L||L(Fe),null==b||b(Me),null==I||I({levels:e,requireFinalApproval:Fe,finalApprovalDueDate:Me,activeTab:Ne,schedules:Ve,remainderOwners:Je})}},disabled:ii},{children:"Save Changes"}))]}))]}))}))};
|
|
2
2
|
//# sourceMappingURL=AssignReminderWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),n=require("react"),i=require("lucide-react"),t=require("@mui/material/Checkbox"),r=require("@mui/material"),l=require("framer-motion"),a=require("@mui/icons-material/DragIndicator"),o=require("@mui/x-date-pickers"),d=require("@mui/x-date-pickers/AdapterDayjs"),c=require("./components/ReminderFrequencyAutocomplete.js"),u=require("./components/AssigneeCalendarView.js"),y=require("dayjs"),_=require("./styles/ManageReminder.style.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=m(t),g=m(a),h=m(y),x=["Assignee 1","Assignee 2","Assignee 3"],f=[{bg:"#FDF2FA",text:"#C11574"},{bg:"#EEF4FF",text:"#3538CD"},{bg:"#F1F5F9",text:"#344054"}],p=[{bg:"#FDF2FA",text:"#C93185"},{bg:"#EEF2FF",text:"#6366F1"},{bg:"#FFF4E5",text:"#FF6058"}],j=[{id:"1",name:"Assignee 1",color:"#C11574",bg:"#FDF2F8",startDate:new Date("2026-11-09"),dueDate:new Date("2026-12-01")},{id:"2",name:"Assignee 2",color:"#3538CD",bg:"#EEF4FF",startDate:new Date("2026-11-21"),dueDate:new Date("2026-12-03")},{id:"3",name:"Assignee 3",color:"#FF6058",bg:"#FFF7ED",startDate:new Date("2026-12-01"),dueDate:new Date("2026-12-03")}],C=[{bg:"#DBEAFE",text:"#1E40AF"},{bg:"#CCFBF1",text:"#0D9488"},{bg:"#DCFCE7",text:"#166534"}],b=[{initials:"OR",name:"Olivia Rhye",checked:!1,bg:"#DBEAFE",text:"#1D4ED8"},{initials:"DM",name:"Daniela Mark",checked:!1,bg:"#CFFAFE",text:"#0F766E"},{initials:"JB",name:"Jenna Beckner",checked:!1,bg:"#D1FAE5",text:"#059669"}],F=function(e){var s,n,i,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===(n=null==e?void 0:e.days)||void 0===n?void 0:n.value)&&(null===(i=null==e?void 0:e.escalation_reminder_frequency)||void 0===i?void 0:i.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"},D={"& .MuiInputBase-root":{height:"28px",borderRadius:"4px",fontSize:"11px"}};exports.ManageReminders=function(t){var a=t.data,y=t.schedules,m=t.setSchedules,k=t.remainderOwners,R=t.setRemainderOwners,E=t.labels,S=void 0===E?x:E,w=t.colors,I=void 0===w?f:w,A=t.chipColor,B=void 0===A?p:A,T=t.assignees,q=void 0===T?j:T,P=t.fallbackRecipients,L=void 0===P?b:P,M=t.recipientsColor,O=void 0===M?C:M,Y=t.manualReminderTitle,N=void 0===Y?"Send Manual Reminder Now":Y,H=t.manualReminderDescription,z=void 0===H?"Immediately notify the assignees about this document.":H;t.lastReminderText;var W=t.selectRecipientsLabel,G=void 0===W?"Select recipients:":W,V=t.previewEmailButtonLabel,U=void 0===V?"Preview Email":V,J=t.sendNowButtonLabel,Z=void 0===J?"Send Now":J,K=t.reminderSuccessTitle,Q=void 0===K?"Reminder sent successfully!":K,X=t.reminderSuccessDescription,$=void 0===X?"Email notification sent to 2 assignees.":X,ee=t.escalationTitle,se=void 0===ee?"Escalation and Auto Reminder Setup":ee;t.escalationTitleTooltip;var ne=t.escalationDescription,ie=void 0===ne?"Configure Auto reminder settings for all assignees.":ne;t.configureAutoReminderText;var te=t.getDynamicStatement,re=void 0===te?F:te,le=t.reminderStartDateLabel,ae=void 0===le?"Reminder Start Date":le,oe=t.documentDueDateLabel,de=void 0===oe?"Document Due Date":oe,ce=t.reminderFrequencyLabel,ue=void 0===ce?"Reminder Frequency":ce,ye=t.escalationRemindersLabel,_e=void 0===ye?"Escalation Reminders":ye;t.escalationTooltip;var me=t.escalationConditionText,ve=void 0===me?"If the document is still pending, start escalation reminders":me,ge=t.daysText,he=void 0===ge?"days":ge,xe=t.dueDataAndRepeatText,fe=void 0===xe?"due date and repeat every":xe,pe=t.reminderFrequencyOptions,je=void 0===pe?["12 hours","24 hours","48 hours","72 hours","Custom"]:pe,Ce=t.escalationFrequencyOptions,be=void 0===Ce?["1/2 hour","1 hour","4 hours","6 hours","12 hours","Custom"]:Ce,Fe=t.beforeAfterOptions,De=void 0===Fe?["After","Before"]:Fe,ke=t.handelSendNow,Re=t.showPreviewEmail,Ee=void 0===Re||Re,Se=n.useState(!1),we=Se[0],Ie=Se[1],Ae=n.useState(!1),Be=Ae[0],Te=Ae[1],qe=n.useState(!1),Pe=qe[0],Le=qe[1],Me=n.useState(!0),Oe=Me[0],Ye=Me[1],Ne=n.useState(L),He=Ne[0],ze=Ne[1],We=l.useDragControls(),Ge=function(s,n,i){R(function(t){return t.map(function(t,r){var l;return r===s?e.__assign(e.__assign({},t),((l={})[n]=i,l)):t})})},Ve=function(e,s){Ge(e,"reminder_start_date",s)},Ue=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},Je=function(e,s,n){if(!e||!n)return[];var i=Ue(n);if(!i||i<=0)return[];for(var t=[],r=h.default(e).valueOf(),l=s?h.default(s).valueOf():h.default(e).add(45,"day").valueOf(),a=0;r<=l&&a<150;)t.push(h.default(r).toISOString()),r+=i,a++;return t},Ze=function(e,s,n,i){if(!(e&&s&&i&&n))return[];var t=Ue(i);if(!t)return[];var r,l=h.default(e),a="custom"===s.type?Number(s.value):Number("1/2"===s.value.split(" ")[0]?.5:Number(s.value.split(" ")[0])),o=[];switch(n){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(h.default(d).toISOString()),d+=t;return o},Ke=function(e){return e?e.split(" ").map(function(e){return e[0]}).join("").toUpperCase():""};n.useEffect(function(){var e=(null==a?void 0:a.due_at)||"",s=Object.values((null==a?void 0:a.assignee)||{}),n=null==k?void 0:k.map(function(n,i){var t,r=s[i]||q.find(function(e){return e.id===String(n.id)}),l=(null===(t=null==I?void 0:I[i%I.length])||void 0===t?void 0:t.text)||"#C11574";return{ownerId:n.id||i+1,ownerName:(null==r?void 0:r.name)||n.name,ownerColor:(null==r?void 0:r.color)||l,reminders:Je(n.reminder_start_date,e,n.reminder_frequency),escalations:Ze(e,n.days,n.before_or_after,n.escalation_reminder_frequency)}});m(n)},[k,null==a?void 0:a.due_at,null==a?void 0:a.assignee]),n.useEffect(function(){(null==a?void 0:a.assignee)&&ze(function(e){var s=Object.values(a.assignee).filter(function(e){return e&&Object.keys(e).length>0}).map(function(s,n){var i=e.find(function(e){return e.name===s.name});return{name:s.name,checked:!!i&&i.checked,recipientsColor:(null==O?void 0:O[n])||C[n%C.length]}});return s.length>0?s:L})},[null==a?void 0:a.assignee,null==a?void 0:a.due_at]);var Qe=Object.values((null==a?void 0:a.assignee)||{}).filter(function(e){return null==e?void 0:e.name});return s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},_.styles.mrContainer),{width:"100%",minWidth:"850px"})},{children:[s.jsxs("div",e.__assign({style:_.styles.mrSectionBox},{children:[s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},_.styles.mrSectionHeader),{cursor:"pointer"}),onClick:function(){return Ie(function(e){return!e})}},{children:[s.jsxs("div",e.__assign({style:_.styles.mrSectionHeaderContent},{children:[s.jsxs("div",e.__assign({style:_.styles.mrSectionHeaderLeft},{children:[s.jsxs("div",e.__assign({style:_.styles.mrSectionTitleWrapper},{children:[s.jsx("div",e.__assign({style:_.styles.mrSectionTitleIcon},{children:s.jsx(i.Send,{style:_.styles.mrIconSmall})})),s.jsx("div",e.__assign({style:_.styles.mrSectionTitle},{children:N}))]})),s.jsx("div",e.__assign({style:_.styles.mrSectionDescription},{children:z}))]})),s.jsx("div",e.__assign({style:_.styles.mrSectionHeaderRight},{children:s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Ie(function(e){return!e})},style:_.styles.mrChevronButton},{children:s.jsx(i.ChevronDown,{style:e.__assign(e.__assign({},_.styles.mrChevronIcon),we?_.styles.mrChevronRotated:{})})}))}))]})),s.jsx(l.AnimatePresence,{children:Pe&&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:_.styles.mrSuccessMessage},{children:[s.jsx("div",e.__assign({style:_.styles.mrSuccessIcon},{children:s.jsx("div",e.__assign({style:_.styles.mrSuccessIconInner},{children:s.jsx(i.CircleCheckBigIcon,{style:_.styles.mrIconSuccess})}))})),s.jsxs("div",e.__assign({style:_.styles.mrSuccessText},{children:[s.jsx("div",e.__assign({style:_.styles.mrSuccessTitle},{children:Q})),s.jsx("div",e.__assign({style:_.styles.mrSuccessDescription},{children:$}))]}))]}))})]})),s.jsx(l.AnimatePresence,{children:we&&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({},_.styles.mrHiddenSection),{pointerEvents:we?"auto":"none"})},{children:[s.jsxs("div",e.__assign({style:_.styles.mrRecipientsSection},{children:[s.jsx("div",e.__assign({style:_.styles.mrRecipientsLabel},{children:G})),s.jsx("div",e.__assign({style:_.styles.mrRecipientsGrid},{children:He.map(function(n,i){var t,r,l,a,o=(null===(t=null==n?void 0:n.recipientsColor)||void 0===t?void 0:t.bg)||(null==n?void 0:n.bg)||(null===(r=C[i%C.length])||void 0===r?void 0:r.bg)||"#DBEAFE",d=(null===(l=null==n?void 0:n.recipientsColor)||void 0===l?void 0:l.text)||(null==n?void 0:n.text)||(null===(a=C[i%C.length])||void 0===a?void 0:a.text)||"#1E40AF";return s.jsxs("div",e.__assign({style:_.styles.mrRecipientItem},{children:[s.jsx(v.default,{checked:n.checked,onChange:function(){return s=n.name,void ze(function(n){return n.map(function(n){return n.name===s?e.__assign(e.__assign({},n),{checked:!n.checked}):n})});var s},onClick:function(e){return e.stopPropagation()},size:"small",disableRipple:!0,icon:s.jsx("div",{style:_.styles.mrCheckboxUnchecked}),checkedIcon:s.jsx("div",e.__assign({style:_.styles.mrCheckboxChecked},{children:s.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:_.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:_.styles.mrRecipientInfo},{children:[s.jsx("div",e.__assign({style:e.__assign(e.__assign({},_.styles.mrRecipientAvatar),{backgroundColor:o,color:d})},{children:Ke(n.name)})),s.jsx("div",e.__assign({style:_.styles.mrRecipientName},{children:n.name}))]}))]}),n.name)})}))]})),s.jsxs("div",e.__assign({style:_.styles.mrActionsSection},{children:[Ee&&s.jsxs("button",e.__assign({onClick:function(e){e.stopPropagation()},type:"button",style:e.__assign(e.__assign({},_.styles.mrActionButton),_.styles.mrActionButtonSecondary)},{children:[s.jsx(i.Mail,{style:_.styles.mrIconAction}),U]})),s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Le(!0),setTimeout(function(){return Le(!1)},3e3);var s=He.filter(function(e){return e.checked});ke(y,k.filter(function(e){return s.some(function(s){return s.id===e.id})}))},style:e.__assign(e.__assign({},_.styles.mrActionButton),_.styles.mrActionButtonPrimary)},{children:Z}))]}))]}))})]})),s.jsxs("div",e.__assign({style:_.styles.mrMainContent},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationContainer},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationHeaderWrapper,onClick:function(e){e.stopPropagation(),Te(function(e){return!e})}},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationHeader},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationTitleWrapper},{children:[s.jsx("div",e.__assign({style:_.styles.mrEscalationTitleText},{children:se})),s.jsx("div",e.__assign({style:_.styles.mrTooltipIcon},{children:s.jsx(i.InfoIcon,{stroke:"#64748B",style:_.styles.mrIconInfo})}))]})),s.jsxs("div",e.__assign({style:_.styles.mrEscalationActions},{children:[Ee&&s.jsxs("button",e.__assign({style:_.styles.mrEscalationPreviewButton},{children:[s.jsx("div",e.__assign({style:_.styles.mrEscalationPreviewIcon},{children:s.jsx(i.Mail,{style:_.styles.mrIconPreview})})),s.jsx("span",e.__assign({style:_.styles.mrEscalationPreviewText},{children:U}))]})),s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Te(function(e){return!e})},style:_.styles.mrChevronButton},{children:s.jsx(i.ChevronDown,{style:e.__assign(e.__assign({},_.styles.mrChevronIcon),Be?_.styles.mrChevronRotated:{})})}))]}))]})),s.jsx("div",e.__assign({style:_.styles.mrEscalationDescription},{children:ie}))]})),s.jsx(l.AnimatePresence,e.__assign({initial:!1},{children:Be&&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:k||[],onReorder:function(e){R(e)},layoutScroll:!0,style:_.styles.mrReorderGroup},{children:null==k?void 0:k.map(function(n,t){var u,y,m,x,f=Qe[t]||L[t],p=(null===(u=null==I?void 0:I[t])||void 0===u?void 0:u.bg)||"#FDF2FA",j=(null===(y=null==I?void 0:I[t])||void 0===y?void 0:y.text)||"#C11574",C=(null===(m=null==B?void 0:B[t])||void 0===m?void 0:m.bg)||"transparent",b=(null===(x=null==B?void 0:B[t])||void 0===x?void 0:x.text)||"inherit";return s.jsx(l.Reorder.Item,e.__assign({value:n,dragControls:We,layout:"position"},{children:s.jsxs("div",e.__assign({style:_.styles.mrReminderItem},{children:[s.jsx("div",e.__assign({style:_.styles.mrReminderLabelBox},{children:s.jsx("div",e.__assign({style:_.styles.mrReminderLabelInner},{children:s.jsx(r.Chip,{label:(null==S?void 0:S[t])||"Assignee ".concat(t+1),sx:{backgroundColor:p,minWidth:90,color:j,fontWeight:500}})}))})),s.jsxs("div",e.__assign({style:_.styles.mrReminderContent},{children:[s.jsx("div",e.__assign({style:_.styles.mrDragHandle},{children:s.jsx(g.default,{onPointerDown:function(e){return We.start(e)},sx:{color:"#9e9e9e"}})})),s.jsx(r.Box,e.__assign({display:"flex",alignItems:"center",gap:2,border:"1px solid #E5E7EB",sx:{background:"#fff"},style:_.styles.mrReminderBox},{children:s.jsxs("div",e.__assign({style:_.styles.mrReminderFields},{children:[s.jsxs("div",e.__assign({style:_.styles.mrReminderHeader},{children:[s.jsxs("div",e.__assign({style:_.styles.mrReminderAssignee},{children:[s.jsx("div",e.__assign({style:_.styles.mrReminderAvatar},{children:s.jsx("span",e.__assign({style:_.styles.mrReminderInitials},{children:Ke(null==f?void 0:f.name)}))})),s.jsx("span",e.__assign({style:_.styles.mrReminderName},{children:null==f?void 0:f.name}))]})),s.jsx("div",e.__assign({style:e.__assign(e.__assign({},_.styles.mrReminderStatement),{backgroundColor:C})},{children:s.jsx("span",e.__assign({style:e.__assign(e.__assign({},_.styles.mrReminderStatementText),{color:b})},{children:re(n)}))}))]})),s.jsxs("div",e.__assign({style:_.styles.mrReminderDateFields},{children:[s.jsxs("div",e.__assign({style:_.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:_.styles.mrReminderFieldLabel},{children:ae})),s.jsxs("div",e.__assign({style:_.styles.mrReminderDatePicker},{children:[s.jsx(o.LocalizationProvider,e.__assign({dateAdapter:d.AdapterDayjs},{children:s.jsx(o.DatePicker,{value:n.reminder_start_date?h.default(n.reminder_start_date):null,disablePast:!0,format:"MM/DD/YYYY",onChange:function(e){if(e&&h.default(e).isValid()){if(h.default(e).isBefore(h.default(),"day"))return;Ve(t,h.default(e).toISOString())}else Ve(t,"")},slotProps:{actionBar:{actions:["clear"]},textField:{fullWidth:!0,size:"small",sx:D,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(i.ArrowRight,{style:_.styles.mrIconArrow})]}))]})),s.jsxs("div",e.__assign({style:_.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:_.styles.mrReminderFieldLabel},{children:de})),s.jsx("div",e.__assign({style:_.styles.mrReminderDueDate},{children:(null==a?void 0:a.due_at)?h.default(a.due_at).format("MM/DD/YYYY"):""}))]})),s.jsxs("div",e.__assign({style:_.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:_.styles.mrReminderFieldLabel},{children:ue})),s.jsxs("div",e.__assign({style:_.styles.mrReminderFrequency},{children:[s.jsx("span",e.__assign({style:_.styles.mrReminderFrequencyText},{children:"Every"})),s.jsx(c.default,{value:n.reminder_frequency,onChange:function(e){return function(e,s){Ge(e,"reminder_frequency",s)}(t,e)},options:je,suffix:"hours"})]}))]}))]})),s.jsxs("div",e.__assign({style:_.styles.mrEscalationCheckbox},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationCheckboxHeader},{children:[s.jsx(v.default,{size:"small",disableRipple:!0,checked:n.is_escalation_reminder,onChange:function(e){return function(e,s){Ge(e,"is_escalation_reminder",s),s||(Ge(e,"days",{type:"preset",value:""}),Ge(e,"escalation_reminder_frequency",{type:"preset",value:""}),Ge(e,"before_or_after",""))}(t,e.target.checked)},icon:s.jsx("div",{style:_.styles.mrCheckboxUnchecked}),checkedIcon:s.jsx("div",e.__assign({style:_.styles.mrCheckboxChecked},{children:s.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:_.styles.mrCheckboxIcon},{children:s.jsx("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),_e,s.jsx("div",e.__assign({style:_.styles.mrTooltipIcon},{children:s.jsx(i.InfoIcon,{stroke:"#64748B",style:_.styles.mrIconInfo})}))]})),s.jsx(l.AnimatePresence,{children:n.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:_.styles.mrEscalationContent},{children:[s.jsx("div",e.__assign({style:_.styles.mrEscalationCondition},{children:ve})),s.jsxs("div",e.__assign({style:_.styles.mrEscalationFields},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationFieldGroup},{children:[s.jsx(c.default,{value:n.days,onChange:function(e){return function(e,s){Ge(e,"days",s)}(t,e)}}),s.jsx("div",e.__assign({style:_.styles.mrEscalationFieldText},{children:he}))]})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},_.styles.mrEscalationFieldGroup),_.styles.mrEscalationFieldGroupLarge)},{children:[s.jsx(r.Autocomplete,{size:"small",options:De,value:n.before_or_after,onChange:function(e,s){return function(e,s){Ge(e,"before_or_after",s)}(t,s||"")},popupIcon:s.jsx(i.ChevronDown,{style:_.styles.mrIconDropdown}),slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"12px",minHeight:"32px"}}},clearIndicator:{sx:{"& svg":{fontSize:12}}}},renderInput:function(n){return s.jsx(r.TextField,e.__assign({},n,{placeholder:"Select value",sx:D}))},sx:{width:"100%"}}),s.jsx("div",e.__assign({style:_.styles.mrEscalationFieldText},{children:fe}))]})),s.jsx("div",e.__assign({style:_.styles.mrEscalationFieldGroupSmall},{children:s.jsx(c.default,{value:n.escalation_reminder_frequency,onChange:function(e){return function(e,s){Ge(e,"escalation_reminder_frequency",s)}(t,e)},options:be,suffix:"hours"})}))]}))]}))})]}))]}))}))]}))]}))}),n.id||t)})}))}))}))]})),Be&&s.jsxs(l.motion.div,e.__assign({initial:{width:Oe?"345px":"43px"},animate:{width:Oe?"345px":"43px"},transition:{duration:.3},style:_.styles.mrCalendarPanel},{children:[Oe?s.jsx(u.default,{assignees:y}):s.jsx("div",e.__assign({style:_.styles.mrCalendarCollapsed},{children:s.jsx(i.CalendarIcon,{style:_.styles.mrIconCalendar})})),s.jsxs("button",e.__assign({onClick:function(){return Ye(function(e){return!e})},style:_.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"})})),Oe?s.jsx(i.ChevronRight,{style:_.styles.mrIconChevronToggle}):s.jsx(i.ChevronLeft,{style:_.styles.mrIconChevronToggle})]}))]}))]}))]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),n=require("react"),i=require("lucide-react"),t=require("@mui/material/Checkbox"),r=require("@mui/material"),l=require("framer-motion"),a=require("@mui/icons-material/DragIndicator"),o=require("@mui/x-date-pickers"),d=require("@mui/x-date-pickers/AdapterDayjs"),c=require("./components/ReminderFrequencyAutocomplete.js"),u=require("./components/AssigneeCalendarView.js"),y=require("dayjs"),_=require("./styles/ManageReminder.style.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=m(t),g=m(a),h=m(y),x=["Assignee 1","Assignee 2","Assignee 3"],f=[{bg:"#FDF2FA",text:"#C11574"},{bg:"#EEF4FF",text:"#3538CD"},{bg:"#F1F5F9",text:"#344054"}],p=[{bg:"#FDF2FA",text:"#C93185"},{bg:"#EEF2FF",text:"#6366F1"},{bg:"#FFF4E5",text:"#FF6058"}],j=[{id:"1",name:"Assignee 1",color:"#C11574",bg:"#FDF2F8",startDate:new Date("2026-11-09"),dueDate:new Date("2026-12-01")},{id:"2",name:"Assignee 2",color:"#3538CD",bg:"#EEF4FF",startDate:new Date("2026-11-21"),dueDate:new Date("2026-12-03")},{id:"3",name:"Assignee 3",color:"#FF6058",bg:"#FFF7ED",startDate:new Date("2026-12-01"),dueDate:new Date("2026-12-03")}],C=[{bg:"#DBEAFE",text:"#1E40AF"},{bg:"#CCFBF1",text:"#0D9488"},{bg:"#DCFCE7",text:"#166534"}],b=[{initials:"OR",name:"Olivia Rhye",checked:!1,bg:"#DBEAFE",text:"#1D4ED8"},{initials:"DM",name:"Daniela Mark",checked:!1,bg:"#CFFAFE",text:"#0F766E"},{initials:"JB",name:"Jenna Beckner",checked:!1,bg:"#D1FAE5",text:"#059669"}],F=function(e){var s,n,i,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===(n=null==e?void 0:e.days)||void 0===n?void 0:n.value)&&(null===(i=null==e?void 0:e.escalation_reminder_frequency)||void 0===i?void 0:i.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"},D={"& .MuiInputBase-root":{height:"28px",borderRadius:"4px",fontSize:"11px"}};exports.ManageReminders=function(t){var a=t.data,y=t.schedules,m=t.setSchedules,k=t.remainderOwners,R=t.setRemainderOwners,E=t.labels,S=void 0===E?x:E,w=t.colors,I=void 0===w?f:w,A=t.chipColor,B=void 0===A?p:A,T=t.assignees,q=void 0===T?j:T,P=t.fallbackRecipients,L=void 0===P?b:P,M=t.recipientsColor,O=void 0===M?C:M,Y=t.manualReminderTitle,N=void 0===Y?"Send Manual Reminder Now":Y,H=t.manualReminderDescription,z=void 0===H?"Immediately notify the assignees about this document.":H;t.lastReminderText;var W=t.selectRecipientsLabel,G=void 0===W?"Select recipients:":W,V=t.previewEmailButtonLabel,U=void 0===V?"Preview Email":V,J=t.sendNowButtonLabel,Z=void 0===J?"Send Now":J,K=t.reminderSuccessTitle,Q=void 0===K?"Reminder sent successfully!":K,X=t.reminderSuccessDescription,$=void 0===X?"Email notification sent to assignees.":X,ee=t.escalationTitle,se=void 0===ee?"Escalation and Auto Reminder Setup":ee;t.escalationTitleTooltip;var ne=t.escalationDescription,ie=void 0===ne?"Configure Auto reminder settings for all assignees.":ne;t.configureAutoReminderText;var te=t.getDynamicStatement,re=void 0===te?F:te,le=t.reminderStartDateLabel,ae=void 0===le?"Reminder Start Date":le,oe=t.documentDueDateLabel,de=void 0===oe?"Document Due Date":oe,ce=t.reminderFrequencyLabel,ue=void 0===ce?"Reminder Frequency":ce,ye=t.escalationRemindersLabel,_e=void 0===ye?"Escalation Reminders":ye;t.escalationTooltip;var me=t.escalationConditionText,ve=void 0===me?"If the document is still pending, start escalation reminders":me,ge=t.daysText,he=void 0===ge?"days":ge,xe=t.dueDataAndRepeatText,fe=void 0===xe?"due date and repeat every":xe,pe=t.reminderFrequencyOptions,je=void 0===pe?["12 hours","24 hours","48 hours","72 hours","Custom"]:pe,Ce=t.escalationFrequencyOptions,be=void 0===Ce?["1/2 hour","1 hour","4 hours","6 hours","12 hours","Custom"]:Ce,Fe=t.beforeAfterOptions,De=void 0===Fe?["After","Before"]:Fe,ke=t.handelSendNow,Re=t.showPreviewEmail,Ee=void 0===Re||Re,Se=n.useState(!1),we=Se[0],Ie=Se[1],Ae=n.useState(!1),Be=Ae[0],Te=Ae[1],qe=n.useState(!1),Pe=qe[0],Le=qe[1],Me=n.useState(!0),Oe=Me[0],Ye=Me[1],Ne=n.useState(L),He=Ne[0],ze=Ne[1],We=l.useDragControls(),Ge=function(s,n,i){R(function(t){return t.map(function(t,r){var l;return r===s?e.__assign(e.__assign({},t),((l={})[n]=i,l)):t})})},Ve=function(e,s){Ge(e,"reminder_start_date",s)},Ue=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},Je=function(e,s,n){if(!e||!n)return[];var i=Ue(n);if(!i||i<=0)return[];for(var t=[],r=h.default(e).valueOf(),l=s?h.default(s).valueOf():h.default(e).add(45,"day").valueOf(),a=0;r<=l&&a<150;)t.push(h.default(r).toISOString()),r+=i,a++;return t},Ze=function(e,s,n,i){if(!(e&&s&&i&&n))return[];var t=Ue(i);if(!t)return[];var r,l=h.default(e),a="custom"===s.type?Number(s.value):Number("1/2"===s.value.split(" ")[0]?.5:Number(s.value.split(" ")[0])),o=[];switch(n){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(h.default(d).toISOString()),d+=t;return o},Ke=function(e){return e?e.split(" ").map(function(e){return e[0]}).join("").toUpperCase():""};n.useEffect(function(){var e=(null==a?void 0:a.due_at)||"",s=Object.values((null==a?void 0:a.assignee)||{}),n=null==k?void 0:k.map(function(n,i){var t,r=s[i]||q.find(function(e){return e.id===String(n.id)}),l=(null===(t=null==I?void 0:I[i%I.length])||void 0===t?void 0:t.text)||"#C11574";return{ownerId:n.id||i+1,ownerName:(null==r?void 0:r.name)||n.name,ownerColor:(null==r?void 0:r.color)||l,reminders:Je(n.reminder_start_date,e,n.reminder_frequency),escalations:Ze(e,n.days,n.before_or_after,n.escalation_reminder_frequency)}});m(n)},[k,null==a?void 0:a.due_at,null==a?void 0:a.assignee]),n.useEffect(function(){(null==a?void 0:a.assignee)&&ze(function(e){var s=Object.values(a.assignee).filter(function(e){return e&&Object.keys(e).length>0}).map(function(s,n){var i=e.find(function(e){return e.name===s.name});return{name:s.name,checked:!!i&&i.checked,recipientsColor:(null==O?void 0:O[n])||C[n%C.length]}});return s.length>0?s:L})},[null==a?void 0:a.assignee,null==a?void 0:a.due_at]);var Qe=Object.values((null==a?void 0:a.assignee)||{}).filter(function(e){return null==e?void 0:e.name});return s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},_.styles.mrContainer),{width:"100%",minWidth:"850px"})},{children:[s.jsxs("div",e.__assign({style:_.styles.mrSectionBox},{children:[s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},_.styles.mrSectionHeader),{cursor:"pointer"}),onClick:function(){return Ie(function(e){return!e})}},{children:[s.jsxs("div",e.__assign({style:_.styles.mrSectionHeaderContent},{children:[s.jsxs("div",e.__assign({style:_.styles.mrSectionHeaderLeft},{children:[s.jsxs("div",e.__assign({style:_.styles.mrSectionTitleWrapper},{children:[s.jsx("div",e.__assign({style:_.styles.mrSectionTitleIcon},{children:s.jsx(i.Send,{style:_.styles.mrIconSmall})})),s.jsx("div",e.__assign({style:_.styles.mrSectionTitle},{children:N}))]})),s.jsx("div",e.__assign({style:_.styles.mrSectionDescription},{children:z}))]})),s.jsx("div",e.__assign({style:_.styles.mrSectionHeaderRight},{children:s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Ie(function(e){return!e})},style:_.styles.mrChevronButton},{children:s.jsx(i.ChevronDown,{style:e.__assign(e.__assign({},_.styles.mrChevronIcon),we?_.styles.mrChevronRotated:{})})}))}))]})),s.jsx(l.AnimatePresence,{children:Pe&&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:_.styles.mrSuccessMessage},{children:[s.jsx("div",e.__assign({style:_.styles.mrSuccessIcon},{children:s.jsx("div",e.__assign({style:_.styles.mrSuccessIconInner},{children:s.jsx(i.CircleCheckBigIcon,{style:_.styles.mrIconSuccess})}))})),s.jsxs("div",e.__assign({style:_.styles.mrSuccessText},{children:[s.jsx("div",e.__assign({style:_.styles.mrSuccessTitle},{children:Q})),s.jsx("div",e.__assign({style:_.styles.mrSuccessDescription},{children:$}))]}))]}))})]})),s.jsx(l.AnimatePresence,{children:we&&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({},_.styles.mrHiddenSection),{pointerEvents:we?"auto":"none"})},{children:[s.jsxs("div",e.__assign({style:_.styles.mrRecipientsSection},{children:[s.jsx("div",e.__assign({style:_.styles.mrRecipientsLabel},{children:G})),s.jsx("div",e.__assign({style:_.styles.mrRecipientsGrid},{children:He.map(function(n,i){var t,r,l,a,o=(null===(t=null==n?void 0:n.recipientsColor)||void 0===t?void 0:t.bg)||(null==n?void 0:n.bg)||(null===(r=C[i%C.length])||void 0===r?void 0:r.bg)||"#DBEAFE",d=(null===(l=null==n?void 0:n.recipientsColor)||void 0===l?void 0:l.text)||(null==n?void 0:n.text)||(null===(a=C[i%C.length])||void 0===a?void 0:a.text)||"#1E40AF";return s.jsxs("div",e.__assign({style:_.styles.mrRecipientItem},{children:[s.jsx(v.default,{checked:n.checked,onChange:function(){return s=n.name,void ze(function(n){return n.map(function(n){return n.name===s?e.__assign(e.__assign({},n),{checked:!n.checked}):n})});var s},onClick:function(e){return e.stopPropagation()},size:"small",disableRipple:!0,icon:s.jsx("div",{style:_.styles.mrCheckboxUnchecked}),checkedIcon:s.jsx("div",e.__assign({style:_.styles.mrCheckboxChecked},{children:s.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:_.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:_.styles.mrRecipientInfo},{children:[s.jsx("div",e.__assign({style:e.__assign(e.__assign({},_.styles.mrRecipientAvatar),{backgroundColor:o,color:d})},{children:Ke(n.name)})),s.jsx("div",e.__assign({style:_.styles.mrRecipientName},{children:n.name}))]}))]}),n.name)})}))]})),s.jsxs("div",e.__assign({style:_.styles.mrActionsSection},{children:[Ee&&s.jsxs("button",e.__assign({onClick:function(e){e.stopPropagation()},type:"button",style:e.__assign(e.__assign({},_.styles.mrActionButton),_.styles.mrActionButtonSecondary)},{children:[s.jsx(i.Mail,{style:_.styles.mrIconAction}),U]})),s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Le(!0),setTimeout(function(){return Le(!1)},3e3);var s=He.filter(function(e){return e.checked});ke(y,k.filter(function(e){return s.some(function(s){return s.id===e.id})}))},style:e.__assign(e.__assign({},_.styles.mrActionButton),_.styles.mrActionButtonPrimary)},{children:Z}))]}))]}))})]})),s.jsxs("div",e.__assign({style:_.styles.mrMainContent},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationContainer},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationHeaderWrapper,onClick:function(e){e.stopPropagation(),Te(function(e){return!e})}},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationHeader},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationTitleWrapper},{children:[s.jsx("div",e.__assign({style:_.styles.mrEscalationTitleText},{children:se})),s.jsx("div",e.__assign({style:_.styles.mrTooltipIcon},{children:s.jsx(i.InfoIcon,{stroke:"#64748B",style:_.styles.mrIconInfo})}))]})),s.jsxs("div",e.__assign({style:_.styles.mrEscalationActions},{children:[Ee&&s.jsxs("button",e.__assign({style:_.styles.mrEscalationPreviewButton},{children:[s.jsx("div",e.__assign({style:_.styles.mrEscalationPreviewIcon},{children:s.jsx(i.Mail,{style:_.styles.mrIconPreview})})),s.jsx("span",e.__assign({style:_.styles.mrEscalationPreviewText},{children:U}))]})),s.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Te(function(e){return!e})},style:_.styles.mrChevronButton},{children:s.jsx(i.ChevronDown,{style:e.__assign(e.__assign({},_.styles.mrChevronIcon),Be?_.styles.mrChevronRotated:{})})}))]}))]})),s.jsx("div",e.__assign({style:_.styles.mrEscalationDescription},{children:ie}))]})),s.jsx(l.AnimatePresence,e.__assign({initial:!1},{children:Be&&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:k||[],onReorder:function(e){R(e)},layoutScroll:!0,style:_.styles.mrReorderGroup},{children:null==k?void 0:k.map(function(n,t){var u,y,m,x,f=Qe[t]||L[t],p=(null===(u=null==I?void 0:I[t])||void 0===u?void 0:u.bg)||"#FDF2FA",j=(null===(y=null==I?void 0:I[t])||void 0===y?void 0:y.text)||"#C11574",C=(null===(m=null==B?void 0:B[t])||void 0===m?void 0:m.bg)||"transparent",b=(null===(x=null==B?void 0:B[t])||void 0===x?void 0:x.text)||"inherit";return s.jsx(l.Reorder.Item,e.__assign({value:n,dragControls:We,layout:"position"},{children:s.jsxs("div",e.__assign({style:_.styles.mrReminderItem},{children:[s.jsx("div",e.__assign({style:_.styles.mrReminderLabelBox},{children:s.jsx("div",e.__assign({style:_.styles.mrReminderLabelInner},{children:s.jsx(r.Chip,{label:(null==S?void 0:S[t])||"Assignee ".concat(t+1),sx:{backgroundColor:p,minWidth:90,color:j,fontWeight:500}})}))})),s.jsxs("div",e.__assign({style:_.styles.mrReminderContent},{children:[s.jsx("div",e.__assign({style:_.styles.mrDragHandle},{children:s.jsx(g.default,{onPointerDown:function(e){return We.start(e)},sx:{color:"#9e9e9e"}})})),s.jsx(r.Box,e.__assign({display:"flex",alignItems:"center",gap:2,border:"1px solid #E5E7EB",sx:{background:"#fff"},style:_.styles.mrReminderBox},{children:s.jsxs("div",e.__assign({style:_.styles.mrReminderFields},{children:[s.jsxs("div",e.__assign({style:_.styles.mrReminderHeader},{children:[s.jsxs("div",e.__assign({style:_.styles.mrReminderAssignee},{children:[s.jsx("div",e.__assign({style:_.styles.mrReminderAvatar},{children:s.jsx("span",e.__assign({style:_.styles.mrReminderInitials},{children:Ke(null==f?void 0:f.name)}))})),s.jsx("span",e.__assign({style:_.styles.mrReminderName},{children:null==f?void 0:f.name}))]})),s.jsx("div",e.__assign({style:e.__assign(e.__assign({},_.styles.mrReminderStatement),{backgroundColor:C})},{children:s.jsx("span",e.__assign({style:e.__assign(e.__assign({},_.styles.mrReminderStatementText),{color:b})},{children:re(n)}))}))]})),s.jsxs("div",e.__assign({style:_.styles.mrReminderDateFields},{children:[s.jsxs("div",e.__assign({style:_.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:_.styles.mrReminderFieldLabel},{children:ae})),s.jsxs("div",e.__assign({style:_.styles.mrReminderDatePicker},{children:[s.jsx(o.LocalizationProvider,e.__assign({dateAdapter:d.AdapterDayjs},{children:s.jsx(o.DatePicker,{value:n.reminder_start_date?h.default(n.reminder_start_date):null,disablePast:!0,format:"MM/DD/YYYY",onChange:function(e){if(e&&h.default(e).isValid()){if(h.default(e).isBefore(h.default(),"day"))return;Ve(t,h.default(e).toISOString())}else Ve(t,"")},slotProps:{actionBar:{actions:["clear"]},textField:{fullWidth:!0,size:"small",sx:D,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(i.ArrowRight,{style:_.styles.mrIconArrow})]}))]})),s.jsxs("div",e.__assign({style:_.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:_.styles.mrReminderFieldLabel},{children:de})),s.jsx("div",e.__assign({style:_.styles.mrReminderDueDate},{children:(null==a?void 0:a.due_at)?h.default(a.due_at).format("MM/DD/YYYY"):""}))]})),s.jsxs("div",e.__assign({style:_.styles.mrReminderField},{children:[s.jsx("p",e.__assign({style:_.styles.mrReminderFieldLabel},{children:ue})),s.jsxs("div",e.__assign({style:_.styles.mrReminderFrequency},{children:[s.jsx("span",e.__assign({style:_.styles.mrReminderFrequencyText},{children:"Every"})),s.jsx(c.default,{value:n.reminder_frequency,onChange:function(e){return function(e,s){Ge(e,"reminder_frequency",s)}(t,e)},options:je,suffix:"hours"})]}))]}))]})),s.jsxs("div",e.__assign({style:_.styles.mrEscalationCheckbox},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationCheckboxHeader},{children:[s.jsx(v.default,{size:"small",disableRipple:!0,checked:n.is_escalation_reminder,onChange:function(e){return function(e,s){Ge(e,"is_escalation_reminder",s),s||(Ge(e,"days",{type:"preset",value:""}),Ge(e,"escalation_reminder_frequency",{type:"preset",value:""}),Ge(e,"before_or_after",""))}(t,e.target.checked)},icon:s.jsx("div",{style:_.styles.mrCheckboxUnchecked}),checkedIcon:s.jsx("div",e.__assign({style:_.styles.mrCheckboxChecked},{children:s.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:_.styles.mrCheckboxIcon},{children:s.jsx("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),_e,s.jsx("div",e.__assign({style:_.styles.mrTooltipIcon},{children:s.jsx(i.InfoIcon,{stroke:"#64748B",style:_.styles.mrIconInfo})}))]})),s.jsx(l.AnimatePresence,{children:n.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:_.styles.mrEscalationContent},{children:[s.jsx("div",e.__assign({style:_.styles.mrEscalationCondition},{children:ve})),s.jsxs("div",e.__assign({style:_.styles.mrEscalationFields},{children:[s.jsxs("div",e.__assign({style:_.styles.mrEscalationFieldGroup},{children:[s.jsx(c.default,{value:n.days,onChange:function(e){return function(e,s){Ge(e,"days",s)}(t,e)}}),s.jsx("div",e.__assign({style:_.styles.mrEscalationFieldText},{children:he}))]})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},_.styles.mrEscalationFieldGroup),_.styles.mrEscalationFieldGroupLarge)},{children:[s.jsx(r.Autocomplete,{size:"small",options:De,value:n.before_or_after,onChange:function(e,s){return function(e,s){Ge(e,"before_or_after",s)}(t,s||"")},popupIcon:s.jsx(i.ChevronDown,{style:_.styles.mrIconDropdown}),slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"12px",minHeight:"32px"}}},clearIndicator:{sx:{"& svg":{fontSize:12}}}},renderInput:function(n){return s.jsx(r.TextField,e.__assign({},n,{placeholder:"Select value",sx:D}))},sx:{width:"100%"}}),s.jsx("div",e.__assign({style:_.styles.mrEscalationFieldText},{children:fe}))]})),s.jsx("div",e.__assign({style:_.styles.mrEscalationFieldGroupSmall},{children:s.jsx(c.default,{value:n.escalation_reminder_frequency,onChange:function(e){return function(e,s){Ge(e,"escalation_reminder_frequency",s)}(t,e)},options:be,suffix:"hours"})}))]}))]}))})]}))]}))}))]}))]}))}),n.id||t)})}))}))}))]})),Be&&s.jsxs(l.motion.div,e.__assign({initial:{width:Oe?"345px":"43px"},animate:{width:Oe?"345px":"43px"},transition:{duration:.3},style:_.styles.mrCalendarPanel},{children:[Oe?s.jsx(u.default,{assignees:y}):s.jsx("div",e.__assign({style:_.styles.mrCalendarCollapsed},{children:s.jsx(i.CalendarIcon,{style:_.styles.mrIconCalendar})})),s.jsxs("button",e.__assign({onClick:function(){return Ye(function(e){return!e})},style:_.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"})})),Oe?s.jsx(i.ChevronRight,{style:_.styles.mrIconChevronToggle}):s.jsx(i.ChevronLeft,{style:_.styles.mrIconChevronToggle})]}))]}))]}))]}))};
|
|
2
2
|
//# sourceMappingURL=ManageReminders.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),t=require("react"),i=require("lucide-react"),r=require("./CustomCheckbox.js"),o={overlay:{position:"absolute",inset:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(17, 24, 39, 0.45)",backdropFilter:"blur(3px)",WebkitBackdropFilter:"blur(3px)",borderRadius:"inherit"},popup:{position:"relative",background:"#ffffff",border:"0.5px solid #E5E7EB",borderRadius:"16px",padding:"20px",width:"380px",boxShadow:"0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.07)",display:"flex",flexDirection:"column",gap:"16px"},topRow:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"12px"},userInfo:{display:"flex",flexDirection:"column",gap:"2px"},userName:{fontSize:"15px",fontWeight:600,color:"#111827"},userEmail:{fontSize:"13px",color:"#6B7280"},levelBadge:{display:"flex",alignItems:"center",gap:"5px",background:"#EDE9FE",border:"1px solid #C4B5FD",borderRadius:"8px",padding:"4px 10px",fontSize:"12px",fontWeight:500,color:"#5B21B6",whiteSpace:"nowrap",flexShrink:0},divider:{border:"none",borderTop:"0.5px solid #E5E7EB"},label:{fontSize:"12px",fontWeight:500,color:"#6B7280",marginBottom:"6px",display:"flex",alignItems:"center",gap:"5px"},optionalTag:{fontSize:"11px",fontWeight:400,color:"#9CA3AF",background:"#F9FAFB",border:"0.5px solid #E5E7EB",borderRadius:"20px",padding:"1px 7px"},textarea:{width:"100%",minHeight:"70px",resize:"vertical",fontSize:"13px",fontFamily:"inherit",color:"#111827",background:"#F9FAFB",border:"0.5px solid #E5E7EB",borderRadius:"8px",padding:"10px 12px",lineHeight:1.6,outline:"none",boxSizing:"border-box"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",marginTop:"2px"},btnBack:{padding:"10px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"transparent",color:"#6B7280",border:"0.5px solid #D1D5DB",fontWeight:500,whiteSpace:"nowrap"},btnLater:{padding:"8px 14px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"#F3F4F6",color:"#374151",border:"0.5px solid #D1D5DB",fontWeight:500,whiteSpace:"nowrap"},btnNow:{padding:"8px 16px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"#5B4FE9",color:"#fff",border:"none",fontWeight:500,whiteSpace:"nowrap"}};exports.AddUserPopup=function(s){var a,l,d=s.user,p=s.accessLevel,x=s.wrapperEl,c=s.onBackToEditing,u=s.onSendLater,f=s.onSendNow,g=s.userLevel,b=t.useState(null!==(a=d.notes)&&void 0!==a?a:""),h=b[0],y=b[1],_=t.useRef(null);t.useEffect(function(){if(x){var e=x.style.position;return e&&"static"!==e||(x.style.position="relative"),function(){x.style.position=e}}},[x]),t.useEffect(function(){var e=function(e){"Escape"===e.key&&c()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[c]);var v=e.__assign(e.__assign({},o.overlay),x?{}:{position:"fixed"}),j=t.useState(null!==(l=d.sendMailNow)&&void 0!==l&&l),m=j[0],w=j[1];return n.jsx("div",e.__assign({style:v,onMouseDown:function(e){e.target===e.currentTarget&&c()}},{children:n.jsxs("div",e.__assign({ref:_,style:o.popup,role:"dialog","aria-modal":"true","aria-label":"Add notes for ".concat(d.name)},{children:[n.jsxs("div",e.__assign({style:o.topRow},{children:[n.jsxs("div",e.__assign({style:o.userInfo},{children:[n.jsxs("span",e.__assign({style:{fontWeight:600}},{children:["Add a note for ",d.email]})),n.jsxs("span",e.__assign({style:e.__assign(e.__assign({},o.userEmail),{alignItems:"center",gap:6,display:"flex"})},{children:[" ",n.jsxs("span",{children:[g.head," - ",g.title," "]})," ",n.jsx("span",e.__assign({style:{fontSize:20}},{children:" • "}))," ",n.jsxs("span",{children:[" ",p," "]})]})),p&&n.jsx("span",{style:e.__assign({},o.userEmail)})]})),n.jsx("button",e.__assign({style:o.btnBack,onClick:c,title:"Discard notes and go back"},{children:n.jsx(i.X,{width:14,height:14})}))]})),n.jsx("div",{children:n.jsx("textarea",{style:o.textarea,placeholder:"Write a note, e.g. context on why this clause needs review",value:h,onChange:function(e){return y(e.target.value)},autoFocus:!0})}),n.jsxs("div",e.__assign({style:{display:"flex",gap:12,fontSize:14}},{children:[n.jsxs("span",e.__assign({style:{alignItems:"center",display:"flex",justifyContent:"center",gap:6}},{children:[n.jsx(r.default,{getter:!0===m,setter:function(){return w(!0)},size:14}),n.jsx("span",{children:"Notify now"})]})),n.jsxs("span",e.__assign({style:{alignItems:"center",display:"flex",justifyContent:"center",gap:6}},{children:[n.jsx(r.default,{getter:!1===m,setter:function(){return w(!1)},size:14}),n.jsx("span",{children:"Notify when ready for review"})]}))]})),n.jsx("div",e.__assign({style:o.footer},{children:n.jsx("button",e.__assign({style:o.btnNow,onClick:function(){return m?f(h):u(h)},title:"Save notes and notify now"},{children:"Save Note"}))}))]}))}))};
|
|
2
2
|
//# sourceMappingURL=AddUserPopup.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),i=require("../styles/AssignLevelsDatePickerStyles.js");exports.default=function(l){var n=l.value,s=l.onSet,a=l.maxDate,u=r.useRef(null);return t.jsxs("div",e.__assign({style:i.DATE_PICKER_STYLES.wrapper,onClick:function(){var e,t;return null===(t=null===(e=u.current)||void 0===e?void 0:e.showPicker)||void 0===t?void 0:t.call(e)}},{children:[t.jsx("span",e.__assign({style:i.DATE_PICKER_STYLES.placeholder},{children:n?n.toLocaleDateString("en-GB"):"--/--/----"})),t.jsx("input",{ref:u,type:"date",max:a?a.toISOString().split("T")[0]:void 0,style:i.DATE_PICKER_STYLES.input,value:n?n.toISOString().split("T")[0]:"",onChange:function(e){var t=e.target.value;s(t?new Date(t):null)}})]}))};
|
|
2
2
|
//# sourceMappingURL=AssignLevelsDatePicker.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),i=require("lucide-react");exports.default=function(n){var a=n.value,l=n.onChange,o=n.placeholder,s=void 0===o?"dd/mm/yyyy":o,u=r.useRef(null);return t.jsxs("div",e.__assign({onClick:function(){var e,t;null===(t=null===(e=u.current)||void 0===e?void 0:e.showPicker)||void 0===t||t.call(e)},style:{position:"relative",width:"100%",height:"35px",padding:"0 12px",borderRadius:"12px",background:"#F3F4F6",border:"1px solid #C7CDD5",display:"flex",gap:60,alignItems:"center",cursor:"pointer",boxSizing:"border-box"}},{children:[t.jsx("input",{ref:u,type:"date",value:a,onChange:function(e){return l(e.target.value?new Date(e.target.value):null)},style:{position:"absolute",opacity:0,pointerEvents:"none"}}),t.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:400,color:a?"#111827":"#667085"}},{children:a?new Date(a).toLocaleDateString("en-GB"):s})),t.jsx("div",e.__assign({style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:"6px"}},{children:t.jsx(i.Calendar,{size:18,color:"#667085",strokeWidth:2})}))]}))};
|
|
2
2
|
//# sourceMappingURL=CustomDatePicker.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),r=require("lucide-react"),t=require("react");exports.default=function(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),r=require("lucide-react"),t=require("react");exports.default=function(s){var i=s.value,o=s.options,a=s.onChange,l=t.useState(!1),u=l[0],c=l[1],d=t.useRef(null),p=o.find(function(e){return e.label===i})||o[0];return t.useEffect(function(){function e(e){d.current&&!d.current.contains(e.target)&&c(!1)}return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]),n.jsxs("div",e.__assign({ref:d,style:{position:"relative",backgroundColor:"#FFFFFF",borderRadius:"5px"}},{children:[n.jsxs("div",e.__assign({onClick:function(){return c(!u)},style:{display:"flex",alignItems:"center",gap:"6px",cursor:"pointer",background:"transparent",padding:"2px 4px",userSelect:"none"}},{children:[p.icon&&n.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:p.icon})),n.jsx("span",e.__assign({style:{fontSize:"14px"}},{children:p.label})),n.jsx(r.ChevronDown,{size:14,style:{flexShrink:0}})]})),u&&n.jsx("div",e.__assign({style:{position:"absolute",top:"100%",left:0,marginTop:"4px",background:"white",border:"1px solid #CBD5E1",borderRadius:"6px",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1)",zIndex:50,minWidth:"140px",overflow:"hidden"}},{children:o.map(function(r,t){return n.jsxs("div",e.__assign({onClick:function(){a(r.label),c(!1)},style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",cursor:"pointer",fontSize:"14px",backgroundColor:i===r.label?"#F1F5F9":"transparent"},onMouseEnter:function(e){return e.currentTarget.style.backgroundColor="#F8FAFC"},onMouseLeave:function(e){return e.currentTarget.style.backgroundColor=i===r.label?"#F1F5F9":"transparent"}},{children:[r.icon&&n.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:r.icon})),n.jsx("span",{children:r.label})]}),t)})}))]}))};
|
|
2
2
|
//# sourceMappingURL=CustomDropdown.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),i=require("react"),s=require("./CustomDropdown.js"),r=require("./AddUserPopup.js");exports.default=function(t){var o,a,l,d,u,c=this,p=t.assignees,g=t.onAssigneeChange,_=t.accessLevelOptions,v=t.fetchUsers,x=t.wrapperEl,f=t.levelDetails,h=i.useState(""),m=h[0],C=h[1],b=i.useState([]),y=b[0],j=b[1],w=i.useState(null),k=w[0],L=w[1];return i.useEffect(function(){if(m.trim()){var n=setTimeout(function(){return e.__awaiter(c,void 0,void 0,function(){var n,i,s;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,v(m)];case 1:return n=e.sent(),i=new Set(p.map(function(e){return e.id})),j(n.filter(function(e){return!i.has(e.id)})),[3,3];case 2:return s=e.sent(),console.error("[LevelData]: fetchUser error:",s),j([]),[3,3];case 3:return[2]}})})},300);return function(){return clearTimeout(n)}}j([])},[m,p]),n.jsxs("div",e.__assign({style:{borderTop:"1px solid #CBD5E1",padding:"20px"}},{children:[n.jsx("span",e.__assign({style:{fontWeight:600,marginBottom:"8px",fontSize:"14px"}},{children:"Assignee Emails"})),n.jsxs("div",e.__assign({style:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"8px",marginTop:"10px",display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"}},{children:[p.map(function(i){var r,t,o,a=!!i.notes&&"string"==typeof i.notes&&!!i.notes.trim();return n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px",background:"#E9D5FF",borderRadius:"10px",padding:"2px 8px",fontSize:"12px"}},{children:[n.jsx("span",e.__assign({style:{padding:"4px"}},{children:i.name})),n.jsx(s.default,{value:null!==(o=null!==(r=i.accessLevel)&&void 0!==r?r:null===(t=_[0])||void 0===t?void 0:t.label)&&void 0!==o?o:"",options:_,onChange:function(n){return s=i.id,r=n,void g(p.map(function(n){return n.id===s?e.__assign(e.__assign({},n),{accessLevel:r}):n}));var s,r}}),n.jsx("div",e.__assign({style:{position:"relative",display:"inline-flex",backgroundColor:"white",borderRadius:"3px",padding:1}},{children:n.jsx("button",e.__assign({type:"button",onClick:function(){return function(n){L(e.__assign({},n))}(i)},style:{border:"none",background:"transparent",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center",color:a?"#7C3AED":"#C4B5FD"}},{children:n.jsx("svg",e.__assign({width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n.jsx("path",{d:"M3.03353 3.90755H5.9502M3.03353 5.94922H7.7002M4.59905 9.44922H8.4002C9.38029 9.44922 9.87033 9.44922 10.2447 9.25848C10.574 9.0907 10.8417 8.82299 11.0095 8.4937C11.2002 8.11936 11.2002 7.62931 11.2002 6.64922V3.49922C11.2002 2.51913 11.2002 2.02908 11.0095 1.65474C10.8417 1.32545 10.574 1.05774 10.2447 0.889957C9.87033 0.699219 9.38029 0.699219 8.4002 0.699219H3.5002C2.5201 0.699219 2.03006 0.699219 1.65571 0.889957C1.32643 1.05774 1.05871 1.32545 0.890934 1.65474C0.700195 2.02908 0.700195 2.51913 0.700195 3.49922V10.8116C0.700195 11.1224 0.700195 11.2778 0.763912 11.3577C0.819325 11.4271 0.903352 11.4675 0.992177 11.4674C1.09431 11.4673 1.21567 11.3702 1.45839 11.176L2.8499 10.0628C3.13416 9.83538 3.27629 9.72167 3.43456 9.64082C3.57498 9.56908 3.72444 9.51665 3.8789 9.48495C4.053 9.44922 4.23502 9.44922 4.59905 9.44922Z",stroke:"#98A2B3","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})}))}))})),n.jsx("button",e.__assign({style:{border:"none",background:"transparent",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center",fontSize:"12px"},onClick:function(){return e=i.id,g(p.filter(function(n){return n.id!==e})),void((null==k?void 0:k.id)===e&&L(null));var e},"aria-label":"Remove ".concat(i.name)},{children:"✕"}))]}),i.id)}),n.jsx("input",{type:"text",value:m,placeholder:"Search users...",onChange:function(e){return C(e.target.value)},style:{border:"none",outline:"none",flex:1,minWidth:"150px",fontSize:"12px"}})]})),y.length>0&&n.jsx("div",e.__assign({style:{border:"1px solid #CBD5E1",borderRadius:"8px",marginTop:"8px"}},{children:y.map(function(i){return n.jsxs("div",e.__assign({style:{padding:"8px",cursor:"pointer"},onClick:function(){return function(n){var i,s,r,t;p.some(function(e){return e.id===n.id})||(g(e.__spreadArray(e.__spreadArray([],p,!0),[e.__assign(e.__assign({},n),{accessLevel:null!==(s=null===(i=_[0])||void 0===i?void 0:i.label)&&void 0!==s?s:"",notes:"",sendMailNow:!1})],!1)),C(""),j([]),L(e.__assign(e.__assign({},n),{accessLevel:null!==(t=null===(r=_[0])||void 0===r?void 0:r.label)&&void 0!==t?t:""})))}(i)}},{children:[i.name,i.email&&n.jsx("span",e.__assign({style:{marginLeft:"8px",color:"#6B7280",fontSize:"11px"}},{children:i.email}))]}),i.id)})})),k&&n.jsx(r.AddUserPopup,{user:k,userLevel:{head:null!==(o=null==f?void 0:f.head)&&void 0!==o?o:"",title:null!==(a=null==f?void 0:f.title)&&void 0!==a?a:""},accessLevel:null!==(u=null!==(l=k.accessLevel)&&void 0!==l?l:null===(d=_[0])||void 0===d?void 0:d.label)&&void 0!==u?u:"",wrapperEl:x,onBackToEditing:function(){k&&(g(p.map(function(n){return n.id===k.id?e.__assign(e.__assign({},n),{notes:"",sendMailNow:!1}):n})),L(null))},onSendLater:function(n){k&&(g(p.map(function(i){return i.id===k.id?e.__assign(e.__assign({},i),{notes:n,sendMailNow:!1}):i})),L(null))},onSendNow:function(n){k&&(g(p.map(function(i){return i.id===k.id?e.__assign(e.__assign({},i),{notes:n,sendMailNow:!0}):i})),L(null))}})]}))};
|
|
2
2
|
//# sourceMappingURL=LevelData.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../_virtual/_tslib.js";import{jsxs as n,jsx as t,Fragment as o}from"react/jsx-runtime";import{useMemo as i,useState as r,useEffect as l}from"react";import{Check as a,Edit2 as s,ChevronDown as d}from"lucide-react";import{getRandomColorPair as p}from"./utils/generateRandomColorsPair.js";import
|
|
1
|
+
import{__assign as e}from"../../_virtual/_tslib.js";import{jsxs as n,jsx as t,Fragment as o}from"react/jsx-runtime";import{useMemo as i,useState as r,useEffect as l}from"react";import{Check as a,Edit2 as s,ChevronDown as d}from"lucide-react";import{getRandomColorPair as p}from"./utils/generateRandomColorsPair.js";import c from"./assets/VerticalLine.js";import u from"./components/AssignLevelsDatePicker.js";import g from"./components/LevelData.js";function f(f){var h,x,y,m,b=f.level,v=f.id,D=f.accessLevelOptions,k=f.fetchUsers,C=f.onToggleMandatory,F=f.onDueDateChange,w=f.onAssigneesChange,S=f.onTitleChange,B=f.finalApprovalDueDate,L=i(function(){return p()},[]),j="0"===v||(null!==(x=null===(h=b.assignees)||void 0===h?void 0:h.length)&&void 0!==x?x:0)>0,z=r(j),M=z[0],R=z[1],I=r(!1),A=I[0],E=I[1];return l(function(){var e,n;(null!==(n=null===(e=b.assignees)||void 0===e?void 0:e.length)&&void 0!==n?n:0)>0&&R(!0)},[b.assignees]),n("div",e({style:{width:"100%",border:"1.5px solid #E2E8F0",borderRadius:"5px"}},{children:[n("div",e({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#F8FAFC",padding:"0px 10px",minHeight:"48px"}},{children:[n("span",e({style:{display:"flex",alignItems:"center",gap:10,paddingLeft:"20px"}},{children:[t("span",e({style:{backgroundColor:L.backgroundColor,borderRadius:"10px",padding:"3px 12px",color:L.color,fontSize:"13px",fontWeight:500}},{children:b.headerName})),n("div",e({style:{display:"flex",alignItems:"center",gap:"6px"}},A?{children:[t("input",{type:"text",value:b.title||"",onChange:function(e){return null==S?void 0:S(e.target.value)},onBlur:function(){return E(!1)},onKeyDown:function(e){return"Enter"===e.key&&E(!1)},autoFocus:!0,style:{border:"none",borderBottom:"2px solid #3B82F6",outline:"none",fontSize:"13px",fontWeight:500,color:"#374151",background:"transparent",padding:"0 2px",width:"150px"}}),t("button",e({type:"button",onMouseDown:function(e){return e.preventDefault()},onClick:function(e){e.stopPropagation(),E(!1)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"}},{children:t(a,{size:16,color:"#10B981"})}))]}:{children:[t("span",e({style:{fontSize:"13px",fontWeight:500,color:"#374151"}},{children:b.title})),t("button",e({type:"button",onClick:function(e){e.stopPropagation(),E(!0)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"},title:"Edit Title"},{children:t(s,{size:14,color:"#6B7280"})}))]}))]})),n("div",e({style:{display:"flex",alignItems:"center",gap:16,marginLeft:"auto"}},{children:[n(o,{children:[n("span",e({style:{color:"#6B7280"}},{children:["Due Date: ",b.isMandatory&&t("sup",e({style:{color:"red"}},{children:"*"}))]})),t(u,{value:null!==(y=b.dueDate)&&void 0!==y?y:null,onSet:F,id:v,maxDate:null!=B?B:null}),t(c,{})]}),t("div",e({style:{display:"flex",alignItems:"center"}},{children:n("button",e({type:"button",onClick:C,disabled:"0"===v,style:{position:"relative",width:"88px",height:"26px",border:"none",borderRadius:"999px",backgroundColor:b.isMandatory?"#5B4FE9":"#D1D5DB",cursor:"pointer",opacity:"0"===v?"50%":"100%",display:"flex",alignItems:"center",padding:"0 10px",transition:"all 0.2s ease",flexShrink:0}},{children:[t("span",{style:{position:"absolute",top:"3px",left:b.isMandatory?"65px":"3px",width:"20px",height:"20px",borderRadius:"50%",background:"#FFF",transition:"all 0.2s ease",boxShadow:"0 1px 3px rgba(0,0,0,0.15)"}}),t("span",e({style:{color:"#FFF",fontSize:"10px",fontWeight:500,userSelect:"none",paddingLeft:b.isMandatory?"0":"18px",paddingRight:b.isMandatory?"18px":"0"}},{children:"Required"}))]}))})),t(d,{size:20,onClick:function(e){e.stopPropagation(),R(function(e){return!e})},style:{cursor:"pointer",flexShrink:0,transition:"transform 0.2s ease",transform:M?"rotate(180deg)":"rotate(0deg)"}})]}))]})),M&&t("div",e({style:{width:"100%",height:"auto"}},{children:t(g,{assignees:null!==(m=b.assignees)&&void 0!==m?m:[],onAssigneeChange:w,accessLevelOptions:D,levelDetails:{head:b.headerName,title:b.title},fetchUsers:k})}))]}))}export{f as default};
|
|
2
2
|
//# sourceMappingURL=AssignLevelAccordions.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../_virtual/_tslib.js";import{jsx as n,jsxs as i}from"react/jsx-runtime";import t from"react";import{PenLine as r,UserRoundCheck as l,Bell as o,InfoIcon as a,User as s,ArrowRight as p,CheckSquare as u,FileCheck as c,Edit2 as d}from"lucide-react";import f from"./AssignLevelAccordions.js";import v from"./components/CustomCheckbox.js";import h from"./assets/FileCheckCorner.js";import{DEFAULT_ASSIGN_REMINDER_STYLES as m}from"./styles/AssignReminderStyles.js";var g=[{label:"Edit",icon:n(r,{size:14})},{label:"Approve",icon:n(l,{size:14})},{label:"Edit & Approve",icon:n(h,{})},{label:"Notify",icon:n(o,{size:14})}];function y(r){var l=r.title,o=r.levels,h=void 0===o?[]:o,y=r.requireFinalApproval,x=void 0!==y&&y,A=r.additionalInfo,b=r.setLevels,D=r.setRequireFinalApproval,L=r.fetchUsers,w=r.accessLevelOptions,
|
|
1
|
+
import{__assign as e}from"../../_virtual/_tslib.js";import{jsx as n,jsxs as i}from"react/jsx-runtime";import t from"react";import{PenLine as r,UserRoundCheck as l,Bell as o,InfoIcon as a,User as s,ArrowRight as p,CheckSquare as u,FileCheck as c,Edit2 as d}from"lucide-react";import f from"./AssignLevelAccordions.js";import v from"./components/CustomCheckbox.js";import h from"./assets/FileCheckCorner.js";import{DEFAULT_ASSIGN_REMINDER_STYLES as m}from"./styles/AssignReminderStyles.js";var g=[{label:"Edit",icon:n(r,{size:14})},{label:"Approve",icon:n(l,{size:14})},{label:"Edit & Approve",icon:n(h,{})},{label:"Notify",icon:n(o,{size:14})}];function y(r){var l=r.title,o=r.levels,h=void 0===o?[]:o,y=r.requireFinalApproval,x=void 0!==y&&y,A=r.additionalInfo,b=r.setLevels,D=r.setRequireFinalApproval,L=r.fetchUsers,w=r.accessLevelOptions,z=void 0===w?g:w,F=r.customInfoIcon,C=r.onValidationError,I=r.customStyles,W=void 0===I?{}:I,M=r.totalLevels,j=r.finalApprovalDueDate,S=t.useState(!1),E=S[0],T=S[1],q=t.useMemo(function(){return Array.from({length:null!=M?M:3},function(e,n){var i;return null!==(i=h[n])&&void 0!==i?i:{title:"Level ".concat(n+1),headerName:"L ".concat(n+1),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0}})},[h,M]),B=(h.length>0?h:q).filter(function(e){return!e.isHidden});return i("div",e({style:e({padding:"8px",display:"flex",flexDirection:"column",gap:"18px"},W.container)},{children:[i("span",e({style:e(e({},m.header),W.levelsHeader)},{children:[n("span",{children:null!=l?l:"Assignee Levels"}),i("div",e({style:e(e({},m.infoIconWrapper),W.infoIconWrapper),onMouseEnter:function(){return T(!0)},onMouseLeave:function(){return T(!1)}},{children:[null!=F?F:n(a,{width:18,height:18}),n("div",e({style:e(e(e({},m.tooltip),W.tooltip),E?e(e({},m.tooltipVisible),W.tooltipVisible):{})},{children:A||i("span",{children:[n("b",{children:"How it works:"}),n("br",{}),"Level 1 is required by default, Enable Level 2 and Level 3 to add sequential approval steps for the review"]})}))]}))]})),n("div",e({style:e({display:"flex",flexDirection:"column",gap:"16px"},W.accordionsContainer)},{children:B.map(function(i,t){return n(f,{level:i,id:String(t),accessLevelOptions:z,fetchUsers:L,onToggleMandatory:function(){return n=t,void(null==b||b(function(i){return i.map(function(i,t){return t===n?e(e({},i),{isMandatory:!i.isMandatory}):i})}));var n},onDueDateChange:function(n){return function(n,i){var t;if(n>0&&i){var r=null===(t=h[n-1])||void 0===t?void 0:t.dueDate;if(r&&i<r)return void(null==C||C("Level ".concat(n+1," due date cannot be before Level ").concat(n," due date")))}null==b||b(function(t){return t.map(function(t,r){return r===n?e(e({},t),{dueDate:i}):t})})}(t,n)},onAssigneesChange:function(n){return i=t,r=n,void(null==b||b(function(n){return n.map(function(n,t){return t===i?e(e({},n),{assignees:r}):n})}));var i,r},onTitleChange:function(n){return function(n,i){null==b||b(function(t){return t.map(function(t,r){return r===n?e(e({},t),{title:i}):t})})}(t,n)},finalApprovalDueDate:j},t)})})),i("div",e({style:e(e({},m.finalApprovalBox),W.finalApprovalBox)},{children:[n(v,{getter:x,setter:null!=D?D:function(){}}),i("div",e({style:e({display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400},W.finalApprovalTextWrapper)},{children:[n("span",e({style:e({fontWeight:500},W.finalApprovalTitle)},{children:"Require Final Approval"})),n("span",e({style:W.finalApprovalDesc},{children:"After all assignees approve, you (the owner) will be notified to give final sign-off before the redline is settled."}))]}))]})),i("div",e({style:e(e({},m.currentApprovalFlow),W.currentApprovalFlow)},{children:[n("span",e({style:e({fontSize:"14px",fontWeight:600},W.currentApprovalFlowTitle)},{children:"Current Approval Flow"})),function(){var r=h.filter(function(e){var n,i;return(null!==(i=null===(n=e.assignees)||void 0===n?void 0:n.length)&&void 0!==i?i:0)>0});return n("div",e({style:e({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"},W.approvalFlowItemsWrapper)},{children:r.map(function(l,o){var a,f=l.isHidden,v=!l.isMandatory&&!f,h=l.assignees.map(function(e){return e.name}).join(" / "),m=f?n(s,{size:16}):function(e){switch(e){case 0:return n(d,{size:16});case 1:return n(c,{size:16});case 2:return n(s,{size:16});default:return n(u,{size:16})}}(o);return i(t.Fragment,{children:[i("div",e({style:e({display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,color:v?"#64748B":"#374151",border:v?"1px dashed #CBD5E1":void 0,borderRadius:v?"6px":void 0,padding:v?"2px 6px":void 0},W.approvalFlowItem),title:l.title||"Level ".concat(o+1)},{children:[m,i("span",{children:[h,v&&" (Optional)"]})]})),o<r.length-1&&n(p,{size:16,color:"#9CA3AF"})]},null!==(a=l.id)&&void 0!==a?a:o)})}))}()]}))]}))}export{y as AssignReminderLevels};
|
|
2
2
|
//# sourceMappingURL=AssignReminderLevels.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as i}from"../../_virtual/_tslib.js";import{jsxs as n,jsx as r,Fragment as t}from"react/jsx-runtime";import{Bell as a,ClipboardList as o,X as l,CircleAlert as s}from"lucide-react";import d,{useState as c,useEffect as u}from"react";import{AssignReminderLevels as v}from"./AssignReminderLevels.js";import{INITIAL_LEVELS as m}from"./AssignReminderTest.js";import p from"./components/ReviewStatus.js";import f from"./components/CustomDatePicker.js";import{ManageReminders as y}from"./ManageReminders.js";import{DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES as b}from"./styles/AssignReminderWrapperStyles.js";var h=[{tabName:"Assignees & Approvers",tabIcon:n("svg",e({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},{children:[r("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),r("circle",{cx:"9",cy:"7",r:"4"}),r("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),r("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}))},{tabName:"Manage Reminders",tabIcon:r(a,{size:15})},{tabName:"Review Status",tabIcon:r(o,{size:15})}],D=[{id:1,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}},{id:2,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}},{id:3,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}}];function g(a){var o,g,_,w=a.metadata,R=void 0===w?{}:w,A=a.reviewData,S=void 0===A?{}:A,T=a.levels,C=a.setLevels,L=a.requireFinalApproval,q=a.setRequireFinalApproval,B=a.approvalDueDate,x=a.setApprovalDueDate,F=a.onClose,N=a.fetchUsers,O=a.onSave,k=a.onValidationError,M=a.totalLevels,I=a.customStyles,j=void 0===I?{}:I,H=a.isSaving,P=void 0!==H&&H,E=a.displayConfig,W=void 0===E?{}:E,z=a.onRequireFinalApproval,U=a.isOwner,V=void 0===U||U;a.remindersData;var Y,G=a.remainderOwners,J=a.setRemainderOwners,K=a.schedules,Q=a.setSchedules,X=a.handelSendNow,Z=a.showPreviewEmail,$=a.tabName,ee=a.reminderLabels,ie=a.reminderColors,ne=a.reminderChipColor,re=a.reminderAssignees,te=a.reminderFallbackRecipients,ae=a.reminderRecipientsColor,oe=a.manualReminderTitle,le=a.manualReminderDescription,se=a.lastReminderText,de=a.selectRecipientsLabel,ce=a.previewEmailButtonLabel,ue=a.sendNowButtonLabel,ve=a.reminderSuccessTitle,me=a.reminderSuccessDescription,pe=a.escalationTitle,fe=a.escalationTitleTooltip,ye=a.escalationDescription,be=a.configureAutoReminderText,he=a.getDynamicStatement,De=a.reminderStartDateLabel,ge=a.documentDueDateLabel,_e=a.reminderFrequencyLabel,we=a.escalationRemindersLabel,Re=a.escalationTooltip,Ae=a.escalationConditionText,Se=a.daysText,Te=a.dueDataAndRepeatText,Ce=a.reminderFrequencyOptions,Le=a.escalationFrequencyOptions,qe=a.beforeAfterOptions,Be=(null===(o=R.tabData)||void 0===o?void 0:o.length)?R.tabData:h,xe=V?Be:Be.filter(function(e,i){return 0!==i}),Fe=c(null!==(_=null===(g=xe[0])||void 0===g?void 0:g.tabName)&&void 0!==_?_:""),Ne=Fe[0],Oe=Fe[1],ke=(Y=Ne.toLowerCase()).includes("reminder")?"reminders":Y.includes("review")?"review":"assignees",Me=c(T||m),Ie=Me[0],je=Me[1],He=c(L||!1),Pe=He[0],Ee=He[1],We=c(B||null),ze=We[0],Ue=We[1],Ve=c(null),Ye=Ve[0],Ge=Ve[1],Je=c([]),Ke=Je[0],Qe=Je[1],Xe=c(G||D),Ze=Xe[0],$e=Xe[1],ei=void 0!==K?K:Ke,ii=void 0!==Q?Q:Qe,ni=void 0!==G?G:Ze,ri=d.useMemo(function(){return{due_at:ze?ze.toISOString():"",assignee:Ie.filter(function(e){return!e.isHidden}).flatMap(function(e){return e.assignees||[]}).reduce(function(i,n,r){var t;return e(e({},i),((t={})[r]=n,t))},{})}},[ze,Ie]);u(function(){void 0!==G&&$e(G)},[G]),u(function(){z&&z().then(function(e){Array.isArray(e)&&e.length>0?Ge(e[0]):e&&!Array.isArray(e)&&Ge(e)}).catch(function(e){return console.error("Failed to fetch user:",e)})},[]),u(function(){$&&Oe($)},[$]),u(function(){var e,i;xe.some(function(e){return e.tabName===Ne})||Oe(null!==(i=null===(e=xe[0])||void 0===e?void 0:e.tabName)&&void 0!==i?i:"")},[xe,Ne]),u(function(){T&&je(function(e){var n=e.find(function(e){return e.isHidden});return n?i(i([],T,!0),[n],!1):T})},[T]),u(function(){void 0!==L&&Ee(L)},[L]),u(function(){void 0!==B&&Ue(B)},[B]),u(function(){je(function(e){var n=e.filter(function(e){return!e.isHidden});if(Pe){var r={headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==Ye?void 0:Ye.id)||"me",email:(null==Ye?void 0:Ye.email)||"",name:(null==Ye?void 0:Ye.name)?"".concat(Ye.name," (You)"):"Username (You)",accessLevel:"Approve"}]};return i(i([],n,!0),[r],!1)}return n})},[Pe,Ye]),u(function(){var e=Ie.flatMap(function(e){return e.assignees||[]}).filter(function(e){return e.email});$e(function(i){var n=i.length===e.length&&e.every(function(e,n){var r;return(null===(r=i[n])||void 0===r?void 0:r.email)===e.email});return n?i:e.map(function(e,n){var r=i.find(function(i){return i.email===e.email});return r||{id:n+1,name:e.name,email:e.email,reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}}})})},[Ie]);var ti=R.wrapperTitle||"Assign Redline and Manage Reminders",ai=R.wrapperSubTitle||"Sec 4.1 - Technical Security Information",oi=R.wrapperPriority||"High",li=R.wrapperPriorityStyles||{backgroundColor:"#DC262618",color:"#DC2626",border:"1px solid #DC262640"};return r("div",e({style:e(e({},b.overlay),j.overlay)},{children:n("div",e({style:e(e(e(e({},b.modal),{transition:"width 0.3s ease, max-width 0.3s ease"}),"reminders"===ke?{width:"1400px",maxWidth:"95vw"}:{}),j.modal)},{children:[n("div",e({style:e(e({},b.header),j.header)},{children:[n("div",e({style:e(e({},b.headerLeft),j.headerLeft)},{children:[r("span",e({style:e(e({},b.modalTitle),j.modalTitle)},{children:ti})),n("div",e({style:e(e({},b.redlineRow),j.redlineRow)},{children:[r("span",e({style:e(e({},b.redlineName),j.redlineName)},{children:ai})),r("span",e({style:e(e(e({},b.redlineBadge),li),j.redlineBadge)},{children:oi}))]}))]})),r("button",e({style:e(e({},b.closeBtn),j.closeBtn),onClick:F},{children:r(l,{size:20,color:"#6B7280"})}))]})),r("div",e({style:e(e({},b.tabBar),j.tabBar)},{children:xe.map(function(i){var r=Ne===i.tabName;return n("button",e({style:e(e(e({},b.tab),j.tab),r?e(e({},b.tabActive),j.tabActive):{}),onClick:function(){return Oe(i.tabName)}},{children:[i.tabIcon," ",i.tabName]}),i.tabName)})})),n("div",e({style:e(e({},b.body),j.body)},{children:["assignees"===ke&&n(t,{children:[!1!==R.showFinalApprovalDueDate&&n("div",e({style:e(e({},b.dueDateBar),j.dueDateBar)},{children:[n("span",e({style:e(e({},b.dueDateLabel),j.dueDateLabel)},{children:["Final Approval due date"," ",r("sup",e({style:{color:"#DC2626",marginLeft:2}},{children:"*"}))]})),r("div",e({style:e(e({},b.dueDateInputWrap),j.dueDateInputWrap)},{children:r(f,{value:ze?ze.toISOString().slice(0,10):"",onChange:Ue,disabled:W.disableDueDates})})),n("span",e({style:e(e({},b.requiredToProceeed),j.requiredToProceeed)},{children:[r(s,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),r(v,{levels:Ie,totalLevels:M,requireFinalApproval:Pe,setLevels:je,setRequireFinalApproval:function(e){Ee(e)},fetchUsers:N,onValidationError:k,customStyles:j,finalApprovalDueDate:ze,displayConfig:W})]}),"reminders"===ke&&r(y,e({data:ri,schedules:ei,setSchedules:ii,remainderOwners:ni,setRemainderOwners:function(e){var i="function"==typeof e?e(ni):e;J?J(i):$e(i)},handelSendNow:function(e,i){X&&X(e||ei,i||ni)},showPreviewEmail:null!=Z&&Z},void 0!==ee&&{labels:ee},void 0!==ie&&{colors:ie},void 0!==ne&&{chipColor:ne},void 0!==re&&{assignees:re},void 0!==te&&{fallbackRecipients:te},void 0!==ae&&{recipientsColor:ae},void 0!==oe&&{manualReminderTitle:oe},void 0!==le&&{manualReminderDescription:le},void 0!==se&&{lastReminderText:se},void 0!==de&&{selectRecipientsLabel:de},void 0!==ce&&{previewEmailButtonLabel:ce},void 0!==ue&&{sendNowButtonLabel:ue},void 0!==ve&&{reminderSuccessTitle:ve},void 0!==me&&{reminderSuccessDescription:me},void 0!==pe&&{escalationTitle:pe},void 0!==fe&&{escalationTitleTooltip:fe},void 0!==ye&&{escalationDescription:ye},void 0!==be&&{configureAutoReminderText:be},void 0!==he&&{getDynamicStatement:he},void 0!==De&&{reminderStartDateLabel:De},void 0!==ge&&{documentDueDateLabel:ge},void 0!==_e&&{reminderFrequencyLabel:_e},void 0!==we&&{escalationRemindersLabel:we},void 0!==Re&&{escalationTooltip:Re},void 0!==Ae&&{escalationConditionText:Ae},void 0!==Se&&{daysText:Se},void 0!==Te&&{dueDataAndRepeatText:Te},void 0!==Ce&&{reminderFrequencyOptions:Ce},void 0!==Le&&{escalationFrequencyOptions:Le},void 0!==qe&&{beforeAfterOptions:qe})),"review"===ke&&r(p,{levels:Ie,reviewData:S})]})),n("div",e({style:e(e({},b.footer),j.footer)},{children:[r("button",e({style:e(e(e({},b.clearBtn),j.clearBtn),P?j.actionBtnDisabled:{}),onClick:function(){je(m.map(function(i){return e(e({},i),{assignees:[],dueDate:null})})),Ee(!1),Ue(null)},disabled:P},{children:"Clear"})),r("button",e({style:e(e(e({},b.saveBtn),j.saveBtn),P||W.disableSaveChanges?e({opacity:.6,cursor:"not-allowed"},j.actionBtnDisabled):{}),onClick:function(){if(!W.disableSaveChanges){var e=Ie.filter(function(e){return!e.isHidden});null==C||C(e),null==q||q(Pe),null==x||x(ze),null==O||O({levels:e,requireFinalApproval:Pe,finalApprovalDueDate:ze,activeTab:ke,schedules:ei,remainderOwners:ni})}},disabled:P||W.disableSaveChanges},{children:"Save Changes"}))]}))]}))}))}export{g as AssignReminderWrapper};
|
|
1
|
+
import{__assign as e,__spreadArray as i}from"../../_virtual/_tslib.js";import{jsxs as n,jsx as r,Fragment as t}from"react/jsx-runtime";import{Bell as a,ClipboardList as o,X as l,CircleAlert as s}from"lucide-react";import d,{useState as u,useEffect as c}from"react";import{AssignReminderLevels as v}from"./AssignReminderLevels.js";import{INITIAL_LEVELS as m}from"./AssignReminderTest.js";import p from"./components/ReviewStatus.js";import f from"./components/CustomDatePicker.js";import{ManageReminders as y}from"./ManageReminders.js";import{DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES as h}from"./styles/AssignReminderWrapperStyles.js";var b=[{tabName:"Assignees & Approvers",tabIcon:n("svg",e({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},{children:[r("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),r("circle",{cx:"9",cy:"7",r:"4"}),r("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),r("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}))},{tabName:"Manage Reminders",tabIcon:r(a,{size:15})},{tabName:"Review Status",tabIcon:r(o,{size:15})}],D=[{id:1,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}},{id:2,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}},{id:3,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}}];function g(a){var o,g,w,_=a.metadata,R=void 0===_?{}:_,A=a.reviewData,T=void 0===A?{}:A,L=a.levels,S=a.setLevels,q=a.requireFinalApproval,C=a.setRequireFinalApproval,B=a.approvalDueDate,F=a.setApprovalDueDate,x=a.onClose,N=a.fetchUsers,O=a.onSave,M=a.onValidationError,k=a.totalLevels,j=a.customStyles,H=void 0===j?{}:j,I=a.isSaving,P=void 0!==I&&I,E=a.onRequireFinalApproval,W=a.isOwner,z=void 0===W||W;a.remindersData;var U,V=a.remainderOwners,Y=a.setRemainderOwners,G=a.schedules,J=a.setSchedules,K=a.handelSendNow,Q=a.showPreviewEmail,X=a.tabName,Z=a.reminderLabels,$=a.reminderColors,ee=a.reminderChipColor,ie=a.reminderAssignees,ne=a.reminderFallbackRecipients,re=a.reminderRecipientsColor,te=a.manualReminderTitle,ae=a.manualReminderDescription,oe=a.lastReminderText,le=a.selectRecipientsLabel,se=a.previewEmailButtonLabel,de=a.sendNowButtonLabel,ue=a.reminderSuccessTitle,ce=a.reminderSuccessDescription,ve=a.escalationTitle,me=a.escalationTitleTooltip,pe=a.escalationDescription,fe=a.configureAutoReminderText,ye=a.getDynamicStatement,he=a.reminderStartDateLabel,be=a.documentDueDateLabel,De=a.reminderFrequencyLabel,ge=a.escalationRemindersLabel,we=a.escalationTooltip,_e=a.escalationConditionText,Re=a.daysText,Ae=a.dueDataAndRepeatText,Te=a.reminderFrequencyOptions,Le=a.escalationFrequencyOptions,Se=a.beforeAfterOptions,qe=(null===(o=R.tabData)||void 0===o?void 0:o.length)?R.tabData:b,Ce=z?qe:qe.filter(function(e,i){return 0!==i}),Be=u(null!==(w=null===(g=Ce[0])||void 0===g?void 0:g.tabName)&&void 0!==w?w:""),Fe=Be[0],xe=Be[1],Ne=(U=Fe.toLowerCase()).includes("reminder")?"reminders":U.includes("review")?"review":"assignees",Oe=u(L||m),Me=Oe[0],ke=Oe[1],je=u(q||!1),He=je[0],Ie=je[1],Pe=u(B||null),Ee=Pe[0],We=Pe[1],ze=u(null),Ue=ze[0],Ve=ze[1],Ye=u([]),Ge=Ye[0],Je=Ye[1],Ke=u(V||D),Qe=Ke[0],Xe=Ke[1],Ze=void 0!==G?G:Ge,$e=void 0!==J?J:Je,ei=void 0!==V?V:Qe,ii=function(i){return i.map(function(i,n){return 0!==n||i.isHidden?i:e(e({},i),{isMandatory:!0,hasDueDate:!0})})},ni=d.useMemo(function(){return{due_at:Ee?Ee.toISOString():"",assignee:Me.filter(function(e){return!e.isHidden}).flatMap(function(e){return e.assignees||[]}).reduce(function(i,n,r){var t;return e(e({},i),((t={})[r]=n,t))},{})}},[Ee,Me]);c(function(){void 0!==V&&Xe(V)},[V]),c(function(){E&&E().then(function(e){Array.isArray(e)&&e.length>0?Ve(e[0]):e&&!Array.isArray(e)&&Ve(e)}).catch(function(e){return console.error("Failed to fetch user:",e)})},[]),c(function(){X&&xe(X)},[X]),c(function(){var e,i;Ce.some(function(e){return e.tabName===Fe})||xe(null!==(i=null===(e=Ce[0])||void 0===e?void 0:e.tabName)&&void 0!==i?i:"")},[Ce,Fe]),c(function(){L&&ke(function(e){var n=e.find(function(e){return e.isHidden}),r=n?i(i([],L,!0),[n],!1):L;return ii(r)})},[L]),c(function(){void 0!==q&&Ie(q)},[q]),c(function(){void 0!==B&&We(B)},[B]),c(function(){ke(function(e){var n=e.filter(function(e){return!e.isHidden});if(He){var r={headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==Ue?void 0:Ue.id)||"me",email:(null==Ue?void 0:Ue.email)||"",name:(null==Ue?void 0:Ue.name)?"".concat(Ue.name," (You)"):"Username (You)",accessLevel:"Approve"}]};return i(i([],n,!0),[r],!1)}return n})},[He,Ue]),c(function(){var e=Me.flatMap(function(e){return e.assignees||[]}).filter(function(e){return e.email});Xe(function(i){var n=i.length===e.length&&e.every(function(e,n){var r;return(null===(r=i[n])||void 0===r?void 0:r.email)===e.email});return n?i:e.map(function(e,n){var r=i.find(function(i){return i.email===e.email});return r||{id:n+1,name:e.name,email:e.email,reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}}})})},[Me]);var ri=Me.filter(function(e){return!e.isHidden}),ti=ri.find(function(e,i){if(!(0===i||e.isMandatory))return!1;var n=!!e.dueDate,r=(e.assignees||[]).some(function(e){return!!(null==e?void 0:e.email)||!!(null==e?void 0:e.id)});return!n||!r}),ai=!1!==R.showFinalApprovalDueDate,oi=P||(!!ti||ai&&!Ee),li=R.wrapperTitle||"Assign Redline and Manage Reminders",si=R.wrapperSubTitle||"Sec 4.1 - Technical Security Information",di=R.wrapperPriority||"High",ui=R.wrapperPriorityStyles||{backgroundColor:"#DC262618",color:"#DC2626",border:"1px solid #DC262640"};return r("div",e({style:e(e({},h.overlay),H.overlay)},{children:n("div",e({style:e(e(e(e({},h.modal),{transition:"width 0.3s ease, max-width 0.3s ease"}),"reminders"===Ne?{width:"1400px",maxWidth:"95vw"}:{}),H.modal)},{children:[n("div",e({style:e(e({},h.header),H.header)},{children:[n("div",e({style:e(e({},h.headerLeft),H.headerLeft)},{children:[r("span",e({style:e(e({},h.modalTitle),H.modalTitle)},{children:li})),n("div",e({style:e(e({},h.redlineRow),H.redlineRow)},{children:[r("span",e({style:e(e({},h.redlineName),H.redlineName)},{children:si})),r("span",e({style:e(e(e({},h.redlineBadge),ui),H.redlineBadge)},{children:di}))]}))]})),r("button",e({style:e(e({},h.closeBtn),H.closeBtn),onClick:x},{children:r(l,{size:20,color:"#6B7280"})}))]})),r("div",e({style:e(e({},h.tabBar),H.tabBar)},{children:Ce.map(function(i){var r=Fe===i.tabName;return n("button",e({style:e(e(e({},h.tab),H.tab),r?e(e({},h.tabActive),H.tabActive):{}),onClick:function(){return xe(i.tabName)}},{children:[i.tabIcon," ",i.tabName]}),i.tabName)})})),n("div",e({style:e(e({},h.body),H.body)},{children:["assignees"===Ne&&n(t,{children:[!1!==R.showFinalApprovalDueDate&&n("div",e({style:e(e({},h.dueDateBar),H.dueDateBar)},{children:[n("span",e({style:e(e({},h.dueDateLabel),H.dueDateLabel)},{children:["Final Approval due date"," ",r("sup",e({style:{color:"#DC2626",marginLeft:2}},{children:"*"}))]})),r("div",e({style:e(e({},h.dueDateInputWrap),H.dueDateInputWrap)},{children:r(f,{value:Ee?Ee.toISOString().slice(0,10):"",onChange:We})})),n("span",e({style:e(e({},h.requiredToProceeed),H.requiredToProceeed)},{children:[r(s,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),r(v,{levels:Me,totalLevels:k,requireFinalApproval:He,setLevels:ke,setRequireFinalApproval:function(e){Ie(e)},fetchUsers:N,onValidationError:M,customStyles:H,finalApprovalDueDate:Ee})]}),"reminders"===Ne&&r(y,e({data:ni,schedules:Ze,setSchedules:$e,remainderOwners:ei,setRemainderOwners:function(e){var i="function"==typeof e?e(ei):e;Y?Y(i):Xe(i)},handelSendNow:function(e,i){K&&K(e||Ze,i||ei)},showPreviewEmail:null!=Q&&Q},void 0!==Z&&{labels:Z},void 0!==$&&{colors:$},void 0!==ee&&{chipColor:ee},void 0!==ie&&{assignees:ie},void 0!==ne&&{fallbackRecipients:ne},void 0!==re&&{recipientsColor:re},void 0!==te&&{manualReminderTitle:te},void 0!==ae&&{manualReminderDescription:ae},void 0!==oe&&{lastReminderText:oe},void 0!==le&&{selectRecipientsLabel:le},void 0!==se&&{previewEmailButtonLabel:se},void 0!==de&&{sendNowButtonLabel:de},void 0!==ue&&{reminderSuccessTitle:ue},void 0!==ce&&{reminderSuccessDescription:ce},void 0!==ve&&{escalationTitle:ve},void 0!==me&&{escalationTitleTooltip:me},void 0!==pe&&{escalationDescription:pe},void 0!==fe&&{configureAutoReminderText:fe},void 0!==ye&&{getDynamicStatement:ye},void 0!==he&&{reminderStartDateLabel:he},void 0!==be&&{documentDueDateLabel:be},void 0!==De&&{reminderFrequencyLabel:De},void 0!==ge&&{escalationRemindersLabel:ge},void 0!==we&&{escalationTooltip:we},void 0!==_e&&{escalationConditionText:_e},void 0!==Re&&{daysText:Re},void 0!==Ae&&{dueDataAndRepeatText:Ae},void 0!==Te&&{reminderFrequencyOptions:Te},void 0!==Le&&{escalationFrequencyOptions:Le},void 0!==Se&&{beforeAfterOptions:Se})),"review"===Ne&&r(p,{levels:Me,reviewData:T})]})),n("div",e({style:e(e({},h.footer),H.footer)},{children:[r("button",e({style:e(e(e({},h.clearBtn),H.clearBtn),P?H.actionBtnDisabled:{}),onClick:function(){ke(ii(m.map(function(i){return e(e({},i),{assignees:[],dueDate:null})}))),Ie(!1),We(null)},disabled:P},{children:"Clear"})),r("button",e({style:e(e(e({},h.saveBtn),H.saveBtn),oi?e({opacity:.55,cursor:"not-allowed"},H.actionBtnDisabled):{}),onClick:function(){if(oi)P||null==M||M(function(){if(ai&&!Ee)return"Final approval due date is required";if(!ti)return"Please fill all required fields before saving";var e=ri.indexOf(ti)+1,i=[ti.dueDate?null:"due date",(ti.assignees||[]).some(function(e){return!!(null==e?void 0:e.email)||!!(null==e?void 0:e.id)})?null:"assignee"].filter(Boolean);return"Level ".concat(e," ").concat(i.join(" and ")," ").concat(i.length>1?"are":"is"," required")}());else{var e=Me.filter(function(e){return!e.isHidden});null==S||S(e),null==C||C(He),null==F||F(Ee),null==O||O({levels:e,requireFinalApproval:He,finalApprovalDueDate:Ee,activeTab:Ne,schedules:Ze,remainderOwners:ei})}},disabled:oi},{children:"Save Changes"}))]}))]}))}))}export{g as AssignReminderWrapper};
|
|
2
2
|
//# sourceMappingURL=AssignReminderWrapper.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 F}from"framer-motion";import k from"@mui/icons-material/DragIndicator";import{LocalizationProvider as D,DatePicker as R}from"@mui/x-date-pickers";import{AdapterDayjs as E}from"@mui/x-date-pickers/AdapterDayjs";import w from"./components/ReminderFrequencyAutocomplete.js";import S from"./components/AssigneeCalendarView.js";import _ from"dayjs";import{styles as I}from"./styles/ManageReminder.style.js";var A=["Assignee 1","Assignee 2","Assignee 3"],B=[{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"}],L=[{id:"1",name:"Assignee 1",color:"#C11574",bg:"#FDF2F8",startDate:new Date("2026-11-09"),dueDate:new Date("2026-12-01")},{id:"2",name:"Assignee 2",color:"#3538CD",bg:"#EEF4FF",startDate:new Date("2026-11-21"),dueDate:new Date("2026-12-03")},{id:"3",name:"Assignee 3",color:"#FF6058",bg:"#FFF7ED",startDate:new Date("2026-12-01"),dueDate:new Date("2026-12-03")}],P=[{bg:"#DBEAFE",text:"#1E40AF"},{bg:"#CCFBF1",text:"#0D9488"},{bg:"#DCFCE7",text:"#166534"}],O=[{initials:"OR",name:"Olivia Rhye",checked:!1,bg:"#DBEAFE",text:"#1D4ED8"},{initials:"DM",name:"Daniela Mark",checked:!1,bg:"#CFFAFE",text:"#0F766E"},{initials:"JB",name:"Jenna Beckner",checked:!1,bg:"#D1FAE5",text:"#059669"}],M=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"}},Y=function(Y){var j=Y.data,N=Y.schedules,H=Y.setSchedules,z=Y.remainderOwners,W=Y.setRemainderOwners,G=Y.labels,V=void 0===G?A:G,U=Y.colors,J=void 0===U?B:U,Z=Y.chipColor,K=void 0===Z?T:Z,Q=Y.assignees,X=void 0===Q?L:Q,$=Y.fallbackRecipients,ee=void 0===$?O:$,ie=Y.recipientsColor,ne=void 0===ie?P:ie,te=Y.manualReminderTitle,re=void 0===te?"Send Manual Reminder Now":te,oe=Y.manualReminderDescription,le=void 0===oe?"Immediately notify the assignees about this document.":oe;Y.lastReminderText;var de=Y.selectRecipientsLabel,ae=void 0===de?"Select recipients:":de,se=Y.previewEmailButtonLabel,ce=void 0===se?"Preview Email":se,ue=Y.sendNowButtonLabel,me=void 0===ue?"Send Now":ue,ve=Y.reminderSuccessTitle,he=void 0===ve?"Reminder sent successfully!":ve,ye=Y.reminderSuccessDescription,pe=void 0===ye?"Email notification sent to 2 assignees.":ye,fe=Y.escalationTitle,ge=void 0===fe?"Escalation and Auto Reminder Setup":fe;Y.escalationTitleTooltip;var be=Y.escalationDescription,xe=void 0===be?"Configure Auto reminder settings for all assignees.":be;Y.configureAutoReminderText;var Ce=Y.getDynamicStatement,Fe=void 0===Ce?M:Ce,ke=Y.reminderStartDateLabel,De=void 0===ke?"Reminder Start Date":ke,Re=Y.documentDueDateLabel,Ee=void 0===Re?"Document Due Date":Re,we=Y.reminderFrequencyLabel,Se=void 0===we?"Reminder Frequency":we,_e=Y.escalationRemindersLabel,Ie=void 0===_e?"Escalation Reminders":_e;Y.escalationTooltip;var Ae=Y.escalationConditionText,Be=void 0===Ae?"If the document is still pending, start escalation reminders":Ae,Te=Y.daysText,Le=void 0===Te?"days":Te,Pe=Y.dueDataAndRepeatText,Oe=void 0===Pe?"due date and repeat every":Pe,Me=Y.reminderFrequencyOptions,qe=void 0===Me?["12 hours","24 hours","48 hours","72 hours","Custom"]:Me,Ye=Y.escalationFrequencyOptions,je=void 0===Ye?["1/2 hour","1 hour","4 hours","6 hours","12 hours","Custom"]:Ye,Ne=Y.beforeAfterOptions,He=void 0===Ne?["After","Before"]:Ne,ze=Y.handelSendNow,We=Y.showPreviewEmail,Ge=void 0===We||We,Ve=t(!1),Ue=Ve[0],Je=Ve[1],Ze=t(!1),Ke=Ze[0],Qe=Ze[1],Xe=t(!1),$e=Xe[0],ei=Xe[1],ii=t(!0),ni=ii[0],ti=ii[1],ri=t(ee),oi=ri[0],li=ri[1],di=b(),ai=function(i,n,t){W(function(r){return r.map(function(r,o){var l;return o===i?e(e({},r),((l={})[n]=t,l)):r})})},si=function(e,i){ai(e,"reminder_start_date",i)},ci=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},ui=function(e,i,n){if(!e||!n)return[];var t=ci(n);if(!t||t<=0)return[];for(var r=[],o=_(e).valueOf(),l=i?_(i).valueOf():_(e).add(45,"day").valueOf(),d=0;o<=l&&d<150;)r.push(_(o).toISOString()),o+=t,d++;return r},mi=function(e,i,n,t){if(!(e&&i&&t&&n))return[];var r=ci(t);if(!r)return[];var o,l=_(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(_(s).toISOString()),s+=r;return a},vi=function(e){return e?e.split(" ").map(function(e){return e[0]}).join("").toUpperCase():""};r(function(){var e=(null==j?void 0:j.due_at)||"",i=Object.values((null==j?void 0:j.assignee)||{}),n=null==z?void 0:z.map(function(n,t){var r,o=i[t]||X.find(function(e){return e.id===String(n.id)}),l=(null===(r=null==J?void 0:J[t%J.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:ui(n.reminder_start_date,e,n.reminder_frequency),escalations:mi(e,n.days,n.before_or_after,n.escalation_reminder_frequency)}});H(n)},[z,null==j?void 0:j.due_at,null==j?void 0:j.assignee]),r(function(){(null==j?void 0:j.assignee)&&li(function(e){var i=Object.values(j.assignee).filter(function(e){return e&&Object.keys(e).length>0}).map(function(i,n){var t=e.find(function(e){return e.name===i.name});return{name:i.name,checked:!!t&&t.checked,recipientsColor:(null==ne?void 0:ne[n])||P[n%P.length]}});return i.length>0?i:ee})},[null==j?void 0:j.assignee,null==j?void 0:j.due_at]);var hi=Object.values((null==j?void 0:j.assignee)||{}).filter(function(e){return null==e?void 0:e.name});return i("div",e({style:e(e({},I.mrContainer),{width:"100%",minWidth:"850px"})},{children:[i("div",e({style:I.mrSectionBox},{children:[i("div",e({style:e(e({},I.mrSectionHeader),{cursor:"pointer"}),onClick:function(){return Je(function(e){return!e})}},{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:re}))]})),n("div",e({style:I.mrSectionDescription},{children:le}))]})),n("div",e({style:I.mrSectionHeaderRight},{children:n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Je(function(e){return!e})},style:I.mrChevronButton},{children:n(l,{style:e(e({},I.mrChevronIcon),Ue?I.mrChevronRotated:{})})}))}))]})),n(x,{children:$e&&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:he})),n("div",e({style:I.mrSuccessDescription},{children:pe}))]}))]}))})]})),n(x,{children:Ue&&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:Ue?"auto":"none"})},{children:[i("div",e({style:I.mrRecipientsSection},{children:[n("div",e({style:I.mrRecipientsLabel},{children:ae})),n("div",e({style:I.mrRecipientsGrid},{children:oi.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=P[r%P.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=P[r%P.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 li(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:vi(t.name)})),n("div",e({style:I.mrRecipientName},{children:t.name}))]}))]}),t.name)})}))]})),i("div",e({style:I.mrActionsSection},{children:[Ge&&i("button",e({onClick:function(e){e.stopPropagation()},type:"button",style:e(e({},I.mrActionButton),I.mrActionButtonSecondary)},{children:[n(a,{style:I.mrIconAction}),ce]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),ei(!0),setTimeout(function(){return ei(!1)},3e3);var i=oi.filter(function(e){return e.checked});ze(N,z.filter(function(e){return i.some(function(i){return i.id===e.id})}))},style:e(e({},I.mrActionButton),I.mrActionButtonPrimary)},{children:me}))]}))]}))})]})),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(),Qe(function(e){return!e})}},{children:[i("div",e({style:I.mrEscalationHeader},{children:[i("div",e({style:I.mrEscalationTitleWrapper},{children:[n("div",e({style:I.mrEscalationTitleText},{children:ge})),n("div",e({style:I.mrTooltipIcon},{children:n(s,{stroke:"#64748B",style:I.mrIconInfo})}))]})),i("div",e({style:I.mrEscalationActions},{children:[Ge&&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:ce}))]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Qe(function(e){return!e})},style:I.mrChevronButton},{children:n(l,{style:e(e({},I.mrChevronIcon),Ke?I.mrChevronRotated:{})})}))]}))]})),n("div",e({style:I.mrEscalationDescription},{children:xe}))]})),n(x,e({initial:!1},{children:Ke&&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(F.Group,e({axis:"y",values:z||[],onReorder:function(e){W(e)},layoutScroll:!0,style:I.mrReorderGroup},{children:null==z?void 0:z.map(function(t,r){var o,d,a,u,m=hi[r]||ee[r],v=(null===(o=null==J?void 0:J[r])||void 0===o?void 0:o.bg)||"#FDF2FA",b=(null===(d=null==J?void 0:J[r])||void 0===d?void 0:d.text)||"#C11574",S=(null===(a=null==K?void 0:K[r])||void 0===a?void 0:a.bg)||"transparent",A=(null===(u=null==K?void 0:K[r])||void 0===u?void 0:u.text)||"inherit";return n(F.Item,e({value:t,dragControls:di,layout:"position"},{children: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==V?void 0:V[r])||"Assignee ".concat(r+1),sx:{backgroundColor:v,minWidth:90,color:b,fontWeight:500}})}))})),i("div",e({style:I.mrReminderContent},{children:[n("div",e({style:I.mrDragHandle},{children:n(k,{onPointerDown:function(e){return di.start(e)},sx:{color:"#9e9e9e"}})})),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:vi(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:S})},{children:n("span",e({style:e(e({},I.mrReminderStatementText),{color:A})},{children:Fe(t)}))}))]})),i("div",e({style:I.mrReminderDateFields},{children:[i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:De})),i("div",e({style:I.mrReminderDatePicker},{children:[n(D,e({dateAdapter:E},{children:n(R,{value:t.reminder_start_date?_(t.reminder_start_date):null,disablePast:!0,format:"MM/DD/YYYY",onChange:function(e){if(e&&_(e).isValid()){if(_(e).isBefore(_(),"day"))return;si(r,_(e).toISOString())}else si(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==j?void 0:j.due_at)?_(j.due_at).format("MM/DD/YYYY"):""}))]})),i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:Se})),i("div",e({style:I.mrReminderFrequency},{children:[n("span",e({style:I.mrReminderFrequencyText},{children:"Every"})),n(w,{value:t.reminder_frequency,onChange:function(e){return function(e,i){ai(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){ai(e,"is_escalation_reminder",i),i||(ai(e,"days",{type:"preset",value:""}),ai(e,"escalation_reminder_frequency",{type:"preset",value:""}),ai(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:Be})),i("div",e({style:I.mrEscalationFields},{children:[i("div",e({style:I.mrEscalationFieldGroup},{children:[n(w,{value:t.days,onChange:function(e){return function(e,i){ai(e,"days",i)}(r,e)}}),n("div",e({style:I.mrEscalationFieldText},{children:Le}))]})),i("div",e({style:e(e({},I.mrEscalationFieldGroup),I.mrEscalationFieldGroupLarge)},{children:[n(f,{size:"small",options:He,value:t.before_or_after,onChange:function(e,i){return function(e,i){ai(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:Oe}))]})),n("div",e({style:I.mrEscalationFieldGroupSmall},{children:n(w,{value:t.escalation_reminder_frequency,onChange:function(e){return function(e,i){ai(e,"escalation_reminder_frequency",i)}(r,e)},options:je,suffix:"hours"})}))]}))]}))})]}))]}))}))]}))]}))}),t.id||r)})}))}))}))]})),Ke&&i(C.div,e({initial:{width:ni?"345px":"43px"},animate:{width:ni?"345px":"43px"},transition:{duration:.3},style:I.mrCalendarPanel},{children:[ni?n(S,{assignees:N}):n("div",e({style:I.mrCalendarCollapsed},{children:n(u,{style:I.mrIconCalendar})})),i("button",e({onClick:function(){return ti(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(ni?m:v,{style:I.mrIconChevronToggle})]}))]}))]}))]}))};export{Y 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 b,AnimatePresence as x,motion as C,Reorder as F}from"framer-motion";import k from"@mui/icons-material/DragIndicator";import{LocalizationProvider as D,DatePicker as R}from"@mui/x-date-pickers";import{AdapterDayjs as E}from"@mui/x-date-pickers/AdapterDayjs";import w from"./components/ReminderFrequencyAutocomplete.js";import S from"./components/AssigneeCalendarView.js";import _ from"dayjs";import{styles as I}from"./styles/ManageReminder.style.js";var A=["Assignee 1","Assignee 2","Assignee 3"],B=[{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"}],L=[{id:"1",name:"Assignee 1",color:"#C11574",bg:"#FDF2F8",startDate:new Date("2026-11-09"),dueDate:new Date("2026-12-01")},{id:"2",name:"Assignee 2",color:"#3538CD",bg:"#EEF4FF",startDate:new Date("2026-11-21"),dueDate:new Date("2026-12-03")},{id:"3",name:"Assignee 3",color:"#FF6058",bg:"#FFF7ED",startDate:new Date("2026-12-01"),dueDate:new Date("2026-12-03")}],P=[{bg:"#DBEAFE",text:"#1E40AF"},{bg:"#CCFBF1",text:"#0D9488"},{bg:"#DCFCE7",text:"#166534"}],O=[{initials:"OR",name:"Olivia Rhye",checked:!1,bg:"#DBEAFE",text:"#1D4ED8"},{initials:"DM",name:"Daniela Mark",checked:!1,bg:"#CFFAFE",text:"#0F766E"},{initials:"JB",name:"Jenna Beckner",checked:!1,bg:"#D1FAE5",text:"#059669"}],M=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"}},Y=function(Y){var j=Y.data,N=Y.schedules,H=Y.setSchedules,z=Y.remainderOwners,W=Y.setRemainderOwners,G=Y.labels,V=void 0===G?A:G,U=Y.colors,J=void 0===U?B:U,Z=Y.chipColor,K=void 0===Z?T:Z,Q=Y.assignees,X=void 0===Q?L:Q,$=Y.fallbackRecipients,ee=void 0===$?O:$,ie=Y.recipientsColor,ne=void 0===ie?P:ie,te=Y.manualReminderTitle,re=void 0===te?"Send Manual Reminder Now":te,oe=Y.manualReminderDescription,le=void 0===oe?"Immediately notify the assignees about this document.":oe;Y.lastReminderText;var de=Y.selectRecipientsLabel,ae=void 0===de?"Select recipients:":de,se=Y.previewEmailButtonLabel,ce=void 0===se?"Preview Email":se,ue=Y.sendNowButtonLabel,me=void 0===ue?"Send Now":ue,ve=Y.reminderSuccessTitle,he=void 0===ve?"Reminder sent successfully!":ve,ye=Y.reminderSuccessDescription,pe=void 0===ye?"Email notification sent to assignees.":ye,fe=Y.escalationTitle,ge=void 0===fe?"Escalation and Auto Reminder Setup":fe;Y.escalationTitleTooltip;var be=Y.escalationDescription,xe=void 0===be?"Configure Auto reminder settings for all assignees.":be;Y.configureAutoReminderText;var Ce=Y.getDynamicStatement,Fe=void 0===Ce?M:Ce,ke=Y.reminderStartDateLabel,De=void 0===ke?"Reminder Start Date":ke,Re=Y.documentDueDateLabel,Ee=void 0===Re?"Document Due Date":Re,we=Y.reminderFrequencyLabel,Se=void 0===we?"Reminder Frequency":we,_e=Y.escalationRemindersLabel,Ie=void 0===_e?"Escalation Reminders":_e;Y.escalationTooltip;var Ae=Y.escalationConditionText,Be=void 0===Ae?"If the document is still pending, start escalation reminders":Ae,Te=Y.daysText,Le=void 0===Te?"days":Te,Pe=Y.dueDataAndRepeatText,Oe=void 0===Pe?"due date and repeat every":Pe,Me=Y.reminderFrequencyOptions,qe=void 0===Me?["12 hours","24 hours","48 hours","72 hours","Custom"]:Me,Ye=Y.escalationFrequencyOptions,je=void 0===Ye?["1/2 hour","1 hour","4 hours","6 hours","12 hours","Custom"]:Ye,Ne=Y.beforeAfterOptions,He=void 0===Ne?["After","Before"]:Ne,ze=Y.handelSendNow,We=Y.showPreviewEmail,Ge=void 0===We||We,Ve=t(!1),Ue=Ve[0],Je=Ve[1],Ze=t(!1),Ke=Ze[0],Qe=Ze[1],Xe=t(!1),$e=Xe[0],ei=Xe[1],ii=t(!0),ni=ii[0],ti=ii[1],ri=t(ee),oi=ri[0],li=ri[1],di=b(),ai=function(i,n,t){W(function(r){return r.map(function(r,o){var l;return o===i?e(e({},r),((l={})[n]=t,l)):r})})},si=function(e,i){ai(e,"reminder_start_date",i)},ci=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},ui=function(e,i,n){if(!e||!n)return[];var t=ci(n);if(!t||t<=0)return[];for(var r=[],o=_(e).valueOf(),l=i?_(i).valueOf():_(e).add(45,"day").valueOf(),d=0;o<=l&&d<150;)r.push(_(o).toISOString()),o+=t,d++;return r},mi=function(e,i,n,t){if(!(e&&i&&t&&n))return[];var r=ci(t);if(!r)return[];var o,l=_(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(_(s).toISOString()),s+=r;return a},vi=function(e){return e?e.split(" ").map(function(e){return e[0]}).join("").toUpperCase():""};r(function(){var e=(null==j?void 0:j.due_at)||"",i=Object.values((null==j?void 0:j.assignee)||{}),n=null==z?void 0:z.map(function(n,t){var r,o=i[t]||X.find(function(e){return e.id===String(n.id)}),l=(null===(r=null==J?void 0:J[t%J.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:ui(n.reminder_start_date,e,n.reminder_frequency),escalations:mi(e,n.days,n.before_or_after,n.escalation_reminder_frequency)}});H(n)},[z,null==j?void 0:j.due_at,null==j?void 0:j.assignee]),r(function(){(null==j?void 0:j.assignee)&&li(function(e){var i=Object.values(j.assignee).filter(function(e){return e&&Object.keys(e).length>0}).map(function(i,n){var t=e.find(function(e){return e.name===i.name});return{name:i.name,checked:!!t&&t.checked,recipientsColor:(null==ne?void 0:ne[n])||P[n%P.length]}});return i.length>0?i:ee})},[null==j?void 0:j.assignee,null==j?void 0:j.due_at]);var hi=Object.values((null==j?void 0:j.assignee)||{}).filter(function(e){return null==e?void 0:e.name});return i("div",e({style:e(e({},I.mrContainer),{width:"100%",minWidth:"850px"})},{children:[i("div",e({style:I.mrSectionBox},{children:[i("div",e({style:e(e({},I.mrSectionHeader),{cursor:"pointer"}),onClick:function(){return Je(function(e){return!e})}},{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:re}))]})),n("div",e({style:I.mrSectionDescription},{children:le}))]})),n("div",e({style:I.mrSectionHeaderRight},{children:n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Je(function(e){return!e})},style:I.mrChevronButton},{children:n(l,{style:e(e({},I.mrChevronIcon),Ue?I.mrChevronRotated:{})})}))}))]})),n(x,{children:$e&&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:he})),n("div",e({style:I.mrSuccessDescription},{children:pe}))]}))]}))})]})),n(x,{children:Ue&&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:Ue?"auto":"none"})},{children:[i("div",e({style:I.mrRecipientsSection},{children:[n("div",e({style:I.mrRecipientsLabel},{children:ae})),n("div",e({style:I.mrRecipientsGrid},{children:oi.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=P[r%P.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=P[r%P.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 li(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:vi(t.name)})),n("div",e({style:I.mrRecipientName},{children:t.name}))]}))]}),t.name)})}))]})),i("div",e({style:I.mrActionsSection},{children:[Ge&&i("button",e({onClick:function(e){e.stopPropagation()},type:"button",style:e(e({},I.mrActionButton),I.mrActionButtonSecondary)},{children:[n(a,{style:I.mrIconAction}),ce]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),ei(!0),setTimeout(function(){return ei(!1)},3e3);var i=oi.filter(function(e){return e.checked});ze(N,z.filter(function(e){return i.some(function(i){return i.id===e.id})}))},style:e(e({},I.mrActionButton),I.mrActionButtonPrimary)},{children:me}))]}))]}))})]})),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(),Qe(function(e){return!e})}},{children:[i("div",e({style:I.mrEscalationHeader},{children:[i("div",e({style:I.mrEscalationTitleWrapper},{children:[n("div",e({style:I.mrEscalationTitleText},{children:ge})),n("div",e({style:I.mrTooltipIcon},{children:n(s,{stroke:"#64748B",style:I.mrIconInfo})}))]})),i("div",e({style:I.mrEscalationActions},{children:[Ge&&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:ce}))]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Qe(function(e){return!e})},style:I.mrChevronButton},{children:n(l,{style:e(e({},I.mrChevronIcon),Ke?I.mrChevronRotated:{})})}))]}))]})),n("div",e({style:I.mrEscalationDescription},{children:xe}))]})),n(x,e({initial:!1},{children:Ke&&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(F.Group,e({axis:"y",values:z||[],onReorder:function(e){W(e)},layoutScroll:!0,style:I.mrReorderGroup},{children:null==z?void 0:z.map(function(t,r){var o,d,a,u,m=hi[r]||ee[r],v=(null===(o=null==J?void 0:J[r])||void 0===o?void 0:o.bg)||"#FDF2FA",b=(null===(d=null==J?void 0:J[r])||void 0===d?void 0:d.text)||"#C11574",S=(null===(a=null==K?void 0:K[r])||void 0===a?void 0:a.bg)||"transparent",A=(null===(u=null==K?void 0:K[r])||void 0===u?void 0:u.text)||"inherit";return n(F.Item,e({value:t,dragControls:di,layout:"position"},{children: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==V?void 0:V[r])||"Assignee ".concat(r+1),sx:{backgroundColor:v,minWidth:90,color:b,fontWeight:500}})}))})),i("div",e({style:I.mrReminderContent},{children:[n("div",e({style:I.mrDragHandle},{children:n(k,{onPointerDown:function(e){return di.start(e)},sx:{color:"#9e9e9e"}})})),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:vi(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:S})},{children:n("span",e({style:e(e({},I.mrReminderStatementText),{color:A})},{children:Fe(t)}))}))]})),i("div",e({style:I.mrReminderDateFields},{children:[i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:De})),i("div",e({style:I.mrReminderDatePicker},{children:[n(D,e({dateAdapter:E},{children:n(R,{value:t.reminder_start_date?_(t.reminder_start_date):null,disablePast:!0,format:"MM/DD/YYYY",onChange:function(e){if(e&&_(e).isValid()){if(_(e).isBefore(_(),"day"))return;si(r,_(e).toISOString())}else si(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==j?void 0:j.due_at)?_(j.due_at).format("MM/DD/YYYY"):""}))]})),i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:Se})),i("div",e({style:I.mrReminderFrequency},{children:[n("span",e({style:I.mrReminderFrequencyText},{children:"Every"})),n(w,{value:t.reminder_frequency,onChange:function(e){return function(e,i){ai(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){ai(e,"is_escalation_reminder",i),i||(ai(e,"days",{type:"preset",value:""}),ai(e,"escalation_reminder_frequency",{type:"preset",value:""}),ai(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:Be})),i("div",e({style:I.mrEscalationFields},{children:[i("div",e({style:I.mrEscalationFieldGroup},{children:[n(w,{value:t.days,onChange:function(e){return function(e,i){ai(e,"days",i)}(r,e)}}),n("div",e({style:I.mrEscalationFieldText},{children:Le}))]})),i("div",e({style:e(e({},I.mrEscalationFieldGroup),I.mrEscalationFieldGroupLarge)},{children:[n(f,{size:"small",options:He,value:t.before_or_after,onChange:function(e,i){return function(e,i){ai(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:Oe}))]})),n("div",e({style:I.mrEscalationFieldGroupSmall},{children:n(w,{value:t.escalation_reminder_frequency,onChange:function(e){return function(e,i){ai(e,"escalation_reminder_frequency",i)}(r,e)},options:je,suffix:"hours"})}))]}))]}))})]}))]}))}))]}))]}))}),t.id||r)})}))}))}))]})),Ke&&i(C.div,e({initial:{width:ni?"345px":"43px"},animate:{width:ni?"345px":"43px"},transition:{duration:.3},style:I.mrCalendarPanel},{children:[ni?n(S,{assignees:N}):n("div",e({style:I.mrCalendarCollapsed},{children:n(u,{style:I.mrIconCalendar})})),i("button",e({onClick:function(){return ti(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(ni?m:v,{style:I.mrIconChevronToggle})]}))]}))]}))]}))};export{Y as ManageReminders};
|
|
2
2
|
//# sourceMappingURL=ManageReminders.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as r}from"react";import{X as a}from"lucide-react";import l from"./CustomCheckbox.js";var
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as r}from"react";import{X as a}from"lucide-react";import l from"./CustomCheckbox.js";var p={overlay:{position:"absolute",inset:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(17, 24, 39, 0.45)",backdropFilter:"blur(3px)",WebkitBackdropFilter:"blur(3px)",borderRadius:"inherit"},popup:{position:"relative",background:"#ffffff",border:"0.5px solid #E5E7EB",borderRadius:"16px",padding:"20px",width:"380px",boxShadow:"0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.07)",display:"flex",flexDirection:"column",gap:"16px"},topRow:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"12px"},userInfo:{display:"flex",flexDirection:"column",gap:"2px"},userName:{fontSize:"15px",fontWeight:600,color:"#111827"},userEmail:{fontSize:"13px",color:"#6B7280"},levelBadge:{display:"flex",alignItems:"center",gap:"5px",background:"#EDE9FE",border:"1px solid #C4B5FD",borderRadius:"8px",padding:"4px 10px",fontSize:"12px",fontWeight:500,color:"#5B21B6",whiteSpace:"nowrap",flexShrink:0},divider:{border:"none",borderTop:"0.5px solid #E5E7EB"},label:{fontSize:"12px",fontWeight:500,color:"#6B7280",marginBottom:"6px",display:"flex",alignItems:"center",gap:"5px"},optionalTag:{fontSize:"11px",fontWeight:400,color:"#9CA3AF",background:"#F9FAFB",border:"0.5px solid #E5E7EB",borderRadius:"20px",padding:"1px 7px"},textarea:{width:"100%",minHeight:"70px",resize:"vertical",fontSize:"13px",fontFamily:"inherit",color:"#111827",background:"#F9FAFB",border:"0.5px solid #E5E7EB",borderRadius:"8px",padding:"10px 12px",lineHeight:1.6,outline:"none",boxSizing:"border-box"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",marginTop:"2px"},btnBack:{padding:"10px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"transparent",color:"#6B7280",border:"0.5px solid #D1D5DB",fontWeight:500,whiteSpace:"nowrap"},btnLater:{padding:"8px 14px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"#F3F4F6",color:"#374151",border:"0.5px solid #D1D5DB",fontWeight:500,whiteSpace:"nowrap"},btnNow:{padding:"8px 16px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"#5B4FE9",color:"#fff",border:"none",fontWeight:500,whiteSpace:"nowrap"}};function d(d){var s,c,f=d.user,x=d.accessLevel,u=d.wrapperEl,g=d.onBackToEditing,h=d.onSendLater,b=d.onSendNow,y=d.userLevel,m=o(null!==(s=f.notes)&&void 0!==s?s:""),v=m[0],w=m[1],E=i(null);r(function(){if(u){var e=u.style.position;return e&&"static"!==e||(u.style.position="relative"),function(){u.style.position=e}}},[u]),r(function(){var e=function(e){"Escape"===e.key&&g()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[g]);var k=e(e({},p.overlay),u?{}:{position:"fixed"}),S=o(null!==(c=f.sendMailNow)&&void 0!==c&&c),B=S[0],F=S[1];return t("div",e({style:k,onMouseDown:function(e){e.target===e.currentTarget&&g()}},{children:n("div",e({ref:E,style:p.popup,role:"dialog","aria-modal":"true","aria-label":"Add notes for ".concat(f.name)},{children:[n("div",e({style:p.topRow},{children:[n("div",e({style:p.userInfo},{children:[n("span",e({style:{fontWeight:600}},{children:["Add a note for ",f.email]})),n("span",e({style:e(e({},p.userEmail),{alignItems:"center",gap:6,display:"flex"})},{children:[" ",n("span",{children:[y.head," - ",y.title," "]})," ",t("span",e({style:{fontSize:20}},{children:" • "}))," ",n("span",{children:[" ",x," "]})]})),x&&t("span",{style:e({},p.userEmail)})]})),t("button",e({style:p.btnBack,onClick:g,title:"Discard notes and go back"},{children:t(a,{width:14,height:14})}))]})),t("div",{children:t("textarea",{style:p.textarea,placeholder:"Write a note, e.g. context on why this clause needs review",value:v,onChange:function(e){return w(e.target.value)},autoFocus:!0})}),n("div",e({style:{display:"flex",gap:12,fontSize:14}},{children:[n("span",e({style:{alignItems:"center",display:"flex",justifyContent:"center",gap:6}},{children:[t(l,{getter:!0===B,setter:function(){return F(!0)},size:14}),t("span",{children:"Notify now"})]})),n("span",e({style:{alignItems:"center",display:"flex",justifyContent:"center",gap:6}},{children:[t(l,{getter:!1===B,setter:function(){return F(!1)},size:14}),t("span",{children:"Notify when ready for review"})]}))]})),t("div",e({style:p.footer},{children:t("button",e({style:p.btnNow,onClick:function(){return B?b(v):h(v)},title:"Save notes and notify now"},{children:"Save Note"}))}))]}))}))}export{d as AddUserPopup};
|
|
2
2
|
//# sourceMappingURL=AddUserPopup.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as t}from"../../../_virtual/_tslib.js";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useRef as l}from"react";import{DATE_PICKER_STYLES as i}from"../styles/AssignLevelsDatePickerStyles.js";function
|
|
1
|
+
import{__assign as t}from"../../../_virtual/_tslib.js";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useRef as l}from"react";import{DATE_PICKER_STYLES as i}from"../styles/AssignLevelsDatePickerStyles.js";function n(n){var o=n.value,a=n.onSet,s=n.maxDate,u=l(null);return e("div",t({style:i.wrapper,onClick:function(){var t,e;return null===(e=null===(t=u.current)||void 0===t?void 0:t.showPicker)||void 0===e?void 0:e.call(t)}},{children:[r("span",t({style:i.placeholder},{children:o?o.toLocaleDateString("en-GB"):"--/--/----"})),r("input",{ref:u,type:"date",max:s?s.toISOString().split("T")[0]:void 0,style:i.input,value:o?o.toISOString().split("T")[0]:"",onChange:function(t){var e=t.target.value;a(e?new Date(e):null)}})]}))}export{n as default};
|
|
2
2
|
//# sourceMappingURL=AssignLevelsDatePicker.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useRef as i}from"react";import{Calendar as o}from"lucide-react";function n(n){var l=n.value,a=n.onChange,d=n.placeholder,p=void 0===d?"dd/mm/yyyy":d,u=i(null);return t("div",e({onClick:function(){var e,t;null===(t=null===(e=u.current)||void 0===e?void 0:e.showPicker)||void 0===t||t.call(e)},style:{position:"relative",width:"100%",height:"35px",padding:"0 12px",borderRadius:"12px",background:"#F3F4F6",border:"1px solid #C7CDD5",display:"flex",gap:60,alignItems:"center",cursor:"pointer",boxSizing:"border-box"}},{children:[r("input",{ref:u,type:"date",value:l,onChange:function(e){return a(e.target.value?new Date(e.target.value):null)},style:{position:"absolute",opacity:0,pointerEvents:"none"}}),r("span",e({style:{fontSize:"14px",fontWeight:400,color:l?"#111827":"#667085"}},{children:l?new Date(l).toLocaleDateString("en-GB"):p})),r("div",e({style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:"6px"}},{children:r(o,{size:18,color:"#667085",strokeWidth:2})}))]}))}export{n as default};
|
|
2
2
|
//# sourceMappingURL=CustomDatePicker.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";import{ChevronDown as t}from"lucide-react";import{useState as o,useRef as i,useEffect as l}from"react";function a(a){var
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";import{ChevronDown as t}from"lucide-react";import{useState as o,useRef as i,useEffect as l}from"react";function a(a){var c=a.value,s=a.options,d=a.onChange,u=o(!1),p=u[0],f=u[1],x=i(null),m=s.find(function(e){return e.label===c})||s[0];return l(function(){function e(e){x.current&&!x.current.contains(e.target)&&f(!1)}return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]),n("div",e({ref:x,style:{position:"relative",backgroundColor:"#FFFFFF",borderRadius:"5px"}},{children:[n("div",e({onClick:function(){return f(!p)},style:{display:"flex",alignItems:"center",gap:"6px",cursor:"pointer",background:"transparent",padding:"2px 4px",userSelect:"none"}},{children:[m.icon&&r("span",e({style:{display:"flex",alignItems:"center"}},{children:m.icon})),r("span",e({style:{fontSize:"14px"}},{children:m.label})),r(t,{size:14,style:{flexShrink:0}})]})),p&&r("div",e({style:{position:"absolute",top:"100%",left:0,marginTop:"4px",background:"white",border:"1px solid #CBD5E1",borderRadius:"6px",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1)",zIndex:50,minWidth:"140px",overflow:"hidden"}},{children:s.map(function(t,o){return n("div",e({onClick:function(){d(t.label),f(!1)},style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",cursor:"pointer",fontSize:"14px",backgroundColor:c===t.label?"#F1F5F9":"transparent"},onMouseEnter:function(e){return e.currentTarget.style.backgroundColor="#F8FAFC"},onMouseLeave:function(e){return e.currentTarget.style.backgroundColor=c===t.label?"#F1F5F9":"transparent"}},{children:[t.icon&&r("span",e({style:{display:"flex",alignItems:"center"}},{children:t.icon})),r("span",{children:t.label})]}),o)})}))]}))}export{a as default};
|
|
2
2
|
//# sourceMappingURL=CustomDropdown.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as n,__assign as i,__spreadArray as
|
|
1
|
+
import{__awaiter as e,__generator as n,__assign as i,__spreadArray as r}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as l,useEffect as d}from"react";import a from"./CustomDropdown.js";import{AddUserPopup as s}from"./AddUserPopup.js";function u(u){var p,c,v,f,m,x=this,g=u.assignees,h=u.onAssigneeChange,C=u.accessLevelOptions,b=u.fetchUsers,y=u.wrapperEl,w=u.levelDetails,k=l(""),L=k[0],B=k[1],D=l([]),E=D[0],S=D[1],M=l(null),T=M[0],j=M[1];d(function(){if(L.trim()){var i=setTimeout(function(){return e(x,void 0,void 0,function(){var e,i,r;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,b(L)];case 1:return e=n.sent(),i=new Set(g.map(function(e){return e.id})),S(e.filter(function(e){return!i.has(e.id)})),[3,3];case 2:return r=n.sent(),console.error("[LevelData]: fetchUser error:",r),S([]),[3,3];case 3:return[2]}})})},300);return function(){return clearTimeout(i)}}S([])},[L,g]);return t("div",i({style:{borderTop:"1px solid #CBD5E1",padding:"20px"}},{children:[o("span",i({style:{fontWeight:600,marginBottom:"8px",fontSize:"14px"}},{children:"Assignee Emails"})),t("div",i({style:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"8px",marginTop:"10px",display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"}},{children:[g.map(function(e){var n,r,l,d=!!e.notes&&"string"==typeof e.notes&&!!e.notes.trim();return t("div",i({style:{display:"flex",alignItems:"center",gap:"6px",background:"#E9D5FF",borderRadius:"10px",padding:"2px 8px",fontSize:"12px"}},{children:[o("span",i({style:{padding:"4px"}},{children:e.name})),o(a,{value:null!==(l=null!==(n=e.accessLevel)&&void 0!==n?n:null===(r=C[0])||void 0===r?void 0:r.label)&&void 0!==l?l:"",options:C,onChange:function(n){return r=e.id,t=n,void h(g.map(function(e){return e.id===r?i(i({},e),{accessLevel:t}):e}));var r,t}}),o("div",i({style:{position:"relative",display:"inline-flex",backgroundColor:"white",borderRadius:"3px",padding:1}},{children:o("button",i({type:"button",onClick:function(){return function(e){j(i({},e))}(e)},style:{border:"none",background:"transparent",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center",color:d?"#7C3AED":"#C4B5FD"}},{children:o("svg",i({width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M3.03353 3.90755H5.9502M3.03353 5.94922H7.7002M4.59905 9.44922H8.4002C9.38029 9.44922 9.87033 9.44922 10.2447 9.25848C10.574 9.0907 10.8417 8.82299 11.0095 8.4937C11.2002 8.11936 11.2002 7.62931 11.2002 6.64922V3.49922C11.2002 2.51913 11.2002 2.02908 11.0095 1.65474C10.8417 1.32545 10.574 1.05774 10.2447 0.889957C9.87033 0.699219 9.38029 0.699219 8.4002 0.699219H3.5002C2.5201 0.699219 2.03006 0.699219 1.65571 0.889957C1.32643 1.05774 1.05871 1.32545 0.890934 1.65474C0.700195 2.02908 0.700195 2.51913 0.700195 3.49922V10.8116C0.700195 11.1224 0.700195 11.2778 0.763912 11.3577C0.819325 11.4271 0.903352 11.4675 0.992177 11.4674C1.09431 11.4673 1.21567 11.3702 1.45839 11.176L2.8499 10.0628C3.13416 9.83538 3.27629 9.72167 3.43456 9.64082C3.57498 9.56908 3.72444 9.51665 3.8789 9.48495C4.053 9.44922 4.23502 9.44922 4.59905 9.44922Z",stroke:"#98A2B3","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})}))}))})),o("button",i({style:{border:"none",background:"transparent",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center",fontSize:"12px"},onClick:function(){return n=e.id,h(g.filter(function(e){return e.id!==n})),void((null==T?void 0:T.id)===n&&j(null));var n},"aria-label":"Remove ".concat(e.name)},{children:"✕"}))]}),e.id)}),o("input",{type:"text",value:L,placeholder:"Search users...",onChange:function(e){return B(e.target.value)},style:{border:"none",outline:"none",flex:1,minWidth:"150px",fontSize:"12px"}})]})),E.length>0&&o("div",i({style:{border:"1px solid #CBD5E1",borderRadius:"8px",marginTop:"8px"}},{children:E.map(function(e){return t("div",i({style:{padding:"8px",cursor:"pointer"},onClick:function(){return function(e){var n,t,o,l;g.some(function(n){return n.id===e.id})||(h(r(r([],g,!0),[i(i({},e),{accessLevel:null!==(t=null===(n=C[0])||void 0===n?void 0:n.label)&&void 0!==t?t:"",notes:"",sendMailNow:!1})],!1)),B(""),S([]),j(i(i({},e),{accessLevel:null!==(l=null===(o=C[0])||void 0===o?void 0:o.label)&&void 0!==l?l:""})))}(e)}},{children:[e.name,e.email&&o("span",i({style:{marginLeft:"8px",color:"#6B7280",fontSize:"11px"}},{children:e.email}))]}),e.id)})})),T&&o(s,{user:T,userLevel:{head:null!==(p=null==w?void 0:w.head)&&void 0!==p?p:"",title:null!==(c=null==w?void 0:w.title)&&void 0!==c?c:""},accessLevel:null!==(m=null!==(v=T.accessLevel)&&void 0!==v?v:null===(f=C[0])||void 0===f?void 0:f.label)&&void 0!==m?m:"",wrapperEl:y,onBackToEditing:function(){T&&(h(g.map(function(e){return e.id===T.id?i(i({},e),{notes:"",sendMailNow:!1}):e})),j(null))},onSendLater:function(e){T&&(h(g.map(function(n){return n.id===T.id?i(i({},n),{notes:e,sendMailNow:!1}):n})),j(null))},onSendNow:function(e){T&&(h(g.map(function(n){return n.id===T.id?i(i({},n),{notes:e,sendMailNow:!0}):n})),j(null))}})]}))}export{u as default};
|
|
2
2
|
//# sourceMappingURL=LevelData.js.map
|
package/dist/types/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAyE1B,iBAAS,GAAG,sBAeX;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -5,6 +5,6 @@ interface ExtendedLevelAccordionProps extends LevelAccordionProps {
|
|
|
5
5
|
onDeleteLevel?: () => void;
|
|
6
6
|
finalApprovalDueDate?: Date | null;
|
|
7
7
|
}
|
|
8
|
-
export default function LevelAccordion({ level, id, accessLevelOptions, fetchUsers, onToggleMandatory, onDueDateChange, onAssigneesChange, onTitleChange, finalApprovalDueDate
|
|
8
|
+
export default function LevelAccordion({ level, id, accessLevelOptions, fetchUsers, onToggleMandatory, onDueDateChange, onAssigneesChange, onTitleChange, finalApprovalDueDate }: ExtendedLevelAccordionProps): React.JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=AssignLevelAccordions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignLevelAccordions.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignLevelAccordions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAKpD,UAAU,2BAA4B,SAAQ,mBAAmB;IAC7D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,oBAAoB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACnC,KAAK,EACL,EAAE,EACF,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,oBAAoB,
|
|
1
|
+
{"version":3,"file":"AssignLevelAccordions.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignLevelAccordions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAKpD,UAAU,2BAA4B,SAAQ,mBAAmB;IAC7D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,oBAAoB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACnC,KAAK,EACL,EAAE,EACF,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACvB,EAAE,2BAA2B,qBAoK7B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AssignReminderLevelsProps } from "./types/types";
|
|
3
|
-
declare function AssignReminderLevels({ title, levels, requireFinalApproval, additionalInfo, setLevels, setRequireFinalApproval, fetchUsers, accessLevelOptions, customInfoIcon, onValidationError, customStyles, totalLevels, finalApprovalDueDate
|
|
3
|
+
declare function AssignReminderLevels({ title, levels, requireFinalApproval, additionalInfo, setLevels, setRequireFinalApproval, fetchUsers, accessLevelOptions, customInfoIcon, onValidationError, customStyles, totalLevels, finalApprovalDueDate }: AssignReminderLevelsProps): React.JSX.Element;
|
|
4
4
|
export { AssignReminderLevels };
|
|
5
5
|
//# sourceMappingURL=AssignReminderLevels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignReminderLevels.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderLevels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAS,MAAM,eAAe,CAAC;AAsBjE,iBAAS,oBAAoB,CAAC,EAC1B,KAAK,EACL,MAAW,EACX,oBAA4B,EAC5B,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,UAAU,EACV,kBAAiD,EACjD,cAAc,EACd,iBAAiB,EACjB,YAAiB,EACjB,WAAW,EACX,oBAAoB,
|
|
1
|
+
{"version":3,"file":"AssignReminderLevels.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderLevels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAS,MAAM,eAAe,CAAC;AAsBjE,iBAAS,oBAAoB,CAAC,EAC1B,KAAK,EACL,MAAW,EACX,oBAA4B,EAC5B,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,UAAU,EACV,kBAAiD,EACjD,cAAc,EACd,iBAAiB,EACjB,YAAiB,EACjB,WAAW,EACX,oBAAoB,EACvB,EAAE,yBAAyB,qBAoO3B;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AssignReminderWrapperProps } from "./types/types";
|
|
3
|
-
declare function AssignReminderWrapper({ metadata, reviewData, levels, setLevels, requireFinalApproval, setRequireFinalApproval, approvalDueDate, setApprovalDueDate, onClose, fetchUsers, onSave, onValidationError, totalLevels, customStyles, isSaving,
|
|
3
|
+
declare function AssignReminderWrapper({ metadata, reviewData, levels, setLevels, requireFinalApproval, setRequireFinalApproval, approvalDueDate, setApprovalDueDate, onClose, fetchUsers, onSave, onValidationError, totalLevels, customStyles, isSaving, onRequireFinalApproval, isOwner, remindersData, remainderOwners: remainderOwnersProp, setRemainderOwners: setRemainderOwnersProp, schedules: schedulesProp, setSchedules: setSchedulesProp, handelSendNow, showPreviewEmail, tabName, reminderLabels, reminderColors, reminderChipColor, reminderAssignees, reminderFallbackRecipients, reminderRecipientsColor, manualReminderTitle, manualReminderDescription, lastReminderText, selectRecipientsLabel, previewEmailButtonLabel, sendNowButtonLabel, reminderSuccessTitle, reminderSuccessDescription, escalationTitle, escalationTitleTooltip, escalationDescription, configureAutoReminderText, getDynamicStatement, reminderStartDateLabel, documentDueDateLabel, reminderFrequencyLabel, escalationRemindersLabel, escalationTooltip, escalationConditionText, daysText, dueDataAndRepeatText, reminderFrequencyOptions, escalationFrequencyOptions, beforeAfterOptions, }: AssignReminderWrapperProps): React.JSX.Element;
|
|
4
4
|
export { AssignReminderWrapper };
|
|
5
5
|
//# sourceMappingURL=AssignReminderWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignReminderWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAMnE,OAAO,EACH,0BAA0B,EAK7B,MAAM,eAAe,CAAC;AAwDvB,iBAAS,qBAAqB,CAAC,EAC3B,QAAa,EACb,UAAe,EACf,MAAM,EACN,SAAS,EACT,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,OAAO,EACP,UAAU,EACV,MAAM,EACN,iBAAiB,EACjB,WAAW,EACX,YAAiB,EACjB,QAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"AssignReminderWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAMnE,OAAO,EACH,0BAA0B,EAK7B,MAAM,eAAe,CAAC;AAwDvB,iBAAS,qBAAqB,CAAC,EAC3B,QAAa,EACb,UAAe,EACf,MAAM,EACN,SAAS,EACT,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,OAAO,EACP,UAAU,EACV,MAAM,EACN,iBAAiB,EACjB,WAAW,EACX,YAAiB,EACjB,QAAgB,EAChB,sBAAsB,EACtB,OAAc,EAGd,aAAa,EACb,eAAe,EAAE,mBAAmB,EACpC,kBAAkB,EAAE,sBAAsB,EAC1C,SAAS,EAAE,aAAa,EACxB,YAAY,EAAE,gBAAgB,EAC9B,aAAa,EACb,gBAAgB,EAChB,OAAO,EAGP,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,EACjB,uBAAuB,EACvB,QAAQ,EACR,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,GACrB,EAAE,0BAA0B,qBAob5B;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -8,9 +8,8 @@ interface AddUserPopupProps {
|
|
|
8
8
|
onSendLater: (notes: string) => void;
|
|
9
9
|
onSendNow: (notes: string) => void;
|
|
10
10
|
userLevel: Record<string, string>;
|
|
11
|
-
disabled?: boolean;
|
|
12
11
|
}
|
|
13
|
-
declare function AddUserPopup({ user, accessLevel, wrapperEl, onBackToEditing, onSendLater, onSendNow, userLevel,
|
|
12
|
+
declare function AddUserPopup({ user, accessLevel, wrapperEl, onBackToEditing, onSendLater, onSendNow, userLevel, }: AddUserPopupProps): React.JSX.Element;
|
|
14
13
|
export { AddUserPopup };
|
|
15
14
|
export type { AddUserPopupProps };
|
|
16
15
|
//# sourceMappingURL=AddUserPopup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddUserPopup.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/AddUserPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,UAAU,iBAAiB;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"AddUserPopup.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/AddUserPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,UAAU,iBAAiB;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AA+ID,iBAAS,YAAY,CAAC,EAClB,IAAI,EACJ,WAAW,EACX,SAAS,EACT,eAAe,EACf,WAAW,EACX,SAAS,EACT,SAAS,GACZ,EAAE,iBAAiB,qBAmGnB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare function AssignLevelDatePicker({ value, onSet, maxDate
|
|
2
|
+
declare function AssignLevelDatePicker({ value, onSet, maxDate }: {
|
|
3
3
|
value: Date | null;
|
|
4
4
|
onSet: (val: Date | null) => void;
|
|
5
5
|
id: string;
|
|
6
6
|
maxDate: Date | null;
|
|
7
|
-
disabled?: boolean;
|
|
8
7
|
}): import("react").JSX.Element;
|
|
9
8
|
export default AssignLevelDatePicker;
|
|
10
9
|
//# sourceMappingURL=AssignLevelsDatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignLevelsDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/AssignLevelsDatePicker.tsx"],"names":[],"mappings":";AAIA,iBAAS,qBAAqB,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,OAAO,
|
|
1
|
+
{"version":3,"file":"AssignLevelsDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/AssignLevelsDatePicker.tsx"],"names":[],"mappings":";AAIA,iBAAS,qBAAqB,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,OAAO,EACR,EAAE;IACD,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;CACtB,+BA2BA;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -3,8 +3,7 @@ interface CustomDatePickerProps {
|
|
|
3
3
|
value: string;
|
|
4
4
|
onChange: React.Dispatch<React.SetStateAction<Date | null>>;
|
|
5
5
|
placeholder?: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
6
|
}
|
|
8
|
-
export default function CustomDatePicker({ value, onChange, placeholder,
|
|
7
|
+
export default function CustomDatePicker({ value, onChange, placeholder, }: CustomDatePickerProps): React.JSX.Element;
|
|
9
8
|
export {};
|
|
10
9
|
//# sourceMappingURL=CustomDatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/CustomDatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,UAAU,qBAAqB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/CustomDatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,UAAU,qBAAqB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,WAA0B,GAC7B,EAAE,qBAAqB,qBAsEvB"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DropdownOption } from "../types/types";
|
|
3
|
-
declare function CustomDropdown({ value, options, onChange,
|
|
3
|
+
declare function CustomDropdown({ value, options, onChange, }: {
|
|
4
4
|
value: string;
|
|
5
5
|
options: DropdownOption[];
|
|
6
6
|
onChange: (newVal: string) => void;
|
|
7
|
-
disabled?: boolean;
|
|
8
7
|
}): import("react").JSX.Element;
|
|
9
8
|
export default CustomDropdown;
|
|
10
9
|
//# sourceMappingURL=CustomDropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDropdown.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/CustomDropdown.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,iBAAS,cAAc,CAAC,EACpB,KAAK,EACL,OAAO,EACP,QAAQ,
|
|
1
|
+
{"version":3,"file":"CustomDropdown.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/CustomDropdown.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,iBAAS,cAAc,CAAC,EACpB,KAAK,EACL,OAAO,EACP,QAAQ,GACX,EAAE;IACC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,+BA4FA;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -8,6 +8,6 @@ interface LevelDetails {
|
|
|
8
8
|
head: string;
|
|
9
9
|
title: string;
|
|
10
10
|
}
|
|
11
|
-
declare function LevelData({ assignees, onAssigneeChange, accessLevelOptions, fetchUsers, wrapperEl, levelDetails,
|
|
11
|
+
declare function LevelData({ assignees, onAssigneeChange, accessLevelOptions, fetchUsers, wrapperEl, levelDetails, }: LevelDataExtendedProps): import("react").JSX.Element;
|
|
12
12
|
export default LevelData;
|
|
13
13
|
//# sourceMappingURL=LevelData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LevelData.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/LevelData.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAKzD,UAAU,sBAAuB,SAAQ,cAAc;IACnD,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAED,UAAU,YAAY;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,iBAAS,SAAS,CAAC,EACf,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,YAAY,
|
|
1
|
+
{"version":3,"file":"LevelData.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/LevelData.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAKzD,UAAU,sBAAuB,SAAQ,cAAc;IACnD,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAED,UAAU,YAAY;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,iBAAS,SAAS,CAAC,EACf,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,YAAY,GACf,EAAE,sBAAsB,+BAkPxB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { AssigneeUser,
|
|
1
|
+
import { AssigneeUser, DropdownOption, FetchUsersFunction } from "./types";
|
|
2
2
|
interface LevelDataProps {
|
|
3
3
|
assignees: AssigneeUser[];
|
|
4
4
|
onAssigneeChange: (assignees: AssigneeUser[]) => void;
|
|
5
5
|
accessLevelOptions: DropdownOption[];
|
|
6
6
|
fetchUsers: FetchUsersFunction;
|
|
7
|
-
displayConfig?: AssignReminderDisplayConfig;
|
|
8
7
|
}
|
|
9
8
|
export { LevelDataProps };
|
|
10
9
|
//# sourceMappingURL=levelData.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"levelData.type.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/types/levelData.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"levelData.type.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/types/levelData.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE3E,UAAU,cAAc;IACpB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,gBAAgB,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IACtD,kBAAkB,EAAG,cAAc,EAAE,CAAC;IACtC,UAAU,EAAE,kBAAkB,CAAC;CAClC;AAED,OAAO,EAAC,cAAc,EAAC,CAAC"}
|
|
@@ -50,14 +50,6 @@ export interface SavePayload {
|
|
|
50
50
|
schedules?: any[];
|
|
51
51
|
remainderOwners?: remainderOwnerValue[];
|
|
52
52
|
}
|
|
53
|
-
export interface AssignReminderDisplayConfig {
|
|
54
|
-
disableSaveChanges?: boolean;
|
|
55
|
-
disableAddUser?: boolean;
|
|
56
|
-
disableRemoveUser?: boolean;
|
|
57
|
-
disableNotes?: boolean;
|
|
58
|
-
disableAccessLevelChange?: boolean;
|
|
59
|
-
disableDueDates?: boolean;
|
|
60
|
-
}
|
|
61
53
|
export interface AssignReminderWrapperProps {
|
|
62
54
|
metadata?: MetaData;
|
|
63
55
|
reviewData?: Record<number, Record<string, boolean>>;
|
|
@@ -75,7 +67,6 @@ export interface AssignReminderWrapperProps {
|
|
|
75
67
|
customStyles?: Record<string, React.CSSProperties>;
|
|
76
68
|
isOwner?: boolean;
|
|
77
69
|
isSaving?: boolean;
|
|
78
|
-
displayConfig?: AssignReminderDisplayConfig;
|
|
79
70
|
onRequireFinalApproval?: () => Promise<AssigneeUser>;
|
|
80
71
|
remindersData?: ManageRemindersProps["data"];
|
|
81
72
|
tabName?: string;
|
|
@@ -136,7 +127,6 @@ export interface AssignReminderLevelsProps {
|
|
|
136
127
|
customStyles?: Record<string, React.CSSProperties>;
|
|
137
128
|
totalLevels?: number;
|
|
138
129
|
finalApprovalDueDate: Date | null;
|
|
139
|
-
displayConfig?: AssignReminderDisplayConfig;
|
|
140
130
|
}
|
|
141
131
|
export interface LevelAccordionProps {
|
|
142
132
|
level: Level;
|
|
@@ -146,7 +136,6 @@ export interface LevelAccordionProps {
|
|
|
146
136
|
onToggleMandatory: () => void;
|
|
147
137
|
onDueDateChange: (date: Date | null) => void;
|
|
148
138
|
onAssigneesChange: (assignees: AssigneeUser[]) => void;
|
|
149
|
-
displayConfig?: AssignReminderDisplayConfig;
|
|
150
139
|
}
|
|
151
140
|
export type ApprovalStatus = "approved" | "rejected" | "not_started";
|
|
152
141
|
export interface LevelReviewStatus {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEzD,MAAM,WAAW,YAAY;IACzB,KAAK,EAAS,MAAM,CAAC;IACrB,IAAI,EAAU,MAAM,CAAC;IACrB,EAAE,EAAY,GAAG,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAO,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,KAAK;IAClB,UAAU,EAAG,MAAM,CAAC;IACpB,KAAK,EAAQ,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAK,IAAI,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAI,OAAO,CAAC;IACrB,SAAS,CAAC,EAAG,YAAY,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAM,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;CAC9F;AAID,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,CAAC;AAEF,MAAM,WAAW,WAAW;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAChC;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;AAE5E,MAAM,WAAW,QAAQ;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,OAAO;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,oBAAoB,EAAE,IAAI,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC;IACjB,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IACpB,eAAe,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEzD,MAAM,WAAW,YAAY;IACzB,KAAK,EAAS,MAAM,CAAC;IACrB,IAAI,EAAU,MAAM,CAAC;IACrB,EAAE,EAAY,GAAG,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAO,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,KAAK;IAClB,UAAU,EAAG,MAAM,CAAC;IACpB,KAAK,EAAQ,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAK,IAAI,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAI,OAAO,CAAC;IACrB,SAAS,CAAC,EAAG,YAAY,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAM,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;CAC9F;AAID,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,CAAC;AAEF,MAAM,WAAW,WAAW;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAChC;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;AAE5E,MAAM,WAAW,QAAQ;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,OAAO;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,oBAAoB,EAAE,IAAI,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC;IACjB,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IACpB,eAAe,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACrD,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,kBAAkB,CAAC;IAE/B,uBAAuB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACxE,kBAAkB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;IACvE,SAAS,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;IACrD,aAAa,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7C,OAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAExC,kBAAkB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC;IACjF,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAElB,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAE1C,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,eAAe,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IAEnF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,WAAW,EAAE,CAAC;IAC/B,iBAAiB,CAAC,EAAE,WAAW,EAAE,CAAC;IAClC,iBAAiB,CAAC,EAAE,cAAc,EAAE,CAAC;IACrC,0BAA0B,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/C,uBAAuB,CAAC,EAAE,WAAW,EAAE,CAAC;IAExC,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;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,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;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACzD,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;CACjC;AAED,MAAM,WAAW,yBAAyB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC1D,uBAAuB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACxE,UAAU,EAAE,kBAAkB,CAAC;IAC/B,kBAAkB,CAAC,EAAE,cAAc,EAAE,CAAC;IACtC,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,IAAI,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,cAAc,EAAE,CAAC;IACrC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C,iBAAiB,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CAC1D;AAED,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,aAAa,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,gBAAgB,EAAE,sBAAsB,EAAE,CAAC;IAC3C,MAAM,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAM,YAAY,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAO,KAAK,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7C;AAGD,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,MAAM,mBAAmB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAClD,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACpC,eAAe,EAAE,MAAM,CAAC;IACxB,6BAA6B,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC7D,sBAAsB,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,WAAW,oBAAoB;IACjC,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,CAC9B,KAAK,CAAC,cAAc,CAAC,mBAAmB,EAAE,CAAC,CAC9C,CAAC;IAGF,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;IAGvC,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;IAGpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAGnC,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,mBAAmB,KAAK,MAAM,CAAC;IAGnE,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;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACnB,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;IAC9B,aAAa,EAAE,MAAM,IAAI,CAAC;CAC7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viswa-test/creative-workspace-ui-component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57",
|
|
4
4
|
"author": "Viswa Koduru",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
|
-
"start": "
|
|
27
|
+
"start": "craco start",
|
|
28
28
|
"build": "rollup -c && npm run copy:styles",
|
|
29
29
|
"copy:styles": "mkdir -p dist/features/lsc-guidelines dist/cjs/features/lsc-guidelines && cp src/features/lsc-guidelines/theme.css dist/features/lsc-guidelines/theme.css && cp src/features/lsc-guidelines/theme.css dist/cjs/features/lsc-guidelines/theme.css",
|
|
30
30
|
"tsupBuild": "tsup src/index.ts",
|