@viswa-test/creative-workspace-ui-component 0.0.18 → 0.0.20
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/README.md +174 -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/components/AssignReminders/AssignLevelAccordions.js +1 -1
- package/dist/components/AssignReminders/AssignReminderLevels.js +1 -1
- package/dist/components/AssignReminders/AssignReminderWrapper.js +1 -1
- package/dist/types/components/AssignReminders/AssignLevelAccordions.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/AssignReminderLevels.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/AssignReminderWrapper.d.ts +1 -1
- package/dist/types/components/AssignReminders/AssignReminderWrapper.d.ts.map +1 -1
- package/dist/types/components/AssignReminders/types/types.d.ts +1 -0
- package/dist/types/components/AssignReminders/types/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -349,4 +349,177 @@ import { BookOpen, RadioTower } from 'lucide-react';
|
|
|
349
349
|
- The `nodeTypesConfig` array maps to tree depth — index `0` applies to the root node, index `1` to its children, and so on. If the tree is deeper than the config array, the last config entry is reused.
|
|
350
350
|
- Delete is automatically **disabled** for nodes that have children, with a tooltip explaining why.
|
|
351
351
|
- The root node auto-expands on load and whenever `data` changes.
|
|
352
|
-
- Search expansion is automatic — all ancestor nodes of matching results are expanded.
|
|
352
|
+
- Search expansion is automatic — all ancestor nodes of matching results are expanded.
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
# Assign Reminder & Approval Manager
|
|
357
|
+
|
|
358
|
+
A configurable workflow component for managing assignees, approval levels, reminders, and review status tracking.
|
|
359
|
+
|
|
360
|
+
## Features
|
|
361
|
+
|
|
362
|
+
- Multi-tab interface (Assignees, Reminders, Review Status)
|
|
363
|
+
- Multi-level approval workflows
|
|
364
|
+
- Controlled and uncontrolled state support
|
|
365
|
+
- Async user search and assignment
|
|
366
|
+
- Due date management
|
|
367
|
+
- Final approval workflow support
|
|
368
|
+
- Visual approval progress tracking
|
|
369
|
+
- Customizable metadata, tabs, and priority badges
|
|
370
|
+
- Reusable UI components (Dropdowns, Date Pickers, Checkboxes)
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## Installation
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
npm install @e-llm-studio/creative-workspace-ui-component
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
```tsx
|
|
381
|
+
import AssignReminderWrapper from "@e-llm-studio/creative-workspace-ui-component";
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Basic Usage
|
|
387
|
+
|
|
388
|
+
```tsx
|
|
389
|
+
<AssignReminderWrapper
|
|
390
|
+
fetchUsers={fetchUsers}
|
|
391
|
+
onClose={() => setOpen(false)}
|
|
392
|
+
onSave={(payload) => console.log(payload)}
|
|
393
|
+
metadata={{
|
|
394
|
+
wrapperTitle: "Contract Review",
|
|
395
|
+
wrapperPriority: "High",
|
|
396
|
+
}}
|
|
397
|
+
/>
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## Props
|
|
403
|
+
|
|
404
|
+
| Prop | Type | Description |
|
|
405
|
+
|--------|--------|-------------|
|
|
406
|
+
| `metadata` | `MetaData` | Customizes modal title, priority badge, tabs, and display settings. |
|
|
407
|
+
| `reviewData` | `Record<number, Record<string, boolean>>` | Approval status mapping used by Review Status. |
|
|
408
|
+
| `levels` | `Level[]` | Approval workflow levels. |
|
|
409
|
+
| `setLevels` | `Dispatch` | Controlled state setter for levels. |
|
|
410
|
+
| `requireFinalApproval` | `boolean` | Enables final approval step. |
|
|
411
|
+
| `setRequireFinalApproval` | `Dispatch` | Controlled setter for final approval state. |
|
|
412
|
+
| `approvalDueDate` | `Date \| null` | Final approval due date. |
|
|
413
|
+
| `setApprovalDueDate` | `Dispatch` | Controlled setter for approval due date. |
|
|
414
|
+
| `fetchUsers` | `FetchUsersFunction` | Async user lookup function. |
|
|
415
|
+
| `onClose` | `() => void` | Called when modal closes. |
|
|
416
|
+
| `onSave` | `(payload) => void` | Returns configured workflow data. |
|
|
417
|
+
| `onValidationError` | `(message) => void` | Handles validation errors. |
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
## Core Types
|
|
422
|
+
|
|
423
|
+
### MetaData
|
|
424
|
+
|
|
425
|
+
```ts
|
|
426
|
+
interface MetaData {
|
|
427
|
+
wrapperTitle?: string;
|
|
428
|
+
wrapperSubTitle?: string;
|
|
429
|
+
wrapperPriority?: string;
|
|
430
|
+
wrapperPriorityStyles?: React.CSSProperties;
|
|
431
|
+
tabData?: TabData[];
|
|
432
|
+
showFinalApprovalDueDate?: boolean;
|
|
433
|
+
}
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
### Level
|
|
437
|
+
|
|
438
|
+
```ts
|
|
439
|
+
interface Level {
|
|
440
|
+
headerName: string;
|
|
441
|
+
title: string;
|
|
442
|
+
isMandatory: boolean;
|
|
443
|
+
hasDueDate: boolean;
|
|
444
|
+
dueDate: Date | null;
|
|
445
|
+
assignees: AssigneeUser[];
|
|
446
|
+
}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
### AssigneeUser
|
|
450
|
+
|
|
451
|
+
```ts
|
|
452
|
+
interface AssigneeUser {
|
|
453
|
+
id: any;
|
|
454
|
+
name: string;
|
|
455
|
+
email: string;
|
|
456
|
+
accessLevel?: string;
|
|
457
|
+
}
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
### SavePayload
|
|
461
|
+
|
|
462
|
+
```ts
|
|
463
|
+
interface SavePayload {
|
|
464
|
+
levels: Level[];
|
|
465
|
+
requireFinalApproval: boolean;
|
|
466
|
+
finalApprovalDueDate: Date | null;
|
|
467
|
+
activeTab: "assignees" | "reminders" | "review";
|
|
468
|
+
}
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## Included Components
|
|
474
|
+
|
|
475
|
+
### AssignReminderLevels
|
|
476
|
+
|
|
477
|
+
Manages approval levels, assignees, due dates, and final approval configuration.
|
|
478
|
+
|
|
479
|
+
### ReviewStatus
|
|
480
|
+
|
|
481
|
+
Displays approval progress and assignee review status using `reviewData`.
|
|
482
|
+
|
|
483
|
+
### LevelData
|
|
484
|
+
|
|
485
|
+
Handles assignee search, selection, and access-level assignment.
|
|
486
|
+
|
|
487
|
+
### UI Components
|
|
488
|
+
|
|
489
|
+
- `CustomDropdown`
|
|
490
|
+
- `CustomDatePicker`
|
|
491
|
+
- `AssignLevelDatePicker`
|
|
492
|
+
- `CustomCheckbox`
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
## Utilities
|
|
497
|
+
|
|
498
|
+
### getRandomColorPair
|
|
499
|
+
|
|
500
|
+
```ts
|
|
501
|
+
function getRandomColorPair(): {
|
|
502
|
+
backgroundColor: string;
|
|
503
|
+
color: string;
|
|
504
|
+
}
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
Returns a contrasting color pair for badge styling.
|
|
508
|
+
|
|
509
|
+
### DEFAULT_ASSIGN_REMINDER_LEVELS
|
|
510
|
+
|
|
511
|
+
Default workflow configuration containing:
|
|
512
|
+
|
|
513
|
+
- First Level (Mandatory)
|
|
514
|
+
- Second Level (Optional)
|
|
515
|
+
- Third Level (Optional)
|
|
516
|
+
|
|
517
|
+
---
|
|
518
|
+
|
|
519
|
+
## Notes
|
|
520
|
+
|
|
521
|
+
- Supports both controlled and uncontrolled usage patterns.
|
|
522
|
+
- `fetchUsers` is required for assignee lookup functionality.
|
|
523
|
+
- Review progress is driven by the `reviewData` prop.
|
|
524
|
+
- Final approval workflow can be enabled or disabled.
|
|
525
|
+
- All workflow configuration is returned through the `onSave` callback.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),t=require("lucide-react"),i=require("./utils/generateRandomColorsPair.js"),o=require("./assets/VerticalLine.js"),r=require("./components/AssignLevelsDatePicker.js"),a=require("./components/LevelData.js");exports.default=function(l){var d,p,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),t=require("lucide-react"),i=require("./utils/generateRandomColorsPair.js"),o=require("./assets/VerticalLine.js"),r=require("./components/AssignLevelsDatePicker.js"),a=require("./components/LevelData.js");exports.default=function(l){var d,u,p,c,g=l.level,x=l.id,h=l.accessLevelOptions,f=l.fetchUsers,y=l.onToggleMandatory,_=l.onDueDateChange,v=l.onAssigneesChange,j=l.onTitleChange;l.onDeleteLevel;var b=s.useMemo(function(){return i.getRandomColorPair()},[]),m="0"===x||(null!==(u=null===(d=g.assignees)||void 0===d?void 0:d.length)&&void 0!==u?u:0)>0,C=s.useState(m),k=C[0],D=C[1],F=s.useState(!1),S=F[0],w=F[1];return s.useEffect(function(){var e,n;(null!==(n=null===(e=g.assignees)||void 0===e?void 0:e.length)&&void 0!==n?n:0)>0&&D(!0)},[g.assignees]),n.jsxs("div",e.__assign({style:{width:"100%",border:"1.5px solid #E2E8F0",borderRadius:"5px"}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#F8FAFC",padding:"0px 10px",minHeight:"48px"}},{children:[n.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center",gap:10,paddingLeft:"20px"}},{children:[n.jsx("span",e.__assign({style:{backgroundColor:b.backgroundColor,borderRadius:"10px",padding:"3px 12px",color:b.color,fontSize:"13px",fontWeight:500}},{children:g.headerName})),S?n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("input",{type:"text",value:g.title||"",onChange:function(e){return null==j?void 0:j(e.target.value)},onBlur:function(){return w(!1)},onKeyDown:function(e){return"Enter"===e.key&&w(!1)},autoFocus:!0,style:{border:"none",borderBottom:"2px solid #3B82F6",outline:"none",fontSize:"13px",fontWeight:500,color:"#374151",background:"transparent",padding:"0 2px",width:"150px"}}),n.jsx("button",e.__assign({type:"button",onMouseDown:function(e){return e.preventDefault()},onClick:function(e){e.stopPropagation(),w(!1)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"}},{children:n.jsx(t.Check,{size:16,color:"#10B981"})}))]})):n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("span",e.__assign({style:{fontSize:"13px",fontWeight:500,color:"#374151"}},{children:g.title})),n.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),w(!0)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"},title:"Edit Title"},{children:n.jsx(t.Edit2,{size:14,color:"#6B7280"})}))]}))]})),n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:16,marginLeft:"auto"}},{children:[k&&g.hasDueDate&&n.jsxs(n.Fragment,{children:[n.jsxs("span",e.__assign({style:{color:"#6B7280"}},{children:["Due Date: ",g.isMandatory&&n.jsx("sup",e.__assign({style:{color:"red"}},{children:"*"}))]})),n.jsx(r.default,{value:null!==(p=g.dueDate)&&void 0!==p?p:null,onSet:_,id:x}),n.jsx(o.default,{})]}),n.jsx("div",e.__assign({style:{display:"flex",alignItems:"center"}},{children:n.jsxs("button",e.__assign({type:"button",onClick:y,disabled:"0"===x,style:{position:"relative",width:"88px",height:"26px",border:"none",borderRadius:"999px",backgroundColor:g.isMandatory?"#5B4FE9":"#D1D5DB",cursor:"pointer",opacity:"0"===x?"50%":"100%",display:"flex",alignItems:"center",padding:"0 10px",transition:"all 0.2s ease",flexShrink:0}},{children:[n.jsx("span",{style:{position:"absolute",top:"3px",left:g.isMandatory?"65px":"3px",width:"20px",height:"20px",borderRadius:"50%",background:"#FFF",transition:"all 0.2s ease",boxShadow:"0 1px 3px rgba(0,0,0,0.15)"}}),n.jsx("span",e.__assign({style:{color:"#FFF",fontSize:"10px",fontWeight:500,userSelect:"none",paddingLeft:g.isMandatory?"0":"18px",paddingRight:g.isMandatory?"18px":"0"}},{children:"Required"}))]}))})),n.jsx(t.ChevronDown,{size:20,onClick:function(e){e.stopPropagation(),D(function(e){return!e})},style:{cursor:"pointer",flexShrink:0,transition:"transform 0.2s ease",transform:k?"rotate(180deg)":"rotate(0deg)"}})]}))]})),k&&n.jsx("div",e.__assign({style:{width:"100%",height:"auto"}},{children:n.jsx(a.default,{assignees:null!==(c=g.assignees)&&void 0!==c?c:[],onAssigneeChange:v,accessLevelOptions:h,fetchUsers:f})}))]}))};
|
|
2
2
|
//# sourceMappingURL=AssignLevelAccordions.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),i=require("lucide-react"),t=require("./AssignLevelAccordions.js"),r=require("./components/CustomCheckbox.js"),a=require("./assets/FileCheckCorner.js"),l=require("./styles/AssignReminderStyles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(s),c=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),i=require("lucide-react"),t=require("./AssignLevelAccordions.js"),r=require("./components/CustomCheckbox.js"),a=require("./assets/FileCheckCorner.js"),l=require("./styles/AssignReminderStyles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(s),c=[{label:"Edit",icon:n.jsx(i.PenLine,{size:14})},{label:"Approve",icon:n.jsx(i.UserRoundCheck,{size:14})},{label:"Edit & Approve",icon:n.jsx(a.default,{})},{label:"Notify",icon:n.jsx(i.Bell,{size:14})}];exports.AssignReminderLevels=function(s){var a=s.title,o=s.levels,_=void 0===o?[]:o,d=s.requireFinalApproval,p=void 0!==d&&d,f=s.additionalInfo,g=s.setLevels,v=s.setRequireFinalApproval,x=s.fetchUsers,h=s.accessLevelOptions,j=void 0===h?c:h,A=s.customInfoIcon,S=s.onValidationError,y=s.customStyles,E=void 0===y?{}:y,L=s.totalLevels,m=u.default.useState(!1),I=m[0],D=m[1],b=u.default.useMemo(function(){return Array.from({length:null!=L?L:3},function(e,n){var s;return null!==(s=_[n])&&void 0!==s?s:{title:"Level ".concat(n+1),headerName:"L ".concat(n+1),isMandatory:!1,dueDate:null,assignees:[],hasDueDate:!0}})},[_,L]),F=(_.length>0?_:b).filter(function(e){return!e.isHidden});return n.jsxs("div",e.__assign({style:e.__assign({padding:"8px",display:"flex",flexDirection:"column",gap:"18px"},E.container)},{children:[n.jsxs("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.header),E.levelsHeader)},{children:[n.jsx("span",{children:null!=a?a:"Assignee Levels"}),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.infoIconWrapper),E.infoIconWrapper),onMouseEnter:function(){return D(!0)},onMouseLeave:function(){return D(!1)}},{children:[null!=A?A:n.jsx(i.InfoIcon,{width:18,height:18}),n.jsx("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.tooltip),E.tooltip),I?e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.tooltipVisible),E.tooltipVisible):{})},{children:f||n.jsxs("span",{children:[n.jsx("b",{children:"How it works:"}),n.jsx("br",{}),"Level 1 is required by default, Enable Level 2 and Level 3 to add sequential approval steps for the review"]})}))]}))]})),n.jsx("div",e.__assign({style:e.__assign({display:"flex",flexDirection:"column",gap:"16px"},E.accordionsContainer)},{children:F.map(function(s,i){return n.jsx(t.default,{level:s,id:String(i),accessLevelOptions:j,fetchUsers:x,onToggleMandatory:function(){return n=i,void(null==g||g(function(s){return s.map(function(s,i){return i===n?e.__assign(e.__assign({},s),{isMandatory:!s.isMandatory}):s})}));var n},onDueDateChange:function(n){return function(n,s){var i;if(n>0&&s){var t=null===(i=_[n-1])||void 0===i?void 0:i.dueDate;if(t&&s<t)return void(null==S||S("Level ".concat(n+1," due date cannot be before Level ").concat(n," due date")))}null==g||g(function(i){return i.map(function(i,t){return t===n?e.__assign(e.__assign({},i),{dueDate:s}):i})})}(i,n)},onAssigneesChange:function(n){return s=i,t=n,void(null==g||g(function(n){return n.map(function(n,i){return i===s?e.__assign(e.__assign({},n),{assignees:t}):n})}));var s,t},onTitleChange:function(n){return function(n,s){null==g||g(function(i){return i.map(function(i,t){return t===n?e.__assign(e.__assign({},i),{title:s}):i})})}(i,n)}},i)})})),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.finalApprovalBox),E.finalApprovalBox)},{children:[n.jsx(r.default,{getter:p,setter:null!=v?v:function(){}}),n.jsxs("div",e.__assign({style:e.__assign({display:"flex",flexDirection:"column",alignItems:"baseline",fontSize:"14px",fontWeight:400},E.finalApprovalTextWrapper)},{children:[n.jsx("span",e.__assign({style:e.__assign({fontWeight:500},E.finalApprovalTitle)},{children:"Require Final Approval"})),n.jsx("span",e.__assign({style:E.finalApprovalDesc},{children:"After all assignees approve, you (the owner) will be notified to give final sign-off before the redline is settled."}))]}))]})),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_STYLES.currentApprovalFlow),E.currentApprovalFlow)},{children:[n.jsx("span",e.__assign({style:e.__assign({fontSize:"14px",fontWeight:600},E.currentApprovalFlowTitle)},{children:"Current Approval Flow"})),n.jsx("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap",marginTop:"4px"},E.approvalFlowItemsWrapper)},{children:_.map(function(s,t){var r,a=s.isHidden,l=(null===(r=s.assignees)||void 0===r?void 0:r.map(function(e){return e.name}).join(", "))||"No users assigned",o=s.title||"Level ".concat(t+1),c=a?n.jsx(i.User,{size:16}):function(e){switch(e){case 0:return n.jsx(i.Edit2,{size:16});case 1:return n.jsx(i.FileCheck,{size:16});case 2:return n.jsx(i.User,{size:16});default:return n.jsx(i.CheckSquare,{size:16})}}(t);return n.jsxs(u.default.Fragment,{children:[n.jsxs("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,color:"#374151"},E.approvalFlowItem),title:o},{children:[c,n.jsx("span",{children:l})]})),t<_.length-1&&n.jsx(i.ArrowRight,{size:16,color:"#9CA3AF"})]},t)})}))]}))]}))};
|
|
2
2
|
//# sourceMappingURL=AssignReminderLevels.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),i=require("lucide-react"),a=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),i=require("lucide-react"),a=require("react"),n=require("./AssignReminderLevels.js"),_=require("./AssignReminderTest.js"),r=require("./components/ReviewStatus.js"),t=require("./components/CustomDatePicker.js"),l=require("./styles/AssignReminderWrapperStyles.js"),o=[{tabName:"Assignees & Approvers",tabIcon:s.jsxs("svg",e.__assign({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},{children:[s.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),s.jsx("circle",{cx:"9",cy:"7",r:"4"}),s.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),s.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}))},{tabName:"Manage Reminders",tabIcon:s.jsx(i.Bell,{size:15})},{tabName:"Review Status",tabIcon:s.jsx(i.ClipboardList,{size:15})}];exports.AssignReminderWrapper=function(d){var E,u,S=d.metadata,c=void 0===S?{}:S,R=d.reviewData,g=void 0===R?{}:R,A=d.levels,v=d.setLevels,D=d.requireFinalApproval,p=d.setRequireFinalApproval,L=d.approvalDueDate,I=d.setApprovalDueDate,N=d.onClose,T=d.fetchUsers,m=d.onSave,P=d.onValidationError,h=d.totalLevels,j=d.customStyles,x=void 0===j?{}:j,f=d.isSaving,b=void 0!==f&&f,y=d.onRequireFinalApproval,F=(null===(E=c.tabData)||void 0===E?void 0:E.length)?c.tabData:o,M=a.useState(F[0].tabName),W=M[0],U=M[1],Y=(u=W.toLowerCase()).includes("reminder")?"reminders":u.includes("review")?"review":"assignees",G=a.useState(A||_.INITIAL_LEVELS),B=G[0],C=G[1],q=a.useState(D||!1),w=q[0],k=q[1],z=a.useState(L||null),H=z[0],V=z[1],O=a.useState(null),X=O[0],J=O[1];a.useEffect(function(){null==y||y().then(function(e){e&&J(e)})},[]),a.useEffect(function(){A&&C(A)},[A]),a.useEffect(function(){void 0!==D&&k(D)},[D]),a.useEffect(function(){void 0!==L&&V(L)},[L]),a.useEffect(function(){C(function(s){var i=s.some(function(e){return e.isHidden});return w?i?s:e.__spreadArray(e.__spreadArray([],s,!0),[{headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==X?void 0:X.id)||"me",email:(null==X?void 0:X.email)||"",name:(null==X?void 0:X.name)?"".concat(X.name," (You)"):"Username (You)",accessLevel:"Approve"}]}],!1):i?s.filter(function(e){return!e.isHidden}):s})},[w,X]);var K=c.wrapperTitle||"Assign Redline and Manage Reminders",Q=c.wrapperSubTitle||"Sec 4.1 - Technical Security Information",Z=c.wrapperPriority||"High",$=c.wrapperPriorityStyles||{backgroundColor:"#DC262618",color:"#DC2626",border:"1px solid #DC262640"};return s.jsx("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.overlay),x.overlay)},{children:s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.modal),x.modal)},{children:[s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.header),x.header)},{children:[s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.headerLeft),x.headerLeft)},{children:[s.jsx("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.modalTitle),x.modalTitle)},{children:K})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineRow),x.redlineRow)},{children:[s.jsx("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineName),x.redlineName)},{children:Q})),s.jsx("span",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.redlineBadge),$),x.redlineBadge)},{children:Z}))]}))]})),s.jsx("button",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.closeBtn),x.closeBtn),onClick:N},{children:s.jsx(i.X,{size:20,color:"#6B7280"})}))]})),s.jsx("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tabBar),x.tabBar)},{children:F.map(function(i){var a=W===i.tabName;return s.jsxs("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tab),x.tab),a?e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.tabActive),x.tabActive):{}),onClick:function(){return U(i.tabName)}},{children:[i.tabIcon," ",i.tabName]}),i.tabName)})})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.body),x.body)},{children:["assignees"===Y&&s.jsxs(s.Fragment,{children:[!1!==c.showFinalApprovalDueDate&&s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateBar),x.dueDateBar)},{children:[s.jsxs("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateLabel),x.dueDateLabel)},{children:["Final Approval due date ",s.jsx("sup",e.__assign({style:{color:"#DC2626",marginLeft:2}},{children:"*"}))]})),s.jsx("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.dueDateInputWrap),x.dueDateInputWrap)},{children:s.jsx(t.default,{value:H?H.toISOString().slice(0,10):"",onChange:V})})),s.jsxs("span",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.requiredToProceeed),x.requiredToProceeed)},{children:[s.jsx(i.CircleAlert,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),s.jsx(n.AssignReminderLevels,{levels:B,totalLevels:h,requireFinalApproval:w,setLevels:C,setRequireFinalApproval:function(e){k(e),null==y||y()},fetchUsers:T,onValidationError:P,customStyles:x})]}),"reminders"===Y&&s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.reminderPlaceholder),x.reminderPlaceholder)},{children:[s.jsx(i.Bell,{size:32,color:"#D1D5DB"}),s.jsx("p",e.__assign({style:{color:"#9CA3AF",marginTop:12,fontSize:14}},{children:"Reminder settings coming soon…"}))]})),"review"===Y&&s.jsx(r.default,{levels:B,reviewData:g})]})),s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.footer),x.footer)},{children:[s.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.clearBtn),x.clearBtn),b?x.actionBtnDisabled:{}),onClick:function(){C(_.INITIAL_LEVELS.map(function(s){return e.__assign(e.__assign({},s),{assignees:[],dueDate:null})})),k(!1),V(null)},disabled:b},{children:"Clear"})),s.jsx("button",e.__assign({style:e.__assign(e.__assign(e.__assign({},l.DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES.saveBtn),x.saveBtn),b?x.actionBtnDisabled:{}),onClick:function(){null==v||v(B),null==p||p(w),null==I||I(H),null==m||m({levels:B,requireFinalApproval:w,finalApprovalDueDate:H,activeTab:Y})},disabled:b},{children:"Save Changes"}))]}))]}))}))};
|
|
2
2
|
//# sourceMappingURL=AssignReminderWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../_virtual/_tslib.js";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 s,Edit2 as a,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,L=f.onTitleChange;f.onDeleteLevel;var S=i(function(){return p()},[]),B="0"===v||(null!==(x=null===(h=b.assignees)||void 0===h?void 0:h.length)&&void 0!==x?x:0)>0,j=r(B),z=j[0],M=j[1],R=r(!1),I=R[0],E=R[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&&M(!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:S.backgroundColor,borderRadius:"10px",padding:"3px 12px",color:S.color,fontSize:"13px",fontWeight:500}},{children:b.headerName})),n("div",e({style:{display:"flex",alignItems:"center",gap:"6px"}},I?{children:[t("input",{type:"text",value:b.title||"",onChange:function(e){return null==L?void 0:L(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(s,{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(a,{size:14,color:"#6B7280"})}))]}))]})),n("div",e({style:{display:"flex",alignItems:"center",gap:16,marginLeft:"auto"}},{children:[z&&b.hasDueDate&&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}),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(),M(function(e){return!e})},style:{cursor:"pointer",flexShrink:0,transition:"transform 0.2s ease",transform:z?"rotate(180deg)":"rotate(0deg)"}})]}))]})),z&&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{__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,
|
|
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 c,CheckSquare as p,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,x=void 0!==y&&y,A=r.additionalInfo,b=r.setLevels,L=r.setRequireFinalApproval,w=r.fetchUsers,z=r.accessLevelOptions,F=void 0===z?g:z,D=r.customInfoIcon,C=r.onValidationError,I=r.customStyles,W=void 0===I?{}:I,j=r.totalLevels,M=i.useState(!1),S=M[0],T=M[1],q=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]),E=(m.length>0?m:q).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 T(!0)},onMouseLeave:function(){return T(!1)}},{children:[null!=D?D:n(a,{width:18,height:18}),n("div",e({style:e(e(e({},h.tooltip),W.tooltip),S?e(e({},h.tooltipVisible),W.tooltipVisible):{})},{children:A||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:E.map(function(t,i){return n(f,{level:t,id:String(i),accessLevelOptions:F,fetchUsers:w,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)}},i)})})),t("div",e({style:e(e({},h.finalApprovalBox),W.finalApprovalBox)},{children:[n(v,{getter:x,setter:null!=L?L: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(p,{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(c,{size:16,color:"#9CA3AF"})]},l)})}))]}))]}))}export{y as AssignReminderLevels};
|
|
2
2
|
//# sourceMappingURL=AssignReminderLevels.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../_virtual/_tslib.js";import{jsxs as r,jsx as
|
|
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 l,X as o,CircleAlert as s}from"lucide-react";import{useState as d,useEffect as c}from"react";import{AssignReminderLevels as u}from"./AssignReminderLevels.js";import{INITIAL_LEVELS as v}from"./AssignReminderTest.js";import p from"./components/ReviewStatus.js";import m from"./components/CustomDatePicker.js";import{DEFAULT_ASSIGN_REMINDER_WRAPPER_STYLES as h}from"./styles/AssignReminderWrapperStyles.js";var b=[{tabName:"Assignees & Approvers",tabIcon: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(l,{size:15})}];function f(l){var f,y,D=l.metadata,g=void 0===D?{}:D,A=l.reviewData,B=void 0===A?{}:A,w=l.levels,C=l.setLevels,R=l.requireFinalApproval,S=l.setRequireFinalApproval,L=l.approvalDueDate,F=l.setApprovalDueDate,N=l.onClose,T=l.fetchUsers,q=l.onSave,k=l.onValidationError,I=l.totalLevels,j=l.customStyles,P=void 0===j?{}:j,z=l.isSaving,M=void 0!==z&&z,x=l.onRequireFinalApproval,H=(null===(f=g.tabData)||void 0===f?void 0:f.length)?g.tabData:b,W=d(H[0].tabName),U=W[0],E=W[1],V=(y=U.toLowerCase()).includes("reminder")?"reminders":y.includes("review")?"review":"assignees",Y=d(w||v),_=Y[0],O=Y[1],G=d(R||!1),J=G[0],K=G[1],Q=d(L||null),X=Q[0],Z=Q[1],$=d(null),ee=$[0],ie=$[1];c(function(){null==x||x().then(function(e){e&&ie(e)})},[]),c(function(){w&&O(w)},[w]),c(function(){void 0!==R&&K(R)},[R]),c(function(){void 0!==L&&Z(L)},[L]),c(function(){O(function(e){var r=e.some(function(e){return e.isHidden});return J?r?e:i(i([],e,!0),[{headerName:"Final",title:"Final Approval",isMandatory:!0,hasDueDate:!1,dueDate:null,isHidden:!0,assignees:[{id:(null==ee?void 0:ee.id)||"me",email:(null==ee?void 0:ee.email)||"",name:(null==ee?void 0:ee.name)?"".concat(ee.name," (You)"):"Username (You)",accessLevel:"Approve"}]}],!1):r?e.filter(function(e){return!e.isHidden}):e})},[J,ee]);var re=g.wrapperTitle||"Assign Redline and Manage Reminders",ne=g.wrapperSubTitle||"Sec 4.1 - Technical Security Information",te=g.wrapperPriority||"High",ae=g.wrapperPriorityStyles||{backgroundColor:"#DC262618",color:"#DC2626",border:"1px solid #DC262640"};return n("div",e({style:e(e({},h.overlay),P.overlay)},{children:r("div",e({style:e(e({},h.modal),P.modal)},{children:[r("div",e({style:e(e({},h.header),P.header)},{children:[r("div",e({style:e(e({},h.headerLeft),P.headerLeft)},{children:[n("span",e({style:e(e({},h.modalTitle),P.modalTitle)},{children:re})),r("div",e({style:e(e({},h.redlineRow),P.redlineRow)},{children:[n("span",e({style:e(e({},h.redlineName),P.redlineName)},{children:ne})),n("span",e({style:e(e(e({},h.redlineBadge),ae),P.redlineBadge)},{children:te}))]}))]})),n("button",e({style:e(e({},h.closeBtn),P.closeBtn),onClick:N},{children:n(o,{size:20,color:"#6B7280"})}))]})),n("div",e({style:e(e({},h.tabBar),P.tabBar)},{children:H.map(function(i){var n=U===i.tabName;return r("button",e({style:e(e(e({},h.tab),P.tab),n?e(e({},h.tabActive),P.tabActive):{}),onClick:function(){return E(i.tabName)}},{children:[i.tabIcon," ",i.tabName]}),i.tabName)})})),r("div",e({style:e(e({},h.body),P.body)},{children:["assignees"===V&&r(t,{children:[!1!==g.showFinalApprovalDueDate&&r("div",e({style:e(e({},h.dueDateBar),P.dueDateBar)},{children:[r("span",e({style:e(e({},h.dueDateLabel),P.dueDateLabel)},{children:["Final Approval due date ",n("sup",e({style:{color:"#DC2626",marginLeft:2}},{children:"*"}))]})),n("div",e({style:e(e({},h.dueDateInputWrap),P.dueDateInputWrap)},{children:n(m,{value:X?X.toISOString().slice(0,10):"",onChange:Z})})),r("span",e({style:e(e({},h.requiredToProceeed),P.requiredToProceeed)},{children:[n(s,{size:14,color:"#6B7280"})," Required to proceed"]}))]})),n(u,{levels:_,totalLevels:I,requireFinalApproval:J,setLevels:O,setRequireFinalApproval:function(e){K(e),null==x||x()},fetchUsers:T,onValidationError:k,customStyles:P})]}),"reminders"===V&&r("div",e({style:e(e({},h.reminderPlaceholder),P.reminderPlaceholder)},{children:[n(a,{size:32,color:"#D1D5DB"}),n("p",e({style:{color:"#9CA3AF",marginTop:12,fontSize:14}},{children:"Reminder settings coming soon…"}))]})),"review"===V&&n(p,{levels:_,reviewData:B})]})),r("div",e({style:e(e({},h.footer),P.footer)},{children:[n("button",e({style:e(e(e({},h.clearBtn),P.clearBtn),M?P.actionBtnDisabled:{}),onClick:function(){O(v.map(function(i){return e(e({},i),{assignees:[],dueDate:null})})),K(!1),Z(null)},disabled:M},{children:"Clear"})),n("button",e({style:e(e(e({},h.saveBtn),P.saveBtn),M?P.actionBtnDisabled:{}),onClick:function(){null==C||C(_),null==S||S(J),null==F||F(X),null==q||q({levels:_,requireFinalApproval:J,finalApprovalDueDate:X,activeTab:V})},disabled:M},{children:"Save Changes"}))]}))]}))}))}export{f as AssignReminderWrapper};
|
|
2
2
|
//# sourceMappingURL=AssignReminderWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignLevelAccordions.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignLevelAccordions.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AssignLevelAccordions.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignLevelAccordions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAKpD,UAAU,2BAA4B,SAAQ,mBAAmB;IAC7D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACnC,KAAK,EACL,EAAE,EACF,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,aAAa,EAChB,EAAE,2BAA2B,qBAiK7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignReminderLevels.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderLevels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAS,MAAM,eAAe,CAAC;AAsBjE,iBAAS,oBAAoB,CAAC,EAC1B,KAAK,EACL,MAAW,EACX,oBAA4B,EAC5B,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,UAAU,EACV,kBAAiD,EACjD,cAAc,EACd,iBAAiB,EACjB,YAAiB,EACjB,WAAW,GACd,EAAE,yBAAyB,
|
|
1
|
+
{"version":3,"file":"AssignReminderLevels.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderLevels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAS,MAAM,eAAe,CAAC;AAsBjE,iBAAS,oBAAoB,CAAC,EAC1B,KAAK,EACL,MAAW,EACX,oBAA4B,EAC5B,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,UAAU,EACV,kBAAiD,EACjD,cAAc,EACd,iBAAiB,EACjB,YAAiB,EACjB,WAAW,GACd,EAAE,yBAAyB,qBAkN3B;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AssignReminderWrapperProps } from "./types/types";
|
|
3
|
-
declare function AssignReminderWrapper({ metadata, reviewData, levels, setLevels, requireFinalApproval, setRequireFinalApproval, approvalDueDate, setApprovalDueDate, onClose, fetchUsers, onSave, onValidationError, totalLevels, customStyles, isSaving, }: AssignReminderWrapperProps): React.JSX.Element;
|
|
3
|
+
declare function AssignReminderWrapper({ metadata, reviewData, levels, setLevels, requireFinalApproval, setRequireFinalApproval, approvalDueDate, setApprovalDueDate, onClose, fetchUsers, onSave, onValidationError, totalLevels, customStyles, isSaving, onRequireFinalApproval, }: AssignReminderWrapperProps): React.JSX.Element;
|
|
4
4
|
export { AssignReminderWrapper };
|
|
5
5
|
//# sourceMappingURL=AssignReminderWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignReminderWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"AssignReminderWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignReminderWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAMnE,OAAO,EAAE,0BAA0B,EAAyB,MAAM,eAAe,CAAC;AAoBlF,iBAAS,qBAAqB,CAAC,EAC3B,QAAa,EACb,UAAe,EACf,MAAM,EACN,SAAS,EACT,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,OAAO,EACP,UAAU,EACV,MAAM,EACN,iBAAiB,EACjB,WAAW,EACX,YAAiB,EACjB,QAAgB,EAChB,sBAAsB,GACzB,EAAE,0BAA0B,qBA2N5B;AACD,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -56,6 +56,7 @@ export interface AssignReminderWrapperProps {
|
|
|
56
56
|
onSave?: (payload: SavePayload) => void;
|
|
57
57
|
customStyles?: Record<string, React.CSSProperties>;
|
|
58
58
|
isSaving?: boolean;
|
|
59
|
+
onRequireFinalApproval?: () => Promise<AssigneeUser>;
|
|
59
60
|
}
|
|
60
61
|
export interface AssignReminderLevelsProps {
|
|
61
62
|
title?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEzD,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,GAAG,CAAC;IACR,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,KAAK;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC9B;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,WAAW;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAChC;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;AAE5E,MAAM,WAAW,QAAQ;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAA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I,CAAC;IAC/C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssignReminders/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEzD,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,GAAG,CAAC;IACR,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,KAAK;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC9B;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,WAAW;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAChC;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;AAE5E,MAAM,WAAW,QAAQ;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,C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