@viswa-test/creative-workspace-ui-component 0.0.9 → 0.0.11

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.
Files changed (18) hide show
  1. package/dist/cjs/components/AssignReminders/AssignReminderLevels.js +1 -1
  2. package/dist/cjs/components/AssignReminders/components/AssignLevelsDatePicker.js +1 -1
  3. package/dist/cjs/components/AssignReminders/styles/AssignLevelsDatePickerStyles.js +2 -0
  4. package/dist/cjs/components/AssignReminders/styles/AssignLevelsDatePickerStyles.js.map +1 -0
  5. package/dist/cjs/components/AssignReminders/styles/AssignReminderStyles.js +1 -1
  6. package/dist/components/AssignReminders/AssignReminderLevels.js +1 -1
  7. package/dist/components/AssignReminders/components/AssignLevelsDatePicker.js +1 -1
  8. package/dist/components/AssignReminders/styles/AssignLevelsDatePickerStyles.js +2 -0
  9. package/dist/components/AssignReminders/styles/AssignLevelsDatePickerStyles.js.map +1 -0
  10. package/dist/components/AssignReminders/styles/AssignReminderStyles.js +1 -1
  11. package/dist/types/components/AssignReminders/AssignReminderLevels.d.ts +0 -1
  12. package/dist/types/components/AssignReminders/AssignReminderLevels.d.ts.map +1 -1
  13. package/dist/types/components/AssignReminders/components/AssignLevelsDatePicker.d.ts +1 -1
  14. package/dist/types/components/AssignReminders/components/AssignLevelsDatePicker.d.ts.map +1 -1
  15. package/dist/types/components/AssignReminders/styles/AssignLevelsDatePickerStyles.d.ts +2 -0
  16. package/dist/types/components/AssignReminders/styles/AssignLevelsDatePickerStyles.d.ts.map +1 -0
  17. package/dist/types/components/AssignReminders/styles/AssignReminderStyles.d.ts.map +1 -1
  18. package/package.json +1 -1
@@ -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"),l=require("./assets/FileCheckCorner.js");require("./styles/AssignReminderLevels.css.js");var a=require("./styles/AssignReminderStyles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(s),c=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})}},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(l.default,{})},{label:"Notify",icon:n.jsx(i.Bell,{size:14})}];exports.AssignReminderLevels=function(s){var l=s.title,o=s.levels,p=void 0===o?[]:o,f=s.requireFinalApproval,_=void 0!==f&&f,v=s.additionalInfo,g=s.setLevels,x=s.setRequireFinalApproval,h=s.fetchUsers,j=s.accessLevelOptions,y=void 0===j?d:j,A=s.customInfoIcon,m=s.onValidationError,L=s.customStyles;return n.jsxs("div",e.__assign({style:{padding:"8px",display:"flex",flexDirection:"column",gap:"18px"}},{children:[n.jsxs("span",e.__assign({style:e.__assign(e.__assign({},a.DEFAULT_ASSIGN_REMINDER_STYLES.header),null==L?void 0:L.header)},{children:[n.jsx("span",{children:null!=l?l:"Assignee Levels"}),n.jsxs("div",e.__assign({className:"info-icon-wrapper"},{children:[null!=A?A:n.jsx(i.InfoIcon,{width:18,height:18}),n.jsx("div",e.__assign({className:"tooltip"},{children:v||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.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"16px"}},{children:[p.map(function(s,i){return n.jsx(t.default,{level:s,id:String(i),accessLevelOptions:y,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==m||m("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)},onDeleteLevel:function(){return e=i,void(null==g||g(function(n){return n.filter(function(n,s){return s!==e})}));var e}},i)}),n.jsxs("button",e.__assign({onClick:function(){var n=p.length+1,s={title:"Level ".concat(n),headerName:"L ".concat(n),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0};null==g||g(function(n){return e.__spreadArray(e.__spreadArray([],n,!0),[s],!1)})},style:a.DEFAULT_ASSIGN_REMINDER_STYLES.addLevelBtn,type:"button"},{children:[n.jsx(i.Plus,{size:16}),n.jsx("span",{children:"Add New Level"})]}))]})),n.jsxs("div",e.__assign({style:a.DEFAULT_ASSIGN_REMINDER_STYLES.finalApprovalBox},{children:[n.jsx(r.default,{getter:_,setter:null!=x?x:function(){}}),n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",alignItems:"baseline",marginTop:"13px",fontSize:"14px",fontWeight:400}},{children:[n.jsx("span",e.__assign({style:{fontWeight:500}},{children:"Require Final Approval"})),n.jsx("span",{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:a.DEFAULT_ASSIGN_REMINDER_STYLES.currentApprovalFlow},{children:[n.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:600}},{children:"Current Approval Flow"})),n.jsx("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"}},{children:p.map(function(s,t){var r,l=(null===(r=s.assignees)||void 0===r?void 0:r.map(function(e){return e.name}).join(", "))||"No users assigned",a=s.title||"Level ".concat(t+1);return n.jsxs(u.default.Fragment,{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,color:"#374151"},title:a},{children:[c(t),n.jsx("span",{children:l})]})),t<p.length-1&&n.jsx(i.ArrowRight,{size:16,color:"#9CA3AF"})]},t)})}))]}))]}))};
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"),l=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),c=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})}},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(l.default,{})},{label:"Notify",icon:n.jsx(i.Bell,{size:14})}];exports.AssignReminderLevels=function(s){var l=s.title,o=s.levels,_=void 0===o?[]:o,f=s.requireFinalApproval,p=void 0!==f&&f,v=s.additionalInfo,g=s.setLevels,x=s.setRequireFinalApproval,h=s.fetchUsers,j=s.accessLevelOptions,S=void 0===j?d:j,A=s.customInfoIcon,E=s.onValidationError,y=s.customStyles,L=u.default.useState(!1),D=L[0],m=L[1];return n.jsxs("div",e.__assign({style:{padding:"8px",display:"flex",flexDirection:"column",gap:"18px"}},{children:[n.jsxs("span",e.__assign({style:e.__assign(e.__assign({},a.DEFAULT_ASSIGN_REMINDER_STYLES.header),null==y?void 0:y.header)},{children:[n.jsx("span",{children:null!=l?l:"Assignee Levels"}),n.jsxs("div",e.__assign({style:a.DEFAULT_ASSIGN_REMINDER_STYLES.infoIconWrapper,onMouseEnter:function(){return m(!0)},onMouseLeave:function(){return m(!1)}},{children:[null!=A?A:n.jsx(i.InfoIcon,{width:18,height:18}),n.jsx("div",e.__assign({style:e.__assign(e.__assign({},a.DEFAULT_ASSIGN_REMINDER_STYLES.tooltip),D?a.DEFAULT_ASSIGN_REMINDER_STYLES.tooltipVisible:{})},{children:v||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.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"16px"}},{children:[_.map(function(s,i){return n.jsx(t.default,{level:s,id:String(i),accessLevelOptions:S,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=_[n-1])||void 0===i?void 0:i.dueDate;if(t&&s<t)return void(null==E||E("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)},onDeleteLevel:function(){return e=i,void(null==g||g(function(n){return n.filter(function(n,s){return s!==e})}));var e}},i)}),n.jsxs("button",e.__assign({onClick:function(){var n=_.length+1,s={title:"Level ".concat(n),headerName:"L ".concat(n),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0};null==g||g(function(n){return e.__spreadArray(e.__spreadArray([],n,!0),[s],!1)})},style:a.DEFAULT_ASSIGN_REMINDER_STYLES.addLevelBtn,type:"button"},{children:[n.jsx(i.Plus,{size:16}),n.jsx("span",{children:"Add New Level"})]}))]})),n.jsxs("div",e.__assign({style:a.DEFAULT_ASSIGN_REMINDER_STYLES.finalApprovalBox},{children:[n.jsx(r.default,{getter:p,setter:null!=x?x:function(){}}),n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400}},{children:[n.jsx("span",e.__assign({style:{fontWeight:500}},{children:"Require Final Approval"})),n.jsx("span",{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:a.DEFAULT_ASSIGN_REMINDER_STYLES.currentApprovalFlow},{children:[n.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:600}},{children:"Current Approval Flow"})),n.jsx("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"}},{children:_.map(function(s,t){var r,l=(null===(r=s.assignees)||void 0===r?void 0:r.map(function(e){return e.name}).join(", "))||"No users assigned",a=s.title||"Level ".concat(t+1);return n.jsxs(u.default.Fragment,{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,color:"#374151"},title:a},{children:[c(t),n.jsx("span",{children:l})]})),t<_.length-1&&n.jsx(i.ArrowRight,{size:16,color:"#9CA3AF"})]},t)})}))]}))]}))};
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");exports.default=function(a){var n=a.value,l=a.onSet;a.id;var s=r.useRef(null);return t.jsxs("div",e.__assign({className:"date-input-wrapper",onClick:function(){var e;return null===(e=s.current)||void 0===e?void 0:e.showPicker()}},{children:[t.jsx("span",e.__assign({className:"placeholder",style:{color:"#6B7280"}},{children:n?"".concat(n.getDate()," / ").concat(n.getMonth()+1," / ").concat(n.getFullYear()):"--/--/----"})),t.jsx("input",{ref:s,type:"date",className:"date-input",value:n?n.toISOString().split("T")[0]:"",onChange:function(e){var t=e.target.value;l(t?new Date(t):null)}})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),t=require("react"),l=require("../styles/AssignLevelsDatePickerStyles.js");exports.default=function(n){var i=n.value,s=n.onSet,u=t.useRef(null);return r.jsxs("div",e.__assign({style:l.DATE_PICKER_STYLES.wrapper,onClick:function(){var e,r;return null===(r=null===(e=u.current)||void 0===e?void 0:e.showPicker)||void 0===r?void 0:r.call(e)}},{children:[r.jsx("span",e.__assign({style:l.DATE_PICKER_STYLES.placeholder},{children:i?i.toLocaleDateString("en-GB"):"--/--/----"})),r.jsx("input",{ref:u,type:"date",style:l.DATE_PICKER_STYLES.input,value:i?i.toISOString().split("T")[0]:"",onChange:function(e){var r=e.target.value;s(r?new Date(r):null)}})]}))};
2
2
  //# sourceMappingURL=AssignLevelsDatePicker.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.DATE_PICKER_STYLES={wrapper:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"140px",height:"32px",padding:"0 12px",border:"1px solid #D1D5DB",borderRadius:"8px",background:"#FFFFFF",cursor:"pointer",overflow:"hidden"},placeholder:{fontSize:"14px",fontWeight:500,color:"#6B7280",userSelect:"none",pointerEvents:"none"},input:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer"}};
2
+ //# sourceMappingURL=AssignLevelsDatePickerStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssignLevelsDatePickerStyles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.DEFAULT_ASSIGN_REMINDER_STYLES={header:{display:"flex",fontSize:"20px",alignItems:"center",gap:10},finalApprovalBox:{display:"flex",padding:"20px",border:"1px solid #F3F4F6",backgroundColor:"#FFFFFF"},currentApprovalFlow:{backgroundColor:"#F9FAFB",border:"1px solid #E5E7EB",borderRadius:"10px",padding:"12px",display:"flex",flexDirection:"column",gap:"8px"},addLevelBtn:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",padding:"10px",backgroundColor:"#F3F4F6",color:"#374151",border:"1px dashed #D1D5DB",borderRadius:"8px",cursor:"pointer",fontSize:"14px",fontWeight:500,transition:"all 0.2s ease"}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.DEFAULT_ASSIGN_REMINDER_STYLES={header:{display:"flex",fontSize:"20px",alignItems:"center",gap:10},finalApprovalBox:{display:"flex",padding:"20px",border:"1px solid #F3F4F6",backgroundColor:"#FFFFFF"},currentApprovalFlow:{backgroundColor:"#F9FAFB",border:"1px solid #E5E7EB",borderRadius:"10px",padding:"12px",display:"flex",flexDirection:"column",gap:"8px"},addLevelBtn:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",padding:"10px",backgroundColor:"#F3F4F6",color:"#374151",border:"1px dashed #D1D5DB",borderRadius:"8px",cursor:"pointer",fontSize:"14px",fontWeight:500,transition:"all 0.2s ease"},dateInputWrapper:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"110px",height:"30px",padding:"0 12px",border:"2px solid #cfd6df",borderRadius:"8px",position:"relative"},dateInput:{position:"absolute",inset:0,opacity:0,cursor:"pointer",zIndex:100},requiredToggle:{position:"relative",width:"110px",height:"28px",border:"none",borderRadius:"999px",background:"#e2e8f0",cursor:"pointer",transition:"all 0.2s ease",display:"flex",alignItems:"center",padding:0},requiredToggleActive:{background:"#eef2ff"},toggleThumb:{position:"absolute",left:"4px",width:"20px",height:"20px",borderRadius:"50%",background:"#fff",transition:"transform 0.2s ease",boxShadow:"0 1px 3px rgba(0,0,0,0.15)"},toggleThumbActive:{transform:"translateX(82px)"},toggleLabel:{width:"100%",textAlign:"center",fontSize:"12px",fontWeight:500,color:"#64748b",transition:"color 0.2s ease"},toggleLabelActive:{color:"#4F46E5"},infoIconWrapper:{position:"relative",display:"inline-flex",alignItems:"center",cursor:"pointer"},tooltip:{position:"absolute",bottom:"125%",left:"50%",transform:"translateX(-30%)",background:"#333",color:"#fff",padding:"6px 10px",borderRadius:"4px",whiteSpace:"nowrap",fontSize:"12px",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",zIndex:1e3},tooltipVisible:{opacity:1,visibility:"visible"}};
2
2
  //# sourceMappingURL=AssignReminderStyles.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__spreadArray as n}from"../../_virtual/_tslib.js";import{jsx as i,jsxs as t}from"react/jsx-runtime";import r from"react";import{PenLine as l,UserRoundCheck as o,Bell as s,InfoIcon as a,Plus as c,ArrowRight as u,CheckSquare as d,User as p,FileCheck as f,Edit2 as v}from"lucide-react";import h from"./AssignLevelAccordions.js";import m from"./components/CustomCheckbox.js";import g from"./assets/FileCheckCorner.js";import"./styles/AssignReminderLevels.css.js";import{DEFAULT_ASSIGN_REMINDER_STYLES as y}from"./styles/AssignReminderStyles.js";var x=function(e){switch(e){case 0:return i(v,{size:16});case 1:return i(f,{size:16});case 2:return i(p,{size:16});default:return i(d,{size:16})}},A=[{label:"Edit",icon:i(l,{size:14})},{label:"Approve",icon:i(o,{size:14})},{label:"Edit & Approve",icon:i(g,{})},{label:"Notify",icon:i(s,{size:14})}];function b(l){var o=l.title,s=l.levels,d=void 0===s?[]:s,p=l.requireFinalApproval,f=void 0!==p&&p,v=l.additionalInfo,g=l.setLevels,b=l.setRequireFinalApproval,L=l.fetchUsers,w=l.accessLevelOptions,z=void 0===w?A:w,D=l.customInfoIcon,C=l.onValidationError,j=l.customStyles;return t("div",e({style:{padding:"8px",display:"flex",flexDirection:"column",gap:"18px"}},{children:[t("span",e({style:e(e({},y.header),null==j?void 0:j.header)},{children:[i("span",{children:null!=o?o:"Assignee Levels"}),t("div",e({className:"info-icon-wrapper"},{children:[null!=D?D:i(a,{width:18,height:18}),i("div",e({className:"tooltip"},{children:v||t("span",{children:[i("b",{children:"How it works:"})," ",i("br",{})," Level 1 is required by default, Enable Level 2 and Level 3 to add sequential approval steps for the review"]})}))]}))]})),t("div",e({style:{display:"flex",flexDirection:"column",gap:"16px"}},{children:[d.map(function(n,t){return i(h,{level:n,id:String(t),accessLevelOptions:z,fetchUsers:L,onToggleMandatory:function(){return n=t,void(null==g||g(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=d[n-1])||void 0===t?void 0:t.dueDate;if(r&&i<r)return void(null==C||C("Level ".concat(n+1," due date cannot be before Level ").concat(n," due date")))}null==g||g(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==g||g(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==g||g(function(t){return t.map(function(t,r){return r===n?e(e({},t),{title:i}):t})})}(t,n)},onDeleteLevel:function(){return e=t,void(null==g||g(function(n){return n.filter(function(n,i){return i!==e})}));var e}},t)}),t("button",e({onClick:function(){var e=d.length+1,i={title:"Level ".concat(e),headerName:"L ".concat(e),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0};null==g||g(function(e){return n(n([],e,!0),[i],!1)})},style:y.addLevelBtn,type:"button"},{children:[i(c,{size:16}),i("span",{children:"Add New Level"})]}))]})),t("div",e({style:y.finalApprovalBox},{children:[i(m,{getter:f,setter:null!=b?b:function(){}}),t("div",e({style:{display:"flex",flexDirection:"column",alignItems:"baseline",marginTop:"13px",fontSize:"14px",fontWeight:400}},{children:[i("span",e({style:{fontWeight:500}},{children:"Require Final Approval"})),i("span",{children:"After all assignees approve, you (the owner) will be notified to give final sign-off before the redline is settled."})]}))]})),t("div",e({style:y.currentApprovalFlow},{children:[i("span",e({style:{fontSize:"14px",fontWeight:600}},{children:"Current Approval Flow"})),i("div",e({style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"}},{children:d.map(function(n,l){var o,s=(null===(o=n.assignees)||void 0===o?void 0:o.map(function(e){return e.name}).join(", "))||"No users assigned",a=n.title||"Level ".concat(l+1);return t(r.Fragment,{children:[t("div",e({style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,color:"#374151"},title:a},{children:[x(l),i("span",{children:s})]})),l<d.length-1&&i(u,{size:16,color:"#9CA3AF"})]},l)})}))]}))]}))}export{b as AssignReminderLevels};
1
+ import{__assign as e,__spreadArray as n}from"../../_virtual/_tslib.js";import{jsx as t,jsxs as i}from"react/jsx-runtime";import r from"react";import{PenLine as l,UserRoundCheck as o,Bell as a,InfoIcon as s,Plus as u,ArrowRight as c,CheckSquare as d,User as p,FileCheck as f,Edit2 as v}from"lucide-react";import h from"./AssignLevelAccordions.js";import m from"./components/CustomCheckbox.js";import g from"./assets/FileCheckCorner.js";import{DEFAULT_ASSIGN_REMINDER_STYLES as y}from"./styles/AssignReminderStyles.js";var x=function(e){switch(e){case 0:return t(v,{size:16});case 1:return t(f,{size:16});case 2:return t(p,{size:16});default:return t(d,{size:16})}},b=[{label:"Edit",icon:t(l,{size:14})},{label:"Approve",icon:t(o,{size:14})},{label:"Edit & Approve",icon:t(g,{})},{label:"Notify",icon:t(a,{size:14})}];function A(l){var o=l.title,a=l.levels,d=void 0===a?[]:a,p=l.requireFinalApproval,f=void 0!==p&&p,v=l.additionalInfo,g=l.setLevels,A=l.setRequireFinalApproval,L=l.fetchUsers,z=l.accessLevelOptions,w=void 0===z?b:z,D=l.customInfoIcon,C=l.onValidationError,F=l.customStyles,j=r.useState(!1),I=j[0],S=j[1];return i("div",e({style:{padding:"8px",display:"flex",flexDirection:"column",gap:"18px"}},{children:[i("span",e({style:e(e({},y.header),null==F?void 0:F.header)},{children:[t("span",{children:null!=o?o:"Assignee Levels"}),i("div",e({style:y.infoIconWrapper,onMouseEnter:function(){return S(!0)},onMouseLeave:function(){return S(!1)}},{children:[null!=D?D:t(s,{width:18,height:18}),t("div",e({style:e(e({},y.tooltip),I?y.tooltipVisible:{})},{children:v||i("span",{children:[t("b",{children:"How it works:"}),t("br",{}),"Level 1 is required by default, Enable Level 2 and Level 3 to add sequential approval steps for the review"]})}))]}))]})),i("div",e({style:{display:"flex",flexDirection:"column",gap:"16px"}},{children:[d.map(function(n,i){return t(h,{level:n,id:String(i),accessLevelOptions:w,fetchUsers:L,onToggleMandatory:function(){return n=i,void(null==g||g(function(t){return t.map(function(t,i){return i===n?e(e({},t),{isMandatory:!t.isMandatory}):t})}));var n},onDueDateChange:function(n){return function(n,t){var i;if(n>0&&t){var r=null===(i=d[n-1])||void 0===i?void 0:i.dueDate;if(r&&t<r)return void(null==C||C("Level ".concat(n+1," due date cannot be before Level ").concat(n," due date")))}null==g||g(function(i){return i.map(function(i,r){return r===n?e(e({},i),{dueDate:t}):i})})}(i,n)},onAssigneesChange:function(n){return t=i,r=n,void(null==g||g(function(n){return n.map(function(n,i){return i===t?e(e({},n),{assignees:r}):n})}));var t,r},onTitleChange:function(n){return function(n,t){null==g||g(function(i){return i.map(function(i,r){return r===n?e(e({},i),{title:t}):i})})}(i,n)},onDeleteLevel:function(){return e=i,void(null==g||g(function(n){return n.filter(function(n,t){return t!==e})}));var e}},i)}),i("button",e({onClick:function(){var e=d.length+1,t={title:"Level ".concat(e),headerName:"L ".concat(e),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0};null==g||g(function(e){return n(n([],e,!0),[t],!1)})},style:y.addLevelBtn,type:"button"},{children:[t(u,{size:16}),t("span",{children:"Add New Level"})]}))]})),i("div",e({style:y.finalApprovalBox},{children:[t(m,{getter:f,setter:null!=A?A:function(){}}),i("div",e({style:{display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400}},{children:[t("span",e({style:{fontWeight:500}},{children:"Require Final Approval"})),t("span",{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:y.currentApprovalFlow},{children:[t("span",e({style:{fontSize:"14px",fontWeight:600}},{children:"Current Approval Flow"})),t("div",e({style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"}},{children:d.map(function(n,l){var o,a=(null===(o=n.assignees)||void 0===o?void 0:o.map(function(e){return e.name}).join(", "))||"No users assigned",s=n.title||"Level ".concat(l+1);return i(r.Fragment,{children:[i("div",e({style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,color:"#374151"},title:s},{children:[x(l),t("span",{children:a})]})),l<d.length-1&&t(c,{size:16,color:"#9CA3AF"})]},l)})}))]}))]}))}export{A 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 a}from"react/jsx-runtime";import{useRef as r}from"react";function n(n){var l=n.value,o=n.onSet;n.id;var i=r(null);return e("div",t({className:"date-input-wrapper",onClick:function(){var t;return null===(t=i.current)||void 0===t?void 0:t.showPicker()}},{children:[a("span",t({className:"placeholder",style:{color:"#6B7280"}},{children:l?"".concat(l.getDate()," / ").concat(l.getMonth()+1," / ").concat(l.getFullYear()):"--/--/----"})),a("input",{ref:i,type:"date",className:"date-input",value:l?l.toISOString().split("T")[0]:"",onChange:function(t){var e=t.target.value;o(e?new Date(e):null)}})]}))}export{n as default};
1
+ import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useRef as l}from"react";import{DATE_PICKER_STYLES as n}from"../styles/AssignLevelsDatePickerStyles.js";function i(i){var o=i.value,a=i.onSet,u=l(null);return t("div",e({style:n.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:[r("span",e({style:n.placeholder},{children:o?o.toLocaleDateString("en-GB"):"--/--/----"})),r("input",{ref:u,type:"date",style:n.input,value:o?o.toISOString().split("T")[0]:"",onChange:function(e){var t=e.target.value;a(t?new Date(t):null)}})]}))}export{i as default};
2
2
  //# sourceMappingURL=AssignLevelsDatePicker.js.map
@@ -0,0 +1,2 @@
1
+ var e={wrapper:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"140px",height:"32px",padding:"0 12px",border:"1px solid #D1D5DB",borderRadius:"8px",background:"#FFFFFF",cursor:"pointer",overflow:"hidden"},placeholder:{fontSize:"14px",fontWeight:500,color:"#6B7280",userSelect:"none",pointerEvents:"none"},input:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer"}};export{e as DATE_PICKER_STYLES};
2
+ //# sourceMappingURL=AssignLevelsDatePickerStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssignLevelsDatePickerStyles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- var e={header:{display:"flex",fontSize:"20px",alignItems:"center",gap:10},finalApprovalBox:{display:"flex",padding:"20px",border:"1px solid #F3F4F6",backgroundColor:"#FFFFFF"},currentApprovalFlow:{backgroundColor:"#F9FAFB",border:"1px solid #E5E7EB",borderRadius:"10px",padding:"12px",display:"flex",flexDirection:"column",gap:"8px"},addLevelBtn:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",padding:"10px",backgroundColor:"#F3F4F6",color:"#374151",border:"1px dashed #D1D5DB",borderRadius:"8px",cursor:"pointer",fontSize:"14px",fontWeight:500,transition:"all 0.2s ease"}};export{e as DEFAULT_ASSIGN_REMINDER_STYLES};
1
+ var e={header:{display:"flex",fontSize:"20px",alignItems:"center",gap:10},finalApprovalBox:{display:"flex",padding:"20px",border:"1px solid #F3F4F6",backgroundColor:"#FFFFFF"},currentApprovalFlow:{backgroundColor:"#F9FAFB",border:"1px solid #E5E7EB",borderRadius:"10px",padding:"12px",display:"flex",flexDirection:"column",gap:"8px"},addLevelBtn:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",padding:"10px",backgroundColor:"#F3F4F6",color:"#374151",border:"1px dashed #D1D5DB",borderRadius:"8px",cursor:"pointer",fontSize:"14px",fontWeight:500,transition:"all 0.2s ease"},dateInputWrapper:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"110px",height:"30px",padding:"0 12px",border:"2px solid #cfd6df",borderRadius:"8px",position:"relative"},dateInput:{position:"absolute",inset:0,opacity:0,cursor:"pointer",zIndex:100},requiredToggle:{position:"relative",width:"110px",height:"28px",border:"none",borderRadius:"999px",background:"#e2e8f0",cursor:"pointer",transition:"all 0.2s ease",display:"flex",alignItems:"center",padding:0},requiredToggleActive:{background:"#eef2ff"},toggleThumb:{position:"absolute",left:"4px",width:"20px",height:"20px",borderRadius:"50%",background:"#fff",transition:"transform 0.2s ease",boxShadow:"0 1px 3px rgba(0,0,0,0.15)"},toggleThumbActive:{transform:"translateX(82px)"},toggleLabel:{width:"100%",textAlign:"center",fontSize:"12px",fontWeight:500,color:"#64748b",transition:"color 0.2s ease"},toggleLabelActive:{color:"#4F46E5"},infoIconWrapper:{position:"relative",display:"inline-flex",alignItems:"center",cursor:"pointer"},tooltip:{position:"absolute",bottom:"125%",left:"50%",transform:"translateX(-30%)",background:"#333",color:"#fff",padding:"6px 10px",borderRadius:"4px",whiteSpace:"nowrap",fontSize:"12px",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",zIndex:1e3},tooltipVisible:{opacity:1,visibility:"visible"}};export{e as DEFAULT_ASSIGN_REMINDER_STYLES};
2
2
  //# sourceMappingURL=AssignReminderStyles.js.map
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { AssignReminderLevelsProps } from "./types/types";
3
- import "./styles/AssignReminderLevels.css";
4
3
  declare function AssignReminderLevels({ title, levels, requireFinalApproval, additionalInfo, setLevels, setRequireFinalApproval, fetchUsers, accessLevelOptions, customInfoIcon, onValidationError, customStyles }: AssignReminderLevelsProps): React.JSX.Element;
5
4
  export { AssignReminderLevels };
6
5
  //# sourceMappingURL=AssignReminderLevels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssignReminderLevels.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderLevels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAS,MAAM,eAAe,CAAC;AAIjE,OAAO,mCAAmC,CAAC;AAkB3C,iBAAS,oBAAoB,CAAC,EAC1B,KAAK,EACL,MAAW,EACX,oBAA4B,EAC5B,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,UAAU,EACV,kBAAiD,EACjD,cAAc,EACd,iBAAiB,EACjB,YAAY,EACf,EAAE,yBAAyB,qBAqH3B;AAED,OAAO,EAAC,oBAAoB,EAAC,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;AAqBjE,iBAAS,oBAAoB,CAAC,EAC1B,KAAK,EACL,MAAW,EACX,oBAA4B,EAC5B,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,UAAU,EACV,kBAAiD,EACjD,cAAc,EACd,iBAAiB,EACjB,YAAY,EACf,EAAE,yBAAyB,qBA4N3B;AAED,OAAO,EAAC,oBAAoB,EAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare function AssignLevelDatePicker({ value, onSet, id, }: {
2
+ declare function AssignLevelDatePicker({ value, onSet, }: {
3
3
  value: Date | null;
4
4
  onSet: (val: Date | null) => void;
5
5
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"AssignLevelsDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/AssignLevelsDatePicker.tsx"],"names":[],"mappings":";AAEA,iBAAS,qBAAqB,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,EAAE,GACH,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;CACZ,+BA0BA;AAED,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"AssignLevelsDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/AssignLevelsDatePicker.tsx"],"names":[],"mappings":";AAGA,iBAAS,qBAAqB,CAAC,EAC7B,KAAK,EACL,KAAK,GACN,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;CACZ,+BA0BA;AAED,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const DATE_PICKER_STYLES: Record<string, React.CSSProperties>;
2
+ //# sourceMappingURL=AssignLevelsDatePickerStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssignLevelsDatePickerStyles.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/styles/AssignLevelsDatePickerStyles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAgClE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AssignReminderStyles.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/styles/AssignReminderStyles.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAKvE,CAAC;AACF,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
1
+ {"version":3,"file":"AssignReminderStyles.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/styles/AssignReminderStyles.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAmGvE,CAAC;AACF,OAAO,EAAE,8BAA8B,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.9",
3
+ "version": "0.0.11",
4
4
  "author": "Viswa Koduru",
5
5
  "description": "",
6
6
  "license": "MIT",