@viswa-test/creative-workspace-ui-component 0.0.43 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),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,j=l.onAssigneesChange,v=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,k=s.useState(C),D=k[0],F=k[1],S=s.useState(!1),w=S[0],q=S[1];return s.useEffect(function(){var e,n;(null!==(n=null===(e=g.assignees)||void 0===e?void 0:e.length)&&void 0!==n?n:0)>0&&F(!0)},[g.assignees]),n.jsxs("div",e.__assign({style:{width:"100%",border:"1.5px solid #E2E8F0",borderRadius:"5px"}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#F8FAFC",padding:"0px 10px",minHeight:"48px"}},{children:[n.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center",gap:10,paddingLeft:"20px"}},{children:[n.jsx("span",e.__assign({style:{backgroundColor:m.backgroundColor,borderRadius:"10px",padding:"3px 12px",color:m.color,fontSize:"13px",fontWeight:500}},{children:g.headerName})),w?n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("input",{type:"text",value:g.title||"",onChange:function(e){return null==v?void 0:v(e.target.value)},onBlur:function(){return q(!1)},onKeyDown:function(e){return"Enter"===e.key&&q(!1)},autoFocus:!0,style:{border:"none",borderBottom:"2px solid #3B82F6",outline:"none",fontSize:"13px",fontWeight:500,color:"#374151",background:"transparent",padding:"0 2px",width:"150px"}}),n.jsx("button",e.__assign({type:"button",onMouseDown:function(e){return e.preventDefault()},onClick:function(e){e.stopPropagation(),q(!1)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"}},{children:n.jsx(t.Check,{size:16,color:"#10B981"})}))]})):n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("span",e.__assign({style:{fontSize:"13px",fontWeight:500,color:"#374151"}},{children:g.title})),n.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),q(!0)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"},title:"Edit Title"},{children:n.jsx(t.Edit2,{size:14,color:"#6B7280"})}))]}))]})),n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:16,marginLeft:"auto"}},{children:[n.jsxs(n.Fragment,{children:[n.jsxs("span",e.__assign({style:{color:"#6B7280"}},{children:["Due Date: ",g.isMandatory&&n.jsx("sup",e.__assign({style:{color:"red"}},{children:"*"}))]})),n.jsx(r.default,{value:null!==(p=g.dueDate)&&void 0!==p?p:null,onSet:_,id:x,maxDate:null!=b?b:null}),n.jsx(o.default,{})]}),n.jsx("div",e.__assign({style:{display:"flex",alignItems:"center"}},{children:n.jsxs("button",e.__assign({type:"button",onClick:y,disabled:"0"===x,style:{position:"relative",width:"88px",height:"26px",border:"none",borderRadius:"999px",backgroundColor:g.isMandatory?"#5B4FE9":"#D1D5DB",cursor:"pointer",opacity:"0"===x?"50%":"100%",display:"flex",alignItems:"center",padding:"0 10px",transition:"all 0.2s ease",flexShrink:0}},{children:[n.jsx("span",{style:{position:"absolute",top:"3px",left:g.isMandatory?"65px":"3px",width:"20px",height:"20px",borderRadius:"50%",background:"#FFF",transition:"all 0.2s ease",boxShadow:"0 1px 3px rgba(0,0,0,0.15)"}}),n.jsx("span",e.__assign({style:{color:"#FFF",fontSize:"10px",fontWeight:500,userSelect:"none",paddingLeft:g.isMandatory?"0":"18px",paddingRight:g.isMandatory?"18px":"0"}},{children:"Required"}))]}))})),n.jsx(t.ChevronDown,{size:20,onClick:function(e){e.stopPropagation(),F(function(e){return!e})},style:{cursor:"pointer",flexShrink:0,transition:"transform 0.2s ease",transform:D?"rotate(180deg)":"rotate(0deg)"}})]}))]})),D&&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:j,accessLevelOptions:h,fetchUsers:f})}))]}))};
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,x=l.level,h=l.id,f=l.accessLevelOptions,y=l.fetchUsers,v=l.onToggleMandatory,_=l.onDueDateChange,j=l.onAssigneesChange,b=l.onTitleChange,m=l.finalApprovalDueDate,D=l.previousLevelDueDate,C=l.nextLevelDueDate,k=s.useMemo(function(){return i.getRandomColorPair()},[]),F="0"===h||(null!==(u=null===(d=x.assignees)||void 0===d?void 0:d.length)&&void 0!==u?u:0)>0,S=s.useState(F),w=S[0],L=S[1],q=s.useState(!1),M=q[0],B=q[1];s.useEffect(function(){var e,n;(null!==(n=null===(e=x.assignees)||void 0===e?void 0:e.length)&&void 0!==n?n:0)>0&&L(!0)},[x.assignees]);var R=null!=D?D:null,z=null!==(p=null!=C?C:m)&&void 0!==p?p:null;return 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:k.backgroundColor,borderRadius:"10px",padding:"3px 12px",color:k.color,fontSize:"13px",fontWeight:500}},{children:x.headerName})),M?n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("input",{type:"text",value:x.title||"",onChange:function(e){return null==b?void 0:b(e.target.value)},onBlur:function(){return B(!1)},onKeyDown:function(e){return"Enter"===e.key&&B(!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(),B(!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:x.title})),n.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),B(!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: ",x.isMandatory&&n.jsx("sup",e.__assign({style:{color:"red"}},{children:"*"}))]})),n.jsx(r.default,{value:null!==(c=x.dueDate)&&void 0!==c?c:null,onSet:_,id:h,minDate:R,maxDate:z}),n.jsx(o.default,{})]}),n.jsx("div",e.__assign({style:{display:"flex",alignItems:"center"}},{children:n.jsxs("button",e.__assign({type:"button",onClick:v,disabled:"0"===h,style:{position:"relative",width:"88px",height:"26px",border:"none",borderRadius:"999px",backgroundColor:x.isMandatory?"#5B4FE9":"#D1D5DB",cursor:"pointer",opacity:"0"===h?"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:x.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:x.isMandatory?"0":"18px",paddingRight:x.isMandatory?"18px":"0"}},{children:"Required"}))]}))})),n.jsx(t.ChevronDown,{size:20,onClick:function(e){e.stopPropagation(),L(function(e){return!e})},style:{cursor:"pointer",flexShrink:0,transition:"transform 0.2s ease",transform:w?"rotate(180deg)":"rotate(0deg)"}})]}))]})),w&&n.jsx("div",e.__assign({style:{width:"100%",height:"auto"}},{children:n.jsx(a.default,{assignees:null!==(g=x.assignees)&&void 0!==g?g:[],onAssigneeChange:j,accessLevelOptions:f,fetchUsers:y})}))]}))};
2
2
  //# sourceMappingURL=AssignLevelAccordions.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),i=require("lucide-react"),t=require("./AssignLevelAccordions.js"),r=require("./components/CustomCheckbox.js"),a=require("./assets/FileCheckCorner.js"),l=require("./styles/AssignReminderStyles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(s),d=[{label:"Edit",icon:n.jsx(i.PenLine,{size:14})},{label:"Approve",icon:n.jsx(i.UserRoundCheck,{size:14})},{label:"Edit & Approve",icon:n.jsx(a.default,{})},{label:"Notify",icon:n.jsx(i.Bell,{size:14})}];exports.AssignReminderLevels=function(s){var a,o=s.title,c=s.levels,_=void 0===c?[]:c,p=s.requireFinalApproval,f=void 0!==p&&p,g=s.additionalInfo,v=s.setLevels,x=s.setRequireFinalApproval,h=s.fetchUsers,j=s.accessLevelOptions,A=void 0===j?d:j,y=s.customInfoIcon,S=s.onValidationError,E=s.customStyles,m=void 0===E?{}:E,L=s.totalLevels,D=s.finalApprovalDueDate,I=u.default.useState(!1),b=I[0],F=I[1],R=u.default.useMemo(function(){return Array.from({length:null!=L?L:3},function(e,n){var s;return null!==(s=_[n])&&void 0!==s?s:{title:"Level ".concat(n+1),headerName:"L ".concat(n+1),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0}})},[_,L]),T=(_.length>0?_:R).filter(function(e){return!e.isHidden});return n.jsxs("div",e.__assign({style:e.__assign({padding:"8px",display:"flex",flexDirection:"column",gap:"18px"},m.container)},{children:[n.jsxs("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.header),m.levelsHeader)},{children:[n.jsx("span",{children:null!=o?o:"Assignee Levels"}),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.infoIconWrapper),m.infoIconWrapper),onMouseEnter:function(){return F(!0)},onMouseLeave:function(){return F(!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({},l.DEFAULT_ASSIGN_REMINDER_STYLES.tooltip),m.tooltip),b?e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.tooltipVisible),m.tooltipVisible):{})},{children:g||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"},m.accordionsContainer)},{children:T.map(function(s,i){return n.jsx(t.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 t=null===(i=_[n-1])||void 0===i?void 0:i.dueDate;if(t&&s<t)return void(null==S||S("Level ".concat(n+1," due date cannot be before Level ").concat(n," due date")))}null==v||v(function(i){return i.map(function(i,t){return t===n?e.__assign(e.__assign({},i),{dueDate:s}):i})})}(i,n)},onAssigneesChange:function(n){return s=i,t=n,void(null==v||v(function(n){return n.map(function(n,i){return i===s?e.__assign(e.__assign({},n),{assignees:t}):n})}));var s,t},onTitleChange:function(n){return function(n,s){null==v||v(function(i){return i.map(function(i,t){return t===n?e.__assign(e.__assign({},i),{title:s}):i})})}(i,n)},finalApprovalDueDate:D},i)})})),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.finalApprovalBox),m.finalApprovalBox)},{children:[n.jsx(r.default,{getter:f,setter:null!=x?x:function(){}}),n.jsxs("div",e.__assign({style:e.__assign({display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400},m.finalApprovalTextWrapper)},{children:[n.jsx("span",e.__assign({style:e.__assign({fontWeight:500},m.finalApprovalTitle)},{children:"Require Final Approval"})),n.jsx("span",e.__assign({style:m.finalApprovalDesc},{children:"After all assignees approve, you (the owner) will be notified to give final sign-off before the redline is settled."}))]}))]})),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.currentApprovalFlow),m.currentApprovalFlow)},{children:[n.jsx("span",e.__assign({style:e.__assign({fontSize:"14px",fontWeight:600},m.currentApprovalFlowTitle)},{children:"Current Approval Flow"})),n.jsx("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"},m.approvalFlowItemsWrapper)},{children:(a=_.map(function(e,n){return{level:e,idx:n}}).filter(function(e){var n,s;return(null!==(s=null===(n=e.level.assignees)||void 0===n?void 0:n.length)&&void 0!==s?s:0)>0}),0===a.length?n.jsx("span",e.__assign({style:{fontSize:"13px",color:"#94A3B8"}},{children:"No assignees added yet"})):a.map(function(s,t){var r=s.level,l=s.idx,o=r.isHidden,d=!r.isMandatory&&!o,c=r.assignees.map(function(e){return e.name}).join(" / "),_=r.title||"Level ".concat(l+1),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},m.approvalFlowItem),title:_},{children:[p,n.jsxs("span",{children:[c,d&&" (Optional)"]})]})),t<a.length-1&&n.jsx(i.ArrowRight,{size:16,color:"#9CA3AF"})]},l)}))}))]}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),i=require("lucide-react"),t=require("./AssignLevelAccordions.js"),l=require("./components/CustomCheckbox.js"),r=require("./assets/FileCheckCorner.js"),a=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(r.default,{})},{label:"Notify",icon:n.jsx(i.Bell,{size:14})}];exports.AssignReminderLevels=function(s){var r,o=s.title,c=s.levels,p=void 0===c?[]:c,_=s.requireFinalApproval,v=void 0!==_&&_,f=s.additionalInfo,g=s.setLevels,x=s.setRequireFinalApproval,h=s.fetchUsers,j=s.accessLevelOptions,A=void 0===j?d:j,y=s.customInfoIcon,D=s.onValidationError,S=s.customStyles,E=void 0===S?{}:S,L=s.totalLevels,m=s.finalApprovalDueDate,I=u.default.useState(!1),b=I[0],F=I[1],R=u.default.useMemo(function(){return Array.from({length:null!=L?L: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,L]),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"},E.container)},{children:[n.jsxs("span",e.__assign({style:e.__assign(e.__assign({},a.DEFAULT_ASSIGN_REMINDER_STYLES.header),E.levelsHeader)},{children:[n.jsx("span",{children:null!=o?o:"Assignee Levels"}),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},a.DEFAULT_ASSIGN_REMINDER_STYLES.infoIconWrapper),E.infoIconWrapper),onMouseEnter:function(){return F(!0)},onMouseLeave:function(){return F(!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({},a.DEFAULT_ASSIGN_REMINDER_STYLES.tooltip),E.tooltip),b?e.__assign(e.__assign({},a.DEFAULT_ASSIGN_REMINDER_STYLES.tooltipVisible),E.tooltipVisible):{})},{children:f||n.jsxs("span",{children:[n.jsx("b",{children:"How it works:"}),n.jsx("br",{}),"Level 1 is required by default, Enable Level 2 and Level 3 to add sequential approval steps for the review"]})}))]}))]})),n.jsx("div",e.__assign({style:e.__assign({display:"flex",flexDirection:"column",gap:"16px"},E.accordionsContainer)},{children:T.map(function(s,i){var l,r,a,o;return n.jsx(t.default,{level:s,id:String(i),accessLevelOptions:A,fetchUsers:h,onToggleMandatory:function(){return n=i,void(null==g||g(function(s){return s.map(function(s,i){return i===n?e.__assign(e.__assign({},s),{isMandatory:!s.isMandatory}):s})}));var n},onDueDateChange:function(n){return function(n,s){var i;if(n>0&&s){var t=null===(i=p[n-1])||void 0===i?void 0:i.dueDate;if(t&&s<t)return void(null==D||D("Level ".concat(n+1," due date cannot be before Level ").concat(n," due date")))}null==g||g(function(i){return i.map(function(i,t){return t===n?e.__assign(e.__assign({},i),{dueDate:s}):i})})}(i,n)},onAssigneesChange:function(n){return s=i,t=n,void(null==g||g(function(n){return n.map(function(n,i){return i===s?e.__assign(e.__assign({},n),{assignees:t}):n})}));var s,t},onTitleChange:function(n){return function(n,s){null==g||g(function(i){return i.map(function(i,t){return t===n?e.__assign(e.__assign({},i),{title:s}):i})})}(i,n)},finalApprovalDueDate:m,previousLevelDueDate:i>0&&null!==(r=null===(l=T[i-1])||void 0===l?void 0:l.dueDate)&&void 0!==r?r:null,nextLevelDueDate:i<T.length-1&&null!==(o=null===(a=T[i+1])||void 0===a?void 0:a.dueDate)&&void 0!==o?o:null},i)})})),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},a.DEFAULT_ASSIGN_REMINDER_STYLES.finalApprovalBox),E.finalApprovalBox)},{children:[n.jsx(l.default,{getter:v,setter:null!=x?x:function(){}}),n.jsxs("div",e.__assign({style:e.__assign({display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400},E.finalApprovalTextWrapper)},{children:[n.jsx("span",e.__assign({style:e.__assign({fontWeight:500},E.finalApprovalTitle)},{children:"Require Final Approval"})),n.jsx("span",e.__assign({style:E.finalApprovalDesc},{children:"After all assignees approve, you (the owner) will be notified to give final sign-off before the redline is settled."}))]}))]})),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},a.DEFAULT_ASSIGN_REMINDER_STYLES.currentApprovalFlow),E.currentApprovalFlow)},{children:[n.jsx("span",e.__assign({style:e.__assign({fontSize:"14px",fontWeight:600},E.currentApprovalFlowTitle)},{children:"Current Approval Flow"})),n.jsx("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"},E.approvalFlowItemsWrapper)},{children:(r=p.map(function(e,n){return{level:e,idx:n}}).filter(function(e){var n,s;return(null!==(s=null===(n=e.level.assignees)||void 0===n?void 0:n.length)&&void 0!==s?s:0)>0}),0===r.length?n.jsx("span",e.__assign({style:{fontSize:"13px",color:"#94A3B8"}},{children:"No assignees added yet"})):r.map(function(s,t){var l=s.level,a=s.idx,o=l.isHidden,d=!l.isMandatory&&!o,c=l.assignees.map(function(e){return e.name}).join(" / "),p=l.title||"Level ".concat(a+1),_=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})}}(a);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},E.approvalFlowItem),title:p},{children:[_,n.jsxs("span",{children:[c,d&&" (Optional)"]})]})),t<r.length-1&&n.jsx(i.ArrowRight,{size:16,color:"#9CA3AF"})]},a)}))}))]}))]}))};
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"),t=require("react/jsx-runtime"),r=require("react"),i=require("../styles/AssignLevelsDatePickerStyles.js");exports.default=function(n){var l=n.value,s=n.onSet,a=n.maxDate,u=r.useRef(null);return t.jsxs("div",e.__assign({style:i.DATE_PICKER_STYLES.wrapper,onClick:function(){var e,t;return null===(t=null===(e=u.current)||void 0===e?void 0:e.showPicker)||void 0===t?void 0:t.call(e)}},{children:[t.jsx("span",e.__assign({style:i.DATE_PICKER_STYLES.placeholder},{children:l?l.toLocaleDateString("en-GB"):"--/--/----"})),t.jsx("input",{ref:u,type:"date",min:(new Date).toISOString().split("T")[0],max:a?a.toISOString().split("T")[0]:void 0,style:i.DATE_PICKER_STYLES.input,value:l?l.toISOString().split("T")[0]:"",onChange:function(e){var t=e.target.value;s(t?new Date(t):null)}})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),i=require("../styles/AssignLevelsDatePickerStyles.js"),a=require("../../../_virtual/dayjs.min.js");exports.default=function(n){var l=n.value,s=n.onSet,u=n.minDate,o=n.maxDate,v=r.useRef(null),c=(new Date).toISOString().split("T")[0],d=u?a.default(u).format("YYYY-MM-DD"):c,_=d>c?d:c;return t.jsxs("div",e.__assign({style:i.DATE_PICKER_STYLES.wrapper,onClick:function(){var e,t;return null===(t=null===(e=v.current)||void 0===e?void 0:e.showPicker)||void 0===t?void 0:t.call(e)}},{children:[t.jsx("span",e.__assign({style:i.DATE_PICKER_STYLES.placeholder},{children:l?l.toLocaleDateString("en-GB"):"--/--/----"})),t.jsx("input",{ref:v,type:"date",min:_,max:o?a.default(o).format("YYYY-MM-DD"):void 0,style:i.DATE_PICKER_STYLES.input,value:l?l.toISOString().split("T")[0]:"",onChange:function(e){var t=e.target.value;s(t?new Date(t):null)}})]}))};
2
2
  //# sourceMappingURL=AssignLevelsDatePicker.js.map
@@ -1,2 +1,2 @@
1
- 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,k=f.accessLevelOptions,C=f.fetchUsers,D=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:D,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:k,fetchUsers:C})}))]}))}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 u from"./assets/VerticalLine.js";import c from"./components/AssignLevelsDatePicker.js";import g from"./components/LevelData.js";function f(f){var x,h,y,m,v,b=f.level,D=f.id,k=f.accessLevelOptions,C=f.fetchUsers,F=f.onToggleMandatory,L=f.onDueDateChange,w=f.onAssigneesChange,S=f.onTitleChange,B=f.finalApprovalDueDate,j=f.previousLevelDueDate,z=f.nextLevelDueDate,M=i(function(){return p()},[]),R="0"===D||(null!==(h=null===(x=b.assignees)||void 0===x?void 0:x.length)&&void 0!==h?h:0)>0,I=r(R),A=I[0],E=I[1],P=r(!1),W=P[0],T=P[1];l(function(){var e,n;(null!==(n=null===(e=b.assignees)||void 0===e?void 0:e.length)&&void 0!==n?n:0)>0&&E(!0)},[b.assignees]);var O=null!=j?j:null,U=null!==(y=null!=z?z:B)&&void 0!==y?y:null;return 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:M.backgroundColor,borderRadius:"10px",padding:"3px 12px",color:M.color,fontSize:"13px",fontWeight:500}},{children:b.headerName})),n("div",e({style:{display:"flex",alignItems:"center",gap:"6px"}},W?{children:[t("input",{type:"text",value:b.title||"",onChange:function(e){return null==S?void 0:S(e.target.value)},onBlur:function(){return T(!1)},onKeyDown:function(e){return"Enter"===e.key&&T(!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(),T(!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(),T(!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(c,{value:null!==(m=b.dueDate)&&void 0!==m?m:null,onSet:L,id:D,minDate:O,maxDate:U}),t(u,{})]}),t("div",e({style:{display:"flex",alignItems:"center"}},{children:n("button",e({type:"button",onClick:F,disabled:"0"===D,style:{position:"relative",width:"88px",height:"26px",border:"none",borderRadius:"999px",backgroundColor:b.isMandatory?"#5B4FE9":"#D1D5DB",cursor:"pointer",opacity:"0"===D?"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(),E(function(e){return!e})},style:{cursor:"pointer",flexShrink:0,transition:"transform 0.2s ease",transform:A?"rotate(180deg)":"rotate(0deg)"}})]}))]})),A&&t("div",e({style:{width:"100%",height:"auto"}},{children:t(g,{assignees:null!==(v=b.assignees)&&void 0!==v?v:[],onAssigneeChange:w,accessLevelOptions:k,fetchUsers:C})}))]}))}export{f as default};
2
2
  //# sourceMappingURL=AssignLevelAccordions.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../_virtual/_tslib.js";import{jsx as n,jsxs as i}from"react/jsx-runtime";import t from"react";import{PenLine as r,UserRoundCheck as l,Bell as o,InfoIcon as a,User as s,ArrowRight as p,CheckSquare as u,FileCheck as c,Edit2 as d}from"lucide-react";import f from"./AssignLevelAccordions.js";import v from"./components/CustomCheckbox.js";import h from"./assets/FileCheckCorner.js";import{DEFAULT_ASSIGN_REMINDER_STYLES as m}from"./styles/AssignReminderStyles.js";var g=[{label:"Edit",icon:n(r,{size:14})},{label:"Approve",icon:n(l,{size:14})},{label:"Edit & Approve",icon:n(h,{})},{label:"Notify",icon:n(o,{size:14})}];function y(r){var l,o=r.title,h=r.levels,y=void 0===h?[]:h,x=r.requireFinalApproval,A=void 0!==x&&x,b=r.additionalInfo,D=r.setLevels,L=r.setRequireFinalApproval,w=r.fetchUsers,z=r.accessLevelOptions,F=void 0===z?g:z,C=r.customInfoIcon,I=r.onValidationError,W=r.customStyles,M=void 0===W?{}:W,S=r.totalLevels,j=r.finalApprovalDueDate,E=t.useState(!1),T=E[0],q=E[1],B=t.useMemo(function(){return Array.from({length:null!=S?S:3},function(e,n){var i;return null!==(i=y[n])&&void 0!==i?i:{title:"Level ".concat(n+1),headerName:"L ".concat(n+1),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0}})},[y,S]),H=(y.length>0?y:B).filter(function(e){return!e.isHidden});return i("div",e({style:e({padding:"8px",display:"flex",flexDirection:"column",gap:"18px"},M.container)},{children:[i("span",e({style:e(e({},m.header),M.levelsHeader)},{children:[n("span",{children:null!=o?o:"Assignee Levels"}),i("div",e({style:e(e({},m.infoIconWrapper),M.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({},m.tooltip),M.tooltip),T?e(e({},m.tooltipVisible),M.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"},M.accordionsContainer)},{children:H.map(function(i,t){return n(f,{level:i,id:String(t),accessLevelOptions:F,fetchUsers:w,onToggleMandatory:function(){return n=t,void(null==D||D(function(i){return i.map(function(i,t){return t===n?e(e({},i),{isMandatory:!i.isMandatory}):i})}));var n},onDueDateChange:function(n){return function(n,i){var t;if(n>0&&i){var r=null===(t=y[n-1])||void 0===t?void 0:t.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==D||D(function(t){return t.map(function(t,r){return r===n?e(e({},t),{dueDate:i}):t})})}(t,n)},onAssigneesChange:function(n){return i=t,r=n,void(null==D||D(function(n){return n.map(function(n,t){return t===i?e(e({},n),{assignees:r}):n})}));var i,r},onTitleChange:function(n){return function(n,i){null==D||D(function(t){return t.map(function(t,r){return r===n?e(e({},t),{title:i}):t})})}(t,n)},finalApprovalDueDate:j},t)})})),i("div",e({style:e(e({},m.finalApprovalBox),M.finalApprovalBox)},{children:[n(v,{getter:A,setter:null!=L?L:function(){}}),i("div",e({style:e({display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400},M.finalApprovalTextWrapper)},{children:[n("span",e({style:e({fontWeight:500},M.finalApprovalTitle)},{children:"Require Final Approval"})),n("span",e({style:M.finalApprovalDesc},{children:"After all assignees approve, you (the owner) will be notified to give final sign-off before the redline is settled."}))]}))]})),i("div",e({style:e(e({},m.currentApprovalFlow),M.currentApprovalFlow)},{children:[n("span",e({style:e({fontSize:"14px",fontWeight:600},M.currentApprovalFlowTitle)},{children:"Current Approval Flow"})),n("div",e({style:e({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"},M.approvalFlowItemsWrapper)},{children:(l=y.map(function(e,n){return{level:e,idx:n}}).filter(function(e){var n,i;return(null!==(i=null===(n=e.level.assignees)||void 0===n?void 0:n.length)&&void 0!==i?i:0)>0}),0===l.length?n("span",e({style:{fontSize:"13px",color:"#94A3B8"}},{children:"No assignees added yet"})):l.map(function(r,o){var a=r.level,f=r.idx,v=a.isHidden,h=!a.isMandatory&&!v,m=a.assignees.map(function(e){return e.name}).join(" / "),g=a.title||"Level ".concat(f+1),y=v?n(s,{size:16}):function(e){switch(e){case 0:return n(d,{size:16});case 1:return n(c,{size:16});case 2:return n(s,{size:16});default:return n(u,{size:16})}}(f);return i(t.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},M.approvalFlowItem),title:g},{children:[y,i("span",{children:[m,h&&" (Optional)"]})]})),o<l.length-1&&n(p,{size:16,color:"#9CA3AF"})]},f)}))}))]}))]}))}export{y as AssignReminderLevels};
1
+ import{__assign as e}from"../../_virtual/_tslib.js";import{jsx as n,jsxs as i}from"react/jsx-runtime";import t from"react";import{PenLine as l,UserRoundCheck as r,Bell as o,InfoIcon as a,User as s,ArrowRight as u,CheckSquare as p,FileCheck as d,Edit2 as c}from"lucide-react";import v from"./AssignLevelAccordions.js";import f from"./components/CustomCheckbox.js";import h from"./assets/FileCheckCorner.js";import{DEFAULT_ASSIGN_REMINDER_STYLES as m}from"./styles/AssignReminderStyles.js";var g=[{label:"Edit",icon:n(l,{size:14})},{label:"Approve",icon:n(r,{size:14})},{label:"Edit & Approve",icon:n(h,{})},{label:"Notify",icon:n(o,{size:14})}];function x(l){var r,o=l.title,h=l.levels,x=void 0===h?[]:h,y=l.requireFinalApproval,A=void 0!==y&&y,D=l.additionalInfo,b=l.setLevels,L=l.setRequireFinalApproval,w=l.fetchUsers,z=l.accessLevelOptions,F=void 0===z?g:z,C=l.customInfoIcon,I=l.onValidationError,W=l.customStyles,M=void 0===W?{}:W,S=l.totalLevels,j=l.finalApprovalDueDate,E=t.useState(!1),T=E[0],q=E[1],B=t.useMemo(function(){return Array.from({length:null!=S?S: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,S]),H=(x.length>0?x:B).filter(function(e){return!e.isHidden});return i("div",e({style:e({padding:"8px",display:"flex",flexDirection:"column",gap:"18px"},M.container)},{children:[i("span",e({style:e(e({},m.header),M.levelsHeader)},{children:[n("span",{children:null!=o?o:"Assignee Levels"}),i("div",e({style:e(e({},m.infoIconWrapper),M.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({},m.tooltip),M.tooltip),T?e(e({},m.tooltipVisible),M.tooltipVisible):{})},{children:D||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"},M.accordionsContainer)},{children:H.map(function(i,t){var l,r,o,a;return n(v,{level:i,id:String(t),accessLevelOptions:F,fetchUsers:w,onToggleMandatory:function(){return n=t,void(null==b||b(function(i){return i.map(function(i,t){return t===n?e(e({},i),{isMandatory:!i.isMandatory}):i})}));var n},onDueDateChange:function(n){return function(n,i){var t;if(n>0&&i){var l=null===(t=x[n-1])||void 0===t?void 0:t.dueDate;if(l&&i<l)return void(null==I||I("Level ".concat(n+1," due date cannot be before Level ").concat(n," due date")))}null==b||b(function(t){return t.map(function(t,l){return l===n?e(e({},t),{dueDate:i}):t})})}(t,n)},onAssigneesChange:function(n){return i=t,l=n,void(null==b||b(function(n){return n.map(function(n,t){return t===i?e(e({},n),{assignees:l}):n})}));var i,l},onTitleChange:function(n){return function(n,i){null==b||b(function(t){return t.map(function(t,l){return l===n?e(e({},t),{title:i}):t})})}(t,n)},finalApprovalDueDate:j,previousLevelDueDate:t>0&&null!==(r=null===(l=H[t-1])||void 0===l?void 0:l.dueDate)&&void 0!==r?r:null,nextLevelDueDate:t<H.length-1&&null!==(a=null===(o=H[t+1])||void 0===o?void 0:o.dueDate)&&void 0!==a?a:null},t)})})),i("div",e({style:e(e({},m.finalApprovalBox),M.finalApprovalBox)},{children:[n(f,{getter:A,setter:null!=L?L:function(){}}),i("div",e({style:e({display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400},M.finalApprovalTextWrapper)},{children:[n("span",e({style:e({fontWeight:500},M.finalApprovalTitle)},{children:"Require Final Approval"})),n("span",e({style:M.finalApprovalDesc},{children:"After all assignees approve, you (the owner) will be notified to give final sign-off before the redline is settled."}))]}))]})),i("div",e({style:e(e({},m.currentApprovalFlow),M.currentApprovalFlow)},{children:[n("span",e({style:e({fontSize:"14px",fontWeight:600},M.currentApprovalFlowTitle)},{children:"Current Approval Flow"})),n("div",e({style:e({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"},M.approvalFlowItemsWrapper)},{children:(r=x.map(function(e,n){return{level:e,idx:n}}).filter(function(e){var n,i;return(null!==(i=null===(n=e.level.assignees)||void 0===n?void 0:n.length)&&void 0!==i?i:0)>0}),0===r.length?n("span",e({style:{fontSize:"13px",color:"#94A3B8"}},{children:"No assignees added yet"})):r.map(function(l,o){var a=l.level,v=l.idx,f=a.isHidden,h=!a.isMandatory&&!f,m=a.assignees.map(function(e){return e.name}).join(" / "),g=a.title||"Level ".concat(v+1),x=f?n(s,{size:16}):function(e){switch(e){case 0:return n(c,{size:16});case 1:return n(d,{size:16});case 2:return n(s,{size:16});default:return n(p,{size:16})}}(v);return i(t.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},M.approvalFlowItem),title:g},{children:[x,i("span",{children:[m,h&&" (Optional)"]})]})),o<r.length-1&&n(u,{size:16,color:"#9CA3AF"})]},v)}))}))]}))]}))}export{x as AssignReminderLevels};
2
2
  //# sourceMappingURL=AssignReminderLevels.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"../../../_virtual/_tslib.js";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useRef as i}from"react";import{DATE_PICKER_STYLES as n}from"../styles/AssignLevelsDatePickerStyles.js";function l(l){var o=l.value,a=l.onSet,s=l.maxDate,u=i(null);return e("div",t({style:n.wrapper,onClick:function(){var t,e;return null===(e=null===(t=u.current)||void 0===t?void 0:t.showPicker)||void 0===e?void 0:e.call(t)}},{children:[r("span",t({style:n.placeholder},{children:o?o.toLocaleDateString("en-GB"):"--/--/----"})),r("input",{ref:u,type:"date",min:(new Date).toISOString().split("T")[0],max:s?s.toISOString().split("T")[0]:void 0,style:n.input,value:o?o.toISOString().split("T")[0]:"",onChange:function(t){var e=t.target.value;a(e?new Date(e):null)}})]}))}export{l as default};
1
+ import{__assign as t}from"../../../_virtual/_tslib.js";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useRef as i}from"react";import{DATE_PICKER_STYLES as n}from"../styles/AssignLevelsDatePickerStyles.js";import a from"../../../_virtual/dayjs.min.js";function l(l){var o=l.value,s=l.onSet,u=l.minDate,m=l.maxDate,p=i(null),v=(new Date).toISOString().split("T")[0],c=u?a(u).format("YYYY-MM-DD"):v,d=c>v?c:v;return e("div",t({style:n.wrapper,onClick:function(){var t,e;return null===(e=null===(t=p.current)||void 0===t?void 0:t.showPicker)||void 0===e?void 0:e.call(t)}},{children:[r("span",t({style:n.placeholder},{children:o?o.toLocaleDateString("en-GB"):"--/--/----"})),r("input",{ref:p,type:"date",min:d,max:m?a(m).format("YYYY-MM-DD"):void 0,style:n.input,value:o?o.toISOString().split("T")[0]:"",onChange:function(t){var e=t.target.value;s(e?new Date(e):null)}})]}))}export{l as default};
2
2
  //# sourceMappingURL=AssignLevelsDatePicker.js.map
@@ -4,7 +4,9 @@ interface ExtendedLevelAccordionProps extends LevelAccordionProps {
4
4
  onTitleChange?: (title: string) => void;
5
5
  onDeleteLevel?: () => void;
6
6
  finalApprovalDueDate?: Date | null;
7
+ previousLevelDueDate?: Date | null;
8
+ nextLevelDueDate?: Date | null;
7
9
  }
8
- export default function LevelAccordion({ level, id, accessLevelOptions, fetchUsers, onToggleMandatory, onDueDateChange, onAssigneesChange, onTitleChange, finalApprovalDueDate }: ExtendedLevelAccordionProps): React.JSX.Element;
10
+ export default function LevelAccordion({ level, id, accessLevelOptions, fetchUsers, onToggleMandatory, onDueDateChange, onAssigneesChange, onTitleChange, finalApprovalDueDate, previousLevelDueDate, nextLevelDueDate }: ExtendedLevelAccordionProps): React.JSX.Element;
9
11
  export {};
10
12
  //# sourceMappingURL=AssignLevelAccordions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssignLevelAccordions.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignLevelAccordions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAKpD,UAAU,2BAA4B,SAAQ,mBAAmB;IAC7D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,oBAAoB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACnC,KAAK,EACL,EAAE,EACF,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACvB,EAAE,2BAA2B,qBAgK7B"}
1
+ {"version":3,"file":"AssignLevelAccordions.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignLevelAccordions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAKpD,UAAU,2BAA4B,SAAQ,mBAAmB;IAC7D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,oBAAoB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnC,oBAAoB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnC,gBAAgB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CAClC;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,EACpB,oBAAoB,EACpB,gBAAgB,EACnB,EAAE,2BAA2B,qBAsK7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"AssignReminderLevels.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderLevels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAS,MAAM,eAAe,CAAC;AAsBjE,iBAAS,oBAAoB,CAAC,EAC1B,KAAK,EACL,MAAW,EACX,oBAA4B,EAC5B,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,UAAU,EACV,kBAAiD,EACjD,cAAc,EACd,iBAAiB,EACjB,YAAiB,EACjB,WAAW,EACX,oBAAoB,EACvB,EAAE,yBAAyB,qBAwO3B;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"AssignReminderLevels.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderLevels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAS,MAAM,eAAe,CAAC;AAsBjE,iBAAS,oBAAoB,CAAC,EAC1B,KAAK,EACL,MAAW,EACX,oBAA4B,EAC5B,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,UAAU,EACV,kBAAiD,EACjD,cAAc,EACd,iBAAiB,EACjB,YAAiB,EACjB,WAAW,EACX,oBAAoB,EACvB,EAAE,yBAAyB,qBA8O3B;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,8 +1,9 @@
1
1
  /// <reference types="react" />
2
- declare function AssignLevelDatePicker({ value, onSet, maxDate }: {
2
+ declare function AssignLevelDatePicker({ value, onSet, minDate, maxDate }: {
3
3
  value: Date | null;
4
4
  onSet: (val: Date | null) => void;
5
5
  id: string;
6
+ minDate: Date | null;
6
7
  maxDate: Date | null;
7
8
  }): import("react").JSX.Element;
8
9
  export default AssignLevelDatePicker;
@@ -1 +1 @@
1
- {"version":3,"file":"AssignLevelsDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/AssignLevelsDatePicker.tsx"],"names":[],"mappings":";AAIA,iBAAS,qBAAqB,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,OAAO,EACR,EAAE;IACD,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;CACtB,+BA4BA;AAED,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"AssignLevelsDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/AssignLevelsDatePicker.tsx"],"names":[],"mappings":";AAIA,iBAAS,qBAAqB,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACR,EAAE;IACD,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;CACtB,+BAmCA;AAED,eAAe,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viswa-test/creative-workspace-ui-component",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "author": "Viswa Koduru",
5
5
  "description": "",
6
6
  "license": "MIT",