@e-llm-studio/instant-learning 1.3.0-alpha.4 → 1.3.0-alpha.7

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("@e-llm-studio/audit-log");require("@e-llm-studio/audit-log/dist/styles.css");var o=require("lucide-react");exports.default=function(r){var a=r.configId,l=r.ruleData,s=r.scopeId,d=r.scopeName,c=(null==d?void 0:d.trim())||"Selected",g=t.useMemo(function(){var i,t,n=[];s&&n.push(s);var o=(null===(i=null==l?void 0:l.data)||void 0===i?void 0:i.tier1)||(null==l?void 0:l.tier1)||[],r=(null===(t=null==l?void 0:l.data)||void 0===t?void 0:t.tier2)||(null==l?void 0:l.tier2)||[];return e.__spreadArray(e.__spreadArray([],o,!0),r,!0).forEach(function(e){(null==e?void 0:e.ruleId)&&n.push(e.ruleId),(null==e?void 0:e.variants)&&Array.isArray(e.variants)&&e.variants.forEach(function(e){(null==e?void 0:e.variantId)&&n.push(e.variantId)})}),n},[l,s]);return t.useEffect(function(){console.log("Flattened External Resource IDs:",g)},[g]),i.jsxs("div",e.__assign({style:{padding:"24px",fontFamily:"Arial, sans-serif"}},{children:[i.jsxs("div",e.__assign({style:{marginBottom:"16px",paddingBottom:"4px"}},{children:[i.jsxs("h1",e.__assign({style:{margin:0,color:"#334155",fontSize:"20px",fontWeight:700,lineHeight:1.25}},{children:[c," - Audit Log"]})),i.jsxs("p",e.__assign({style:{margin:"8px 0 0",color:"#667085",fontSize:"16px",fontWeight:500,lineHeight:1}},{children:["Track all learning updates and modifications with the ",c," scope."]}))]})),i.jsx(n.AuditLog,{configId:a,getData:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/fetch"},distinctValuesApi:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/distinct-values"},query:{externalResourceId:g.length>0?g:[""],paginationLimit:10},sidebar:{config:{showAnalystFilter:!0,showDateFilter:!0,showChangeTitleFilter:!0,showImpactPercentage:!1},labels:{title:"Filters",multiSelectLabel:"Modified By",multiSelectHint:"Filter by the user who made the change",changeTitleLabel:"Change Action",changeTitleHint:"Filter by Actions"}},table:{tableProps:{scrollable:!0,scrollHeight:"80vh",showGridlines:!0,size:"small",rowClassName:function(){return"custom-compact-row"},pt:{bodyCell:{style:{paddingTop:"4px",paddingBottom:"4px"}}}},hiddenColumns:["actions","changeSummary","changeDateTime","logId"],extraColumns:[{key:"modifiedBy",header:"Modified By",body:function(t){return i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[i.jsx(o.User,{size:16,color:"#64748b",style:{flexShrink:0}}),i.jsx("span",e.__assign({style:{fontWeight:500}},{children:t.modifiedBy}))]}))},style:{width:"15%",minWidth:"140px"}},{key:"changeAction",header:"Action",body:function(t){var n,o,r=(n=t.changeTitle,(o=(n||"").toUpperCase()).includes("CREATE")?{color:"#2e7d32",backgroundColor:"#edf7ed",borderColor:"#c8e6c9",boxShadow:"0 1px 2px rgba(46, 125, 50, 0.08)"}:o.includes("UPDATE")||o.includes("TOGGLE")?{color:"#1565c0",backgroundColor:"#e3f2fd",borderColor:"#bbdefb",boxShadow:"0 1px 2px rgba(21, 101, 192, 0.08)"}:o.includes("DELETE")?{color:"#c62828",backgroundColor:"#fdeeed",borderColor:"#ffcdd2",boxShadow:"0 1px 2px rgba(198, 40, 40, 0.08)"}:{color:"#475569",backgroundColor:"#f8fafc",borderColor:"#cbd5e1",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.06)"}),a=t.changeTitle?t.changeTitle.replace(/_/g," "):"—";return i.jsx("span",e.__assign({style:{color:r.color,backgroundColor:r.backgroundColor,border:"1px solid ".concat(r.borderColor),boxShadow:r.boxShadow,padding:"6px 12px",borderRadius:"999px",fontSize:"12px",lineHeight:1,fontWeight:600,display:"inline-block",minWidth:"76px",textAlign:"center",textTransform:"capitalize"}},{children:a}))},style:{width:"15%",textAlign:"center"}},{key:"customChangeSummary",header:"Change Summary",body:function(t){var n;return i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"4px 0"}},{children:[i.jsx(o.FileText,{size:16,color:"#94a3b8",style:{flexShrink:0,marginTop:"2px"}}),i.jsx("span",e.__assign({style:{color:"#334155",fontSize:"13px",lineHeight:1.5}},{children:null!==(n=t.actionText)&&void 0!==n?n:"—"}))]}))},style:{width:"30%",minWidth:"200px"}},{key:"redirectLink",header:"Link",body:function(t){var n,r=(null===(n=t.metadata)||void 0===n?void 0:n.redirect_url)||t.redirect_url;return r?i.jsx("div",e.__assign({style:{display:"flex",justifyContent:"center",alignItems:"center"}},{children:i.jsxs("a",e.__assign({href:r,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"6px",color:"#2563eb",textDecoration:"none",fontWeight:500,fontSize:"13px"}},{children:["View ",i.jsx(o.ExternalLink,{size:14})]}))})):i.jsx("span",e.__assign({style:{color:"#94a3b8",display:"flex",justifyContent:"center"}},{children:"—"}))},style:{width:"10%",minWidth:"90px",textAlign:"center"}},{key:"customChangeDateTime",header:"Change Time and Date",body:function(t){if(!t.actionDate)return i.jsx("span",e.__assign({style:{color:"#94a3b8"}},{children:"—"}));var n=new Date(t.actionDate),o=n.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"}),r=n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});return i.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",fontSize:"13px",color:"#475569"}},{children:[i.jsx("span",e.__assign({style:{fontWeight:500}},{children:o})),i.jsx("span",{children:r})]}))},style:{width:"15%",minWidth:"150px",textAlign:"center"}}]},filters:{config:{showFilterButton:!0,showSort:!0,showDate:!0,showSearch:!0,sortOptions:{latest:!0,oldest:!0,impactHighToLow:!1,impactLowToHigh:!1}}}})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),n=require("@e-llm-studio/audit-log");require("@e-llm-studio/audit-log/dist/styles.css");var o=require("lucide-react");exports.default=function(r){var l=r.configId,a=r.ruleData,s=r.scopeId,d=r.scopeName,c=(null==d?void 0:d.trim())||"Selected",g=i.useMemo(function(){var e=[];return s&&e.push(s),e},[a,s]);return i.useEffect(function(){console.log("Flattened External Resource IDs:",g)},[g]),t.jsxs("div",e.__assign({style:{padding:"24px",fontFamily:"Arial, sans-serif"}},{children:[t.jsxs("div",e.__assign({style:{marginBottom:"16px",paddingBottom:"4px"}},{children:[t.jsxs("h1",e.__assign({style:{margin:0,color:"#334155",fontSize:"20px",fontWeight:700,lineHeight:1.25}},{children:[c," - Audit Log"]})),t.jsxs("p",e.__assign({style:{margin:"8px 0 0",color:"#667085",fontSize:"16px",fontWeight:500,lineHeight:1}},{children:["Track all learning updates and modifications with the ",c," scope."]}))]})),t.jsx(n.AuditLog,{configId:l,getData:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/fetch"},distinctValuesApi:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/distinct-values"},query:{externalResourceId:g.length>0?g:[""],paginationLimit:10},sidebar:{config:{showAnalystFilter:!0,showDateFilter:!0,showChangeTitleFilter:!0,showImpactPercentage:!1},labels:{title:"Filters",multiSelectLabel:"Modified By",multiSelectHint:"Filter by the user who made the change",changeTitleLabel:"Change Action",changeTitleHint:"Filter by Actions"}},table:{tableProps:{scrollable:!0,scrollHeight:"80vh",showGridlines:!0,size:"small",rowClassName:function(){return"custom-compact-row"},pt:{bodyCell:{style:{paddingTop:"4px",paddingBottom:"4px"}}}},hiddenColumns:["actions","changeSummary","changeDateTime","logId"],extraColumns:[{key:"modifiedBy",header:"Modified By",body:function(i){return t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[t.jsx(o.User,{size:16,color:"#64748b",style:{flexShrink:0}}),t.jsx("span",e.__assign({style:{fontWeight:500}},{children:i.modifiedBy}))]}))},style:{width:"15%",minWidth:"140px"}},{key:"changeAction",header:"Action",body:function(i){var n,o,r=(n=i.changeTitle,(o=(n||"").toUpperCase()).includes("CREATE")?{color:"#2e7d32",backgroundColor:"#edf7ed",borderColor:"#c8e6c9",boxShadow:"0 1px 2px rgba(46, 125, 50, 0.08)"}:o.includes("UPDATE")||o.includes("TOGGLE")?{color:"#1565c0",backgroundColor:"#e3f2fd",borderColor:"#bbdefb",boxShadow:"0 1px 2px rgba(21, 101, 192, 0.08)"}:o.includes("DELETE")?{color:"#c62828",backgroundColor:"#fdeeed",borderColor:"#ffcdd2",boxShadow:"0 1px 2px rgba(198, 40, 40, 0.08)"}:{color:"#475569",backgroundColor:"#f8fafc",borderColor:"#cbd5e1",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.06)"}),l=i.changeTitle?i.changeTitle.replace(/_/g," "):"—";return t.jsx("span",e.__assign({style:{color:r.color,backgroundColor:r.backgroundColor,border:"1px solid ".concat(r.borderColor),boxShadow:r.boxShadow,padding:"6px 12px",borderRadius:"999px",fontSize:"12px",lineHeight:1,fontWeight:600,display:"inline-block",minWidth:"76px",textAlign:"center",textTransform:"capitalize"}},{children:l}))},style:{width:"15%",textAlign:"center"}},{key:"customChangeSummary",header:"Change Summary",body:function(i){var n;return t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"4px 0"}},{children:[t.jsx(o.FileText,{size:16,color:"#94a3b8",style:{flexShrink:0,marginTop:"2px"}}),t.jsx("span",e.__assign({style:{color:"#334155",fontSize:"13px",lineHeight:1.5}},{children:null!==(n=i.actionText)&&void 0!==n?n:"—"}))]}))},style:{width:"30%",minWidth:"200px"}},{key:"redirectLink",header:"Link",body:function(i){var n,r=(null===(n=i.metadata)||void 0===n?void 0:n.redirect_url)||i.redirect_url;return r?t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"center",alignItems:"center"}},{children:t.jsxs("a",e.__assign({href:r,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"6px",color:"#2563eb",textDecoration:"none",fontWeight:500,fontSize:"13px"}},{children:["View ",t.jsx(o.ExternalLink,{size:14})]}))})):t.jsx("span",e.__assign({style:{color:"#94a3b8",display:"flex",justifyContent:"center"}},{children:"—"}))},style:{width:"10%",minWidth:"90px",textAlign:"center"}},{key:"customChangeDateTime",header:"Change Time and Date",body:function(i){if(!i.actionDate)return t.jsx("span",e.__assign({style:{color:"#94a3b8"}},{children:"—"}));var n=new Date(i.actionDate),o=n.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"}),r=n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});return t.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",fontSize:"13px",color:"#475569"}},{children:[t.jsx("span",e.__assign({style:{fontWeight:500}},{children:o})),t.jsx("span",{children:r})]}))},style:{width:"15%",minWidth:"150px",textAlign:"center"}}]},filters:{config:{showFilterButton:!0,showSort:!0,showDate:!0,showSearch:!0,sortOptions:{latest:!0,oldest:!0,impactHighToLow:!1,impactLowToHigh:!1}}}})]}))};
2
2
  //# sourceMappingURL=AuditLog.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),r=require("lucide-react"),s=require("./store/useLearningTemplateStore.js"),a=require("primereact/toast"),i=require("./styles/LearningTemplateManagement.module.css.js"),o=require("./LearningTemplateLayout.js"),l=require("./components/EmptyLearningState.js"),u=require("./store/useAuthStore.js"),c=require("./apis/scopeApis.js"),d=require("./hooks/useLearningTemplateQueryParams.js"),p=require("./components/ConfirmationModal.js"),g=require("./components/LearningTemplateManagementSkeleton.js"),f=require("./utils/treeUtils.js"),S=require("./store/useEnvStore.js"),m=require("./store/useConfigStore.js"),v=require("./components/ToolTip.js"),h=require("./components/CreateRuleSetLegacyModal.js"),_=require("./store/usePermissionsStore.js"),y=require("./store/useAppSecRolesStore.js"),T=require("./queries/useApprovalQueries.js"),b=require("./RuleContent/AddScopeModal.js"),C=require("react-router-dom"),L=require("./shared/SuccessToastContent.js"),j=require("./shared/ErrorToastContent.js"),E=require("./RuleContent/RenameScopeModal.js"),A=[{id:"learnings",label:"Learnings",icon:r.BookOpen,badgeKey:"learningsCount"},{id:"access",label:"Access",icon:r.Users},{id:"history",label:"Change History",icon:r.History}],R=new Set(A.map(function(e){return e.id}));exports.default=function(r){var w,O=this,I=r.userDetails,q=r.llmStudioUrl,N=r.audacyBackendUrl,P=r.ilLabels,k=r.config,x=r.rbacConfig,D=r.auditLogConfig,U=r.app_integration_id,M=r.backwardCompatibility,B=void 0!==M&&M,G=s.useLearningTemplateStore(function(e){return e.selectedRuleSetId}),F=s.useLearningTemplateStore(function(e){return e.setSelectedRuleSetId}),Q=s.useLearningTemplateStore(function(e){return e.error}),Y=s.useLearningTemplateStore(function(e){return e.setError}),K=s.useLearningTemplateStore(function(e){return e.setStations}),H=s.useLearningTemplateStore(function(e){return e.scopeTreeData}),z=s.useLearningTemplateStore(function(e){return e.setScopeTreeData}),V=n.useState({isOpen:!1,type:"GLOBAL"}),W=V[0],J=V[1],X=n.useState(!1),Z=X[0],$=X[1],ee=n.useState(!1),te=ee[0],ne=ee[1],re=n.useState("learnings"),se=re[0],ae=re[1],ie=n.useState(null),oe=ie[0],le=ie[1],ue=n.useState(null),ce=ue[0],de=ue[1],pe=n.useRef(null),ge=n.useRef(null),fe=n.useRef(null),Se=u.default();Se.user;var me=Se.setUser,ve=m.useConfigStore(),he=ve.setConfig,_e=ve.setIlLabels,ye=e.__spreadArray([{type:"GLOBAL",label:"Global",addChildLabel:"Add Scope",addChildType:"SCOPE"},e.__assign({type:"SCOPE",label:"Scope"},!B&&{addChildLabel:"Add Subscope",addChildType:"SUBSCOPE"})],B?[]:[{type:"SUBSCOPE",label:"Subscope"}],!0),Te=function(){try{return C.useLocation()}catch(e){return{search:""}}}();n.useEffect(function(){var e=new URLSearchParams(window.location.search),t=e.get(d.QUERY_PARAM_KEYS.RULESET_ID),n=e.get(d.QUERY_PARAM_KEYS.SECTION),r=n&&R.has(n)?n:"learnings";(null==t?void 0:t.length)&&F&&ae&&(F(t),ae(r))},[null==Te?void 0:Te.search,ae,F]);var be=_.usePermissionsStore(function(e){return e.fetchPermissions}),Ce=_.usePermissionsStore(function(e){return e.hasPermission}),Le=y.useAppSecRolesStore(function(e){return e.setRoles}),je=S.default(function(e){return e.appsecRbacUrl})===x.appsecRbacUrl,Ee=T.useGetAppSecRolesQuery(x.applicationId,je).data;n.useEffect(function(){Ee&&Le(Ee.map(function(e){return{_id:e._id,name:e.name}}))},[Ee,Le]),n.useEffect(function(){var e;console.log("userDetails",I),me(I),console.log("llmStudioUrl",q),console.log("audacyBackendUrl",N),S.default.getState().setLlmStudioUrl(q),S.default.getState().setAudacyBackendUrl(N),S.default.getState().setRbacConfig(x),S.default.getState().setAuditLogConfig(D),he(k),_e(P),s.useLearningTemplateStore.getState().setAppIntegrationId(null!=U?U:null),s.useLearningTemplateStore.getState().setBackwardCompatibility(B),s.useLearningTemplateStore.getState().setToken(null!==(e=I.accessToken)&&void 0!==e?e:null)},[I,me,q,N,x,D,k,he,P,_e,U,B]),n.useEffect(function(){(null==I?void 0:I.accessToken)&&q&&c.fetchTiers()},[U,null==I?void 0:I.accessToken,q]);var Ae=function(t){return void 0===t&&(t=!0),e.__awaiter(O,void 0,void 0,function(){var n,r,a,i,o,l;return e.__generator(this,function(u){switch(u.label){case 0:t&&$(!0),Y(null),u.label=1;case 1:return u.trys.push([1,4,5,6]),[4,be(x.applicationId)];case 2:return u.sent(),n=function(t){if(!_.usePermissionsStore.getState().hasPermission("ilotj.scope.view",t.id))return null;var r=t.children?t.children.map(function(e){return n(e)}).filter(function(e){return null!==e}):[];return e.__assign(e.__assign({},t),{children:r})},[4,c.fetchScopes(U,I.accessToken)];case 3:return(r=u.sent())&&r.data&&r.data.data&&(a=r.data.data,Array.isArray(a)&&(a=a.length>0?a[0]:null),a?(i=n(a))?(le(null),z({data:i}),ge.current?(F(ge.current),ae("learnings"),ge.current=null):s.useLearningTemplateStore.getState().selectedRuleSetId||F(i.id)):(le(null!==(l=a.id)&&void 0!==l?l:null),z(null)):(le(null),z(null))),[3,6];case 4:return o=u.sent(),console.error("Failed to fetch rule sets or permissions",o),Y("Failed to load data. Please try again later."),[3,6];case 5:return $(!1),[7];case 6:return[2]}})})};n.useEffect(function(){var e;(null===(e=null==I?void 0:I.accessToken)||void 0===e?void 0:e.length)&&je?Ae(!0):console.warn("Error: Trying to fetch rules without access token",I)},[null==I?void 0:I.accessToken,Y,K,x.applicationId,je]);var Re=function(n){return e.__awaiter(O,void 0,void 0,function(){var r,s,a,o;return e.__generator(this,function(l){switch(l.label){case 0:ne(!0),l.label=1;case 1:return l.trys.push([1,4,5,6]),W.scopeId?[4,c.renameScope({scope_id:W.scopeId,scope_name:n})]:[2];case 2:return l.sent(),[4,Ae(!0)];case 3:return l.sent(),J(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),[3,6];case 4:throw r=l.sent(),console.error("An error occurred during scope rename.",r),null===(s=fe.current)||void 0===s||s.show({severity:"error",sticky:!1,className:i.default.errorToast,content:t.jsx(j.default,{message:(null===(o=null===(a=null==r?void 0:r.response)||void 0===a?void 0:a.data)||void 0===o?void 0:o.message)||"There was an error renaming the scope. Please try again."})}),r;case 5:return ne(!1),[7];case 6:return[2]}})})},we=function(t,n,r){return e.__awaiter(O,void 0,void 0,function(){var n,r,a,i,o,l,u,d;return e.__generator(this,function(p){switch(p.label){case 0:ne(!0),p.label=1;case 1:return p.trys.push([1,4,5,6]),[4,c.deleteRuleSet(t,I.accessToken)];case 2:return p.sent(),s.useLearningTemplateStore.getState().selectedRuleSetId===t&&(n=s.useLearningTemplateStore.getState().scopeTreeData,(r=f.findNodePathById((null==n?void 0:n.data)||null,t))&&r.length>1&&(a=r[r.length-2],F(a),ae("learnings"))),[4,Ae(!0)];case 3:return p.sent(),J(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),null===(o=fe.current)||void 0===o||o.show({severity:"success",summary:"Deleted Successfully",detail:"The scope was permanently removed."}),[3,6];case 4:return i=p.sent(),console.error("An error occurred during scope deletion.",i),null===(l=fe.current)||void 0===l||l.show({severity:"error",summary:"Delete Failed",detail:(null===(d=null===(u=null==i?void 0:i.response)||void 0===u?void 0:u.data)||void 0===d?void 0:d.message)||"There was an error deleting the scope. Please try again."}),[3,6];case 5:return ne(!1),[7];case 6:return[2]}})})},Oe=H,Ie=ce?{data:{id:ce.stationId,name:ce.stationName,type:"STATION",metrics:{learningsCount:ce.learningsCount,stationsCount:0},children:[]}}:Oe,qe=!!(null==Ie?void 0:Ie.data);null===(w=null==Ie?void 0:Ie.data)||void 0===w||w.type;var Ne=_.usePermissionsStore(function(e){return e.hasGlobalPermission})("ilotj.scope.global.create",x.applicationResourceId||""),Pe=(ce?A.filter(function(e){return"stations"!==e.id}):A).filter(function(e){return!(!B&&"access"===e.id)});return t.jsx(v.TooltipProvider,{children:t.jsxs("div",e.__assign({className:i.default.learningManagementContainer},{children:[t.jsx("div",e.__assign({className:i.default.mainWrapper},{children:Z?t.jsx(g.default,{}):Q?t.jsxs("div",e.__assign({className:i.default.errorContainer},{children:[t.jsx("div",e.__assign({className:i.default.errorTitle},{children:"Error Loading Data"})),t.jsx("p",e.__assign({className:i.default.errorDesc},{children:Q})),t.jsx("button",e.__assign({onClick:function(){return Ae(!0)},className:i.default.tryAgainBtn},{children:"Try Again"}))]})):qe?t.jsx(o.default,{onOpenCreateModal:function(){return J({isOpen:!0,type:"GLOBAL"})},onAddChild:function(e,t,n){return J({isOpen:!0,type:t,parentId:e,parentName:n})},onRenameChild:function(e,t){return J({isOpen:!0,type:"RENAME",scopeId:e,initialName:t})},onDeleteChild:function(t,n,r){return e.__awaiter(O,void 0,void 0,function(){var a,i,o;return e.__generator(this,function(e){switch(e.label){case 0:return a=s.useLearningTemplateStore.getState().scopeTreeData,i=f.findNodePathById((null==a?void 0:a.data)||null,t),o=!!i&&3===i.length,0!==r?[3,2]:[4,we(t)];case 1:return e.sent(),[3,3];case 2:J({isOpen:!0,type:"DELETE",scopeId:t,initialName:n,isSubscope:o}),e.label=3;case 3:return[2]}})})},canDeleteScope:function(e){return Ce("ilotj.scope.delete",e)},canEditScope:function(e){return Ce("ilotj.scope.edit",e)},canCreateScope:function(e){return Ce("ilotj.scope.create",e)},onSectionSelect:function(e,t){var n;console.log("Section Selected:",{scopeId:e,sectionId:t}),d.setQueryParams(((n={})[d.QUERY_PARAM_KEYS.SECTION]="learnings"===t?null:t,n)),ae(t),F(e)},activeSectionId:se,scopeTreeData:Ie,sectionsConfig:Pe,onViewStation:function(e){pe.current=G,de(e),ae("learnings"),F(e.stationId)},onRefreshRuleSets:function(e,t){void 0===e&&(e=!0),t&&(ge.current=t),Ae(e)},nodeTypesConfig:ye,app_integration_id:U,token:I.accessToken}):t.jsx(l.default,{onCreate:function(){return J({isOpen:!0,type:"GLOBAL"})},title:"No Global Scope has been added!",desc:"Start by creating a Global scope to define base learnings that apply across all stations.",button:"Create Global Scope",canCreateRule:Ne,noAccessTitle:"Access Restricted",noAccessDesc:"You do not have access to create a Global scope for this application.",onRequestAccess:function(){return e.__awaiter(O,void 0,void 0,function(){var n,r,a,o,l,u,d,p,g;return e.__generator(this,function(e){switch(e.label){case 0:if(!(n=(null===(o=null===(a=s.useLearningTemplateStore.getState().scopeTreeData)||void 0===a?void 0:a.data)||void 0===o?void 0:o.id)||oe))return null===(l=fe.current)||void 0===l||l.show({severity:"error",sticky:!1,className:i.default.errorToast,content:t.jsx(j.default,{message:"Unable to identify the global scope for this access request."})}),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,c.requestAccess(n)];case 2:return e.sent(),null===(u=fe.current)||void 0===u||u.show({severity:"success",sticky:!1,life:3e3,className:i.default.successToast,content:t.jsx(L.default,{message:"Access request submitted successfully!"})}),[3,4];case 3:return r=e.sent(),null===(d=fe.current)||void 0===d||d.show({severity:"error",sticky:!1,className:i.default.errorToast,content:t.jsx(j.default,{message:(null===(g=null===(p=null==r?void 0:r.response)||void 0===p?void 0:p.data)||void 0===g?void 0:g.detail)||"Failed to request access. Please try again."})}),[3,4];case 4:return[2]}})})}})})),t.jsx(a.Toast,{ref:fe,pt:{root:{style:{zIndex:9999}}}}),B&&W.isOpen&&"DELETE"!==W.type&&"RENAME"!==W.type?t.jsx(h.default,{isOpen:!0,onClose:function(){return J(e.__assign(e.__assign({},W),{isOpen:!1}))},onSubmit:function(t){return e.__awaiter(O,void 0,void 0,function(){var n,r,a,i,o,l,u,d,p,g,f,S,m,v,h,_,y,T,b,C;return e.__generator(this,function(L){switch(L.label){case 0:ne(!0),n=s.useLearningTemplateStore.getState().backwardCompatibility,L.label=1;case 1:return L.trys.push([1,12,13,14]),r=void 0,n&&"object"==typeof t?r=t:(a=t,i="SCOPE"===W.type&&W.parentId,o=i?"genreRuleSet":W.type,r={topic:o,scope_reference_id:null,scopeDescription:"demo",parentScopeId:W.parentId||null,scopeName:a,scopeReferenceMetadata:{},applicationMappingId:U}),[4,c.createRuleSet(r,I.accessToken)];case 2:if(l=L.sent(),!(u=null===(v=null==l?void 0:l.data)||void 0===v?void 0:v.scopeId))return[3,10];if(ge.current=u,d=n&&(null===(h=r.topic)||void 0===h?void 0:h.toLowerCase().includes("genre")),p=!n&&"GLOBAL"!==W.type&&W.parentId,!d&&!p)return[3,10];if(!(g=n?null===(y=null===(_=s.useLearningTemplateStore.getState().scopeTreeData)||void 0===_?void 0:_.data)||void 0===y?void 0:y.id:W.parentId))return[3,10];if(!B)return[3,7];L.label=3;case 3:return L.trys.push([3,5,,6]),[4,c.inheritScopeBackwardCompatible({source_scope_id:g,target_scope_id:u})];case 4:return L.sent(),[3,6];case 5:return f=L.sent(),console.error("Failed to inherit rules for the new scope:",f),[3,6];case 6:return[3,10];case 7:return L.trys.push([7,9,,10]),[4,c.inheritScope({source_scope_id:g,target_scope_id:u,application_mapping_id:U||"",is_copy_parent_variant_id:!1})];case 8:return L.sent(),[3,10];case 9:return S=L.sent(),console.error("Failed to inherit rules for the new scope:",S),[3,10];case 10:return[4,Ae(!0)];case 11:return L.sent(),J(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),[3,14];case 12:throw m=L.sent(),console.error("An error occurred during scope creation.",m),null===(T=fe.current)||void 0===T||T.show({severity:"error",summary:"Creation Failed",detail:(null===(C=null===(b=null==m?void 0:m.response)||void 0===b?void 0:b.data)||void 0===C?void 0:C.message)||"There was an error creating the scope. Please try again."}),m;case 13:return ne(!1),[7];case 14:return[2]}})})},hasGlobalRuleSet:qe,canCreateGlobal:Ne}):t.jsxs(t.Fragment,{children:[t.jsx(b.default,{isOpen:W.isOpen&&"DELETE"!==W.type&&"RENAME"!==W.type,onClose:function(){return J(e.__assign(e.__assign({},W),{isOpen:!1}))},onCreate:function(e){return Re(null!=e?e:"")},hasGlobalRuleSet:qe}),t.jsx(E.default,{isOpen:W.isOpen&&"RENAME"===W.type,onClose:function(){return J(e.__assign(e.__assign({},W),{isOpen:!1}))},onSave:Re,initialName:W.initialName})]}),t.jsx(p.default,{isOpen:W.isOpen&&"DELETE"===W.type,onCancel:function(){return J(e.__assign(e.__assign({},W),{isOpen:!1}))},onConfirm:function(){return we(W.scopeId,W.initialName,W.isSubscope)},title:"Delete Scope",description:t.jsxs(t.Fragment,{children:["Deleting ",t.jsx("span",e.__assign({className:i.default.highlight},{children:W.initialName||"this scope"}))," will permanently remove all Learnings, Access rules, and Change History inside it. This cannot be undone."]}),confirmText:"Delete",confirmBgColor:"#EF4444",isLoading:te})]}))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),r=require("lucide-react"),s=require("./store/useLearningTemplateStore.js"),a=require("primereact/toast"),i=require("./styles/LearningTemplateManagement.module.css.js"),o=require("./LearningTemplateLayout.js"),l=require("./components/EmptyLearningState.js"),u=require("./store/useAuthStore.js"),c=require("./apis/scopeApis.js"),d=require("./hooks/useLearningTemplateQueryParams.js"),p=require("./components/ConfirmationModal.js"),g=require("./components/LearningTemplateManagementSkeleton.js"),f=require("./utils/treeUtils.js"),S=require("./store/useEnvStore.js"),m=require("./store/useConfigStore.js"),v=require("./components/ToolTip.js"),h=require("./components/CreateRuleSetLegacyModal.js"),_=require("./store/usePermissionsStore.js"),y=require("./store/useAppSecRolesStore.js"),T=require("./queries/useApprovalQueries.js"),b=require("./RuleContent/AddScopeModal.js"),C=require("react-router-dom"),L=require("./shared/SuccessToastContent.js"),j=require("./shared/ErrorToastContent.js"),E=require("./RuleContent/RenameScopeModal.js"),A=[{id:"learnings",label:"Learnings",icon:r.BookOpen,badgeKey:"learningsCount"},{id:"access",label:"Access",icon:r.Users},{id:"history",label:"Change History",icon:r.History}],R=new Set(A.map(function(e){return e.id}));exports.default=function(r){var w,O=this,I=r.userDetails,q=r.llmStudioUrl,N=r.audacyBackendUrl,P=r.ilLabels,k=r.config,x=r.rbacConfig,D=r.auditLogConfig,U=r.app_integration_id,M=r.backwardCompatibility,B=void 0!==M&&M,G=s.useLearningTemplateStore(function(e){return e.selectedRuleSetId}),F=s.useLearningTemplateStore(function(e){return e.setSelectedRuleSetId}),Q=s.useLearningTemplateStore(function(e){return e.error}),Y=s.useLearningTemplateStore(function(e){return e.setError}),K=s.useLearningTemplateStore(function(e){return e.setStations}),H=s.useLearningTemplateStore(function(e){return e.scopeTreeData}),z=s.useLearningTemplateStore(function(e){return e.setScopeTreeData}),V=n.useState({isOpen:!1,type:"GLOBAL"}),W=V[0],J=V[1],X=n.useState(!1),Z=X[0],$=X[1],ee=n.useState(!1),te=ee[0],ne=ee[1],re=n.useState("learnings"),se=re[0],ae=re[1],ie=n.useState(null),oe=ie[0],le=ie[1],ue=n.useState(null),ce=ue[0],de=ue[1],pe=n.useRef(null),ge=n.useRef(null),fe=n.useRef(null),Se=u.default();Se.user;var me=Se.setUser,ve=m.useConfigStore(),he=ve.setConfig,_e=ve.setIlLabels,ye=e.__spreadArray([{type:"GLOBAL",label:"Global",addChildLabel:"Add Scope",addChildType:"SCOPE"},e.__assign({type:"SCOPE",label:"Scope"},!B&&{addChildLabel:"Add Subscope",addChildType:"SUBSCOPE"})],B?[]:[{type:"SUBSCOPE",label:"Subscope"}],!0),Te=function(){try{return C.useLocation()}catch(e){return{search:""}}}();n.useEffect(function(){var e=new URLSearchParams(window.location.search),t=e.get(d.QUERY_PARAM_KEYS.RULESET_ID),n=e.get(d.QUERY_PARAM_KEYS.SECTION),r=n&&R.has(n)?n:"learnings";(null==t?void 0:t.length)&&F&&ae&&(F(t),ae(r))},[null==Te?void 0:Te.search,ae,F]);var be=_.usePermissionsStore(function(e){return e.fetchPermissions}),Ce=_.usePermissionsStore(function(e){return e.hasPermission}),Le=y.useAppSecRolesStore(function(e){return e.setRoles}),je=S.default(function(e){return e.appsecRbacUrl})===x.appsecRbacUrl,Ee=T.useGetAppSecRolesQuery(x.applicationId,je).data;n.useEffect(function(){Ee&&Le(Ee.map(function(e){return{_id:e._id,name:e.name}}))},[Ee,Le]),n.useEffect(function(){var e;console.log("userDetails",I),me(I),console.log("llmStudioUrl",q),console.log("audacyBackendUrl",N),S.default.getState().setLlmStudioUrl(q),S.default.getState().setAudacyBackendUrl(N),S.default.getState().setRbacConfig(x),S.default.getState().setAuditLogConfig(D),he(k),_e(P),s.useLearningTemplateStore.getState().setAppIntegrationId(null!=U?U:null),s.useLearningTemplateStore.getState().setBackwardCompatibility(B),s.useLearningTemplateStore.getState().setToken(null!==(e=I.accessToken)&&void 0!==e?e:null)},[I,me,q,N,x,D,k,he,P,_e,U,B]),n.useEffect(function(){(null==I?void 0:I.accessToken)&&q&&(null==U?void 0:U.trim())&&c.fetchTiers()},[U,null==I?void 0:I.accessToken,q]);var Ae=function(t){return void 0===t&&(t=!0),e.__awaiter(O,void 0,void 0,function(){var n,r,a,i,o,l;return e.__generator(this,function(u){switch(u.label){case 0:t&&$(!0),Y(null),u.label=1;case 1:return u.trys.push([1,4,5,6]),[4,be(x.applicationId)];case 2:return u.sent(),n=function(t){if(!_.usePermissionsStore.getState().hasPermission("ilotj.scope.view",t.id))return null;var r=t.children?t.children.map(function(e){return n(e)}).filter(function(e){return null!==e}):[];return e.__assign(e.__assign({},t),{children:r})},[4,c.fetchScopes(U,I.accessToken)];case 3:return(r=u.sent())&&r.data&&r.data.data&&(a=r.data.data,Array.isArray(a)&&(a=a.length>0?a[0]:null),a?(i=n(a))?(le(null),z({data:i}),ge.current?(F(ge.current),ae("learnings"),ge.current=null):s.useLearningTemplateStore.getState().selectedRuleSetId||F(i.id)):(le(null!==(l=a.id)&&void 0!==l?l:null),z(null)):(le(null),z(null))),[3,6];case 4:return o=u.sent(),console.error("Failed to fetch rule sets or permissions",o),Y("Failed to load data. Please try again later."),[3,6];case 5:return $(!1),[7];case 6:return[2]}})})};n.useEffect(function(){var e;(null===(e=null==I?void 0:I.accessToken)||void 0===e?void 0:e.length)&&je?Ae(!0):console.warn("Error: Trying to fetch rules without access token",I)},[null==I?void 0:I.accessToken,Y,K,x.applicationId,je]);var Re=function(n){return e.__awaiter(O,void 0,void 0,function(){var r,s,a,o;return e.__generator(this,function(l){switch(l.label){case 0:ne(!0),l.label=1;case 1:return l.trys.push([1,4,5,6]),W.scopeId?[4,c.renameScope({scope_id:W.scopeId,scope_name:n})]:[2];case 2:return l.sent(),[4,Ae(!0)];case 3:return l.sent(),J(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),[3,6];case 4:throw r=l.sent(),console.error("An error occurred during scope rename.",r),null===(s=fe.current)||void 0===s||s.show({severity:"error",sticky:!1,className:i.default.errorToast,content:t.jsx(j.default,{message:(null===(o=null===(a=null==r?void 0:r.response)||void 0===a?void 0:a.data)||void 0===o?void 0:o.message)||"There was an error renaming the scope. Please try again."})}),r;case 5:return ne(!1),[7];case 6:return[2]}})})},we=function(t,n,r){return e.__awaiter(O,void 0,void 0,function(){var n,r,a,i,o,l,u,d;return e.__generator(this,function(p){switch(p.label){case 0:ne(!0),p.label=1;case 1:return p.trys.push([1,4,5,6]),[4,c.deleteRuleSet(t,I.accessToken)];case 2:return p.sent(),s.useLearningTemplateStore.getState().selectedRuleSetId===t&&(n=s.useLearningTemplateStore.getState().scopeTreeData,(r=f.findNodePathById((null==n?void 0:n.data)||null,t))&&r.length>1&&(a=r[r.length-2],F(a),ae("learnings"))),[4,Ae(!0)];case 3:return p.sent(),J(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),null===(o=fe.current)||void 0===o||o.show({severity:"success",summary:"Deleted Successfully",detail:"The scope was permanently removed."}),[3,6];case 4:return i=p.sent(),console.error("An error occurred during scope deletion.",i),null===(l=fe.current)||void 0===l||l.show({severity:"error",summary:"Delete Failed",detail:(null===(d=null===(u=null==i?void 0:i.response)||void 0===u?void 0:u.data)||void 0===d?void 0:d.message)||"There was an error deleting the scope. Please try again."}),[3,6];case 5:return ne(!1),[7];case 6:return[2]}})})},Oe=H,Ie=ce?{data:{id:ce.stationId,name:ce.stationName,type:"STATION",metrics:{learningsCount:ce.learningsCount,stationsCount:0},children:[]}}:Oe,qe=!!(null==Ie?void 0:Ie.data);null===(w=null==Ie?void 0:Ie.data)||void 0===w||w.type;var Ne=_.usePermissionsStore(function(e){return e.hasGlobalPermission})("ilotj.scope.global.create",x.applicationResourceId||""),Pe=(ce?A.filter(function(e){return"stations"!==e.id}):A).filter(function(e){return!(!B&&"access"===e.id)});return t.jsx(v.TooltipProvider,{children:t.jsxs("div",e.__assign({className:i.default.learningManagementContainer},{children:[t.jsx("div",e.__assign({className:i.default.mainWrapper},{children:Z?t.jsx(g.default,{}):Q?t.jsxs("div",e.__assign({className:i.default.errorContainer},{children:[t.jsx("div",e.__assign({className:i.default.errorTitle},{children:"Error Loading Data"})),t.jsx("p",e.__assign({className:i.default.errorDesc},{children:Q})),t.jsx("button",e.__assign({onClick:function(){return Ae(!0)},className:i.default.tryAgainBtn},{children:"Try Again"}))]})):qe?t.jsx(o.default,{onOpenCreateModal:function(){return J({isOpen:!0,type:"GLOBAL"})},onAddChild:function(e,t,n){return J({isOpen:!0,type:t,parentId:e,parentName:n})},onRenameChild:function(e,t){return J({isOpen:!0,type:"RENAME",scopeId:e,initialName:t})},onDeleteChild:function(t,n,r){return e.__awaiter(O,void 0,void 0,function(){var a,i,o;return e.__generator(this,function(e){switch(e.label){case 0:return a=s.useLearningTemplateStore.getState().scopeTreeData,i=f.findNodePathById((null==a?void 0:a.data)||null,t),o=!!i&&3===i.length,0!==r?[3,2]:[4,we(t)];case 1:return e.sent(),[3,3];case 2:J({isOpen:!0,type:"DELETE",scopeId:t,initialName:n,isSubscope:o}),e.label=3;case 3:return[2]}})})},canDeleteScope:function(e){return Ce("ilotj.scope.delete",e)},canEditScope:function(e){return Ce("ilotj.scope.edit",e)},canCreateScope:function(e){return Ce("ilotj.scope.create",e)},onSectionSelect:function(e,t){var n;console.log("Section Selected:",{scopeId:e,sectionId:t}),d.setQueryParams(((n={})[d.QUERY_PARAM_KEYS.SECTION]="learnings"===t?null:t,n)),ae(t),F(e)},activeSectionId:se,scopeTreeData:Ie,sectionsConfig:Pe,onViewStation:function(e){pe.current=G,de(e),ae("learnings"),F(e.stationId)},onRefreshRuleSets:function(e,t){void 0===e&&(e=!0),t&&(ge.current=t),Ae(e)},nodeTypesConfig:ye,app_integration_id:U,token:I.accessToken}):t.jsx(l.default,{onCreate:function(){return J({isOpen:!0,type:"GLOBAL"})},title:"No Global Scope has been added!",desc:"Start by creating a Global scope to define base learnings that apply across all stations.",button:"Create Global Scope",canCreateRule:Ne,noAccessTitle:"Access Restricted",noAccessDesc:"You do not have access to create a Global scope for this application.",onRequestAccess:function(){return e.__awaiter(O,void 0,void 0,function(){var n,r,a,o,l,u,d,p,g;return e.__generator(this,function(e){switch(e.label){case 0:if(!(n=(null===(o=null===(a=s.useLearningTemplateStore.getState().scopeTreeData)||void 0===a?void 0:a.data)||void 0===o?void 0:o.id)||oe))return null===(l=fe.current)||void 0===l||l.show({severity:"error",sticky:!1,className:i.default.errorToast,content:t.jsx(j.default,{message:"Unable to identify the global scope for this access request."})}),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,c.requestAccess(n)];case 2:return e.sent(),null===(u=fe.current)||void 0===u||u.show({severity:"success",sticky:!1,life:3e3,className:i.default.successToast,content:t.jsx(L.default,{message:"Access request submitted successfully!"})}),[3,4];case 3:return r=e.sent(),null===(d=fe.current)||void 0===d||d.show({severity:"error",sticky:!1,className:i.default.errorToast,content:t.jsx(j.default,{message:(null===(g=null===(p=null==r?void 0:r.response)||void 0===p?void 0:p.data)||void 0===g?void 0:g.detail)||"Failed to request access. Please try again."})}),[3,4];case 4:return[2]}})})}})})),t.jsx(a.Toast,{ref:fe,pt:{root:{style:{zIndex:9999}}}}),B&&W.isOpen&&"DELETE"!==W.type&&"RENAME"!==W.type?t.jsx(h.default,{isOpen:!0,onClose:function(){return J(e.__assign(e.__assign({},W),{isOpen:!1}))},onSubmit:function(t){return e.__awaiter(O,void 0,void 0,function(){var n,r,a,i,o,l,u,d,p,g,f,S,m,v,h,_,y,T,b,C;return e.__generator(this,function(L){switch(L.label){case 0:ne(!0),n=s.useLearningTemplateStore.getState().backwardCompatibility,L.label=1;case 1:return L.trys.push([1,12,13,14]),r=void 0,n&&"object"==typeof t?r=t:(a=t,i="SCOPE"===W.type&&W.parentId,o=i?"genreRuleSet":W.type,r={topic:o,scope_reference_id:null,scopeDescription:"demo",parentScopeId:W.parentId||null,scopeName:a,scopeReferenceMetadata:{},applicationMappingId:U}),[4,c.createRuleSet(r,I.accessToken)];case 2:if(l=L.sent(),!(u=null===(v=null==l?void 0:l.data)||void 0===v?void 0:v.scopeId))return[3,10];if(ge.current=u,d=n&&(null===(h=r.topic)||void 0===h?void 0:h.toLowerCase().includes("genre")),p=!n&&"GLOBAL"!==W.type&&W.parentId,!d&&!p)return[3,10];if(!(g=n?null===(y=null===(_=s.useLearningTemplateStore.getState().scopeTreeData)||void 0===_?void 0:_.data)||void 0===y?void 0:y.id:W.parentId))return[3,10];if(!B)return[3,7];L.label=3;case 3:return L.trys.push([3,5,,6]),[4,c.inheritScopeBackwardCompatible({source_scope_id:g,target_scope_id:u})];case 4:return L.sent(),[3,6];case 5:return f=L.sent(),console.error("Failed to inherit rules for the new scope:",f),[3,6];case 6:return[3,10];case 7:return L.trys.push([7,9,,10]),[4,c.inheritScope({source_scope_id:g,target_scope_id:u,application_mapping_id:U||"",is_copy_parent_variant_id:!1})];case 8:return L.sent(),[3,10];case 9:return S=L.sent(),console.error("Failed to inherit rules for the new scope:",S),[3,10];case 10:return[4,Ae(!0)];case 11:return L.sent(),J(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),[3,14];case 12:throw m=L.sent(),console.error("An error occurred during scope creation.",m),null===(T=fe.current)||void 0===T||T.show({severity:"error",summary:"Creation Failed",detail:(null===(C=null===(b=null==m?void 0:m.response)||void 0===b?void 0:b.data)||void 0===C?void 0:C.message)||"There was an error creating the scope. Please try again."}),m;case 13:return ne(!1),[7];case 14:return[2]}})})},hasGlobalRuleSet:qe,canCreateGlobal:Ne}):t.jsxs(t.Fragment,{children:[t.jsx(b.default,{isOpen:W.isOpen&&"DELETE"!==W.type&&"RENAME"!==W.type,onClose:function(){return J(e.__assign(e.__assign({},W),{isOpen:!1}))},onCreate:function(e){return Re(null!=e?e:"")},hasGlobalRuleSet:qe}),t.jsx(E.default,{isOpen:W.isOpen&&"RENAME"===W.type,onClose:function(){return J(e.__assign(e.__assign({},W),{isOpen:!1}))},onSave:Re,initialName:W.initialName})]}),t.jsx(p.default,{isOpen:W.isOpen&&"DELETE"===W.type,onCancel:function(){return J(e.__assign(e.__assign({},W),{isOpen:!1}))},onConfirm:function(){return we(W.scopeId,W.initialName,W.isSubscope)},title:"Delete Scope",description:t.jsxs(t.Fragment,{children:["Deleting ",t.jsx("span",e.__assign({className:i.default.highlight},{children:W.initialName||"this scope"}))," will permanently remove all Learnings, Access rules, and Change History inside it. This cannot be undone."]}),confirmText:"Delete",confirmBgColor:"#EF4444",isLoading:te})]}))})};
2
2
  //# sourceMappingURL=LearningManagement.js.map