@e-llm-studio/instant-learning 1.3.0-alpha.0 → 1.3.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/LearningManagement/RuleContent/RuleAccordionHeader.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/VariantCard.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNodeHeader.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleAccordionHeader.js +1 -1
- package/dist/features/LearningManagement/RuleContent/VariantCard.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeNodeHeader.js +1 -1
- package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNode.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/queries/useApprovalQueries.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/queries/useApprovalQueries.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),r=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),r=require("react"),i=require("lucide-react"),a=require("../apis/scopeApis.js"),t=require("../styles/RuleAccordion.module.css.js"),o=require("../styles/CustomTooltip.module.css.js"),l=require("./InheritanceBreadcrumb.js"),s=require("../components/ConfirmationModal.js"),u=require("../components/CustomTooltip.js"),d=require("../store/useAuthStore.js"),c=require("../store/usePermissionsStore.js"),p=require("../store/useLearningTemplateStore.js"),v=require("./ApprovalLearningDialog.js"),g=require("./ApprovalActionButton.js"),f=require("./PendingApprovalChip.js"),m=require("../queries/useApprovalQueries.js"),h=require("../store/useEnvStore.js"),j=require("primereact/toast");exports.default=function(_){var x,b,A,S,T,C,q,I,L,w,y,N,P,O=_.rule,D=_.idx,R=_.ruleSetId,B=_.isOpen,k=_.onToggle,E=_.onDelete;_.onEdit,_.isGlobalScope;var V=_.deleteButtonLabel,M=void 0===V?"Delete":V;_.editButtonLabel;var F=_.enableLearningRuleLabel,H=void 0===F?"Enable":F,z=_.disableLearningRuleLabel,G=void 0===z?"Disable":z,U=_.onToggleSuccess,Q=_.dragControls,Y=d.default.getState().user,J=c.usePermissionsStore(function(e){return e.hasPermission}),K=J("ilotj.rule.delete",R),W=J("ilotj.rule.enable",R),X=J("ilotj.rule.disable",R),Z=J("ilotj.rule.selfApprove",R),$=J("ilotj.rule.approve",R),ee=J("ilotj.scope.approve",R),ne=J("ilotj.rule.pendingApproval.view",R),re=J("ilotj.rule.variant.pendingApproval.edit",R),ie=Z||$||ee||re,ae=ne||ie,te=m.useApproveOrRejectVariantsMutation(),oe=h.default(function(e){return e.rbacConfig}),le=oe?{application:null==oe?void 0:oe.applicationId,scopeLevelModuleId:null!==(x=null==oe?void 0:oe.moduleId)&&void 0!==x?x:"",applicationLevelModuleId:null!==(b=null==oe?void 0:oe.applicationModuleId)&&void 0!==b?b:"",applicationLevelResourceId:null!==(A=null==oe?void 0:oe.applicationResourceId)&&void 0!==A?A:""}:void 0,se=r.useRef(null),ue=r.useState(!1),de=ue[0],ce=ue[1],pe=O.variants&&O.variants.length>0?!O.variants.every(function(e){return!1===e.is_enabled}):!1!==O.is_enabled,ve=r.useState(!1),ge=ve[0],fe=ve[1],me=null===(S=O.variants)||void 0===S?void 0:S.map(function(e){return e.inheritance||[]}).reduce(function(e,n){return n.length>e.length?n:e},[]),he=null===(T=O.variants)||void 0===T?void 0:T.some(function(e){return null==e?void 0:e.isOverridden}),je=pe?X:W;O.inheritance&&O.inheritance.length>0&&(null===(C=O.inheritance)||void 0===C||C.length);var _e=null!==(I=null===(q=O.variants)||void 0===q?void 0:q.length)&&void 0!==I?I:0,xe=r.useState({isOpen:!1,mode:"approve"}),be=xe[0],Ae=xe[1],Se=null!==(w=null===(L=O.variants)||void 0===L?void 0:L.filter(function(e){return"pending_approval"===e.approvalStatus}).length)&&void 0!==w?w:0,Te=p.useLearningTemplateStore(function(e){return e.urlVariantId}),Ce=p.useLearningTemplateStore(function(e){return e.urlApprovalAction}),qe=p.useLearningTemplateStore(function(e){return e.clearUrlApprovalParams});r.useEffect(function(){var e;if(Te&&Ce){var n=null===(e=O.variants)||void 0===e?void 0:e.find(function(e){return e.variantId===Te});n&&"pending_approval"===(null==n?void 0:n.approvalStatus)&&ie&&(Ae({isOpen:!0,mode:Ce}),qe())}},[Te,Ce,O.variants,qe,ie]);var Ie=function(e,n){e.stopPropagation(),Ae({isOpen:!0,mode:n})},Le=B?"".concat(t.default.accordionHeader," ").concat(t.default.accordionHeaderOpen):t.default.accordionHeader;return n.jsxs(n.Fragment,{children:[n.jsx(j.Toast,{ref:se}),n.jsx("div",e.__assign({className:Le,onClick:k},{children:n.jsxs("div",e.__assign({className:t.default.headerContent},{children:[n.jsxs("div",e.__assign({className:t.default.headerTopRow},{children:[n.jsx("div",e.__assign({className:t.default.titleSection},{children:n.jsxs("div",e.__assign({className:t.default.titleRow},{children:[n.jsx("div",e.__assign({className:t.default.dragHandle,title:"Drag to reorder",style:{touchAction:"none"},onPointerDown:function(e){e.stopPropagation(),null==Q||Q.start(e)}},{children:n.jsx(i.GripVertical,{size:18})})),n.jsxs("span",e.__assign({className:t.default.ruleTitle},{children:[D+1,". ",O.ruleTitle]})),O.dataSource&&n.jsx("span",e.__assign({className:t.default.dataSourceTag},{children:null===(y=O.dataSource)||void 0===y?void 0:y.tag})),ae&&n.jsx(f.default,{count:Se}),he&&n.jsx(u.default,e.__assign({content:"Inherited from the ".concat((null==me?void 0:me.length)>=2?me[me.length-2]:"parent"," scope and overridden in this scope."),placement:"top",withArrow:!0,contentClassName:o.default.customTooltip,sideOffset:5},{children:n.jsx("span",e.__assign({className:t.default.overriddenTag},{children:"Overridden"}))})),!pe&&n.jsx("span",e.__assign({className:t.default.learningDisabledPill},{children:"Disabled"}))]}))})),n.jsx("div",e.__assign({className:t.default.headerActions},{children:n.jsx("div",e.__assign({className:t.default.chevronIcon},{children:B?n.jsx(i.ChevronUp,{size:20}):n.jsx(i.ChevronDown,{size:20})}))}))]})),n.jsxs("div",e.__assign({className:t.default.footerRow},{children:[n.jsx(l.default,{inheritance:me||[]}),n.jsxs("div",e.__assign({className:t.default.headerButtonGroup},{children:[je&&n.jsx("button",e.__assign({onClick:function(n){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){return n.stopPropagation(),ce(!0),[2]})})},disabled:ge,className:t.default.toggleLearningButton},{children:pe?G:H})),ie&&Se>1&&n.jsxs(n.Fragment,{children:[n.jsx(g.default,{variant:"approve",text:Se>1?"Approve All":"Approve",onClick:function(e){return Ie(e,"approve")}}),n.jsx(g.default,{variant:"reject",text:Se>1?"Reject All":"Reject",onClick:function(e){return Ie(e,"reject")}})]}),K&&E&&n.jsx("button",e.__assign({className:t.default.deleteButton,onClick:function(e){e.stopPropagation(),null==E||E()}},{children:M}))]}))]}))]}))})),n.jsx(s.default,{isOpen:de,title:pe?"Disable Learning?":"Enable Learning?",description:"Are you sure you want to ".concat(pe?"disable":"enable"," this learning for ").concat(O.ruleTitle,"?"),warning:pe?"This learning will no longer influence upcoming schedules. You can enable it again anytime.":"This learning will start influencing upcoming schedules again.",confirmText:pe?"Disable":"Enable",cancelText:"Cancel",confirmBgColor:pe?"#DC2626":"#16A34A",onConfirm:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,i;return e.__generator(this,function(e){switch(e.label){case 0:fe(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),0===(n=(null===(i=O.variants)||void 0===i?void 0:i.map(function(e){return e.variantId}))||[]).length&&O.ruleId&&n.push(O.ruleId),null==Y?void 0:Y.email,[4,a.toggleVariant(n,!pe)];case 2:return e.sent(),null==U||U(),[3,5];case 3:return r=e.sent(),console.error("Failed to toggle rule variants",r),[3,5];case 4:return fe(!1),ce(!1),[7];case 5:return[2]}})})},onCancel:function(){return ce(!1)},isLoading:ge}),n.jsx(v.default,{open:be.isOpen,mode:be.mode,onClose:function(){return Ae(function(n){return e.__assign(e.__assign({},n),{isOpen:!1})})},onSubmit:function(n){return function(n){var r,i,a=null!==(i=null===(r=O.variants)||void 0===r?void 0:r.filter(function(e){return"pending_approval"===e.approvalStatus}).map(function(e){return e.variantId}))&&void 0!==i?i:[];a.length&&R&&te.mutate({variantIds:a,status:"approve"===be.mode?"approved":"rejected",feedback:n.feedback,scopeId:R,appsecData:le},{onSuccess:function(){var n;Ae(function(n){return e.__assign(e.__assign({},n),{isOpen:!1})}),null==U||U(),null===(n=se.current)||void 0===n||n.show({severity:"success",summary:"".concat(be.mode," Successfully"),detail:"approve"===be.mode?"Learning approved successfully":"Learning rejected successfully"})},onError:function(e){var n;console.error("An error occurred during rejecting.",e),null===(n=se.current)||void 0===n||n.show({severity:"error",summary:"".concat(be.mode," Failed"),detail:"There was an error ".concat("approve"===be.mode?"approving":"rejecting"," the learning. Please try again.")})}})}(n)},variantInformation:"".concat(O.ruleTitle,"-").concat(_e>1?"Variants":"Variant 1"),ruleTitle:O.ruleTitle,pendingVariants:null!==(P=null===(N=O.variants)||void 0===N?void 0:N.filter(function(e){return"pending_approval"===e.approvalStatus}))&&void 0!==P?P:[],isPending:te.isPending})]})};
|
|
2
2
|
//# sourceMappingURL=RuleAccordionHeader.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),a=require("date-fns"),i=require("lucide-react"),r=require("../apis/scopeApis.js"),s=require("./HistorySkeleton.js"),o=require("./InheritanceBreadcrumb.js"),l=require("./RuleConditionBlock.js"),d=require("../styles/VariantCard.module.css.js"),c=require("../styles/CustomTooltip.module.css.js"),u=require("../components/CustomTooltip.js"),p=require("../components/ConfirmationModal.js"),v=require("./OverrideTimeline.js"),f=require("../store/useAuthStore.js"),h=require("../store/usePermissionsStore.js"),g=require("./PendingApprovalChip.js"),m=require("./ApprovalActionButton.js"),_=require("./ApprovalLearningDialog.js"),j=require("../queries/useApprovalQueries.js"),x=require("../store/useEnvStore.js"),y=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter(Boolean).join(" ")};exports.default=function(b){var T,A,C,N,w,I,S,L=b.ruleTitle,B=b.variant,D=b.variantIndex,O=b.totalVariants,q=b.ruleId;b.pendingApprovalCount;var F=b.ruleSetId,k=b.tierName,E=b.displayLabel,H=b.onEdit,P=b.onDelete,V=b.onFetchOverrideHistory,M=b.editButtonLabel,R=void 0===M?"Edit":M,W=b.deleteButtonLabel,z=void 0===W?"Delete":W,U=b.whenToApplyLabel,G=void 0===U?"When to Apply":U,Z=b.whenNotToApplyLabel,K=void 0===Z?"When Not to Apply":Z,Q=b.noConditionsText,Y=void 0===Q?"No conditions":Q,$=b.viewOverrideLabel,J=void 0===$?"View Override History":$,X=b.hideOverrideLabel,ee=void 0===X?"Hide Override History":X,ne=b.enableLearningVariantLabel,te=void 0===ne?"Enable":ne,ae=b.disableLearningVariantLabel,ie=void 0===ae?"Disable":ae,re=b.historyErrorMessage,se=void 0===re?"Failed to load override history.":re,oe=b.resolveGapsLabel,le=void 0===oe?"This learning has some gaps":oe,de=b.showActionsBar,ce=void 0===de||de,ue=b.showDescriptionBox,pe=void 0===ue||ue,ve=b.showConditions,fe=void 0===ve||ve,he=b.showInheritance,ge=void 0===he||he,me=b.defaultApplyOpen,_e=void 0===me||me,je=b.defaultNotApplyOpen,xe=void 0===je||je,ye=b.className,be=b.isHighlighted,Te=void 0!==be&&be,Ae=b.highlightAction,Ce=b.highlightedTierNames,Ne=b.highlightedVariantIds,we=b.headerContent,Ie=b.footerContent,Se=b.onToggleSuccess,Le=b.setDeleteConfirmationUsedFor,Be=b.onCopyToTier,De=b.onSetInitialDraftMessage,Oe=f.default.getState().user,qe=t.useState(_e),Fe=qe[0],ke=qe[1],Ee=t.useState(xe),He=Ee[0],Pe=Ee[1],Ve=t.useState(!1),Me=Ve[0],Re=Ve[1],We=t.useState(!1),ze=We[0],Ue=We[1],Ge=t.useState(null),Ze=Ge[0],Ke=Ge[1],Qe=t.useState(null),Ye=Qe[0],$e=Qe[1],Je=t.useState(!1),Xe=Je[0],en=Je[1],nn=t.useState(!1),tn=nn[0],an=nn[1],rn=t.useRef(null),sn=!1!==B.is_enabled,on=t.useState(!1),ln=on[0],dn=on[1],cn=t.useRef(null),un=t.useState({isOpen:!1,mode:"approve"}),pn=un[0],vn=un[1],fn=j.useApproveOrRejectVariantsMutation(),hn=x.default(function(e){return e.rbacConfig}),gn=hn?{application:hn.applicationId,scopeLevelModuleId:null!==(T=null==hn?void 0:hn.moduleId)&&void 0!==T?T:""}:void 0,mn=h.usePermissionsStore(function(e){return e.hasPermission}),_n=F,jn=B.inheritance&&B.inheritance.length>1,xn=mn("ilotj.rule.variant.edit",_n)||mn(jn?"ilotj.rule.variant.inherited.edit":"ilotj.rule.variant.nonInherited.edit",_n),yn=mn("ilotj.rule.variant.enable",_n)||mn(jn?"ilotj.rule.variant.inherited.enable":"ilotj.rule.variant.nonInherited.enable",_n),bn=mn("ilotj.rule.variant.disable",_n)||mn(jn?"ilotj.rule.variant.inherited.disable":"ilotj.rule.variant.nonInherited.disable",_n),Tn=mn("ilotj.rule.variant.delete",_n),An=mn("ilotj.rule.selfApprove",_n),Cn=mn("ilotj.rule.approve",_n),Nn=mn("ilotj.scope.approve",_n),wn=mn("ilotj.rule.pendingApproval.view",_n),In=mn("ilotj.rule.variant.pendingApproval.edit",_n),Sn=An||Cn||Nn||In,Ln=wn||Sn,Bn="pending_approval"===(null==B?void 0:B.approvalStatus),Dn="rejected"===(null==B?void 0:B.approvalStatus),On=Sn&&Bn;t.useEffect(function(){var e=function(e){rn.current&&!rn.current.contains(e.target)&&en(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var qn=(null===(A=null==Ze?void 0:Ze.wta)||void 0===A?void 0:A.changeLog)||[],Fn=(null===(C=null==Ze?void 0:Ze.wnta)||void 0===C?void 0:C.changeLog)||[],kn=Te&&Ce&&k?Ce.filter(function(e){return e!==k}):[],En=kn.length>0&&k?kn.every(function(e){return e>k})?"↓":"↑":"↓",Hn=function(){if(Ne)for(var e=Array.from(Ne),n=0;n<e.length;n++)if(e[n]!==B.variantId){var t=document.querySelector('[data-variant-id="'.concat(e[n],'"]'));if(t){t.scrollIntoView({behavior:"smooth",block:"center"});break}}},Pn=function(e,n){e.stopPropagation(),vn({isOpen:!0,mode:n})},Vn=function(e){if(!e)return"";try{var n=e.endsWith("Z")||/[+-]\d{2}:\d{2}$/.test(e)?e:"".concat(e,"Z"),t=a.parseISO(n);return a.isValid(t)?a.format(t,"MMM d, yyyy 'at' h:mm a"):e}catch(n){return e}},Mn=function(e){return e?e.includes("@")?e.split("@")[0].split(".").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" "):e:""};return n.jsxs("div",e.__assign({className:y(d.default.variantCard,Te&&d.default.variantHighlight,ye),"data-variant-id":B.variantId},{children:[n.jsxs("div",e.__assign({className:d.default.variantHeader,style:{alignItems:"flex-start",gap:"0.75rem"}},{children:[n.jsxs("div",e.__assign({className:d.default.variantLabelSection,style:{display:"flex",flexWrap:"wrap"}},{children:[n.jsx("span",e.__assign({className:d.default.variantLabel},{children:"Default"===B.variantType&&"Default"!==E?"Default | ".concat(E):E})),Te&&Ae&&n.jsx("span",e.__assign({className:y(d.default.actionChip,"new"===Ae?d.default.actionChipNew:d.default.actionChipUpdated)},{children:"new"===Ae?"Created":"Updated"})),(null==B?void 0:B.isOverridden)&&n.jsx(u.default,e.__assign({content:"Inherited from the ".concat((null===(N=B.inheritance)||void 0===N?void 0:N[(null===(w=B.inheritance)||void 0===w?void 0:w.length)-2])||"parent"," scope and overridden in this scope."),placement:"top",withArrow:!0,contentClassName:c.default.customTooltip,sideOffset:5},{children:n.jsx("span",e.__assign({className:d.default.overriddenTag},{children:"Overridden"}))})),Ln&&Bn&&n.jsx(g.default,{}),Dn&&n.jsx("span",e.__assign({style:{backgroundColor:"#FEF2F2",color:"#EF4444",border:"1px solid #FECACA",padding:"2px 8px",borderRadius:"9999px",fontSize:"0.75rem",fontWeight:500,display:"inline-flex",alignItems:"center"}},{children:"Rejected"})),!sn&&n.jsx("span",e.__assign({className:d.default.learningDisabledPill},{children:"Disabled"})),ge&&1!==O&&0!==D&&n.jsx("div",e.__assign({className:d.default.inheritanceSection},{children:n.jsx(o.default,{inheritance:B.inheritance||[]})}))]})),ce&&n.jsxs("div",e.__assign({className:d.default.variantActions},{children:[On&&n.jsxs(n.Fragment,{children:[n.jsx(m.default,{variant:"approve",text:"Approve",onClick:function(e){return Pn(e,"approve")}}),n.jsx(m.default,{variant:"reject",text:"Reject",onClick:function(e){return Pn(e,"reject")}})]}),H&&xn&&n.jsx("button",e.__assign({className:d.default.editButton,onClick:function(){null==H||H(B,q,k,"edit")}},{children:R})),P&&Tn&&"Default"!==B.variantType&&n.jsx("button",e.__assign({className:d.default.deleteButton,onClick:function(){null==Le||Le("variantDeletion"),null==P||P(B.variantId,q)}},{children:z})),n.jsxs("div",e.__assign({className:d.default.menuWrapper,ref:rn},{children:[n.jsx("button",e.__assign({onClick:function(){return en(!Xe)},className:"".concat(d.default.menuTrigger," ").concat(Xe?d.default.menuTriggerActive:"")},{children:n.jsx(i.MoreVertical,{size:16})})),Xe&&n.jsxs("div",e.__assign({className:d.default.menuDropdown},{children:[(sn&&bn||!sn&&yn)&&n.jsxs("button",e.__assign({onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){return en(!1),dn(!0),[2]})})},disabled:tn,className:"".concat(d.default.menuItem," ").concat(tn?d.default.menuItemDisabled:"")},{children:[sn?n.jsx(i.Pause,{size:14}):n.jsx(i.Play,{size:14}),sn?ie:te]})),k&&n.jsxs("button",e.__assign({onClick:function(){var e="Tier 1"===k?"Tier 2":"Tier 1",n="Add a new learning in ".concat(e," with the following details:\nLearning Title: ").concat(L,"\nLearning Description: ").concat(B.description,"\nWhen to apply: ").concat(B.whenToApply,"\nWhen not to apply: ").concat(B.whenNotToApply);null==De||De(n),en(!1),null==Be||Be(B,q,L||"",k,e)},className:d.default.menuItem},{children:[n.jsx(i.Copy,{size:14}),"Copy to ","Tier 1"===k?"Tier 2":"Tier 1"]})),V&&(null!==(S=null===(I=B.inheritance)||void 0===I?void 0:I.length)&&void 0!==S?S:0)>1&&n.jsxs("button",e.__assign({onClick:function(){en(!1),e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(e){switch(e.label){case 0:if(Me)return Re(!1),[2];if(Re(!0),!V)return[2];Ue(!0),$e(null),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,V(q,B.variantId)];case 2:return n=e.sent(),Ke(n),[3,5];case 3:return e.sent(),$e(se),[3,5];case 4:return Ue(!1),[7];case 5:return[2]}})})},className:d.default.menuItem},{children:[n.jsx(i.Eye,{size:14}),Me?ee:J]}))]}))]}))]}))]})),we,pe&&B.description&&n.jsxs("div",e.__assign({className:d.default.descriptionBox},{children:[n.jsx("p",e.__assign({className:d.default.descriptionText},{children:B.description})),Me&&(ze?n.jsx(s.HistorySkeleton,{}):Ye?n.jsx("p",e.__assign({className:d.default.errorText},{children:Ye})):(null==Ze?void 0:Ze.ruleDescription)?n.jsx(v.default,{changeLog:Ze.ruleDescription.changeLog}):n.jsx("p",e.__assign({className:d.default.noHistoryText},{children:"No override history found"})))]})),fe&&n.jsxs("div",e.__assign({className:d.default.conditionsContainer},{children:[n.jsx(l.default,{type:"apply",conditions:B.whenToApply||"",isOpen:Fe,onToggle:function(){return ke(!Fe)},labelText:G,noConditionsText:Y,showOverrideHistory:Me,isLoadingHistory:ze,historyError:Ye,overrideHistoryData:qn}),n.jsx(l.default,{type:"notApply",conditions:B.whenNotToApply||"",isOpen:He,onToggle:function(){return Pe(!He)},labelText:K,noConditionsText:Y,showOverrideHistory:Me,isLoadingHistory:ze,historyError:Ye,overrideHistoryData:Fn})]})),Te&&kn.length>0&&n.jsxs("div",e.__assign({className:d.default.crossTierBanner},{children:[n.jsx(i.Info,{className:d.default.crossTierBannerIcon}),n.jsxs("span",e.__assign({className:d.default.crossTierBannerText},{children:["Also created in ",kn.join(", "),"."]})),n.jsxs("span",e.__assign({className:d.default.crossTierBannerLink,onClick:Hn,role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&Hn()}},{children:["Scroll to view ",En]}))]})),Ie,(B.createdBy||B.createdAt)&&n.jsxs("div",e.__assign({className:d.default.variantFooter},{children:[!0===B.is_user_accepted_risk&&n.jsxs("div",e.__assign({className:d.default.resolveGaps},{children:[n.jsx(i.TriangleAlert,{size:14,color:"#EF4444"}),n.jsx("span",e.__assign({className:d.default.resolveGapsText},{children:le})),xn&&n.jsx("button",e.__assign({onClick:function(){null==H||H(B,q,k,"resolve_gaps")},className:d.default.resolveButton},{children:"Resolve"}))]})),n.jsx("div",e.__assign({className:d.default.variantFooterContent},{children:B.updatedBy||B.updatedAt?n.jsxs(n.Fragment,{children:[B.updatedBy&&n.jsx(u.default,e.__assign({content:B.createdBy?"Created by ".concat(Mn(B.createdBy)):"",contentClassName:c.default.customTooltip,sideOffset:5,placement:"top"},{children:n.jsxs("span",e.__assign({className:d.default.variantFooterItem},{children:["Updated by ",Mn(B.updatedBy)]}))})),B.updatedBy&&B.updatedAt&&n.jsx("span",e.__assign({className:d.default.variantFooterSeparator},{children:"•"})),B.updatedAt&&n.jsx(u.default,e.__assign({content:B.createdAt?"Created at ".concat(Vn(B.createdAt)):"",contentClassName:c.default.customTooltip,sideOffset:5,placement:"top"},{children:n.jsx("span",e.__assign({className:d.default.variantFooterItem},{children:Vn(B.updatedAt)}))}))]}):n.jsxs(n.Fragment,{children:[B.createdBy&&n.jsxs("span",e.__assign({className:d.default.variantFooterItem},{children:["Created by ",Mn(B.createdBy)]})),B.createdBy&&B.createdAt&&n.jsx("span",e.__assign({className:d.default.variantFooterSeparator},{children:"•"})),B.createdAt&&n.jsx("span",e.__assign({className:d.default.variantFooterItem},{children:Vn(B.createdAt)}))]})}))]})),n.jsx(p.default,{isOpen:ln,title:sn?"Disable Learning":"Enable Learning",description:"Are you sure you want to ".concat(sn?"disable":"enable"," learning for this variant in ").concat(L,"?"),warning:sn?"This variant will no longer influence upcoming schedules. You can enable it again anytime.":"This variant will start influencing upcoming schedules again.",confirmText:sn?"Disable":"Enable",cancelText:"Cancel",confirmBgColor:sn?"#DC2626":"#16A34A",onConfirm:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(e){switch(e.label){case 0:an(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),null==Oe?void 0:Oe.email,[4,r.toggleVariant([B.variantId],!sn)];case 2:return e.sent(),null==Se||Se(),[3,5];case 3:return n=e.sent(),console.error("Failed to toggle variant",n),[3,5];case 4:return an(!1),en(!1),dn(!1),[7];case 5:return[2]}})})},onCancel:function(){return dn(!1)},isLoading:tn,position:"fixed"}),n.jsx(_.default,{open:pn.isOpen,mode:pn.mode,onClose:function(){return vn(function(n){return e.__assign(e.__assign({},n),{isOpen:!1})})},onSubmit:function(n){F&&fn.mutate({variantIds:[B.variantId],status:"approve"===pn.mode?"approved":"rejected",feedback:n.feedback,is_deleted:n.deleteLearning,scopeId:F,appsecData:gn},{onSuccess:function(){var n;vn(function(n){return e.__assign(e.__assign({},n),{isOpen:!1})}),null==Se||Se(),null===(n=cn.current)||void 0===n||n.show({severity:"success",summary:"".concat("approve"===pn.mode?"Approved":"Rejected"," Successfully"),detail:"Learning ".concat("approve"===pn.mode?"approved":"rejected"," successfully.")})},onError:function(e){var n;console.error("An error occurred.",e),null===(n=cn.current)||void 0===n||n.show({severity:"error",summary:"Action Failed",detail:"There was an error processing the learning. Please try again."})}})},variantInformation:"".concat(L," — ").concat(E),ruleTitle:L,pendingVariants:[B],isPending:fn.isPending})]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),a=require("date-fns"),i=require("lucide-react"),r=require("../apis/scopeApis.js"),s=require("./HistorySkeleton.js"),o=require("./InheritanceBreadcrumb.js"),l=require("./RuleConditionBlock.js"),d=require("../styles/VariantCard.module.css.js"),c=require("../styles/CustomTooltip.module.css.js"),u=require("../components/CustomTooltip.js"),p=require("../components/ConfirmationModal.js"),v=require("./OverrideTimeline.js"),f=require("../store/useAuthStore.js"),h=require("../store/usePermissionsStore.js"),g=require("./PendingApprovalChip.js"),m=require("./ApprovalActionButton.js"),_=require("./ApprovalLearningDialog.js"),j=require("../queries/useApprovalQueries.js"),x=require("../store/useEnvStore.js"),y=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter(Boolean).join(" ")};exports.default=function(b){var T,A,C,N,w,I,L,S,B,D=b.ruleTitle,O=b.variant,q=b.variantIndex,F=b.totalVariants,k=b.ruleId;b.pendingApprovalCount;var E=b.ruleSetId,H=b.tierName,M=b.displayLabel,P=b.onEdit,V=b.onDelete,R=b.onFetchOverrideHistory,W=b.editButtonLabel,z=void 0===W?"Edit":W,U=b.deleteButtonLabel,G=void 0===U?"Delete":U,Z=b.whenToApplyLabel,K=void 0===Z?"When to Apply":Z,Q=b.whenNotToApplyLabel,Y=void 0===Q?"When Not to Apply":Q,$=b.noConditionsText,J=void 0===$?"No conditions":$,X=b.viewOverrideLabel,ee=void 0===X?"View Override History":X,ne=b.hideOverrideLabel,te=void 0===ne?"Hide Override History":ne,ae=b.enableLearningVariantLabel,ie=void 0===ae?"Enable":ae,re=b.disableLearningVariantLabel,se=void 0===re?"Disable":re,oe=b.historyErrorMessage,le=void 0===oe?"Failed to load override history.":oe,de=b.resolveGapsLabel,ce=void 0===de?"This learning has some gaps":de,ue=b.showActionsBar,pe=void 0===ue||ue,ve=b.showDescriptionBox,fe=void 0===ve||ve,he=b.showConditions,ge=void 0===he||he,me=b.showInheritance,_e=void 0===me||me,je=b.defaultApplyOpen,xe=void 0===je||je,ye=b.defaultNotApplyOpen,be=void 0===ye||ye,Te=b.className,Ae=b.isHighlighted,Ce=void 0!==Ae&&Ae,Ne=b.highlightAction,we=b.highlightedTierNames,Ie=b.highlightedVariantIds,Le=b.headerContent,Se=b.footerContent,Be=b.onToggleSuccess,De=b.setDeleteConfirmationUsedFor,Oe=b.onCopyToTier,qe=b.onSetInitialDraftMessage,Fe=f.default.getState().user,ke=t.useState(xe),Ee=ke[0],He=ke[1],Me=t.useState(be),Pe=Me[0],Ve=Me[1],Re=t.useState(!1),We=Re[0],ze=Re[1],Ue=t.useState(!1),Ge=Ue[0],Ze=Ue[1],Ke=t.useState(null),Qe=Ke[0],Ye=Ke[1],$e=t.useState(null),Je=$e[0],Xe=$e[1],en=t.useState(!1),nn=en[0],tn=en[1],an=t.useState(!1),rn=an[0],sn=an[1],on=t.useRef(null),ln=!1!==O.is_enabled,dn=t.useState(!1),cn=dn[0],un=dn[1],pn=t.useRef(null),vn=t.useState({isOpen:!1,mode:"approve"}),fn=vn[0],hn=vn[1],gn=j.useApproveOrRejectVariantsMutation(),mn=x.default(function(e){return e.rbacConfig}),_n=mn?{application:mn.applicationId,scopeLevelModuleId:null!==(T=null==mn?void 0:mn.moduleId)&&void 0!==T?T:"",applicationLevelModuleId:null!==(A=null==mn?void 0:mn.applicationModuleId)&&void 0!==A?A:"",applicationLevelResourceId:null!==(C=null==mn?void 0:mn.applicationResourceId)&&void 0!==C?C:""}:void 0,jn=h.usePermissionsStore(function(e){return e.hasPermission}),xn=E,yn=O.inheritance&&O.inheritance.length>1,bn=jn("ilotj.rule.variant.edit",xn)||jn(yn?"ilotj.rule.variant.inherited.edit":"ilotj.rule.variant.nonInherited.edit",xn),Tn=jn("ilotj.rule.variant.enable",xn)||jn(yn?"ilotj.rule.variant.inherited.enable":"ilotj.rule.variant.nonInherited.enable",xn),An=jn("ilotj.rule.variant.disable",xn)||jn(yn?"ilotj.rule.variant.inherited.disable":"ilotj.rule.variant.nonInherited.disable",xn),Cn=jn("ilotj.rule.variant.delete",xn),Nn=jn("ilotj.rule.selfApprove",xn),wn=jn("ilotj.rule.approve",xn),In=jn("ilotj.scope.approve",xn),Ln=jn("ilotj.rule.pendingApproval.view",xn),Sn=jn("ilotj.rule.variant.pendingApproval.edit",xn),Bn=Nn||wn||In||Sn,Dn=Ln||Bn,On="pending_approval"===(null==O?void 0:O.approvalStatus),qn="rejected"===(null==O?void 0:O.approvalStatus),Fn=Bn&&On;t.useEffect(function(){var e=function(e){on.current&&!on.current.contains(e.target)&&tn(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var kn=(null===(N=null==Qe?void 0:Qe.wta)||void 0===N?void 0:N.changeLog)||[],En=(null===(w=null==Qe?void 0:Qe.wnta)||void 0===w?void 0:w.changeLog)||[],Hn=Ce&&we&&H?we.filter(function(e){return e!==H}):[],Mn=Hn.length>0&&H?Hn.every(function(e){return e>H})?"↓":"↑":"↓",Pn=function(){if(Ie)for(var e=Array.from(Ie),n=0;n<e.length;n++)if(e[n]!==O.variantId){var t=document.querySelector('[data-variant-id="'.concat(e[n],'"]'));if(t){t.scrollIntoView({behavior:"smooth",block:"center"});break}}},Vn=function(e,n){e.stopPropagation(),hn({isOpen:!0,mode:n})},Rn=function(e){if(!e)return"";try{var n=e.endsWith("Z")||/[+-]\d{2}:\d{2}$/.test(e)?e:"".concat(e,"Z"),t=a.parseISO(n);return a.isValid(t)?a.format(t,"MMM d, yyyy 'at' h:mm a"):e}catch(n){return e}},Wn=function(e){return e?e.includes("@")?e.split("@")[0].split(".").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" "):e:""};return n.jsxs("div",e.__assign({className:y(d.default.variantCard,Ce&&d.default.variantHighlight,Te),"data-variant-id":O.variantId},{children:[n.jsxs("div",e.__assign({className:d.default.variantHeader,style:{alignItems:"flex-start",gap:"0.75rem"}},{children:[n.jsxs("div",e.__assign({className:d.default.variantLabelSection,style:{display:"flex",flexWrap:"wrap"}},{children:[n.jsx("span",e.__assign({className:d.default.variantLabel},{children:"Default"===O.variantType&&"Default"!==M?"Default | ".concat(M):M})),Ce&&Ne&&n.jsx("span",e.__assign({className:y(d.default.actionChip,"new"===Ne?d.default.actionChipNew:d.default.actionChipUpdated)},{children:"new"===Ne?"Created":"Updated"})),(null==O?void 0:O.isOverridden)&&n.jsx(u.default,e.__assign({content:"Inherited from the ".concat((null===(I=O.inheritance)||void 0===I?void 0:I[(null===(L=O.inheritance)||void 0===L?void 0:L.length)-2])||"parent"," scope and overridden in this scope."),placement:"top",withArrow:!0,contentClassName:c.default.customTooltip,sideOffset:5},{children:n.jsx("span",e.__assign({className:d.default.overriddenTag},{children:"Overridden"}))})),Dn&&On&&n.jsx(g.default,{}),qn&&n.jsx("span",e.__assign({style:{backgroundColor:"#FEF2F2",color:"#EF4444",border:"1px solid #FECACA",padding:"2px 8px",borderRadius:"9999px",fontSize:"0.75rem",fontWeight:500,display:"inline-flex",alignItems:"center"}},{children:"Rejected"})),!ln&&n.jsx("span",e.__assign({className:d.default.learningDisabledPill},{children:"Disabled"})),_e&&1!==F&&0!==q&&n.jsx("div",e.__assign({className:d.default.inheritanceSection},{children:n.jsx(o.default,{inheritance:O.inheritance||[]})}))]})),pe&&n.jsxs("div",e.__assign({className:d.default.variantActions},{children:[Fn&&n.jsxs(n.Fragment,{children:[n.jsx(m.default,{variant:"approve",text:"Approve",onClick:function(e){return Vn(e,"approve")}}),n.jsx(m.default,{variant:"reject",text:"Reject",onClick:function(e){return Vn(e,"reject")}})]}),P&&bn&&n.jsx("button",e.__assign({className:d.default.editButton,onClick:function(){null==P||P(O,k,H,"edit")}},{children:z})),V&&Cn&&"Default"!==O.variantType&&n.jsx("button",e.__assign({className:d.default.deleteButton,onClick:function(){null==De||De("variantDeletion"),null==V||V(O.variantId,k)}},{children:G})),n.jsxs("div",e.__assign({className:d.default.menuWrapper,ref:on},{children:[n.jsx("button",e.__assign({onClick:function(){return tn(!nn)},className:"".concat(d.default.menuTrigger," ").concat(nn?d.default.menuTriggerActive:"")},{children:n.jsx(i.MoreVertical,{size:16})})),nn&&n.jsxs("div",e.__assign({className:d.default.menuDropdown},{children:[(ln&&An||!ln&&Tn)&&n.jsxs("button",e.__assign({onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){return tn(!1),un(!0),[2]})})},disabled:rn,className:"".concat(d.default.menuItem," ").concat(rn?d.default.menuItemDisabled:"")},{children:[ln?n.jsx(i.Pause,{size:14}):n.jsx(i.Play,{size:14}),ln?se:ie]})),H&&n.jsxs("button",e.__assign({onClick:function(){var e="Tier 1"===H?"Tier 2":"Tier 1",n="Add a new learning in ".concat(e," with the following details:\nLearning Title: ").concat(D,"\nLearning Description: ").concat(O.description,"\nWhen to apply: ").concat(O.whenToApply,"\nWhen not to apply: ").concat(O.whenNotToApply);null==qe||qe(n),tn(!1),null==Oe||Oe(O,k,D||"",H,e)},className:d.default.menuItem},{children:[n.jsx(i.Copy,{size:14}),"Copy to ","Tier 1"===H?"Tier 2":"Tier 1"]})),R&&(null!==(B=null===(S=O.inheritance)||void 0===S?void 0:S.length)&&void 0!==B?B:0)>1&&n.jsxs("button",e.__assign({onClick:function(){tn(!1),e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(e){switch(e.label){case 0:if(We)return ze(!1),[2];if(ze(!0),!R)return[2];Ze(!0),Xe(null),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,R(k,O.variantId)];case 2:return n=e.sent(),Ye(n),[3,5];case 3:return e.sent(),Xe(le),[3,5];case 4:return Ze(!1),[7];case 5:return[2]}})})},className:d.default.menuItem},{children:[n.jsx(i.Eye,{size:14}),We?te:ee]}))]}))]}))]}))]})),Le,fe&&O.description&&n.jsxs("div",e.__assign({className:d.default.descriptionBox},{children:[n.jsx("p",e.__assign({className:d.default.descriptionText},{children:O.description})),We&&(Ge?n.jsx(s.HistorySkeleton,{}):Je?n.jsx("p",e.__assign({className:d.default.errorText},{children:Je})):(null==Qe?void 0:Qe.ruleDescription)?n.jsx(v.default,{changeLog:Qe.ruleDescription.changeLog}):n.jsx("p",e.__assign({className:d.default.noHistoryText},{children:"No override history found"})))]})),ge&&n.jsxs("div",e.__assign({className:d.default.conditionsContainer},{children:[n.jsx(l.default,{type:"apply",conditions:O.whenToApply||"",isOpen:Ee,onToggle:function(){return He(!Ee)},labelText:K,noConditionsText:J,showOverrideHistory:We,isLoadingHistory:Ge,historyError:Je,overrideHistoryData:kn}),n.jsx(l.default,{type:"notApply",conditions:O.whenNotToApply||"",isOpen:Pe,onToggle:function(){return Ve(!Pe)},labelText:Y,noConditionsText:J,showOverrideHistory:We,isLoadingHistory:Ge,historyError:Je,overrideHistoryData:En})]})),Ce&&Hn.length>0&&n.jsxs("div",e.__assign({className:d.default.crossTierBanner},{children:[n.jsx(i.Info,{className:d.default.crossTierBannerIcon}),n.jsxs("span",e.__assign({className:d.default.crossTierBannerText},{children:["Also created in ",Hn.join(", "),"."]})),n.jsxs("span",e.__assign({className:d.default.crossTierBannerLink,onClick:Pn,role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&Pn()}},{children:["Scroll to view ",Mn]}))]})),Se,(O.createdBy||O.createdAt)&&n.jsxs("div",e.__assign({className:d.default.variantFooter},{children:[!0===O.is_user_accepted_risk&&n.jsxs("div",e.__assign({className:d.default.resolveGaps},{children:[n.jsx(i.TriangleAlert,{size:14,color:"#EF4444"}),n.jsx("span",e.__assign({className:d.default.resolveGapsText},{children:ce})),bn&&n.jsx("button",e.__assign({onClick:function(){null==P||P(O,k,H,"resolve_gaps")},className:d.default.resolveButton},{children:"Resolve"}))]})),n.jsx("div",e.__assign({className:d.default.variantFooterContent},{children:O.updatedBy||O.updatedAt?n.jsxs(n.Fragment,{children:[O.updatedBy&&n.jsx(u.default,e.__assign({content:O.createdBy?"Created by ".concat(Wn(O.createdBy)):"",contentClassName:c.default.customTooltip,sideOffset:5,placement:"top"},{children:n.jsxs("span",e.__assign({className:d.default.variantFooterItem},{children:["Updated by ",Wn(O.updatedBy)]}))})),O.updatedBy&&O.updatedAt&&n.jsx("span",e.__assign({className:d.default.variantFooterSeparator},{children:"•"})),O.updatedAt&&n.jsx(u.default,e.__assign({content:O.createdAt?"Created at ".concat(Rn(O.createdAt)):"",contentClassName:c.default.customTooltip,sideOffset:5,placement:"top"},{children:n.jsx("span",e.__assign({className:d.default.variantFooterItem},{children:Rn(O.updatedAt)}))}))]}):n.jsxs(n.Fragment,{children:[O.createdBy&&n.jsxs("span",e.__assign({className:d.default.variantFooterItem},{children:["Created by ",Wn(O.createdBy)]})),O.createdBy&&O.createdAt&&n.jsx("span",e.__assign({className:d.default.variantFooterSeparator},{children:"•"})),O.createdAt&&n.jsx("span",e.__assign({className:d.default.variantFooterItem},{children:Rn(O.createdAt)}))]})}))]})),n.jsx(p.default,{isOpen:cn,title:ln?"Disable Learning":"Enable Learning",description:"Are you sure you want to ".concat(ln?"disable":"enable"," learning for this variant in ").concat(D,"?"),warning:ln?"This variant will no longer influence upcoming schedules. You can enable it again anytime.":"This variant will start influencing upcoming schedules again.",confirmText:ln?"Disable":"Enable",cancelText:"Cancel",confirmBgColor:ln?"#DC2626":"#16A34A",onConfirm:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(e){switch(e.label){case 0:sn(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),null==Fe?void 0:Fe.email,[4,r.toggleVariant([O.variantId],!ln)];case 2:return e.sent(),null==Be||Be(),[3,5];case 3:return n=e.sent(),console.error("Failed to toggle variant",n),[3,5];case 4:return sn(!1),tn(!1),un(!1),[7];case 5:return[2]}})})},onCancel:function(){return un(!1)},isLoading:rn,position:"fixed"}),n.jsx(_.default,{open:fn.isOpen,mode:fn.mode,onClose:function(){return hn(function(n){return e.__assign(e.__assign({},n),{isOpen:!1})})},onSubmit:function(n){E&&gn.mutate({variantIds:[O.variantId],status:"approve"===fn.mode?"approved":"rejected",feedback:n.feedback,is_deleted:n.deleteLearning,scopeId:E,appsecData:_n},{onSuccess:function(){var n;hn(function(n){return e.__assign(e.__assign({},n),{isOpen:!1})}),null==Be||Be(),null===(n=pn.current)||void 0===n||n.show({severity:"success",summary:"".concat("approve"===fn.mode?"Approved":"Rejected"," Successfully"),detail:"Learning ".concat("approve"===fn.mode?"approved":"rejected"," successfully.")})},onError:function(e){var n;console.error("An error occurred.",e),null===(n=pn.current)||void 0===n||n.show({severity:"error",summary:"Action Failed",detail:"There was an error processing the learning. Please try again."})}})},variantInformation:"".concat(D," — ").concat(M),ruleTitle:D,pendingVariants:[O],isPending:gn.isPending})]}))};
|
|
2
2
|
//# sourceMappingURL=VariantCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("lucide-react"),o=require("../../styles/ScopeTree.module.css.js"),d=require("./TreeNodeHeader.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("lucide-react"),o=require("../../styles/ScopeTree.module.css.js"),d=require("./TreeNodeHeader.js"),t=require("./TreeSectionItem.js"),l=require("./TreeAddAction.js"),r=function(a){var s,c,u,p=a.node,h=a.depth,v=void 0===h?0:h,C=a.nodePath,m=void 0===C?[]:C,f=a.expandedNodeIds,b=a.activeSelection,g=a.onToggleExpand,y=a.onSectionSelect,T=a.onNodeOptionsClick,x=a.onAddChild,S=a.onRenameChild,A=a.onDeleteChild,_=a.canDeleteScope,j=a.canEditScope,N=a.canCreateScope,P=a.searchQuery,L=a.sectionsConfig,k=void 0===L?[]:L,q=a.nodeTypesConfig,E=void 0===q?[]:q,w=a.forceVisible,D=void 0!==w&&w,I=e.__spreadArray(e.__spreadArray([],m,!0),[p.id],!1),O=f.has(p.id),V=!!b&&b.nodePath[b.nodePath.length-1]===p.id,Q=!!b&&(b.nodePath.includes(p.id)&&!V),R=function(e,i){if(!i)return!0;var n=i.toLowerCase();return!!e.name.toLowerCase().includes(n)||!!e.children&&e.children.some(function(e){return R(e,i)})};if(!D&&!R(p,P||""))return null;var Y=v>=E.length-1?E[E.length-1]:E[v],H=!!(null==Y?void 0:Y.addChildType),K=!_||_(p.id),W=!j||j(p.id),M=!N||N(p.id),z=p.children&&p.children.length>0,B=!K||z,F=K?z?"This scope cannot be deleted because other scopes inherit learnings from it.":void 0:"You do not have permission to delete this scope.",G=M?void 0:"You do not have permission to add a scope here.",J=!P||p.name.toLowerCase().includes(P.toLowerCase());return i.jsxs("div",e.__assign({className:o.default.nodeWrapper,style:{"--tree-depth":v}},{children:[i.jsx(d.TreeNodeHeader,{nodeType:p.type,name:p.name,isExpanded:O,isSelected:V,isAncestor:Q,childrenCount:null===(s=p.children)||void 0===s?void 0:s.length,onToggleExpand:function(e){e.stopPropagation(),g(p.id)},onClick:function(){y(I,"learnings")},searchQuery:P,menuOptions:e.__spreadArray(e.__spreadArray([],H?[{label:Y.addChildLabel||"Add Child",icon:n.Plus,onClick:function(){return null==x?void 0:x(p.id,Y.addChildType,p.name)},disabled:!M,tooltip:G}]:[],!0),[{label:"Rename",icon:n.Pencil,onClick:function(){return null==S?void 0:S(p.id,p.name)},disabled:!W||"station"===(null===(c=null==p?void 0:p.type)||void 0===c?void 0:c.toLocaleLowerCase()),tooltip:W?void 0:"You do not have permission to rename this scope."},{label:"Delete ".concat((null==Y?void 0:Y.label)||"Node"),icon:n.Trash2,onClick:function(){var e;return null==A?void 0:A(p.id,p.name,(null===(e=p.metrics)||void 0===e?void 0:e.learningsCount)||0)},disabled:B,tooltip:F,className:"text-red-500 hover:text-red-600 hover:bg-red-50"}],!1)}),O&&i.jsxs("div",e.__assign({className:o.default.childrenWrapper},{children:[k.filter(function(e){return!e.isVisible||e.isVisible(p,v)}).map(function(e){var n;return i.jsx(t.TreeSectionItem,{icon:e.icon,label:e.label,badgeCount:e.badgeKey?null===(n=p.metrics)||void 0===n?void 0:n[e.badgeKey]:void 0,isActive:V&&(null==b?void 0:b.sectionId)===e.id,onClick:function(){return y(I,e.id)}},"".concat(p.id,"-").concat(e.id))}),null===(u=p.children)||void 0===u?void 0:u.map(function(e){return i.jsx(r,{node:e,depth:v+1,nodePath:I,expandedNodeIds:f,activeSelection:b,onToggleExpand:g,onSectionSelect:y,onNodeOptionsClick:T,onAddChild:x,onRenameChild:S,onDeleteChild:A,canDeleteScope:_,canEditScope:j,canCreateScope:N,searchQuery:P,forceVisible:J,sectionsConfig:k,nodeTypesConfig:E},e.id)}),H&&i.jsx(l.TreeAddAction,{label:Y.addChildLabel||"Add Child",onAdd:function(){return null==x?void 0:x(p.id,Y.addChildType,p.name)},disabled:!M,tooltip:G})]}))]}))};exports.TreeNode=r;
|
|
2
2
|
//# sourceMappingURL=TreeNode.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),o=require("lucide-react"),t=require("../../styles/ScopeTree.module.css.js"),s=require("./TreeMenu.js"),r=require("./HighlightedText.js");exports.TreeNodeHeader=function(a){var i=a.name,d=a.isExpanded,c=a.isSelected,l=a.isAncestor,u=a.isExpandable,h=void 0===u||u,x=a.onToggleExpand,f=a.onClick,g=a.menuOptions,p=a.searchQuery,j=a.childrenCount,v=a.nodeType,_=c?t.default.nodeHeaderSelected:l?t.default.nodeHeaderAncestor:"",m=c||l;return n.jsxs("div",e.__assign({className:"".concat(t.default.nodeHeader," ").concat(_),onClick:f,role:"button",tabIndex:0,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),f())}},{children:[n.jsx("div",e.__assign({className:"".concat(t.default.chevron," ").concat(d?t.default.chevronExpanded:""," ").concat(h?"":t.default.chevronHidden),onClick:function(e){h&&x(e)},role:"button",tabIndex:h?0:-1},{children:n.jsx(o.ChevronDown,{size:16,strokeWidth:m?2.5:2,color:m?"#2563EB":"#64748B"})})),n.jsx("div",e.__assign({className:t.default.folderIcon},{children:"station"===(null==v?void 0:v.toLocaleLowerCase())?n.jsx(o.RadioTower,{size:18,strokeWidth:m?2.5:2,color:m?"currentColor":"#64748B"}):n.jsx(o.FolderOpen,{size:18,strokeWidth:m?2.5:2,color:m?"currentColor":"#64748B"})})),n.jsx("span",e.__assign({className:t.default.nodeName},{children:n.jsx(r.HighlightedText,{text:i,highlight:p})})),void 0!==j&&j>0&&n.jsx("span",e.__assign({className:"".concat(t.default.badge," ").concat(c?t.default.badgeActive:"")},{children:j})),g&&g.length>0&&n.jsx("div",e.__assign({onClick:function(e){return e.stopPropagation()}},{children:n.jsx(s.TreeMenu,{options:g,buttonClassName:t.default.optionsButton,iconSize:16})}))]}))};
|
|
2
2
|
//# sourceMappingURL=TreeNodeHeader.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as n,__generator as r}from"tslib";import{jsxs as o,Fragment as i,jsx as t}from"react/jsx-runtime";import{useRef as a,useState as l,useEffect as s}from"react";import{GripVertical as c,ChevronUp as u,ChevronDown as d}from"lucide-react";import{toggleVariant as p}from"../apis/scopeApis.js";import v from"../styles/RuleAccordion.module.css.js";import m from"../styles/CustomTooltip.module.css.js";import f from"./InheritanceBreadcrumb.js";import g from"../components/ConfirmationModal.js";import h from"../components/CustomTooltip.js";import b from"../store/useAuthStore.js";import{usePermissionsStore as j}from"../store/usePermissionsStore.js";import{useLearningTemplateStore as A}from"../store/useLearningTemplateStore.js";import
|
|
1
|
+
import{__assign as e,__awaiter as n,__generator as r}from"tslib";import{jsxs as o,Fragment as i,jsx as t}from"react/jsx-runtime";import{useRef as a,useState as l,useEffect as s}from"react";import{GripVertical as c,ChevronUp as u,ChevronDown as d}from"lucide-react";import{toggleVariant as p}from"../apis/scopeApis.js";import v from"../styles/RuleAccordion.module.css.js";import m from"../styles/CustomTooltip.module.css.js";import f from"./InheritanceBreadcrumb.js";import g from"../components/ConfirmationModal.js";import h from"../components/CustomTooltip.js";import b from"../store/useAuthStore.js";import{usePermissionsStore as j}from"../store/usePermissionsStore.js";import{useLearningTemplateStore as A}from"../store/useLearningTemplateStore.js";import I from"./ApprovalLearningDialog.js";import T from"./ApprovalActionButton.js";import C from"./PendingApprovalChip.js";import{useApproveOrRejectVariantsMutation as S}from"../queries/useApprovalQueries.js";import L from"../store/useEnvStore.js";import{Toast as N}from"primereact/toast";var y=function(y){var w,P,D,O,R,B,k,x,E,_,H,M,V,z=y.rule,F=y.idx,G=y.ruleSetId,q=y.isOpen,Q=y.onToggle,U=y.onDelete;y.onEdit,y.isGlobalScope;var Y=y.deleteButtonLabel,J=void 0===Y?"Delete":Y;y.editButtonLabel;var K=y.enableLearningRuleLabel,W=void 0===K?"Enable":K,X=y.disableLearningRuleLabel,Z=void 0===X?"Disable":X,$=y.onToggleSuccess,ee=y.dragControls,ne=b.getState().user,re=j(function(e){return e.hasPermission}),oe=re("ilotj.rule.delete",G),ie=re("ilotj.rule.enable",G),te=re("ilotj.rule.disable",G),ae=re("ilotj.rule.selfApprove",G),le=re("ilotj.rule.approve",G),se=re("ilotj.scope.approve",G),ce=re("ilotj.rule.pendingApproval.view",G),ue=re("ilotj.rule.variant.pendingApproval.edit",G),de=ae||le||se||ue,pe=ce||de,ve=S(),me=L(function(e){return e.rbacConfig}),fe=me?{application:null==me?void 0:me.applicationId,scopeLevelModuleId:null!==(w=null==me?void 0:me.moduleId)&&void 0!==w?w:"",applicationLevelModuleId:null!==(P=null==me?void 0:me.applicationModuleId)&&void 0!==P?P:"",applicationLevelResourceId:null!==(D=null==me?void 0:me.applicationResourceId)&&void 0!==D?D:""}:void 0,ge=a(null),he=l(!1),be=he[0],je=he[1],Ae=z.variants&&z.variants.length>0?!z.variants.every(function(e){return!1===e.is_enabled}):!1!==z.is_enabled,Ie=l(!1),Te=Ie[0],Ce=Ie[1],Se=null===(O=z.variants)||void 0===O?void 0:O.map(function(e){return e.inheritance||[]}).reduce(function(e,n){return n.length>e.length?n:e},[]),Le=null===(R=z.variants)||void 0===R?void 0:R.some(function(e){return null==e?void 0:e.isOverridden}),Ne=Ae?te:ie;z.inheritance&&z.inheritance.length>0&&(null===(B=z.inheritance)||void 0===B||B.length);var ye=null!==(x=null===(k=z.variants)||void 0===k?void 0:k.length)&&void 0!==x?x:0,we=l({isOpen:!1,mode:"approve"}),Pe=we[0],De=we[1],Oe=null!==(_=null===(E=z.variants)||void 0===E?void 0:E.filter(function(e){return"pending_approval"===e.approvalStatus}).length)&&void 0!==_?_:0,Re=A(function(e){return e.urlVariantId}),Be=A(function(e){return e.urlApprovalAction}),ke=A(function(e){return e.clearUrlApprovalParams});s(function(){var e;if(Re&&Be){var n=null===(e=z.variants)||void 0===e?void 0:e.find(function(e){return e.variantId===Re});n&&"pending_approval"===(null==n?void 0:n.approvalStatus)&&de&&(De({isOpen:!0,mode:Be}),ke())}},[Re,Be,z.variants,ke,de]);var xe=function(e,n){e.stopPropagation(),De({isOpen:!0,mode:n})},Ee=q?"".concat(v.accordionHeader," ").concat(v.accordionHeaderOpen):v.accordionHeader;return o(i,{children:[t(N,{ref:ge}),t("div",e({className:Ee,onClick:Q},{children:o("div",e({className:v.headerContent},{children:[o("div",e({className:v.headerTopRow},{children:[t("div",e({className:v.titleSection},{children:o("div",e({className:v.titleRow},{children:[t("div",e({className:v.dragHandle,title:"Drag to reorder",style:{touchAction:"none"},onPointerDown:function(e){e.stopPropagation(),null==ee||ee.start(e)}},{children:t(c,{size:18})})),o("span",e({className:v.ruleTitle},{children:[F+1,". ",z.ruleTitle]})),z.dataSource&&t("span",e({className:v.dataSourceTag},{children:null===(H=z.dataSource)||void 0===H?void 0:H.tag})),pe&&t(C,{count:Oe}),Le&&t(h,e({content:"Inherited from the ".concat((null==Se?void 0:Se.length)>=2?Se[Se.length-2]:"parent"," scope and overridden in this scope."),placement:"top",withArrow:!0,contentClassName:m.customTooltip,sideOffset:5},{children:t("span",e({className:v.overriddenTag},{children:"Overridden"}))})),!Ae&&t("span",e({className:v.learningDisabledPill},{children:"Disabled"}))]}))})),t("div",e({className:v.headerActions},{children:t("div",e({className:v.chevronIcon},{children:t(q?u:d,{size:20})}))}))]})),o("div",e({className:v.footerRow},{children:[t(f,{inheritance:Se||[]}),o("div",e({className:v.headerButtonGroup},{children:[Ne&&t("button",e({onClick:function(e){return n(void 0,void 0,void 0,function(){return r(this,function(n){return e.stopPropagation(),je(!0),[2]})})},disabled:Te,className:v.toggleLearningButton},{children:Ae?Z:W})),de&&Oe>1&&o(i,{children:[t(T,{variant:"approve",text:Oe>1?"Approve All":"Approve",onClick:function(e){return xe(e,"approve")}}),t(T,{variant:"reject",text:Oe>1?"Reject All":"Reject",onClick:function(e){return xe(e,"reject")}})]}),oe&&U&&t("button",e({className:v.deleteButton,onClick:function(e){e.stopPropagation(),null==U||U()}},{children:J}))]}))]}))]}))})),t(g,{isOpen:be,title:Ae?"Disable Learning?":"Enable Learning?",description:"Are you sure you want to ".concat(Ae?"disable":"enable"," this learning for ").concat(z.ruleTitle,"?"),warning:Ae?"This learning will no longer influence upcoming schedules. You can enable it again anytime.":"This learning will start influencing upcoming schedules again.",confirmText:Ae?"Disable":"Enable",cancelText:"Cancel",confirmBgColor:Ae?"#DC2626":"#16A34A",onConfirm:function(){return n(void 0,void 0,void 0,function(){var e,n,o;return r(this,function(r){switch(r.label){case 0:Ce(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),0===(e=(null===(o=z.variants)||void 0===o?void 0:o.map(function(e){return e.variantId}))||[]).length&&z.ruleId&&e.push(z.ruleId),null==ne?void 0:ne.email,[4,p(e,!Ae)];case 2:return r.sent(),null==$||$(),[3,5];case 3:return n=r.sent(),console.error("Failed to toggle rule variants",n),[3,5];case 4:return Ce(!1),je(!1),[7];case 5:return[2]}})})},onCancel:function(){return je(!1)},isLoading:Te}),t(I,{open:Pe.isOpen,mode:Pe.mode,onClose:function(){return De(function(n){return e(e({},n),{isOpen:!1})})},onSubmit:function(n){return function(n){var r,o,i=null!==(o=null===(r=z.variants)||void 0===r?void 0:r.filter(function(e){return"pending_approval"===e.approvalStatus}).map(function(e){return e.variantId}))&&void 0!==o?o:[];i.length&&G&&ve.mutate({variantIds:i,status:"approve"===Pe.mode?"approved":"rejected",feedback:n.feedback,scopeId:G,appsecData:fe},{onSuccess:function(){var n;De(function(n){return e(e({},n),{isOpen:!1})}),null==$||$(),null===(n=ge.current)||void 0===n||n.show({severity:"success",summary:"".concat(Pe.mode," Successfully"),detail:"approve"===Pe.mode?"Learning approved successfully":"Learning rejected successfully"})},onError:function(e){var n;console.error("An error occurred during rejecting.",e),null===(n=ge.current)||void 0===n||n.show({severity:"error",summary:"".concat(Pe.mode," Failed"),detail:"There was an error ".concat("approve"===Pe.mode?"approving":"rejecting"," the learning. Please try again.")})}})}(n)},variantInformation:"".concat(z.ruleTitle,"-").concat(ye>1?"Variants":"Variant 1"),ruleTitle:z.ruleTitle,pendingVariants:null!==(V=null===(M=z.variants)||void 0===M?void 0:M.filter(function(e){return"pending_approval"===e.approvalStatus}))&&void 0!==V?V:[],isPending:ve.isPending})]})};export{y as default};
|
|
2
2
|
//# sourceMappingURL=RuleAccordionHeader.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as n,__generator as t}from"tslib";import{jsxs as i,jsx as r,Fragment as o}from"react/jsx-runtime";import{useState as a,useRef as l,useEffect as s}from"react";import{parseISO as c,isValid as d,format as u}from"date-fns";import{MoreVertical as p,Pause as v,Play as m,Copy as h,Eye as f,Info as g,TriangleAlert as y}from"lucide-react";import{toggleVariant as b}from"../apis/scopeApis.js";import{HistorySkeleton as T}from"./HistorySkeleton.js";import N from"./InheritanceBreadcrumb.js";import A from"./RuleConditionBlock.js";import C from"../styles/VariantCard.module.css.js";import j from"../styles/CustomTooltip.module.css.js";import w from"../components/CustomTooltip.js";import I from"../components/ConfirmationModal.js";import L from"./OverrideTimeline.js";import x from"../store/useAuthStore.js";import{usePermissionsStore as B}from"../store/usePermissionsStore.js";import D from"./PendingApprovalChip.js";import O from"./ApprovalActionButton.js";import k from"./ApprovalLearningDialog.js";import{useApproveOrRejectVariantsMutation as S}from"../queries/useApprovalQueries.js";import F from"../store/useEnvStore.js";var E=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter(Boolean).join(" ")},H=function(H){var P,V,W,M,_,z,R,U=H.ruleTitle,G=H.variant,q=H.variantIndex,Z=H.totalVariants,K=H.ruleId;H.pendingApprovalCount;var Q=H.ruleSetId,Y=H.tierName,$=H.displayLabel,J=H.onEdit,X=H.onDelete,ee=H.onFetchOverrideHistory,ne=H.editButtonLabel,te=void 0===ne?"Edit":ne,ie=H.deleteButtonLabel,re=void 0===ie?"Delete":ie,oe=H.whenToApplyLabel,ae=void 0===oe?"When to Apply":oe,le=H.whenNotToApplyLabel,se=void 0===le?"When Not to Apply":le,ce=H.noConditionsText,de=void 0===ce?"No conditions":ce,ue=H.viewOverrideLabel,pe=void 0===ue?"View Override History":ue,ve=H.hideOverrideLabel,me=void 0===ve?"Hide Override History":ve,he=H.enableLearningVariantLabel,fe=void 0===he?"Enable":he,ge=H.disableLearningVariantLabel,ye=void 0===ge?"Disable":ge,be=H.historyErrorMessage,Te=void 0===be?"Failed to load override history.":be,Ne=H.resolveGapsLabel,Ae=void 0===Ne?"This learning has some gaps":Ne,Ce=H.showActionsBar,je=void 0===Ce||Ce,we=H.showDescriptionBox,Ie=void 0===we||we,Le=H.showConditions,xe=void 0===Le||Le,Be=H.showInheritance,De=void 0===Be||Be,Oe=H.defaultApplyOpen,ke=void 0===Oe||Oe,Se=H.defaultNotApplyOpen,Fe=void 0===Se||Se,Ee=H.className,He=H.isHighlighted,Pe=void 0!==He&&He,Ve=H.highlightAction,We=H.highlightedTierNames,Me=H.highlightedVariantIds,_e=H.headerContent,ze=H.footerContent,Re=H.onToggleSuccess,Ue=H.setDeleteConfirmationUsedFor,Ge=H.onCopyToTier,qe=H.onSetInitialDraftMessage,Ze=x.getState().user,Ke=a(ke),Qe=Ke[0],Ye=Ke[1],$e=a(Fe),Je=$e[0],Xe=$e[1],en=a(!1),nn=en[0],tn=en[1],rn=a(!1),on=rn[0],an=rn[1],ln=a(null),sn=ln[0],cn=ln[1],dn=a(null),un=dn[0],pn=dn[1],vn=a(!1),mn=vn[0],hn=vn[1],fn=a(!1),gn=fn[0],yn=fn[1],bn=l(null),Tn=!1!==G.is_enabled,Nn=a(!1),An=Nn[0],Cn=Nn[1],jn=l(null),wn=a({isOpen:!1,mode:"approve"}),In=wn[0],Ln=wn[1],xn=S(),Bn=F(function(e){return e.rbacConfig}),Dn=Bn?{application:Bn.applicationId,scopeLevelModuleId:null!==(P=null==Bn?void 0:Bn.moduleId)&&void 0!==P?P:""}:void 0,On=B(function(e){return e.hasPermission}),kn=Q,Sn=G.inheritance&&G.inheritance.length>1,Fn=On("ilotj.rule.variant.edit",kn)||On(Sn?"ilotj.rule.variant.inherited.edit":"ilotj.rule.variant.nonInherited.edit",kn),En=On("ilotj.rule.variant.enable",kn)||On(Sn?"ilotj.rule.variant.inherited.enable":"ilotj.rule.variant.nonInherited.enable",kn),Hn=On("ilotj.rule.variant.disable",kn)||On(Sn?"ilotj.rule.variant.inherited.disable":"ilotj.rule.variant.nonInherited.disable",kn),Pn=On("ilotj.rule.variant.delete",kn),Vn=On("ilotj.rule.selfApprove",kn),Wn=On("ilotj.rule.approve",kn),Mn=On("ilotj.scope.approve",kn),_n=On("ilotj.rule.pendingApproval.view",kn),zn=On("ilotj.rule.variant.pendingApproval.edit",kn),Rn=Vn||Wn||Mn||zn,Un=_n||Rn,Gn="pending_approval"===(null==G?void 0:G.approvalStatus),qn="rejected"===(null==G?void 0:G.approvalStatus),Zn=Rn&&Gn;s(function(){var e=function(e){bn.current&&!bn.current.contains(e.target)&&hn(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var Kn=(null===(V=null==sn?void 0:sn.wta)||void 0===V?void 0:V.changeLog)||[],Qn=(null===(W=null==sn?void 0:sn.wnta)||void 0===W?void 0:W.changeLog)||[],Yn=Pe&&We&&Y?We.filter(function(e){return e!==Y}):[],$n=Yn.length>0&&Y?Yn.every(function(e){return e>Y})?"↓":"↑":"↓",Jn=function(){if(Me)for(var e=Array.from(Me),n=0;n<e.length;n++)if(e[n]!==G.variantId){var t=document.querySelector('[data-variant-id="'.concat(e[n],'"]'));if(t){t.scrollIntoView({behavior:"smooth",block:"center"});break}}},Xn=function(e,n){e.stopPropagation(),Ln({isOpen:!0,mode:n})},et=function(e){if(!e)return"";try{var n=e.endsWith("Z")||/[+-]\d{2}:\d{2}$/.test(e)?e:"".concat(e,"Z"),t=c(n);return d(t)?u(t,"MMM d, yyyy 'at' h:mm a"):e}catch(n){return e}},nt=function(e){return e?e.includes("@")?e.split("@")[0].split(".").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" "):e:""};return i("div",e({className:E(C.variantCard,Pe&&C.variantHighlight,Ee),"data-variant-id":G.variantId},{children:[i("div",e({className:C.variantHeader,style:{alignItems:"flex-start",gap:"0.75rem"}},{children:[i("div",e({className:C.variantLabelSection,style:{display:"flex",flexWrap:"wrap"}},{children:[r("span",e({className:C.variantLabel},{children:"Default"===G.variantType&&"Default"!==$?"Default | ".concat($):$})),Pe&&Ve&&r("span",e({className:E(C.actionChip,"new"===Ve?C.actionChipNew:C.actionChipUpdated)},{children:"new"===Ve?"Created":"Updated"})),(null==G?void 0:G.isOverridden)&&r(w,e({content:"Inherited from the ".concat((null===(M=G.inheritance)||void 0===M?void 0:M[(null===(_=G.inheritance)||void 0===_?void 0:_.length)-2])||"parent"," scope and overridden in this scope."),placement:"top",withArrow:!0,contentClassName:j.customTooltip,sideOffset:5},{children:r("span",e({className:C.overriddenTag},{children:"Overridden"}))})),Un&&Gn&&r(D,{}),qn&&r("span",e({style:{backgroundColor:"#FEF2F2",color:"#EF4444",border:"1px solid #FECACA",padding:"2px 8px",borderRadius:"9999px",fontSize:"0.75rem",fontWeight:500,display:"inline-flex",alignItems:"center"}},{children:"Rejected"})),!Tn&&r("span",e({className:C.learningDisabledPill},{children:"Disabled"})),De&&1!==Z&&0!==q&&r("div",e({className:C.inheritanceSection},{children:r(N,{inheritance:G.inheritance||[]})}))]})),je&&i("div",e({className:C.variantActions},{children:[Zn&&i(o,{children:[r(O,{variant:"approve",text:"Approve",onClick:function(e){return Xn(e,"approve")}}),r(O,{variant:"reject",text:"Reject",onClick:function(e){return Xn(e,"reject")}})]}),J&&Fn&&r("button",e({className:C.editButton,onClick:function(){null==J||J(G,K,Y,"edit")}},{children:te})),X&&Pn&&"Default"!==G.variantType&&r("button",e({className:C.deleteButton,onClick:function(){null==Ue||Ue("variantDeletion"),null==X||X(G.variantId,K)}},{children:re})),i("div",e({className:C.menuWrapper,ref:bn},{children:[r("button",e({onClick:function(){return hn(!mn)},className:"".concat(C.menuTrigger," ").concat(mn?C.menuTriggerActive:"")},{children:r(p,{size:16})})),mn&&i("div",e({className:C.menuDropdown},{children:[(Tn&&Hn||!Tn&&En)&&i("button",e({onClick:function(){return n(void 0,void 0,void 0,function(){return t(this,function(e){return hn(!1),Cn(!0),[2]})})},disabled:gn,className:"".concat(C.menuItem," ").concat(gn?C.menuItemDisabled:"")},{children:[r(Tn?v:m,{size:14}),Tn?ye:fe]})),Y&&i("button",e({onClick:function(){var e="Tier 1"===Y?"Tier 2":"Tier 1",n="Add a new learning in ".concat(e," with the following details:\nLearning Title: ").concat(U,"\nLearning Description: ").concat(G.description,"\nWhen to apply: ").concat(G.whenToApply,"\nWhen not to apply: ").concat(G.whenNotToApply);null==qe||qe(n),hn(!1),null==Ge||Ge(G,K,U||"",Y,e)},className:C.menuItem},{children:[r(h,{size:14}),"Copy to ","Tier 1"===Y?"Tier 2":"Tier 1"]})),ee&&(null!==(R=null===(z=G.inheritance)||void 0===z?void 0:z.length)&&void 0!==R?R:0)>1&&i("button",e({onClick:function(){hn(!1),n(void 0,void 0,void 0,function(){var e;return t(this,function(n){switch(n.label){case 0:if(nn)return tn(!1),[2];if(tn(!0),!ee)return[2];an(!0),pn(null),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,ee(K,G.variantId)];case 2:return e=n.sent(),cn(e),[3,5];case 3:return n.sent(),pn(Te),[3,5];case 4:return an(!1),[7];case 5:return[2]}})})},className:C.menuItem},{children:[r(f,{size:14}),nn?me:pe]}))]}))]}))]}))]})),_e,Ie&&G.description&&i("div",e({className:C.descriptionBox},{children:[r("p",e({className:C.descriptionText},{children:G.description})),nn&&(on?r(T,{}):un?r("p",e({className:C.errorText},{children:un})):(null==sn?void 0:sn.ruleDescription)?r(L,{changeLog:sn.ruleDescription.changeLog}):r("p",e({className:C.noHistoryText},{children:"No override history found"})))]})),xe&&i("div",e({className:C.conditionsContainer},{children:[r(A,{type:"apply",conditions:G.whenToApply||"",isOpen:Qe,onToggle:function(){return Ye(!Qe)},labelText:ae,noConditionsText:de,showOverrideHistory:nn,isLoadingHistory:on,historyError:un,overrideHistoryData:Kn}),r(A,{type:"notApply",conditions:G.whenNotToApply||"",isOpen:Je,onToggle:function(){return Xe(!Je)},labelText:se,noConditionsText:de,showOverrideHistory:nn,isLoadingHistory:on,historyError:un,overrideHistoryData:Qn})]})),Pe&&Yn.length>0&&i("div",e({className:C.crossTierBanner},{children:[r(g,{className:C.crossTierBannerIcon}),i("span",e({className:C.crossTierBannerText},{children:["Also created in ",Yn.join(", "),"."]})),i("span",e({className:C.crossTierBannerLink,onClick:Jn,role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&Jn()}},{children:["Scroll to view ",$n]}))]})),ze,(G.createdBy||G.createdAt)&&i("div",e({className:C.variantFooter},{children:[!0===G.is_user_accepted_risk&&i("div",e({className:C.resolveGaps},{children:[r(y,{size:14,color:"#EF4444"}),r("span",e({className:C.resolveGapsText},{children:Ae})),Fn&&r("button",e({onClick:function(){null==J||J(G,K,Y,"resolve_gaps")},className:C.resolveButton},{children:"Resolve"}))]})),r("div",e({className:C.variantFooterContent},{children:G.updatedBy||G.updatedAt?i(o,{children:[G.updatedBy&&r(w,e({content:G.createdBy?"Created by ".concat(nt(G.createdBy)):"",contentClassName:j.customTooltip,sideOffset:5,placement:"top"},{children:i("span",e({className:C.variantFooterItem},{children:["Updated by ",nt(G.updatedBy)]}))})),G.updatedBy&&G.updatedAt&&r("span",e({className:C.variantFooterSeparator},{children:"•"})),G.updatedAt&&r(w,e({content:G.createdAt?"Created at ".concat(et(G.createdAt)):"",contentClassName:j.customTooltip,sideOffset:5,placement:"top"},{children:r("span",e({className:C.variantFooterItem},{children:et(G.updatedAt)}))}))]}):i(o,{children:[G.createdBy&&i("span",e({className:C.variantFooterItem},{children:["Created by ",nt(G.createdBy)]})),G.createdBy&&G.createdAt&&r("span",e({className:C.variantFooterSeparator},{children:"•"})),G.createdAt&&r("span",e({className:C.variantFooterItem},{children:et(G.createdAt)}))]})}))]})),r(I,{isOpen:An,title:Tn?"Disable Learning":"Enable Learning",description:"Are you sure you want to ".concat(Tn?"disable":"enable"," learning for this variant in ").concat(U,"?"),warning:Tn?"This variant will no longer influence upcoming schedules. You can enable it again anytime.":"This variant will start influencing upcoming schedules again.",confirmText:Tn?"Disable":"Enable",cancelText:"Cancel",confirmBgColor:Tn?"#DC2626":"#16A34A",onConfirm:function(){return n(void 0,void 0,void 0,function(){var e;return t(this,function(n){switch(n.label){case 0:yn(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),null==Ze?void 0:Ze.email,[4,b([G.variantId],!Tn)];case 2:return n.sent(),null==Re||Re(),[3,5];case 3:return e=n.sent(),console.error("Failed to toggle variant",e),[3,5];case 4:return yn(!1),hn(!1),Cn(!1),[7];case 5:return[2]}})})},onCancel:function(){return Cn(!1)},isLoading:gn,position:"fixed"}),r(k,{open:In.isOpen,mode:In.mode,onClose:function(){return Ln(function(n){return e(e({},n),{isOpen:!1})})},onSubmit:function(n){Q&&xn.mutate({variantIds:[G.variantId],status:"approve"===In.mode?"approved":"rejected",feedback:n.feedback,is_deleted:n.deleteLearning,scopeId:Q,appsecData:Dn},{onSuccess:function(){var n;Ln(function(n){return e(e({},n),{isOpen:!1})}),null==Re||Re(),null===(n=jn.current)||void 0===n||n.show({severity:"success",summary:"".concat("approve"===In.mode?"Approved":"Rejected"," Successfully"),detail:"Learning ".concat("approve"===In.mode?"approved":"rejected"," successfully.")})},onError:function(e){var n;console.error("An error occurred.",e),null===(n=jn.current)||void 0===n||n.show({severity:"error",summary:"Action Failed",detail:"There was an error processing the learning. Please try again."})}})},variantInformation:"".concat(U," — ").concat($),ruleTitle:U,pendingVariants:[G],isPending:xn.isPending})]}))};export{H as default};
|
|
1
|
+
import{__assign as e,__awaiter as n,__generator as t}from"tslib";import{jsxs as i,jsx as r,Fragment as o}from"react/jsx-runtime";import{useState as a,useRef as l,useEffect as s}from"react";import{parseISO as c,isValid as d,format as u}from"date-fns";import{MoreVertical as p,Pause as v,Play as m,Copy as h,Eye as f,Info as g,TriangleAlert as y}from"lucide-react";import{toggleVariant as b}from"../apis/scopeApis.js";import{HistorySkeleton as T}from"./HistorySkeleton.js";import N from"./InheritanceBreadcrumb.js";import A from"./RuleConditionBlock.js";import C from"../styles/VariantCard.module.css.js";import j from"../styles/CustomTooltip.module.css.js";import w from"../components/CustomTooltip.js";import I from"../components/ConfirmationModal.js";import L from"./OverrideTimeline.js";import x from"../store/useAuthStore.js";import{usePermissionsStore as B}from"../store/usePermissionsStore.js";import D from"./PendingApprovalChip.js";import O from"./ApprovalActionButton.js";import k from"./ApprovalLearningDialog.js";import{useApproveOrRejectVariantsMutation as S}from"../queries/useApprovalQueries.js";import F from"../store/useEnvStore.js";var E=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter(Boolean).join(" ")},H=function(H){var M,P,R,V,W,_,z,U,G,q=H.ruleTitle,Z=H.variant,K=H.variantIndex,Q=H.totalVariants,Y=H.ruleId;H.pendingApprovalCount;var $=H.ruleSetId,J=H.tierName,X=H.displayLabel,ee=H.onEdit,ne=H.onDelete,te=H.onFetchOverrideHistory,ie=H.editButtonLabel,re=void 0===ie?"Edit":ie,oe=H.deleteButtonLabel,ae=void 0===oe?"Delete":oe,le=H.whenToApplyLabel,se=void 0===le?"When to Apply":le,ce=H.whenNotToApplyLabel,de=void 0===ce?"When Not to Apply":ce,ue=H.noConditionsText,pe=void 0===ue?"No conditions":ue,ve=H.viewOverrideLabel,me=void 0===ve?"View Override History":ve,he=H.hideOverrideLabel,fe=void 0===he?"Hide Override History":he,ge=H.enableLearningVariantLabel,ye=void 0===ge?"Enable":ge,be=H.disableLearningVariantLabel,Te=void 0===be?"Disable":be,Ne=H.historyErrorMessage,Ae=void 0===Ne?"Failed to load override history.":Ne,Ce=H.resolveGapsLabel,je=void 0===Ce?"This learning has some gaps":Ce,we=H.showActionsBar,Ie=void 0===we||we,Le=H.showDescriptionBox,xe=void 0===Le||Le,Be=H.showConditions,De=void 0===Be||Be,Oe=H.showInheritance,ke=void 0===Oe||Oe,Se=H.defaultApplyOpen,Fe=void 0===Se||Se,Ee=H.defaultNotApplyOpen,He=void 0===Ee||Ee,Me=H.className,Pe=H.isHighlighted,Re=void 0!==Pe&&Pe,Ve=H.highlightAction,We=H.highlightedTierNames,_e=H.highlightedVariantIds,ze=H.headerContent,Ue=H.footerContent,Ge=H.onToggleSuccess,qe=H.setDeleteConfirmationUsedFor,Ze=H.onCopyToTier,Ke=H.onSetInitialDraftMessage,Qe=x.getState().user,Ye=a(Fe),$e=Ye[0],Je=Ye[1],Xe=a(He),en=Xe[0],nn=Xe[1],tn=a(!1),rn=tn[0],on=tn[1],an=a(!1),ln=an[0],sn=an[1],cn=a(null),dn=cn[0],un=cn[1],pn=a(null),vn=pn[0],mn=pn[1],hn=a(!1),fn=hn[0],gn=hn[1],yn=a(!1),bn=yn[0],Tn=yn[1],Nn=l(null),An=!1!==Z.is_enabled,Cn=a(!1),jn=Cn[0],wn=Cn[1],In=l(null),Ln=a({isOpen:!1,mode:"approve"}),xn=Ln[0],Bn=Ln[1],Dn=S(),On=F(function(e){return e.rbacConfig}),kn=On?{application:On.applicationId,scopeLevelModuleId:null!==(M=null==On?void 0:On.moduleId)&&void 0!==M?M:"",applicationLevelModuleId:null!==(P=null==On?void 0:On.applicationModuleId)&&void 0!==P?P:"",applicationLevelResourceId:null!==(R=null==On?void 0:On.applicationResourceId)&&void 0!==R?R:""}:void 0,Sn=B(function(e){return e.hasPermission}),Fn=$,En=Z.inheritance&&Z.inheritance.length>1,Hn=Sn("ilotj.rule.variant.edit",Fn)||Sn(En?"ilotj.rule.variant.inherited.edit":"ilotj.rule.variant.nonInherited.edit",Fn),Mn=Sn("ilotj.rule.variant.enable",Fn)||Sn(En?"ilotj.rule.variant.inherited.enable":"ilotj.rule.variant.nonInherited.enable",Fn),Pn=Sn("ilotj.rule.variant.disable",Fn)||Sn(En?"ilotj.rule.variant.inherited.disable":"ilotj.rule.variant.nonInherited.disable",Fn),Rn=Sn("ilotj.rule.variant.delete",Fn),Vn=Sn("ilotj.rule.selfApprove",Fn),Wn=Sn("ilotj.rule.approve",Fn),_n=Sn("ilotj.scope.approve",Fn),zn=Sn("ilotj.rule.pendingApproval.view",Fn),Un=Sn("ilotj.rule.variant.pendingApproval.edit",Fn),Gn=Vn||Wn||_n||Un,qn=zn||Gn,Zn="pending_approval"===(null==Z?void 0:Z.approvalStatus),Kn="rejected"===(null==Z?void 0:Z.approvalStatus),Qn=Gn&&Zn;s(function(){var e=function(e){Nn.current&&!Nn.current.contains(e.target)&&gn(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var Yn=(null===(V=null==dn?void 0:dn.wta)||void 0===V?void 0:V.changeLog)||[],$n=(null===(W=null==dn?void 0:dn.wnta)||void 0===W?void 0:W.changeLog)||[],Jn=Re&&We&&J?We.filter(function(e){return e!==J}):[],Xn=Jn.length>0&&J?Jn.every(function(e){return e>J})?"↓":"↑":"↓",et=function(){if(_e)for(var e=Array.from(_e),n=0;n<e.length;n++)if(e[n]!==Z.variantId){var t=document.querySelector('[data-variant-id="'.concat(e[n],'"]'));if(t){t.scrollIntoView({behavior:"smooth",block:"center"});break}}},nt=function(e,n){e.stopPropagation(),Bn({isOpen:!0,mode:n})},tt=function(e){if(!e)return"";try{var n=e.endsWith("Z")||/[+-]\d{2}:\d{2}$/.test(e)?e:"".concat(e,"Z"),t=c(n);return d(t)?u(t,"MMM d, yyyy 'at' h:mm a"):e}catch(n){return e}},it=function(e){return e?e.includes("@")?e.split("@")[0].split(".").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" "):e:""};return i("div",e({className:E(C.variantCard,Re&&C.variantHighlight,Me),"data-variant-id":Z.variantId},{children:[i("div",e({className:C.variantHeader,style:{alignItems:"flex-start",gap:"0.75rem"}},{children:[i("div",e({className:C.variantLabelSection,style:{display:"flex",flexWrap:"wrap"}},{children:[r("span",e({className:C.variantLabel},{children:"Default"===Z.variantType&&"Default"!==X?"Default | ".concat(X):X})),Re&&Ve&&r("span",e({className:E(C.actionChip,"new"===Ve?C.actionChipNew:C.actionChipUpdated)},{children:"new"===Ve?"Created":"Updated"})),(null==Z?void 0:Z.isOverridden)&&r(w,e({content:"Inherited from the ".concat((null===(_=Z.inheritance)||void 0===_?void 0:_[(null===(z=Z.inheritance)||void 0===z?void 0:z.length)-2])||"parent"," scope and overridden in this scope."),placement:"top",withArrow:!0,contentClassName:j.customTooltip,sideOffset:5},{children:r("span",e({className:C.overriddenTag},{children:"Overridden"}))})),qn&&Zn&&r(D,{}),Kn&&r("span",e({style:{backgroundColor:"#FEF2F2",color:"#EF4444",border:"1px solid #FECACA",padding:"2px 8px",borderRadius:"9999px",fontSize:"0.75rem",fontWeight:500,display:"inline-flex",alignItems:"center"}},{children:"Rejected"})),!An&&r("span",e({className:C.learningDisabledPill},{children:"Disabled"})),ke&&1!==Q&&0!==K&&r("div",e({className:C.inheritanceSection},{children:r(N,{inheritance:Z.inheritance||[]})}))]})),Ie&&i("div",e({className:C.variantActions},{children:[Qn&&i(o,{children:[r(O,{variant:"approve",text:"Approve",onClick:function(e){return nt(e,"approve")}}),r(O,{variant:"reject",text:"Reject",onClick:function(e){return nt(e,"reject")}})]}),ee&&Hn&&r("button",e({className:C.editButton,onClick:function(){null==ee||ee(Z,Y,J,"edit")}},{children:re})),ne&&Rn&&"Default"!==Z.variantType&&r("button",e({className:C.deleteButton,onClick:function(){null==qe||qe("variantDeletion"),null==ne||ne(Z.variantId,Y)}},{children:ae})),i("div",e({className:C.menuWrapper,ref:Nn},{children:[r("button",e({onClick:function(){return gn(!fn)},className:"".concat(C.menuTrigger," ").concat(fn?C.menuTriggerActive:"")},{children:r(p,{size:16})})),fn&&i("div",e({className:C.menuDropdown},{children:[(An&&Pn||!An&&Mn)&&i("button",e({onClick:function(){return n(void 0,void 0,void 0,function(){return t(this,function(e){return gn(!1),wn(!0),[2]})})},disabled:bn,className:"".concat(C.menuItem," ").concat(bn?C.menuItemDisabled:"")},{children:[r(An?v:m,{size:14}),An?Te:ye]})),J&&i("button",e({onClick:function(){var e="Tier 1"===J?"Tier 2":"Tier 1",n="Add a new learning in ".concat(e," with the following details:\nLearning Title: ").concat(q,"\nLearning Description: ").concat(Z.description,"\nWhen to apply: ").concat(Z.whenToApply,"\nWhen not to apply: ").concat(Z.whenNotToApply);null==Ke||Ke(n),gn(!1),null==Ze||Ze(Z,Y,q||"",J,e)},className:C.menuItem},{children:[r(h,{size:14}),"Copy to ","Tier 1"===J?"Tier 2":"Tier 1"]})),te&&(null!==(G=null===(U=Z.inheritance)||void 0===U?void 0:U.length)&&void 0!==G?G:0)>1&&i("button",e({onClick:function(){gn(!1),n(void 0,void 0,void 0,function(){var e;return t(this,function(n){switch(n.label){case 0:if(rn)return on(!1),[2];if(on(!0),!te)return[2];sn(!0),mn(null),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,te(Y,Z.variantId)];case 2:return e=n.sent(),un(e),[3,5];case 3:return n.sent(),mn(Ae),[3,5];case 4:return sn(!1),[7];case 5:return[2]}})})},className:C.menuItem},{children:[r(f,{size:14}),rn?fe:me]}))]}))]}))]}))]})),ze,xe&&Z.description&&i("div",e({className:C.descriptionBox},{children:[r("p",e({className:C.descriptionText},{children:Z.description})),rn&&(ln?r(T,{}):vn?r("p",e({className:C.errorText},{children:vn})):(null==dn?void 0:dn.ruleDescription)?r(L,{changeLog:dn.ruleDescription.changeLog}):r("p",e({className:C.noHistoryText},{children:"No override history found"})))]})),De&&i("div",e({className:C.conditionsContainer},{children:[r(A,{type:"apply",conditions:Z.whenToApply||"",isOpen:$e,onToggle:function(){return Je(!$e)},labelText:se,noConditionsText:pe,showOverrideHistory:rn,isLoadingHistory:ln,historyError:vn,overrideHistoryData:Yn}),r(A,{type:"notApply",conditions:Z.whenNotToApply||"",isOpen:en,onToggle:function(){return nn(!en)},labelText:de,noConditionsText:pe,showOverrideHistory:rn,isLoadingHistory:ln,historyError:vn,overrideHistoryData:$n})]})),Re&&Jn.length>0&&i("div",e({className:C.crossTierBanner},{children:[r(g,{className:C.crossTierBannerIcon}),i("span",e({className:C.crossTierBannerText},{children:["Also created in ",Jn.join(", "),"."]})),i("span",e({className:C.crossTierBannerLink,onClick:et,role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&et()}},{children:["Scroll to view ",Xn]}))]})),Ue,(Z.createdBy||Z.createdAt)&&i("div",e({className:C.variantFooter},{children:[!0===Z.is_user_accepted_risk&&i("div",e({className:C.resolveGaps},{children:[r(y,{size:14,color:"#EF4444"}),r("span",e({className:C.resolveGapsText},{children:je})),Hn&&r("button",e({onClick:function(){null==ee||ee(Z,Y,J,"resolve_gaps")},className:C.resolveButton},{children:"Resolve"}))]})),r("div",e({className:C.variantFooterContent},{children:Z.updatedBy||Z.updatedAt?i(o,{children:[Z.updatedBy&&r(w,e({content:Z.createdBy?"Created by ".concat(it(Z.createdBy)):"",contentClassName:j.customTooltip,sideOffset:5,placement:"top"},{children:i("span",e({className:C.variantFooterItem},{children:["Updated by ",it(Z.updatedBy)]}))})),Z.updatedBy&&Z.updatedAt&&r("span",e({className:C.variantFooterSeparator},{children:"•"})),Z.updatedAt&&r(w,e({content:Z.createdAt?"Created at ".concat(tt(Z.createdAt)):"",contentClassName:j.customTooltip,sideOffset:5,placement:"top"},{children:r("span",e({className:C.variantFooterItem},{children:tt(Z.updatedAt)}))}))]}):i(o,{children:[Z.createdBy&&i("span",e({className:C.variantFooterItem},{children:["Created by ",it(Z.createdBy)]})),Z.createdBy&&Z.createdAt&&r("span",e({className:C.variantFooterSeparator},{children:"•"})),Z.createdAt&&r("span",e({className:C.variantFooterItem},{children:tt(Z.createdAt)}))]})}))]})),r(I,{isOpen:jn,title:An?"Disable Learning":"Enable Learning",description:"Are you sure you want to ".concat(An?"disable":"enable"," learning for this variant in ").concat(q,"?"),warning:An?"This variant will no longer influence upcoming schedules. You can enable it again anytime.":"This variant will start influencing upcoming schedules again.",confirmText:An?"Disable":"Enable",cancelText:"Cancel",confirmBgColor:An?"#DC2626":"#16A34A",onConfirm:function(){return n(void 0,void 0,void 0,function(){var e;return t(this,function(n){switch(n.label){case 0:Tn(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),null==Qe?void 0:Qe.email,[4,b([Z.variantId],!An)];case 2:return n.sent(),null==Ge||Ge(),[3,5];case 3:return e=n.sent(),console.error("Failed to toggle variant",e),[3,5];case 4:return Tn(!1),gn(!1),wn(!1),[7];case 5:return[2]}})})},onCancel:function(){return wn(!1)},isLoading:bn,position:"fixed"}),r(k,{open:xn.isOpen,mode:xn.mode,onClose:function(){return Bn(function(n){return e(e({},n),{isOpen:!1})})},onSubmit:function(n){$&&Dn.mutate({variantIds:[Z.variantId],status:"approve"===xn.mode?"approved":"rejected",feedback:n.feedback,is_deleted:n.deleteLearning,scopeId:$,appsecData:kn},{onSuccess:function(){var n;Bn(function(n){return e(e({},n),{isOpen:!1})}),null==Ge||Ge(),null===(n=In.current)||void 0===n||n.show({severity:"success",summary:"".concat("approve"===xn.mode?"Approved":"Rejected"," Successfully"),detail:"Learning ".concat("approve"===xn.mode?"approved":"rejected"," successfully.")})},onError:function(e){var n;console.error("An error occurred.",e),null===(n=In.current)||void 0===n||n.show({severity:"error",summary:"Action Failed",detail:"There was an error processing the learning. Please try again."})}})},variantInformation:"".concat(q," — ").concat(X),ruleTitle:q,pendingVariants:[Z],isPending:Dn.isPending})]}))};export{H as default};
|
|
2
2
|
//# sourceMappingURL=VariantCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as e,__assign as o}from"tslib";import{jsxs as i,jsx as n}from"react/jsx-runtime";import{Plus as d,Pencil as t,Trash2 as l}from"lucide-react";import r from"../../styles/ScopeTree.module.css.js";import{TreeNodeHeader as a}from"./TreeNodeHeader.js";import{TreeSectionItem as c}from"./TreeSectionItem.js";import{TreeAddAction as s}from"./TreeAddAction.js";var u=function(p){var h,m,
|
|
1
|
+
import{__spreadArray as e,__assign as o}from"tslib";import{jsxs as i,jsx as n}from"react/jsx-runtime";import{Plus as d,Pencil as t,Trash2 as l}from"lucide-react";import r from"../../styles/ScopeTree.module.css.js";import{TreeNodeHeader as a}from"./TreeNodeHeader.js";import{TreeSectionItem as c}from"./TreeSectionItem.js";import{TreeAddAction as s}from"./TreeAddAction.js";var u=function(p){var h,v,m,C=p.node,f=p.depth,b=void 0===f?0:f,g=p.nodePath,y=void 0===g?[]:g,S=p.expandedNodeIds,T=p.activeSelection,x=p.onToggleExpand,A=p.onSectionSelect,N=p.onNodeOptionsClick,L=p.onAddChild,k=p.onRenameChild,E=p.onDeleteChild,P=p.canDeleteScope,j=p.canEditScope,w=p.canCreateScope,D=p.searchQuery,I=p.sectionsConfig,V=void 0===I?[]:I,O=p.nodeTypesConfig,Q=void 0===O?[]:O,R=p.forceVisible,Y=void 0!==R&&R,K=e(e([],y,!0),[C.id],!1),W=S.has(C.id),H=!!T&&T.nodePath[T.nodePath.length-1]===C.id,q=!!T&&(T.nodePath.includes(C.id)&&!H),z=function(e,o){if(!o)return!0;var i=o.toLowerCase();return!!e.name.toLowerCase().includes(i)||!!e.children&&e.children.some(function(e){return z(e,o)})};if(!Y&&!z(C,D||""))return null;var B=b>=Q.length-1?Q[Q.length-1]:Q[b],F=!!(null==B?void 0:B.addChildType),G=!P||P(C.id),J=!j||j(C.id),M=!w||w(C.id),U=C.children&&C.children.length>0,X=!G||U,Z=G?U?"This scope cannot be deleted because other scopes inherit learnings from it.":void 0:"You do not have permission to delete this scope.",$=M?void 0:"You do not have permission to add a scope here.",_=!D||C.name.toLowerCase().includes(D.toLowerCase());return i("div",o({className:r.nodeWrapper,style:{"--tree-depth":b}},{children:[n(a,{nodeType:C.type,name:C.name,isExpanded:W,isSelected:H,isAncestor:q,childrenCount:null===(h=C.children)||void 0===h?void 0:h.length,onToggleExpand:function(e){e.stopPropagation(),x(C.id)},onClick:function(){A(K,"learnings")},searchQuery:D,menuOptions:e(e([],F?[{label:B.addChildLabel||"Add Child",icon:d,onClick:function(){return null==L?void 0:L(C.id,B.addChildType,C.name)},disabled:!M,tooltip:$}]:[],!0),[{label:"Rename",icon:t,onClick:function(){return null==k?void 0:k(C.id,C.name)},disabled:!J||"station"===(null===(v=null==C?void 0:C.type)||void 0===v?void 0:v.toLocaleLowerCase()),tooltip:J?void 0:"You do not have permission to rename this scope."},{label:"Delete ".concat((null==B?void 0:B.label)||"Node"),icon:l,onClick:function(){var e;return null==E?void 0:E(C.id,C.name,(null===(e=C.metrics)||void 0===e?void 0:e.learningsCount)||0)},disabled:X,tooltip:Z,className:"text-red-500 hover:text-red-600 hover:bg-red-50"}],!1)}),W&&i("div",o({className:r.childrenWrapper},{children:[V.filter(function(e){return!e.isVisible||e.isVisible(C,b)}).map(function(e){var o;return n(c,{icon:e.icon,label:e.label,badgeCount:e.badgeKey?null===(o=C.metrics)||void 0===o?void 0:o[e.badgeKey]:void 0,isActive:H&&(null==T?void 0:T.sectionId)===e.id,onClick:function(){return A(K,e.id)}},"".concat(C.id,"-").concat(e.id))}),null===(m=C.children)||void 0===m?void 0:m.map(function(e){return n(u,{node:e,depth:b+1,nodePath:K,expandedNodeIds:S,activeSelection:T,onToggleExpand:x,onSectionSelect:A,onNodeOptionsClick:N,onAddChild:L,onRenameChild:k,onDeleteChild:E,canDeleteScope:P,canEditScope:j,canCreateScope:w,searchQuery:D,forceVisible:_,sectionsConfig:V,nodeTypesConfig:Q},e.id)}),F&&n(s,{label:B.addChildLabel||"Add Child",onAdd:function(){return null==L?void 0:L(C.id,B.addChildType,C.name)},disabled:!M,tooltip:$})]}))]}))};export{u as TreeNode};
|
|
2
2
|
//# sourceMappingURL=TreeNode.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as o,jsx as n}from"react/jsx-runtime";import{ChevronDown as t,FolderOpen as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as o,jsx as n}from"react/jsx-runtime";import{ChevronDown as t,RadioTower as r,FolderOpen as c}from"lucide-react";import i from"../../styles/ScopeTree.module.css.js";import{TreeMenu as a}from"./TreeMenu.js";import{HighlightedText as d}from"./HighlightedText.js";var s=function(s){var l=s.name,m=s.isExpanded,p=s.isSelected,u=s.isAncestor,h=s.isExpandable,v=void 0===h||h,f=s.onToggleExpand,g=s.onClick,x=s.menuOptions,b=s.searchQuery,k=s.childrenCount,C=s.nodeType,N=p?i.nodeHeaderSelected:u?i.nodeHeaderAncestor:"",y=p||u;return o("div",e({className:"".concat(i.nodeHeader," ").concat(N),onClick:g,role:"button",tabIndex:0,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),g())}},{children:[n("div",e({className:"".concat(i.chevron," ").concat(m?i.chevronExpanded:""," ").concat(v?"":i.chevronHidden),onClick:function(e){v&&f(e)},role:"button",tabIndex:v?0:-1},{children:n(t,{size:16,strokeWidth:y?2.5:2,color:y?"#2563EB":"#64748B"})})),n("div",e({className:i.folderIcon},{children:"station"===(null==C?void 0:C.toLocaleLowerCase())?n(r,{size:18,strokeWidth:y?2.5:2,color:y?"currentColor":"#64748B"}):n(c,{size:18,strokeWidth:y?2.5:2,color:y?"currentColor":"#64748B"})})),n("span",e({className:i.nodeName},{children:n(d,{text:l,highlight:b})})),void 0!==k&&k>0&&n("span",e({className:"".concat(i.badge," ").concat(p?i.badgeActive:"")},{children:k})),x&&x.length>0&&n("div",e({onClick:function(e){return e.stopPropagation()}},{children:n(a,{options:x,buttonClassName:i.optionsButton,iconSize:16})}))]}))};export{s as TreeNodeHeader};
|
|
2
2
|
//# sourceMappingURL=TreeNodeHeader.js.map
|
|
@@ -313,6 +313,8 @@ export interface IApproveOrRejectParams {
|
|
|
313
313
|
appsecData?: {
|
|
314
314
|
application: string;
|
|
315
315
|
scopeLevelModuleId: string;
|
|
316
|
+
applicationLevelModuleId: string;
|
|
317
|
+
applicationLevelResourceId: string;
|
|
316
318
|
};
|
|
317
319
|
}
|
|
318
320
|
export declare const ApproveOrRejectVariants: ({ variant_ids, status, feedback, scopeId, is_deleted, appsecData, }: IApproveOrRejectParams) => Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scopeApis.d.ts","sourceRoot":"","sources":["../../../../../../src/features/LearningManagement/apis/scopeApis.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;IAChC,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,GAAG,EAAE,MAAM,C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AM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE;QACX,WAAW,EAAE,MAAM,CAAC;QACpB,kBAAkB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"scopeApis.d.ts","sourceRoot":"","sources":["../../../../../../src/features/LearningManagement/apis/scopeApis.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;IAChC,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,GAAG,EAAE,MAAM,CAAC;QACZ,aAAa,EAAE,OAAO,CAAC;QACvB,MAAM,CAAC,EAAE;YACP,WAAW,EAAE,MAAM,CAAC;YACpB,gBAAgB,CAAC,EAAE;gBACjB,iBAAiB,EAAE,GAAG,CAAC;aACxB,CAAC;YACF,WAAW,CAAC,EAAE;gBACZ,iBAAiB,EAAE,GAAG,CAAC;aACxB,CAAC;SACH,CAAC;QACF,UAAU,CAAC,EAAE;YACX,IAAI,EAAE,MAAM,CAAC;YACb,GAAG,EAAE,MAAM,CAAC;YACZ,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;QACF,OAAO,EAAE;YAEP,OAAO,EAAE,MAAM,CAAC;YAChB,sBAAsB,EAAE,MAAM,CAAC;YAC/B,yBAAyB,EAAE,MAAM,CAAC;YAClC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YACnC,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YAC1C,KAAK,EAAE;gBACL,IAAI,EAAE,MAAM,CAAC;gBACb,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;gBAC7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;gBAC1B,KAAK,EAAE;oBACL,SAAS,EAAE,MAAM,CAAC;oBAClB,OAAO,EAAE,MAAM,CAAC;oBAChB,oBAAoB,CAA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CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,UAAU,EAAE,sBAAsB,CAAC;CACpC;AAED,eAAO,MAAM,yBAAyB,gBACvB,MAAM;;;;;;;;kBAUlB,QAAQ,wBAAwB,CAgClC,CAAC;AAGF,eAAO,MAAM,mBAAmB,YACtB,yBAAyB,KAChC,QAAQ,2BAA2B,CA8BrC,CAAC;AACF,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE;QACX,WAAW,EAAE,MAAM,CAAC;QACpB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,wBAAwB,EAAE,MAAM,CAAC;QACjC,0BAA0B,EAAE,MAAM,CAAC;KACpC,CAAC;CACH;AAED,eAAO,MAAM,uBAAuB,wEAOjC,sBAAsB,iBAgBxB,CAAA;AAED,eAAO,MAAM,cAAc,UAAa,MAAM,iBAS7C,CAAA;AACD,eAAO,MAAM,aAAa,YAAmB,MAAM,iBAsBlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNode.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/LearningManagement/components/ScopeTree/TreeNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK/E,UAAU,aAAa;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,eAAe,EA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CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAgL5C,CAAC"}
|
package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNodeHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAY,cAAc,EAAE,MAAM,YAAY,CAAC;AAGtD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"TreeNodeHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAY,cAAc,EAAE,MAAM,YAAY,CAAC;AAGtD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAC,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAmExD,CAAC"}
|
|
@@ -9,6 +9,8 @@ export declare function useApproveOrRejectVariantsMutation(): import("@tanstack/
|
|
|
9
9
|
appsecData?: {
|
|
10
10
|
application: string;
|
|
11
11
|
scopeLevelModuleId: string;
|
|
12
|
+
applicationLevelModuleId: string;
|
|
13
|
+
applicationLevelResourceId: string;
|
|
12
14
|
} | undefined;
|
|
13
15
|
}, unknown>;
|
|
14
16
|
export declare function useGetAppSecRolesQuery(appId: string, enabled?: boolean): import("@tanstack/react-query/build/legacy/_tsup-dts-rollup").UseQueryResult<NoInfer<TData>, Error>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useApprovalQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/features/LearningManagement/queries/useApprovalQueries.ts"],"names":[],"mappings":"AAKA,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,MAAM,uGAU7D;AAED,wBAAgB,mBAAmB,CAAC,oBAAoB,EAAE,MAAM,uGAY/D;AAED,wBAAgB,kCAAkC;gBAUhC,MAAM,EAAE;YACZ,UAAU,GAAG,UAAU;;aAEtB,MAAM;;;qBAEa,MAAM;4BAAsB,MAAM;;
|
|
1
|
+
{"version":3,"file":"useApprovalQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/features/LearningManagement/queries/useApprovalQueries.ts"],"names":[],"mappings":"AAKA,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,MAAM,uGAU7D;AAED,wBAAgB,mBAAmB,CAAC,oBAAoB,EAAE,MAAM,uGAY/D;AAED,wBAAgB,kCAAkC;gBAUhC,MAAM,EAAE;YACZ,UAAU,GAAG,UAAU;;aAEtB,MAAM;;;qBAEa,MAAM;4BAAsB,MAAM;kCAA0B,MAAM;oCAA4B,MAAM;;YAUrI;AACD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,UAAO,uGAUnE"}
|