@viswa-test/creative-workspace-ui-component 0.0.57 → 0.0.59
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/components/ReviewStatus.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/components/ReviewStatus.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/ReviewStatus.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/types/types.d.ts +5 -0
- package/dist/types/components/AssignReminders/types/types.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -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"),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],
|
|
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],w=s.useState(!1),S=w[0],q=w[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})),S?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:"0"===x?"not-allowed":"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"),
|
|
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"),l=require("./AssignLevelAccordions.js"),r=require("./components/CustomCheckbox.js"),a=require("./assets/FileCheckCorner.js"),t=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,o=s.title,c=s.levels,p=void 0===c?[]:c,_=s.requireFinalApproval,g=void 0!==_&&_,f=s.additionalInfo,v=s.setLevels,x=s.setRequireFinalApproval,h=s.fetchUsers,j=s.accessLevelOptions,A=void 0===j?d:j,y=s.customInfoIcon,m=s.onValidationError,E=s.customStyles,L=void 0===E?{}:E,S=s.totalLevels,D=s.finalApprovalDueDate,I=u.default.useState(!1),F=I[0],b=I[1],R=u.default.useMemo(function(){return Array.from({length:null!=S?S:3},function(e,n){var s;return null!==(s=p[n])&&void 0!==s?s:{title:"Level ".concat(n+1),headerName:"L ".concat(n+1),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0}})},[p,S]),T=(p.length>0?p:R).filter(function(e){return!e.isHidden});return n.jsxs("div",e.__assign({style:e.__assign({padding:"8px",display:"flex",flexDirection:"column",gap:"18px"},L.container)},{children:[n.jsxs("span",e.__assign({style:e.__assign(e.__assign({},t.DEFAULT_ASSIGN_REMINDER_STYLES.header),L.levelsHeader)},{children:[n.jsx("span",{children:null!=o?o:"Assignee Levels"}),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},t.DEFAULT_ASSIGN_REMINDER_STYLES.infoIconWrapper),L.infoIconWrapper),onMouseEnter:function(){return b(!0)},onMouseLeave:function(){return b(!1)}},{children:[null!=y?y:n.jsx(i.InfoIcon,{width:18,height:18}),n.jsx("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},t.DEFAULT_ASSIGN_REMINDER_STYLES.tooltip),L.tooltip),F?e.__assign(e.__assign({},t.DEFAULT_ASSIGN_REMINDER_STYLES.tooltipVisible),L.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"},L.accordionsContainer)},{children:T.map(function(s,i){return n.jsx(l.default,{level:s,id:String(i),accessLevelOptions:A,fetchUsers:h,onToggleMandatory:function(){return n=i,void(null==v||v(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 l=null===(i=p[n-1])||void 0===i?void 0:i.dueDate;if(l&&s<l)return void(null==m||m("Level ".concat(n+1," due date cannot be before Level ").concat(n," due date")))}null==v||v(function(i){return i.map(function(i,l){return l===n?e.__assign(e.__assign({},i),{dueDate:s}):i})})}(i,n)},onAssigneesChange:function(n){return s=i,r=(null!=(l=n)?l:[]).map(function(n){var s=n.role||n.accessLevel||"";return e.__assign(e.__assign({},n),{role:s,accessLevel:n.accessLevel||s})}),void(null==v||v(function(n){return n.map(function(n,i){return i===s?e.__assign(e.__assign({},n),{assignees:r}):n})}));var s,l,r},onTitleChange:function(n){return function(n,s){null==v||v(function(i){return i.map(function(i,l){return l===n?e.__assign(e.__assign({},i),{title:s}):i})})}(i,n)},finalApprovalDueDate:D},i)})})),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},t.DEFAULT_ASSIGN_REMINDER_STYLES.finalApprovalBox),L.finalApprovalBox)},{children:[n.jsx(r.default,{getter:g,setter:null!=x?x:function(){}}),n.jsxs("div",e.__assign({style:e.__assign({display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400},L.finalApprovalTextWrapper)},{children:[n.jsx("span",e.__assign({style:e.__assign({fontWeight:500},L.finalApprovalTitle)},{children:"Require Final Approval"})),n.jsx("span",e.__assign({style:L.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({},t.DEFAULT_ASSIGN_REMINDER_STYLES.currentApprovalFlow),L.currentApprovalFlow)},{children:[n.jsx("span",e.__assign({style:e.__assign({fontSize:"14px",fontWeight:600},L.currentApprovalFlowTitle)},{children:"Current Approval Flow"})),(a=p.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}),n.jsx("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"},L.approvalFlowItemsWrapper)},{children:a.map(function(s,l){var r,t,o=s.isHidden,d=!s.isMandatory&&!o,c=null!==(r=s.assignees)&&void 0!==r?r:[],p=o?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})}}(l);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:d?"#64748B":"#374151",border:d?"1px dashed #CBD5E1":void 0,borderRadius:d?"6px":void 0,padding:d?"2px 6px":void 0},L.approvalFlowItem),title:s.title||"Level ".concat(l+1)},{children:[p,n.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px",flexWrap:"wrap"}},{children:[c.map(function(s,i){var l,r,a=s.role||s.accessLevel||"No role assigned";return n.jsxs(u.default.Fragment,{children:[i>0&&n.jsx("span",e.__assign({style:{color:"#9CA3AF"}},{children:"/"})),n.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("span",{children:s.name}),n.jsx("span",e.__assign({style:{fontSize:"11px",fontWeight:500,color:"#475569",backgroundColor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"999px",padding:"2px 8px",lineHeight:"16px"}},{children:a}))]}))]},null!==(r=null!==(l=s.id)&&void 0!==l?l:s.email)&&void 0!==r?r:i)}),d&&n.jsx("span",{children:"(Optional)"})]}))]})),l<a.length-1&&n.jsx(i.ArrowRight,{size:16,color:"#9CA3AF"})]},null!==(t=s.id)&&void 0!==t?t:l)})})))]}))]}))};
|
|
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"),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"}))]}))]}))}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),n=require("lucide-react"),a=require("react"),s=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=_(a),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:""}}];function m(e){var i=e.toLowerCase();return i.includes("reminder")?"reminders":i.includes("review")?"review":"assignees"}exports.AssignReminderWrapper=function(_){var f,p,g=_.metadata,E=void 0===g?{}:g,S=_.reviewData,R=void 0===S?{}:S,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,M=void 0!==w&&w,q=_.onRequireFinalApproval,C=_.isOwner,W=void 0===C||C,B=_.blockEditScreen,U=void 0!==B&&B,Y=_.hideManageReminders,G=void 0!==Y&&Y,O=_.hideClearButton,k=void 0!==O&&O,H=_.hideSaveChangesButton,z=void 0!==H&&H,V=_.hideFooterActions,X=void 0!==V&&V;_.remindersData;var J=_.remainderOwners,K=_.setRemainderOwners,Q=_.schedules,Z=_.setSchedules,$=_.handelSendNow,ee=_.showPreviewEmail,ie=_.tabName,ne=_.reminderLabels,ae=_.reminderColors,se=_.reminderChipColor,re=_.reminderAssignees,te=_.reminderFallbackRecipients,le=_.reminderRecipientsColor,oe=_.manualReminderTitle,de=_.manualReminderDescription,_e=_.lastReminderText,ue=_.selectRecipientsLabel,ce=_.previewEmailButtonLabel,ve=_.sendNowButtonLabel,me=_.reminderSuccessTitle,fe=_.reminderSuccessDescription,pe=_.escalationTitle,ge=_.escalationTitleTooltip,Ee=_.escalationDescription,Se=_.configureAutoReminderText,Re=_.getDynamicStatement,Ae=_.reminderStartDateLabel,De=_.documentDueDateLabel,ye=_.reminderFrequencyLabel,Le=_.escalationRemindersLabel,Te=_.escalationTooltip,be=_.escalationConditionText,he=_.daysText,Ne=_.dueDataAndRepeatText,Ie=_.reminderFrequencyOptions,xe=_.escalationFrequencyOptions,Pe=_.beforeAfterOptions,je=u.default.useMemo(function(){var e;return(null===(e=E.tabData)||void 0===e?void 0:e.length)?E.tabData:c},[E.tabData]),Fe=u.default.useMemo(function(){return je.filter(function(e){var i=m(e.tabName);return!((!W||U)&&"assignees"===i)&&(!G||"reminders"!==i)})},[je,W,U,G]),we=a.useState(null!==(p=null===(f=Fe[0])||void 0===f?void 0:f.tabName)&&void 0!==p?p:""),Me=we[0],qe=we[1],Ce=m(Me),We=a.useState(A||r.INITIAL_LEVELS),Be=We[0],Ue=We[1],Ye=a.useState(y||!1),Ge=Ye[0],Oe=Ye[1],ke=a.useState(T||null),He=ke[0],ze=ke[1],Ve=a.useState(null),Xe=Ve[0],Je=Ve[1],Ke=a.useState([]),Qe=Ke[0],Ze=Ke[1],$e=a.useState(J||v),ei=$e[0],ii=$e[1],ni=void 0!==Q?Q:Qe,ai=void 0!==Z?Z:Ze,si=void 0!==J?J:ei,ri=function(i){return i.map(function(i,n){return 0!==n||i.isHidden?i:e.__assign(e.__assign({},i),{isMandatory:!0,hasDueDate:!0})})},ti=function(i){return i.map(function(i){var n;return e.__assign(e.__assign({},i),{assignees:(null!==(n=i.assignees)&&void 0!==n?n:[]).map(function(i){var n=i.role||i.accessLevel||"";return e.__assign(e.__assign({},i),{role:n,accessLevel:i.accessLevel||n})})})})},li=u.default.useMemo(function(){return{due_at:He?He.toISOString():"",assignee:Be.filter(function(e){return!e.isHidden}).flatMap(function(e){return e.assignees||[]}).reduce(function(i,n,a){var s;return e.__assign(e.__assign({},i),((s={})[a]=n,s))},{})}},[He,Be]);a.useEffect(function(){void 0!==J&&ii(J)},[J]),a.useEffect(function(){q&&q().then(function(e){Array.isArray(e)&&e.length>0?Je(e[0]):e&&!Array.isArray(e)&&Je(e)}).catch(function(e){return console.error("Failed to fetch user:",e)})},[]),a.useEffect(function(){ie&&Fe.some(function(e){return e.tabName===ie})&&qe(ie)},[ie,Fe]),a.useEffect(function(){var e,i;Fe.some(function(e){return e.tabName===Me})||qe(null!==(i=null===(e=Fe[0])||void 0===e?void 0:e.tabName)&&void 0!==i?i:"")},[Fe,Me]),a.useEffect(function(){A&&Ue(function(i){var n=i.find(function(e){return e.isHidden}),a=n?e.__spreadArray(e.__spreadArray([],A,!0),[n],!1):A;return ti(ri(a))})},[A]),a.useEffect(function(){void 0!==y&&Oe(y)},[y]),a.useEffect(function(){void 0!==T&&ze(T)},[T]),a.useEffect(function(){Ue(function(i){var n=i.filter(function(e){return!e.isHidden});if(Ge){var a={headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==Xe?void 0:Xe.id)||"me",email:(null==Xe?void 0:Xe.email)||"",name:(null==Xe?void 0:Xe.name)?"".concat(Xe.name," (You)"):"Username (You)",accessLevel:"Approve",role:"Final Approver"}]};return ti(e.__spreadArray(e.__spreadArray([],n,!0),[a],!1))}return ti(n)})},[Ge,Xe]),a.useEffect(function(){var e=Be.flatMap(function(e){return e.assignees||[]}).filter(function(e){return e.email});ii(function(i){var n=i.length===e.length&&e.every(function(e,n){var a;return(null===(a=i[n])||void 0===a?void 0:a.email)===e.email});return n?i:e.map(function(e,n){var a=i.find(function(i){return i.email===e.email});return a||{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:""}}})})},[Be]);var oi=Be.filter(function(e){return!e.isHidden}),di=oi.find(function(e,i){if(!(0===i||e.isMandatory))return!1;var n=!!e.dueDate,a=(e.assignees||[]).some(function(e){return!!(null==e?void 0:e.email)||!!(null==e?void 0:e.id)});return!n||!a}),_i=!1!==E.showFinalApprovalDueDate,ui=M||(!!di||_i&&!He),ci=E.wrapperTitle||"Assign Redline and Manage Reminders",vi=E.wrapperSubTitle||"Sec 4.1 - Technical Security Information",mi=E.wrapperPriority||"High",fi=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"===Ce?{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:ci})),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:vi})),i.jsx("span",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineBadge),fi),F.redlineBadge)},{children:mi}))]}))]})),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:Fe.map(function(n){var a=Me===n.tabName;return i.jsxs("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tab),F.tab),a?e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tabActive),F.tabActive):{}),onClick:function(){return qe(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"===Ce&&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:He?He.toISOString().slice(0,10):"",onChange:ze})})),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(s.AssignReminderLevels,{levels:Be,totalLevels:P,requireFinalApproval:Ge,setLevels:Ue,setRequireFinalApproval:function(e){Oe(e)},fetchUsers:N,onValidationError:x,customStyles:F,finalApprovalDueDate:He})]}),"reminders"===Ce&&i.jsx(o.ManageReminders,e.__assign({data:li,schedules:ni,setSchedules:ai,remainderOwners:si,setRemainderOwners:function(e){var i="function"==typeof e?e(si):e;K?K(i):ii(i)},handelSendNow:function(e,i){$&&$(e||ni,i||si)},showPreviewEmail:null!=ee&&ee},void 0!==ne&&{labels:ne},void 0!==ae&&{colors:ae},void 0!==se&&{chipColor:se},void 0!==re&&{assignees:re},void 0!==te&&{fallbackRecipients:te},void 0!==le&&{recipientsColor:le},void 0!==oe&&{manualReminderTitle:oe},void 0!==de&&{manualReminderDescription:de},void 0!==_e&&{lastReminderText:_e},void 0!==ue&&{selectRecipientsLabel:ue},void 0!==ce&&{previewEmailButtonLabel:ce},void 0!==ve&&{sendNowButtonLabel:ve},void 0!==me&&{reminderSuccessTitle:me},void 0!==fe&&{reminderSuccessDescription:fe},void 0!==pe&&{escalationTitle:pe},void 0!==ge&&{escalationTitleTooltip:ge},void 0!==Ee&&{escalationDescription:Ee},void 0!==Se&&{configureAutoReminderText:Se},void 0!==Re&&{getDynamicStatement:Re},void 0!==Ae&&{reminderStartDateLabel:Ae},void 0!==De&&{documentDueDateLabel:De},void 0!==ye&&{reminderFrequencyLabel:ye},void 0!==Le&&{escalationRemindersLabel:Le},void 0!==Te&&{escalationTooltip:Te},void 0!==be&&{escalationConditionText:be},void 0!==he&&{daysText:he},void 0!==Ne&&{dueDataAndRepeatText:Ne},void 0!==Ie&&{reminderFrequencyOptions:Ie},void 0!==xe&&{escalationFrequencyOptions:xe},void 0!==Pe&&{beforeAfterOptions:Pe})),"review"===Ce&&i.jsx(t.default,{levels:Be,reviewData:R})]})),!X&&(!k||!z)&&i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.footer),F.footer)},{children:[!k&&i.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.clearBtn),F.clearBtn),M?F.actionBtnDisabled:{}),onClick:function(){Ue(ri(r.INITIAL_LEVELS.map(function(i){return e.__assign(e.__assign({},i),{assignees:[],dueDate:null})}))),Oe(!1),ze(null)},disabled:M},{children:"Clear"})),!z&&i.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},d.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.saveBtn),F.saveBtn),ui?e.__assign({opacity:.55,cursor:"not-allowed"},F.actionBtnDisabled):{}),onClick:function(){if(ui)M||null==x||x(function(){if(_i&&!He)return"Final approval due date is required";if(!di)return"Please fill all required fields before saving";var e=oi.indexOf(di)+1,i=[di.dueDate?null:"due date",(di.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=ti(Be.filter(function(e){return!e.isHidden}));null==D||D(e),null==L||L(Ge),null==b||b(He),null==I||I({levels:e,requireFinalApproval:Ge,finalApprovalDueDate:He,activeTab:Ce,schedules:ni,remainderOwners:si})}},disabled:ui},{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"),i=require("react"),n=require("lucide-react"),t=require("../styles/ReviewStatusStyles.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(i),o=function(e){var s=e.trim().split(/\s+/);return 1===s.length?s[0].slice(0,2).toUpperCase():(s[0][0]+s[s.length-1][0]).toUpperCase()},a=function(e){for(var s=[{bg:"#FEF9C3",fg:"#854D0E"},{bg:"#DCFCE7",fg:"#166534"},{bg:"#DBEAFE",fg:"#1E40AF"},{bg:"#F3E8FF",fg:"#6B21A8"},{bg:"#FFE4E6",fg:"#9F1239"},{bg:"#FEE2E2",fg:"#991B1B"},{bg:"#E0F2FE",fg:"#0369A1"}],i=0,n=0;n<e.length;n++)i=e.charCodeAt(n)+((i<<5)-i);return s[Math.abs(i)%s.length]};function d(i){var t,l=i.reviewLevel,r=l.level,o=l.assigneeStatuses,a=l.extendedStatus,d=null!==(t={approved:{bg:"#ECFDF5",color:"#059669",icon:s.jsx(n.Check,{size:14}),text:"Approved"},pending:{bg:"#FFEDD5",color:"#C2410C",icon:s.jsx(n.Hourglass,{size:14}),text:"Pending"},waiting:{bg:"#F3F4F6",color:"#4B5563",icon:s.jsx(n.Hourglass,{size:14}),text:"Waiting"},rejected:{bg:"#FEF2F2",color:"#DC2626",icon:s.jsx(n.X,{size:14}),text:"Rejected"},optional:{bg:"#F8FAFC",color:"#64748B",icon:s.jsx(n.Info,{size:14}),text:"Optional"}}[a])&&void 0!==t?t:{bg:"#F3F4F6",color:"#4B5563",icon:s.jsx(n.Hourglass,{size:14}),text:"Waiting"},c="approved"===a?"1px solid #D1FAE5":"rejected"===a?"1px solid #FCA5A5":"optional"===a?"1px dashed #CBD5E1":"1px solid #E5E7EB",x="approved"===a?"#F0FDF4":"rejected"===a?"#FEF2F2":"#F8FAFC";return!r.assignees||!Array.isArray(r.assignees)||r.assignees.length<1?null:s.jsxs("div",e.__assign({style:{backgroundColor:"#FFFFFF",border:c,borderRadius:"8px",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[s.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:x,borderBottom:c,padding:"12px 16px"}},{children:[s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:10}},{children:[s.jsx(p,{name:r.headerName}),s.jsx("span",e.__assign({style:{fontSize:15,fontWeight:500,color:"#374151"}},{children:r.title}))]})),s.jsxs("div",e.__assign({style:{backgroundColor:d.bg,color:d.color,padding:"4px 10px",borderRadius:"16px",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"6px"}},{children:[d.icon,d.text]}))]})),s.jsx("div",e.__assign({style:{padding:"16px"}},{children:o.length>0?s.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:16}},{children:o.map(function(e,i){var n;return s.jsx(g,{assigneeStatus:e,extendedStatus:a},null!==(n=e.user.id)&&void 0!==n?n:i)})})):s.jsx("div",e.__assign({style:{fontSize:14,color:"#6B7280"}},{children:"No assignees added yet"}))}))]}))}function c(i){var t,l,r,d,c=i.reviewLevel,g=c.assigneeStatuses,p=c.extendedStatus,x=null!==(t={approved:{bg:"#ECFDF5",color:"#059669",icon:s.jsx(n.Check,{size:14}),text:"Approved"},pending:{bg:"#FFEDD5",color:"#C2410C",icon:s.jsx(n.Hourglass,{size:14}),text:"Pending"},waiting:{bg:"#F3F4F6",color:"#4B5563",icon:s.jsx(n.Hourglass,{size:14}),text:"Waiting"},rejected:{bg:"#FEF2F2",color:"#DC2626",icon:s.jsx(n.X,{size:14}),text:"Rejected"},optional:{bg:"#F8FAFC",color:"#64748B",icon:s.jsx(n.Info,{size:14}),text:"Optional"}}[p])&&void 0!==t?t:{bg:"#F3F4F6",color:"#4B5563",icon:s.jsx(n.Hourglass,{size:14}),text:"Waiting"},u=null===(l=g[0])||void 0===l?void 0:l.user;return s.jsxs("div",e.__assign({style:{backgroundColor:"#FFFFFF",border:"1px solid #E5E7EB",borderRadius:"8px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[u?s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[s.jsx("div",e.__assign({style:{width:"36px",height:"36px",borderRadius:"50%",backgroundColor:a(null!==(r=u.id)&&void 0!==r?r:u.name).bg,color:a(null!==(d=u.id)&&void 0!==d?d:u.name).fg,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,fontSize:"14px"}},{children:o(u.name)})),s.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column"}},{children:[s.jsx("span",e.__assign({style:{fontSize:"15px",fontWeight:400,color:"#374151"}},{children:u.name})),s.jsx("span",e.__assign({style:{fontSize:"13px",color:"#6B7280"}},{children:"Will be notified after all levels approve"}))]}))]})):s.jsx("span",e.__assign({style:{fontSize:14,color:"#6B7280"}},{children:"No owner assigned"})),s.jsxs("div",e.__assign({style:{backgroundColor:x.bg,color:x.color,padding:"4px 10px",borderRadius:"16px",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"6px"}},{children:[x.icon,x.text]}))]}))}function g(i){var t,l=i.assigneeStatus,r=i.extendedStatus,d=l.user,c=l.approved||"approved"===d.action,g=l.rejected||"rejected"===d.action,p=o(d.name),x=a(null!==(t=d.id)&&void 0!==t?t:d.name);return s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[s.jsx("div",e.__assign({style:{width:"36px",height:"36px",borderRadius:"50%",backgroundColor:x.bg,color:x.fg,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:"13px"}},{children:p})),s.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"2px"}},{children:[s.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:400,color:"#374151"}},{children:d.name})),s.jsx("span",e.__assign({style:{fontSize:"13px",color:"#6B7280"}},{children:d.email}))]}))]})),s.jsx("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:c?s.jsx(n.CircleCheck,{size:20,color:"#16A34A",strokeWidth:1.5}):g?s.jsx(n.X,{size:20,color:"#DC2626",strokeWidth:1.5}):"pending"===r?s.jsxs(s.Fragment,{children:[s.jsx("span",{style:{fontSize:"13px",color:"#4B5563"}}),s.jsx(n.MinusCircle,{size:20,color:"#9CA3AF",strokeWidth:1.5})]}):"optional"===r?s.jsx(n.MinusCircle,{size:20,color:"#CBD5E1",strokeWidth:1.5}):s.jsx(n.MinusCircle,{size:20,color:"#9CA3AF",strokeWidth:1.5})}))]}))}function p(i){var n=i.name,t=a(n);return s.jsx("span",e.__assign({style:{backgroundColor:t.bg,color:t.fg,borderRadius:12,padding:"3px 10px",fontSize:12,fontWeight:500}},{children:n}))}var x=function(e){switch(e){case 0:return s.jsx(n.LucidePen,{size:16,color:"#475569"});case 1:return s.jsx(n.FileCheck,{size:16,color:"#475569"});case 2:return s.jsx(n.User,{size:16,color:"#475569"});default:return s.jsx(n.CheckCircle,{size:16,color:"#475569"})}};function u(i){var l=i.levels,o=l.some(function(e){var s,i;return(null!==(i=null===(s=e.assignees)||void 0===s?void 0:s.length)&&void 0!==i?i:0)>0});return s.jsxs("div",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.flowBox},{children:[s.jsx("span",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.flowTitle},{children:"Current Approval Flow"})),o?s.jsx("div",e.__assign({style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center",marginTop:6}},{children:l.map(function(i,o){var a,d=i.isHidden,c=!i.isMandatory&&!d,g=null===(a=i.assignees)||void 0===a?void 0:a.map(function(e){return e.name}).join(" / ");if(!g)return null;var p=d?s.jsx(n.User,{size:16,color:"#475569"}):x(o);return s.jsxs(r.default.Fragment,{children:[s.jsxs("span",e.__assign({style:e.__assign(e.__assign({},t.DEFAULT_REVIEW_STATUS_STYLES.flowChip),{display:"flex",alignItems:"center",gap:"6px",border:c?"1px dashed #CBD5E1":void 0})},{children:[p,s.jsxs("span",e.__assign({style:{fontSize:13,color:c?"#64748B":"#374151"}},{children:[g," ",c&&"(Optional)"]}))]})),o<l.length-1&&s.jsx(n.ArrowRight,{size:16,color:"#9CA3AF"})]},o)})})):s.jsx("p",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.flowEmpty},{children:"No owners assigned yet."}))]}))}exports.default=function(i){var l=i.levels,o=i.reviewData,a=void 0===o?{}:o,g=l.map(function(e,s){var i,n,t,l=null!==(n=null!==(i=a[s])&&void 0!==i?i:a[e.headerName])&&void 0!==n?n:{},r=(null!==(t=e.assignees)&&void 0!==t?t:[]).map(function(e){return{user:e,approved:!0===l[String(e.id)]||!0===l[String(e.email)]||"approved"===e.action||!0===e.approved,rejected:"rejected"===l[String(e.id)]||"rejected"===l[String(e.email)]||"rejected"===e.action}}),o="not_started";if(!0===e.isApproved)o="approved";else if(!0===e.isRejected)o="rejected";else if("approved"===e.status||"completed"===e.status)o="approved";else if("rejected"===e.status)o="rejected";else{var d=r.length>0&&r.every(function(e){return e.approved}),c=r.some(function(e){return e.rejected});d?o="approved":c&&(o="rejected")}return{level:e,assigneeStatuses:r,status:o}}),p=!1,x=g.map(function(s){var i="waiting",n=!0===s.level.isHidden;return"approved"===s.status?i="approved":"rejected"===s.status?(i="rejected",p=!0):s.level.isMandatory||n?p||(i="pending",p=!0):i="optional",e.__assign(e.__assign({},s),{extendedStatus:i,isFinalApproval:n})}),_=function(e){return e.filter(function(e){return"approved"===e.status}).length}(g),v=g.length;return s.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:24}},{children:[s.jsxs("div",{children:[s.jsxs("div",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.progressHeader},{children:[s.jsx("span",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.progressTitle},{children:"Approval Progress"})),s.jsxs("span",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.progressCount},{children:[_," of ",v," level",1!==v?"s":""," complete"]}))]})),s.jsx("div",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.progressBarTrack},{children:x.map(function(i,n){var l,r="approved"===i.extendedStatus,o="rejected"===i.extendedStatus,a="optional"===i.extendedStatus,d=0===n,c=n===v-1;if((null===(l=i.level)||void 0===l?void 0:l.assignees)&&Array.isArray(i.level.assignees)&&!(i.level.assignees.length<1))return s.jsx("div",{style:e.__assign(e.__assign({},t.DEFAULT_REVIEW_STATUS_STYLES.progressSegment),{backgroundColor:r?"#6366F1":o?"#EF4444":a?"#F1F5F9":"#E5E7EB",borderRadius:d&&c?"999px":d?"999px 0 0 999px":c?"0 999px 999px 0":"0",marginRight:c?0:3})},n)})})),s.jsx("div",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.progressLabels},{children:x.map(function(i,n){return s.jsx(s.Fragment,{children:s.jsx("span",e.__assign({style:e.__assign(e.__assign({},t.DEFAULT_REVIEW_STATUS_STYLES.progressLabel),{color:"approved"===i.extendedStatus?"#6366F1":"rejected"===i.extendedStatus?"#EF4444":"#9CA3AF",fontWeight:"approved"===i.extendedStatus||"rejected"===i.extendedStatus?600:400})},{children:i.level.assignees&&i.level.assignees.length>0?"".concat(i.level.headerName," - ").concat(i.level.title):""}),n)})})}))]}),s.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:0}},{children:[s.jsx("div",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.sectionHeadingRow},{children:s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:6}},{children:[s.jsx("span",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.sectionTitle},{children:"Approval Levels"})),s.jsx(n.Info,{size:15,color:"#9CA3AF"})]}))})),s.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",marginTop:12}},{children:x.map(function(i,n){var t,l=n===x.length-1,o=i.isFinalApproval,a=x[n+1],g=null==a?void 0:a.isFinalApproval,p=a&&!a.level.isMandatory&&!g;return o?s.jsxs(r.default.Fragment,{children:[s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",margin:"16px 0"}},{children:[s.jsx("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}}),s.jsx("span",e.__assign({style:{padding:"0 16px",fontSize:"14px",color:"#6B7280"}},{children:"then"})),s.jsx("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}})]})),s.jsx("div",e.__assign({style:{marginBottom:"12px",fontSize:"15px",fontWeight:500,color:"#6B7280"}},{children:"Final Approval"})),s.jsx(c,{reviewLevel:i})]},n):s.jsxs(r.default.Fragment,{children:[s.jsx(d,{reviewLevel:i}),!l&&!g&&a.level.assignees&&(null===(t=a.level.assignees)||void 0===t?void 0:t.length)>0&&s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",margin:"20px 0"}},{children:[s.jsx("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}}),s.jsx("span",e.__assign({style:{padding:"0 16px",fontSize:"14px",color:"#6B7280"}},{children:p?"optional":"then"})),s.jsx("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}})]}))]},n)})}))]})),s.jsx(u,{levels:l})]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),i=require("react"),n=require("lucide-react"),t=require("../styles/ReviewStatusStyles.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(i),a=function(e){var s=e.trim().split(/\s+/);return 1===s.length?s[0].slice(0,2).toUpperCase():(s[0][0]+s[s.length-1][0]).toUpperCase()},o=function(e){for(var s=[{bg:"#FEF9C3",fg:"#854D0E"},{bg:"#DCFCE7",fg:"#166534"},{bg:"#DBEAFE",fg:"#1E40AF"},{bg:"#F3E8FF",fg:"#6B21A8"},{bg:"#FFE4E6",fg:"#9F1239"},{bg:"#FEE2E2",fg:"#991B1B"},{bg:"#E0F2FE",fg:"#0369A1"}],i=0,n=0;n<e.length;n++)i=e.charCodeAt(n)+((i<<5)-i);return s[Math.abs(i)%s.length]},d=function(e){var s=(null==e?void 0:e.role)||(null==e?void 0:e.accessLevel);return"string"==typeof s&&s.trim()?s:"No role assigned"};function p(i){var t,l=i.reviewLevel,r=l.level,a=l.assigneeStatuses,o=l.extendedStatus,d=null!==(t={approved:{bg:"#ECFDF5",color:"#059669",icon:s.jsx(n.Check,{size:14}),text:"Approved"},pending:{bg:"#FFEDD5",color:"#C2410C",icon:s.jsx(n.Hourglass,{size:14}),text:"Pending"},waiting:{bg:"#F3F4F6",color:"#4B5563",icon:s.jsx(n.Hourglass,{size:14}),text:"Waiting"},rejected:{bg:"#FEF2F2",color:"#DC2626",icon:s.jsx(n.X,{size:14}),text:"Rejected"},optional:{bg:"#F8FAFC",color:"#64748B",icon:s.jsx(n.Info,{size:14}),text:"Optional"}}[o])&&void 0!==t?t:{bg:"#F3F4F6",color:"#4B5563",icon:s.jsx(n.Hourglass,{size:14}),text:"Waiting"},p="approved"===o?"1px solid #D1FAE5":"rejected"===o?"1px solid #FCA5A5":"optional"===o?"1px dashed #CBD5E1":"1px solid #E5E7EB",c="approved"===o?"#F0FDF4":"rejected"===o?"#FEF2F2":"#F8FAFC";return!r.assignees||!Array.isArray(r.assignees)||r.assignees.length<1?null:s.jsxs("div",e.__assign({style:{backgroundColor:"#FFFFFF",border:p,borderRadius:"8px",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[s.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:c,borderBottom:p,padding:"12px 16px"}},{children:[s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:10}},{children:[s.jsx(x,{name:r.headerName}),s.jsx("span",e.__assign({style:{fontSize:15,fontWeight:500,color:"#374151"}},{children:r.title}))]})),s.jsxs("div",e.__assign({style:{backgroundColor:d.bg,color:d.color,padding:"4px 10px",borderRadius:"16px",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"6px"}},{children:[d.icon,d.text]}))]})),s.jsx("div",e.__assign({style:{padding:"16px"}},{children:a.length>0?s.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:16}},{children:a.map(function(e,i){var n;return s.jsx(g,{assigneeStatus:e,extendedStatus:o},null!==(n=e.user.id)&&void 0!==n?n:i)})})):s.jsx("div",e.__assign({style:{fontSize:14,color:"#6B7280"}},{children:"No assignees added yet"}))}))]}))}function c(i){var t,l,r,p,c=i.reviewLevel,g=c.assigneeStatuses,x=c.extendedStatus,u=null!==(t={approved:{bg:"#ECFDF5",color:"#059669",icon:s.jsx(n.Check,{size:14}),text:"Approved"},pending:{bg:"#FFEDD5",color:"#C2410C",icon:s.jsx(n.Hourglass,{size:14}),text:"Pending"},waiting:{bg:"#F3F4F6",color:"#4B5563",icon:s.jsx(n.Hourglass,{size:14}),text:"Waiting"},rejected:{bg:"#FEF2F2",color:"#DC2626",icon:s.jsx(n.X,{size:14}),text:"Rejected"},optional:{bg:"#F8FAFC",color:"#64748B",icon:s.jsx(n.Info,{size:14}),text:"Optional"}}[x])&&void 0!==t?t:{bg:"#F3F4F6",color:"#4B5563",icon:s.jsx(n.Hourglass,{size:14}),text:"Waiting"},_=null===(l=g[0])||void 0===l?void 0:l.user,v=d(_);return s.jsxs("div",e.__assign({style:{backgroundColor:"#FFFFFF",border:"1px solid #E5E7EB",borderRadius:"8px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[_?s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[s.jsx("div",e.__assign({style:{width:"36px",height:"36px",borderRadius:"50%",backgroundColor:o(null!==(r=_.id)&&void 0!==r?r:_.name).bg,color:o(null!==(p=_.id)&&void 0!==p?p:_.name).fg,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,fontSize:"14px"}},{children:a(_.name)})),s.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"2px"}},{children:[s.jsx("span",e.__assign({style:{fontSize:"15px",fontWeight:400,color:"#374151"}},{children:_.name})),s.jsxs("span",e.__assign({style:{fontSize:"13px",color:"#475569",fontWeight:500}},{children:["Role: ",v]})),s.jsx("span",e.__assign({style:{fontSize:"13px",color:"#6B7280"}},{children:"Will be notified after all levels approve"}))]}))]})):s.jsx("span",e.__assign({style:{fontSize:14,color:"#6B7280"}},{children:"No owner assigned"})),s.jsxs("div",e.__assign({style:{backgroundColor:u.bg,color:u.color,padding:"4px 10px",borderRadius:"16px",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"6px"}},{children:[u.icon,u.text]}))]}))}function g(i){var t,l=i.assigneeStatus,r=i.extendedStatus,p=l.user,c=l.approved||"approved"===p.action,g=l.rejected||"rejected"===p.action,x=a(p.name),u=o(null!==(t=p.id)&&void 0!==t?t:p.name),_=d(p);return s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[s.jsx("div",e.__assign({style:{width:"36px",height:"36px",borderRadius:"50%",backgroundColor:u.bg,color:u.fg,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:"13px"}},{children:x})),s.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"2px"}},{children:[s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}},{children:[s.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:400,color:"#374151"}},{children:p.name})),s.jsx("span",e.__assign({style:{fontSize:"11px",fontWeight:500,color:"#475569",backgroundColor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"999px",padding:"2px 8px",lineHeight:"16px"}},{children:_}))]})),s.jsx("span",e.__assign({style:{fontSize:"13px",color:"#6B7280"}},{children:p.email}))]}))]})),s.jsx("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:c?s.jsx(n.CircleCheck,{size:20,color:"#16A34A",strokeWidth:1.5}):g?s.jsx(n.X,{size:20,color:"#DC2626",strokeWidth:1.5}):"pending"===r?s.jsxs(s.Fragment,{children:[s.jsx("span",{style:{fontSize:"13px",color:"#4B5563"}}),s.jsx(n.MinusCircle,{size:20,color:"#9CA3AF",strokeWidth:1.5})]}):"optional"===r?s.jsx(n.MinusCircle,{size:20,color:"#CBD5E1",strokeWidth:1.5}):s.jsx(n.MinusCircle,{size:20,color:"#9CA3AF",strokeWidth:1.5})}))]}))}function x(i){var n=i.name,t=o(n);return s.jsx("span",e.__assign({style:{backgroundColor:t.bg,color:t.fg,borderRadius:12,padding:"3px 10px",fontSize:12,fontWeight:500}},{children:n}))}var u=function(e){switch(e){case 0:return s.jsx(n.LucidePen,{size:16,color:"#475569"});case 1:return s.jsx(n.FileCheck,{size:16,color:"#475569"});case 2:return s.jsx(n.User,{size:16,color:"#475569"});default:return s.jsx(n.CheckCircle,{size:16,color:"#475569"})}};function _(i){var l=i.levels.filter(function(e){var s,i;return(null!==(i=null===(s=e.assignees)||void 0===s?void 0:s.length)&&void 0!==i?i:0)>0});return s.jsxs("div",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.flowBox},{children:[s.jsx("span",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.flowTitle},{children:"Current Approval Flow"})),l.length>0?s.jsx("div",e.__assign({style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center",marginTop:6}},{children:l.map(function(i,a){var o,p=i.isHidden,c=!i.isMandatory&&!p,g=p?s.jsx(n.User,{size:16,color:"#475569"}):u(a);return s.jsxs(r.default.Fragment,{children:[s.jsxs("span",e.__assign({style:e.__assign(e.__assign({},t.DEFAULT_REVIEW_STATUS_STYLES.flowChip),{display:"flex",alignItems:"center",gap:"8px",border:c?"1px dashed #CBD5E1":void 0})},{children:[g,s.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px",flexWrap:"wrap"}},{children:[i.assignees.map(function(i,n){var t,l,a=d(i);return s.jsxs(r.default.Fragment,{children:[n>0&&s.jsx("span",e.__assign({style:{color:"#9CA3AF"}},{children:"/"})),s.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[s.jsx("span",e.__assign({style:{fontSize:13,color:c?"#64748B":"#374151"}},{children:i.name})),s.jsx("span",e.__assign({style:{fontSize:"11px",fontWeight:500,color:"#475569",backgroundColor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"999px",padding:"2px 8px",lineHeight:"16px"}},{children:a}))]}))]},null!==(l=null!==(t=i.id)&&void 0!==t?t:i.email)&&void 0!==l?l:n)}),c&&s.jsx("span",e.__assign({style:{fontSize:12,color:"#64748B"}},{children:"Optional"}))]}))]})),a<l.length-1&&s.jsx(n.ArrowRight,{size:16,color:"#9CA3AF"})]},null!==(o=i.id)&&void 0!==o?o:"".concat(i.headerName,"-").concat(a))})})):s.jsx("p",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.flowEmpty},{children:"No owners assigned yet."}))]}))}exports.default=function(i){var l=i.levels,a=i.reviewData,o=void 0===a?{}:a,d=l.map(function(e,s){var i,n,t,l=null!==(n=null!==(i=o[s])&&void 0!==i?i:o[e.headerName])&&void 0!==n?n:{},r=(null!==(t=e.assignees)&&void 0!==t?t:[]).map(function(e){return{user:e,approved:!0===l[String(e.id)]||!0===l[String(e.email)]||"approved"===e.action||!0===e.approved,rejected:"rejected"===l[String(e.id)]||"rejected"===l[String(e.email)]||"rejected"===e.action}}),a="not_started";if(!0===e.isApproved)a="approved";else if(!0===e.isRejected)a="rejected";else if("approved"===e.status||"completed"===e.status)a="approved";else if("rejected"===e.status)a="rejected";else{var d=r.length>0&&r.every(function(e){return e.approved}),p=r.some(function(e){return e.rejected});d?a="approved":p&&(a="rejected")}return{level:e,assigneeStatuses:r,status:a}}),g=!1,x=d.map(function(s){var i="waiting",n=!0===s.level.isHidden;return"approved"===s.status?i="approved":"rejected"===s.status?(i="rejected",g=!0):s.level.isMandatory||n?g||(i="pending",g=!0):i="optional",e.__assign(e.__assign({},s),{extendedStatus:i,isFinalApproval:n})}),u=function(e){return e.filter(function(e){return"approved"===e.status}).length}(d),v=d.length;return s.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:24}},{children:[s.jsxs("div",{children:[s.jsxs("div",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.progressHeader},{children:[s.jsx("span",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.progressTitle},{children:"Approval Progress"})),s.jsxs("span",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.progressCount},{children:[u," of ",v," level",1!==v?"s":""," complete"]}))]})),s.jsx("div",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.progressBarTrack},{children:x.map(function(i,n){var l,r="approved"===i.extendedStatus,a="rejected"===i.extendedStatus,o="optional"===i.extendedStatus,d=0===n,p=n===v-1;return!(null===(l=i.level)||void 0===l?void 0:l.assignees)||!Array.isArray(i.level.assignees)||i.level.assignees.length<1?null:s.jsx("div",{style:e.__assign(e.__assign({},t.DEFAULT_REVIEW_STATUS_STYLES.progressSegment),{backgroundColor:r?"#6366F1":a?"#EF4444":o?"#F1F5F9":"#E5E7EB",borderRadius:d&&p?"999px":d?"999px 0 0 999px":p?"0 999px 999px 0":"0",marginRight:p?0:3})},n)})})),s.jsx("div",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.progressLabels},{children:x.map(function(i,n){return s.jsx("span",e.__assign({style:e.__assign(e.__assign({},t.DEFAULT_REVIEW_STATUS_STYLES.progressLabel),{color:"approved"===i.extendedStatus?"#6366F1":"rejected"===i.extendedStatus?"#EF4444":"#9CA3AF",fontWeight:"approved"===i.extendedStatus||"rejected"===i.extendedStatus?600:400})},{children:i.level.assignees&&i.level.assignees.length>0?"".concat(i.level.headerName," - ").concat(i.level.title):""}),n)})}))]}),s.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:0}},{children:[s.jsx("div",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.sectionHeadingRow},{children:s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:6}},{children:[s.jsx("span",e.__assign({style:t.DEFAULT_REVIEW_STATUS_STYLES.sectionTitle},{children:"Approval Levels"})),s.jsx(n.Info,{size:15,color:"#9CA3AF"})]}))})),s.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",marginTop:12}},{children:x.map(function(i,n){var t,l=n===x.length-1,a=i.isFinalApproval,o=x[n+1],d=null==o?void 0:o.isFinalApproval,g=o&&!o.level.isMandatory&&!d;return a?s.jsxs(r.default.Fragment,{children:[s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",margin:"16px 0"}},{children:[s.jsx("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}}),s.jsx("span",e.__assign({style:{padding:"0 16px",fontSize:"14px",color:"#6B7280"}},{children:"then"})),s.jsx("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}})]})),s.jsx("div",e.__assign({style:{marginBottom:"12px",fontSize:"15px",fontWeight:500,color:"#6B7280"}},{children:"Final Approval"})),s.jsx(c,{reviewLevel:i})]},n):s.jsxs(r.default.Fragment,{children:[s.jsx(p,{reviewLevel:i}),!l&&!d&&o.level.assignees&&(null===(t=o.level.assignees)||void 0===t?void 0:t.length)>0&&s.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",margin:"20px 0"}},{children:[s.jsx("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}}),s.jsx("span",e.__assign({style:{padding:"0 16px",fontSize:"14px",color:"#6B7280"}},{children:g?"optional":"then"})),s.jsx("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}})]}))]},n)})}))]})),s.jsx(_,{levels:l})]}))};
|
|
2
2
|
//# sourceMappingURL=ReviewStatus.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 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};
|
|
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:"0"===v?"not-allowed":"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
|
|
1
|
+
import{__assign as e}from"../../_virtual/_tslib.js";import{jsx as n,jsxs as i}from"react/jsx-runtime";import l from"react";import{PenLine as r,UserRoundCheck as t,Bell as o,InfoIcon as a,User as s,ArrowRight as p,CheckSquare as c,FileCheck as d,Edit2 as u}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 g}from"./styles/AssignReminderStyles.js";var m=[{label:"Edit",icon:n(r,{size:14})},{label:"Approve",icon:n(t,{size:14})},{label:"Edit & Approve",icon:n(h,{})},{label:"Notify",icon:n(o,{size:14})}];function x(r){var t,o=r.title,h=r.levels,x=void 0===h?[]:h,y=r.requireFinalApproval,A=void 0!==y&&y,b=r.additionalInfo,L=r.setLevels,F=r.setRequireFinalApproval,D=r.fetchUsers,w=r.accessLevelOptions,z=void 0===w?m:w,C=r.customInfoIcon,I=r.onValidationError,W=r.customStyles,E=void 0===W?{}:W,M=r.totalLevels,S=r.finalApprovalDueDate,j=l.useState(!1),T=j[0],q=j[1],H=l.useMemo(function(){return Array.from({length:null!=M?M:3},function(e,n){var i;return null!==(i=x[n])&&void 0!==i?i:{title:"Level ".concat(n+1),headerName:"L ".concat(n+1),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0}})},[x,M]),R=(x.length>0?x:H).filter(function(e){return!e.isHidden});return i("div",e({style:e({padding:"8px",display:"flex",flexDirection:"column",gap:"18px"},E.container)},{children:[i("span",e({style:e(e({},g.header),E.levelsHeader)},{children:[n("span",{children:null!=o?o:"Assignee Levels"}),i("div",e({style:e(e({},g.infoIconWrapper),E.infoIconWrapper),onMouseEnter:function(){return q(!0)},onMouseLeave:function(){return q(!1)}},{children:[null!=C?C:n(a,{width:18,height:18}),n("div",e({style:e(e(e({},g.tooltip),E.tooltip),T?e(e({},g.tooltipVisible),E.tooltipVisible):{})},{children:b||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"},E.accordionsContainer)},{children:R.map(function(i,l){return n(f,{level:i,id:String(l),accessLevelOptions:z,fetchUsers:D,onToggleMandatory:function(){return n=l,void(null==L||L(function(i){return i.map(function(i,l){return l===n?e(e({},i),{isMandatory:!i.isMandatory}):i})}));var n},onDueDateChange:function(n){return function(n,i){var l;if(n>0&&i){var r=null===(l=x[n-1])||void 0===l?void 0:l.dueDate;if(r&&i<r)return void(null==I||I("Level ".concat(n+1," due date cannot be before Level ").concat(n," due date")))}null==L||L(function(l){return l.map(function(l,r){return r===n?e(e({},l),{dueDate:i}):l})})}(l,n)},onAssigneesChange:function(n){return i=l,t=(null!=(r=n)?r:[]).map(function(n){var i=n.role||n.accessLevel||"";return e(e({},n),{role:i,accessLevel:n.accessLevel||i})}),void(null==L||L(function(n){return n.map(function(n,l){return l===i?e(e({},n),{assignees:t}):n})}));var i,r,t},onTitleChange:function(n){return function(n,i){null==L||L(function(l){return l.map(function(l,r){return r===n?e(e({},l),{title:i}):l})})}(l,n)},finalApprovalDueDate:S},l)})})),i("div",e({style:e(e({},g.finalApprovalBox),E.finalApprovalBox)},{children:[n(v,{getter:A,setter:null!=F?F:function(){}}),i("div",e({style:e({display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400},E.finalApprovalTextWrapper)},{children:[n("span",e({style:e({fontWeight:500},E.finalApprovalTitle)},{children:"Require Final Approval"})),n("span",e({style:E.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({},g.currentApprovalFlow),E.currentApprovalFlow)},{children:[n("span",e({style:e({fontSize:"14px",fontWeight:600},E.currentApprovalFlowTitle)},{children:"Current Approval Flow"})),(t=x.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}),n("div",e({style:e({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"},E.approvalFlowItemsWrapper)},{children:t.map(function(r,o){var a,f,v=r.isHidden,h=!r.isMandatory&&!v,g=null!==(a=r.assignees)&&void 0!==a?a:[],m=v?n(s,{size:16}):function(e){switch(e){case 0:return n(u,{size:16});case 1:return n(d,{size:16});case 2:return n(s,{size:16});default:return n(c,{size:16})}}(o);return i(l.Fragment,{children:[i("div",e({style:e({display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,color:h?"#64748B":"#374151",border:h?"1px dashed #CBD5E1":void 0,borderRadius:h?"6px":void 0,padding:h?"2px 6px":void 0},E.approvalFlowItem),title:r.title||"Level ".concat(o+1)},{children:[m,i("span",e({style:{display:"flex",alignItems:"center",gap:"6px",flexWrap:"wrap"}},{children:[g.map(function(r,t){var o,a,s=r.role||r.accessLevel||"No role assigned";return i(l.Fragment,{children:[t>0&&n("span",e({style:{color:"#9CA3AF"}},{children:"/"})),i("span",e({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n("span",{children:r.name}),n("span",e({style:{fontSize:"11px",fontWeight:500,color:"#475569",backgroundColor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"999px",padding:"2px 8px",lineHeight:"16px"}},{children:s}))]}))]},null!==(a=null!==(o=r.id)&&void 0!==o?o:r.email)&&void 0!==a?a:t)}),h&&n("span",{children:"(Optional)"})]}))]})),o<t.length-1&&n(p,{size:16,color:"#9CA3AF"})]},null!==(f=r.id)&&void 0!==f?f:o)})})))]}))]}))}export{x 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 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};
|
|
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(e){var i=e.toLowerCase();return i.includes("reminder")?"reminders":i.includes("review")?"review":"assignees"}function w(a){var o,w,_=a.metadata,A=void 0===_?{}:_,R=a.reviewData,L=void 0===R?{}:R,T=a.levels,S=a.setLevels,q=a.requireFinalApproval,C=a.setRequireFinalApproval,B=a.approvalDueDate,F=a.setApprovalDueDate,N=a.onClose,x=a.fetchUsers,M=a.onSave,O=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,U=a.blockEditScreen,V=void 0!==U&&U,Y=a.hideManageReminders,G=void 0!==Y&&Y,J=a.hideClearButton,K=void 0!==J&&J,Q=a.hideSaveChangesButton,X=void 0!==Q&&Q,Z=a.hideFooterActions,$=void 0!==Z&&Z;a.remindersData;var ee=a.remainderOwners,ie=a.setRemainderOwners,ne=a.schedules,re=a.setSchedules,te=a.handelSendNow,ae=a.showPreviewEmail,oe=a.tabName,le=a.reminderLabels,se=a.reminderColors,de=a.reminderChipColor,ue=a.reminderAssignees,ce=a.reminderFallbackRecipients,ve=a.reminderRecipientsColor,me=a.manualReminderTitle,pe=a.manualReminderDescription,fe=a.lastReminderText,ye=a.selectRecipientsLabel,he=a.previewEmailButtonLabel,be=a.sendNowButtonLabel,De=a.reminderSuccessTitle,ge=a.reminderSuccessDescription,we=a.escalationTitle,_e=a.escalationTitleTooltip,Ae=a.escalationDescription,Re=a.configureAutoReminderText,Le=a.getDynamicStatement,Te=a.reminderStartDateLabel,Se=a.documentDueDateLabel,qe=a.reminderFrequencyLabel,Ce=a.escalationRemindersLabel,Be=a.escalationTooltip,Fe=a.escalationConditionText,Ne=a.daysText,xe=a.dueDataAndRepeatText,Me=a.reminderFrequencyOptions,Oe=a.escalationFrequencyOptions,ke=a.beforeAfterOptions,je=d.useMemo(function(){var e;return(null===(e=A.tabData)||void 0===e?void 0:e.length)?A.tabData:b},[A.tabData]),He=d.useMemo(function(){return je.filter(function(e){var i=g(e.tabName);return!((!z||V)&&"assignees"===i)&&(!G||"reminders"!==i)})},[je,z,V,G]),Ie=u(null!==(w=null===(o=He[0])||void 0===o?void 0:o.tabName)&&void 0!==w?w:""),Pe=Ie[0],Ee=Ie[1],We=g(Pe),ze=u(T||m),Ue=ze[0],Ve=ze[1],Ye=u(q||!1),Ge=Ye[0],Je=Ye[1],Ke=u(B||null),Qe=Ke[0],Xe=Ke[1],Ze=u(null),$e=Ze[0],ei=Ze[1],ii=u([]),ni=ii[0],ri=ii[1],ti=u(ee||D),ai=ti[0],oi=ti[1],li=void 0!==ne?ne:ni,si=void 0!==re?re:ri,di=void 0!==ee?ee:ai,ui=function(i){return i.map(function(i,n){return 0!==n||i.isHidden?i:e(e({},i),{isMandatory:!0,hasDueDate:!0})})},ci=function(i){return i.map(function(i){var n;return e(e({},i),{assignees:(null!==(n=i.assignees)&&void 0!==n?n:[]).map(function(i){var n=i.role||i.accessLevel||"";return e(e({},i),{role:n,accessLevel:i.accessLevel||n})})})})},vi=d.useMemo(function(){return{due_at:Qe?Qe.toISOString():"",assignee:Ue.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))},{})}},[Qe,Ue]);c(function(){void 0!==ee&&oi(ee)},[ee]),c(function(){E&&E().then(function(e){Array.isArray(e)&&e.length>0?ei(e[0]):e&&!Array.isArray(e)&&ei(e)}).catch(function(e){return console.error("Failed to fetch user:",e)})},[]),c(function(){oe&&He.some(function(e){return e.tabName===oe})&&Ee(oe)},[oe,He]),c(function(){var e,i;He.some(function(e){return e.tabName===Pe})||Ee(null!==(i=null===(e=He[0])||void 0===e?void 0:e.tabName)&&void 0!==i?i:"")},[He,Pe]),c(function(){T&&Ve(function(e){var n=e.find(function(e){return e.isHidden}),r=n?i(i([],T,!0),[n],!1):T;return ci(ui(r))})},[T]),c(function(){void 0!==q&&Je(q)},[q]),c(function(){void 0!==B&&Xe(B)},[B]),c(function(){Ve(function(e){var n=e.filter(function(e){return!e.isHidden});if(Ge){var r={headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==$e?void 0:$e.id)||"me",email:(null==$e?void 0:$e.email)||"",name:(null==$e?void 0:$e.name)?"".concat($e.name," (You)"):"Username (You)",accessLevel:"Approve",role:"Final Approver"}]};return ci(i(i([],n,!0),[r],!1))}return ci(n)})},[Ge,$e]),c(function(){var e=Ue.flatMap(function(e){return e.assignees||[]}).filter(function(e){return e.email});oi(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:""}}})})},[Ue]);var mi=Ue.filter(function(e){return!e.isHidden}),pi=mi.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}),fi=!1!==A.showFinalApprovalDueDate,yi=P||(!!pi||fi&&!Qe),hi=A.wrapperTitle||"Assign Redline and Manage Reminders",bi=A.wrapperSubTitle||"Sec 4.1 - Technical Security Information",Di=A.wrapperPriority||"High",gi=A.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"===We?{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:hi})),n("div",e({style:e(e({},h.redlineRow),H.redlineRow)},{children:[r("span",e({style:e(e({},h.redlineName),H.redlineName)},{children:bi})),r("span",e({style:e(e(e({},h.redlineBadge),gi),H.redlineBadge)},{children:Di}))]}))]})),r("button",e({style:e(e({},h.closeBtn),H.closeBtn),onClick:N},{children:r(l,{size:20,color:"#6B7280"})}))]})),r("div",e({style:e(e({},h.tabBar),H.tabBar)},{children:He.map(function(i){var r=Pe===i.tabName;return n("button",e({style:e(e(e({},h.tab),H.tab),r?e(e({},h.tabActive),H.tabActive):{}),onClick:function(){return Ee(i.tabName)}},{children:[i.tabIcon," ",i.tabName]}),i.tabName)})})),n("div",e({style:e(e({},h.body),H.body)},{children:["assignees"===We&&n(t,{children:[!1!==A.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:Qe?Qe.toISOString().slice(0,10):"",onChange:Xe})})),n("span",e({style:e(e({},h.requiredToProceeed),H.requiredToProceeed)},{children:[r(s,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),r(v,{levels:Ue,totalLevels:k,requireFinalApproval:Ge,setLevels:Ve,setRequireFinalApproval:function(e){Je(e)},fetchUsers:x,onValidationError:O,customStyles:H,finalApprovalDueDate:Qe})]}),"reminders"===We&&r(y,e({data:vi,schedules:li,setSchedules:si,remainderOwners:di,setRemainderOwners:function(e){var i="function"==typeof e?e(di):e;ie?ie(i):oi(i)},handelSendNow:function(e,i){te&&te(e||li,i||di)},showPreviewEmail:null!=ae&&ae},void 0!==le&&{labels:le},void 0!==se&&{colors:se},void 0!==de&&{chipColor:de},void 0!==ue&&{assignees:ue},void 0!==ce&&{fallbackRecipients:ce},void 0!==ve&&{recipientsColor:ve},void 0!==me&&{manualReminderTitle:me},void 0!==pe&&{manualReminderDescription:pe},void 0!==fe&&{lastReminderText:fe},void 0!==ye&&{selectRecipientsLabel:ye},void 0!==he&&{previewEmailButtonLabel:he},void 0!==be&&{sendNowButtonLabel:be},void 0!==De&&{reminderSuccessTitle:De},void 0!==ge&&{reminderSuccessDescription:ge},void 0!==we&&{escalationTitle:we},void 0!==_e&&{escalationTitleTooltip:_e},void 0!==Ae&&{escalationDescription:Ae},void 0!==Re&&{configureAutoReminderText:Re},void 0!==Le&&{getDynamicStatement:Le},void 0!==Te&&{reminderStartDateLabel:Te},void 0!==Se&&{documentDueDateLabel:Se},void 0!==qe&&{reminderFrequencyLabel:qe},void 0!==Ce&&{escalationRemindersLabel:Ce},void 0!==Be&&{escalationTooltip:Be},void 0!==Fe&&{escalationConditionText:Fe},void 0!==Ne&&{daysText:Ne},void 0!==xe&&{dueDataAndRepeatText:xe},void 0!==Me&&{reminderFrequencyOptions:Me},void 0!==Oe&&{escalationFrequencyOptions:Oe},void 0!==ke&&{beforeAfterOptions:ke})),"review"===We&&r(p,{levels:Ue,reviewData:L})]})),!$&&(!K||!X)&&n("div",e({style:e(e({},h.footer),H.footer)},{children:[!K&&r("button",e({style:e(e(e({},h.clearBtn),H.clearBtn),P?H.actionBtnDisabled:{}),onClick:function(){Ve(ui(m.map(function(i){return e(e({},i),{assignees:[],dueDate:null})}))),Je(!1),Xe(null)},disabled:P},{children:"Clear"})),!X&&r("button",e({style:e(e(e({},h.saveBtn),H.saveBtn),yi?e({opacity:.55,cursor:"not-allowed"},H.actionBtnDisabled):{}),onClick:function(){if(yi)P||null==O||O(function(){if(fi&&!Qe)return"Final approval due date is required";if(!pi)return"Please fill all required fields before saving";var e=mi.indexOf(pi)+1,i=[pi.dueDate?null:"due date",(pi.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=ci(Ue.filter(function(e){return!e.isHidden}));null==S||S(e),null==C||C(Ge),null==F||F(Qe),null==M||M({levels:e,requireFinalApproval:Ge,finalApprovalDueDate:Qe,activeTab:We,schedules:li,remainderOwners:di})}},disabled:yi},{children:"Save Changes"}))]}))]}))}))}export{w as AssignReminderWrapper};
|
|
2
2
|
//# sourceMappingURL=AssignReminderWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as i,Fragment as n}from"react/jsx-runtime";import l from"react";import{Info as r,Check as o,Hourglass as s,X as d,CircleCheck as a,MinusCircle as p,User as c,ArrowRight as g,CheckCircle as v,FileCheck as u,LucidePen as f}from"lucide-react";import{DEFAULT_REVIEW_STATUS_STYLES as x}from"../styles/ReviewStatusStyles.js";var h=function(e){var t=e.trim().split(/\s+/);return 1===t.length?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()},y=function(e){for(var t=[{bg:"#FEF9C3",fg:"#854D0E"},{bg:"#DCFCE7",fg:"#166534"},{bg:"#DBEAFE",fg:"#1E40AF"},{bg:"#F3E8FF",fg:"#6B21A8"},{bg:"#FFE4E6",fg:"#9F1239"},{bg:"#FEE2E2",fg:"#991B1B"},{bg:"#E0F2FE",fg:"#0369A1"}],i=0,n=0;n<e.length;n++)i=e.charCodeAt(n)+((i<<5)-i);return t[Math.abs(i)%t.length]};function F(o){var s=o.levels,d=o.reviewData,a=void 0===d?{}:d,p=s.map(function(e,t){var i,n,l,r=null!==(n=null!==(i=a[t])&&void 0!==i?i:a[e.headerName])&&void 0!==n?n:{},o=(null!==(l=e.assignees)&&void 0!==l?l:[]).map(function(e){return{user:e,approved:!0===r[String(e.id)]||!0===r[String(e.email)]||"approved"===e.action||!0===e.approved,rejected:"rejected"===r[String(e.id)]||"rejected"===r[String(e.email)]||"rejected"===e.action}}),s="not_started";if(!0===e.isApproved)s="approved";else if(!0===e.isRejected)s="rejected";else if("approved"===e.status||"completed"===e.status)s="approved";else if("rejected"===e.status)s="rejected";else{var d=o.length>0&&o.every(function(e){return e.approved}),p=o.some(function(e){return e.rejected});d?s="approved":p&&(s="rejected")}return{level:e,assigneeStatuses:o,status:s}}),c=!1,g=p.map(function(t){var i="waiting",n=!0===t.level.isHidden;return"approved"===t.status?i="approved":"rejected"===t.status?(i="rejected",c=!0):t.level.isMandatory||n?c||(i="pending",c=!0):i="optional",e(e({},t),{extendedStatus:i,isFinalApproval:n})}),v=function(e){return e.filter(function(e){return"approved"===e.status}).length}(p),u=p.length;return t("div",e({style:{display:"flex",flexDirection:"column",gap:24}},{children:[t("div",{children:[t("div",e({style:x.progressHeader},{children:[i("span",e({style:x.progressTitle},{children:"Approval Progress"})),t("span",e({style:x.progressCount},{children:[v," of ",u," level",1!==u?"s":""," complete"]}))]})),i("div",e({style:x.progressBarTrack},{children:g.map(function(t,n){var l,r="approved"===t.extendedStatus,o="rejected"===t.extendedStatus,s="optional"===t.extendedStatus,d=0===n,a=n===u-1;if((null===(l=t.level)||void 0===l?void 0:l.assignees)&&Array.isArray(t.level.assignees)&&!(t.level.assignees.length<1))return i("div",{style:e(e({},x.progressSegment),{backgroundColor:r?"#6366F1":o?"#EF4444":s?"#F1F5F9":"#E5E7EB",borderRadius:d&&a?"999px":d?"999px 0 0 999px":a?"0 999px 999px 0":"0",marginRight:a?0:3})},n)})})),i("div",e({style:x.progressLabels},{children:g.map(function(t,l){return i(n,{children:i("span",e({style:e(e({},x.progressLabel),{color:"approved"===t.extendedStatus?"#6366F1":"rejected"===t.extendedStatus?"#EF4444":"#9CA3AF",fontWeight:"approved"===t.extendedStatus||"rejected"===t.extendedStatus?600:400})},{children:t.level.assignees&&t.level.assignees.length>0?"".concat(t.level.headerName," - ").concat(t.level.title):""}),l)})})}))]}),t("div",e({style:{display:"flex",flexDirection:"column",gap:0}},{children:[i("div",e({style:x.sectionHeadingRow},{children:t("div",e({style:{display:"flex",alignItems:"center",gap:6}},{children:[i("span",e({style:x.sectionTitle},{children:"Approval Levels"})),i(r,{size:15,color:"#9CA3AF"})]}))})),i("div",e({style:{display:"flex",flexDirection:"column",marginTop:12}},{children:g.map(function(n,r){var o,s=r===g.length-1,d=n.isFinalApproval,a=g[r+1],p=null==a?void 0:a.isFinalApproval,c=a&&!a.level.isMandatory&&!p;return t(l.Fragment,d?{children:[t("div",e({style:{display:"flex",alignItems:"center",margin:"16px 0"}},{children:[i("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}}),i("span",e({style:{padding:"0 16px",fontSize:"14px",color:"#6B7280"}},{children:"then"})),i("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}})]})),i("div",e({style:{marginBottom:"12px",fontSize:"15px",fontWeight:500,color:"#6B7280"}},{children:"Final Approval"})),i(b,{reviewLevel:n})]}:{children:[i(m,{reviewLevel:n}),!s&&!p&&a.level.assignees&&(null===(o=a.level.assignees)||void 0===o?void 0:o.length)>0&&t("div",e({style:{display:"flex",alignItems:"center",margin:"20px 0"}},{children:[i("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}}),i("span",e({style:{padding:"0 16px",fontSize:"14px",color:"#6B7280"}},{children:c?"optional":"then"})),i("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}})]}))]},r)})}))]})),i(S,{levels:s})]}))}function m(n){var l,a=n.reviewLevel,p=a.level,c=a.assigneeStatuses,g=a.extendedStatus,v=null!==(l={approved:{bg:"#ECFDF5",color:"#059669",icon:i(o,{size:14}),text:"Approved"},pending:{bg:"#FFEDD5",color:"#C2410C",icon:i(s,{size:14}),text:"Pending"},waiting:{bg:"#F3F4F6",color:"#4B5563",icon:i(s,{size:14}),text:"Waiting"},rejected:{bg:"#FEF2F2",color:"#DC2626",icon:i(d,{size:14}),text:"Rejected"},optional:{bg:"#F8FAFC",color:"#64748B",icon:i(r,{size:14}),text:"Optional"}}[g])&&void 0!==l?l:{bg:"#F3F4F6",color:"#4B5563",icon:i(s,{size:14}),text:"Waiting"},u="approved"===g?"1px solid #D1FAE5":"rejected"===g?"1px solid #FCA5A5":"optional"===g?"1px dashed #CBD5E1":"1px solid #E5E7EB",f="approved"===g?"#F0FDF4":"rejected"===g?"#FEF2F2":"#F8FAFC";return!p.assignees||!Array.isArray(p.assignees)||p.assignees.length<1?null:t("div",e({style:{backgroundColor:"#FFFFFF",border:u,borderRadius:"8px",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[t("div",e({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:f,borderBottom:u,padding:"12px 16px"}},{children:[t("div",e({style:{display:"flex",alignItems:"center",gap:10}},{children:[i(C,{name:p.headerName}),i("span",e({style:{fontSize:15,fontWeight:500,color:"#374151"}},{children:p.title}))]})),t("div",e({style:{backgroundColor:v.bg,color:v.color,padding:"4px 10px",borderRadius:"16px",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"6px"}},{children:[v.icon,v.text]}))]})),i("div",e({style:{padding:"16px"}},{children:c.length>0?i("div",e({style:{display:"flex",flexDirection:"column",gap:16}},{children:c.map(function(e,t){var n;return i(E,{assigneeStatus:e,extendedStatus:g},null!==(n=e.user.id)&&void 0!==n?n:t)})})):i("div",e({style:{fontSize:14,color:"#6B7280"}},{children:"No assignees added yet"}))}))]}))}function b(n){var l,a,p,c,g=n.reviewLevel,v=g.assigneeStatuses,u=g.extendedStatus,f=null!==(l={approved:{bg:"#ECFDF5",color:"#059669",icon:i(o,{size:14}),text:"Approved"},pending:{bg:"#FFEDD5",color:"#C2410C",icon:i(s,{size:14}),text:"Pending"},waiting:{bg:"#F3F4F6",color:"#4B5563",icon:i(s,{size:14}),text:"Waiting"},rejected:{bg:"#FEF2F2",color:"#DC2626",icon:i(d,{size:14}),text:"Rejected"},optional:{bg:"#F8FAFC",color:"#64748B",icon:i(r,{size:14}),text:"Optional"}}[u])&&void 0!==l?l:{bg:"#F3F4F6",color:"#4B5563",icon:i(s,{size:14}),text:"Waiting"},x=null===(a=v[0])||void 0===a?void 0:a.user;return t("div",e({style:{backgroundColor:"#FFFFFF",border:"1px solid #E5E7EB",borderRadius:"8px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[x?t("div",e({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[i("div",e({style:{width:"36px",height:"36px",borderRadius:"50%",backgroundColor:y(null!==(p=x.id)&&void 0!==p?p:x.name).bg,color:y(null!==(c=x.id)&&void 0!==c?c:x.name).fg,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,fontSize:"14px"}},{children:h(x.name)})),t("div",e({style:{display:"flex",flexDirection:"column"}},{children:[i("span",e({style:{fontSize:"15px",fontWeight:400,color:"#374151"}},{children:x.name})),i("span",e({style:{fontSize:"13px",color:"#6B7280"}},{children:"Will be notified after all levels approve"}))]}))]})):i("span",e({style:{fontSize:14,color:"#6B7280"}},{children:"No owner assigned"})),t("div",e({style:{backgroundColor:f.bg,color:f.color,padding:"4px 10px",borderRadius:"16px",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"6px"}},{children:[f.icon,f.text]}))]}))}function E(l){var r,o=l.assigneeStatus,s=l.extendedStatus,c=o.user,g=o.approved||"approved"===c.action,v=o.rejected||"rejected"===c.action,u=h(c.name),f=y(null!==(r=c.id)&&void 0!==r?r:c.name);return t("div",e({style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t("div",e({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[i("div",e({style:{width:"36px",height:"36px",borderRadius:"50%",backgroundColor:f.bg,color:f.fg,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:"13px"}},{children:u})),t("div",e({style:{display:"flex",flexDirection:"column",gap:"2px"}},{children:[i("span",e({style:{fontSize:"14px",fontWeight:400,color:"#374151"}},{children:c.name})),i("span",e({style:{fontSize:"13px",color:"#6B7280"}},{children:c.email}))]}))]})),i("div",e({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:g?i(a,{size:20,color:"#16A34A",strokeWidth:1.5}):v?i(d,{size:20,color:"#DC2626",strokeWidth:1.5}):"pending"===s?t(n,{children:[i("span",{style:{fontSize:"13px",color:"#4B5563"}}),i(p,{size:20,color:"#9CA3AF",strokeWidth:1.5})]}):i(p,"optional"===s?{size:20,color:"#CBD5E1",strokeWidth:1.5}:{size:20,color:"#9CA3AF",strokeWidth:1.5})}))]}))}function C(t){var n=t.name,l=y(n);return i("span",e({style:{backgroundColor:l.bg,color:l.fg,borderRadius:12,padding:"3px 10px",fontSize:12,fontWeight:500}},{children:n}))}var z=function(e){switch(e){case 0:return i(f,{size:16,color:"#475569"});case 1:return i(u,{size:16,color:"#475569"});case 2:return i(c,{size:16,color:"#475569"});default:return i(v,{size:16,color:"#475569"})}};function S(n){var r=n.levels,o=r.some(function(e){var t,i;return(null!==(i=null===(t=e.assignees)||void 0===t?void 0:t.length)&&void 0!==i?i:0)>0});return t("div",e({style:x.flowBox},{children:[i("span",e({style:x.flowTitle},{children:"Current Approval Flow"})),o?i("div",e({style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center",marginTop:6}},{children:r.map(function(n,o){var s,d=n.isHidden,a=!n.isMandatory&&!d,p=null===(s=n.assignees)||void 0===s?void 0:s.map(function(e){return e.name}).join(" / ");if(!p)return null;var v=d?i(c,{size:16,color:"#475569"}):z(o);return t(l.Fragment,{children:[t("span",e({style:e(e({},x.flowChip),{display:"flex",alignItems:"center",gap:"6px",border:a?"1px dashed #CBD5E1":void 0})},{children:[v,t("span",e({style:{fontSize:13,color:a?"#64748B":"#374151"}},{children:[p," ",a&&"(Optional)"]}))]})),o<r.length-1&&i(g,{size:16,color:"#9CA3AF"})]},o)})})):i("p",e({style:x.flowEmpty},{children:"No owners assigned yet."}))]}))}export{F as default};
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as i,Fragment as n}from"react/jsx-runtime";import l from"react";import{Info as r,Check as o,Hourglass as s,X as d,CircleCheck as a,MinusCircle as p,User as c,ArrowRight as g,CheckCircle as v,FileCheck as u,LucidePen as x}from"lucide-react";import{DEFAULT_REVIEW_STATUS_STYLES as f}from"../styles/ReviewStatusStyles.js";var h=function(e){var t=e.trim().split(/\s+/);return 1===t.length?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()},y=function(e){for(var t=[{bg:"#FEF9C3",fg:"#854D0E"},{bg:"#DCFCE7",fg:"#166534"},{bg:"#DBEAFE",fg:"#1E40AF"},{bg:"#F3E8FF",fg:"#6B21A8"},{bg:"#FFE4E6",fg:"#9F1239"},{bg:"#FEE2E2",fg:"#991B1B"},{bg:"#E0F2FE",fg:"#0369A1"}],i=0,n=0;n<e.length;n++)i=e.charCodeAt(n)+((i<<5)-i);return t[Math.abs(i)%t.length]},F=function(e){var t=(null==e?void 0:e.role)||(null==e?void 0:e.accessLevel);return"string"==typeof t&&t.trim()?t:"No role assigned"};function m(n){var o=n.levels,s=n.reviewData,d=void 0===s?{}:s,a=o.map(function(e,t){var i,n,l,r=null!==(n=null!==(i=d[t])&&void 0!==i?i:d[e.headerName])&&void 0!==n?n:{},o=(null!==(l=e.assignees)&&void 0!==l?l:[]).map(function(e){return{user:e,approved:!0===r[String(e.id)]||!0===r[String(e.email)]||"approved"===e.action||!0===e.approved,rejected:"rejected"===r[String(e.id)]||"rejected"===r[String(e.email)]||"rejected"===e.action}}),s="not_started";if(!0===e.isApproved)s="approved";else if(!0===e.isRejected)s="rejected";else if("approved"===e.status||"completed"===e.status)s="approved";else if("rejected"===e.status)s="rejected";else{var a=o.length>0&&o.every(function(e){return e.approved}),p=o.some(function(e){return e.rejected});a?s="approved":p&&(s="rejected")}return{level:e,assigneeStatuses:o,status:s}}),p=!1,c=a.map(function(t){var i="waiting",n=!0===t.level.isHidden;return"approved"===t.status?i="approved":"rejected"===t.status?(i="rejected",p=!0):t.level.isMandatory||n?p||(i="pending",p=!0):i="optional",e(e({},t),{extendedStatus:i,isFinalApproval:n})}),g=function(e){return e.filter(function(e){return"approved"===e.status}).length}(a),v=a.length;return t("div",e({style:{display:"flex",flexDirection:"column",gap:24}},{children:[t("div",{children:[t("div",e({style:f.progressHeader},{children:[i("span",e({style:f.progressTitle},{children:"Approval Progress"})),t("span",e({style:f.progressCount},{children:[g," of ",v," level",1!==v?"s":""," complete"]}))]})),i("div",e({style:f.progressBarTrack},{children:c.map(function(t,n){var l,r="approved"===t.extendedStatus,o="rejected"===t.extendedStatus,s="optional"===t.extendedStatus,d=0===n,a=n===v-1;return!(null===(l=t.level)||void 0===l?void 0:l.assignees)||!Array.isArray(t.level.assignees)||t.level.assignees.length<1?null:i("div",{style:e(e({},f.progressSegment),{backgroundColor:r?"#6366F1":o?"#EF4444":s?"#F1F5F9":"#E5E7EB",borderRadius:d&&a?"999px":d?"999px 0 0 999px":a?"0 999px 999px 0":"0",marginRight:a?0:3})},n)})})),i("div",e({style:f.progressLabels},{children:c.map(function(t,n){return i("span",e({style:e(e({},f.progressLabel),{color:"approved"===t.extendedStatus?"#6366F1":"rejected"===t.extendedStatus?"#EF4444":"#9CA3AF",fontWeight:"approved"===t.extendedStatus||"rejected"===t.extendedStatus?600:400})},{children:t.level.assignees&&t.level.assignees.length>0?"".concat(t.level.headerName," - ").concat(t.level.title):""}),n)})}))]}),t("div",e({style:{display:"flex",flexDirection:"column",gap:0}},{children:[i("div",e({style:f.sectionHeadingRow},{children:t("div",e({style:{display:"flex",alignItems:"center",gap:6}},{children:[i("span",e({style:f.sectionTitle},{children:"Approval Levels"})),i(r,{size:15,color:"#9CA3AF"})]}))})),i("div",e({style:{display:"flex",flexDirection:"column",marginTop:12}},{children:c.map(function(n,r){var o,s=r===c.length-1,d=n.isFinalApproval,a=c[r+1],p=null==a?void 0:a.isFinalApproval,g=a&&!a.level.isMandatory&&!p;return t(l.Fragment,d?{children:[t("div",e({style:{display:"flex",alignItems:"center",margin:"16px 0"}},{children:[i("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}}),i("span",e({style:{padding:"0 16px",fontSize:"14px",color:"#6B7280"}},{children:"then"})),i("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}})]})),i("div",e({style:{marginBottom:"12px",fontSize:"15px",fontWeight:500,color:"#6B7280"}},{children:"Final Approval"})),i(E,{reviewLevel:n})]}:{children:[i(b,{reviewLevel:n}),!s&&!p&&a.level.assignees&&(null===(o=a.level.assignees)||void 0===o?void 0:o.length)>0&&t("div",e({style:{display:"flex",alignItems:"center",margin:"20px 0"}},{children:[i("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}}),i("span",e({style:{padding:"0 16px",fontSize:"14px",color:"#6B7280"}},{children:g?"optional":"then"})),i("div",{style:{flex:1,height:"1px",backgroundColor:"#E5E7EB"}})]}))]},r)})}))]})),i(A,{levels:o})]}))}function b(n){var l,a=n.reviewLevel,p=a.level,c=a.assigneeStatuses,g=a.extendedStatus,v=null!==(l={approved:{bg:"#ECFDF5",color:"#059669",icon:i(o,{size:14}),text:"Approved"},pending:{bg:"#FFEDD5",color:"#C2410C",icon:i(s,{size:14}),text:"Pending"},waiting:{bg:"#F3F4F6",color:"#4B5563",icon:i(s,{size:14}),text:"Waiting"},rejected:{bg:"#FEF2F2",color:"#DC2626",icon:i(d,{size:14}),text:"Rejected"},optional:{bg:"#F8FAFC",color:"#64748B",icon:i(r,{size:14}),text:"Optional"}}[g])&&void 0!==l?l:{bg:"#F3F4F6",color:"#4B5563",icon:i(s,{size:14}),text:"Waiting"},u="approved"===g?"1px solid #D1FAE5":"rejected"===g?"1px solid #FCA5A5":"optional"===g?"1px dashed #CBD5E1":"1px solid #E5E7EB",x="approved"===g?"#F0FDF4":"rejected"===g?"#FEF2F2":"#F8FAFC";return!p.assignees||!Array.isArray(p.assignees)||p.assignees.length<1?null:t("div",e({style:{backgroundColor:"#FFFFFF",border:u,borderRadius:"8px",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[t("div",e({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:x,borderBottom:u,padding:"12px 16px"}},{children:[t("div",e({style:{display:"flex",alignItems:"center",gap:10}},{children:[i(z,{name:p.headerName}),i("span",e({style:{fontSize:15,fontWeight:500,color:"#374151"}},{children:p.title}))]})),t("div",e({style:{backgroundColor:v.bg,color:v.color,padding:"4px 10px",borderRadius:"16px",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"6px"}},{children:[v.icon,v.text]}))]})),i("div",e({style:{padding:"16px"}},{children:c.length>0?i("div",e({style:{display:"flex",flexDirection:"column",gap:16}},{children:c.map(function(e,t){var n;return i(C,{assigneeStatus:e,extendedStatus:g},null!==(n=e.user.id)&&void 0!==n?n:t)})})):i("div",e({style:{fontSize:14,color:"#6B7280"}},{children:"No assignees added yet"}))}))]}))}function E(n){var l,a,p,c,g=n.reviewLevel,v=g.assigneeStatuses,u=g.extendedStatus,x=null!==(l={approved:{bg:"#ECFDF5",color:"#059669",icon:i(o,{size:14}),text:"Approved"},pending:{bg:"#FFEDD5",color:"#C2410C",icon:i(s,{size:14}),text:"Pending"},waiting:{bg:"#F3F4F6",color:"#4B5563",icon:i(s,{size:14}),text:"Waiting"},rejected:{bg:"#FEF2F2",color:"#DC2626",icon:i(d,{size:14}),text:"Rejected"},optional:{bg:"#F8FAFC",color:"#64748B",icon:i(r,{size:14}),text:"Optional"}}[u])&&void 0!==l?l:{bg:"#F3F4F6",color:"#4B5563",icon:i(s,{size:14}),text:"Waiting"},f=null===(a=v[0])||void 0===a?void 0:a.user,m=F(f);return t("div",e({style:{backgroundColor:"#FFFFFF",border:"1px solid #E5E7EB",borderRadius:"8px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[f?t("div",e({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[i("div",e({style:{width:"36px",height:"36px",borderRadius:"50%",backgroundColor:y(null!==(p=f.id)&&void 0!==p?p:f.name).bg,color:y(null!==(c=f.id)&&void 0!==c?c:f.name).fg,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,fontSize:"14px"}},{children:h(f.name)})),t("div",e({style:{display:"flex",flexDirection:"column",gap:"2px"}},{children:[i("span",e({style:{fontSize:"15px",fontWeight:400,color:"#374151"}},{children:f.name})),t("span",e({style:{fontSize:"13px",color:"#475569",fontWeight:500}},{children:["Role: ",m]})),i("span",e({style:{fontSize:"13px",color:"#6B7280"}},{children:"Will be notified after all levels approve"}))]}))]})):i("span",e({style:{fontSize:14,color:"#6B7280"}},{children:"No owner assigned"})),t("div",e({style:{backgroundColor:x.bg,color:x.color,padding:"4px 10px",borderRadius:"16px",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"6px"}},{children:[x.icon,x.text]}))]}))}function C(l){var r,o=l.assigneeStatus,s=l.extendedStatus,c=o.user,g=o.approved||"approved"===c.action,v=o.rejected||"rejected"===c.action,u=h(c.name),x=y(null!==(r=c.id)&&void 0!==r?r:c.name),f=F(c);return t("div",e({style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t("div",e({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:[i("div",e({style:{width:"36px",height:"36px",borderRadius:"50%",backgroundColor:x.bg,color:x.fg,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:"13px"}},{children:u})),t("div",e({style:{display:"flex",flexDirection:"column",gap:"2px"}},{children:[t("div",e({style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}},{children:[i("span",e({style:{fontSize:"14px",fontWeight:400,color:"#374151"}},{children:c.name})),i("span",e({style:{fontSize:"11px",fontWeight:500,color:"#475569",backgroundColor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"999px",padding:"2px 8px",lineHeight:"16px"}},{children:f}))]})),i("span",e({style:{fontSize:"13px",color:"#6B7280"}},{children:c.email}))]}))]})),i("div",e({style:{display:"flex",alignItems:"center",gap:"12px"}},{children:g?i(a,{size:20,color:"#16A34A",strokeWidth:1.5}):v?i(d,{size:20,color:"#DC2626",strokeWidth:1.5}):"pending"===s?t(n,{children:[i("span",{style:{fontSize:"13px",color:"#4B5563"}}),i(p,{size:20,color:"#9CA3AF",strokeWidth:1.5})]}):i(p,"optional"===s?{size:20,color:"#CBD5E1",strokeWidth:1.5}:{size:20,color:"#9CA3AF",strokeWidth:1.5})}))]}))}function z(t){var n=t.name,l=y(n);return i("span",e({style:{backgroundColor:l.bg,color:l.fg,borderRadius:12,padding:"3px 10px",fontSize:12,fontWeight:500}},{children:n}))}var S=function(e){switch(e){case 0:return i(x,{size:16,color:"#475569"});case 1:return i(u,{size:16,color:"#475569"});case 2:return i(c,{size:16,color:"#475569"});default:return i(v,{size:16,color:"#475569"})}};function A(n){var r=n.levels.filter(function(e){var t,i;return(null!==(i=null===(t=e.assignees)||void 0===t?void 0:t.length)&&void 0!==i?i:0)>0});return t("div",e({style:f.flowBox},{children:[i("span",e({style:f.flowTitle},{children:"Current Approval Flow"})),r.length>0?i("div",e({style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center",marginTop:6}},{children:r.map(function(n,o){var s,d=n.isHidden,a=!n.isMandatory&&!d,p=d?i(c,{size:16,color:"#475569"}):S(o);return t(l.Fragment,{children:[t("span",e({style:e(e({},f.flowChip),{display:"flex",alignItems:"center",gap:"8px",border:a?"1px dashed #CBD5E1":void 0})},{children:[p,t("span",e({style:{display:"flex",alignItems:"center",gap:"6px",flexWrap:"wrap"}},{children:[n.assignees.map(function(n,r){var o,s,d=F(n);return t(l.Fragment,{children:[r>0&&i("span",e({style:{color:"#9CA3AF"}},{children:"/"})),t("span",e({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[i("span",e({style:{fontSize:13,color:a?"#64748B":"#374151"}},{children:n.name})),i("span",e({style:{fontSize:"11px",fontWeight:500,color:"#475569",backgroundColor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"999px",padding:"2px 8px",lineHeight:"16px"}},{children:d}))]}))]},null!==(s=null!==(o=n.id)&&void 0!==o?o:n.email)&&void 0!==s?s:r)}),a&&i("span",e({style:{fontSize:12,color:"#64748B"}},{children:"Optional"}))]}))]})),o<r.length-1&&i(g,{size:16,color:"#9CA3AF"})]},null!==(s=n.id)&&void 0!==s?s:"".concat(n.headerName,"-").concat(o))})})):i("p",e({style:f.flowEmpty},{children:"No owners assigned yet."}))]}))}export{m as default};
|
|
2
2
|
//# sourceMappingURL=ReviewStatus.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;AA0E1B,iBAAS,GAAG,sBAMX;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 }: ExtendedLevelAccordionProps): React.JSX.Element;
|
|
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;
|
|
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;AAMpD,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,GACvB,EAAE,2BAA2B,qBAiN7B"}
|
|
@@ -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 }: AssignReminderLevelsProps): React.JSX.Element;
|
|
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;
|
|
1
|
+
{"version":3,"file":"AssignReminderLevels.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderLevels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,EAAE,yBAAyB,EAAS,MAAM,eAAe,CAAC;AA0BjE,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,GACvB,EAAE,yBAAyB,qBA6S3B;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, 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;
|
|
3
|
+
declare function AssignReminderWrapper({ metadata, reviewData, levels, setLevels, requireFinalApproval, setRequireFinalApproval, approvalDueDate, setApprovalDueDate, onClose, fetchUsers, onSave, onValidationError, totalLevels, customStyles, isSaving, onRequireFinalApproval, isOwner, blockEditScreen, hideManageReminders, hideClearButton, hideSaveChangesButton, hideFooterActions, 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,
|
|
1
|
+
{"version":3,"file":"AssignReminderWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,OAAO,EACH,0BAA0B,EAK7B,MAAM,eAAe,CAAC;AAuEvB,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,eAAuB,EACvB,mBAA2B,EAC3B,eAAuB,EACvB,qBAA6B,EAC7B,iBAAyB,EAGzB,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,qBAslB5B;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReviewStatus.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/ReviewStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,OAAO,
|
|
1
|
+
{"version":3,"file":"ReviewStatus.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/ReviewStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,OAAO,EAIH,iBAAiB,EACpB,MAAM,gBAAgB,CAAC;AAiDxB,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,MAAM,EAAE,UAAe,EAAE,EAAE,iBAAiB,qBAoNlF"}
|
|
@@ -75,6 +75,11 @@ export interface AssignReminderWrapperProps {
|
|
|
75
75
|
schedules?: any[];
|
|
76
76
|
setSchedules?: (schedules: any[]) => void;
|
|
77
77
|
handelSendNow?: (schedules: any[], remainderOwners: remainderOwnerValue[]) => void;
|
|
78
|
+
blockEditScreen?: boolean;
|
|
79
|
+
hideManageReminders?: boolean;
|
|
80
|
+
hideClearButton?: boolean;
|
|
81
|
+
hideSaveChangesButton?: boolean;
|
|
82
|
+
hideFooterActions?: boolean;
|
|
78
83
|
showPreviewEmail?: boolean;
|
|
79
84
|
reminderLabels?: string[];
|
|
80
85
|
reminderColors?: ColorConfig[];
|
|
@@ -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,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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.59",
|
|
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": "craco start",
|
|
27
|
+
"start": "PORT=3007 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",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"@mui/x-date-pickers": "^7.29.4",
|
|
129
129
|
"axios": "^1.7.9",
|
|
130
130
|
"dayjs": "^1.11.21",
|
|
131
|
-
"framer-motion": "^
|
|
131
|
+
"framer-motion": "^12.42.0",
|
|
132
132
|
"lucide-react": "^0.474.0",
|
|
133
133
|
"primeicons": "^7.0.0",
|
|
134
134
|
"primereact": "^10.9.7",
|