@viswa-test/creative-workspace-ui-component 0.0.46 → 0.0.47
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/_virtual/_tslib.js +1 -1
- package/dist/cjs/_virtual/_tslib.js +1 -1
- package/dist/cjs/components/AssignReminders/AssignLevelAccordions.js +1 -1
- package/dist/cjs/components/AssignReminders/AssignReminderLevels.js +1 -1
- package/dist/cjs/components/AssignReminders/AssignReminderWrapper.js +1 -1
- package/dist/cjs/components/AssignReminders/ManageReminders.js +1 -1
- package/dist/cjs/components/AssignReminders/assets/FileCheckCorner.js +1 -1
- package/dist/cjs/components/AssignReminders/assets/VerticalLine.js +1 -1
- package/dist/cjs/components/AssignReminders/components/AddUserPopup.js +1 -1
- package/dist/cjs/components/AssignReminders/components/AssignLevelsDatePicker.js +1 -1
- package/dist/cjs/components/AssignReminders/components/AssigneeCalendarView.js +1 -1
- package/dist/cjs/components/AssignReminders/components/CustomCheckbox.js +1 -1
- package/dist/cjs/components/AssignReminders/components/CustomDatePicker.js +1 -1
- package/dist/cjs/components/AssignReminders/components/CustomDropdown.js +1 -1
- package/dist/cjs/components/AssignReminders/components/LevelData.js +1 -1
- package/dist/cjs/components/AssignReminders/components/ReminderFrequencyAutocomplete.js +1 -1
- package/dist/cjs/components/AssignReminders/components/ReviewStatus.js +1 -1
- package/dist/cjs/components/AssignReminders/utils/generateRandomColorsPair.js +1 -1
- package/dist/cjs/components/ScopeTree/HighlightedText.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeAddAction.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeMenu.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeNode.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeNodeHeader.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeSectionItem.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeSidebar.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeTooltip.js +1 -1
- package/dist/cjs/features/lsc-guidelines/LscGuidelines.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineAttachmentIcon.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineCardMenu.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineCart.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineCartHeader.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineCartItem.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineClearCartDialog.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineConfirmDialog.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineEditor.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineEditorPage.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineEmptyState.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineHeader.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineIconButton.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineLandingPage.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineLibrary.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineLibraryCard.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelinePopoverCart.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineProceedButton.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineSavedModal.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineSelectButton.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineTooltip.js +1 -1
- package/dist/cjs/features/lsc-guidelines/constants.js +1 -1
- package/dist/cjs/features/lsc-guidelines/hooks/useControllableState.js +1 -1
- package/dist/cjs/features/lsc-guidelines/hooks/useGuidelineFlow.js +1 -1
- package/dist/cjs/features/lsc-guidelines/hooks/useGuidelineSelection.js +1 -1
- package/dist/cjs/features/lsc-guidelines/icons/GuidelineSpinner.js +1 -1
- package/dist/cjs/features/lsc-guidelines/utils.js +1 -1
- package/dist/cjs/utils/treeUtils.js +1 -1
- package/dist/components/AssignReminders/AssignLevelAccordions.js +1 -1
- package/dist/components/AssignReminders/AssignReminderLevels.js +1 -1
- package/dist/components/AssignReminders/AssignReminderTest.js +1 -1
- package/dist/components/AssignReminders/AssignReminderWrapper.js +1 -1
- package/dist/components/AssignReminders/ManageReminders.js +1 -1
- package/dist/components/AssignReminders/assets/FileCheckCorner.js +1 -1
- package/dist/components/AssignReminders/assets/VerticalLine.js +1 -1
- package/dist/components/AssignReminders/components/AddUserPopup.js +1 -1
- package/dist/components/AssignReminders/components/AssignLevelsDatePicker.js +1 -1
- package/dist/components/AssignReminders/components/AssigneeCalendarView.js +1 -1
- package/dist/components/AssignReminders/components/CustomCheckbox.js +1 -1
- package/dist/components/AssignReminders/components/CustomDatePicker.js +1 -1
- package/dist/components/AssignReminders/components/CustomDropdown.js +1 -1
- package/dist/components/AssignReminders/components/LevelData.js +1 -1
- package/dist/components/AssignReminders/components/ReminderFrequencyAutocomplete.js +1 -1
- package/dist/components/AssignReminders/components/ReviewStatus.js +1 -1
- package/dist/components/AssignReminders/styles/AssignLevelsDatePickerStyles.js +1 -1
- package/dist/components/AssignReminders/styles/AssignReminderStyles.js +1 -1
- package/dist/components/AssignReminders/styles/AssignReminderWrapperStyles.js +1 -1
- package/dist/components/AssignReminders/styles/ManageReminder.style.js +1 -1
- package/dist/components/AssignReminders/styles/ReviewStatusStyles.js +1 -1
- package/dist/components/AssignReminders/utils/generateRandomColorsPair.js +1 -1
- package/dist/components/ScopeTree/HighlightedText.js +1 -1
- package/dist/components/ScopeTree/TreeAddAction.js +1 -1
- package/dist/components/ScopeTree/TreeMenu.js +1 -1
- package/dist/components/ScopeTree/TreeNode.js +1 -1
- package/dist/components/ScopeTree/TreeNodeHeader.js +1 -1
- package/dist/components/ScopeTree/TreeSectionItem.js +1 -1
- package/dist/components/ScopeTree/TreeSidebar.js +1 -1
- package/dist/components/ScopeTree/TreeTooltip.js +1 -1
- package/dist/features/lsc-guidelines/LscGuidelines.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineAttachmentIcon.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineCardMenu.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineCart.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineCartHeader.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineCartItem.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineClearCartDialog.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineConfirmDialog.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineEditor.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineEditorPage.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineEmptyState.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineHeader.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineIconButton.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineLandingPage.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineLibrary.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineLibraryCard.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelinePopoverCart.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineProceedButton.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineSavedModal.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineSelectButton.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineTooltip.js +1 -1
- package/dist/features/lsc-guidelines/constants.js +1 -1
- package/dist/features/lsc-guidelines/hooks/useControllableState.js +1 -1
- package/dist/features/lsc-guidelines/hooks/useGuidelineFlow.js +1 -1
- package/dist/features/lsc-guidelines/hooks/useGuidelineSelection.js +1 -1
- package/dist/features/lsc-guidelines/icons/GuidelineSpinner.js +1 -1
- package/dist/features/lsc-guidelines/utils.js +1 -1
- package/dist/utils/treeUtils.js +1 -1
- package/package.json +4 -12
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),t=require("react"),n=require("lucide-react"),r=require("../utils.js"),l=require("./GuidelineIconButton.js"),s=require("./GuidelineCardMenu.js"),a=require("./GuidelineConfirmDialog.js"),o=require("./GuidelineTooltip.js");exports.GuidelineLibraryCard=function(d){var c=this,u=d.guideline,x=d.isSelected,m=d.addToCartLabel,p=d.addedToCartLabel,b=d.onToggle,h=d.onPreview,f=d.onEdit,v=d.onDuplicate,C=d.onDelete,y=d.hideEditOption,_=void 0!==y&&y,g=d.hideDuplicateOption,j=void 0!==g&&g,w=d.hideDeleteOption,D=void 0!==w&&w,N=d.editOptionLabel,F=void 0===N?"Edit":N,k=d.duplicateOptionLabel,G=void 0===k?"Duplicate":k,B=d.deleteOptionLabel,L=void 0===B?"Delete":B,E=d.duplicateConfirmTitle,T=void 0===E?"Duplicate Guideline":E,q=d.duplicateConfirmDescription,O=d.duplicateConfirmLabel,S=void 0===O?"Duplicate":O,M=d.deleteConfirmTitle,P=void 0===M?"Delete Guideline":M,A=d.deleteConfirmDescription,I=d.deleteConfirmLabel,W=void 0===I?"Delete":I,H=d.classNames,R=d.styles,U=d.formatAddedOnLabel,z=r.getGuidelineDescription(u),J=U(u.date),K=t.useRef(null),Q=t.useState(!1),V=Q[0],X=Q[1],Y=t.useState(!1),Z=Y[0],$=Y[1],ee=t.useState(!1),ie=ee[0],te=ee[1],ne=t.useState(!1),re=ne[0],le=ne[1],se=null!=q?q:'Are you sure you want to duplicate "'.concat(u.name,'"? A copy will be created with "(1)" appended to the title.'),ae=null!=A?A:'Are you sure you want to delete "'.concat(u.name,'"? This action cannot be undone.'),oe=s.createGuidelineCardMenuItems({onEdit:function(){null==f||f(u)},onDuplicate:function(){return $(!0)},onDelete:function(){return te(!0)},editLabel:F,duplicateLabel:G,deleteLabel:L,hideEdit:_||!f,hideDuplicate:j||!v,hideDelete:D||!C}),de=oe.some(function(e){return!e.hidden});return i.jsxs(i.Fragment,{children:[i.jsxs("article",e.__assign({className:r.cx("flex min-h-[156px] flex-col rounded-[8px] border border-[#EAECF0] bg-white px-5 py-5 shadow-[0_1px_2px_rgba(16,24,40,0.03)]",null==H?void 0:H.libraryCard),style:null==R?void 0:R.libraryCard},{children:[i.jsxs("div",e.__assign({className:r.cx("flex min-w-0 items-start justify-between gap-4",null==H?void 0:H.libraryCardHeader),style:null==R?void 0:R.libraryCardHeader},{children:[i.jsxs("div",e.__assign({className:"flex min-w-0 items-center gap-2"},{children:[i.jsx(n.BookOpen,{className:r.cx("h-5 w-5 flex-shrink-0 text-[#7C6CFF]",null==H?void 0:H.libraryCardIcon),style:null==R?void 0:R.libraryCardIcon,strokeWidth:2}),i.jsx("h3",e.__assign({className:r.cx("min-w-0 truncate text-[15px] font-semibold leading-5 text-[#1F2937]",null==H?void 0:H.libraryCardTitle),style:null==R?void 0:R.libraryCardTitle,title:u.name},{children:u.name}))]})),i.jsxs("div",e.__assign({className:r.cx("flex flex-shrink-0 items-center gap-2 text-[#64748B]",null==H?void 0:H.libraryCardActions),style:null==R?void 0:R.libraryCardActions},{children:[i.jsx(l.GuidelineIconButton,e.__assign({slot:"libraryCardPreviewButton",label:"Preview ".concat(u.name),title:"Preview",onClick:function(){return h(u)},classNames:H,styles:R},{children:i.jsx(n.Eye,{className:"h-4 w-4",strokeWidth:2.2})})),i.jsxs("div",e.__assign({className:"relative"},{children:[i.jsx(l.GuidelineIconButton,e.__assign({slot:"libraryCardMoreButton",label:"More options for ".concat(u.name),title:"More options",onClick:function(){return de?X(function(e){return!e}):void 0},classNames:H,styles:R,ref:K},{children:i.jsx(n.MoreHorizontal,{className:"h-4 w-4",strokeWidth:2.2})})),de&&i.jsx(s.GuidelineCardMenu,{open:V,onClose:function(){return X(!1)},anchorRef:K,items:oe,classNames:H,styles:R})]})),i.jsx(o.GuidelineTooltip,e.__assign({content:"Saved Guideline",side:"bottom"},{children:i.jsx("span",{children:i.jsx(l.GuidelineIconButton,e.__assign({slot:"libraryCardUserButton",label:"Saved guideline: ".concat(u.name),title:"",onClick:function(){},classNames:H,styles:R},{children:i.jsx(n.UserCheck,{className:"h-4 w-4",strokeWidth:2.2})}))})}))]}))]})),i.jsx("p",e.__assign({className:r.cx("mt-6 line-clamp-2 min-h-[40px] text-[13px] leading-5 text-[#344054]",null==H?void 0:H.libraryCardDescription),style:null==R?void 0:R.libraryCardDescription,title:z},{children:z})),i.jsxs("div",e.__assign({className:r.cx("mt-auto grid grid-cols-[minmax(0,1fr)_minmax(140px,176px)] items-end gap-3 pt-5",null==H?void 0:H.libraryCardFooter),style:null==R?void 0:R.libraryCardFooter},{children:[i.jsx("p",e.__assign({className:r.cx("min-w-0 truncate text-[12px] leading-4 text-[#475467]",null==H?void 0:H.libraryCardDate),style:null==R?void 0:R.libraryCardDate,title:J},{children:J})),i.jsxs("button",e.__assign({type:"button",onClick:function(){return b(u.id)},"aria-pressed":x,className:r.cx("inline-flex h-10 w-full min-w-0 items-center justify-center gap-2 rounded-[6px] border px-4 text-[14px] font-semibold transition-colors",x?"border-transparent bg-[#F3EFFF] text-[#5B2CF4] hover:bg-[#EDE5FF]":"border-[#8B5CF6] bg-white text-[#5B2CF4] hover:bg-[#F8F5FF]",null==H?void 0:H.libraryCardSelectButton),style:null==R?void 0:R.libraryCardSelectButton},{children:[x?i.jsx(n.Check,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2.6}):i.jsx(n.Plus,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2.6}),i.jsx("span",e.__assign({className:"truncate"},{children:x?p:m}))]}))]}))]})),i.jsx(a.GuidelineConfirmDialog,{open:Z,onClose:function(){return $(!1)},onConfirm:function(){return e.__awaiter(c,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:if(!v)return[2];le(!0),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,Promise.resolve(v(u))];case 2:return e.sent(),[3,4];case 3:return le(!1),$(!1),[7];case 4:return[2]}})})},title:T,description:se,confirmLabel:S,loading:re,classNames:H,styles:R}),i.jsx(a.GuidelineConfirmDialog,{open:ie,onClose:function(){return te(!1)},onConfirm:function(){return e.__awaiter(c,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:if(!C)return[2];le(!0),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,Promise.resolve(C(u))];case 2:return e.sent(),[3,4];case 3:return le(!1),te(!1),[7];case 4:return[2]}})})},title:P,description:ae,confirmLabel:W,variant:"danger",loading:re,classNames:H,styles:R})]})};
|
|
2
2
|
//# sourceMappingURL=GuidelineLibraryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("lucide-react"),l=require("../utils.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),t=require("lucide-react"),l=require("../utils.js"),o=require("./GuidelineCartItem.js"),n=require("./GuidelineTooltip.js"),s=require("../constants.js");exports.GuidelinePopoverCart=function(r){var d=r.guidelines,u=r.cartGuidelineIds,p=r.selectedGuidelineIds,a=r.onToggleGuideline,c=r.onPreviewGuideline,v=r.onRemoveGuideline,x=r.onAddGuideline,m=r.onOpenFullView,g=r.debugEnabled,b=void 0!==g&&g,y=r.onDebugChange,h=r.title,f=void 0===h?"Guideline Cart":h,_=r.debugLabel,D=void 0===_?"Debug":_,j=r.addGuidelineLabel,E=void 0===j?"Add guideline":j,N=r.openFullViewLabel,w=void 0===N?"Open full view":N,F=r.emptyTitle,A=void 0===F?"No guideline yet":F,L=r.emptyDescription,C=void 0===L?"Add your first guideline to get started":L,G=r.emptyActionLabel,T=void 0===G?"Add guideline":G,k=r.emptyIcon,I=r.className,B=r.classNames,O=r.styles,q=r.formatAddedOnLabel,P=void 0===q?l.defaultFormatAddedOnLabel:q,S=r.debugTooltipContent,z=void 0===S?s.DEFAULT_GUIDELINE_LABELS.popoverDebugTooltipContent:S,W=u?d.filter(function(e){return u.includes(e.id)}):d.filter(function(e){return p.includes(e.id)});return i.jsxs("section",e.__assign({className:l.cx("flex min-h-[420px] flex-col bg-white p-6",null==B?void 0:B.popoverCart,I),style:null==O?void 0:O.popoverCart},{children:[i.jsxs("div",e.__assign({className:l.cx("flex items-center justify-between gap-4",null==B?void 0:B.popoverHeader),style:null==O?void 0:O.popoverHeader},{children:[i.jsx("h3",e.__assign({className:l.cx("text-[18px] font-semibold leading-7 text-[#5928ED]",null==B?void 0:B.popoverTitle),style:null==O?void 0:O.popoverTitle},{children:f})),i.jsxs("div",e.__assign({className:l.cx("flex shrink-0 items-center gap-3 text-[#5928ED]",null==B?void 0:B.popoverActions),style:null==O?void 0:O.popoverActions},{children:[y&&i.jsxs("div",e.__assign({className:l.cx("flex items-center gap-2",null==B?void 0:B.popoverDebug),style:null==O?void 0:O.popoverDebug},{children:[i.jsx("button",e.__assign({type:"button",role:"switch","aria-checked":b,onClick:function(){return y(!b)},className:l.cx("relative inline-flex h-5 w-9 items-center rounded-full border transition-colors focus:outline-none",b?"border-[#5928ED] bg-[#5928ED]":"border-[#D0D5DD] bg-[#EAECF0]",null==B?void 0:B.popoverDebugSwitch),style:null==O?void 0:O.popoverDebugSwitch},{children:i.jsx("span",{className:l.cx("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",b?"translate-x-4":"translate-x-0.5",null==B?void 0:B.popoverDebugThumb),style:null==O?void 0:O.popoverDebugThumb})})),i.jsx(n.GuidelineTooltip,e.__assign({content:z,side:"bottom",maxWidth:400},{children:i.jsx("span",e.__assign({className:l.cx("text-[14px] leading-5 text-[#667085] cursor-help",null==B?void 0:B.popoverDebugLabel),style:null==O?void 0:O.popoverDebugLabel},{children:D}))}))]})),i.jsx("div",{className:l.cx("h-6 w-px bg-[#D0D5DD]",null==B?void 0:B.popoverDivider),style:null==O?void 0:O.popoverDivider}),i.jsx("button",e.__assign({type:"button",onClick:x,className:l.cx("flex h-7 w-7 items-center justify-center rounded-md text-[#5928ED] transition hover:bg-[#F4F0FF]",null==B?void 0:B.popoverAddButton),style:null==O?void 0:O.popoverAddButton,"aria-label":E,title:E},{children:i.jsx(t.Plus,{size:20,strokeWidth:2.1})})),i.jsx("button",e.__assign({type:"button",onClick:m,className:l.cx("flex h-7 w-7 items-center justify-center rounded-md text-[#5928ED] transition hover:bg-[#F4F0FF]",null==B?void 0:B.popoverOpenButton),style:null==O?void 0:O.popoverOpenButton,"aria-label":w,title:w},{children:i.jsx(t.ExternalLink,{size:18,strokeWidth:2.1})}))]}))]})),i.jsx("div",e.__assign({className:l.cx("mt-6 min-h-[360px] flex-1 space-y-4 overflow-y-auto pr-1",null==B?void 0:B.popoverList),style:null==O?void 0:O.popoverList},{children:0===W.length?i.jsxs("div",e.__assign({className:l.cx("flex h-full min-h-[360px] flex-col items-center justify-center rounded-[8px] bg-[#F9FAFB] px-5 py-6 text-center",null==B?void 0:B.popoverEmptyState),style:null==O?void 0:O.popoverEmptyState},{children:[k&&i.jsx("div",e.__assign({className:l.cx("mb-2 flex h-12 w-12 items-center justify-center rounded-xl bg-[#EDE9FE]",null==B?void 0:B.popoverEmptyIcon),style:null==O?void 0:O.popoverEmptyIcon},{children:k})),i.jsx("p",e.__assign({className:l.cx("text-[14px] font-semibold text-[#1F2937]",null==B?void 0:B.popoverEmptyTitle),style:null==O?void 0:O.popoverEmptyTitle},{children:A})),i.jsx("p",e.__assign({className:l.cx("mt-1 text-[12px] text-[#667085]",null==B?void 0:B.popoverEmptyDescription),style:null==O?void 0:O.popoverEmptyDescription},{children:C})),i.jsxs("button",e.__assign({type:"button",onClick:m,className:l.cx("mt-4 flex items-center gap-1.5 rounded-lg bg-[#5928ED] px-5 py-2 text-sm font-medium text-white transition hover:bg-[#4A1FD6]",null==B?void 0:B.popoverEmptyButton),style:null==O?void 0:O.popoverEmptyButton},{children:[i.jsx(t.Plus,{size:16}),T]}))]})):W.map(function(e){return i.jsx(o.GuidelineCartItem,{guideline:e,isSelected:p.includes(e.id),onToggle:a,onPreview:c,onRemove:v,classNames:B,styles:O,formatAddedOnLabel:P},e.id)})}))]}))};
|
|
2
2
|
//# sourceMappingURL=GuidelinePopoverCart.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),s=require("lucide-react"),n=require("../utils.js"),i=require("../icons/GuidelineSpinner.js");exports.GuidelineProceedButton=function(l){var c=l.label,a=l.disabled,o=l.onClick,u=l.classNames,d=l.styles,x=r.useState(!1),b=x[0],j=x[1],p=r.useRef(0),h=a||b;return t.jsx("button",e.__assign({type:"button",onClick:function(){var e=Date.now();b||e-p.current<2e3||(p.current=e,j(!0),o(),setTimeout(function(){j(!1)},2e3))},disabled:h,className:n.cx("mt-5 flex h-[52px] w-full items-center justify-center gap-2 rounded-[6px] bg-[#5B2CF4] px-4 text-[16px] font-semibold text-white transition-colors hover:bg-[#4C1FE8] disabled:cursor-not-allowed disabled:bg-[#C7B7FF]",null==u?void 0:u.cartProceedButton),style:null==d?void 0:d.cartProceedButton},{children:b?t.jsxs(t.Fragment,{children:[t.jsx(i.GuidelineSpinner,{}),t.jsx("span",e.__assign({className:"truncate"},{children:"Processing..."}))]}):t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({className:"truncate"},{children:c})),t.jsx(s.ArrowRight,{className:n.cx("h-4 w-4 flex-shrink-0",null==u?void 0:u.cartProceedIcon),style:null==d?void 0:d.cartProceedIcon,strokeWidth:2.3})]})}))};
|
|
2
2
|
//# sourceMappingURL=GuidelineProceedButton.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),l=require("react/jsx-runtime"),t=require("react"),a=require("lucide-react"),s=require("../utils.js"),d={title:"Guideline Saved Successfully",description:"Would you like to add it to the current Guideline Cart?",saveOnly:"Save Only",addToCart:"Add To Cart",closeAriaLabel:"Close"};exports.GuidelineSavedModal=function(i){var o=i.open,n=i.onSaveOnly,r=i.onAddToCart,u=i.onClose,c=i.labels,v=i.disableModalButtons,x=void 0!==v&&v,y=i.classNames,g=i.styles,b=e.__assign(e.__assign({},d),c);return t.useEffect(function(){if(o){var e=function(e){"Escape"===e.key&&u()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}},[o,u]),o?l.jsx("div",e.__assign({className:s.cx("fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4",null==y?void 0:y.savedModalOverlay),style:null==g?void 0:g.savedModalOverlay,role:"presentation",onClick:u},{children:l.jsxs("div",e.__assign({role:"dialog","aria-modal":"true","aria-labelledby":"guideline-saved-modal-title",className:s.cx("w-full max-w-[420px] rounded-lg bg-white p-6 shadow-xl",null==y?void 0:y.savedModalDialog),style:null==g?void 0:g.savedModalDialog,onClick:function(e){return e.stopPropagation()}},{children:[l.jsxs("div",e.__assign({className:s.cx("flex items-start justify-between",null==y?void 0:y.savedModalHeader),style:null==g?void 0:g.savedModalHeader},{children:[l.jsx("h2",e.__assign({id:"guideline-saved-modal-title",className:s.cx("text-[18px] font-semibold leading-7 text-[#1F2937]",null==y?void 0:y.savedModalTitle),style:null==g?void 0:g.savedModalTitle},{children:b.title})),l.jsx("button",e.__assign({type:"button",onClick:u,"aria-label":b.closeAriaLabel,className:s.cx("ml-3 inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-gray-400 hover:bg-gray-100 hover:text-gray-600",null==y?void 0:y.savedModalCloseButton),style:null==g?void 0:g.savedModalCloseButton},{children:l.jsx(a.X,{className:"h-4 w-4"})}))]})),l.jsx("p",e.__assign({className:s.cx("mt-2 text-[14px] leading-6 text-[#344054]",null==y?void 0:y.savedModalDescription),style:null==g?void 0:g.savedModalDescription},{children:b.description})),l.jsxs("div",e.__assign({className:s.cx("mt-6 flex justify-end gap-3",null==y?void 0:y.savedModalActions),style:null==g?void 0:g.savedModalActions},{children:[l.jsx("button",e.__assign({type:"button",onClick:n,disabled:x,className:s.cx("h-[40px] rounded-lg border border-gray-300 bg-white px-4 text-[14px] font-medium text-[#111827] transition-colors duration-150 hover:bg-gray-50 disabled:opacity-50",null==y?void 0:y.savedModalSaveButton),style:null==g?void 0:g.savedModalSaveButton},{children:b.saveOnly})),l.jsx("button",e.__assign({type:"button",onClick:r,disabled:x,className:s.cx("h-[40px] rounded-lg bg-violet-700 px-4 text-[14px] font-medium text-white transition-colors duration-150 hover:bg-violet-800 disabled:opacity-50",null==y?void 0:y.savedModalAddButton),style:null==g?void 0:g.savedModalAddButton},{children:b.addToCart}))]}))]}))})):null};
|
|
2
2
|
//# sourceMappingURL=GuidelineSavedModal.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("lucide-react"),i=require("../utils.js");exports.GuidelineSelectButton=function(s){var l=s.isSelected,n=s.onClick,c=s.classNames,u=s.styles;return t.jsx("button",e.__assign({type:"button",onClick:n,"aria-pressed":l,"aria-label":l?"Unselect guideline":"Select guideline",className:i.cx("mt-1 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-[5px] border transition-colors",l?"border-[#5B2CF4] bg-[#5B2CF4] text-white":"border-[#CBD5E1] bg-white text-transparent hover:border-[#8B5CF6]",null==c?void 0:c.cartItemSelectButton),style:null==u?void 0:u.cartItemSelectButton},{children:t.jsx(r.Check,{className:"h-3.5 w-3.5",strokeWidth:3.2})}))};
|
|
2
2
|
//# sourceMappingURL=GuidelineSelectButton.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),r=require("../../../node_modules/@radix-ui/react-tooltip/dist/index.mjs.js");exports.GuidelineTooltip=function(s){var t=s.content,d=s.children,o=s.side,n=void 0===o?"top":o,l=s.maxWidth,a=void 0===l?320:l;return i.jsx(r.Provider,e.__assign({delayDuration:200},{children:i.jsxs(r.Root,{children:[i.jsx(r.Trigger,e.__assign({asChild:!0},{children:d})),i.jsx(r.Portal,{children:i.jsxs(r.Content,e.__assign({side:n,sideOffset:6,style:{maxWidth:a,zIndex:9999,borderRadius:8,backgroundColor:"#1F2937",padding:"8px 12px",fontSize:12,lineHeight:"18px",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.16)"}},{children:[t,i.jsx(r.Arrow,{style:{fill:"#1F2937"},width:10,height:5})]}))})]})}))};
|
|
2
2
|
//# sourceMappingURL=GuidelineTooltip.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.DEFAULT_GUIDELINE_ARTIFACT_TEMPLATE={data:{_id:"",artifactId:"",artifactTitle:"",artifactTitleIDs:[],artifactData:{final_response_gs_url:"",citationsSnapshot:{image_citations:[],appmod_citations:[],audio_citations:[],file_citations:[],web_citations:[],pdf_citations:[],gpt_citations:[]},projectIdSnapshot:"",userStorySnapshot:[],breadCrumbsSnapShot:[],activePageSnapShot:"",aiReasoningsSnapshot:[],dataSources_files:{},knowledgeBaseSnapshot:[],projectAnalyserSummarySnapshot:[],chatHistorySnapshot:[],persistedDataFilesSnapshot:{},risk_gap_items_json:{},selectedCodebasesSnapshot:[],selectedUserStoryTypeSnapshot:""},dataSources_files:{},modeName:"",modeId:null,artifactSubTitle:"",isLoading:!1,widgetName:"user story",userEmail:"",optionalData:{},created_at:"",updated_at:""},counter:{ai_reasoning_id_counter:0,pdf_citation_id_counter:0,section_number:0}},exports.DEFAULT_GUIDELINE_LABELS={landingBreadcrumbLabel:"Agent Guidelines",landingTitle:"Set Your Agent's Guidelines",landingDescription:"Add guidelines that shape how your agent behaves, responds, and interprets.",landingDebugLabel:"Know more about debug mode",landingAddGuidelineLabel:"Add New Guideline",savedTabLabel:"Saved",recentTabLabel:"Recently used",libraryEmptyTitle:"No saved guidelines",libraryEmptyDescription:"Create a new guideline to start building your session rules.",libraryAddToCart:"Add to Cart",libraryAddedToCart:"Added to Cart",libraryShowMore:"Show more guidelines",libraryShowLess:"Show fewer guidelines",cartTitle:"Guideline Cart",cartDescription:"Guidelines added to your current session",emptyCartTitle:"No guidelines added",emptyCartDescription:"Your selected guidelines will appear here.",proceedButton:"Proceed with Selected",addGuidelineLabel:"Add guideline",selectedBadge:e
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.DEFAULT_GUIDELINE_ARTIFACT_TEMPLATE={data:{_id:"",artifactId:"",artifactTitle:"",artifactTitleIDs:[],artifactData:{final_response_gs_url:"",citationsSnapshot:{image_citations:[],appmod_citations:[],audio_citations:[],file_citations:[],web_citations:[],pdf_citations:[],gpt_citations:[]},projectIdSnapshot:"",userStorySnapshot:[],breadCrumbsSnapShot:[],activePageSnapShot:"",aiReasoningsSnapshot:[],dataSources_files:{},knowledgeBaseSnapshot:[],projectAnalyserSummarySnapshot:[],chatHistorySnapshot:[],persistedDataFilesSnapshot:{},risk_gap_items_json:{},selectedCodebasesSnapshot:[],selectedUserStoryTypeSnapshot:""},dataSources_files:{},modeName:"",modeId:null,artifactSubTitle:"",isLoading:!1,widgetName:"user story",userEmail:"",optionalData:{},created_at:"",updated_at:""},counter:{ai_reasoning_id_counter:0,pdf_citation_id_counter:0,section_number:0}},exports.DEFAULT_GUIDELINE_LABELS={landingBreadcrumbLabel:"Agent Guidelines",landingTitle:"Set Your Agent's Guidelines",landingDescription:"Add guidelines that shape how your agent behaves, responds, and interprets.",landingDebugLabel:"Know more about debug mode",landingAddGuidelineLabel:"Add New Guideline",savedTabLabel:"Saved",recentTabLabel:"Recently used",libraryEmptyTitle:"No saved guidelines",libraryEmptyDescription:"Create a new guideline to start building your session rules.",libraryAddToCart:"Add to Cart",libraryAddedToCart:"Added to Cart",libraryShowMore:"Show more guidelines",libraryShowLess:"Show fewer guidelines",cartTitle:"Guideline Cart",cartDescription:"Guidelines added to your current session",emptyCartTitle:"No guidelines added",emptyCartDescription:"Your selected guidelines will appear here.",proceedButton:"Proceed with Selected",addGuidelineLabel:"Add guideline",selectedBadge:function(e){return"".concat(e," Selected")},landingDebugTooltipContent:"Debug Mode is a transparency and control mechanism designed to intercept prompt submissions before they are dispatched to the LLM to help users test and debug with different guidelines rapidly. It serves as an approval gate, allowing users to verify, configure, and approve the guideline payload for a specific query.",popoverDebugTooltipContent:"Debug Mode is a transparency and control mechanism designed to intercept prompt submissions before they are dispatched to the LLM to help users test and debug with different guidelines rapidly. It serves as an approval gate, allowing users to verify, configure, and approve the guideline payload for a specific query."};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useControllableState=function({value
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useControllableState=function(t){var r=t.value,u=t.defaultValue,n=t.onChange,a=e.useState(u),o=a[0],c=a[1],l=void 0!==r,f=l?r:o,s=e.useRef(f);e.useEffect(function(){s.current=f},[f]);var i=e.useCallback(function(e){var t="function"==typeof e?e(s.current):e;s.current=t,l||c(t),null==n||n(t)},[l,n]);return[f,i]};
|
|
2
2
|
//# sourceMappingURL=useControllableState.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useGuidelineFlow=function(t="list")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useGuidelineFlow=function(t){void 0===t&&(t="list");var r=e.useState(t),i=r[0],o=r[1],s=e.useCallback(function(){return o("editor")},[]),u=e.useCallback(function(){return o("list")},[]);return{step:i,setStep:o,openEditor:s,openList:u,isEditorOpen:"editor"===i}};
|
|
2
2
|
//# sourceMappingURL=useGuidelineFlow.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),l=require("./useControllableState.js");exports.useGuidelineSelection=function({guidelines
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react"),l=require("./useControllableState.js");exports.useGuidelineSelection=function(n){var u=n.guidelines,i=n.selectedGuidelineIds,r=n.defaultSelectedGuidelineIds,d=void 0===r?[]:r,s=n.onSelectedGuidelineIdsChange,o=n.onToggleGuideline,a=l.useControllableState({value:i,defaultValue:d,onChange:s}),c=a[0],f=a[1],g=t.useCallback(function(t){f(function(l){var n=l.includes(t)?l.filter(function(e){return e!==t}):e.__spreadArray(e.__spreadArray([],l,!0),[t],!1);return null==o||o(t,n),n})},[o,f]),_=t.useMemo(function(){return u.filter(function(e){return c.includes(e.id)})},[u,c]);return{selectedIds:c,selectedGuidelines:_,selectedCount:_.length,toggleGuideline:g,setSelectedIds:f}};
|
|
2
2
|
//# sourceMappingURL=useGuidelineSelection.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../utils.js");exports.GuidelineSpinner=function({className
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),s=require("../utils.js");exports.GuidelineSpinner=function(i){var t=i.className;return r.jsxs("svg",e.__assign({className:s.cx("h-4 w-4 animate-spin",t),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},{children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}))};
|
|
2
2
|
//# sourceMappingURL=GuidelineSpinner.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./constants.js");exports.createGuidelineId=()
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("./constants.js");exports.createGuidelineId=function(){return"undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():"guideline-".concat(Date.now(),"-").concat(Math.random().toString(16).slice(2))},exports.cx=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")},exports.defaultFormatAddedOnLabel=function(e){if(!e)return"";var t=new Date(e);if(Number.isNaN(t.getTime()))return"";var r=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}),n=t.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"});return"Added on - ".concat(r," | ").concat(n)},exports.getGuidelineDescription=function(e){return(e.summary||e.instruction||"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim()||"No description available"},exports.mergeGuidelineLabels=function(r){return e.__assign(e.__assign({},t.DEFAULT_GUIDELINE_LABELS),r)};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../_virtual/_tslib.js"),e=function(i,t,n){if(void 0===n&&(n=[]),!i)return null;var d=r.__spreadArray(r.__spreadArray([],n,!0),[i.id],!1);if(i.id===t)return d;if(i.children)for(var u=0,a=i.children;u<a.length;u++){var l=a[u],s=e(l,t,d);if(s)return s}return null};exports.findNodePathById=e;
|
|
2
2
|
//# sourceMappingURL=treeUtils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
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};
|
|
2
2
|
//# sourceMappingURL=AssignLevelAccordions.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{__assign as e}from"../../_virtual/_tslib.js";import{jsx as n,jsxs as t}from"react/jsx-runtime";import i from"react";import{PenLine as r,UserRoundCheck as l,Bell as o,InfoIcon as a,User as s,ArrowRight as p,CheckSquare as c,FileCheck as u,Edit2 as d}from"lucide-react";import f from"./AssignLevelAccordions.js";import v from"./components/CustomCheckbox.js";import m from"./assets/FileCheckCorner.js";import{DEFAULT_ASSIGN_REMINDER_STYLES as h}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(m,{})},{label:"Notify",icon:n(o,{size:14})}];function y(r){var l=r.title,o=r.levels,m=void 0===o?[]:o,y=r.requireFinalApproval,A=void 0!==y&&y,x=r.additionalInfo,b=r.setLevels,D=r.setRequireFinalApproval,L=r.fetchUsers,w=r.accessLevelOptions,z=void 0===w?g:w,F=r.customInfoIcon,C=r.onValidationError,I=r.customStyles,W=void 0===I?{}:I,j=r.totalLevels,M=r.finalApprovalDueDate,S=i.useState(!1),T=S[0],q=S[1],E=i.useMemo(function(){return Array.from({length:null!=j?j:3},function(e,n){var t;return null!==(t=m[n])&&void 0!==t?t:{title:"Level ".concat(n+1),headerName:"L ".concat(n+1),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0}})},[m,j]),H=(m.length>0?m:E).filter(function(e){return!e.isHidden});return t("div",e({style:e({padding:"8px",display:"flex",flexDirection:"column",gap:"18px"},W.container)},{children:[t("span",e({style:e(e({},h.header),W.levelsHeader)},{children:[n("span",{children:null!=l?l:"Assignee Levels"}),t("div",e({style:e(e({},h.infoIconWrapper),W.infoIconWrapper),onMouseEnter:function(){return q(!0)},onMouseLeave:function(){return q(!1)}},{children:[null!=F?F:n(a,{width:18,height:18}),n("div",e({style:e(e(e({},h.tooltip),W.tooltip),T?e(e({},h.tooltipVisible),W.tooltipVisible):{})},{children:x||t("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"},W.accordionsContainer)},{children:H.map(function(t,i){return n(f,{level:t,id:String(i),accessLevelOptions:z,fetchUsers:L,onToggleMandatory:function(){return n=i,void(null==b||b(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=m[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==b||b(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==b||b(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==b||b(function(i){return i.map(function(i,r){return r===n?e(e({},i),{title:t}):i})})}(i,n)},finalApprovalDueDate:M},i)})})),t("div",e({style:e(e({},h.finalApprovalBox),W.finalApprovalBox)},{children:[n(v,{getter:A,setter:null!=D?D:function(){}}),t("div",e({style:e({display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400},W.finalApprovalTextWrapper)},{children:[n("span",e({style:e({fontWeight:500},W.finalApprovalTitle)},{children:"Require Final Approval"})),n("span",e({style:W.finalApprovalDesc},{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:e(e({},h.currentApprovalFlow),W.currentApprovalFlow)},{children:[n("span",e({style:e({fontSize:"14px",fontWeight:600},W.currentApprovalFlowTitle)},{children:"Current Approval Flow"})),n("div",e({style:e({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"},W.approvalFlowItemsWrapper)},{children:m.map(function(r,l){var o,a=r.isHidden,f=(null===(o=r.assignees)||void 0===o?void 0:o.map(function(e){return e.name}).join(" / "))||"No users assigned",v=r.title||"Level ".concat(l+1),h=a?n(s,{size:16}):function(e){switch(e){case 0:return n(d,{size:16});case 1:return n(u,{size:16});case 2:return n(s,{size:16});default:return n(c,{size:16})}}(l);return t(i.Fragment,{children:[t("div",e({style:e({display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,color:"#374151"},W.approvalFlowItem),title:v},{children:[h,n("span",{children:f})]})),l<m.length-1&&n(p,{size:16,color:"#9CA3AF"})]},l)})}))]}))]}))}export{y as AssignReminderLevels};
|
|
2
2
|
//# sourceMappingURL=AssignReminderLevels.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../_virtual/_tslib.js";import"react/jsx-runtime";import"react";import"./AssignReminderLevels.js";
|
|
1
|
+
import"../../_virtual/_tslib.js";import"react/jsx-runtime";import"react";import"./AssignReminderLevels.js";var e=[{headerName:"L1",title:"Initial Review",isMandatory:!0,hasDueDate:!0,dueDate:null,assignees:[]},{headerName:"L2",title:"Manager Approval",isMandatory:!1,hasDueDate:!0,dueDate:null,assignees:[]},{headerName:"L3",title:"Final Sign-off",isMandatory:!1,hasDueDate:!1,dueDate:null,assignees:[]}];export{e as INITIAL_LEVELS};
|
|
2
2
|
//# sourceMappingURL=AssignReminderTest.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__assign as e,__spreadArray as i}from"../../_virtual/_tslib.js";import{jsxs as r,jsx as n,Fragment as t}from"react/jsx-runtime";import{Bell as a,ClipboardList as o,X as l,CircleAlert as s}from"lucide-react";import d,{useState as c,useEffect as u}from"react";import{AssignReminderLevels as m}from"./AssignReminderLevels.js";import{INITIAL_LEVELS as v}from"./AssignReminderTest.js";import p from"./components/ReviewStatus.js";import f from"./components/CustomDatePicker.js";import{ManageReminders as y}from"./ManageReminders.js";import{DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES as b}from"./styles/AssignReminderWrapperStyles.js";var h=[{tabName:"Assignees & Approvers",tabIcon:r("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(o,{size:15})}],D=[{id:1,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}},{id:2,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}},{id:3,name:"",email:"",reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}}];function _(a){var o,_,g,w=a.metadata,R=void 0===w?{}:w,A=a.reviewData,T=void 0===A?{}:A,S=a.levels,L=a.setLevels,C=a.requireFinalApproval,q=a.setRequireFinalApproval,B=a.approvalDueDate,x=a.setApprovalDueDate,F=a.onClose,N=a.fetchUsers,O=a.onSave,k=a.onValidationError,M=a.totalLevels,I=a.customStyles,j=void 0===I?{}:I,H=a.isSaving,P=void 0!==H&&H,E=a.onRequireFinalApproval,W=a.isOwner,z=void 0===W||W;a.remindersData;var U,V=a.remainderOwners,Y=a.setRemainderOwners,G=a.schedules,J=a.setSchedules,K=a.handelSendNow,Q=a.showPreviewEmail,X=a.tabName,Z=a.reminderLabels,$=a.reminderColors,ee=a.reminderChipColor,ie=a.reminderAssignees,re=a.reminderFallbackRecipients,ne=a.reminderRecipientsColor,te=a.manualReminderTitle,ae=a.manualReminderDescription,oe=a.lastReminderText,le=a.selectRecipientsLabel,se=a.previewEmailButtonLabel,de=a.sendNowButtonLabel,ce=a.reminderSuccessTitle,ue=a.reminderSuccessDescription,me=a.escalationTitle,ve=a.escalationTitleTooltip,pe=a.escalationDescription,fe=a.configureAutoReminderText,ye=a.getDynamicStatement,be=a.reminderStartDateLabel,he=a.documentDueDateLabel,De=a.reminderFrequencyLabel,_e=a.escalationRemindersLabel,ge=a.escalationTooltip,we=a.escalationConditionText,Re=a.daysText,Ae=a.dueDataAndRepeatText,Te=a.reminderFrequencyOptions,Se=a.escalationFrequencyOptions,Le=a.beforeAfterOptions,Ce=(null===(o=R.tabData)||void 0===o?void 0:o.length)?R.tabData:h,qe=z?Ce:Ce.filter(function(e,i){return 0!==i}),Be=c(null!==(g=null===(_=qe[0])||void 0===_?void 0:_.tabName)&&void 0!==g?g:""),xe=Be[0],Fe=Be[1],Ne=(U=xe.toLowerCase()).includes("reminder")?"reminders":U.includes("review")?"review":"assignees",Oe=c(S||v),ke=Oe[0],Me=Oe[1],Ie=c(C||!1),je=Ie[0],He=Ie[1],Pe=c(B||null),Ee=Pe[0],We=Pe[1],ze=c(null),Ue=ze[0],Ve=ze[1],Ye=c([]),Ge=Ye[0],Je=Ye[1],Ke=c(V||D),Qe=Ke[0],Xe=Ke[1],Ze=void 0!==G?G:Ge,$e=void 0!==J?J:Je,ei=void 0!==V?V:Qe,ii=d.useMemo(function(){return{due_at:Ee?Ee.toISOString():"",assignee:ke.filter(function(e){return!e.isHidden}).flatMap(function(e){return e.assignees||[]}).reduce(function(i,r,n){var t;return e(e({},i),((t={})[n]=r,t))},{})}},[Ee,ke]);u(function(){void 0!==V&&Xe(V)},[V]),u(function(){E&&E().then(function(e){Array.isArray(e)&&e.length>0?Ve(e[0]):e&&!Array.isArray(e)&&Ve(e)}).catch(function(e){return console.error("Failed to fetch user:",e)})},[]),u(function(){X&&Fe(X)},[X]),u(function(){var e,i;qe.some(function(e){return e.tabName===xe})||Fe(null!==(i=null===(e=qe[0])||void 0===e?void 0:e.tabName)&&void 0!==i?i:"")},[qe,xe]),u(function(){S&&Me(function(e){var r=e.find(function(e){return e.isHidden});return r?i(i([],S,!0),[r],!1):S})},[S]),u(function(){void 0!==C&&He(C)},[C]),u(function(){void 0!==B&&We(B)},[B]),u(function(){Me(function(e){var r=e.filter(function(e){return!e.isHidden});if(je){var n={headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==Ue?void 0:Ue.id)||"me",email:(null==Ue?void 0:Ue.email)||"",name:(null==Ue?void 0:Ue.name)?"".concat(Ue.name," (You)"):"Username (You)",accessLevel:"Approve"}]};return i(i([],r,!0),[n],!1)}return r})},[je,Ue]),u(function(){var e=ke.flatMap(function(e){return e.assignees||[]}).filter(function(e){return e.email});Xe(function(i){var r=i.length===e.length&&e.every(function(e,r){var n;return(null===(n=i[r])||void 0===n?void 0:n.email)===e.email});return r?i:e.map(function(e,r){var n=i.find(function(i){return i.email===e.email});return n||{id:r+1,name:e.name,email:e.email,reminder_start_date:"",reminder_frequency:{type:"preset",value:""},is_escalation_reminder:!1,days:{type:"preset",value:""},before_or_after:"",escalation_reminder_frequency:{type:"preset",value:""}}})})},[ke]);var ri=R.wrapperTitle||"Assign Redline and Manage Reminders",ni=R.wrapperSubTitle||"Sec 4.1 - Technical Security Information",ti=R.wrapperPriority||"High",ai=R.wrapperPriorityStyles||{backgroundColor:"#DC262618",color:"#DC2626",border:"1px solid #DC262640"};return n("div",e({style:e(e({},b.overlay),j.overlay)},{children:r("div",e({style:e(e(e(e({},b.modal),{transition:"width 0.3s ease, max-width 0.3s ease"}),"reminders"===Ne?{width:"1400px",maxWidth:"95vw"}:{}),j.modal)},{children:[r("div",e({style:e(e({},b.header),j.header)},{children:[r("div",e({style:e(e({},b.headerLeft),j.headerLeft)},{children:[n("span",e({style:e(e({},b.modalTitle),j.modalTitle)},{children:ri})),r("div",e({style:e(e({},b.redlineRow),j.redlineRow)},{children:[n("span",e({style:e(e({},b.redlineName),j.redlineName)},{children:ni})),n("span",e({style:e(e(e({},b.redlineBadge),ai),j.redlineBadge)},{children:ti}))]}))]})),n("button",e({style:e(e({},b.closeBtn),j.closeBtn),onClick:F},{children:n(l,{size:20,color:"#6B7280"})}))]})),n("div",e({style:e(e({},b.tabBar),j.tabBar)},{children:qe.map(function(i){var n=xe===i.tabName;return r("button",e({style:e(e(e({},b.tab),j.tab),n?e(e({},b.tabActive),j.tabActive):{}),onClick:function(){return Fe(i.tabName)}},{children:[i.tabIcon," ",i.tabName]}),i.tabName)})})),r("div",e({style:e(e({},b.body),j.body)},{children:["assignees"===Ne&&r(t,{children:[!1!==R.showFinalApprovalDueDate&&r("div",e({style:e(e({},b.dueDateBar),j.dueDateBar)},{children:[r("span",e({style:e(e({},b.dueDateLabel),j.dueDateLabel)},{children:["Final Approval due date"," ",n("sup",e({style:{color:"#DC2626",marginLeft:2}},{children:"*"}))]})),n("div",e({style:e(e({},b.dueDateInputWrap),j.dueDateInputWrap)},{children:n(f,{value:Ee?Ee.toISOString().slice(0,10):"",onChange:We})})),r("span",e({style:e(e({},b.requiredToProceeed),j.requiredToProceeed)},{children:[n(s,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),n(m,{levels:ke,totalLevels:M,requireFinalApproval:je,setLevels:Me,setRequireFinalApproval:function(e){He(e)},fetchUsers:N,onValidationError:k,customStyles:j,finalApprovalDueDate:Ee})]}),"reminders"===Ne&&n(y,e({data:ii,schedules:Ze,setSchedules:$e,remainderOwners:ei,setRemainderOwners:function(e){var i="function"==typeof e?e(ei):e;Y?Y(i):Xe(i)},handelSendNow:function(e,i){K&&K(e||Ze,i||ei)},showPreviewEmail:null!=Q&&Q},void 0!==Z&&{labels:Z},void 0!==$&&{colors:$},void 0!==ee&&{chipColor:ee},void 0!==ie&&{assignees:ie},void 0!==re&&{fallbackRecipients:re},void 0!==ne&&{recipientsColor:ne},void 0!==te&&{manualReminderTitle:te},void 0!==ae&&{manualReminderDescription:ae},void 0!==oe&&{lastReminderText:oe},void 0!==le&&{selectRecipientsLabel:le},void 0!==se&&{previewEmailButtonLabel:se},void 0!==de&&{sendNowButtonLabel:de},void 0!==ce&&{reminderSuccessTitle:ce},void 0!==ue&&{reminderSuccessDescription:ue},void 0!==me&&{escalationTitle:me},void 0!==ve&&{escalationTitleTooltip:ve},void 0!==pe&&{escalationDescription:pe},void 0!==fe&&{configureAutoReminderText:fe},void 0!==ye&&{getDynamicStatement:ye},void 0!==be&&{reminderStartDateLabel:be},void 0!==he&&{documentDueDateLabel:he},void 0!==De&&{reminderFrequencyLabel:De},void 0!==_e&&{escalationRemindersLabel:_e},void 0!==ge&&{escalationTooltip:ge},void 0!==we&&{escalationConditionText:we},void 0!==Re&&{daysText:Re},void 0!==Ae&&{dueDataAndRepeatText:Ae},void 0!==Te&&{reminderFrequencyOptions:Te},void 0!==Se&&{escalationFrequencyOptions:Se},void 0!==Le&&{beforeAfterOptions:Le})),"review"===Ne&&n(p,{levels:ke,reviewData:T})]})),r("div",e({style:e(e({},b.footer),j.footer)},{children:[n("button",e({style:e(e(e({},b.clearBtn),j.clearBtn),P?j.actionBtnDisabled:{}),onClick:function(){Me(v.map(function(i){return e(e({},i),{assignees:[],dueDate:null})})),He(!1),We(null)},disabled:P},{children:"Clear"})),n("button",e({style:e(e(e({},b.saveBtn),j.saveBtn),P?j.actionBtnDisabled:{}),onClick:function(){var e=ke.filter(function(e){return!e.isHidden});null==L||L(e),null==q||q(je),null==x||x(Ee),null==O||O({levels:e,requireFinalApproval:je,finalApprovalDueDate:Ee,activeTab:Ne,schedules:Ze,remainderOwners:ei})},disabled:P},{children:"Save Changes"}))]}))]}))}))}export{_ as AssignReminderWrapper};
|
|
2
2
|
//# sourceMappingURL=AssignReminderWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as t,useEffect as n}from"react";import{Send as s,ChevronDown as r,CircleCheckBigIcon as a,Mail as l,InfoIcon as o,ArrowRight as d,CalendarIcon as c,ChevronRight as m,ChevronLeft as u}from"lucide-react";import g from"@mui/material/Checkbox";import{Chip as h,Box as v,Autocomplete as b,TextField as y}from"@mui/material";import{useDragControls as p,AnimatePresence as O,motion as j,Reorder as f}from"framer-motion";import x from"@mui/icons-material/DragIndicator";import{LocalizationProvider as C,DatePicker as F}from"@mui/x-date-pickers";import{AdapterDayjs as k}from"@mui/x-date-pickers/AdapterDayjs";import D from"./components/ReminderFrequencyAutocomplete.js";import w from"./components/AssigneeCalendarView.js";import R from"dayjs";import{styles as E}from"./styles/ManageReminder.style.js";const S=["Assignee 1","Assignee 2","Assignee 3"],_=[{bg:"#FDF2FA",text:"#C11574"},{bg:"#EEF4FF",text:"#3538CD"},{bg:"#F1F5F9",text:"#344054"}],I=[{bg:"#FDF2FA",text:"#C93185"},{bg:"#EEF2FF",text:"#6366F1"},{bg:"#FFF4E5",text:"#FF6058"}],A=[{id:"1",name:"Assignee 1",color:"#C11574",bg:"#FDF2F8",startDate:new Date("2026-11-09"),dueDate:new Date("2026-12-01")},{id:"2",name:"Assignee 2",color:"#3538CD",bg:"#EEF4FF",startDate:new Date("2026-11-21"),dueDate:new Date("2026-12-03")},{id:"3",name:"Assignee 3",color:"#FF6058",bg:"#FFF7ED",startDate:new Date("2026-12-01"),dueDate:new Date("2026-12-03")}],B=[{bg:"#DBEAFE",text:"#1E40AF"},{bg:"#CCFBF1",text:"#0D9488"},{bg:"#DCFCE7",text:"#166534"}],T=[{initials:"OR",name:"Olivia Rhye",checked:!1,bg:"#DBEAFE",text:"#1D4ED8"},{initials:"DM",name:"Daniela Mark",checked:!1,bg:"#CFFAFE",text:"#0F766E"},{initials:"JB",name:"Jenna Beckner",checked:!1,bg:"#D1FAE5",text:"#059669"}],L=e=>{var i,t,n,s,r,a,l,o;return(null==e?void 0:e.is_escalation_reminder)&&(null===(i=null==e?void 0:e.days)||void 0===i?void 0:i.value)&&"undefined"!==(null===(t=null==e?void 0:e.days)||void 0===t?void 0:t.value)&&(null===(n=null==e?void 0:e.escalation_reminder_frequency)||void 0===n?void 0:n.value)&&"undefined"!==(null===(s=null==e?void 0:e.escalation_reminder_frequency)||void 0===s?void 0:s.value)?`Start notifying ${(null===(r=null==e?void 0:e.days)||void 0===r?void 0:r.value.includes("day"))?null===(a=null==e?void 0:e.days)||void 0===a?void 0:a.value:`${null===(l=null==e?void 0:e.days)||void 0===l?void 0:l.value} ${1===Number(null===(o=null==e?void 0:e.days)||void 0===o?void 0:o.value)?"day":"days"}`} ${null==e?void 0:e.before_or_after} the due date`:"Notify until successful document upload"},P={"& .MuiInputBase-root":{height:"28px",borderRadius:"4px",fontSize:"11px"}},M=({data:M,schedules:q,setSchedules:Y,remainderOwners:N,setRemainderOwners:H,labels:z=S,colors:W=_,chipColor:G=I,assignees:$=A,fallbackRecipients:V=T,recipientsColor:U=B,manualReminderTitle:J="Send Manual Reminder Now",manualReminderDescription:Z="Immediately notify the assignees about this document.",lastReminderText:K="Last manual reminder sent - 08/14/2026, 12:12AM",selectRecipientsLabel:Q="Select recipients:",previewEmailButtonLabel:X="Preview Email",sendNowButtonLabel:ee="Send Now",reminderSuccessTitle:ie="Reminder sent successfully!",reminderSuccessDescription:te="Email notification sent to 2 assignees.",escalationTitle:ne="Escalation and Auto Reminder Setup",escalationTitleTooltip:se={heading:"How it works:",summary:"Configure when reminders should start and how often they are sent for each assignee."},escalationDescription:re="Configure Auto reminder settings for all assignees.",configureAutoReminderText:ae="Configure Auto reminder settings for all assignees.",getDynamicStatement:le=L,reminderStartDateLabel:oe="Reminder Start Date",documentDueDateLabel:de="Document Due Date",reminderFrequencyLabel:ce="Reminder Frequency",escalationRemindersLabel:me="Escalation Reminders",escalationTooltip:ue={heading:"How it works:",summary:"Choose when escalation reminders should start and how often they should be sent until the document gets uploaded."},escalationConditionText:ge="If the document is still pending, start escalation reminders",daysText:he="days",dueDataAndRepeatText:ve="due date and repeat every",reminderFrequencyOptions:be=["12 hours","24 hours","48 hours","72 hours","Custom"],escalationFrequencyOptions:ye=["1/2 hour","1 hour","4 hours","6 hours","12 hours","Custom"],beforeAfterOptions:pe=["After","Before"],handelSendNow:Oe,showPreviewEmail:je=!0})=>{const[fe,xe]=t(!1),[Ce,Fe]=t(!1),[ke,De]=t(!1),[we,Re]=t(!0),[Ee,Se]=t(V),_e=p(),Ie=(e,i,t)=>{H(n=>n.map((n,s)=>s===e?Object.assign(Object.assign({},n),{[i]:t}):n))},Ae=(e,i)=>{Ie(e,"reminder_start_date",i)},Be=e=>{var i;if(!e)return null;if("custom"===e.type)return Number(e.value)<=0?null:60*Number(e.value)*60*1e3;return null!==(i={"1/2 hour":18e5,"1 hour":36e5,"4 hours":144e5,"6 hours":216e5,"12 hours":432e5,"24 hours":864e5,"48 hours":1728e5,"72 hours":2592e5,"96 hours":3456e5,"1/2 day":432e5,"1 day":864e5,"2 days":1728e5,"3 days":2592e5,"4 days":3456e5}[e.value])&&void 0!==i?i:null},Te=(e,i,t)=>{if(!e||!t)return[];const n=Be(t);if(!n||n<=0)return[];const s=[];let r=R(e).valueOf();const a=i?R(i).valueOf():R(e).add(45,"day").valueOf();let l=0;for(;r<=a&&l<150;)s.push(R(r).toISOString()),r+=n,l++;return s},Le=(e,i,t,n)=>{if(!(e&&i&&n&&t))return[];const s=Be(n);if(!s)return[];const r=R(e),a="custom"===i.type?Number(i.value):Number("1/2"===i.value.split(" ")[0]?.5:Number(i.value.split(" ")[0])),l=[];let o;switch(t){case"Before":o=r.subtract(a,"day");break;case"After":o=r.add(a,"day");break;default:return[]}let d=o.valueOf();for(let e=0;e<150;e++)l.push(R(d).toISOString()),d+=s;return l},Pe=e=>e?e.split(" ").map(e=>e[0]).join("").toUpperCase():"";n(()=>{const e=(null==M?void 0:M.due_at)||"",i=Object.values((null==M?void 0:M.assignee)||{}),t=null==N?void 0:N.map((t,n)=>{var s;const r=i[n]||$.find(e=>e.id===String(t.id)),a=(null===(s=null==W?void 0:W[n%W.length])||void 0===s?void 0:s.text)||"#C11574";return{ownerId:t.id||n+1,ownerName:(null==r?void 0:r.name)||t.name,ownerColor:(null==r?void 0:r.color)||a,reminders:Te(t.reminder_start_date,e,t.reminder_frequency),escalations:Le(e,t.days,t.before_or_after,t.escalation_reminder_frequency)}});Y(t)},[N,null==M?void 0:M.due_at,null==M?void 0:M.assignee]),n(()=>{(null==M?void 0:M.assignee)&&Se(e=>{const i=Object.values(M.assignee).filter(e=>e&&Object.keys(e).length>0).map((i,t)=>{const n=e.find(e=>e.name===i.name);return{name:i.name,checked:!!n&&n.checked,recipientsColor:(null==U?void 0:U[t])||B[t%B.length]}});return i.length>0?i:V})},[null==M?void 0:M.assignee,null==M?void 0:M.due_at]);const Me=Object.values((null==M?void 0:M.assignee)||{}).filter(e=>null==e?void 0:e.name);return e("div",Object.assign({style:Object.assign(Object.assign({},E.mrContainer),{width:"100%",minWidth:"850px"})},{children:[e("div",Object.assign({style:E.mrSectionBox},{children:[e("div",Object.assign({style:Object.assign(Object.assign({},E.mrSectionHeader),{cursor:"pointer"}),onClick:()=>xe(e=>!e)},{children:[e("div",Object.assign({style:E.mrSectionHeaderContent},{children:[e("div",Object.assign({style:E.mrSectionHeaderLeft},{children:[e("div",Object.assign({style:E.mrSectionTitleWrapper},{children:[i("div",Object.assign({style:E.mrSectionTitleIcon},{children:i(s,{style:E.mrIconSmall})})),i("div",Object.assign({style:E.mrSectionTitle},{children:J}))]})),i("div",Object.assign({style:E.mrSectionDescription},{children:Z}))]})),i("div",Object.assign({style:E.mrSectionHeaderRight},{children:i("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),xe(e=>!e)},style:E.mrChevronButton},{children:i(r,{style:Object.assign(Object.assign({},E.mrChevronIcon),fe?E.mrChevronRotated:{})})}))}))]})),i(O,{children:ke&&e(j.div,Object.assign({initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},style:E.mrSuccessMessage},{children:[i("div",Object.assign({style:E.mrSuccessIcon},{children:i("div",Object.assign({style:E.mrSuccessIconInner},{children:i(a,{style:E.mrIconSuccess})}))})),e("div",Object.assign({style:E.mrSuccessText},{children:[i("div",Object.assign({style:E.mrSuccessTitle},{children:ie})),i("div",Object.assign({style:E.mrSuccessDescription},{children:te}))]}))]}))})]})),i(O,{children:fe&&e(j.div,Object.assign({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:Object.assign(Object.assign({},E.mrHiddenSection),{pointerEvents:fe?"auto":"none"})},{children:[e("div",Object.assign({style:E.mrRecipientsSection},{children:[i("div",Object.assign({style:E.mrRecipientsLabel},{children:Q})),i("div",Object.assign({style:E.mrRecipientsGrid},{children:Ee.map((t,n)=>{var s,r,a,l;const o=(null===(s=null==t?void 0:t.recipientsColor)||void 0===s?void 0:s.bg)||(null==t?void 0:t.bg)||(null===(r=B[n%B.length])||void 0===r?void 0:r.bg)||"#DBEAFE",d=(null===(a=null==t?void 0:t.recipientsColor)||void 0===a?void 0:a.text)||(null==t?void 0:t.text)||(null===(l=B[n%B.length])||void 0===l?void 0:l.text)||"#1E40AF";return e("div",Object.assign({style:E.mrRecipientItem},{children:[i(g,{checked:t.checked,onChange:()=>{return e=t.name,void Se(i=>i.map(i=>i.name===e?Object.assign(Object.assign({},i),{checked:!i.checked}):i));var e},onClick:e=>e.stopPropagation(),size:"small",disableRipple:!0,icon:i("div",{style:E.mrCheckboxUnchecked}),checkedIcon:i("div",Object.assign({style:E.mrCheckboxChecked},{children:i("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:E.mrCheckboxIcon},{children:i("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),e("div",Object.assign({style:E.mrRecipientInfo},{children:[i("div",Object.assign({style:Object.assign(Object.assign({},E.mrRecipientAvatar),{backgroundColor:o,color:d})},{children:Pe(t.name)})),i("div",Object.assign({style:E.mrRecipientName},{children:t.name}))]}))]}),t.name)})}))]})),e("div",Object.assign({style:E.mrActionsSection},{children:[je&&e("button",Object.assign({onClick:e=>{e.stopPropagation()},type:"button",style:Object.assign(Object.assign({},E.mrActionButton),E.mrActionButtonSecondary)},{children:[i(l,{style:E.mrIconAction}),X]})),i("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),De(!0),setTimeout(()=>De(!1),3e3);const i=Ee.filter(e=>e.checked);Oe(q,N.filter(e=>i.some(i=>i.id===e.id)))},style:Object.assign(Object.assign({},E.mrActionButton),E.mrActionButtonPrimary)},{children:ee}))]}))]}))})]})),e("div",Object.assign({style:E.mrMainContent},{children:[e("div",Object.assign({style:E.mrEscalationContainer},{children:[e("div",Object.assign({style:E.mrEscalationHeaderWrapper,onClick:e=>{e.stopPropagation(),Fe(e=>!e)}},{children:[e("div",Object.assign({style:E.mrEscalationHeader},{children:[e("div",Object.assign({style:E.mrEscalationTitleWrapper},{children:[i("div",Object.assign({style:E.mrEscalationTitleText},{children:ne})),i("div",Object.assign({style:E.mrTooltipIcon},{children:i(o,{stroke:"#64748B",style:E.mrIconInfo})}))]})),e("div",Object.assign({style:E.mrEscalationActions},{children:[je&&e("button",Object.assign({style:E.mrEscalationPreviewButton},{children:[i("div",Object.assign({style:E.mrEscalationPreviewIcon},{children:i(l,{style:E.mrIconPreview})})),i("span",Object.assign({style:E.mrEscalationPreviewText},{children:X}))]})),i("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),Fe(e=>!e)},style:E.mrChevronButton},{children:i(r,{style:Object.assign(Object.assign({},E.mrChevronIcon),Ce?E.mrChevronRotated:{})})}))]}))]})),i("div",Object.assign({style:E.mrEscalationDescription},{children:re}))]})),i(O,Object.assign({initial:!1},{children:Ce&&i(j.div,Object.assign({layout:!0,initial:{opacity:0,scaleY:.96},animate:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.96},transition:{duration:.3,ease:"easeInOut"},style:{transformOrigin:"top",overflow:"hidden"}},{children:i(f.Group,Object.assign({axis:"y",values:N||[],onReorder:e=>{H(e)},layoutScroll:!0,style:E.mrReorderGroup},{children:null==N?void 0:N.map((t,n)=>{var s,a,l,c;const m=Me[n]||V[n],u=(null===(s=null==W?void 0:W[n])||void 0===s?void 0:s.bg)||"#FDF2FA",p=(null===(a=null==W?void 0:W[n])||void 0===a?void 0:a.text)||"#C11574",w=(null===(l=null==G?void 0:G[n])||void 0===l?void 0:l.bg)||"transparent",S=(null===(c=null==G?void 0:G[n])||void 0===c?void 0:c.text)||"inherit";return i(f.Item,Object.assign({value:t,dragControls:_e,layout:"position"},{children:e("div",Object.assign({style:E.mrReminderItem},{children:[i("div",Object.assign({style:E.mrReminderLabelBox},{children:i("div",Object.assign({style:E.mrReminderLabelInner},{children:i(h,{label:(null==z?void 0:z[n])||`Assignee ${n+1}`,sx:{backgroundColor:u,minWidth:90,color:p,fontWeight:500}})}))})),e("div",Object.assign({style:E.mrReminderContent},{children:[i("div",Object.assign({style:E.mrDragHandle},{children:i(x,{onPointerDown:e=>_e.start(e),sx:{color:"#9e9e9e"}})})),i(v,Object.assign({display:"flex",alignItems:"center",gap:2,border:"1px solid #E5E7EB",sx:{background:"#fff"},style:E.mrReminderBox},{children:e("div",Object.assign({style:E.mrReminderFields},{children:[e("div",Object.assign({style:E.mrReminderHeader},{children:[e("div",Object.assign({style:E.mrReminderAssignee},{children:[i("div",Object.assign({style:E.mrReminderAvatar},{children:i("span",Object.assign({style:E.mrReminderInitials},{children:Pe(null==m?void 0:m.name)}))})),i("span",Object.assign({style:E.mrReminderName},{children:null==m?void 0:m.name}))]})),i("div",Object.assign({style:Object.assign(Object.assign({},E.mrReminderStatement),{backgroundColor:w})},{children:i("span",Object.assign({style:Object.assign(Object.assign({},E.mrReminderStatementText),{color:S})},{children:le(t)}))}))]})),e("div",Object.assign({style:E.mrReminderDateFields},{children:[e("div",Object.assign({style:E.mrReminderField},{children:[i("p",Object.assign({style:E.mrReminderFieldLabel},{children:oe})),e("div",Object.assign({style:E.mrReminderDatePicker},{children:[i(C,Object.assign({dateAdapter:k},{children:i(F,{value:t.reminder_start_date?R(t.reminder_start_date):null,disablePast:!0,format:"MM/DD/YYYY",onChange:e=>{if(e&&R(e).isValid()){if(R(e).isBefore(R(),"day"))return;Ae(n,R(e).toISOString())}else Ae(n,"")},slotProps:{actionBar:{actions:["clear"]},textField:{fullWidth:!0,size:"small",sx:P,placeholder:"MM/DD/YYYY"},openPickerButton:{id:"trial-start-date-picker-icon","data-testid":"trial-start-date-picker-icon",size:"small"},openPickerIcon:{sx:{fontSize:"14px"}}}})})),i(d,{style:E.mrIconArrow})]}))]})),e("div",Object.assign({style:E.mrReminderField},{children:[i("p",Object.assign({style:E.mrReminderFieldLabel},{children:de})),i("div",Object.assign({style:E.mrReminderDueDate},{children:(null==M?void 0:M.due_at)?R(M.due_at).format("MM/DD/YYYY"):""}))]})),e("div",Object.assign({style:E.mrReminderField},{children:[i("p",Object.assign({style:E.mrReminderFieldLabel},{children:ce})),e("div",Object.assign({style:E.mrReminderFrequency},{children:[i("span",Object.assign({style:E.mrReminderFrequencyText},{children:"Every"})),i(D,{value:t.reminder_frequency,onChange:e=>((e,i)=>{Ie(e,"reminder_frequency",i)})(n,e),options:be,suffix:"hours"})]}))]}))]})),e("div",Object.assign({style:E.mrEscalationCheckbox},{children:[e("div",Object.assign({style:E.mrEscalationCheckboxHeader},{children:[i(g,{size:"small",disableRipple:!0,checked:t.is_escalation_reminder,onChange:e=>((e,i)=>{Ie(e,"is_escalation_reminder",i),i||(Ie(e,"days",{type:"preset",value:""}),Ie(e,"escalation_reminder_frequency",{type:"preset",value:""}),Ie(e,"before_or_after",""))})(n,e.target.checked),icon:i("div",{style:E.mrCheckboxUnchecked}),checkedIcon:i("div",Object.assign({style:E.mrCheckboxChecked},{children:i("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:E.mrCheckboxIcon},{children:i("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),me,i("div",Object.assign({style:E.mrTooltipIcon},{children:i(o,{stroke:"#64748B",style:E.mrIconInfo})}))]})),i(O,{children:t.is_escalation_reminder&&e(j.div,Object.assign({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:E.mrEscalationContent},{children:[i("div",Object.assign({style:E.mrEscalationCondition},{children:ge})),e("div",Object.assign({style:E.mrEscalationFields},{children:[e("div",Object.assign({style:E.mrEscalationFieldGroup},{children:[i(D,{value:t.days,onChange:e=>((e,i)=>{Ie(e,"days",i)})(n,e)}),i("div",Object.assign({style:E.mrEscalationFieldText},{children:he}))]})),e("div",Object.assign({style:Object.assign(Object.assign({},E.mrEscalationFieldGroup),E.mrEscalationFieldGroupLarge)},{children:[i(b,{size:"small",options:pe,value:t.before_or_after,onChange:(e,i)=>((e,i)=>{Ie(e,"before_or_after",i)})(n,i||""),popupIcon:i(r,{style:E.mrIconDropdown}),slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"12px",minHeight:"32px"}}},clearIndicator:{sx:{"& svg":{fontSize:12}}}},renderInput:e=>i(y,Object.assign({},e,{placeholder:"Select value",sx:P})),sx:{width:"100%"}}),i("div",Object.assign({style:E.mrEscalationFieldText},{children:ve}))]})),i("div",Object.assign({style:E.mrEscalationFieldGroupSmall},{children:i(D,{value:t.escalation_reminder_frequency,onChange:e=>((e,i)=>{Ie(e,"escalation_reminder_frequency",i)})(n,e),options:ye,suffix:"hours"})}))]}))]}))})]}))]}))}))]}))]}))}),t.id||n)})}))}))}))]})),Ce&&e(j.div,Object.assign({initial:{width:we?"345px":"43px"},animate:{width:we?"345px":"43px"},transition:{duration:.3},style:E.mrCalendarPanel},{children:[we?i(w,{assignees:q}):i("div",Object.assign({style:E.mrCalendarCollapsed},{children:i(c,{style:E.mrIconCalendar})})),e("button",Object.assign({onClick:()=>Re(e=>!e),style:E.mrCalendarToggle},{children:[i("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"19",height:"50",viewBox:"0 0 19 50",fill:"none"},{children:i("path",{d:"M3.94434 9.65137C1.79601 11.031 0.49707 13.4087 0.49707 15.9619V35.1436C0.49707 37.8496 1.95476 40.346 4.31152 41.6758L17.5469 49.1426V0.915039L3.94434 9.65137Z",fill:"white",stroke:"#E0E0E0"})})),i(we?m:u,{style:E.mrIconChevronToggle})]}))]}))]}))]}))};export{M as ManageReminders};
|
|
1
|
+
import{__assign as e}from"../../_virtual/_tslib.js";import{jsxs as i,jsx as n}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{Send as o,ChevronDown as l,CircleCheckBigIcon as d,Mail as a,InfoIcon as s,ArrowRight as c,CalendarIcon as u,ChevronRight as m,ChevronLeft as v}from"lucide-react";import h from"@mui/material/Checkbox";import{Chip as y,Box as p,Autocomplete as f,TextField as g}from"@mui/material";import{useDragControls as b,AnimatePresence as x,motion as C,Reorder as F}from"framer-motion";import k from"@mui/icons-material/DragIndicator";import{LocalizationProvider as D,DatePicker as R}from"@mui/x-date-pickers";import{AdapterDayjs as E}from"@mui/x-date-pickers/AdapterDayjs";import w from"./components/ReminderFrequencyAutocomplete.js";import S from"./components/AssigneeCalendarView.js";import _ from"dayjs";import{styles as I}from"./styles/ManageReminder.style.js";var A=["Assignee 1","Assignee 2","Assignee 3"],B=[{bg:"#FDF2FA",text:"#C11574"},{bg:"#EEF4FF",text:"#3538CD"},{bg:"#F1F5F9",text:"#344054"}],T=[{bg:"#FDF2FA",text:"#C93185"},{bg:"#EEF2FF",text:"#6366F1"},{bg:"#FFF4E5",text:"#FF6058"}],L=[{id:"1",name:"Assignee 1",color:"#C11574",bg:"#FDF2F8",startDate:new Date("2026-11-09"),dueDate:new Date("2026-12-01")},{id:"2",name:"Assignee 2",color:"#3538CD",bg:"#EEF4FF",startDate:new Date("2026-11-21"),dueDate:new Date("2026-12-03")},{id:"3",name:"Assignee 3",color:"#FF6058",bg:"#FFF7ED",startDate:new Date("2026-12-01"),dueDate:new Date("2026-12-03")}],P=[{bg:"#DBEAFE",text:"#1E40AF"},{bg:"#CCFBF1",text:"#0D9488"},{bg:"#DCFCE7",text:"#166534"}],O=[{initials:"OR",name:"Olivia Rhye",checked:!1,bg:"#DBEAFE",text:"#1D4ED8"},{initials:"DM",name:"Daniela Mark",checked:!1,bg:"#CFFAFE",text:"#0F766E"},{initials:"JB",name:"Jenna Beckner",checked:!1,bg:"#D1FAE5",text:"#059669"}],M=function(e){var i,n,t,r,o,l,d,a;return(null==e?void 0:e.is_escalation_reminder)&&(null===(i=null==e?void 0:e.days)||void 0===i?void 0:i.value)&&"undefined"!==(null===(n=null==e?void 0:e.days)||void 0===n?void 0:n.value)&&(null===(t=null==e?void 0:e.escalation_reminder_frequency)||void 0===t?void 0:t.value)&&"undefined"!==(null===(r=null==e?void 0:e.escalation_reminder_frequency)||void 0===r?void 0:r.value)?"Start notifying ".concat((null===(o=null==e?void 0:e.days)||void 0===o?void 0:o.value.includes("day"))?null===(l=null==e?void 0:e.days)||void 0===l?void 0:l.value:"".concat(null===(d=null==e?void 0:e.days)||void 0===d?void 0:d.value," ").concat(1===Number(null===(a=null==e?void 0:e.days)||void 0===a?void 0:a.value)?"day":"days")," ").concat(null==e?void 0:e.before_or_after," the due date"):"Notify until successful document upload"},q={"& .MuiInputBase-root":{height:"28px",borderRadius:"4px",fontSize:"11px"}},Y=function(Y){var j=Y.data,N=Y.schedules,H=Y.setSchedules,z=Y.remainderOwners,W=Y.setRemainderOwners,G=Y.labels,V=void 0===G?A:G,U=Y.colors,J=void 0===U?B:U,Z=Y.chipColor,K=void 0===Z?T:Z,Q=Y.assignees,X=void 0===Q?L:Q,$=Y.fallbackRecipients,ee=void 0===$?O:$,ie=Y.recipientsColor,ne=void 0===ie?P:ie,te=Y.manualReminderTitle,re=void 0===te?"Send Manual Reminder Now":te,oe=Y.manualReminderDescription,le=void 0===oe?"Immediately notify the assignees about this document.":oe;Y.lastReminderText;var de=Y.selectRecipientsLabel,ae=void 0===de?"Select recipients:":de,se=Y.previewEmailButtonLabel,ce=void 0===se?"Preview Email":se,ue=Y.sendNowButtonLabel,me=void 0===ue?"Send Now":ue,ve=Y.reminderSuccessTitle,he=void 0===ve?"Reminder sent successfully!":ve,ye=Y.reminderSuccessDescription,pe=void 0===ye?"Email notification sent to 2 assignees.":ye,fe=Y.escalationTitle,ge=void 0===fe?"Escalation and Auto Reminder Setup":fe;Y.escalationTitleTooltip;var be=Y.escalationDescription,xe=void 0===be?"Configure Auto reminder settings for all assignees.":be;Y.configureAutoReminderText;var Ce=Y.getDynamicStatement,Fe=void 0===Ce?M:Ce,ke=Y.reminderStartDateLabel,De=void 0===ke?"Reminder Start Date":ke,Re=Y.documentDueDateLabel,Ee=void 0===Re?"Document Due Date":Re,we=Y.reminderFrequencyLabel,Se=void 0===we?"Reminder Frequency":we,_e=Y.escalationRemindersLabel,Ie=void 0===_e?"Escalation Reminders":_e;Y.escalationTooltip;var Ae=Y.escalationConditionText,Be=void 0===Ae?"If the document is still pending, start escalation reminders":Ae,Te=Y.daysText,Le=void 0===Te?"days":Te,Pe=Y.dueDataAndRepeatText,Oe=void 0===Pe?"due date and repeat every":Pe,Me=Y.reminderFrequencyOptions,qe=void 0===Me?["12 hours","24 hours","48 hours","72 hours","Custom"]:Me,Ye=Y.escalationFrequencyOptions,je=void 0===Ye?["1/2 hour","1 hour","4 hours","6 hours","12 hours","Custom"]:Ye,Ne=Y.beforeAfterOptions,He=void 0===Ne?["After","Before"]:Ne,ze=Y.handelSendNow,We=Y.showPreviewEmail,Ge=void 0===We||We,Ve=t(!1),Ue=Ve[0],Je=Ve[1],Ze=t(!1),Ke=Ze[0],Qe=Ze[1],Xe=t(!1),$e=Xe[0],ei=Xe[1],ii=t(!0),ni=ii[0],ti=ii[1],ri=t(ee),oi=ri[0],li=ri[1],di=b(),ai=function(i,n,t){W(function(r){return r.map(function(r,o){var l;return o===i?e(e({},r),((l={})[n]=t,l)):r})})},si=function(e,i){ai(e,"reminder_start_date",i)},ci=function(e){var i;if(!e)return null;if("custom"===e.type)return Number(e.value)<=0?null:60*Number(e.value)*60*1e3;return null!==(i={"1/2 hour":18e5,"1 hour":36e5,"4 hours":144e5,"6 hours":216e5,"12 hours":432e5,"24 hours":864e5,"48 hours":1728e5,"72 hours":2592e5,"96 hours":3456e5,"1/2 day":432e5,"1 day":864e5,"2 days":1728e5,"3 days":2592e5,"4 days":3456e5}[e.value])&&void 0!==i?i:null},ui=function(e,i,n){if(!e||!n)return[];var t=ci(n);if(!t||t<=0)return[];for(var r=[],o=_(e).valueOf(),l=i?_(i).valueOf():_(e).add(45,"day").valueOf(),d=0;o<=l&&d<150;)r.push(_(o).toISOString()),o+=t,d++;return r},mi=function(e,i,n,t){if(!(e&&i&&t&&n))return[];var r=ci(t);if(!r)return[];var o,l=_(e),d="custom"===i.type?Number(i.value):Number("1/2"===i.value.split(" ")[0]?.5:Number(i.value.split(" ")[0])),a=[];switch(n){case"Before":o=l.subtract(d,"day");break;case"After":o=l.add(d,"day");break;default:return[]}for(var s=o.valueOf(),c=0;c<150;c++)a.push(_(s).toISOString()),s+=r;return a},vi=function(e){return e?e.split(" ").map(function(e){return e[0]}).join("").toUpperCase():""};r(function(){var e=(null==j?void 0:j.due_at)||"",i=Object.values((null==j?void 0:j.assignee)||{}),n=null==z?void 0:z.map(function(n,t){var r,o=i[t]||X.find(function(e){return e.id===String(n.id)}),l=(null===(r=null==J?void 0:J[t%J.length])||void 0===r?void 0:r.text)||"#C11574";return{ownerId:n.id||t+1,ownerName:(null==o?void 0:o.name)||n.name,ownerColor:(null==o?void 0:o.color)||l,reminders:ui(n.reminder_start_date,e,n.reminder_frequency),escalations:mi(e,n.days,n.before_or_after,n.escalation_reminder_frequency)}});H(n)},[z,null==j?void 0:j.due_at,null==j?void 0:j.assignee]),r(function(){(null==j?void 0:j.assignee)&&li(function(e){var i=Object.values(j.assignee).filter(function(e){return e&&Object.keys(e).length>0}).map(function(i,n){var t=e.find(function(e){return e.name===i.name});return{name:i.name,checked:!!t&&t.checked,recipientsColor:(null==ne?void 0:ne[n])||P[n%P.length]}});return i.length>0?i:ee})},[null==j?void 0:j.assignee,null==j?void 0:j.due_at]);var hi=Object.values((null==j?void 0:j.assignee)||{}).filter(function(e){return null==e?void 0:e.name});return i("div",e({style:e(e({},I.mrContainer),{width:"100%",minWidth:"850px"})},{children:[i("div",e({style:I.mrSectionBox},{children:[i("div",e({style:e(e({},I.mrSectionHeader),{cursor:"pointer"}),onClick:function(){return Je(function(e){return!e})}},{children:[i("div",e({style:I.mrSectionHeaderContent},{children:[i("div",e({style:I.mrSectionHeaderLeft},{children:[i("div",e({style:I.mrSectionTitleWrapper},{children:[n("div",e({style:I.mrSectionTitleIcon},{children:n(o,{style:I.mrIconSmall})})),n("div",e({style:I.mrSectionTitle},{children:re}))]})),n("div",e({style:I.mrSectionDescription},{children:le}))]})),n("div",e({style:I.mrSectionHeaderRight},{children:n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Je(function(e){return!e})},style:I.mrChevronButton},{children:n(l,{style:e(e({},I.mrChevronIcon),Ue?I.mrChevronRotated:{})})}))}))]})),n(x,{children:$e&&i(C.div,e({initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},style:I.mrSuccessMessage},{children:[n("div",e({style:I.mrSuccessIcon},{children:n("div",e({style:I.mrSuccessIconInner},{children:n(d,{style:I.mrIconSuccess})}))})),i("div",e({style:I.mrSuccessText},{children:[n("div",e({style:I.mrSuccessTitle},{children:he})),n("div",e({style:I.mrSuccessDescription},{children:pe}))]}))]}))})]})),n(x,{children:Ue&&i(C.div,e({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:e(e({},I.mrHiddenSection),{pointerEvents:Ue?"auto":"none"})},{children:[i("div",e({style:I.mrRecipientsSection},{children:[n("div",e({style:I.mrRecipientsLabel},{children:ae})),n("div",e({style:I.mrRecipientsGrid},{children:oi.map(function(t,r){var o,l,d,a,s=(null===(o=null==t?void 0:t.recipientsColor)||void 0===o?void 0:o.bg)||(null==t?void 0:t.bg)||(null===(l=P[r%P.length])||void 0===l?void 0:l.bg)||"#DBEAFE",c=(null===(d=null==t?void 0:t.recipientsColor)||void 0===d?void 0:d.text)||(null==t?void 0:t.text)||(null===(a=P[r%P.length])||void 0===a?void 0:a.text)||"#1E40AF";return i("div",e({style:I.mrRecipientItem},{children:[n(h,{checked:t.checked,onChange:function(){return i=t.name,void li(function(n){return n.map(function(n){return n.name===i?e(e({},n),{checked:!n.checked}):n})});var i},onClick:function(e){return e.stopPropagation()},size:"small",disableRipple:!0,icon:n("div",{style:I.mrCheckboxUnchecked}),checkedIcon:n("div",e({style:I.mrCheckboxChecked},{children:n("svg",e({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:I.mrCheckboxIcon},{children:n("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),i("div",e({style:I.mrRecipientInfo},{children:[n("div",e({style:e(e({},I.mrRecipientAvatar),{backgroundColor:s,color:c})},{children:vi(t.name)})),n("div",e({style:I.mrRecipientName},{children:t.name}))]}))]}),t.name)})}))]})),i("div",e({style:I.mrActionsSection},{children:[Ge&&i("button",e({onClick:function(e){e.stopPropagation()},type:"button",style:e(e({},I.mrActionButton),I.mrActionButtonSecondary)},{children:[n(a,{style:I.mrIconAction}),ce]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),ei(!0),setTimeout(function(){return ei(!1)},3e3);var i=oi.filter(function(e){return e.checked});ze(N,z.filter(function(e){return i.some(function(i){return i.id===e.id})}))},style:e(e({},I.mrActionButton),I.mrActionButtonPrimary)},{children:me}))]}))]}))})]})),i("div",e({style:I.mrMainContent},{children:[i("div",e({style:I.mrEscalationContainer},{children:[i("div",e({style:I.mrEscalationHeaderWrapper,onClick:function(e){e.stopPropagation(),Qe(function(e){return!e})}},{children:[i("div",e({style:I.mrEscalationHeader},{children:[i("div",e({style:I.mrEscalationTitleWrapper},{children:[n("div",e({style:I.mrEscalationTitleText},{children:ge})),n("div",e({style:I.mrTooltipIcon},{children:n(s,{stroke:"#64748B",style:I.mrIconInfo})}))]})),i("div",e({style:I.mrEscalationActions},{children:[Ge&&i("button",e({style:I.mrEscalationPreviewButton},{children:[n("div",e({style:I.mrEscalationPreviewIcon},{children:n(a,{style:I.mrIconPreview})})),n("span",e({style:I.mrEscalationPreviewText},{children:ce}))]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Qe(function(e){return!e})},style:I.mrChevronButton},{children:n(l,{style:e(e({},I.mrChevronIcon),Ke?I.mrChevronRotated:{})})}))]}))]})),n("div",e({style:I.mrEscalationDescription},{children:xe}))]})),n(x,e({initial:!1},{children:Ke&&n(C.div,e({layout:!0,initial:{opacity:0,scaleY:.96},animate:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.96},transition:{duration:.3,ease:"easeInOut"},style:{transformOrigin:"top",overflow:"hidden"}},{children:n(F.Group,e({axis:"y",values:z||[],onReorder:function(e){W(e)},layoutScroll:!0,style:I.mrReorderGroup},{children:null==z?void 0:z.map(function(t,r){var o,d,a,u,m=hi[r]||ee[r],v=(null===(o=null==J?void 0:J[r])||void 0===o?void 0:o.bg)||"#FDF2FA",b=(null===(d=null==J?void 0:J[r])||void 0===d?void 0:d.text)||"#C11574",S=(null===(a=null==K?void 0:K[r])||void 0===a?void 0:a.bg)||"transparent",A=(null===(u=null==K?void 0:K[r])||void 0===u?void 0:u.text)||"inherit";return n(F.Item,e({value:t,dragControls:di,layout:"position"},{children:i("div",e({style:I.mrReminderItem},{children:[n("div",e({style:I.mrReminderLabelBox},{children:n("div",e({style:I.mrReminderLabelInner},{children:n(y,{label:(null==V?void 0:V[r])||"Assignee ".concat(r+1),sx:{backgroundColor:v,minWidth:90,color:b,fontWeight:500}})}))})),i("div",e({style:I.mrReminderContent},{children:[n("div",e({style:I.mrDragHandle},{children:n(k,{onPointerDown:function(e){return di.start(e)},sx:{color:"#9e9e9e"}})})),n(p,e({display:"flex",alignItems:"center",gap:2,border:"1px solid #E5E7EB",sx:{background:"#fff"},style:I.mrReminderBox},{children:i("div",e({style:I.mrReminderFields},{children:[i("div",e({style:I.mrReminderHeader},{children:[i("div",e({style:I.mrReminderAssignee},{children:[n("div",e({style:I.mrReminderAvatar},{children:n("span",e({style:I.mrReminderInitials},{children:vi(null==m?void 0:m.name)}))})),n("span",e({style:I.mrReminderName},{children:null==m?void 0:m.name}))]})),n("div",e({style:e(e({},I.mrReminderStatement),{backgroundColor:S})},{children:n("span",e({style:e(e({},I.mrReminderStatementText),{color:A})},{children:Fe(t)}))}))]})),i("div",e({style:I.mrReminderDateFields},{children:[i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:De})),i("div",e({style:I.mrReminderDatePicker},{children:[n(D,e({dateAdapter:E},{children:n(R,{value:t.reminder_start_date?_(t.reminder_start_date):null,disablePast:!0,format:"MM/DD/YYYY",onChange:function(e){if(e&&_(e).isValid()){if(_(e).isBefore(_(),"day"))return;si(r,_(e).toISOString())}else si(r,"")},slotProps:{actionBar:{actions:["clear"]},textField:{fullWidth:!0,size:"small",sx:q,placeholder:"MM/DD/YYYY"},openPickerButton:{id:"trial-start-date-picker-icon","data-testid":"trial-start-date-picker-icon",size:"small"},openPickerIcon:{sx:{fontSize:"14px"}}}})})),n(c,{style:I.mrIconArrow})]}))]})),i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:Ee})),n("div",e({style:I.mrReminderDueDate},{children:(null==j?void 0:j.due_at)?_(j.due_at).format("MM/DD/YYYY"):""}))]})),i("div",e({style:I.mrReminderField},{children:[n("p",e({style:I.mrReminderFieldLabel},{children:Se})),i("div",e({style:I.mrReminderFrequency},{children:[n("span",e({style:I.mrReminderFrequencyText},{children:"Every"})),n(w,{value:t.reminder_frequency,onChange:function(e){return function(e,i){ai(e,"reminder_frequency",i)}(r,e)},options:qe,suffix:"hours"})]}))]}))]})),i("div",e({style:I.mrEscalationCheckbox},{children:[i("div",e({style:I.mrEscalationCheckboxHeader},{children:[n(h,{size:"small",disableRipple:!0,checked:t.is_escalation_reminder,onChange:function(e){return function(e,i){ai(e,"is_escalation_reminder",i),i||(ai(e,"days",{type:"preset",value:""}),ai(e,"escalation_reminder_frequency",{type:"preset",value:""}),ai(e,"before_or_after",""))}(r,e.target.checked)},icon:n("div",{style:I.mrCheckboxUnchecked}),checkedIcon:n("div",e({style:I.mrCheckboxChecked},{children:n("svg",e({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",style:I.mrCheckboxIcon},{children:n("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),Ie,n("div",e({style:I.mrTooltipIcon},{children:n(s,{stroke:"#64748B",style:I.mrIconInfo})}))]})),n(x,{children:t.is_escalation_reminder&&i(C.div,e({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},style:I.mrEscalationContent},{children:[n("div",e({style:I.mrEscalationCondition},{children:Be})),i("div",e({style:I.mrEscalationFields},{children:[i("div",e({style:I.mrEscalationFieldGroup},{children:[n(w,{value:t.days,onChange:function(e){return function(e,i){ai(e,"days",i)}(r,e)}}),n("div",e({style:I.mrEscalationFieldText},{children:Le}))]})),i("div",e({style:e(e({},I.mrEscalationFieldGroup),I.mrEscalationFieldGroupLarge)},{children:[n(f,{size:"small",options:He,value:t.before_or_after,onChange:function(e,i){return function(e,i){ai(e,"before_or_after",i)}(r,i||"")},popupIcon:n(l,{style:I.mrIconDropdown}),slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"12px",minHeight:"32px"}}},clearIndicator:{sx:{"& svg":{fontSize:12}}}},renderInput:function(i){return n(g,e({},i,{placeholder:"Select value",sx:q}))},sx:{width:"100%"}}),n("div",e({style:I.mrEscalationFieldText},{children:Oe}))]})),n("div",e({style:I.mrEscalationFieldGroupSmall},{children:n(w,{value:t.escalation_reminder_frequency,onChange:function(e){return function(e,i){ai(e,"escalation_reminder_frequency",i)}(r,e)},options:je,suffix:"hours"})}))]}))]}))})]}))]}))}))]}))]}))}),t.id||r)})}))}))}))]})),Ke&&i(C.div,e({initial:{width:ni?"345px":"43px"},animate:{width:ni?"345px":"43px"},transition:{duration:.3},style:I.mrCalendarPanel},{children:[ni?n(S,{assignees:N}):n("div",e({style:I.mrCalendarCollapsed},{children:n(u,{style:I.mrIconCalendar})})),i("button",e({onClick:function(){return ti(function(e){return!e})},style:I.mrCalendarToggle},{children:[n("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"19",height:"50",viewBox:"0 0 19 50",fill:"none"},{children:n("path",{d:"M3.94434 9.65137C1.79601 11.031 0.49707 13.4087 0.49707 15.9619V35.1436C0.49707 37.8496 1.95476 40.346 4.31152 41.6758L17.5469 49.1426V0.915039L3.94434 9.65137Z",fill:"white",stroke:"#E0E0E0"})})),n(ni?m:v,{style:I.mrIconChevronToggle})]}))]}))]}))]}))};export{Y as ManageReminders};
|
|
2
2
|
//# sourceMappingURL=ManageReminders.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as r,jsx as t}from"react/jsx-runtime";var i=function(i){var o=i.height,n=i.width;return r("svg",e({xmlns:"http://www.w3.org/2000/svg",width:n||"14",height:o||"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-file-check-corner-icon lucide-file-check-corner"},{children:[t("path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6"}),t("path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}),t("path",{d:"m14 20 2 2 4-4"})]}))};export{i as default};
|
|
2
2
|
//# sourceMappingURL=FileCheckCorner.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{__assign as t}from"../../../_virtual/_tslib.js";import{jsx as r}from"react/jsx-runtime";var i=function(){return r("svg",t({width:"2",height:"20",viewBox:"0 0 2 20",fill:"none"},{children:r("line",{x1:"1",y1:"0",x2:"1",y2:"20",stroke:"#6B7280",strokeWidth:"2"})}))};export{i as default};
|
|
2
2
|
//# sourceMappingURL=VerticalLine.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useState as n,useRef as r,useEffect as i}from"react";import{X as a}from"lucide-react";var l={overlay:{position:"absolute",inset:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(17, 24, 39, 0.45)",backdropFilter:"blur(3px)",WebkitBackdropFilter:"blur(3px)",borderRadius:"inherit"},popup:{position:"relative",background:"#ffffff",border:"0.5px solid #E5E7EB",borderRadius:"16px",padding:"20px",width:"380px",boxShadow:"0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.07)",display:"flex",flexDirection:"column",gap:"16px"},topRow:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"12px"},userInfo:{display:"flex",flexDirection:"column",gap:"2px"},userName:{fontSize:"15px",fontWeight:600,color:"#111827"},userEmail:{fontSize:"13px",color:"#6B7280"},levelBadge:{display:"flex",alignItems:"center",gap:"5px",background:"#EDE9FE",border:"1px solid #C4B5FD",borderRadius:"8px",padding:"4px 10px",fontSize:"12px",fontWeight:500,color:"#5B21B6",whiteSpace:"nowrap",flexShrink:0},divider:{border:"none",borderTop:"0.5px solid #E5E7EB"},label:{fontSize:"12px",fontWeight:500,color:"#6B7280",marginBottom:"6px",display:"flex",alignItems:"center",gap:"5px"},optionalTag:{fontSize:"11px",fontWeight:400,color:"#9CA3AF",background:"#F9FAFB",border:"0.5px solid #E5E7EB",borderRadius:"20px",padding:"1px 7px"},textarea:{width:"100%",minHeight:"90px",resize:"vertical",fontSize:"13px",fontFamily:"inherit",color:"#111827",background:"#F9FAFB",border:"0.5px solid #E5E7EB",borderRadius:"8px",padding:"10px 12px",lineHeight:1.6,outline:"none",boxSizing:"border-box"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",marginTop:"2px"},btnBack:{padding:"10px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"transparent",color:"#6B7280",border:"0.5px solid #D1D5DB",fontWeight:500,whiteSpace:"nowrap"},btnLater:{padding:"8px 14px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"#F3F4F6",color:"#374151",border:"0.5px solid #D1D5DB",fontWeight:500,whiteSpace:"nowrap"},btnNow:{padding:"8px 16px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"#5B4FE9",color:"#fff",border:"none",fontWeight:500,whiteSpace:"nowrap"}};function d(d){var p,s=d.user,c=d.accessLevel,x=d.wrapperEl,f=d.onBackToEditing,u=d.onSendLater,g=d.onSendNow,b=n(null!==(p=s.notes)&&void 0!==p?p:""),h=b[0],y=b[1],m=r(null);i(function(){if(x){var e=x.style.position;return e&&"static"!==e||(x.style.position="relative"),function(){x.style.position=e}}},[x]),i(function(){var e=function(e){"Escape"===e.key&&f()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[f]);var v=e(e({},l.overlay),x?{}:{position:"fixed"});return o("div",e({style:v,onMouseDown:function(e){e.target===e.currentTarget&&f()}},{children:t("div",e({ref:m,style:l.popup,role:"dialog","aria-modal":"true","aria-label":"Add notes for ".concat(s.name)},{children:[t("div",e({style:l.topRow},{children:[t("div",e({style:l.userInfo},{children:[t("span",e({style:e(e({},l.userName),{display:"flex",alignItems:"center"})},{children:[s.name," - ",t("span",e({style:{fontWeight:300}},{children:["(",s.email,")"]}))]})),c&&t("span",e({style:e(e({},l.userEmail),{color:"rgb(91, 33, 182)"})},{children:[" ",o("b",{children:"Role: "})," ",c]}))]})),o("button",e({style:l.btnBack,onClick:f,title:"Discard notes and go back"},{children:o(a,{width:14,height:14})}))]})),t("div",{children:[t("div",e({style:l.label},{children:["Additional Notes",o("span",e({style:l.optionalTag},{children:"optional"}))]})),o("textarea",{style:l.textarea,placeholder:"Add a note for this assignee…",value:h,onChange:function(e){return y(e.target.value)},autoFocus:!0})]}),t("div",e({style:l.footer},{children:[o("button",e({style:l.btnLater,onClick:function(){return u(h)},title:"Save notes, notify later"},{children:"Send later"})),o("button",e({style:l.btnNow,onClick:function(){return g(h)},title:"Save notes and notify now"},{children:"Send now"}))]}))]}))}))}export{d as AddUserPopup};
|
|
2
2
|
//# sourceMappingURL=AddUserPopup.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{__assign as t}from"../../../_virtual/_tslib.js";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useRef as l}from"react";import{DATE_PICKER_STYLES as i}from"../styles/AssignLevelsDatePickerStyles.js";function n(n){var o=n.value,a=n.onSet,s=n.maxDate,u=l(null);return e("div",t({style:i.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:i.placeholder},{children:o?o.toLocaleDateString("en-GB"):"--/--/----"})),r("input",{ref:u,type:"date",max:s?s.toISOString().split("T")[0]:void 0,style:i.input,value:o?o.toISOString().split("T")[0]:"",onChange:function(t){var e=t.target.value;a(e?new Date(e):null)}})]}))}export{n as default};
|
|
2
2
|
//# sourceMappingURL=AssignLevelsDatePicker.js.map
|