@viswa-test/creative-workspace-ui-component 0.0.42 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/AssignReminders/AssignReminderLevels.js +1 -1
- package/dist/cjs/components/AssignReminders/components/AssignLevelsDatePicker.js +1 -1
- package/dist/cjs/components/AssignReminders/components/CustomDatePicker.js +1 -1
- package/dist/cjs/components/AssignReminders/components/LevelData.js +1 -1
- package/dist/components/AssignReminders/AssignReminderLevels.js +1 -1
- package/dist/components/AssignReminders/components/AssignLevelsDatePicker.js +1 -1
- package/dist/components/AssignReminders/components/CustomDatePicker.js +1 -1
- package/dist/components/AssignReminders/components/LevelData.js +1 -1
- package/dist/types/components/AssignReminders/AssignReminderLevels.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/components/AssignLevelsDatePicker.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/components/CustomDatePicker.d.ts.map +1 -1
- 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"),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),
|
|
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)}))}))]}))]}))};
|
|
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(
|
|
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)}})]}))};
|
|
2
2
|
//# sourceMappingURL=AssignLevelsDatePicker.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),i=require("react"),r=require("lucide-react");exports.default=function(n){var a=n.value,l=n.onChange,o=n.placeholder,s=void 0===o?"dd/mm/yyyy":o,u=i.useRef(null);return t.jsxs("div",e.__assign({onClick:function(){var e,t;null===(t=null===(e=u.current)||void 0===e?void 0:e.showPicker)||void 0===t||t.call(e)},style:{position:"relative",width:"100%",height:"35px",padding:"0 12px",borderRadius:"12px",background:"#F3F4F6",border:"1px solid #C7CDD5",display:"flex",gap:60,alignItems:"center",cursor:"pointer",boxSizing:"border-box"}},{children:[t.jsx("input",{ref:u,type:"date",value:a,onChange:function(e){return l(e.target.value?new Date(e.target.value):null)},min:(new Date).toISOString().split("T")[0],style:{position:"absolute",opacity:0,pointerEvents:"none"}}),t.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:400,color:a?"#111827":"#667085"}},{children:a?new Date(a).toLocaleDateString("en-GB"):s})),t.jsx("div",e.__assign({style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:"6px"}},{children:t.jsx(r.Calendar,{size:18,color:"#667085",strokeWidth:2})}))]}))};
|
|
2
2
|
//# sourceMappingURL=CustomDatePicker.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),r=require("react"),i=require("./CustomDropdown.js");exports.default=function(s){var t=this,a=s.assignees,o=s.onAssigneeChange,l=s.accessLevelOptions,d=s.fetchUsers;s.wrapperEl;var u=r.useState(""),p=u[0],c=u[1],x=r.useState([]),g=x[0],_=x[1],f=r.useState(null),v=f[0],m=f[1];return r.useEffect(function(){if(p.trim()){var n=setTimeout(function(){return e.__awaiter(t,void 0,void 0,function(){var n,r,i;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,d(p)];case 1:return n=e.sent(),r=new Set(a.map(function(e){return e.id})),_(n.filter(function(e){return!r.has(e.id)})),[3,3];case 2:return i=e.sent(),console.error("[LevelData]: fetchUser error:",i),_([]),[3,3];case 3:return[2]}})})},300);return function(){return clearTimeout(n)}}_([])},[p,a]),n.jsxs("div",e.__assign({style:{borderTop:"1px solid #CBD5E1",padding:"20px"}},{children:[n.jsx("span",e.__assign({style:{fontWeight:600,marginBottom:"8px",fontSize:"14px"}},{children:"Assignee Emails"})),n.jsxs("div",e.__assign({style:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"8px",marginTop:"10px",display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"}},{children:[a.map(function(r){var s,t,d;return r.notes&&"string"==typeof r.notes&&r.notes.trim(),n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px",background:"#E9D5FF",borderRadius:"10px",padding:"2px 8px",fontSize:"12px"}},{children:[n.jsx("span",e.__assign({style:{padding:"4px"}},{children:r.name})),n.jsx(i.default,{value:null!==(d=null!==(s=r.accessLevel)&&void 0!==s?s:null===(t=l[0])||void 0===t?void 0:t.label)&&void 0!==d?d:"",options:l,onChange:function(n){return i=r.id,s=n,void o(a.map(function(n){return n.id===i?e.__assign(e.__assign({},n),{accessLevel:s}):n}));var i,s}}),n.jsx("button",e.__assign({style:{border:"none",background:"transparent",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center",fontSize:"12px"},onClick:function(){return e=r.id,o(a.filter(function(n){return n.id!==e})),void((null==v?void 0:v.id)===e&&m(null));var e},"aria-label":"Remove ".concat(r.name)},{children:"✕"}))]}),r.id)}),n.jsx("input",{type:"text",value:p,placeholder:"Search users...",onChange:function(e){return c(e.target.value)},style:{border:"none",outline:"none",flex:1,minWidth:"150px",fontSize:"12px"}})]})),g.length>0&&n.jsx("div",e.__assign({style:{border:"1px solid #CBD5E1",borderRadius:"8px",marginTop:"8px"}},{children:g.map(function(r){return n.jsxs("div",e.__assign({style:{padding:"8px",cursor:"pointer"},onClick:function(){return function(n){var r,i,s,t;a.some(function(e){return e.id===n.id})||(o(e.__spreadArray(e.__spreadArray([],a,!0),[e.__assign(e.__assign({},n),{accessLevel:null!==(i=null===(r=l[0])||void 0===r?void 0:r.label)&&void 0!==i?i:"",notes:"",sendMailNow:!1})],!1)),c(""),_([]),m(e.__assign(e.__assign({},n),{accessLevel:null!==(t=null===(s=l[0])||void 0===s?void 0:s.label)&&void 0!==t?t:""})))}(r)}},{children:[r.name,r.email&&n.jsx("span",e.__assign({style:{marginLeft:"8px",color:"#6B7280",fontSize:"11px"}},{children:r.email}))]}),r.id)})}))]}))};
|
|
2
2
|
//# sourceMappingURL=LevelData.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../_virtual/_tslib.js";import{jsx as n,jsxs as
|
|
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};
|
|
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
|
|
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};
|
|
2
2
|
//# sourceMappingURL=AssignLevelsDatePicker.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as i}from"react/jsx-runtime";import{useRef as r}from"react";import{Calendar as o}from"lucide-react";function n(n){var l=n.value,a=n.onChange,d=n.placeholder,p=void 0===d?"dd/mm/yyyy":d,s=r(null);return t("div",e({onClick:function(){var e,t;null===(t=null===(e=s.current)||void 0===e?void 0:e.showPicker)||void 0===t||t.call(e)},style:{position:"relative",width:"100%",height:"35px",padding:"0 12px",borderRadius:"12px",background:"#F3F4F6",border:"1px solid #C7CDD5",display:"flex",gap:60,alignItems:"center",cursor:"pointer",boxSizing:"border-box"}},{children:[i("input",{ref:s,type:"date",value:l,onChange:function(e){return a(e.target.value?new Date(e.target.value):null)},min:(new Date).toISOString().split("T")[0],style:{position:"absolute",opacity:0,pointerEvents:"none"}}),i("span",e({style:{fontSize:"14px",fontWeight:400,color:l?"#111827":"#667085"}},{children:l?new Date(l).toLocaleDateString("en-GB"):p})),i("div",e({style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:"6px"}},{children:i(o,{size:18,color:"#667085",strokeWidth:2})}))]}))}export{n as default};
|
|
2
2
|
//# sourceMappingURL=CustomDatePicker.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as n,__assign as
|
|
1
|
+
import{__awaiter as e,__generator as n,__assign as r,__spreadArray as i}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as l,useEffect as a}from"react";import s from"./CustomDropdown.js";function d(d){var u=this,p=d.assignees,c=d.onAssigneeChange,f=d.accessLevelOptions,v=d.fetchUsers;d.wrapperEl;var m=l(""),x=m[0],g=m[1],h=l([]),b=h[0],y=h[1],C=l(null),L=C[0],S=C[1];a(function(){if(x.trim()){var r=setTimeout(function(){return e(u,void 0,void 0,function(){var e,r,i;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,v(x)];case 1:return e=n.sent(),r=new Set(p.map(function(e){return e.id})),y(e.filter(function(e){return!r.has(e.id)})),[3,3];case 2:return i=n.sent(),console.error("[LevelData]: fetchUser error:",i),y([]),[3,3];case 3:return[2]}})})},300);return function(){return clearTimeout(r)}}y([])},[x,p]);return t("div",r({style:{borderTop:"1px solid #CBD5E1",padding:"20px"}},{children:[o("span",r({style:{fontWeight:600,marginBottom:"8px",fontSize:"14px"}},{children:"Assignee Emails"})),t("div",r({style:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"8px",marginTop:"10px",display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"}},{children:[p.map(function(e){var n,i,l;return e.notes&&"string"==typeof e.notes&&e.notes.trim(),t("div",r({style:{display:"flex",alignItems:"center",gap:"6px",background:"#E9D5FF",borderRadius:"10px",padding:"2px 8px",fontSize:"12px"}},{children:[o("span",r({style:{padding:"4px"}},{children:e.name})),o(s,{value:null!==(l=null!==(n=e.accessLevel)&&void 0!==n?n:null===(i=f[0])||void 0===i?void 0:i.label)&&void 0!==l?l:"",options:f,onChange:function(n){return i=e.id,t=n,void c(p.map(function(e){return e.id===i?r(r({},e),{accessLevel:t}):e}));var i,t}}),o("button",r({style:{border:"none",background:"transparent",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center",fontSize:"12px"},onClick:function(){return n=e.id,c(p.filter(function(e){return e.id!==n})),void((null==L?void 0:L.id)===n&&S(null));var n},"aria-label":"Remove ".concat(e.name)},{children:"✕"}))]}),e.id)}),o("input",{type:"text",value:x,placeholder:"Search users...",onChange:function(e){return g(e.target.value)},style:{border:"none",outline:"none",flex:1,minWidth:"150px",fontSize:"12px"}})]})),b.length>0&&o("div",r({style:{border:"1px solid #CBD5E1",borderRadius:"8px",marginTop:"8px"}},{children:b.map(function(e){return t("div",r({style:{padding:"8px",cursor:"pointer"},onClick:function(){return function(e){var n,t,o,l;p.some(function(n){return n.id===e.id})||(c(i(i([],p,!0),[r(r({},e),{accessLevel:null!==(t=null===(n=f[0])||void 0===n?void 0:n.label)&&void 0!==t?t:"",notes:"",sendMailNow:!1})],!1)),g(""),y([]),S(r(r({},e),{accessLevel:null!==(l=null===(o=f[0])||void 0===o?void 0:o.label)&&void 0!==l?l:""})))}(e)}},{children:[e.name,e.email&&o("span",r({style:{marginLeft:"8px",color:"#6B7280",fontSize:"11px"}},{children:e.email}))]}),e.id)})}))]}))}export{d as default};
|
|
2
2
|
//# sourceMappingURL=LevelData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignReminderLevels.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderLevels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAS,MAAM,eAAe,CAAC;AAsBjE,iBAAS,oBAAoB,CAAC,EAC1B,KAAK,EACL,MAAW,EACX,oBAA4B,EAC5B,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,UAAU,EACV,kBAAiD,EACjD,cAAc,EACd,iBAAiB,EACjB,YAAiB,EACjB,WAAW,EACX,oBAAoB,EACvB,EAAE,yBAAyB,
|
|
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 +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,+
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/CustomDatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,UAAU,qBAAqB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,WAA0B,GAC7B,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"CustomDatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/components/CustomDatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,UAAU,qBAAqB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,WAA0B,GAC7B,EAAE,qBAAqB,qBAuEvB"}
|