@viswa-test/creative-workspace-ui-component 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),i=require("lucide-react"),a=require("react"),n=require("./AssignReminderLevels.js"),_=require("./AssignReminderTest.js"),r=require("./components/ReviewStatus.js"),t=require("./components/CustomDatePicker.js"),l=require("./styles/AssignReminderWrapperStyles.js"),o=[{tabName:"Assignees & Approvers",tabIcon:s.jsxs("svg",e.__assign({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},{children:[s.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),s.jsx("circle",{cx:"9",cy:"7",r:"4"}),s.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),s.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}))},{tabName:"Manage Reminders",tabIcon:s.jsx(i.Bell,{size:15})},{tabName:"Review Status",tabIcon:s.jsx(i.ClipboardList,{size:15})}];exports.AssignReminderWrapper=function(d){var E,u,S=d.metadata,c=void 0===S?{}:S,g=d.reviewData,R=void 0===g?{}:g,A=d.levels,v=d.setLevels,D=d.requireFinalApproval,p=d.setRequireFinalApproval,L=d.approvalDueDate,I=d.setApprovalDueDate,N=d.onClose,T=d.fetchUsers,P=d.onSave,h=d.onValidationError,m=d.totalLevels,j=d.customStyles,x=void 0===j?{}:j,f=d.isSaving,b=void 0!==f&&f,y=d.onRequireFinalApproval,F=(null===(E=c.tabData)||void 0===E?void 0:E.length)?c.tabData:o,M=a.useState(F[0].tabName),W=M[0],U=M[1],Y=(u=W.toLowerCase()).includes("reminder")?"reminders":u.includes("review")?"review":"assignees",G=a.useState(A||_.INITIAL_LEVELS),B=G[0],C=G[1],q=a.useState(D||!1),w=q[0],k=q[1],z=a.useState(L||null),H=z[0],V=z[1],O=a.useState(null),X=O[0],J=O[1];a.useEffect(function(){null==y||y().then(function(e){e&&e.length>0&&J(e[0])})},[]),a.useEffect(function(){A&&C(A)},[A]),a.useEffect(function(){void 0!==D&&k(D)},[D]),a.useEffect(function(){void 0!==L&&V(L)},[L]),a.useEffect(function(){C(function(s){var i=s.filter(function(e){return!e.isHidden});if(w){var a={headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==X?void 0:X.id)||"me",email:(null==X?void 0:X.email)||"",name:(null==X?void 0:X.name)?"".concat(X.name," (You)"):"Username (You)",accessLevel:"Approve"}]};return e.__spreadArray(e.__spreadArray([],i,!0),[a],!1)}return i})},[w,X]);var K=c.wrapperTitle||"Assign Redline and Manage Reminders",Q=c.wrapperSubTitle||"Sec 4.1 - Technical Security Information",Z=c.wrapperPriority||"High",$=c.wrapperPriorityStyles||{backgroundColor:"#DC262618",color:"#DC2626",border:"1px solid #DC262640"};return s.jsx("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.overlay),x.overlay)},{children:s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.modal),x.modal)},{children:[s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.header),x.header)},{children:[s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.headerLeft),x.headerLeft)},{children:[s.jsx("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.modalTitle),x.modalTitle)},{children:K})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineRow),x.redlineRow)},{children:[s.jsx("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineName),x.redlineName)},{children:Q})),s.jsx("span",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineBadge),$),x.redlineBadge)},{children:Z}))]}))]})),s.jsx("button",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.closeBtn),x.closeBtn),onClick:N},{children:s.jsx(i.X,{size:20,color:"#6B7280"})}))]})),s.jsx("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tabBar),x.tabBar)},{children:F.map(function(i){var a=W===i.tabName;return s.jsxs("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tab),x.tab),a?e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tabActive),x.tabActive):{}),onClick:function(){return U(i.tabName)}},{children:[i.tabIcon," ",i.tabName]}),i.tabName)})})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.body),x.body)},{children:["assignees"===Y&&s.jsxs(s.Fragment,{children:[!1!==c.showFinalApprovalDueDate&&s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateBar),x.dueDateBar)},{children:[s.jsxs("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateLabel),x.dueDateLabel)},{children:["Final Approval due date ",s.jsx("sup",e.__assign({style:{color:"#DC2626",marginLeft:2}},{children:"*"}))]})),s.jsx("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateInputWrap),x.dueDateInputWrap)},{children:s.jsx(t.default,{value:H?H.toISOString().slice(0,10):"",onChange:V})})),s.jsxs("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.requiredToProceeed),x.requiredToProceeed)},{children:[s.jsx(i.CircleAlert,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),s.jsx(n.AssignReminderLevels,{levels:B,totalLevels:m,requireFinalApproval:w,setLevels:C,setRequireFinalApproval:function(e){k(e)},fetchUsers:T,onValidationError:h,customStyles:x})]}),"reminders"===Y&&s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.reminderPlaceholder),x.reminderPlaceholder)},{children:[s.jsx(i.Bell,{size:32,color:"#D1D5DB"}),s.jsx("p",e.__assign({style:{color:"#9CA3AF",marginTop:12,fontSize:14}},{children:"Reminder settings coming soon…"}))]})),"review"===Y&&s.jsx(r.default,{levels:B,reviewData:R})]})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.footer),x.footer)},{children:[s.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.clearBtn),x.clearBtn),b?x.actionBtnDisabled:{}),onClick:function(){C(_.INITIAL_LEVELS.map(function(s){return e.__assign(e.__assign({},s),{assignees:[],dueDate:null})})),k(!1),V(null)},disabled:b},{children:"Clear"})),s.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.saveBtn),x.saveBtn),b?x.actionBtnDisabled:{}),onClick:function(){null==v||v(B),null==p||p(w),null==I||I(H),null==P||P({levels:B,requireFinalApproval:w,finalApprovalDueDate:H,activeTab:Y})},disabled:b},{children:"Save Changes"}))]}))]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),i=require("lucide-react"),a=require("react"),n=require("./AssignReminderLevels.js"),r=require("./AssignReminderTest.js"),_=require("./components/ReviewStatus.js"),t=require("./components/CustomDatePicker.js"),l=require("./styles/AssignReminderWrapperStyles.js"),o=[{tabName:"Assignees & Approvers",tabIcon:s.jsxs("svg",e.__assign({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},{children:[s.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),s.jsx("circle",{cx:"9",cy:"7",r:"4"}),s.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),s.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}))},{tabName:"Manage Reminders",tabIcon:s.jsx(i.Bell,{size:15})},{tabName:"Review Status",tabIcon:s.jsx(i.ClipboardList,{size:15})}];exports.AssignReminderWrapper=function(d){var E,u,c=d.metadata,S=void 0===c?{}:c,g=d.reviewData,R=void 0===g?{}:g,A=d.levels,v=d.setLevels,D=d.requireFinalApproval,p=d.setRequireFinalApproval,L=d.approvalDueDate,I=d.setApprovalDueDate,N=d.onClose,T=d.fetchUsers,h=d.onSave,P=d.onValidationError,m=d.totalLevels,f=d.customStyles,y=void 0===f?{}:f,j=d.isSaving,x=void 0!==j&&j,b=d.onRequireFinalApproval,F=(null===(E=S.tabData)||void 0===E?void 0:E.length)?S.tabData:o,M=a.useState(F[0].tabName),W=M[0],U=M[1],Y=(u=W.toLowerCase()).includes("reminder")?"reminders":u.includes("review")?"review":"assignees",G=a.useState(A||r.INITIAL_LEVELS),B=G[0],C=G[1],q=a.useState(D||!1),w=q[0],k=q[1],z=a.useState(L||null),H=z[0],V=z[1],O=a.useState(null),X=O[0],J=O[1];a.useEffect(function(){b&&b().then(function(e){Array.isArray(e)&&e.length>0?J(e[0]):e&&!Array.isArray(e)&&J(e)}).catch(function(e){return console.error("Failed to fetch user:",e)})},[]),a.useEffect(function(){A&&C(function(s){var i=s.find(function(e){return e.isHidden});return i?e.__spreadArray(e.__spreadArray([],A,!0),[i],!1):A})},[A]),a.useEffect(function(){void 0!==D&&k(D)},[D]),a.useEffect(function(){void 0!==L&&V(L)},[L]),a.useEffect(function(){C(function(s){var i=s.filter(function(e){return!e.isHidden});if(w){var a={headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==X?void 0:X.id)||"me",email:(null==X?void 0:X.email)||"",name:(null==X?void 0:X.name)?"".concat(X.name," (You)"):"Username (You)",accessLevel:"Approve"}]};return e.__spreadArray(e.__spreadArray([],i,!0),[a],!1)}return i})},[w,X]);var K=S.wrapperTitle||"Assign Redline and Manage Reminders",Q=S.wrapperSubTitle||"Sec 4.1 - Technical Security Information",Z=S.wrapperPriority||"High",$=S.wrapperPriorityStyles||{backgroundColor:"#DC262618",color:"#DC2626",border:"1px solid #DC262640"};return s.jsx("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.overlay),y.overlay)},{children:s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.modal),y.modal)},{children:[s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.header),y.header)},{children:[s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.headerLeft),y.headerLeft)},{children:[s.jsx("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.modalTitle),y.modalTitle)},{children:K})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineRow),y.redlineRow)},{children:[s.jsx("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineName),y.redlineName)},{children:Q})),s.jsx("span",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineBadge),$),y.redlineBadge)},{children:Z}))]}))]})),s.jsx("button",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.closeBtn),y.closeBtn),onClick:N},{children:s.jsx(i.X,{size:20,color:"#6B7280"})}))]})),s.jsx("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tabBar),y.tabBar)},{children:F.map(function(i){var a=W===i.tabName;return s.jsxs("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tab),y.tab),a?e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tabActive),y.tabActive):{}),onClick:function(){return U(i.tabName)}},{children:[i.tabIcon," ",i.tabName]}),i.tabName)})})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.body),y.body)},{children:["assignees"===Y&&s.jsxs(s.Fragment,{children:[!1!==S.showFinalApprovalDueDate&&s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateBar),y.dueDateBar)},{children:[s.jsxs("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateLabel),y.dueDateLabel)},{children:["Final Approval due date ",s.jsx("sup",e.__assign({style:{color:"#DC2626",marginLeft:2}},{children:"*"}))]})),s.jsx("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateInputWrap),y.dueDateInputWrap)},{children:s.jsx(t.default,{value:H?H.toISOString().slice(0,10):"",onChange:V})})),s.jsxs("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.requiredToProceeed),y.requiredToProceeed)},{children:[s.jsx(i.CircleAlert,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),s.jsx(n.AssignReminderLevels,{levels:B,totalLevels:m,requireFinalApproval:w,setLevels:C,setRequireFinalApproval:function(e){k(e)},fetchUsers:T,onValidationError:P,customStyles:y})]}),"reminders"===Y&&s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.reminderPlaceholder),y.reminderPlaceholder)},{children:[s.jsx(i.Bell,{size:32,color:"#D1D5DB"}),s.jsx("p",e.__assign({style:{color:"#9CA3AF",marginTop:12,fontSize:14}},{children:"Reminder settings coming soon…"}))]})),"review"===Y&&s.jsx(_.default,{levels:B,reviewData:R})]})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.footer),y.footer)},{children:[s.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.clearBtn),y.clearBtn),x?y.actionBtnDisabled:{}),onClick:function(){C(r.INITIAL_LEVELS.map(function(s){return e.__assign(e.__assign({},s),{assignees:[],dueDate:null})})),k(!1),V(null)},disabled:x},{children:"Clear"})),s.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.saveBtn),y.saveBtn),x?y.actionBtnDisabled:{}),onClick:function(){var e=B.filter(function(e){return!e.isHidden});null==v||v(e),null==p||p(w),null==I||I(H),null==h||h({levels:e,requireFinalApproval:w,finalApprovalDueDate:H,activeTab:Y})},disabled:x},{children:"Save Changes"}))]}))]}))}))};
2
2
  //# sourceMappingURL=AssignReminderWrapper.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__spreadArray as r}from"../../_virtual/_tslib.js";import{jsxs as i,jsx as t,Fragment as n}from"react/jsx-runtime";import{Bell as a,ClipboardList as l,X as o,CircleAlert as s}from"lucide-react";import{useState as d,useEffect as c}from"react";import{AssignReminderLevels as u}from"./AssignReminderLevels.js";import{INITIAL_LEVELS as v}from"./AssignReminderTest.js";import p from"./components/ReviewStatus.js";import m from"./components/CustomDatePicker.js";import{DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES as h}from"./styles/AssignReminderWrapperStyles.js";var b=[{tabName:"Assignees & Approvers",tabIcon:i("svg",e({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},{children:[t("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),t("circle",{cx:"9",cy:"7",r:"4"}),t("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),t("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}))},{tabName:"Manage Reminders",tabIcon:t(a,{size:15})},{tabName:"Review Status",tabIcon:t(l,{size:15})}];function f(l){var f,y,D=l.metadata,g=void 0===D?{}:D,A=l.reviewData,B=void 0===A?{}:A,w=l.levels,C=l.setLevels,R=l.requireFinalApproval,S=l.setRequireFinalApproval,L=l.approvalDueDate,F=l.setApprovalDueDate,N=l.onClose,T=l.fetchUsers,q=l.onSave,k=l.onValidationError,I=l.totalLevels,j=l.customStyles,P=void 0===j?{}:j,z=l.isSaving,M=void 0!==z&&z,x=l.onRequireFinalApproval,H=(null===(f=g.tabData)||void 0===f?void 0:f.length)?g.tabData:b,W=d(H[0].tabName),U=W[0],E=W[1],V=(y=U.toLowerCase()).includes("reminder")?"reminders":y.includes("review")?"review":"assignees",Y=d(w||v),_=Y[0],O=Y[1],G=d(R||!1),J=G[0],K=G[1],Q=d(L||null),X=Q[0],Z=Q[1],$=d(null),ee=$[0],re=$[1];c(function(){null==x||x().then(function(e){e&&e.length>0&&re(e[0])})},[]),c(function(){w&&O(w)},[w]),c(function(){void 0!==R&&K(R)},[R]),c(function(){void 0!==L&&Z(L)},[L]),c(function(){O(function(e){var i=e.filter(function(e){return!e.isHidden});if(J){var t={headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==ee?void 0:ee.id)||"me",email:(null==ee?void 0:ee.email)||"",name:(null==ee?void 0:ee.name)?"".concat(ee.name," (You)"):"Username (You)",accessLevel:"Approve"}]};return r(r([],i,!0),[t],!1)}return i})},[J,ee]);var ie=g.wrapperTitle||"Assign Redline and Manage Reminders",te=g.wrapperSubTitle||"Sec 4.1 - Technical Security Information",ne=g.wrapperPriority||"High",ae=g.wrapperPriorityStyles||{backgroundColor:"#DC262618",color:"#DC2626",border:"1px solid #DC262640"};return t("div",e({style:e(e({},h.overlay),P.overlay)},{children:i("div",e({style:e(e({},h.modal),P.modal)},{children:[i("div",e({style:e(e({},h.header),P.header)},{children:[i("div",e({style:e(e({},h.headerLeft),P.headerLeft)},{children:[t("span",e({style:e(e({},h.modalTitle),P.modalTitle)},{children:ie})),i("div",e({style:e(e({},h.redlineRow),P.redlineRow)},{children:[t("span",e({style:e(e({},h.redlineName),P.redlineName)},{children:te})),t("span",e({style:e(e(e({},h.redlineBadge),ae),P.redlineBadge)},{children:ne}))]}))]})),t("button",e({style:e(e({},h.closeBtn),P.closeBtn),onClick:N},{children:t(o,{size:20,color:"#6B7280"})}))]})),t("div",e({style:e(e({},h.tabBar),P.tabBar)},{children:H.map(function(r){var t=U===r.tabName;return i("button",e({style:e(e(e({},h.tab),P.tab),t?e(e({},h.tabActive),P.tabActive):{}),onClick:function(){return E(r.tabName)}},{children:[r.tabIcon," ",r.tabName]}),r.tabName)})})),i("div",e({style:e(e({},h.body),P.body)},{children:["assignees"===V&&i(n,{children:[!1!==g.showFinalApprovalDueDate&&i("div",e({style:e(e({},h.dueDateBar),P.dueDateBar)},{children:[i("span",e({style:e(e({},h.dueDateLabel),P.dueDateLabel)},{children:["Final Approval due date ",t("sup",e({style:{color:"#DC2626",marginLeft:2}},{children:"*"}))]})),t("div",e({style:e(e({},h.dueDateInputWrap),P.dueDateInputWrap)},{children:t(m,{value:X?X.toISOString().slice(0,10):"",onChange:Z})})),i("span",e({style:e(e({},h.requiredToProceeed),P.requiredToProceeed)},{children:[t(s,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),t(u,{levels:_,totalLevels:I,requireFinalApproval:J,setLevels:O,setRequireFinalApproval:function(e){K(e)},fetchUsers:T,onValidationError:k,customStyles:P})]}),"reminders"===V&&i("div",e({style:e(e({},h.reminderPlaceholder),P.reminderPlaceholder)},{children:[t(a,{size:32,color:"#D1D5DB"}),t("p",e({style:{color:"#9CA3AF",marginTop:12,fontSize:14}},{children:"Reminder settings coming soon…"}))]})),"review"===V&&t(p,{levels:_,reviewData:B})]})),i("div",e({style:e(e({},h.footer),P.footer)},{children:[t("button",e({style:e(e(e({},h.clearBtn),P.clearBtn),M?P.actionBtnDisabled:{}),onClick:function(){O(v.map(function(r){return e(e({},r),{assignees:[],dueDate:null})})),K(!1),Z(null)},disabled:M},{children:"Clear"})),t("button",e({style:e(e(e({},h.saveBtn),P.saveBtn),M?P.actionBtnDisabled:{}),onClick:function(){null==C||C(_),null==S||S(J),null==F||F(X),null==q||q({levels:_,requireFinalApproval:J,finalApprovalDueDate:X,activeTab:V})},disabled:M},{children:"Save Changes"}))]}))]}))}))}export{f as AssignReminderWrapper};
1
+ import{__assign as e,__spreadArray as r}from"../../_virtual/_tslib.js";import{jsxs as i,jsx as n,Fragment as t}from"react/jsx-runtime";import{Bell as a,ClipboardList as l,X as o,CircleAlert as s}from"lucide-react";import{useState as d,useEffect as c}from"react";import{AssignReminderLevels as u}from"./AssignReminderLevels.js";import{INITIAL_LEVELS as v}from"./AssignReminderTest.js";import p from"./components/ReviewStatus.js";import m from"./components/CustomDatePicker.js";import{DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES as h}from"./styles/AssignReminderWrapperStyles.js";var f=[{tabName:"Assignees & Approvers",tabIcon:i("svg",e({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},{children:[n("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),n("circle",{cx:"9",cy:"7",r:"4"}),n("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),n("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}))},{tabName:"Manage Reminders",tabIcon:n(a,{size:15})},{tabName:"Review Status",tabIcon:n(l,{size:15})}];function y(l){var y,b,D=l.metadata,g=void 0===D?{}:D,A=l.reviewData,B=void 0===A?{}:A,w=l.levels,C=l.setLevels,R=l.requireFinalApproval,S=l.setRequireFinalApproval,F=l.approvalDueDate,L=l.setApprovalDueDate,N=l.onClose,T=l.fetchUsers,q=l.onSave,k=l.onValidationError,I=l.totalLevels,j=l.customStyles,P=void 0===j?{}:j,z=l.isSaving,H=void 0!==z&&z,M=l.onRequireFinalApproval,x=(null===(y=g.tabData)||void 0===y?void 0:y.length)?g.tabData:f,W=d(x[0].tabName),U=W[0],E=W[1],V=(b=U.toLowerCase()).includes("reminder")?"reminders":b.includes("review")?"review":"assignees",Y=d(w||v),_=Y[0],O=Y[1],G=d(R||!1),J=G[0],K=G[1],Q=d(F||null),X=Q[0],Z=Q[1],$=d(null),ee=$[0],re=$[1];c(function(){M&&M().then(function(e){Array.isArray(e)&&e.length>0?re(e[0]):e&&!Array.isArray(e)&&re(e)}).catch(function(e){return console.error("Failed to fetch user:",e)})},[]),c(function(){w&&O(function(e){var i=e.find(function(e){return e.isHidden});return i?r(r([],w,!0),[i],!1):w})},[w]),c(function(){void 0!==R&&K(R)},[R]),c(function(){void 0!==F&&Z(F)},[F]),c(function(){O(function(e){var i=e.filter(function(e){return!e.isHidden});if(J){var n={headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==ee?void 0:ee.id)||"me",email:(null==ee?void 0:ee.email)||"",name:(null==ee?void 0:ee.name)?"".concat(ee.name," (You)"):"Username (You)",accessLevel:"Approve"}]};return r(r([],i,!0),[n],!1)}return i})},[J,ee]);var ie=g.wrapperTitle||"Assign Redline and Manage Reminders",ne=g.wrapperSubTitle||"Sec 4.1 - Technical Security Information",te=g.wrapperPriority||"High",ae=g.wrapperPriorityStyles||{backgroundColor:"#DC262618",color:"#DC2626",border:"1px solid #DC262640"};return n("div",e({style:e(e({},h.overlay),P.overlay)},{children:i("div",e({style:e(e({},h.modal),P.modal)},{children:[i("div",e({style:e(e({},h.header),P.header)},{children:[i("div",e({style:e(e({},h.headerLeft),P.headerLeft)},{children:[n("span",e({style:e(e({},h.modalTitle),P.modalTitle)},{children:ie})),i("div",e({style:e(e({},h.redlineRow),P.redlineRow)},{children:[n("span",e({style:e(e({},h.redlineName),P.redlineName)},{children:ne})),n("span",e({style:e(e(e({},h.redlineBadge),ae),P.redlineBadge)},{children:te}))]}))]})),n("button",e({style:e(e({},h.closeBtn),P.closeBtn),onClick:N},{children:n(o,{size:20,color:"#6B7280"})}))]})),n("div",e({style:e(e({},h.tabBar),P.tabBar)},{children:x.map(function(r){var n=U===r.tabName;return i("button",e({style:e(e(e({},h.tab),P.tab),n?e(e({},h.tabActive),P.tabActive):{}),onClick:function(){return E(r.tabName)}},{children:[r.tabIcon," ",r.tabName]}),r.tabName)})})),i("div",e({style:e(e({},h.body),P.body)},{children:["assignees"===V&&i(t,{children:[!1!==g.showFinalApprovalDueDate&&i("div",e({style:e(e({},h.dueDateBar),P.dueDateBar)},{children:[i("span",e({style:e(e({},h.dueDateLabel),P.dueDateLabel)},{children:["Final Approval due date ",n("sup",e({style:{color:"#DC2626",marginLeft:2}},{children:"*"}))]})),n("div",e({style:e(e({},h.dueDateInputWrap),P.dueDateInputWrap)},{children:n(m,{value:X?X.toISOString().slice(0,10):"",onChange:Z})})),i("span",e({style:e(e({},h.requiredToProceeed),P.requiredToProceeed)},{children:[n(s,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),n(u,{levels:_,totalLevels:I,requireFinalApproval:J,setLevels:O,setRequireFinalApproval:function(e){K(e)},fetchUsers:T,onValidationError:k,customStyles:P})]}),"reminders"===V&&i("div",e({style:e(e({},h.reminderPlaceholder),P.reminderPlaceholder)},{children:[n(a,{size:32,color:"#D1D5DB"}),n("p",e({style:{color:"#9CA3AF",marginTop:12,fontSize:14}},{children:"Reminder settings coming soon…"}))]})),"review"===V&&n(p,{levels:_,reviewData:B})]})),i("div",e({style:e(e({},h.footer),P.footer)},{children:[n("button",e({style:e(e(e({},h.clearBtn),P.clearBtn),H?P.actionBtnDisabled:{}),onClick:function(){O(v.map(function(r){return e(e({},r),{assignees:[],dueDate:null})})),K(!1),Z(null)},disabled:H},{children:"Clear"})),n("button",e({style:e(e(e({},h.saveBtn),P.saveBtn),H?P.actionBtnDisabled:{}),onClick:function(){var e=_.filter(function(e){return!e.isHidden});null==C||C(e),null==S||S(J),null==L||L(X),null==q||q({levels:e,requireFinalApproval:J,finalApprovalDueDate:X,activeTab:V})},disabled:H},{children:"Save Changes"}))]}))]}))}))}export{y as AssignReminderWrapper};
2
2
  //# sourceMappingURL=AssignReminderWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssignReminderWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAKnE,OAAO,EAAE,0BAA0B,EAAyB,MAAM,eAAe,CAAC;AAoBlF,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,GACzB,EAAE,0BAA0B,qBA+N5B;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"AssignReminderWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAKnE,OAAO,EAAE,0BAA0B,EAAyB,MAAM,eAAe,CAAC;AAoBlF,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,GACzB,EAAE,0BAA0B,qBA2O5B;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viswa-test/creative-workspace-ui-component",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "author": "Viswa Koduru",
5
5
  "description": "",
6
6
  "license": "MIT",